From 6a66fcf1f70ddcd94ee9c5d6d2a5394a67259259 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 21 Feb 2024 17:30:38 -0600 Subject: [PATCH 1/5] base distr --- app/app.go | 6 +- x/distribution/README.md | 1049 ++++ x/distribution/abci.go | 34 + x/distribution/autocli.go | 140 + x/distribution/client/cli/tx.go | 311 ++ x/distribution/client/cli/tx_test.go | 302 ++ x/distribution/client/cli/util_test.go | 59 + x/distribution/client/common/common.go | 32 + x/distribution/client/common/common_test.go | 39 + x/distribution/doc.go | 6 + x/distribution/exported/exported.go | 18 + x/distribution/keeper/alias_functions.go | 23 + x/distribution/keeper/allocation.go | 143 + x/distribution/keeper/allocation_test.go | 341 ++ x/distribution/keeper/common_test.go | 22 + x/distribution/keeper/delegation.go | 320 ++ x/distribution/keeper/delegation_test.go | 1051 ++++ x/distribution/keeper/fee_pool.go | 34 + x/distribution/keeper/genesis.go | 234 + x/distribution/keeper/grpc_query.go | 372 ++ x/distribution/keeper/hooks.go | 182 + x/distribution/keeper/invariants.go | 192 + x/distribution/keeper/keeper.go | 218 + x/distribution/keeper/keeper_test.go | 211 + x/distribution/keeper/migrations.go | 32 + x/distribution/keeper/msg_server.go | 236 + x/distribution/keeper/params.go | 28 + x/distribution/keeper/store.go | 439 ++ x/distribution/keeper/validator.go | 174 + x/distribution/migrations/v1/types.go | 185 + x/distribution/migrations/v2/helpers.go | 72 + x/distribution/migrations/v2/store.go | 26 + x/distribution/migrations/v2/store_test.go | 103 + x/distribution/migrations/v3/json.go | 19 + x/distribution/migrations/v3/json_test.go | 65 + x/distribution/migrations/v3/migrate.go | 42 + x/distribution/migrations/v3/migrate_test.go | 47 + x/distribution/module.go | 261 + x/distribution/simulation/decoder.go | 70 + x/distribution/simulation/decoder_test.go | 84 + x/distribution/simulation/genesis.go | 52 + x/distribution/simulation/genesis_test.go | 78 + x/distribution/simulation/operations.go | 280 ++ x/distribution/simulation/operations_test.go | 335 ++ x/distribution/simulation/proposals.go | 46 + x/distribution/simulation/proposals_test.go | 44 + x/distribution/testutil/app_config.go | 26 + .../testutil/expected_keepers_mocks.go | 433 ++ x/distribution/testutil/staking_helper.go | 143 + x/distribution/types/codec.go | 45 + x/distribution/types/delegator.go | 12 + x/distribution/types/distribution.pb.go | 3352 +++++++++++++ x/distribution/types/errors.go | 19 + x/distribution/types/events.go | 15 + x/distribution/types/expected_keepers.go | 62 + x/distribution/types/fee_pool.go | 24 + x/distribution/types/fee_pool_test.go | 20 + x/distribution/types/genesis.go | 48 + x/distribution/types/genesis.pb.go | 2478 +++++++++ x/distribution/types/keys.go | 218 + x/distribution/types/msg.go | 54 + x/distribution/types/params.go | 50 + x/distribution/types/params_internal_test.go | 32 + x/distribution/types/params_legacy.go | 22 + x/distribution/types/params_test.go | 50 + x/distribution/types/proposal.go | 33 + x/distribution/types/querier.go | 94 + x/distribution/types/query.go | 37 + x/distribution/types/query.pb.go | 4423 +++++++++++++++++ x/distribution/types/query.pb.gw.go | 1066 ++++ x/distribution/types/tx.pb.go | 3341 +++++++++++++ x/distribution/types/validator.go | 36 + 72 files changed, 24187 insertions(+), 3 deletions(-) create mode 100644 x/distribution/README.md create mode 100644 x/distribution/abci.go create mode 100644 x/distribution/autocli.go create mode 100644 x/distribution/client/cli/tx.go create mode 100644 x/distribution/client/cli/tx_test.go create mode 100644 x/distribution/client/cli/util_test.go create mode 100644 x/distribution/client/common/common.go create mode 100644 x/distribution/client/common/common_test.go create mode 100644 x/distribution/doc.go create mode 100644 x/distribution/exported/exported.go create mode 100644 x/distribution/keeper/alias_functions.go create mode 100644 x/distribution/keeper/allocation.go create mode 100644 x/distribution/keeper/allocation_test.go create mode 100644 x/distribution/keeper/common_test.go create mode 100644 x/distribution/keeper/delegation.go create mode 100644 x/distribution/keeper/delegation_test.go create mode 100644 x/distribution/keeper/fee_pool.go create mode 100644 x/distribution/keeper/genesis.go create mode 100644 x/distribution/keeper/grpc_query.go create mode 100644 x/distribution/keeper/hooks.go create mode 100644 x/distribution/keeper/invariants.go create mode 100644 x/distribution/keeper/keeper.go create mode 100644 x/distribution/keeper/keeper_test.go create mode 100644 x/distribution/keeper/migrations.go create mode 100644 x/distribution/keeper/msg_server.go create mode 100644 x/distribution/keeper/params.go create mode 100644 x/distribution/keeper/store.go create mode 100644 x/distribution/keeper/validator.go create mode 100644 x/distribution/migrations/v1/types.go create mode 100644 x/distribution/migrations/v2/helpers.go create mode 100644 x/distribution/migrations/v2/store.go create mode 100644 x/distribution/migrations/v2/store_test.go create mode 100644 x/distribution/migrations/v3/json.go create mode 100644 x/distribution/migrations/v3/json_test.go create mode 100644 x/distribution/migrations/v3/migrate.go create mode 100644 x/distribution/migrations/v3/migrate_test.go create mode 100644 x/distribution/module.go create mode 100644 x/distribution/simulation/decoder.go create mode 100644 x/distribution/simulation/decoder_test.go create mode 100644 x/distribution/simulation/genesis.go create mode 100644 x/distribution/simulation/genesis_test.go create mode 100644 x/distribution/simulation/operations.go create mode 100644 x/distribution/simulation/operations_test.go create mode 100644 x/distribution/simulation/proposals.go create mode 100644 x/distribution/simulation/proposals_test.go create mode 100644 x/distribution/testutil/app_config.go create mode 100644 x/distribution/testutil/expected_keepers_mocks.go create mode 100644 x/distribution/testutil/staking_helper.go create mode 100644 x/distribution/types/codec.go create mode 100644 x/distribution/types/delegator.go create mode 100644 x/distribution/types/distribution.pb.go create mode 100644 x/distribution/types/errors.go create mode 100644 x/distribution/types/events.go create mode 100644 x/distribution/types/expected_keepers.go create mode 100644 x/distribution/types/fee_pool.go create mode 100644 x/distribution/types/fee_pool_test.go create mode 100644 x/distribution/types/genesis.go create mode 100644 x/distribution/types/genesis.pb.go create mode 100644 x/distribution/types/keys.go create mode 100644 x/distribution/types/msg.go create mode 100644 x/distribution/types/params.go create mode 100644 x/distribution/types/params_internal_test.go create mode 100644 x/distribution/types/params_legacy.go create mode 100644 x/distribution/types/params_test.go create mode 100644 x/distribution/types/proposal.go create mode 100644 x/distribution/types/querier.go create mode 100644 x/distribution/types/query.go create mode 100644 x/distribution/types/query.pb.go create mode 100644 x/distribution/types/query.pb.gw.go create mode 100644 x/distribution/types/tx.pb.go create mode 100644 x/distribution/types/validator.go diff --git a/app/app.go b/app/app.go index 376902d..0e3d201 100644 --- a/app/app.go +++ b/app/app.go @@ -110,9 +110,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + distr "github.com/liftedinit/manifest-ledger/x/distribution" + distrkeeper "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" diff --git a/x/distribution/README.md b/x/distribution/README.md new file mode 100644 index 0000000..32858fd --- /dev/null +++ b/x/distribution/README.md @@ -0,0 +1,1049 @@ +--- +sidebar_position: 1 +--- + +# `x/distribution` + +## Overview + +This _simple_ distribution mechanism describes a functional way to passively +distribute rewards between validators and delegators. Note that this mechanism does +not distribute funds in as precisely as active reward distribution mechanisms and +will therefore be upgraded in the future. + +The mechanism operates as follows. Collected rewards are pooled globally and +divided out passively to validators and delegators. Each validator has the +opportunity to charge commission to the delegators on the rewards collected on +behalf of the delegators. Fees are collected directly into a global reward pool +and validator proposer-reward pool. Due to the nature of passive accounting, +whenever changes to parameters which affect the rate of reward distribution +occurs, withdrawal of rewards must also occur. + +* Whenever withdrawing, one must withdraw the maximum amount they are entitled + to, leaving nothing in the pool. +* Whenever bonding, unbonding, or re-delegating tokens to an existing account, a + full withdrawal of the rewards must occur (as the rules for lazy accounting + change). +* Whenever a validator chooses to change the commission on rewards, all accumulated + commission rewards must be simultaneously withdrawn. + +The above scenarios are covered in `hooks.md`. + +The distribution mechanism outlined herein is used to lazily distribute the +following rewards between validators and associated delegators: + +* multi-token fees to be socially distributed +* inflated staked asset provisions +* validator commission on all rewards earned by their delegators stake + +Fees are pooled within a global pool. The mechanisms used allow for validators +and delegators to independently and lazily withdraw their rewards. + +## Shortcomings + +As a part of the lazy computations, each delegator holds an accumulation term +specific to each validator which is used to estimate what their approximate +fair portion of tokens held in the global fee pool is owed to them. + +```text +entitlement = delegator-accumulation / all-delegators-accumulation +``` + +Under the circumstance that there was constant and equal flow of incoming +reward tokens every block, this distribution mechanism would be equal to the +active distribution (distribute individually to all delegators each block). +However, this is unrealistic so deviations from the active distribution will +occur based on fluctuations of incoming reward tokens as well as timing of +reward withdrawal by other delegators. + +If you happen to know that incoming rewards are about to significantly increase, +you are incentivized to not withdraw until after this event, increasing the +worth of your existing _accum_. See [#2764](https://github.com/cosmos/cosmos-sdk/issues/2764) +for further details. + +## Effect on Staking + +Charging commission on Atom provisions while also allowing for Atom-provisions +to be auto-bonded (distributed directly to the validators bonded stake) is +problematic within BPoS. Fundamentally, these two mechanisms are mutually +exclusive. If both commission and auto-bonding mechanisms are simultaneously +applied to the staking-token then the distribution of staking-tokens between +any validator and its delegators will change with each block. This then +necessitates a calculation for each delegation records for each block - +which is considered computationally expensive. + +In conclusion, we can only have Atom commission and unbonded atoms +provisions or bonded atom provisions with no Atom commission, and we elect to +implement the former. Stakeholders wishing to rebond their provisions may elect +to set up a script to periodically withdraw and rebond rewards. + +## Contents + +* [Concepts](#concepts) +* [State](#state) + * [FeePool](#feepool) + * [Validator Distribution](#validator-distribution) + * [Delegation Distribution](#delegation-distribution) + * [Params](#params) +* [Begin Block](#begin-block) +* [Messages](#messages) +* [Hooks](#hooks) +* [Events](#events) +* [Parameters](#parameters) +* [Client](#client) + * [CLI](#cli) + * [gRPC](#grpc) + +## Concepts + +In Proof of Stake (PoS) blockchains, rewards gained from transaction fees are paid to validators. The fee distribution module fairly distributes the rewards to the validators' constituent delegators. + +Rewards are calculated per period. The period is updated each time a validator's delegation changes, for example, when the validator receives a new delegation. +The rewards for a single validator can then be calculated by taking the total rewards for the period before the delegation started, minus the current total rewards. +To learn more, see the [F1 Fee Distribution paper](https://github.com/cosmos/cosmos-sdk/tree/main/docs/spec/fee_distribution/f1_fee_distr.pdf). + +The commission to the validator is paid when the validator is removed or when the validator requests a withdrawal. +The commission is calculated and incremented at every `BeginBlock` operation to update accumulated fee amounts. + +The rewards to a delegator are distributed when the delegation is changed or removed, or a withdrawal is requested. +Before rewards are distributed, all slashes to the validator that occurred during the current delegation are applied. + +### Reference Counting in F1 Fee Distribution + +In F1 fee distribution, the rewards a delegator receives are calculated when their delegation is withdrawn. This calculation must read the terms of the summation of rewards divided by the share of tokens from the period which they ended when they delegated, and the final period that was created for the withdrawal. + +Additionally, as slashes change the amount of tokens a delegation will have (but we calculate this lazily, +only when a delegator un-delegates), we must calculate rewards in separate periods before / after any slashes +which occurred in between when a delegator delegated and when they withdrew their rewards. Thus slashes, like +delegations, reference the period which was ended by the slash event. + +All stored historical rewards records for periods which are no longer referenced by any delegations +or any slashes can thus be safely removed, as they will never be read (future delegations and future +slashes will always reference future periods). This is implemented by tracking a `ReferenceCount` +along with each historical reward storage entry. Each time a new object (delegation or slash) +is created which might need to reference the historical record, the reference count is incremented. +Each time one object which previously needed to reference the historical record is deleted, the reference +count is decremented. If the reference count hits zero, the historical record is deleted. + +## State + +### FeePool + +All globally tracked parameters for distribution are stored within +`FeePool`. Rewards are collected and added to the reward pool and +distributed to validators/delegators from here. + +Note that the reward pool holds decimal coins (`DecCoins`) to allow +for fractions of coins to be received from operations like inflation. +When coins are distributed from the pool they are truncated back to +`sdk.Coins` which are non-decimal. + +* FeePool: `0x00 -> ProtocolBuffer(FeePool)` + +```go +// coins with decimal +type DecCoins []DecCoin + +type DecCoin struct { + Amount math.LegacyDec + Denom string +} +``` + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/distribution/v1beta1/distribution.proto#L116-L123 +``` + +### Validator Distribution + +Validator distribution information for the relevant validator is updated each time: + +1. delegation amount to a validator is updated, +2. any delegator withdraws from a validator, or +3. the validator withdraws its commission. + +* ValidatorDistInfo: `0x02 | ValOperatorAddrLen (1 byte) | ValOperatorAddr -> ProtocolBuffer(validatorDistribution)` + +```go +type ValidatorDistInfo struct { + OperatorAddress sdk.AccAddress + SelfBondRewards sdkmath.DecCoins + ValidatorCommission types.ValidatorAccumulatedCommission +} +``` + +### Delegation Distribution + +Each delegation distribution only needs to record the height at which it last +withdrew fees. Because a delegation must withdraw fees each time it's +properties change (aka bonded tokens etc.) its properties will remain constant +and the delegator's _accumulation_ factor can be calculated passively knowing +only the height of the last withdrawal and its current properties. + +* DelegationDistInfo: `0x02 | DelegatorAddrLen (1 byte) | DelegatorAddr | ValOperatorAddrLen (1 byte) | ValOperatorAddr -> ProtocolBuffer(delegatorDist)` + +```go +type DelegationDistInfo struct { + WithdrawalHeight int64 // last time this delegation withdrew rewards +} +``` + +### Params + +The distribution module stores it's params in state with the prefix of `0x09`, +it can be updated with governance or the address with authority. + +* Params: `0x09 | ProtocolBuffer(Params)` + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/distribution/v1beta1/distribution.proto#L12-L42 +``` + +## Begin Block + +At each `BeginBlock`, all fees received in the previous block are transferred to +the distribution `ModuleAccount` account. When a delegator or validator +withdraws their rewards, they are taken out of the `ModuleAccount`. During begin +block, the different claims on the fees collected are updated as follows: + +* The reserve community tax is charged. +* The remainder is distributed proportionally by voting power to all bonded validators + +### The Distribution Scheme + +See [params](#params) for description of parameters. + +Let `fees` be the total fees collected in the previous block, including +inflationary rewards to the stake. All fees are collected in a specific module +account during the block. During `BeginBlock`, they are sent to the +`"distribution"` `ModuleAccount`. No other sending of tokens occurs. Instead, the +rewards each account is entitled to are stored, and withdrawals can be triggered +through the messages `FundCommunityPool`, `WithdrawValidatorCommission` and +`WithdrawDelegatorReward`. + +#### Reward to the Community Pool + +The community pool gets `community_tax * fees`, plus any remaining dust after +validators get their rewards that are always rounded down to the nearest +integer value. + +#### Reward To the Validators + +The proposer receives no extra rewards. All fees are distributed among all the +bonded validators, including the proposer, in proportion to their consensus power. + +```text +powFrac = validator power / total bonded validator power +voteMul = 1 - community_tax +``` + +All validators receive `fees * voteMul * powFrac`. + +#### Rewards to Delegators + +Each validator's rewards are distributed to its delegators. The validator also +has a self-delegation that is treated like a regular delegation in +distribution calculations. + +The validator sets a commission rate. The commission rate is flexible, but each +validator sets a maximum rate and a maximum daily increase. These maximums cannot be exceeded and protect delegators from sudden increases of validator commission rates to prevent validators from taking all of the rewards. + +The outstanding rewards that the operator is entitled to are stored in +`ValidatorAccumulatedCommission`, while the rewards the delegators are entitled +to are stored in `ValidatorCurrentRewards`. The [F1 fee distribution scheme](#concepts) is used to calculate the rewards per delegator as they +withdraw or update their delegation, and is thus not handled in `BeginBlock`. + +#### Example Distribution + +For this example distribution, the underlying consensus engine selects block proposers in +proportion to their power relative to the entire bonded power. + +All validators are equally performant at including pre-commits in their proposed +blocks. Then hold `(pre_commits included) / (total bonded validator power)` +constant so that the amortized block reward for the validator is `( validator power / total bonded power) * (1 - community tax rate)` of +the total rewards. Consequently, the reward for a single delegator is: + +```text +(delegator proportion of the validator power / validator power) * (validator power / total bonded power) + * (1 - community tax rate) * (1 - validator commission rate) += (delegator proportion of the validator power / total bonded power) * (1 - +community tax rate) * (1 - validator commission rate) +``` + +## Messages + +### MsgSetWithdrawAddress + +By default, the withdraw address is the delegator address. To change its withdraw address, a delegator must send a `MsgSetWithdrawAddress` message. +Changing the withdraw address is possible only if the parameter `WithdrawAddrEnabled` is set to `true`. + +The withdraw address cannot be any of the module accounts. These accounts are blocked from being withdraw addresses by being added to the distribution keeper's `blockedAddrs` array at initialization. + +Response: + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/distribution/v1beta1/tx.proto#L49-L60 +``` + +```go +func (k Keeper) SetWithdrawAddr(ctx context.Context, delegatorAddr sdk.AccAddress, withdrawAddr sdk.AccAddress) error + if k.blockedAddrs[withdrawAddr.String()] { + fail with "`{withdrawAddr}` is not allowed to receive external funds" + } + + if !k.GetWithdrawAddrEnabled(ctx) { + fail with `ErrSetWithdrawAddrDisabled` + } + + k.SetDelegatorWithdrawAddr(ctx, delegatorAddr, withdrawAddr) +``` + +### MsgWithdrawDelegatorReward + +A delegator can withdraw its rewards. +Internally in the distribution module, this transaction simultaneously removes the previous delegation with associated rewards, the same as if the delegator simply started a new delegation of the same value. +The rewards are sent immediately from the distribution `ModuleAccount` to the withdraw address. +Any remainder (truncated decimals) are sent to the community pool. +The starting height of the delegation is set to the current validator period, and the reference count for the previous period is decremented. +The amount withdrawn is deducted from the `ValidatorOutstandingRewards` variable for the validator. + +In the F1 distribution, the total rewards are calculated per validator period, and a delegator receives a piece of those rewards in proportion to their stake in the validator. +In basic F1, the total rewards that all the delegators are entitled to between to periods is calculated the following way. +Let `R(X)` be the total accumulated rewards up to period `X` divided by the tokens staked at that time. The delegator allocation is `R(X) * delegator_stake`. +Then the rewards for all the delegators for staking between periods `A` and `B` are `(R(B) - R(A)) * total stake`. +However, these calculated rewards don't account for slashing. + +Taking the slashes into account requires iteration. +Let `F(X)` be the fraction a validator is to be slashed for a slashing event that happened at period `X`. +If the validator was slashed at periods `P1, ..., PN`, where `A < P1`, `PN < B`, the distribution module calculates the individual delegator's rewards, `T(A, B)`, as follows: + +```go +stake := initial stake +rewards := 0 +previous := A +for P in P1, ..., PN`: + rewards = (R(P) - previous) * stake + stake = stake * F(P) + previous = P +rewards = rewards + (R(B) - R(PN)) * stake +``` + +The historical rewards are calculated retroactively by playing back all the slashes and then attenuating the delegator's stake at each step. +The final calculated stake is equivalent to the actual staked coins in the delegation with a margin of error due to rounding errors. + +Response: + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/distribution/v1beta1/tx.proto#L66-L77 +``` + +### WithdrawValidatorCommission + +The validator can send the WithdrawValidatorCommission message to withdraw their accumulated commission. +The commission is calculated in every block during `BeginBlock`, so no iteration is required to withdraw. +The amount withdrawn is deducted from the `ValidatorOutstandingRewards` variable for the validator. +Only integer amounts can be sent. If the accumulated awards have decimals, the amount is truncated before the withdrawal is sent, and the remainder is left to be withdrawn later. + +### FundCommunityPool + +This message sends coins directly from the sender to the community pool. + +The transaction fails if the amount cannot be transferred from the sender to the distribution module account. + +```go +func (k Keeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error { + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, amount); err != nil { + return err + } + + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amount...)...) + + if err := k.FeePool.Set(ctx, feePool); err != nil { + return err + } + + return nil +} +``` + +### Common distribution operations + +These operations take place during many different messages. + +#### Initialize delegation + +Each time a delegation is changed, the rewards are withdrawn and the delegation is reinitialized. +Initializing a delegation increments the validator period and keeps track of the starting period of the delegation. + +```go +// initialize starting info for a new delegation +func (k Keeper) initializeDelegation(ctx context.Context, val sdk.ValAddress, del sdk.AccAddress) { + // period has already been incremented - we want to store the period ended by this delegation action + previousPeriod := k.GetValidatorCurrentRewards(ctx, val).Period - 1 + + // increment reference count for the period we're going to track + k.incrementReferenceCount(ctx, val, previousPeriod) + + validator := k.stakingKeeper.Validator(ctx, val) + delegation := k.stakingKeeper.Delegation(ctx, del, val) + + // calculate delegation stake in tokens + // we don't store directly, so multiply delegation shares * (tokens per share) + // note: necessary to truncate so we don't allow withdrawing more rewards than owed + stake := validator.TokensFromSharesTruncated(delegation.GetShares()) + k.SetDelegatorStartingInfo(ctx, val, del, types.NewDelegatorStartingInfo(previousPeriod, stake, uint64(ctx.BlockHeight()))) +} +``` + +### MsgUpdateParams + +Distribution module params can be updated through `MsgUpdateParams`, which can be done using governance proposal and the signer will always be gov module account address. + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/distribution/v1beta1/tx.proto#L133-L147 +``` + +The message handling can fail if: + +* signer is not the gov module account address. + +## Hooks + +Available hooks that can be called by and from this module. + +### Create or modify delegation distribution + +* triggered-by: `staking.MsgDelegate`, `staking.MsgBeginRedelegate`, `staking.MsgUndelegate` + +#### Before + +* The delegation rewards are withdrawn to the withdraw address of the delegator. + The rewards include the current period and exclude the starting period. +* The validator period is incremented. + The validator period is incremented because the validator's power and share distribution might have changed. +* The reference count for the delegator's starting period is decremented. + +#### After + +The starting height of the delegation is set to the previous period. +Because of the `Before`-hook, this period is the last period for which the delegator was rewarded. + +### Validator created + +* triggered-by: `staking.MsgCreateValidator` + +When a validator is created, the following validator variables are initialized: + +* Historical rewards +* Current accumulated rewards +* Accumulated commission +* Total outstanding rewards +* Period + +By default, all values are set to a `0`, except period, which is set to `1`. + +### Validator removed + +* triggered-by: `staking.RemoveValidator` + +Outstanding commission is sent to the validator's self-delegation withdrawal address. +Remaining delegator rewards get sent to the community fee pool. + +Note: The validator gets removed only when it has no remaining delegations. +At that time, all outstanding delegator rewards will have been withdrawn. +Any remaining rewards are dust amounts. + +### Validator is slashed + +* triggered-by: `staking.Slash` +* The current validator period reference count is incremented. + The reference count is incremented because the slash event has created a reference to it. +* The validator period is incremented. +* The slash event is stored for later use. + The slash event will be referenced when calculating delegator rewards. + +## Events + +The distribution module emits the following events: + +### BeginBlocker + +| Type | Attribute Key | Attribute Value | +|-----------------|---------------|--------------------| +| proposer_reward | validator | {validatorAddress} | +| proposer_reward | reward | {proposerReward} | +| commission | amount | {commissionAmount} | +| commission | validator | {validatorAddress} | +| rewards | amount | {rewardAmount} | +| rewards | validator | {validatorAddress} | + +### Handlers + +#### MsgSetWithdrawAddress + +| Type | Attribute Key | Attribute Value | +|----------------------|------------------|----------------------| +| set_withdraw_address | withdraw_address | {withdrawAddress} | +| message | module | distribution | +| message | action | set_withdraw_address | +| message | sender | {senderAddress} | + +#### MsgWithdrawDelegatorReward + +| Type | Attribute Key | Attribute Value | +|---------|---------------|---------------------------| +| withdraw_rewards | amount | {rewardAmount} | +| withdraw_rewards | validator | {validatorAddress} | +| message | module | distribution | +| message | action | withdraw_delegator_reward | +| message | sender | {senderAddress} | + +#### MsgWithdrawValidatorCommission + +| Type | Attribute Key | Attribute Value | +|------------|---------------|-------------------------------| +| withdraw_commission | amount | {commissionAmount} | +| message | module | distribution | +| message | action | withdraw_validator_commission | +| message | sender | {senderAddress} | + +## Parameters + +The distribution module contains the following parameters: + +| Key | Type | Example | +| ------------------- | ------------ | -------------------------- | +| communitytax | string (dec) | "0.020000000000000000" [0] | +| withdrawaddrenabled | bool | true | + +* [0] `communitytax` must be positive and cannot exceed 1.00. +* `baseproposerreward` and `bonusproposerreward` were parameters that are deprecated in v0.47 and are not used. + +:::note +The reserve pool is the pool of collected funds for use by governance taken via the `CommunityTax`. +Currently with the Cosmos SDK, tokens collected by the CommunityTax are accounted for but unspendable. +::: + +## Client + +## CLI + +A user can query and interact with the `distribution` module using the CLI. + +#### Query + +The `query` commands allow users to query `distribution` state. + +```shell +simd query distribution --help +``` + +##### commission + +The `commission` command allows users to query validator commission rewards by address. + +```shell +simd query distribution commission [address] [flags] +``` + +Example: + +```shell +simd query distribution commission cosmosvaloper1... +``` + +Example Output: + +```yml +commission: +- amount: "1000000.000000000000000000" + denom: stake +``` + +##### community-pool + +The `community-pool` command allows users to query all coin balances within the community pool. + +```shell +simd query distribution community-pool [flags] +``` + +Example: + +```shell +simd query distribution community-pool +``` + +Example Output: + +```yml +pool: +- amount: "1000000.000000000000000000" + denom: stake +``` + +##### params + +The `params` command allows users to query the parameters of the `distribution` module. + +```shell +simd query distribution params [flags] +``` + +Example: + +```shell +simd query distribution params +``` + +Example Output: + +```yml +base_proposer_reward: "0.000000000000000000" +bonus_proposer_reward: "0.000000000000000000" +community_tax: "0.020000000000000000" +withdraw_addr_enabled: true +``` + +##### rewards + +The `rewards` command allows users to query delegator rewards. Users can optionally include the validator address to query rewards earned from a specific validator. + +```shell +simd query distribution rewards [delegator-addr] [validator-addr] [flags] +``` + +Example: + +```shell +simd query distribution rewards cosmos1... +``` + +Example Output: + +```yml +rewards: +- reward: + - amount: "1000000.000000000000000000" + denom: stake + validator_address: cosmosvaloper1.. +total: +- amount: "1000000.000000000000000000" + denom: stake +``` + +##### slashes + +The `slashes` command allows users to query all slashes for a given block range. + +```shell +simd query distribution slashes [validator] [start-height] [end-height] [flags] +``` + +Example: + +```shell +simd query distribution slashes cosmosvaloper1... 1 1000 +``` + +Example Output: + +```yml +pagination: + next_key: null + total: "0" +slashes: +- validator_period: 20, + fraction: "0.009999999999999999" +``` + +##### validator-outstanding-rewards + +The `validator-outstanding-rewards` command allows users to query all outstanding (un-withdrawn) rewards for a validator and all their delegations. + +```shell +simd query distribution validator-outstanding-rewards [validator] [flags] +``` + +Example: + +```shell +simd query distribution validator-outstanding-rewards cosmosvaloper1... +``` + +Example Output: + +```yml +rewards: +- amount: "1000000.000000000000000000" + denom: stake +``` + +##### validator-distribution-info + +The `validator-distribution-info` command allows users to query validator commission and self-delegation rewards for validator. + +````shell +simd query distribution validator-distribution-info cosmosvaloper1... +``` + +Example Output: + +```yml +commission: +- amount: "100000.000000000000000000" + denom: stake +operator_address: cosmosvaloper1... +self_bond_rewards: +- amount: "100000.000000000000000000" + denom: stake +``` + +#### Transactions + +The `tx` commands allow users to interact with the `distribution` module. + +```shell +simd tx distribution --help +``` + +##### fund-community-pool + +The `fund-community-pool` command allows users to send funds to the community pool. + +```shell +simd tx distribution fund-community-pool [amount] [flags] +``` + +Example: + +```shell +simd tx distribution fund-community-pool 100stake --from cosmos1... +``` + +##### set-withdraw-addr + +The `set-withdraw-addr` command allows users to set the withdraw address for rewards associated with a delegator address. + +```shell +simd tx distribution set-withdraw-addr [withdraw-addr] [flags] +``` + +Example: + +```shell +simd tx distribution set-withdraw-addr cosmos1... --from cosmos1... +``` + +##### withdraw-all-rewards + +The `withdraw-all-rewards` command allows users to withdraw all rewards for a delegator. + +```shell +simd tx distribution withdraw-all-rewards [flags] +``` + +Example: + +```shell +simd tx distribution withdraw-all-rewards --from cosmos1... +``` + +##### withdraw-rewards + +The `withdraw-rewards` command allows users to withdraw all rewards from a given delegation address, +and optionally withdraw validator commission if the delegation address given is a validator operator and the user proves the `--commission` flag. + +```shell +simd tx distribution withdraw-rewards [validator-addr] [flags] +``` + +Example: + +```shell +simd tx distribution withdraw-rewards cosmosvaloper1... --from cosmos1... --commission +``` + +### gRPC + +A user can query the `distribution` module using gRPC endpoints. + +#### Params + +The `Params` endpoint allows users to query parameters of the `distribution` module. + +Example: + +```shell +grpcurl -plaintext \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/Params +``` + +Example Output: + +```json +{ + "params": { + "communityTax": "20000000000000000", + "baseProposerReward": "00000000000000000", + "bonusProposerReward": "00000000000000000", + "withdrawAddrEnabled": true + } +} +``` + +#### ValidatorDistributionInfo + +The `ValidatorDistributionInfo` queries validator commission and self-delegation rewards for validator. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"validator_address":"cosmosvalop1..."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo +``` + +Example Output: + +```json +{ + "commission": { + "commission": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ] + }, + "self_bond_rewards": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ], + "validator_address": "cosmosvalop1..." +} +``` + +#### ValidatorOutstandingRewards + +The `ValidatorOutstandingRewards` endpoint allows users to query rewards of a validator address. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"validator_address":"cosmosvalop1.."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards +``` + +Example Output: + +```json +{ + "rewards": { + "rewards": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ] + } +} +``` + +#### ValidatorCommission + +The `ValidatorCommission` endpoint allows users to query accumulated commission for a validator. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"validator_address":"cosmosvalop1.."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/ValidatorCommission +``` + +Example Output: + +```json +{ + "commission": { + "commission": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ] + } +} +``` + +#### ValidatorSlashes + +The `ValidatorSlashes` endpoint allows users to query slash events of a validator. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"validator_address":"cosmosvalop1.."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/ValidatorSlashes +``` + +Example Output: + +```json +{ + "slashes": [ + { + "validator_period": "20", + "fraction": "0.009999999999999999" + } + ], + "pagination": { + "total": "1" + } +} +``` + +#### DelegationRewards + +The `DelegationRewards` endpoint allows users to query the total rewards accrued by a delegation. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"delegator_address":"cosmos1...","validator_address":"cosmosvalop1..."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/DelegationRewards +``` + +Example Output: + +```json +{ + "rewards": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ] +} +``` + +#### DelegationTotalRewards + +The `DelegationTotalRewards` endpoint allows users to query the total rewards accrued by each validator. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"delegator_address":"cosmos1..."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/DelegationTotalRewards +``` + +Example Output: + +```json +{ + "rewards": [ + { + "validatorAddress": "cosmosvaloper1...", + "reward": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ] + } + ], + "total": [ + { + "denom": "stake", + "amount": "1000000000000000" + } + ] +} +``` + +#### DelegatorValidators + +The `DelegatorValidators` endpoint allows users to query all validators for given delegator. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"delegator_address":"cosmos1..."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/DelegatorValidators +``` + +Example Output: + +```json +{ + "validators": ["cosmosvaloper1..."] +} +``` + +#### DelegatorWithdrawAddress + +The `DelegatorWithdrawAddress` endpoint allows users to query the withdraw address of a delegator. + +Example: + +```shell +grpcurl -plaintext \ + -d '{"delegator_address":"cosmos1..."}' \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress +``` + +Example Output: + +```json +{ + "withdrawAddress": "cosmos1..." +} +``` + +#### CommunityPool + +The `CommunityPool` endpoint allows users to query the community pool coins. + +Example: + +```shell +grpcurl -plaintext \ + localhost:9090 \ + cosmos.distribution.v1beta1.Query/CommunityPool +``` + +Example Output: + +```json +{ + "pool": [ + { + "denom": "stake", + "amount": "1000000000000000000" + } + ] +} +``` diff --git a/x/distribution/abci.go b/x/distribution/abci.go new file mode 100644 index 0000000..2751cfa --- /dev/null +++ b/x/distribution/abci.go @@ -0,0 +1,34 @@ +package distribution + +import ( + "time" + + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// BeginBlocker sets the proposer for determining distribution during endblock +// and distribute rewards for the previous block. +func BeginBlocker(ctx sdk.Context, k keeper.Keeper) error { + defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + + // determine the total power signing the block + var previousTotalPower int64 + for _, voteInfo := range ctx.VoteInfos() { + previousTotalPower += voteInfo.Validator.Power + } + + // TODO this is Tendermint-dependent + // ref https://github.com/cosmos/cosmos-sdk/issues/3095 + if ctx.BlockHeight() > 1 { + if err := k.AllocateTokens(ctx, previousTotalPower, ctx.VoteInfos()); err != nil { + return err + } + } + + // record the proposer for when we payout on the next block + consAddr := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress) + return k.SetPreviousProposerConsAddr(ctx, consAddr) +} diff --git a/x/distribution/autocli.go b/x/distribution/autocli.go new file mode 100644 index 0000000..36908ea --- /dev/null +++ b/x/distribution/autocli.go @@ -0,0 +1,140 @@ +package distribution + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + distirbuitonv1beta1 "cosmossdk.io/api/cosmos/distribution/v1beta1" + + "github.com/cosmos/cosmos-sdk/version" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: distirbuitonv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current distribution parameters.", + }, + { + RpcMethod: "ValidatorDistributionInfo", + Use: "validator-distribution-info [validator]", + Short: "Query validator distribution info", + Example: fmt.Sprintf(`Example: $ %s query distribution validator-distribution-info [validator-address]`, version.AppName), + + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "ValidatorOutstandingRewards", + Use: "validator-outstanding-rewards [validator]", + Short: "Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations", + Example: fmt.Sprintf(`$ %s query distribution validator-outstanding-rewards [validator-address]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "ValidatorCommission", + Use: "commission [validator]", + Short: "Query distribution validator commission", + Example: fmt.Sprintf(`$ %s query distribution commission [validator-address]`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "ValidatorSlashes", + Use: "slashes [validator] [start-height] [end-height]", + Short: "Query distribution validator slashes", + Example: fmt.Sprintf(`$ %s query distribution slashes [validator-address] 0 100`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + {ProtoField: "starting_height"}, + {ProtoField: "ending_height"}, + }, + }, + { + RpcMethod: "DelegationRewards", + Use: "rewards [delegator-addr] [validator-addr]", + Short: "Query all distribution delegator rewards or rewards from a particular validator", + Long: "Query all rewards earned by a delegator, optionally restrict to rewards from a single validator.", + Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address] [validator-address]", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_address"}, + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "CommunityPool", + Use: "community-pool", + Short: "Query the amount of coins in the community pool", + Example: fmt.Sprintf(`$ %s query distribution community-pool`, version.AppName), + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: distirbuitonv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "SetWithdrawAddress", + Use: "set-withdraw-addr [withdraw-addr]", + Short: "Change the default withdraw address for rewards associated with an address", + Example: fmt.Sprintf("%s tx distribution set-withdraw-addr cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "withdraw_address"}, + }, + }, + { + RpcMethod: "WithdrawDelegatorReward", + Use: "withdraw-rewards [validator-addr]", + Short: "Withdraw rewards from a given delegation address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "WithdrawValidatorCommission", + Use: "withdraw-validator-commission [validator-addr]", + Short: "Withdraw commissions from a validator address (must be a validator operator)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + }, + }, + { + RpcMethod: "DepositValidatorRewardsPool", + Use: "fund-validator-rewards-pool [validator-addr] [amount]", + Short: "Fund the validator rewards pool with the specified amount", + Example: fmt.Sprintf("%s tx distribution fund-validator-rewards-pool cosmosvaloper1x20lytyf6zkcrv5edpkfkn8sz578qg5sqfyqnp 100uatom --from mykey", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "validator_address"}, + {ProtoField: "amount", Varargs: true}, + }, + }, + { + RpcMethod: "FundCommunityPool", + Use: "fund-community-pool [amount]", + Short: "Funds the community pool with the specified amount", + Example: fmt.Sprintf(`$ %s tx distribution fund-community-pool 100uatom --from mykey`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "amount", Varargs: true}, + }, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + { + RpcMethod: "CommunityPoolSpend", + Skip: true, // skipped because authority gated + }, + }, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + }, + } +} diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go new file mode 100644 index 0000000..5773890 --- /dev/null +++ b/x/distribution/client/cli/tx.go @@ -0,0 +1,311 @@ +package cli + +import ( + "fmt" + "strings" + + "github.com/spf13/cobra" + "github.com/spf13/pflag" + + "cosmossdk.io/core/address" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// Transaction flags for the x/distribution module +var ( + FlagCommission = "commission" + FlagMaxMessagesPerTx = "max-msgs" +) + +const ( + MaxMessagesPerTxDefault = 0 +) + +// NewTxCmd returns a root CLI command handler for all x/distribution transaction commands. +func NewTxCmd(valAc, ac address.Codec) *cobra.Command { + distTxCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Distribution transactions subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + distTxCmd.AddCommand( + NewWithdrawRewardsCmd(valAc, ac), + NewWithdrawAllRewardsCmd(valAc, ac), + NewSetWithdrawAddrCmd(ac), + NewFundCommunityPoolCmd(ac), + NewDepositValidatorRewardsPoolCmd(valAc, ac), + ) + + return distTxCmd +} + +type newGenerateOrBroadcastFunc func(client.Context, *pflag.FlagSet, ...sdk.Msg) error + +func newSplitAndApply( + genOrBroadcastFn newGenerateOrBroadcastFunc, clientCtx client.Context, + fs *pflag.FlagSet, msgs []sdk.Msg, chunkSize int, +) error { + if chunkSize == 0 { + return genOrBroadcastFn(clientCtx, fs, msgs...) + } + + // split messages into slices of length chunkSize + totalMessages := len(msgs) + for i := 0; i < len(msgs); i += chunkSize { + + sliceEnd := i + chunkSize + if sliceEnd > totalMessages { + sliceEnd = totalMessages + } + + msgChunk := msgs[i:sliceEnd] + if err := genOrBroadcastFn(clientCtx, fs, msgChunk...); err != nil { + return err + } + } + + return nil +} + +// NewWithdrawRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. +func NewWithdrawRewardsCmd(valCodec, ac address.Codec) *cobra.Command { + bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() + + cmd := &cobra.Command{ + Use: "withdraw-rewards [validator-addr]", + Short: "Withdraw rewards from a given delegation address, and optionally withdraw validator commission if the delegation address given is a validator operator", + Long: strings.TrimSpace( + fmt.Sprintf(`Withdraw rewards from a given delegation address, +and optionally withdraw validator commission if the delegation address given is a validator operator. + +Example: +$ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey +$ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey --commission +`, + version.AppName, bech32PrefixValAddr, version.AppName, bech32PrefixValAddr, + ), + ), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + _, err = valCodec.StringToBytes(args[0]) + if err != nil { + return err + } + + msgs := []sdk.Msg{types.NewMsgWithdrawDelegatorReward(delAddr, args[0])} + + if commission, _ := cmd.Flags().GetBool(FlagCommission); commission { + msgs = append(msgs, types.NewMsgWithdrawValidatorCommission(args[0])) + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgs...) + }, + } + + cmd.Flags().Bool(FlagCommission, false, "Withdraw the validator's commission in addition to the rewards") + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewWithdrawAllRewardsCmd returns a CLI command handler for creating a MsgWithdrawDelegatorReward transaction. +func NewWithdrawAllRewardsCmd(valCodec, ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-all-rewards", + Short: "withdraw all delegations rewards for a delegator", + Long: strings.TrimSpace( + fmt.Sprintf(`Withdraw all rewards for a single delegator. +Note that if you use this command with --%[2]s=%[3]s or --%[2]s=%[4]s, the %[5]s flag will automatically be set to 0. + +Example: +$ %[1]s tx distribution withdraw-all-rewards --from mykey +`, + version.AppName, flags.FlagBroadcastMode, flags.BroadcastSync, flags.BroadcastAsync, FlagMaxMessagesPerTx, + ), + ), + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + delAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + // The transaction cannot be generated offline since it requires a query + // to get all the validators. + if clientCtx.Offline { + return fmt.Errorf("cannot generate tx in offline mode") + } + + queryClient := types.NewQueryClient(clientCtx) + delValsRes, err := queryClient.DelegatorValidators(cmd.Context(), &types.QueryDelegatorValidatorsRequest{DelegatorAddress: delAddr}) + if err != nil { + return err + } + + validators := delValsRes.Validators + // build multi-message transaction + msgs := make([]sdk.Msg, 0, len(validators)) + for _, valAddr := range validators { + _, err := valCodec.StringToBytes(valAddr) + if err != nil { + return err + } + + msg := types.NewMsgWithdrawDelegatorReward(delAddr, valAddr) + msgs = append(msgs, msg) + } + + chunkSize, _ := cmd.Flags().GetInt(FlagMaxMessagesPerTx) + + return newSplitAndApply(tx.GenerateOrBroadcastTxCLI, clientCtx, cmd.Flags(), msgs, chunkSize) + }, + } + + cmd.Flags().Int(FlagMaxMessagesPerTx, MaxMessagesPerTxDefault, "Limit the number of messages per tx (0 for unlimited)") + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewSetWithdrawAddrCmd returns a CLI command handler for creating a MsgSetWithdrawAddress transaction. +func NewSetWithdrawAddrCmd(ac address.Codec) *cobra.Command { + bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() + + cmd := &cobra.Command{ + Use: "set-withdraw-addr [withdraw-addr]", + Short: "change the default withdraw address for rewards associated with an address", + Long: strings.TrimSpace( + fmt.Sprintf(`Set the withdraw address for rewards associated with a delegator address. + +Example: +$ %s tx distribution set-withdraw-addr %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey +`, + version.AppName, bech32PrefixAccAddr, + ), + ), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + delAddr := clientCtx.GetFromAddress() + withdrawAddr, err := ac.StringToBytes(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgSetWithdrawAddress(delAddr, withdrawAddr) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewFundCommunityPoolCmd returns a CLI command handler for creating a MsgFundCommunityPool transaction. +func NewFundCommunityPoolCmd(ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "fund-community-pool [amount]", + Args: cobra.ExactArgs(1), + Short: "Funds the community pool with the specified amount", + Long: strings.TrimSpace( + fmt.Sprintf(`Funds the community pool with the specified amount + +Example: +$ %s tx distribution fund-community-pool 100uatom --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + depositorAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + amount, err := sdk.ParseCoinsNormalized(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgFundCommunityPool(amount, depositorAddr) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewDepositValidatorRewardsPoolCmd returns a CLI command handler for creating +// a MsgDepositValidatorRewardsPool transaction. +func NewDepositValidatorRewardsPoolCmd(valCodec, ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "fund-validator-rewards-pool [val_addr] [amount]", + Args: cobra.ExactArgs(2), + Short: "Fund the validator rewards pool with the specified amount", + Example: fmt.Sprintf( + "%s tx distribution fund-validator-rewards-pool cosmosvaloper1x20lytyf6zkcrv5edpkfkn8sz578qg5sqfyqnp 100uatom --from mykey", + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + depositorAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + _, err = valCodec.StringToBytes(args[0]) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinsNormalized(args[1]) + if err != nil { + return err + } + + msg := types.NewMsgDepositValidatorRewardsPool(depositorAddr, args[0], amount) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/distribution/client/cli/tx_test.go b/x/distribution/client/cli/tx_test.go new file mode 100644 index 0000000..94e9d8a --- /dev/null +++ b/x/distribution/client/cli/tx_test.go @@ -0,0 +1,302 @@ +package cli_test + +import ( + "context" + "fmt" + "io" + "testing" + + abci "github.com/cometbft/cometbft/abci/types" + rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" + "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + "github.com/cosmos/cosmos-sdk/testutil" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" + sdk "github.com/cosmos/cosmos-sdk/types" + testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/bank" + "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" + distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" + "github.com/cosmos/cosmos-sdk/x/gov" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +) + +type CLITestSuite struct { + suite.Suite + + kr keyring.Keyring + encCfg testutilmod.TestEncodingConfig + baseCtx client.Context + clientCtx client.Context +} + +func TestCLITestSuite(t *testing.T) { + suite.Run(t, new(CLITestSuite)) +} + +func (s *CLITestSuite) SetupSuite() { + s.encCfg = testutilmod.MakeTestEncodingConfig(gov.AppModuleBasic{}, bank.AppModuleBasic{}) + s.kr = keyring.NewInMemory(s.encCfg.Codec) + s.baseCtx = client.Context{}. + WithKeyring(s.kr). + WithTxConfig(s.encCfg.TxConfig). + WithCodec(s.encCfg.Codec). + WithClient(clitestutil.MockCometRPC{Client: rpcclientmock.Client{}}). + WithAccountRetriever(client.MockAccountRetriever{}). + WithOutput(io.Discard). + WithChainID("test-chain") + + ctxGen := func() client.Context { + bz, _ := s.encCfg.Codec.Marshal(&sdk.TxResponse{}) + c := clitestutil.NewMockCometRPC(abci.ResponseQuery{ + Value: bz, + }) + return s.baseCtx.WithClient(c) + } + s.clientCtx = ctxGen() + + cfg, err := network.DefaultConfigWithAppConfig(distrtestutil.AppConfig) + s.Require().NoError(err) + + genesisState := cfg.GenesisState + var mintData minttypes.GenesisState + s.Require().NoError(cfg.Codec.UnmarshalJSON(genesisState[minttypes.ModuleName], &mintData)) + + inflation := sdkmath.LegacyMustNewDecFromStr("1.0") + mintData.Minter.Inflation = inflation + mintData.Params.InflationMin = inflation + mintData.Params.InflationMax = inflation + + mintDataBz, err := cfg.Codec.MarshalJSON(&mintData) + s.Require().NoError(err) + genesisState[minttypes.ModuleName] = mintDataBz + cfg.GenesisState = genesisState +} + +func (s *CLITestSuite) TestTxWithdrawRewardsCmd() { + val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + + testCases := []struct { + name string + valAddr fmt.Stringer + args []string + expectErrMsg string + }{ + { + "invalid validator address", + val[0].Address, + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + "hrp does not match bech32 prefix", + }, + { + "valid transaction", + sdk.ValAddress(val[0].Address), + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + "", + }, + { + "valid transaction (with commission)", + sdk.ValAddress(val[0].Address), + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=true", cli.FlagCommission), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + "", + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + args := append([]string{tc.valAddr.String()}, tc.args...) + + ctx := svrcmd.CreateExecuteContext(context.Background()) + cmd := cli.NewWithdrawRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + cmd.SetContext(ctx) + cmd.SetArgs(args) + s.Require().NoError(client.SetCmdClientContextHandler(s.clientCtx, cmd)) + + out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, args) + if tc.expectErrMsg != "" { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expectErrMsg) + } else { + s.Require().NoError(err) + msg := &sdk.TxResponse{} + s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), msg), out.String()) + } + }) + } +} + +func (s *CLITestSuite) TestTxWithdrawAllRewardsCmd() { + val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + + testCases := []struct { + name string + args []string + expectErrMsg string + }{ + { + "invalid transaction (offline)", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagOffline), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + "cannot generate tx in offline mode", + }, + { + "valid transaction", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + "", + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewWithdrawAllRewardsCmd(address.NewBech32Codec("cosmosvaloper"), address.NewBech32Codec("cosmos")) + + out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) + if tc.expectErrMsg != "" { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expectErrMsg) + } else { + s.Require().NoError(err) + msg := &sdk.TxResponse{} + s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), msg), out.String()) + } + }) + } +} + +func (s *CLITestSuite) TestTxSetWithdrawAddrCmd() { + val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + + testCases := []struct { + name string + args []string + expectErr bool + respType proto.Message + }{ + { + "invalid withdraw address", + []string{ + "foo", + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + true, nil, + }, + { + "valid transaction", + []string{ + val[0].Address.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + false, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewSetWithdrawAddrCmd(address.NewBech32Codec("cosmos")) + + out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + } + }) + } +} + +func (s *CLITestSuite) TestTxFundCommunityPoolCmd() { + val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + + testCases := []struct { + name string + args []string + expectErr bool + respType proto.Message + }{ + { + "invalid funding amount", + []string{ + "-43foocoin", + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + true, nil, + }, + { + "valid transaction", + []string{ + sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(5431))).String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), + }, + false, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewFundCommunityPoolCmd(address.NewBech32Codec("cosmos")) + + out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + } + }) + } +} diff --git a/x/distribution/client/cli/util_test.go b/x/distribution/client/cli/util_test.go new file mode 100644 index 0000000..0c1ea11 --- /dev/null +++ b/x/distribution/client/cli/util_test.go @@ -0,0 +1,59 @@ +package cli + +import ( + "testing" + + "github.com/spf13/pflag" + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func Test_splitAndCall_NoMessages(t *testing.T) { + clientCtx := client.Context{} + + err := newSplitAndApply(nil, clientCtx, nil, nil, 10) + require.NoError(t, err, "") +} + +func Test_splitAndCall_Splitting(t *testing.T) { + clientCtx := client.Context{} + + addr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + + // Add five messages + msgs := []sdk.Msg{ + testdata.NewTestMsg(addr), + testdata.NewTestMsg(addr), + testdata.NewTestMsg(addr), + testdata.NewTestMsg(addr), + testdata.NewTestMsg(addr), + } + + // Keep track of number of calls + const chunkSize = 2 + + callCount := 0 + err := newSplitAndApply( + func(clientCtx client.Context, fs *pflag.FlagSet, msgs ...sdk.Msg) error { + callCount++ + + require.NotNil(t, clientCtx) + require.NotNil(t, msgs) + + if callCount < 3 { + require.Equal(t, len(msgs), 2) + } else { + require.Equal(t, len(msgs), 1) + } + + return nil + }, + clientCtx, nil, msgs, chunkSize) + + require.NoError(t, err, "") + require.Equal(t, 3, callCount) +} diff --git a/x/distribution/client/common/common.go b/x/distribution/client/common/common.go new file mode 100644 index 0000000..b8b363a --- /dev/null +++ b/x/distribution/client/common/common.go @@ -0,0 +1,32 @@ +package common + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/client" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// QueryDelegationRewards queries a delegation rewards between a delegator and a +// validator. +func QueryDelegationRewards(clientCtx client.Context, delAddr, valAddr string) ([]byte, int64, error) { + delegatorAddr, err := sdk.AccAddressFromBech32(delAddr) + if err != nil { + return nil, 0, err + } + + validatorAddr, err := sdk.ValAddressFromBech32(valAddr) + if err != nil { + return nil, 0, err + } + + params := types.NewQueryDelegationRewardsParams(delegatorAddr, validatorAddr) + bz, err := clientCtx.LegacyAmino.MarshalJSON(params) + if err != nil { + return nil, 0, fmt.Errorf("failed to marshal params: %w", err) + } + + route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryDelegationRewards) + return clientCtx.QueryWithData(route, bz) +} diff --git a/x/distribution/client/common/common_test.go b/x/distribution/client/common/common_test.go new file mode 100644 index 0000000..05fa593 --- /dev/null +++ b/x/distribution/client/common/common_test.go @@ -0,0 +1,39 @@ +package common + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec/legacy" +) + +func TestQueryDelegationRewardsAddrValidation(t *testing.T) { + clientCtx := client.Context{}.WithLegacyAmino(legacy.Cdc) + + type args struct { + delAddr string + valAddr string + } + + tests := []struct { + name string + args args + want []byte + wantErr bool + }{ + {"invalid delegator address", args{"invalid", ""}, nil, true}, + {"empty delegator address", args{"", ""}, nil, true}, + {"invalid validator address", args{"cosmos1zxcsu7l5qxs53lvp0fqgd09a9r2g6kqrk2cdpa", "invalid"}, nil, true}, + {"empty validator address", args{"cosmos1zxcsu7l5qxs53lvp0fqgd09a9r2g6kqrk2cdpa", ""}, nil, true}, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + _, _, err := QueryDelegationRewards(clientCtx, tt.args.delAddr, tt.args.valAddr) + require.True(t, err != nil, tt.wantErr) + }) + } +} diff --git a/x/distribution/doc.go b/x/distribution/doc.go new file mode 100644 index 0000000..8b9966c --- /dev/null +++ b/x/distribution/doc.go @@ -0,0 +1,6 @@ +/* +Package distribution implements a Cosmos SDK module, that provides an implementation +of the F1 fee distribution algorithm. It handles reward tracking, allocation, and +distribution. Please refer to the specification under /spec for further information. +*/ +package distribution diff --git a/x/distribution/exported/exported.go b/x/distribution/exported/exported.go new file mode 100644 index 0000000..000114e --- /dev/null +++ b/x/distribution/exported/exported.go @@ -0,0 +1,18 @@ +package exported + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type ( + ParamSet = paramtypes.ParamSet + + // Subspace defines an interface that implements the legacy x/params Subspace + // type. + // + // NOTE: This is used solely for migration of x/params managed parameters. + Subspace interface { + GetParamSet(ctx sdk.Context, ps ParamSet) + } +) diff --git a/x/distribution/keeper/alias_functions.go b/x/distribution/keeper/alias_functions.go new file mode 100644 index 0000000..28ea51c --- /dev/null +++ b/x/distribution/keeper/alias_functions.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// get outstanding rewards +func (k Keeper) GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) (sdk.DecCoins, error) { + rewards, err := k.GetValidatorOutstandingRewards(ctx, val) + if err != nil { + return nil, err + } + + return rewards.Rewards, nil +} + +// GetDistributionAccount returns the distribution ModuleAccount +func (k Keeper) GetDistributionAccount(ctx context.Context) sdk.ModuleAccountI { + return k.authKeeper.GetModuleAccount(ctx, types.ModuleName) +} diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go new file mode 100644 index 0000000..83db0ae --- /dev/null +++ b/x/distribution/keeper/allocation.go @@ -0,0 +1,143 @@ +package keeper + +import ( + "context" + + abci "github.com/cometbft/cometbft/abci/types" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// AllocateTokens performs reward and fee distribution to all validators based +// on the F1 fee distribution specification. +func (k Keeper) AllocateTokens(ctx context.Context, totalPreviousPower int64, bondedVotes []abci.VoteInfo) error { + // fetch and clear the collected fees for distribution, since this is + // called in BeginBlock, collected fees will be from the previous block + // (and distributed to the previous proposer) + feeCollector := k.authKeeper.GetModuleAccount(ctx, k.feeCollectorName) + feesCollectedInt := k.bankKeeper.GetAllBalances(ctx, feeCollector.GetAddress()) + feesCollected := sdk.NewDecCoinsFromCoins(feesCollectedInt...) + + // transfer collected fees to the distribution module account + err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, k.feeCollectorName, types.ModuleName, feesCollectedInt) + if err != nil { + return err + } + + // temporary workaround to keep CanWithdrawInvariant happy + // general discussions here: https://github.com/cosmos/cosmos-sdk/issues/2906#issuecomment-441867634 + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return err + } + + if totalPreviousPower == 0 { + feePool.CommunityPool = feePool.CommunityPool.Add(feesCollected...) + return k.FeePool.Set(ctx, feePool) + } + + // calculate fraction allocated to validators + remaining := feesCollected + communityTax, err := k.GetCommunityTax(ctx) + if err != nil { + return err + } + + voteMultiplier := math.LegacyOneDec().Sub(communityTax) + feeMultiplier := feesCollected.MulDecTruncate(voteMultiplier) + + // allocate tokens proportionally to voting power + // + // TODO: Consider parallelizing later + // + // Ref: https://github.com/cosmos/cosmos-sdk/pull/3099#discussion_r246276376 + for _, vote := range bondedVotes { + validator, err := k.stakingKeeper.ValidatorByConsAddr(ctx, vote.Validator.Address) + if err != nil { + return err + } + + // TODO: Consider micro-slashing for missing votes. + // + // Ref: https://github.com/cosmos/cosmos-sdk/issues/2525#issuecomment-430838701 + powerFraction := math.LegacyNewDec(vote.Validator.Power).QuoTruncate(math.LegacyNewDec(totalPreviousPower)) + reward := feeMultiplier.MulDecTruncate(powerFraction) + + err = k.AllocateTokensToValidator(ctx, validator, reward) + if err != nil { + return err + } + + remaining = remaining.Sub(reward) + } + + // allocate community funding + feePool.CommunityPool = feePool.CommunityPool.Add(remaining...) + return k.FeePool.Set(ctx, feePool) +} + +// AllocateTokensToValidator allocate tokens to a particular validator, +// splitting according to commission. +func (k Keeper) AllocateTokensToValidator(ctx context.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) error { + // split tokens between validator and delegators according to commission + commission := tokens.MulDec(val.GetCommission()) + shared := tokens.Sub(commission) + + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return err + } + + // update current commission + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeCommission, + sdk.NewAttribute(sdk.AttributeKeyAmount, commission.String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator()), + ), + ) + currentCommission, err := k.GetValidatorAccumulatedCommission(ctx, valBz) + if err != nil { + return err + } + + currentCommission.Commission = currentCommission.Commission.Add(commission...) + err = k.SetValidatorAccumulatedCommission(ctx, valBz, currentCommission) + if err != nil { + return err + } + + // update current rewards + currentRewards, err := k.GetValidatorCurrentRewards(ctx, valBz) + if err != nil { + return err + } + + currentRewards.Rewards = currentRewards.Rewards.Add(shared...) + err = k.SetValidatorCurrentRewards(ctx, valBz, currentRewards) + if err != nil { + return err + } + + // update outstanding rewards + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeRewards, + sdk.NewAttribute(sdk.AttributeKeyAmount, tokens.String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator()), + ), + ) + + outstanding, err := k.GetValidatorOutstandingRewards(ctx, valBz) + if err != nil { + return err + } + + outstanding.Rewards = outstanding.Rewards.Add(tokens...) + return k.SetValidatorOutstandingRewards(ctx, valBz, outstanding) +} diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go new file mode 100644 index 0000000..6ed8d07 --- /dev/null +++ b/x/distribution/keeper/allocation_test.go @@ -0,0 +1,341 @@ +package keeper_test + +import ( + "testing" + "time" + + abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" + disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func TestAllocateTokensToValidatorWithCommission(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + valCodec := address.NewBech32Codec("cosmosvaloper") + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(valCodec).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // create validator with 50% commission + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val, nil).AnyTimes() + + // allocate tokens + tokens := sdk.DecCoins{ + {Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(10)}, + } + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // check commission + expected := sdk.DecCoins{ + {Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(5)}, + } + + valBz, err := valCodec.StringToBytes(val.GetOperator()) + require.NoError(t, err) + + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valBz) + require.NoError(t, err) + require.Equal(t, expected, valCommission.Commission) + + // check current rewards + currentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, valBz) + require.NoError(t, err) + require.Equal(t, expected, currentRewards.Rewards) +} + +func TestAllocateTokensToManyValidators(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + feeCollectorAcc := authtypes.NewEmptyModuleAccount("fee_collector") + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + accountKeeper.EXPECT().GetModuleAccount(gomock.Any(), "fee_collector").Return(feeCollectorAcc) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec("cosmosvaloper")).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool & set params + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + + // create validator with 50% commission + valAddr0 := sdk.ValAddress(valConsAddr0) + val0, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + val0.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val0, nil).AnyTimes() + + // create second validator with 0% commission + valAddr1 := sdk.ValAddress(valConsAddr1) + val1, err := distrtestutil.CreateValidator(valConsPk1, math.NewInt(100)) + require.NoError(t, err) + val1.Commission = stakingtypes.NewCommission(math.LegacyNewDec(0), math.LegacyNewDec(0), math.LegacyNewDec(0)) + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk1)).Return(val1, nil).AnyTimes() + + abciValA := abci.Validator{ + Address: valConsPk0.Address(), + Power: 100, + } + abciValB := abci.Validator{ + Address: valConsPk1.Address(), + Power: 100, + } + + // assert initial state: zero outstanding rewards, zero community pool, zero commission, zero current rewards + val0OutstandingRewards, err := distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0OutstandingRewards.Rewards.IsZero()) + + val1OutstandingRewards, err := distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1OutstandingRewards.Rewards.IsZero()) + + feePool, err := distrKeeper.FeePool.Get(ctx) + require.NoError(t, err) + require.True(t, feePool.CommunityPool.IsZero()) + + val0Commission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0Commission.Commission.IsZero()) + + val1Commission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1Commission.Commission.IsZero()) + + val0CurrentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0CurrentRewards.Rewards.IsZero()) + + val1CurrentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1CurrentRewards.Rewards.IsZero()) + + // allocate tokens as if both had voted and second was proposer + fees := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100))) + bankKeeper.EXPECT().GetAllBalances(gomock.Any(), feeCollectorAcc.GetAddress()).Return(fees) + bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), "fee_collector", disttypes.ModuleName, fees) + + votes := []abci.VoteInfo{ + { + Validator: abciValA, + }, + { + Validator: abciValB, + }, + } + require.NoError(t, distrKeeper.AllocateTokens(ctx, 200, votes)) + + // 98 outstanding rewards (100 less 2 to community pool) + val0OutstandingRewards, err = distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr0) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecWithPrec(490, 1)}}, val0OutstandingRewards.Rewards) + + val1OutstandingRewards, err = distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr1) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecWithPrec(490, 1)}}, val1OutstandingRewards.Rewards) + + // 2 community pool coins + feePool, err = distrKeeper.FeePool.Get(ctx) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(2)}}, feePool.CommunityPool) + + // 50% commission for first proposer, (0.5 * 98%) * 100 / 2 = 23.25 + val0Commission, err = distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr0) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecWithPrec(2450, 2)}}, val0Commission.Commission) + + // zero commission for second proposer + val1Commission, err = distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1Commission.Commission.IsZero()) + + // just staking.proportional for first proposer less commission = (0.5 * 98%) * 100 / 2 = 24.50 + val0CurrentRewards, err = distrKeeper.GetValidatorCurrentRewards(ctx, valAddr0) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecWithPrec(2450, 2)}}, val0CurrentRewards.Rewards) + + // proposer reward + staking.proportional for second proposer = (0.5 * (98%)) * 100 = 49 + val1CurrentRewards, err = distrKeeper.GetValidatorCurrentRewards(ctx, valAddr1) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecWithPrec(490, 1)}}, val1CurrentRewards.Rewards) +} + +func TestAllocateTokensTruncation(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + feeCollectorAcc := authtypes.NewEmptyModuleAccount("fee_collector") + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + accountKeeper.EXPECT().GetModuleAccount(gomock.Any(), "fee_collector").Return(feeCollectorAcc) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec("cosmosvaloper")).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 10% commission + valAddr0 := sdk.ValAddress(valConsAddr0) + val0, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + val0.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDec(0)) + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk0)).Return(val0, nil).AnyTimes() + + // create second validator with 10% commission + valAddr1 := sdk.ValAddress(valConsAddr1) + val1, err := distrtestutil.CreateValidator(valConsPk1, math.NewInt(100)) + require.NoError(t, err) + val1.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDec(0)) + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk1)).Return(val1, nil).AnyTimes() + + // create third validator with 10% commission + valAddr2 := sdk.ValAddress(valConsAddr2) + val2, err := stakingtypes.NewValidator(sdk.ValAddress(valConsAddr2).String(), valConsPk1, stakingtypes.Description{}) + require.NoError(t, err) + val2.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDecWithPrec(1, 1), math.LegacyNewDec(0)) + stakingKeeper.EXPECT().ValidatorByConsAddr(gomock.Any(), sdk.GetConsAddress(valConsPk2)).Return(val2, nil).AnyTimes() + + abciValA := abci.Validator{ + Address: valConsPk0.Address(), + Power: 11, + } + abciValB := abci.Validator{ + Address: valConsPk1.Address(), + Power: 10, + } + abciValC := abci.Validator{ + Address: valConsPk2.Address(), + Power: 10, + } + + // assert initial state: zero outstanding rewards, zero community pool, zero commission, zero current rewards + val0OutstandingRewards, err := distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0OutstandingRewards.Rewards.IsZero()) + + val1OutstandingRewards, err := distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1OutstandingRewards.Rewards.IsZero()) + + feePool, err := distrKeeper.FeePool.Get(ctx) + require.NoError(t, err) + require.True(t, feePool.CommunityPool.IsZero()) + + val0Commission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0Commission.Commission.IsZero()) + + val1Commission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1Commission.Commission.IsZero()) + + val0CurrentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0CurrentRewards.Rewards.IsZero()) + + val1CurrentRewards, err := distrKeeper.GetValidatorCurrentRewards(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1CurrentRewards.Rewards.IsZero()) + + // allocate tokens as if both had voted and second was proposer + fees := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(634195840))) + bankKeeper.EXPECT().GetAllBalances(gomock.Any(), feeCollectorAcc.GetAddress()).Return(fees) + bankKeeper.EXPECT().SendCoinsFromModuleToModule(gomock.Any(), "fee_collector", disttypes.ModuleName, fees) + + votes := []abci.VoteInfo{ + { + Validator: abciValA, + }, + { + Validator: abciValB, + }, + { + Validator: abciValC, + }, + } + require.NoError(t, distrKeeper.AllocateTokens(ctx, 31, votes)) + + val0OutstandingRewards, err = distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr0) + require.NoError(t, err) + require.True(t, val0OutstandingRewards.Rewards.IsValid()) + + val1OutstandingRewards, err = distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr1) + require.NoError(t, err) + require.True(t, val1OutstandingRewards.Rewards.IsValid()) + + val2OutstandingRewards, err := distrKeeper.GetValidatorOutstandingRewards(ctx, valAddr2) + require.NoError(t, err) + require.True(t, val2OutstandingRewards.Rewards.IsValid()) +} diff --git a/x/distribution/keeper/common_test.go b/x/distribution/keeper/common_test.go new file mode 100644 index 0000000..642cbe4 --- /dev/null +++ b/x/distribution/keeper/common_test.go @@ -0,0 +1,22 @@ +package keeper_test + +import ( + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +var ( + PKS = simtestutil.CreateTestPubKeys(5) + + valConsPk0 = PKS[0] + valConsPk1 = PKS[1] + valConsPk2 = PKS[2] + + valConsAddr0 = sdk.ConsAddress(valConsPk0.Address()) + valConsAddr1 = sdk.ConsAddress(valConsPk1.Address()) + valConsAddr2 = sdk.ConsAddress(valConsPk2.Address()) + + distrAcc = authtypes.NewEmptyModuleAccount(types.ModuleName) +) diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go new file mode 100644 index 0000000..2b0e99d --- /dev/null +++ b/x/distribution/keeper/delegation.go @@ -0,0 +1,320 @@ +package keeper + +import ( + "context" + "fmt" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// initialize starting info for a new delegation +func (k Keeper) initializeDelegation(ctx context.Context, val sdk.ValAddress, del sdk.AccAddress) error { + // period has already been incremented - we want to store the period ended by this delegation action + valCurrentRewards, err := k.GetValidatorCurrentRewards(ctx, val) + if err != nil { + return err + } + previousPeriod := valCurrentRewards.Period - 1 + + // increment reference count for the period we're going to track + err = k.incrementReferenceCount(ctx, val, previousPeriod) + if err != nil { + return err + } + + validator, err := k.stakingKeeper.Validator(ctx, val) + if err != nil { + return err + } + + delegation, err := k.stakingKeeper.Delegation(ctx, del, val) + if err != nil { + return err + } + + // calculate delegation stake in tokens + // we don't store directly, so multiply delegation shares * (tokens per share) + // note: necessary to truncate so we don't allow withdrawing more rewards than owed + stake := validator.TokensFromSharesTruncated(delegation.GetShares()) + sdkCtx := sdk.UnwrapSDKContext(ctx) + return k.SetDelegatorStartingInfo(ctx, val, del, types.NewDelegatorStartingInfo(previousPeriod, stake, uint64(sdkCtx.BlockHeight()))) +} + +// calculate the rewards accrued by a delegation between two periods +func (k Keeper) calculateDelegationRewardsBetween(ctx context.Context, val stakingtypes.ValidatorI, + startingPeriod, endingPeriod uint64, stake math.LegacyDec, +) (sdk.DecCoins, error) { + // sanity check + if startingPeriod > endingPeriod { + panic("startingPeriod cannot be greater than endingPeriod") + } + + // sanity check + if stake.IsNegative() { + panic("stake should not be negative") + } + + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + + // return staking * (ending - starting) + starting, err := k.GetValidatorHistoricalRewards(ctx, valBz, startingPeriod) + if err != nil { + return sdk.DecCoins{}, err + } + + ending, err := k.GetValidatorHistoricalRewards(ctx, valBz, endingPeriod) + if err != nil { + return sdk.DecCoins{}, err + } + + difference := ending.CumulativeRewardRatio.Sub(starting.CumulativeRewardRatio) + if difference.IsAnyNegative() { + panic("negative rewards should not be possible") + } + // note: necessary to truncate so we don't allow withdrawing more rewards than owed + rewards := difference.MulDecTruncate(stake) + return rewards, nil +} + +// calculate the total rewards accrued by a delegation +func (k Keeper) CalculateDelegationRewards(ctx context.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins, err error) { + addrCodec := k.authKeeper.AddressCodec() + delAddr, err := addrCodec.StringToBytes(del.GetDelegatorAddr()) + if err != nil { + return sdk.DecCoins{}, err + } + + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.GetValidatorAddr()) + if err != nil { + return sdk.DecCoins{}, err + } + + // fetch starting info for delegation + startingInfo, err := k.GetDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) + if err != nil { + return + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + if startingInfo.Height == uint64(sdkCtx.BlockHeight()) { + // started this height, no rewards yet + return + } + + startingPeriod := startingInfo.PreviousPeriod + stake := startingInfo.Stake + + // Iterate through slashes and withdraw with calculated staking for + // distribution periods. These period offsets are dependent on *when* slashes + // happen - namely, in BeginBlock, after rewards are allocated... + // Slashes which happened in the first block would have been before this + // delegation existed, UNLESS they were slashes of a redelegation to this + // validator which was itself slashed (from a fault committed by the + // redelegation source validator) earlier in the same BeginBlock. + startingHeight := startingInfo.Height + // Slashes this block happened after reward allocation, but we have to account + // for them for the stake sanity check below. + endingHeight := uint64(sdkCtx.BlockHeight()) + if endingHeight > startingHeight { + k.IterateValidatorSlashEventsBetween(ctx, valAddr, startingHeight, endingHeight, + func(height uint64, event types.ValidatorSlashEvent) (stop bool) { + endingPeriod := event.ValidatorPeriod + if endingPeriod > startingPeriod { + delRewards, err := k.calculateDelegationRewardsBetween(ctx, val, startingPeriod, endingPeriod, stake) + if err != nil { + panic(err) + } + rewards = rewards.Add(delRewards...) + + // Note: It is necessary to truncate so we don't allow withdrawing + // more rewards than owed. + stake = stake.MulTruncate(math.LegacyOneDec().Sub(event.Fraction)) + startingPeriod = endingPeriod + } + return false + }, + ) + } + + // A total stake sanity check; Recalculated final stake should be less than or + // equal to current stake here. We cannot use Equals because stake is truncated + // when multiplied by slash fractions (see above). We could only use equals if + // we had arbitrary-precision rationals. + currentStake := val.TokensFromShares(del.GetShares()) + + if stake.GT(currentStake) { + // AccountI for rounding inconsistencies between: + // + // currentStake: calculated as in staking with a single computation + // stake: calculated as an accumulation of stake + // calculations across validator's distribution periods + // + // These inconsistencies are due to differing order of operations which + // will inevitably have different accumulated rounding and may lead to + // the smallest decimal place being one greater in stake than + // currentStake. When we calculated slashing by period, even if we + // round down for each slash fraction, it's possible due to how much is + // being rounded that we slash less when slashing by period instead of + // for when we slash without periods. In other words, the single slash, + // and the slashing by period could both be rounding down but the + // slashing by period is simply rounding down less, thus making stake > + // currentStake + // + // A small amount of this error is tolerated and corrected for, + // however any greater amount should be considered a breach in expected + // behavior. + marginOfErr := math.LegacySmallestDec().MulInt64(3) + if stake.LTE(currentStake.Add(marginOfErr)) { + stake = currentStake + } else { + panic(fmt.Sprintf("calculated final stake for delegator %s greater than current stake"+ + "\n\tfinal stake:\t%s"+ + "\n\tcurrent stake:\t%s", + del.GetDelegatorAddr(), stake, currentStake)) + } + } + + // calculate rewards for final period + delRewards, err := k.calculateDelegationRewardsBetween(ctx, val, startingPeriod, endingPeriod, stake) + if err != nil { + return sdk.DecCoins{}, err + } + + rewards = rewards.Add(delRewards...) + return rewards, nil +} + +func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI) (sdk.Coins, error) { + addrCodec := k.authKeeper.AddressCodec() + delAddr, err := addrCodec.StringToBytes(del.GetDelegatorAddr()) + if err != nil { + return nil, err + } + + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.GetValidatorAddr()) + if err != nil { + return nil, err + } + + // check existence of delegator starting info + hasInfo, err := k.HasDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) + if err != nil { + return nil, err + } + + if !hasInfo { + return nil, types.ErrEmptyDelegationDistInfo + } + + // end current period and calculate rewards + endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) + if err != nil { + return nil, err + } + + rewardsRaw, err := k.CalculateDelegationRewards(ctx, val, del, endingPeriod) + if err != nil { + return nil, err + } + + outstanding, err := k.GetValidatorOutstandingRewardsCoins(ctx, sdk.ValAddress(valAddr)) + if err != nil { + return nil, err + } + + // defensive edge case may happen on the very final digits + // of the decCoins due to operation order of the distribution mechanism. + rewards := rewardsRaw.Intersect(outstanding) + if !rewards.Equal(rewardsRaw) { + logger := k.Logger(ctx) + logger.Info( + "rounding error withdrawing rewards from validator", + "delegator", del.GetDelegatorAddr(), + "validator", val.GetOperator(), + "got", rewards.String(), + "expected", rewardsRaw.String(), + ) + } + + // truncate reward dec coins, return remainder to community pool + finalRewards, remainder := rewards.TruncateDecimal() + + // add coins to user account + if !finalRewards.IsZero() { + withdrawAddr, err := k.GetDelegatorWithdrawAddr(ctx, delAddr) + if err != nil { + return nil, err + } + + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, withdrawAddr, finalRewards) + if err != nil { + return nil, err + } + } + + // update the outstanding rewards and the community pool only if the + // transaction was successful + err = k.SetValidatorOutstandingRewards(ctx, sdk.ValAddress(valAddr), types.ValidatorOutstandingRewards{Rewards: outstanding.Sub(rewards)}) + if err != nil { + return nil, err + } + + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return nil, err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(remainder...) + err = k.FeePool.Set(ctx, feePool) + if err != nil { + return nil, err + } + + // decrement reference count of starting period + startingInfo, err := k.GetDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) + if err != nil { + return nil, err + } + + startingPeriod := startingInfo.PreviousPeriod + err = k.decrementReferenceCount(ctx, sdk.ValAddress(valAddr), startingPeriod) + if err != nil { + return nil, err + } + + // remove delegator starting info + err = k.DeleteDelegatorStartingInfo(ctx, sdk.ValAddress(valAddr), sdk.AccAddress(delAddr)) + if err != nil { + return nil, err + } + + if finalRewards.IsZero() { + baseDenom, _ := sdk.GetBaseDenom() + if baseDenom == "" { + baseDenom = sdk.DefaultBondDenom + } + + // Note, we do not call the NewCoins constructor as we do not want the zero + // coin removed. + finalRewards = sdk.Coins{sdk.NewCoin(baseDenom, math.ZeroInt())} + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeWithdrawRewards, + sdk.NewAttribute(sdk.AttributeKeyAmount, finalRewards.String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator()), + sdk.NewAttribute(types.AttributeKeyDelegator, del.GetDelegatorAddr()), + ), + ) + + return finalRewards, nil +} diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go new file mode 100644 index 0000000..4678d53 --- /dev/null +++ b/x/distribution/keeper/delegation_test.go @@ -0,0 +1,1051 @@ +package keeper_test + +import ( + "testing" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" + disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func TestCalculateRewardsBasic(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(1000)) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + // delegation mock + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // historical count should be 2 (once for validator init, once for delegation init) + require.Equal(t, uint64(2), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // historical count should be 2 still + require.Equal(t, uint64(2), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // calculate delegation rewards + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be zero + require.True(t, rewards.IsZero()) + + // allocate some rewards + initial := int64(10) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial)}} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // end period + endingPeriod, _ = distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be half the tokens + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 2)}}, rewards) + + // commission should be the other half + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 2)}}, valCommission.Commission) +} + +func TestCalculateRewardsAfterSlash(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + valPower := int64(100) + stake := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) + val, err := distrtestutil.CreateValidator(valConsPk0, stake) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + + // set mock calls + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(4) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be zero + require.True(t, rewards.IsZero()) + + // start out block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // slash the validator by 50% (simulated with manual calls; we assume the validator is bonded) + slashedTokens := distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower, + math.LegacyNewDecWithPrec(5, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + require.True(t, slashedTokens.IsPositive(), "expected positive slashed tokens, got: %s", slashedTokens) + + // increase block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some rewards + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecFromInt(initial)}} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // end period + endingPeriod, _ = distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be half the tokens + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecFromInt(initial.QuoRaw(2))}}, rewards) + + // commission should be the other half + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecFromInt(initial.QuoRaw(2))}}, + valCommission.Commission) +} + +func TestCalculateRewardsAfterManySlashes(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + valPower := int64(100) + stake := sdk.TokensFromConsensusPower(valPower, sdk.DefaultPowerReduction) + val, err := distrtestutil.CreateValidator(valConsPk0, stake) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + // delegation mocks + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(4) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be zero + require.True(t, rewards.IsZero()) + + // start out block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // slash the validator by 50% (simulated with manual calls; we assume the validator is bonded) + slashedTokens := distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower, + math.LegacyNewDecWithPrec(5, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + require.True(t, slashedTokens.IsPositive(), "expected positive slashed tokens, got: %s", slashedTokens) + + // expect a call for the next slash with the updated validator + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) + + // increase block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some rewards + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecFromInt(initial)}} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // slash the validator by 50% again + slashedTokens = distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower/2, + math.LegacyNewDecWithPrec(2, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + require.True(t, slashedTokens.IsPositive(), "expected positive slashed tokens, got: %s", slashedTokens) + + // increase block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // end period + endingPeriod, _ = distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be half the tokens + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecFromInt(initial)}}, rewards) + + // commission should be the other half + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDecFromInt(initial)}}, + valCommission.Commission) +} + +func TestCalculateRewardsMultiDelegator(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr0 := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + del0 := stakingtypes.NewDelegation(addr0.String(), valAddr.String(), val.DelegatorShares) + + // set mock calls + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(4) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr0, valAddr).Return(del0, nil).Times(1) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr0, valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some rewards + initial := int64(20) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial)}} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // second delegation + addr1 := sdk.AccAddress(valConsAddr1) + _, del1, err := distrtestutil.Delegate(ctx, distrKeeper, addr1, &val, math.NewInt(100), nil, stakingKeeper) + require.NoError(t, err) + + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr1, valAddr).Return(del1, nil) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) + + // call necessary hooks to update a delegation + err = distrKeeper.Hooks().AfterDelegationModified(ctx, addr1, valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards for del1 + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del0, endingPeriod) + require.NoError(t, err) + + // rewards for del0 should be 3/4 initial + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial * 3 / 4)}}, rewards) + + // calculate delegation rewards for del2 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del1, endingPeriod) + require.NoError(t, err) + + // rewards for del2 should be 1/4 initial + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial * 1 / 4)}}, rewards) + + // commission should be equal to initial (50% twice) + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial)}}, valCommission.Commission) +} + +func TestWithdrawDelegationRewardsBasic(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + // delegation mock + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(5) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil).Times(3) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some rewards + initial := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + tokens := sdk.DecCoins{sdk.NewDecCoin(sdk.DefaultBondDenom, initial)} + + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // historical count should be 2 (initial + latest for delegation) + require.Equal(t, uint64(2), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // withdraw rewards (the bank keeper should be called with the right amount of tokens to transfer) + expRewards := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, initial.QuoRaw(2))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, addr, expRewards) + _, err = distrKeeper.WithdrawDelegationRewards(ctx, sdk.AccAddress(valAddr), valAddr) + require.Nil(t, err) + + // historical count should still be 2 (added one record, cleared one) + require.Equal(t, uint64(2), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // withdraw commission (the bank keeper should be called with the right amount of tokens to transfer) + expCommission := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, initial.QuoRaw(2))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, addr, expCommission) + _, err = distrKeeper.WithdrawValidatorCommission(ctx, valAddr) + require.Nil(t, err) +} + +func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + // delegation mock + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(5) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be zero + require.True(t, rewards.IsZero()) + + // start out block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some rewards + initial := math.LegacyNewDecFromInt(sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + valPower := int64(100) + // slash the validator by 50% (simulated with manual calls; we assume the validator is bonded) + distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower, + math.LegacyNewDecWithPrec(5, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + + // slash the validator by 50% again + // stakingKeeper.Slash(ctx, valConsAddr0, ctx.BlockHeight(), valPower/2, math.LegacyNewDecWithPrec(5, 1)) + distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower/2, + math.LegacyNewDecWithPrec(5, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + + // increase block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // end period + endingPeriod, _ = distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards should be half the tokens + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}}, rewards) + + // commission should be the other half + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}}, valCommission.Commission) +} + +func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + valPower := int64(100) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, sdk.TokensFromConsensusPower(valPower, sdk.DefaultPowerReduction)) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + // validator and delegation mocks + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(2) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some rewards + initial := math.LegacyNewDecFromInt(sdk.TokensFromConsensusPower(30, sdk.DefaultPowerReduction)) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // slash the validator + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower, + math.LegacyNewDecWithPrec(5, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // update validator mock + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) + + // second delegation + _, del2, err := distrtestutil.Delegate( + ctx, + distrKeeper, + sdk.AccAddress(valConsAddr1), + &val, + sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction), + nil, + stakingKeeper, + ) + require.NoError(t, err) + + // new delegation mock and update validator mock + stakingKeeper.EXPECT().Delegation(gomock.Any(), sdk.AccAddress(valConsAddr1), valAddr).Return(del2, nil) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(1) + + // call necessary hooks to update a delegation + err = distrKeeper.Hooks().AfterDelegationModified(ctx, sdk.AccAddress(valConsAddr1), valAddr) + require.NoError(t, err) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // slash the validator again + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + distrtestutil.SlashValidator( + ctx, + valConsAddr0, + ctx.BlockHeight(), + valPower, + math.LegacyNewDecWithPrec(5, 1), + &val, + &distrKeeper, + stakingKeeper, + ) + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards for del1 + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards for del1 should be 2/3 initial (half initial first period, 1/6 initial second period) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.QuoInt64(2).Add(initial.QuoInt64(6))}}, rewards) + + // calculate delegation rewards for del2 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del2, endingPeriod) + require.NoError(t, err) + + // rewards for del2 should be initial / 3 + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial.QuoInt64(3)}}, rewards) + + // commission should be equal to initial (twice 50% commission, unaffected by slashing) + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}}, valCommission.Commission) +} + +func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDec(0)) + + // validator and delegation mocks + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil).Times(5) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(2) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some rewards + initial := int64(20) + tokens := sdk.DecCoins{sdk.NewDecCoin(sdk.DefaultBondDenom, math.NewInt(initial))} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // historical count should be 2 (validator init, delegation init) + require.Equal(t, uint64(2), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // second delegation + _, del2, err := distrtestutil.Delegate( + ctx, + distrKeeper, + sdk.AccAddress(valConsAddr1), + &val, + math.NewInt(100), + nil, + stakingKeeper, + ) + require.NoError(t, err) + + // new delegation mock and update validator mock + stakingKeeper.EXPECT().Delegation(gomock.Any(), sdk.AccAddress(valConsAddr1), valAddr).Return(del2, nil).Times(3) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(6) + + // call necessary hooks to update a delegation + err = distrKeeper.Hooks().AfterDelegationModified(ctx, sdk.AccAddress(valConsAddr1), valAddr) + require.NoError(t, err) + + // historical count should be 3 (second delegation init) + require.Equal(t, uint64(3), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // first delegator withdraws + expRewards := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(initial*3/4))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, addr, expRewards) + _, err = distrKeeper.WithdrawDelegationRewards(ctx, addr, valAddr) + require.NoError(t, err) + + // second delegator withdraws + expRewards = sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(initial*1/4))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, sdk.AccAddress(valConsAddr1), expRewards) + _, err = distrKeeper.WithdrawDelegationRewards(ctx, sdk.AccAddress(valConsAddr1), valAddr) + require.NoError(t, err) + + // historical count should be 3 (validator init + two delegations) + require.Equal(t, uint64(3), distrKeeper.GetValidatorHistoricalReferenceCount(ctx)) + + // validator withdraws commission + expCommission := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(initial))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, addr, expCommission) + _, err = distrKeeper.WithdrawValidatorCommission(ctx, valAddr) + require.NoError(t, err) + + // end period + endingPeriod, _ := distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards for del1 + rewards, err := distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards for del1 should be zero + require.True(t, rewards.IsZero()) + + // calculate delegation rewards for del2 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del2, endingPeriod) + require.NoError(t, err) + + // rewards for del2 should be zero + require.True(t, rewards.IsZero()) + + // commission should be zero + valCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.True(t, valCommission.Commission.IsZero()) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // first delegator withdraws again + expCommission = sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(initial*1/4))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, addr, expCommission) + _, err = distrKeeper.WithdrawDelegationRewards(ctx, addr, valAddr) + require.NoError(t, err) + + // end period + endingPeriod, _ = distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards for del1 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards for del1 should be zero + require.True(t, rewards.IsZero()) + + // calculate delegation rewards for del2 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del2, endingPeriod) + require.NoError(t, err) + + // rewards for del2 should be 1/4 initial + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 4)}}, rewards) + + // commission should be half initial + valCommission, err = distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 2)}}, valCommission.Commission) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // withdraw commission + expCommission = sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(initial))} + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(ctx, disttypes.ModuleName, addr, expCommission) + _, err = distrKeeper.WithdrawValidatorCommission(ctx, valAddr) + require.NoError(t, err) + + // end period + endingPeriod, _ = distrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards for del1 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + require.NoError(t, err) + + // rewards for del1 should be 1/4 initial + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 4)}}, rewards) + + // calculate delegation rewards for del2 + rewards, err = distrKeeper.CalculateDelegationRewards(ctx, val, del2, endingPeriod) + require.NoError(t, err) + + // rewards for del2 should be 1/2 initial + require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initial / 2)}}, rewards) + + // commission should be zero + valCommission, err = distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + require.True(t, valCommission.Commission.IsZero()) +} + +func Test100PercentCommissionReward(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(disttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + stakingKeeper.EXPECT().ValidatorAddressCodec().Return(address.NewBech32Codec(sdk.Bech32PrefixValAddr)).AnyTimes() + accountKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec(sdk.Bech32MainPrefix)).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) + require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) + + // create validator with 50% commission + valAddr := sdk.ValAddress(valConsAddr0) + addr := sdk.AccAddress(valAddr) + val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) + require.NoError(t, err) + val.Commission = stakingtypes.NewCommission(math.LegacyNewDecWithPrec(10, 1), math.LegacyNewDecWithPrec(10, 1), math.LegacyNewDec(0)) + + // validator and delegation mocks + del := stakingtypes.NewDelegation(addr.String(), valAddr.String(), val.DelegatorShares) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(3) + stakingKeeper.EXPECT().Delegation(gomock.Any(), addr, valAddr).Return(del, nil).Times(3) + + // run the necessary hooks manually (given that we are not running an actual staking module) + err = distrtestutil.CallCreateValidatorHooks(ctx, distrKeeper, addr, valAddr) + require.NoError(t, err) + stakingKeeper.EXPECT().Validator(gomock.Any(), valAddr).Return(val, nil).Times(2) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some rewards + initial := int64(20) + tokens := sdk.DecCoins{sdk.NewDecCoin(sdk.DefaultBondDenom, math.NewInt(initial))} + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // allocate some more rewards + require.NoError(t, distrKeeper.AllocateTokensToValidator(ctx, val, tokens)) + + rewards, err := distrKeeper.WithdrawDelegationRewards(ctx, addr, valAddr) + require.NoError(t, err) + + zeroRewards := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, math.ZeroInt())} + require.True(t, rewards.Equal(zeroRewards)) + + events := ctx.EventManager().Events() + lastEvent := events[len(events)-1] + + var hasValue bool + for _, attr := range lastEvent.Attributes { + if attr.Key == "amount" && attr.Value == "0stake" { + hasValue = true + } + } + require.True(t, hasValue) +} diff --git a/x/distribution/keeper/fee_pool.go b/x/distribution/keeper/fee_pool.go new file mode 100644 index 0000000..63c6678 --- /dev/null +++ b/x/distribution/keeper/fee_pool.go @@ -0,0 +1,34 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// DistributeFromFeePool distributes funds from the distribution module account to +// a receiver address while updating the community pool +func (k Keeper) DistributeFromFeePool(ctx context.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error { + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return err + } + + // NOTE the community pool isn't a module account, however its coins + // are held in the distribution module account. Thus the community pool + // must be reduced separately from the SendCoinsFromModuleToAccount call + newPool, negative := feePool.CommunityPool.SafeSub(sdk.NewDecCoinsFromCoins(amount...)) + if negative { + return types.ErrBadDistribution + } + + feePool.CommunityPool = newPool + + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, receiveAddr, amount) + if err != nil { + return err + } + + return k.FeePool.Set(ctx, feePool) +} diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go new file mode 100644 index 0000000..7d8fa26 --- /dev/null +++ b/x/distribution/keeper/genesis.go @@ -0,0 +1,234 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// InitGenesis sets distribution information for genesis +func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { + var moduleHoldings sdk.DecCoins + + err := k.FeePool.Set(ctx, data.FeePool) + if err != nil { + panic(err) + } + + if err := k.Params.Set(ctx, data.Params); err != nil { + panic(err) + } + + for _, dwi := range data.DelegatorWithdrawInfos { + delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(dwi.DelegatorAddress) + if err != nil { + panic(err) + } + withdrawAddress, err := k.authKeeper.AddressCodec().StringToBytes(dwi.WithdrawAddress) + if err != nil { + panic(err) + } + err = k.SetDelegatorWithdrawAddr(ctx, delegatorAddress, withdrawAddress) + if err != nil { + panic(err) + } + } + + var previousProposer sdk.ConsAddress + if data.PreviousProposer != "" { + var err error + previousProposer, err = k.stakingKeeper.ConsensusAddressCodec().StringToBytes(data.PreviousProposer) + if err != nil { + panic(err) + } + } + + if err = k.SetPreviousProposerConsAddr(ctx, previousProposer); err != nil { + panic(err) + } + + for _, rew := range data.OutstandingRewards { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(rew.ValidatorAddress) + if err != nil { + panic(err) + } + err = k.SetValidatorOutstandingRewards(ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: rew.OutstandingRewards}) + if err != nil { + panic(err) + } + moduleHoldings = moduleHoldings.Add(rew.OutstandingRewards...) + } + for _, acc := range data.ValidatorAccumulatedCommissions { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(acc.ValidatorAddress) + if err != nil { + panic(err) + } + err = k.SetValidatorAccumulatedCommission(ctx, valAddr, acc.Accumulated) + if err != nil { + panic(err) + } + } + for _, his := range data.ValidatorHistoricalRewards { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(his.ValidatorAddress) + if err != nil { + panic(err) + } + err = k.SetValidatorHistoricalRewards(ctx, valAddr, his.Period, his.Rewards) + if err != nil { + panic(err) + } + } + for _, cur := range data.ValidatorCurrentRewards { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(cur.ValidatorAddress) + if err != nil { + panic(err) + } + err = k.SetValidatorCurrentRewards(ctx, valAddr, cur.Rewards) + if err != nil { + panic(err) + } + } + for _, del := range data.DelegatorStartingInfos { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.ValidatorAddress) + if err != nil { + panic(err) + } + delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(del.DelegatorAddress) + if err != nil { + panic(err) + } + + err = k.SetDelegatorStartingInfo(ctx, valAddr, delegatorAddress, del.StartingInfo) + if err != nil { + panic(err) + } + } + for _, evt := range data.ValidatorSlashEvents { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(evt.ValidatorAddress) + if err != nil { + panic(err) + } + err = k.SetValidatorSlashEvent(ctx, valAddr, evt.Height, evt.Period, evt.ValidatorSlashEvent) + if err != nil { + panic(err) + } + } + + moduleHoldings = moduleHoldings.Add(data.FeePool.CommunityPool...) + moduleHoldingsInt, _ := moduleHoldings.TruncateDecimal() + + // check if the module account exists + moduleAcc := k.GetDistributionAccount(ctx) + if moduleAcc == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } + + balances := k.bankKeeper.GetAllBalances(ctx, moduleAcc.GetAddress()) + if balances.IsZero() { + k.authKeeper.SetModuleAccount(ctx, moduleAcc) + } + if !balances.Equal(moduleHoldingsInt) { + panic(fmt.Sprintf("distribution module balance does not match the module holdings: %s <-> %s", balances, moduleHoldingsInt)) + } +} + +// ExportGenesis returns a GenesisState for a given context and keeper. +func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + feePool, err := k.FeePool.Get(ctx) + if err != nil { + panic(err) + } + + params, err := k.Params.Get(ctx) + if err != nil { + panic(err) + } + + dwi := make([]types.DelegatorWithdrawInfo, 0) + k.IterateDelegatorWithdrawAddrs(ctx, func(del, addr sdk.AccAddress) (stop bool) { + dwi = append(dwi, types.DelegatorWithdrawInfo{ + DelegatorAddress: del.String(), + WithdrawAddress: addr.String(), + }) + return false + }) + + pp, err := k.GetPreviousProposerConsAddr(ctx) + if err != nil { + panic(err) + } + + outstanding := make([]types.ValidatorOutstandingRewardsRecord, 0) + + k.IterateValidatorOutstandingRewards(ctx, + func(addr sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool) { + outstanding = append(outstanding, types.ValidatorOutstandingRewardsRecord{ + ValidatorAddress: addr.String(), + OutstandingRewards: rewards.Rewards, + }) + return false + }, + ) + + acc := make([]types.ValidatorAccumulatedCommissionRecord, 0) + k.IterateValidatorAccumulatedCommissions(ctx, + func(addr sdk.ValAddress, commission types.ValidatorAccumulatedCommission) (stop bool) { + acc = append(acc, types.ValidatorAccumulatedCommissionRecord{ + ValidatorAddress: addr.String(), + Accumulated: commission, + }) + return false + }, + ) + + his := make([]types.ValidatorHistoricalRewardsRecord, 0) + k.IterateValidatorHistoricalRewards(ctx, + func(val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards) (stop bool) { + his = append(his, types.ValidatorHistoricalRewardsRecord{ + ValidatorAddress: val.String(), + Period: period, + Rewards: rewards, + }) + return false + }, + ) + + cur := make([]types.ValidatorCurrentRewardsRecord, 0) + k.IterateValidatorCurrentRewards(ctx, + func(val sdk.ValAddress, rewards types.ValidatorCurrentRewards) (stop bool) { + cur = append(cur, types.ValidatorCurrentRewardsRecord{ + ValidatorAddress: val.String(), + Rewards: rewards, + }) + return false + }, + ) + + dels := make([]types.DelegatorStartingInfoRecord, 0) + k.IterateDelegatorStartingInfos(ctx, + func(val sdk.ValAddress, del sdk.AccAddress, info types.DelegatorStartingInfo) (stop bool) { + dels = append(dels, types.DelegatorStartingInfoRecord{ + ValidatorAddress: val.String(), + DelegatorAddress: del.String(), + StartingInfo: info, + }) + return false + }, + ) + + slashes := make([]types.ValidatorSlashEventRecord, 0) + k.IterateValidatorSlashEvents(ctx, + func(val sdk.ValAddress, height uint64, event types.ValidatorSlashEvent) (stop bool) { + slashes = append(slashes, types.ValidatorSlashEventRecord{ + ValidatorAddress: val.String(), + Height: height, + Period: event.ValidatorPeriod, + ValidatorSlashEvent: event, + }) + return false + }, + ) + + return types.NewGenesisState(params, feePool, dwi, pp, outstanding, acc, his, cur, dels, slashes) +} diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go new file mode 100644 index 0000000..b80ca32 --- /dev/null +++ b/x/distribution/keeper/grpc_query.go @@ -0,0 +1,372 @@ +package keeper + +import ( + "context" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "cosmossdk.io/errors" + "cosmossdk.io/store/prefix" + + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +var _ types.QueryServer = Querier{} + +type Querier struct { + Keeper +} + +func NewQuerier(keeper Keeper) Querier { + return Querier{Keeper: keeper} +} + +// Params queries params of distribution module +func (k Querier) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + params, err := k.Keeper.Params.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryParamsResponse{Params: params}, nil +} + +// ValidatorDistributionInfo query validator's commission and self-delegation rewards +func (k Querier) ValidatorDistributionInfo(ctx context.Context, req *types.QueryValidatorDistributionInfoRequest) (*types.QueryValidatorDistributionInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.ValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty validator address") + } + + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } + + // self-delegation rewards + val, err := k.stakingKeeper.Validator(ctx, valAdr) + if err != nil { + return nil, err + } + + if val == nil { + return nil, errors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) + } + + delAdr := sdk.AccAddress(valAdr) + + del, err := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) + if err != nil { + return nil, err + } + + if del == nil { + return nil, types.ErrNoDelegationExists + } + + endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) + if err != nil { + return nil, err + } + + rewards, err := k.CalculateDelegationRewards(ctx, val, del, endingPeriod) + if err != nil { + return nil, err + } + + // validator's commission + validatorCommission, err := k.GetValidatorAccumulatedCommission(ctx, valAdr) + if err != nil { + return nil, err + } + + return &types.QueryValidatorDistributionInfoResponse{ + Commission: validatorCommission.Commission, + OperatorAddress: delAdr.String(), + SelfBondRewards: rewards, + }, nil +} + +// ValidatorOutstandingRewards queries rewards of a validator address +func (k Querier) ValidatorOutstandingRewards(ctx context.Context, req *types.QueryValidatorOutstandingRewardsRequest) (*types.QueryValidatorOutstandingRewardsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.ValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty validator address") + } + + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } + + validator, err := k.stakingKeeper.Validator(ctx, valAdr) + if err != nil { + return nil, err + } + + if validator == nil { + return nil, errors.Wrapf(types.ErrNoValidatorExists, req.ValidatorAddress) + } + + rewards, err := k.GetValidatorOutstandingRewards(ctx, valAdr) + if err != nil { + return nil, err + } + + return &types.QueryValidatorOutstandingRewardsResponse{Rewards: rewards}, nil +} + +// ValidatorCommission queries accumulated commission for a validator +func (k Querier) ValidatorCommission(ctx context.Context, req *types.QueryValidatorCommissionRequest) (*types.QueryValidatorCommissionResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.ValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty validator address") + } + + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } + + validator, err := k.stakingKeeper.Validator(ctx, valAdr) + if err != nil { + return nil, err + } + + if validator == nil { + return nil, errors.Wrapf(types.ErrNoValidatorExists, req.ValidatorAddress) + } + commission, err := k.GetValidatorAccumulatedCommission(ctx, valAdr) + if err != nil { + return nil, err + } + + return &types.QueryValidatorCommissionResponse{Commission: commission}, nil +} + +// ValidatorSlashes queries slash events of a validator +func (k Querier) ValidatorSlashes(ctx context.Context, req *types.QueryValidatorSlashesRequest) (*types.QueryValidatorSlashesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.ValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty validator address") + } + + if req.EndingHeight < req.StartingHeight { + return nil, status.Errorf(codes.InvalidArgument, "starting height greater than ending height (%d > %d)", req.StartingHeight, req.EndingHeight) + } + + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid validator address") + } + + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(valAddr)) + + events, pageRes, err := query.GenericFilteredPaginate(k.cdc, slashesStore, req.Pagination, func(key []byte, result *types.ValidatorSlashEvent) (*types.ValidatorSlashEvent, error) { + if result.ValidatorPeriod < req.StartingHeight || result.ValidatorPeriod > req.EndingHeight { + return nil, nil + } + + return result, nil + }, func() *types.ValidatorSlashEvent { + return &types.ValidatorSlashEvent{} + }) + if err != nil { + return nil, err + } + + slashes := []types.ValidatorSlashEvent{} + for _, event := range events { + slashes = append(slashes, *event) + } + + return &types.QueryValidatorSlashesResponse{Slashes: slashes, Pagination: pageRes}, nil +} + +// DelegationRewards the total rewards accrued by a delegation +func (k Querier) DelegationRewards(ctx context.Context, req *types.QueryDelegationRewardsRequest) (*types.QueryDelegationRewardsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.DelegatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty delegator address") + } + + if req.ValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty validator address") + } + + valAdr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(req.ValidatorAddress) + if err != nil { + return nil, err + } + + val, err := k.stakingKeeper.Validator(ctx, valAdr) + if err != nil { + return nil, err + } + + if val == nil { + return nil, errors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) + } + + delAdr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddress) + if err != nil { + return nil, err + } + del, err := k.stakingKeeper.Delegation(ctx, delAdr, valAdr) + if err != nil { + return nil, err + } + + if del == nil { + return nil, types.ErrNoDelegationExists + } + + endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) + if err != nil { + return nil, err + } + + rewards, err := k.CalculateDelegationRewards(ctx, val, del, endingPeriod) + if err != nil { + return nil, err + } + + return &types.QueryDelegationRewardsResponse{Rewards: rewards}, nil +} + +// DelegationTotalRewards the total rewards accrued by a each validator +func (k Querier) DelegationTotalRewards(ctx context.Context, req *types.QueryDelegationTotalRewardsRequest) (*types.QueryDelegationTotalRewardsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.DelegatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty delegator address") + } + + total := sdk.DecCoins{} + var delRewards []types.DelegationDelegatorReward + + delAdr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddress) + if err != nil { + return nil, err + } + + err = k.stakingKeeper.IterateDelegations( + ctx, delAdr, + func(_ int64, del stakingtypes.DelegationI) (stop bool) { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(del.GetValidatorAddr()) + if err != nil { + panic(err) + } + + val, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + panic(err) + } + + endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) + if err != nil { + panic(err) + } + + delReward, err := k.CalculateDelegationRewards(ctx, val, del, endingPeriod) + if err != nil { + panic(err) + } + + delRewards = append(delRewards, types.NewDelegationDelegatorReward(del.GetValidatorAddr(), delReward)) + total = total.Add(delReward...) + return false + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryDelegationTotalRewardsResponse{Rewards: delRewards, Total: total}, nil +} + +// DelegatorValidators queries the validators list of a delegator +func (k Querier) DelegatorValidators(ctx context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.DelegatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty delegator address") + } + + delAdr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddress) + if err != nil { + return nil, err + } + var validators []string + + err = k.stakingKeeper.IterateDelegations( + ctx, delAdr, + func(_ int64, del stakingtypes.DelegationI) (stop bool) { + validators = append(validators, del.GetValidatorAddr()) + return false + }, + ) + + if err != nil { + return nil, err + } + + return &types.QueryDelegatorValidatorsResponse{Validators: validators}, nil +} + +// DelegatorWithdrawAddress queries Query/delegatorWithdrawAddress +func (k Querier) DelegatorWithdrawAddress(ctx context.Context, req *types.QueryDelegatorWithdrawAddressRequest) (*types.QueryDelegatorWithdrawAddressResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.DelegatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty delegator address") + } + delAdr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddress) + if err != nil { + return nil, err + } + + withdrawAddr, err := k.GetDelegatorWithdrawAddr(ctx, delAdr) + if err != nil { + return nil, err + } + + return &types.QueryDelegatorWithdrawAddressResponse{WithdrawAddress: withdrawAddr.String()}, nil +} + +// CommunityPool queries the community pool coins +func (k Querier) CommunityPool(ctx context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error) { + pool, err := k.FeePool.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryCommunityPoolResponse{Pool: pool.CommunityPool}, nil +} diff --git a/x/distribution/keeper/hooks.go b/x/distribution/keeper/hooks.go new file mode 100644 index 0000000..006f35e --- /dev/null +++ b/x/distribution/keeper/hooks.go @@ -0,0 +1,182 @@ +package keeper + +import ( + "context" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// Wrapper struct +type Hooks struct { + k Keeper +} + +var _ stakingtypes.StakingHooks = Hooks{} + +// Create new distribution hooks +func (k Keeper) Hooks() Hooks { + return Hooks{k} +} + +// initialize validator distribution record +func (h Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error { + val, err := h.k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } + return h.k.initializeValidator(ctx, val) +} + +// AfterValidatorRemoved performs clean up after a validator is removed +func (h Hooks) AfterValidatorRemoved(ctx context.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error { + // fetch outstanding + outstanding, err := h.k.GetValidatorOutstandingRewardsCoins(ctx, valAddr) + if err != nil { + return err + } + + // force-withdraw commission + valCommission, err := h.k.GetValidatorAccumulatedCommission(ctx, valAddr) + if err != nil { + return err + } + + commission := valCommission.Commission + + if !commission.IsZero() { + // subtract from outstanding + outstanding = outstanding.Sub(commission) + + // split into integral & remainder + coins, remainder := commission.TruncateDecimal() + + // remainder to community pool + feePool, err := h.k.FeePool.Get(ctx) + if err != nil { + return err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(remainder...) + err = h.k.FeePool.Set(ctx, feePool) + if err != nil { + return err + } + + // add to validator account + if !coins.IsZero() { + accAddr := sdk.AccAddress(valAddr) + withdrawAddr, err := h.k.GetDelegatorWithdrawAddr(ctx, accAddr) + if err != nil { + return err + } + + if err := h.k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, withdrawAddr, coins); err != nil { + return err + } + } + } + + // Add outstanding to community pool + // The validator is removed only after it has no more delegations. + // This operation sends only the remaining dust to the community pool. + feePool, err := h.k.FeePool.Get(ctx) + if err != nil { + return err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(outstanding...) + err = h.k.FeePool.Set(ctx, feePool) + if err != nil { + return err + } + + // delete outstanding + err = h.k.DeleteValidatorOutstandingRewards(ctx, valAddr) + if err != nil { + return err + } + + // remove commission record + err = h.k.DeleteValidatorAccumulatedCommission(ctx, valAddr) + if err != nil { + return err + } + + // clear slashes + h.k.DeleteValidatorSlashEvents(ctx, valAddr) + + // clear historical rewards + h.k.DeleteValidatorHistoricalRewards(ctx, valAddr) + + // clear current rewards + err = h.k.DeleteValidatorCurrentRewards(ctx, valAddr) + if err != nil { + return err + } + + return nil +} + +// increment period +func (h Hooks) BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + val, err := h.k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } + + _, err = h.k.IncrementValidatorPeriod(ctx, val) + return err +} + +// withdraw delegation rewards (which also increments period) +func (h Hooks) BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + val, err := h.k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } + + del, err := h.k.stakingKeeper.Delegation(ctx, delAddr, valAddr) + if err != nil { + return err + } + + if _, err := h.k.withdrawDelegationRewards(ctx, val, del); err != nil { + return err + } + + return nil +} + +// create new delegation period record +func (h Hooks) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + return h.k.initializeDelegation(ctx, valAddr, delAddr) +} + +// record the slash event +func (h Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error { + return h.k.updateValidatorSlashFraction(ctx, valAddr, fraction) +} + +func (h Hooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error { + return nil +} + +func (h Hooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { + return nil +} + +func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { + return nil +} + +func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { + return nil +} + +func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error { + return nil +} diff --git a/x/distribution/keeper/invariants.go b/x/distribution/keeper/invariants.go new file mode 100644 index 0000000..060dfd5 --- /dev/null +++ b/x/distribution/keeper/invariants.go @@ -0,0 +1,192 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// register all distribution invariants +func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { + ir.RegisterRoute(types.ModuleName, "nonnegative-outstanding", + NonNegativeOutstandingInvariant(k)) + ir.RegisterRoute(types.ModuleName, "can-withdraw", + CanWithdrawInvariant(k)) + ir.RegisterRoute(types.ModuleName, "reference-count", + ReferenceCountInvariant(k)) + ir.RegisterRoute(types.ModuleName, "module-account", + ModuleAccountInvariant(k)) +} + +// AllInvariants runs all invariants of the distribution module +func AllInvariants(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + res, stop := CanWithdrawInvariant(k)(ctx) + if stop { + return res, stop + } + res, stop = NonNegativeOutstandingInvariant(k)(ctx) + if stop { + return res, stop + } + res, stop = ReferenceCountInvariant(k)(ctx) + if stop { + return res, stop + } + return ModuleAccountInvariant(k)(ctx) + } +} + +// NonNegativeOutstandingInvariant checks that outstanding unwithdrawn fees are never negative +func NonNegativeOutstandingInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + var msg string + var count int + var outstanding sdk.DecCoins + + k.IterateValidatorOutstandingRewards(ctx, func(addr sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool) { + outstanding = rewards.GetRewards() + if outstanding.IsAnyNegative() { + count++ + msg += fmt.Sprintf("\t%v has negative outstanding coins: %v\n", addr, outstanding) + } + return false + }) + broken := count != 0 + + return sdk.FormatInvariant(types.ModuleName, "nonnegative outstanding", + fmt.Sprintf("found %d validators with negative outstanding rewards\n%s", count, msg)), broken + } +} + +// CanWithdrawInvariant checks that current rewards can be completely withdrawn +func CanWithdrawInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + // cache, we don't want to write changes + ctx, _ = ctx.CacheContext() + + var remaining sdk.DecCoins + + valDelegationAddrs := make(map[string][][]byte) + allDelegations, err := k.stakingKeeper.GetAllSDKDelegations(ctx) + if err != nil { + panic(err) + } + + for _, del := range allDelegations { + delAddr, err := k.authKeeper.AddressCodec().StringToBytes(del.GetDelegatorAddr()) + if err != nil { + panic(err) + } + valAddr := del.GetValidatorAddr() + valDelegationAddrs[valAddr] = append(valDelegationAddrs[valAddr], delAddr) + } + + // iterate over all validators + err = k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err1 := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err1) + } + _, _ = k.WithdrawValidatorCommission(ctx, valBz) + + delegationAddrs, ok := valDelegationAddrs[val.GetOperator()] + if ok { + for _, delAddr := range delegationAddrs { + if _, err := k.WithdrawDelegationRewards(ctx, delAddr, valBz); err != nil { + panic(err) + } + } + } + + var err error + remaining, err = k.GetValidatorOutstandingRewardsCoins(ctx, valBz) + if err != nil { + panic(err) + } + + if len(remaining) > 0 && remaining[0].Amount.IsNegative() { + return true + } + + return false + }) + if err != nil { + panic(err) + } + + broken := len(remaining) > 0 && remaining[0].Amount.IsNegative() + return sdk.FormatInvariant(types.ModuleName, "can withdraw", + fmt.Sprintf("remaining coins: %v\n", remaining)), broken + } +} + +// ReferenceCountInvariant checks that the number of historical rewards records is correct +func ReferenceCountInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + valCount := uint64(0) + err := k.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valCount++ + return false + }) + if err != nil { + panic(err) + } + + dels, err := k.stakingKeeper.GetAllSDKDelegations(ctx) + if err != nil { + panic(err) + } + + slashCount := uint64(0) + k.IterateValidatorSlashEvents(ctx, + func(_ sdk.ValAddress, _ uint64, _ types.ValidatorSlashEvent) (stop bool) { + slashCount++ + return false + }) + + // one record per validator (last tracked period), one record per + // delegation (previous period), one record per slash (previous period) + expected := valCount + uint64(len(dels)) + slashCount + count := k.GetValidatorHistoricalReferenceCount(ctx) + broken := count != expected + + return sdk.FormatInvariant(types.ModuleName, "reference count", + fmt.Sprintf("expected historical reference count: %d = %v validators + %v delegations + %v slashes\n"+ + "total validator historical reference count: %d\n", + expected, valCount, len(dels), slashCount, count)), broken + } +} + +// ModuleAccountInvariant checks that the coins held by the distr ModuleAccount +// is consistent with the sum of validator outstanding rewards +func ModuleAccountInvariant(k Keeper) sdk.Invariant { + return func(ctx sdk.Context) (string, bool) { + var expectedCoins sdk.DecCoins + k.IterateValidatorOutstandingRewards(ctx, func(_ sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool) { + expectedCoins = expectedCoins.Add(rewards.Rewards...) + return false + }) + + communityPool, err := k.FeePool.Get(ctx) + if err != nil { + panic(err) + } + + expectedInt, _ := expectedCoins.Add(communityPool.CommunityPool...).TruncateDecimal() + + macc := k.GetDistributionAccount(ctx) + balances := k.bankKeeper.GetAllBalances(ctx, macc.GetAddress()) + + broken := !balances.Equal(expectedInt) + return sdk.FormatInvariant( + types.ModuleName, "ModuleAccount coins", + fmt.Sprintf("\texpected ModuleAccount coins: %s\n"+ + "\tdistribution ModuleAccount coins: %s\n", + expectedInt, balances, + ), + ), broken + } +} diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go new file mode 100644 index 0000000..7bea201 --- /dev/null +++ b/x/distribution/keeper/keeper.go @@ -0,0 +1,218 @@ +package keeper + +import ( + "context" + "fmt" + + "cosmossdk.io/collections" + "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// Keeper of the distribution store +type Keeper struct { + storeService store.KVStoreService + cdc codec.BinaryCodec + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper + stakingKeeper types.StakingKeeper + // the address capable of executing a MsgUpdateParams message. Typically, this + // should be the x/gov module account. + authority string + + Schema collections.Schema + Params collections.Item[types.Params] + FeePool collections.Item[types.FeePool] + + feeCollectorName string // name of the FeeCollector ModuleAccount +} + +// NewKeeper creates a new distribution Keeper instance +func NewKeeper( + cdc codec.BinaryCodec, storeService store.KVStoreService, + ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, + feeCollectorName, authority string, +) Keeper { + // ensure distribution module account is set + if addr := ak.GetModuleAddress(types.ModuleName); addr == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } + + sb := collections.NewSchemaBuilder(storeService) + k := Keeper{ + storeService: storeService, + cdc: cdc, + authKeeper: ak, + bankKeeper: bk, + stakingKeeper: sk, + feeCollectorName: feeCollectorName, + authority: authority, + Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), + FeePool: collections.NewItem(sb, types.FeePoolKey, "fee_pool", codec.CollValue[types.FeePool](cdc)), + } + + schema, err := sb.Build() + if err != nil { + panic(err) + } + k.Schema = schema + return k +} + +// GetAuthority returns the x/distribution module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With(log.ModuleKey, "x/"+types.ModuleName) +} + +// SetWithdrawAddr sets a new address that will receive the rewards upon withdrawal +func (k Keeper) SetWithdrawAddr(ctx context.Context, delegatorAddr, withdrawAddr sdk.AccAddress) error { + if k.bankKeeper.BlockedAddr(withdrawAddr) { + return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive external funds", withdrawAddr) + } + + withdrawAddrEnabled, err := k.GetWithdrawAddrEnabled(ctx) + if err != nil { + return err + } + + if !withdrawAddrEnabled { + return types.ErrSetWithdrawAddrDisabled + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeSetWithdrawAddress, + sdk.NewAttribute(types.AttributeKeyWithdrawAddress, withdrawAddr.String()), + ), + ) + + k.SetDelegatorWithdrawAddr(ctx, delegatorAddr, withdrawAddr) + return nil +} + +// withdraw rewards from a delegation +func (k Keeper) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) { + val, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return nil, err + } + + if val == nil { + return nil, types.ErrNoValidatorDistInfo + } + + del, err := k.stakingKeeper.Delegation(ctx, delAddr, valAddr) + if err != nil { + return nil, err + } + + if del == nil { + return nil, types.ErrEmptyDelegationDistInfo + } + + // withdraw rewards + rewards, err := k.withdrawDelegationRewards(ctx, val, del) + if err != nil { + return nil, err + } + + // reinitialize the delegation + err = k.initializeDelegation(ctx, valAddr, delAddr) + if err != nil { + return nil, err + } + return rewards, nil +} + +// withdraw validator commission +func (k Keeper) WithdrawValidatorCommission(ctx context.Context, valAddr sdk.ValAddress) (sdk.Coins, error) { + // fetch validator accumulated commission + accumCommission, err := k.GetValidatorAccumulatedCommission(ctx, valAddr) + if err != nil { + return nil, err + } + + if accumCommission.Commission.IsZero() { + return nil, types.ErrNoValidatorCommission + } + + commission, remainder := accumCommission.Commission.TruncateDecimal() + k.SetValidatorAccumulatedCommission(ctx, valAddr, types.ValidatorAccumulatedCommission{Commission: remainder}) // leave remainder to withdraw later + + // update outstanding + outstanding, err := k.GetValidatorOutstandingRewards(ctx, valAddr) + if err != nil { + return nil, err + } + + err = k.SetValidatorOutstandingRewards(ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: outstanding.Rewards.Sub(sdk.NewDecCoinsFromCoins(commission...))}) + if err != nil { + return nil, err + } + + if !commission.IsZero() { + accAddr := sdk.AccAddress(valAddr) + withdrawAddr, err := k.GetDelegatorWithdrawAddr(ctx, accAddr) + if err != nil { + return nil, err + } + + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, withdrawAddr, commission) + if err != nil { + return nil, err + } + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeWithdrawCommission, + sdk.NewAttribute(sdk.AttributeKeyAmount, commission.String()), + ), + ) + + return commission, nil +} + +// GetTotalRewards returns the total amount of fee distribution rewards held in the store +func (k Keeper) GetTotalRewards(ctx context.Context) (totalRewards sdk.DecCoins) { + k.IterateValidatorOutstandingRewards(ctx, + func(_ sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool) { + totalRewards = totalRewards.Add(rewards.Rewards...) + return false + }, + ) + + return totalRewards +} + +// FundCommunityPool allows an account to directly fund the community fund pool. +// The amount is first added to the distribution module account and then directly +// added to the pool. An error is returned if the amount cannot be sent to the +// module account. +func (k Keeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error { + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, amount); err != nil { + return err + } + + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amount...)...) + return k.FeePool.Set(ctx, feePool) +} diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go new file mode 100644 index 0000000..f438969 --- /dev/null +++ b/x/distribution/keeper/keeper_test.go @@ -0,0 +1,211 @@ +package keeper_test + +import ( + "testing" + "time" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +func TestSetWithdrawAddr(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(types.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + addrs := simtestutil.CreateIncrementalAccounts(2) + + delegatorAddr := addrs[0] + withdrawAddr := addrs[1] + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + + bankKeeper.EXPECT().BlockedAddr(withdrawAddr).Return(false).AnyTimes() + bankKeeper.EXPECT().BlockedAddr(distrAcc.GetAddress()).Return(true).AnyTimes() + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + params := types.DefaultParams() + params.WithdrawAddrEnabled = false + require.NoError(t, distrKeeper.Params.Set(ctx, params)) + + err := distrKeeper.SetWithdrawAddr(ctx, delegatorAddr, withdrawAddr) + require.NotNil(t, err) + + params.WithdrawAddrEnabled = true + require.NoError(t, distrKeeper.Params.Set(ctx, params)) + + err = distrKeeper.SetWithdrawAddr(ctx, delegatorAddr, withdrawAddr) + require.Nil(t, err) + + require.Error(t, distrKeeper.SetWithdrawAddr(ctx, delegatorAddr, distrAcc.GetAddress())) +} + +func TestWithdrawValidatorCommission(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(types.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + addrs := simtestutil.CreateIncrementalAccounts(1) + + valAddr := sdk.ValAddress(addrs[0]) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + + valCommission := sdk.DecCoins{ + sdk.NewDecCoinFromDec("mytoken", math.LegacyNewDec(5).Quo(math.LegacyNewDec(4))), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(3).Quo(math.LegacyNewDec(2))), + } + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // set outstanding rewards + require.NoError(t, distrKeeper.SetValidatorOutstandingRewards(ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: valCommission})) + + // set commission + require.NoError(t, distrKeeper.SetValidatorAccumulatedCommission(ctx, valAddr, types.ValidatorAccumulatedCommission{Commission: valCommission})) + + // withdraw commission + coins := sdk.NewCoins(sdk.NewCoin("mytoken", math.NewInt(1)), sdk.NewCoin("stake", math.NewInt(1))) + // if SendCoinsFromModuleToAccount is called, we know that the withdraw was successful + bankKeeper.EXPECT().SendCoinsFromModuleToAccount(gomock.Any(), "distribution", addrs[0], coins).Return(nil) + + _, err := distrKeeper.WithdrawValidatorCommission(ctx, valAddr) + require.NoError(t, err) + + // check remainder + remainderValCommission, err := distrKeeper.GetValidatorAccumulatedCommission(ctx, valAddr) + require.NoError(t, err) + remainder := remainderValCommission.Commission + require.Equal(t, sdk.DecCoins{ + sdk.NewDecCoinFromDec("mytoken", math.LegacyNewDec(1).Quo(math.LegacyNewDec(4))), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(1).Quo(math.LegacyNewDec(2))), + }, remainder) +} + +func TestGetTotalRewards(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(types.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + addrs := simtestutil.CreateIncrementalAccounts(2) + + valAddr0 := sdk.ValAddress(addrs[0]) + valAddr1 := sdk.ValAddress(addrs[1]) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + valCommission := sdk.DecCoins{ + sdk.NewDecCoinFromDec("mytoken", math.LegacyNewDec(5).Quo(math.LegacyNewDec(4))), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(3).Quo(math.LegacyNewDec(2))), + } + + require.NoError(t, distrKeeper.SetValidatorOutstandingRewards(ctx, valAddr0, types.ValidatorOutstandingRewards{Rewards: valCommission})) + require.NoError(t, distrKeeper.SetValidatorOutstandingRewards(ctx, valAddr1, types.ValidatorOutstandingRewards{Rewards: valCommission})) + + expectedRewards := valCommission.MulDec(math.LegacyNewDec(2)) + totalRewards := distrKeeper.GetTotalRewards(ctx) + + require.Equal(t, expectedRewards, totalRewards) +} + +func TestFundCommunityPool(t *testing.T) { + ctrl := gomock.NewController(t) + key := storetypes.NewKVStoreKey(types.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Now()}) + addrs := simtestutil.CreateIncrementalAccounts(1) + + bankKeeper := distrtestutil.NewMockBankKeeper(ctrl) + stakingKeeper := distrtestutil.NewMockStakingKeeper(ctrl) + accountKeeper := distrtestutil.NewMockAccountKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("distribution").Return(distrAcc.GetAddress()) + + distrKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + accountKeeper, + bankKeeper, + stakingKeeper, + "fee_collector", + authtypes.NewModuleAddress("gov").String(), + ) + + // reset fee pool + require.NoError(t, distrKeeper.FeePool.Set(ctx, types.InitialFeePool())) + + initPool, err := distrKeeper.FeePool.Get(ctx) + require.NoError(t, err) + require.Empty(t, initPool.CommunityPool) + + amount := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) + bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), addrs[0], "distribution", amount).Return(nil) + err = distrKeeper.FundCommunityPool(ctx, amount, addrs[0]) + require.NoError(t, err) + + feePool, err := distrKeeper.FeePool.Get(ctx) + require.NoError(t, err) + require.Equal(t, initPool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amount...)...), feePool.CommunityPool) +} diff --git a/x/distribution/keeper/migrations.go b/x/distribution/keeper/migrations.go new file mode 100644 index 0000000..bfcf880 --- /dev/null +++ b/x/distribution/keeper/migrations.go @@ -0,0 +1,32 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/exported" + v2 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v2" + v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper Keeper + legacySubspace exported.Subspace +} + +// NewMigrator returns a new Migrator. +func NewMigrator(keeper Keeper, legacySubspace exported.Subspace) Migrator { + return Migrator{keeper: keeper, legacySubspace: legacySubspace} +} + +// Migrate1to2 migrates from version 1 to 2. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + return v2.MigrateStore(ctx, m.keeper.storeService) +} + +// Migrate2to3 migrates the x/distribution module state from the consensus +// version 2 to version 3. Specifically, it takes the parameters that are currently stored +// and managed by the x/params module and stores them directly into the x/distribution +// module state. +func (m Migrator) Migrate2to3(ctx sdk.Context) error { + return v3.MigrateStore(ctx, m.keeper.storeService, m.legacySubspace, m.keeper.cdc) +} diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go new file mode 100644 index 0000000..1f4c64e --- /dev/null +++ b/x/distribution/keeper/msg_server.go @@ -0,0 +1,236 @@ +package keeper + +import ( + "context" + + "github.com/hashicorp/go-metrics" + + "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" +) + +type msgServer struct { + Keeper +} + +var _ types.MsgServer = msgServer{} + +// NewMsgServerImpl returns an implementation of the distribution MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +func (k msgServer) SetWithdrawAddress(ctx context.Context, msg *types.MsgSetWithdrawAddress) (*types.MsgSetWithdrawAddressResponse, error) { + delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(msg.DelegatorAddress) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) + } + + withdrawAddress, err := k.authKeeper.AddressCodec().StringToBytes(msg.WithdrawAddress) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid withdraw address: %s", err) + } + + err = k.SetWithdrawAddr(ctx, delegatorAddress, withdrawAddress) + if err != nil { + return nil, err + } + + return &types.MsgSetWithdrawAddressResponse{}, nil +} + +func (k msgServer) WithdrawDelegatorReward(ctx context.Context, msg *types.MsgWithdrawDelegatorReward) (*types.MsgWithdrawDelegatorRewardResponse, error) { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) + } + + delegatorAddress, err := k.authKeeper.AddressCodec().StringToBytes(msg.DelegatorAddress) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) + } + + amount, err := k.WithdrawDelegationRewards(ctx, delegatorAddress, valAddr) + if err != nil { + return nil, err + } + + defer func() { + for _, a := range amount { + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "withdraw_reward"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } + } + }() + + return &types.MsgWithdrawDelegatorRewardResponse{Amount: amount}, nil +} + +func (k msgServer) WithdrawValidatorCommission(ctx context.Context, msg *types.MsgWithdrawValidatorCommission) (*types.MsgWithdrawValidatorCommissionResponse, error) { + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) + } + + amount, err := k.Keeper.WithdrawValidatorCommission(ctx, valAddr) + if err != nil { + return nil, err + } + + defer func() { + for _, a := range amount { + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "withdraw_commission"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } + } + }() + + return &types.MsgWithdrawValidatorCommissionResponse{Amount: amount}, nil +} + +func (k msgServer) FundCommunityPool(ctx context.Context, msg *types.MsgFundCommunityPool) (*types.MsgFundCommunityPoolResponse, error) { + depositor, err := k.authKeeper.AddressCodec().StringToBytes(msg.Depositor) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid depositor address: %s", err) + } + + if err := validateAmount(msg.Amount); err != nil { + return nil, err + } + + if err := k.Keeper.FundCommunityPool(ctx, msg.Amount, depositor); err != nil { + return nil, err + } + + return &types.MsgFundCommunityPoolResponse{}, nil +} + +func (k msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if err := k.validateAuthority(msg.Authority); err != nil { + return nil, err + } + + if (!msg.Params.BaseProposerReward.IsNil() && !msg.Params.BaseProposerReward.IsZero()) || //nolint:staticcheck // deprecated but kept for backwards compatibility + (!msg.Params.BonusProposerReward.IsNil() && !msg.Params.BonusProposerReward.IsZero()) { //nolint:staticcheck // deprecated but kept for backwards compatibility + return nil, errors.Wrapf(sdkerrors.ErrInvalidRequest, "cannot update base or bonus proposer reward because these are deprecated fields") + } + + if err := msg.Params.ValidateBasic(); err != nil { + return nil, err + } + + if err := k.Params.Set(ctx, msg.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} + +func (k msgServer) CommunityPoolSpend(ctx context.Context, msg *types.MsgCommunityPoolSpend) (*types.MsgCommunityPoolSpendResponse, error) { + if err := k.validateAuthority(msg.Authority); err != nil { + return nil, err + } + + if err := validateAmount(msg.Amount); err != nil { + return nil, err + } + + recipient, err := k.authKeeper.AddressCodec().StringToBytes(msg.Recipient) + if err != nil { + return nil, err + } + + if k.bankKeeper.BlockedAddr(recipient) { + return nil, errors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive external funds", msg.Recipient) + } + + if err := k.DistributeFromFeePool(ctx, msg.Amount, recipient); err != nil { + return nil, err + } + + logger := k.Logger(ctx) + logger.Info("transferred from the community pool to recipient", "amount", msg.Amount.String(), "recipient", msg.Recipient) + + return &types.MsgCommunityPoolSpendResponse{}, nil +} + +func (k msgServer) DepositValidatorRewardsPool(ctx context.Context, msg *types.MsgDepositValidatorRewardsPool) (*types.MsgDepositValidatorRewardsPoolResponse, error) { + depositor, err := k.authKeeper.AddressCodec().StringToBytes(msg.Depositor) + if err != nil { + return nil, err + } + + // deposit coins from depositor's account to the distribution module + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, depositor, types.ModuleName, msg.Amount); err != nil { + return nil, err + } + + valAddr, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) + if err != nil { + return nil, err + } + + validator, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return nil, err + } + + if validator == nil { + return nil, errors.Wrapf(types.ErrNoValidatorExists, msg.ValidatorAddress) + } + + // Allocate tokens from the distribution module to the validator, which are + // then distributed to the validator's delegators. + reward := sdk.NewDecCoinsFromCoins(msg.Amount...) + if err = k.AllocateTokensToValidator(ctx, validator, reward); err != nil { + return nil, err + } + + logger := k.Logger(ctx) + logger.Info( + "transferred from rewards to validator rewards pool", + "depositor", msg.Depositor, + "amount", msg.Amount.String(), + "validator", msg.ValidatorAddress, + ) + + return &types.MsgDepositValidatorRewardsPoolResponse{}, nil +} + +func (k *Keeper) validateAuthority(authority string) error { + if _, err := k.authKeeper.AddressCodec().StringToBytes(authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) + } + + if k.authority != authority { + return errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, authority) + } + + return nil +} + +func validateAmount(amount sdk.Coins) error { + if amount == nil { + return errors.Wrap(sdkerrors.ErrInvalidCoins, "amount cannot be nil") + } + + if err := amount.Validate(); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidCoins, amount.String()) + } + + return nil +} diff --git a/x/distribution/keeper/params.go b/x/distribution/keeper/params.go new file mode 100644 index 0000000..60b352b --- /dev/null +++ b/x/distribution/keeper/params.go @@ -0,0 +1,28 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/math" +) + +// GetCommunityTax returns the current distribution community tax. +func (k Keeper) GetCommunityTax(ctx context.Context) (math.LegacyDec, error) { + params, err := k.Params.Get(ctx) + if err != nil { + return math.LegacyDec{}, err + } + + return params.CommunityTax, nil +} + +// GetWithdrawAddrEnabled returns the current distribution withdraw address +// enabled parameter. +func (k Keeper) GetWithdrawAddrEnabled(ctx context.Context) (enabled bool, err error) { + params, err := k.Params.Get(ctx) + if err != nil { + return false, err + } + + return params.WithdrawAddrEnabled, nil +} diff --git a/x/distribution/keeper/store.go b/x/distribution/keeper/store.go new file mode 100644 index 0000000..6ba1279 --- /dev/null +++ b/x/distribution/keeper/store.go @@ -0,0 +1,439 @@ +package keeper + +import ( + "context" + "errors" + + gogotypes "github.com/cosmos/gogoproto/types" + + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// get the delegator withdraw address, defaulting to the delegator address +func (k Keeper) GetDelegatorWithdrawAddr(ctx context.Context, delAddr sdk.AccAddress) (sdk.AccAddress, error) { + store := k.storeService.OpenKVStore(ctx) + b, err := store.Get(types.GetDelegatorWithdrawAddrKey(delAddr)) + if b == nil { + return delAddr, err + } + return sdk.AccAddress(b), nil +} + +// set the delegator withdraw address +func (k Keeper) SetDelegatorWithdrawAddr(ctx context.Context, delAddr, withdrawAddr sdk.AccAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Set(types.GetDelegatorWithdrawAddrKey(delAddr), withdrawAddr.Bytes()) +} + +// delete a delegator withdraw addr +func (k Keeper) DeleteDelegatorWithdrawAddr(ctx context.Context, delAddr, withdrawAddr sdk.AccAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetDelegatorWithdrawAddrKey(delAddr)) +} + +// iterate over delegator withdraw addrs +func (k Keeper) IterateDelegatorWithdrawAddrs(ctx context.Context, handler func(del, addr sdk.AccAddress) (stop bool)) { + store := k.storeService.OpenKVStore(ctx) + iter := storetypes.KVStorePrefixIterator(runtime.KVStoreAdapter(store), types.DelegatorWithdrawAddrPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + addr := sdk.AccAddress(iter.Value()) + del := types.GetDelegatorWithdrawInfoAddress(iter.Key()) + if handler(del, addr) { + break + } + } +} + +// GetPreviousProposerConsAddr returns the proposer consensus address for the +// current block. +func (k Keeper) GetPreviousProposerConsAddr(ctx context.Context) (sdk.ConsAddress, error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.ProposerKey) + if err != nil { + return nil, err + } + + if bz == nil { + return nil, errors.New("previous proposer not set") + } + + addrValue := gogotypes.BytesValue{} + err = k.cdc.Unmarshal(bz, &addrValue) + if err != nil { + return nil, err + } + + return addrValue.GetValue(), nil +} + +// set the proposer public key for this block +func (k Keeper) SetPreviousProposerConsAddr(ctx context.Context, consAddr sdk.ConsAddress) error { + store := k.storeService.OpenKVStore(ctx) + bz := k.cdc.MustMarshal(&gogotypes.BytesValue{Value: consAddr}) + return store.Set(types.ProposerKey, bz) +} + +// get the starting info associated with a delegator +func (k Keeper) GetDelegatorStartingInfo(ctx context.Context, val sdk.ValAddress, del sdk.AccAddress) (period types.DelegatorStartingInfo, err error) { + store := k.storeService.OpenKVStore(ctx) + b, err := store.Get(types.GetDelegatorStartingInfoKey(val, del)) + if err != nil { + return + } + + err = k.cdc.Unmarshal(b, &period) + return period, err +} + +// set the starting info associated with a delegator +func (k Keeper) SetDelegatorStartingInfo(ctx context.Context, val sdk.ValAddress, del sdk.AccAddress, period types.DelegatorStartingInfo) error { + store := k.storeService.OpenKVStore(ctx) + b, err := k.cdc.Marshal(&period) + if err != nil { + return err + } + + return store.Set(types.GetDelegatorStartingInfoKey(val, del), b) +} + +// check existence of the starting info associated with a delegator +func (k Keeper) HasDelegatorStartingInfo(ctx context.Context, val sdk.ValAddress, del sdk.AccAddress) (bool, error) { + store := k.storeService.OpenKVStore(ctx) + return store.Has(types.GetDelegatorStartingInfoKey(val, del)) +} + +// delete the starting info associated with a delegator +func (k Keeper) DeleteDelegatorStartingInfo(ctx context.Context, val sdk.ValAddress, del sdk.AccAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetDelegatorStartingInfoKey(val, del)) +} + +// iterate over delegator starting infos +func (k Keeper) IterateDelegatorStartingInfos(ctx context.Context, handler func(val sdk.ValAddress, del sdk.AccAddress, info types.DelegatorStartingInfo) (stop bool)) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.DelegatorStartingInfoPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var info types.DelegatorStartingInfo + k.cdc.MustUnmarshal(iter.Value(), &info) + val, del := types.GetDelegatorStartingInfoAddresses(iter.Key()) + if handler(val, del, info) { + break + } + } +} + +// get historical rewards for a particular period +func (k Keeper) GetValidatorHistoricalRewards(ctx context.Context, val sdk.ValAddress, period uint64) (rewards types.ValidatorHistoricalRewards, err error) { + store := k.storeService.OpenKVStore(ctx) + b, err := store.Get(types.GetValidatorHistoricalRewardsKey(val, period)) + if err != nil { + return + } + + err = k.cdc.Unmarshal(b, &rewards) + return +} + +// set historical rewards for a particular period +func (k Keeper) SetValidatorHistoricalRewards(ctx context.Context, val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards) error { + store := k.storeService.OpenKVStore(ctx) + b, err := k.cdc.Marshal(&rewards) + if err != nil { + return err + } + + return store.Set(types.GetValidatorHistoricalRewardsKey(val, period), b) +} + +// iterate over historical rewards +func (k Keeper) IterateValidatorHistoricalRewards(ctx context.Context, handler func(val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards) (stop bool)) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorHistoricalRewardsPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var rewards types.ValidatorHistoricalRewards + k.cdc.MustUnmarshal(iter.Value(), &rewards) + addr, period := types.GetValidatorHistoricalRewardsAddressPeriod(iter.Key()) + if handler(addr, period, rewards) { + break + } + } +} + +// delete a historical reward +func (k Keeper) DeleteValidatorHistoricalReward(ctx context.Context, val sdk.ValAddress, period uint64) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetValidatorHistoricalRewardsKey(val, period)) +} + +// delete historical rewards for a validator +func (k Keeper) DeleteValidatorHistoricalRewards(ctx context.Context, val sdk.ValAddress) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.GetValidatorHistoricalRewardsPrefix(val)) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + store.Delete(iter.Key()) + } +} + +// delete all historical rewards +func (k Keeper) DeleteAllValidatorHistoricalRewards(ctx context.Context) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorHistoricalRewardsPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + store.Delete(iter.Key()) + } +} + +// historical reference count (used for testcases) +func (k Keeper) GetValidatorHistoricalReferenceCount(ctx context.Context) (count uint64) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorHistoricalRewardsPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var rewards types.ValidatorHistoricalRewards + k.cdc.MustUnmarshal(iter.Value(), &rewards) + count += uint64(rewards.ReferenceCount) + } + return +} + +// get current rewards for a validator +func (k Keeper) GetValidatorCurrentRewards(ctx context.Context, val sdk.ValAddress) (rewards types.ValidatorCurrentRewards, err error) { + store := k.storeService.OpenKVStore(ctx) + b, err := store.Get(types.GetValidatorCurrentRewardsKey(val)) + if err != nil { + return + } + + err = k.cdc.Unmarshal(b, &rewards) + return +} + +// set current rewards for a validator +func (k Keeper) SetValidatorCurrentRewards(ctx context.Context, val sdk.ValAddress, rewards types.ValidatorCurrentRewards) error { + store := k.storeService.OpenKVStore(ctx) + b, err := k.cdc.Marshal(&rewards) + if err != nil { + return err + } + + return store.Set(types.GetValidatorCurrentRewardsKey(val), b) +} + +// delete current rewards for a validator +func (k Keeper) DeleteValidatorCurrentRewards(ctx context.Context, val sdk.ValAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetValidatorCurrentRewardsKey(val)) +} + +// iterate over current rewards +func (k Keeper) IterateValidatorCurrentRewards(ctx context.Context, handler func(val sdk.ValAddress, rewards types.ValidatorCurrentRewards) (stop bool)) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorCurrentRewardsPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var rewards types.ValidatorCurrentRewards + k.cdc.MustUnmarshal(iter.Value(), &rewards) + addr := types.GetValidatorCurrentRewardsAddress(iter.Key()) + if handler(addr, rewards) { + break + } + } +} + +// get accumulated commission for a validator +func (k Keeper) GetValidatorAccumulatedCommission(ctx context.Context, val sdk.ValAddress) (commission types.ValidatorAccumulatedCommission, err error) { + store := k.storeService.OpenKVStore(ctx) + b, err := store.Get(types.GetValidatorAccumulatedCommissionKey(val)) + if err != nil { + return types.ValidatorAccumulatedCommission{}, err + } + + if b == nil { + return types.ValidatorAccumulatedCommission{}, nil + } + + err = k.cdc.Unmarshal(b, &commission) + if err != nil { + return types.ValidatorAccumulatedCommission{}, err + } + return +} + +// set accumulated commission for a validator +func (k Keeper) SetValidatorAccumulatedCommission(ctx context.Context, val sdk.ValAddress, commission types.ValidatorAccumulatedCommission) error { + var ( + bz []byte + err error + ) + + store := k.storeService.OpenKVStore(ctx) + if commission.Commission.IsZero() { + bz, err = k.cdc.Marshal(&types.ValidatorAccumulatedCommission{}) + } else { + bz, err = k.cdc.Marshal(&commission) + } + + if err != nil { + return err + } + + return store.Set(types.GetValidatorAccumulatedCommissionKey(val), bz) +} + +// delete accumulated commission for a validator +func (k Keeper) DeleteValidatorAccumulatedCommission(ctx context.Context, val sdk.ValAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetValidatorAccumulatedCommissionKey(val)) +} + +// iterate over accumulated commissions +func (k Keeper) IterateValidatorAccumulatedCommissions(ctx context.Context, handler func(val sdk.ValAddress, commission types.ValidatorAccumulatedCommission) (stop bool)) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorAccumulatedCommissionPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var commission types.ValidatorAccumulatedCommission + k.cdc.MustUnmarshal(iter.Value(), &commission) + addr := types.GetValidatorAccumulatedCommissionAddress(iter.Key()) + if handler(addr, commission) { + break + } + } +} + +// get validator outstanding rewards +func (k Keeper) GetValidatorOutstandingRewards(ctx context.Context, val sdk.ValAddress) (rewards types.ValidatorOutstandingRewards, err error) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.GetValidatorOutstandingRewardsKey(val)) + if err != nil { + return + } + err = k.cdc.Unmarshal(bz, &rewards) + return +} + +// set validator outstanding rewards +func (k Keeper) SetValidatorOutstandingRewards(ctx context.Context, val sdk.ValAddress, rewards types.ValidatorOutstandingRewards) error { + store := k.storeService.OpenKVStore(ctx) + b, err := k.cdc.Marshal(&rewards) + if err != nil { + return err + } + return store.Set(types.GetValidatorOutstandingRewardsKey(val), b) +} + +// delete validator outstanding rewards +func (k Keeper) DeleteValidatorOutstandingRewards(ctx context.Context, val sdk.ValAddress) error { + store := k.storeService.OpenKVStore(ctx) + return store.Delete(types.GetValidatorOutstandingRewardsKey(val)) +} + +// iterate validator outstanding rewards +func (k Keeper) IterateValidatorOutstandingRewards(ctx context.Context, handler func(val sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool)) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorOutstandingRewardsPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + rewards := types.ValidatorOutstandingRewards{} + k.cdc.MustUnmarshal(iter.Value(), &rewards) + addr := types.GetValidatorOutstandingRewardsAddress(iter.Key()) + if handler(addr, rewards) { + break + } + } +} + +// get slash event for height +func (k Keeper) GetValidatorSlashEvent(ctx context.Context, val sdk.ValAddress, height, period uint64) (event types.ValidatorSlashEvent, found bool, err error) { + store := k.storeService.OpenKVStore(ctx) + b, err := store.Get(types.GetValidatorSlashEventKey(val, height, period)) + if err != nil { + return types.ValidatorSlashEvent{}, false, err + } + + if b == nil { + return types.ValidatorSlashEvent{}, false, nil + } + + err = k.cdc.Unmarshal(b, &event) + if err != nil { + return types.ValidatorSlashEvent{}, false, err + } + + return event, true, nil +} + +// set slash event for height +func (k Keeper) SetValidatorSlashEvent(ctx context.Context, val sdk.ValAddress, height, period uint64, event types.ValidatorSlashEvent) error { + store := k.storeService.OpenKVStore(ctx) + b, err := k.cdc.Marshal(&event) + if err != nil { + return err + } + + return store.Set(types.GetValidatorSlashEventKey(val, height, period), b) +} + +// iterate over slash events between heights, inclusive +func (k Keeper) IterateValidatorSlashEventsBetween(ctx context.Context, val sdk.ValAddress, startingHeight, endingHeight uint64, + handler func(height uint64, event types.ValidatorSlashEvent) (stop bool), +) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := store.Iterator( + types.GetValidatorSlashEventKeyPrefix(val, startingHeight), + types.GetValidatorSlashEventKeyPrefix(val, endingHeight+1), + ) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var event types.ValidatorSlashEvent + k.cdc.MustUnmarshal(iter.Value(), &event) + _, height := types.GetValidatorSlashEventAddressHeight(iter.Key()) + if handler(height, event) { + break + } + } +} + +// iterate over all slash events +func (k Keeper) IterateValidatorSlashEvents(ctx context.Context, handler func(val sdk.ValAddress, height uint64, event types.ValidatorSlashEvent) (stop bool)) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorSlashEventPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + var event types.ValidatorSlashEvent + k.cdc.MustUnmarshal(iter.Value(), &event) + val, height := types.GetValidatorSlashEventAddressHeight(iter.Key()) + if handler(val, height, event) { + break + } + } +} + +// delete slash events for a particular validator +func (k Keeper) DeleteValidatorSlashEvents(ctx context.Context, val sdk.ValAddress) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.GetValidatorSlashEventPrefix(val)) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + store.Delete(iter.Key()) + } +} + +// delete all slash events +func (k Keeper) DeleteAllValidatorSlashEvents(ctx context.Context) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iter := storetypes.KVStorePrefixIterator(store, types.ValidatorSlashEventPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + store.Delete(iter.Key()) + } +} diff --git a/x/distribution/keeper/validator.go b/x/distribution/keeper/validator.go new file mode 100644 index 0000000..9b830e5 --- /dev/null +++ b/x/distribution/keeper/validator.go @@ -0,0 +1,174 @@ +package keeper + +import ( + "context" + "fmt" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// initialize rewards for a new validator +func (k Keeper) initializeValidator(ctx context.Context, val stakingtypes.ValidatorI) error { + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return err + } + // set initial historical rewards (period 0) with reference count of 1 + err = k.SetValidatorHistoricalRewards(ctx, valBz, 0, types.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) + if err != nil { + return err + } + + // set current rewards (starting at period 1) + err = k.SetValidatorCurrentRewards(ctx, valBz, types.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) + if err != nil { + return err + } + + // set accumulated commission + err = k.SetValidatorAccumulatedCommission(ctx, valBz, types.InitialValidatorAccumulatedCommission()) + if err != nil { + return err + } + + // set outstanding rewards + err = k.SetValidatorOutstandingRewards(ctx, valBz, types.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + return err +} + +// increment validator period, returning the period just ended +func (k Keeper) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.ValidatorI) (uint64, error) { + valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + return 0, err + } + + // fetch current rewards + rewards, err := k.GetValidatorCurrentRewards(ctx, valBz) + if err != nil { + return 0, err + } + + // calculate current ratio + var current sdk.DecCoins + if val.GetTokens().IsZero() { + + // can't calculate ratio for zero-token validators + // ergo we instead add to the community pool + feePool, err := k.FeePool.Get(ctx) + if err != nil { + return 0, err + } + + outstanding, err := k.GetValidatorOutstandingRewards(ctx, valBz) + if err != nil { + return 0, err + } + + feePool.CommunityPool = feePool.CommunityPool.Add(rewards.Rewards...) + outstanding.Rewards = outstanding.GetRewards().Sub(rewards.Rewards) + err = k.FeePool.Set(ctx, feePool) + if err != nil { + return 0, err + } + + err = k.SetValidatorOutstandingRewards(ctx, valBz, outstanding) + if err != nil { + return 0, err + } + + current = sdk.DecCoins{} + } else { + // note: necessary to truncate so we don't allow withdrawing more rewards than owed + current = rewards.Rewards.QuoDecTruncate(math.LegacyNewDecFromInt(val.GetTokens())) + } + + // fetch historical rewards for last period + historical, err := k.GetValidatorHistoricalRewards(ctx, valBz, rewards.Period-1) + if err != nil { + return 0, err + } + + cumRewardRatio := historical.CumulativeRewardRatio + + // decrement reference count + err = k.decrementReferenceCount(ctx, valBz, rewards.Period-1) + if err != nil { + return 0, err + } + + // set new historical rewards with reference count of 1 + err = k.SetValidatorHistoricalRewards(ctx, valBz, rewards.Period, types.NewValidatorHistoricalRewards(cumRewardRatio.Add(current...), 1)) + if err != nil { + return 0, err + } + + // set current rewards, incrementing period by 1 + err = k.SetValidatorCurrentRewards(ctx, valBz, types.NewValidatorCurrentRewards(sdk.DecCoins{}, rewards.Period+1)) + if err != nil { + return 0, err + } + + return rewards.Period, nil +} + +// increment the reference count for a historical rewards value +func (k Keeper) incrementReferenceCount(ctx context.Context, valAddr sdk.ValAddress, period uint64) error { + historical, err := k.GetValidatorHistoricalRewards(ctx, valAddr, period) + if err != nil { + return err + } + if historical.ReferenceCount > 2 { + panic("reference count should never exceed 2") + } + historical.ReferenceCount++ + return k.SetValidatorHistoricalRewards(ctx, valAddr, period, historical) +} + +// decrement the reference count for a historical rewards value, and delete if zero references remain +func (k Keeper) decrementReferenceCount(ctx context.Context, valAddr sdk.ValAddress, period uint64) error { + historical, err := k.GetValidatorHistoricalRewards(ctx, valAddr, period) + if err != nil { + return err + } + + if historical.ReferenceCount == 0 { + panic("cannot set negative reference count") + } + historical.ReferenceCount-- + if historical.ReferenceCount == 0 { + return k.DeleteValidatorHistoricalReward(ctx, valAddr, period) + } + + return k.SetValidatorHistoricalRewards(ctx, valAddr, period, historical) +} + +func (k Keeper) updateValidatorSlashFraction(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error { + if fraction.GT(math.LegacyOneDec()) || fraction.IsNegative() { + panic(fmt.Sprintf("fraction must be >=0 and <=1, current fraction: %v", fraction)) + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + val, err := k.stakingKeeper.Validator(ctx, valAddr) + if err != nil { + return err + } + + // increment current period + newPeriod, err := k.IncrementValidatorPeriod(ctx, val) + if err != nil { + return err + } + + // increment reference count on period we need to track + k.incrementReferenceCount(ctx, valAddr, newPeriod) + + slashEvent := types.NewValidatorSlashEvent(newPeriod, fraction) + height := uint64(sdkCtx.BlockHeight()) + + return k.SetValidatorSlashEvent(ctx, valAddr, height, newPeriod, slashEvent) +} diff --git a/x/distribution/migrations/v1/types.go b/x/distribution/migrations/v1/types.go new file mode 100644 index 0000000..987a1fc --- /dev/null +++ b/x/distribution/migrations/v1/types.go @@ -0,0 +1,185 @@ +package legacy + +import ( + "encoding/binary" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/kv" + v1auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v1" +) + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "distribution" + + // StoreKey is the store key string for distribution + StoreKey = ModuleName + + // RouterKey is the message route for distribution + RouterKey = ModuleName + + // QuerierRoute is the querier route for distribution + QuerierRoute = ModuleName +) + +// Keys for distribution store +// Items are stored with the following key: values +// +// - 0x00: FeePol +// +// - 0x01: sdk.ConsAddress +// +// - 0x02: ValidatorOutstandingRewards +// +// - 0x03: sdk.AccAddress +// +// - 0x04: DelegatorStartingInfo +// +// - 0x05: ValidatorHistoricalRewards +// +// - 0x06: ValidatorCurrentRewards +// +// - 0x07: ValidatorCurrentRewards +// +// - 0x08: ValidatorSlashEvent +var ( + FeePoolKey = []byte{0x00} // key for global distribution state + ProposerKey = []byte{0x01} // key for the proposer operator address + ValidatorOutstandingRewardsPrefix = []byte{0x02} // key for outstanding rewards + + DelegatorWithdrawAddrPrefix = []byte{0x03} // key for delegator withdraw address + DelegatorStartingInfoPrefix = []byte{0x04} // key for delegator starting info + ValidatorHistoricalRewardsPrefix = []byte{0x05} // key for historical validators rewards / stake + ValidatorCurrentRewardsPrefix = []byte{0x06} // key for current validator rewards + ValidatorAccumulatedCommissionPrefix = []byte{0x07} // key for accumulated validator commission + ValidatorSlashEventPrefix = []byte{0x08} // key for validator slash fraction +) + +// gets an address from a validator's outstanding rewards key +func GetValidatorOutstandingRewardsAddress(key []byte) (valAddr sdk.ValAddress) { + kv.AssertKeyAtLeastLength(key, 2) + addr := key[1:] + kv.AssertKeyLength(addr, v1auth.AddrLen) + return sdk.ValAddress(addr) +} + +// gets an address from a delegator's withdraw info key +func GetDelegatorWithdrawInfoAddress(key []byte) (delAddr sdk.AccAddress) { + kv.AssertKeyAtLeastLength(key, 2) + addr := key[1:] + kv.AssertKeyLength(addr, v1auth.AddrLen) + return sdk.AccAddress(addr) +} + +// gets the addresses from a delegator starting info key +func GetDelegatorStartingInfoAddresses(key []byte) (valAddr sdk.ValAddress, delAddr sdk.AccAddress) { + kv.AssertKeyAtLeastLength(key, 2+v1auth.AddrLen) + addr := key[1 : 1+v1auth.AddrLen] + kv.AssertKeyLength(addr, v1auth.AddrLen) + valAddr = sdk.ValAddress(addr) + addr = key[1+v1auth.AddrLen:] + kv.AssertKeyLength(addr, v1auth.AddrLen) + delAddr = sdk.AccAddress(addr) + return +} + +// gets the address & period from a validator's historical rewards key +func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddress, period uint64) { + kv.AssertKeyAtLeastLength(key, 2+v1auth.AddrLen) + addr := key[1 : 1+v1auth.AddrLen] + kv.AssertKeyLength(addr, v1auth.AddrLen) + valAddr = sdk.ValAddress(addr) + b := key[1+v1auth.AddrLen:] + kv.AssertKeyLength(addr, 8) + period = binary.LittleEndian.Uint64(b) + return +} + +// gets the address from a validator's current rewards key +func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress) { + kv.AssertKeyAtLeastLength(key, 2) + addr := key[1:] + kv.AssertKeyLength(addr, v1auth.AddrLen) + return sdk.ValAddress(addr) +} + +// gets the address from a validator's accumulated commission key +func GetValidatorAccumulatedCommissionAddress(key []byte) (valAddr sdk.ValAddress) { + kv.AssertKeyAtLeastLength(key, 2) + addr := key[1:] + kv.AssertKeyLength(addr, v1auth.AddrLen) + return sdk.ValAddress(addr) +} + +// gets the height from a validator's slash event key +func GetValidatorSlashEventAddressHeight(key []byte) (valAddr sdk.ValAddress, height uint64) { + kv.AssertKeyAtLeastLength(key, 2+v1auth.AddrLen) + addr := key[1 : 1+v1auth.AddrLen] + kv.AssertKeyLength(addr, v1auth.AddrLen) + valAddr = sdk.ValAddress(addr) + startB := 1 + v1auth.AddrLen + kv.AssertKeyAtLeastLength(key, startB+9) + b := key[startB : startB+8] // the next 8 bytes represent the height + height = binary.BigEndian.Uint64(b) + return +} + +// gets the outstanding rewards key for a validator +func GetValidatorOutstandingRewardsKey(valAddr sdk.ValAddress) []byte { + return append(ValidatorOutstandingRewardsPrefix, valAddr.Bytes()...) +} + +// gets the key for a delegator's withdraw addr +func GetDelegatorWithdrawAddrKey(delAddr sdk.AccAddress) []byte { + return append(DelegatorWithdrawAddrPrefix, delAddr.Bytes()...) +} + +// gets the key for a delegator's starting info +func GetDelegatorStartingInfoKey(v sdk.ValAddress, d sdk.AccAddress) []byte { + return append(append(DelegatorStartingInfoPrefix, v.Bytes()...), d.Bytes()...) +} + +// gets the prefix key for a validator's historical rewards +func GetValidatorHistoricalRewardsPrefix(v sdk.ValAddress) []byte { + return append(ValidatorHistoricalRewardsPrefix, v.Bytes()...) +} + +// gets the key for a validator's historical rewards +func GetValidatorHistoricalRewardsKey(v sdk.ValAddress, k uint64) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint64(b, k) + return append(append(ValidatorHistoricalRewardsPrefix, v.Bytes()...), b...) +} + +// gets the key for a validator's current rewards +func GetValidatorCurrentRewardsKey(v sdk.ValAddress) []byte { + return append(ValidatorCurrentRewardsPrefix, v.Bytes()...) +} + +// gets the key for a validator's current commission +func GetValidatorAccumulatedCommissionKey(v sdk.ValAddress) []byte { + return append(ValidatorAccumulatedCommissionPrefix, v.Bytes()...) +} + +// gets the prefix key for a validator's slash fractions +func GetValidatorSlashEventPrefix(v sdk.ValAddress) []byte { + return append(ValidatorSlashEventPrefix, v.Bytes()...) +} + +// gets the prefix key for a validator's slash fraction (ValidatorSlashEventPrefix + height) +func GetValidatorSlashEventKeyPrefix(v sdk.ValAddress, height uint64) []byte { + heightBz := make([]byte, 8) + binary.BigEndian.PutUint64(heightBz, height) + return append( + ValidatorSlashEventPrefix, + append(v.Bytes(), heightBz...)..., + ) +} + +// gets the key for a validator's slash fraction +func GetValidatorSlashEventKey(v sdk.ValAddress, height, period uint64) []byte { + periodBz := make([]byte, 8) + binary.BigEndian.PutUint64(periodBz, period) + prefix := GetValidatorSlashEventKeyPrefix(v, height) + return append(prefix, periodBz...) +} diff --git a/x/distribution/migrations/v2/helpers.go b/x/distribution/migrations/v2/helpers.go new file mode 100644 index 0000000..ed50c04 --- /dev/null +++ b/x/distribution/migrations/v2/helpers.go @@ -0,0 +1,72 @@ +package v2 + +import ( + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/types/address" + v1auth "github.com/cosmos/cosmos-sdk/x/auth/migrations/v1" +) + +// MigratePrefixAddress is a helper function that migrates all keys of format: +// prefix_bytes | address_bytes +// into format: +// prefix_bytes | address_len (1 byte) | address_bytes +func MigratePrefixAddress(store storetypes.KVStore, prefixBz []byte) { + oldStore := prefix.NewStore(store, prefixBz) + + oldStoreIter := oldStore.Iterator(nil, nil) + defer oldStoreIter.Close() + + for ; oldStoreIter.Valid(); oldStoreIter.Next() { + addr := oldStoreIter.Key() + newStoreKey := prefixBz + newStoreKey = append(newStoreKey, address.MustLengthPrefix(addr)...) + + // Set new key on store. Values don't change. + store.Set(newStoreKey, oldStoreIter.Value()) + oldStore.Delete(oldStoreIter.Key()) + } +} + +// MigratePrefixAddressBytes is a helper function that migrates all keys of format: +// prefix_bytes | address_bytes | arbitrary_bytes +// into format: +// prefix_bytes | address_len (1 byte) | address_bytes | arbitrary_bytes +func MigratePrefixAddressBytes(store storetypes.KVStore, prefixBz []byte) { + oldStore := prefix.NewStore(store, prefixBz) + + oldStoreIter := oldStore.Iterator(nil, nil) + defer oldStoreIter.Close() + + for ; oldStoreIter.Valid(); oldStoreIter.Next() { + addr := oldStoreIter.Key()[:v1auth.AddrLen] + endBz := oldStoreIter.Key()[v1auth.AddrLen:] + newStoreKey := append(append(prefixBz, address.MustLengthPrefix(addr)...), endBz...) + + // Set new key on store. Values don't change. + store.Set(newStoreKey, oldStoreIter.Value()) + oldStore.Delete(oldStoreIter.Key()) + } +} + +// MigratePrefixAddressAddress is a helper function that migrates all keys of format: +// prefix_bytes | address_1_bytes | address_2_bytes +// into format: +// prefix_bytes | address_1_len (1 byte) | address_1_bytes | address_2_len (1 byte) | address_2_bytes +func MigratePrefixAddressAddress(store storetypes.KVStore, prefixBz []byte) { + oldStore := prefix.NewStore(store, prefixBz) + + oldStoreIter := oldStore.Iterator(nil, nil) + defer oldStoreIter.Close() + + for ; oldStoreIter.Valid(); oldStoreIter.Next() { + addr1 := oldStoreIter.Key()[:v1auth.AddrLen] + addr2 := oldStoreIter.Key()[v1auth.AddrLen:] + newStoreKey := append(append(prefixBz, address.MustLengthPrefix(addr1)...), address.MustLengthPrefix(addr2)...) + + // Set new key on store. Values don't change. + store.Set(newStoreKey, oldStoreIter.Value()) + oldStore.Delete(oldStoreIter.Key()) + } +} diff --git a/x/distribution/migrations/v2/store.go b/x/distribution/migrations/v2/store.go new file mode 100644 index 0000000..fe6aea2 --- /dev/null +++ b/x/distribution/migrations/v2/store.go @@ -0,0 +1,26 @@ +package v2 + +import ( + "cosmossdk.io/core/store" + + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + v1 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v1" +) + +// MigrateStore performs in-place store migrations from v0.40 to v0.43. The +// migration includes: +// +// - Change addresses to be length-prefixed. +func MigrateStore(ctx sdk.Context, storeService store.KVStoreService) error { + store := runtime.KVStoreAdapter(storeService.OpenKVStore(ctx)) + MigratePrefixAddress(store, v1.ValidatorOutstandingRewardsPrefix) + MigratePrefixAddress(store, v1.DelegatorWithdrawAddrPrefix) + MigratePrefixAddressAddress(store, v1.DelegatorStartingInfoPrefix) + MigratePrefixAddressBytes(store, v1.ValidatorHistoricalRewardsPrefix) + MigratePrefixAddress(store, v1.ValidatorCurrentRewardsPrefix) + MigratePrefixAddress(store, v1.ValidatorAccumulatedCommissionPrefix) + MigratePrefixAddressBytes(store, v1.ValidatorSlashEventPrefix) + + return nil +} diff --git a/x/distribution/migrations/v2/store_test.go b/x/distribution/migrations/v2/store_test.go new file mode 100644 index 0000000..ed49612 --- /dev/null +++ b/x/distribution/migrations/v2/store_test.go @@ -0,0 +1,103 @@ +package v2_test + +import ( + "bytes" + "testing" + + "github.com/stretchr/testify/require" + + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + v1 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v1" + v2 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v2" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +func TestStoreMigration(t *testing.T) { + distributionKey := storetypes.NewKVStoreKey("distribution") + storeService := runtime.NewKVStoreService(distributionKey) + ctx := testutil.DefaultContext(distributionKey, storetypes.NewTransientStoreKey("transient_test")) + store := ctx.KVStore(distributionKey) + + _, _, addr1 := testdata.KeyTestPubAddr() + valAddr := sdk.ValAddress(addr1) + _, _, addr2 := testdata.KeyTestPubAddr() + // Use dummy value for all keys. + value := []byte("foo") + + testCases := []struct { + name string + oldKey []byte + newKey []byte + }{ + { + "FeePoolKey", + v1.FeePoolKey, + types.FeePoolKey, + }, + { + "ProposerKey", + v1.ProposerKey, + types.ProposerKey, + }, + { + "ValidatorOutstandingRewards", + v1.GetValidatorOutstandingRewardsKey(valAddr), + types.GetValidatorOutstandingRewardsKey(valAddr), + }, + { + "DelegatorWithdrawAddr", + v1.GetDelegatorWithdrawAddrKey(addr2), + types.GetDelegatorWithdrawAddrKey(addr2), + }, + { + "DelegatorStartingInfo", + v1.GetDelegatorStartingInfoKey(valAddr, addr2), + types.GetDelegatorStartingInfoKey(valAddr, addr2), + }, + { + "ValidatorHistoricalRewards", + v1.GetValidatorHistoricalRewardsKey(valAddr, 6), + types.GetValidatorHistoricalRewardsKey(valAddr, 6), + }, + { + "ValidatorCurrentRewards", + v1.GetValidatorCurrentRewardsKey(valAddr), + types.GetValidatorCurrentRewardsKey(valAddr), + }, + { + "ValidatorAccumulatedCommission", + v1.GetValidatorAccumulatedCommissionKey(valAddr), + types.GetValidatorAccumulatedCommissionKey(valAddr), + }, + { + "ValidatorSlashEvent", + v1.GetValidatorSlashEventKey(valAddr, 6, 8), + types.GetValidatorSlashEventKey(valAddr, 6, 8), + }, + } + + // Set all the old keys to the store + for _, tc := range testCases { + store.Set(tc.oldKey, value) + } + + // Run migrations. + err := v2.MigrateStore(ctx, storeService) + require.NoError(t, err) + + // Make sure the new keys are set and old keys are deleted. + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + if !bytes.Equal(tc.oldKey, tc.newKey) { + require.Nil(t, store.Get(tc.oldKey)) + } + require.Equal(t, value, store.Get(tc.newKey)) + }) + } +} diff --git a/x/distribution/migrations/v3/json.go b/x/distribution/migrations/v3/json.go new file mode 100644 index 0000000..e384b48 --- /dev/null +++ b/x/distribution/migrations/v3/json.go @@ -0,0 +1,19 @@ +package v3 + +import ( + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// MigrateJSON accepts exported v2 (v0.46) x/distribution genesis state and migrates it to +// v3 (v0.47) x/distribution genesis state. The migration includes: +// +// Reset of the deprecated rewards to zero. +func MigrateJSON(oldState *types.GenesisState) *types.GenesisState { + // reset deprecated rewards to zero + oldState.Params.BaseProposerReward = sdkmath.LegacyZeroDec() + oldState.Params.BonusProposerReward = sdkmath.LegacyZeroDec() + + return oldState +} diff --git a/x/distribution/migrations/v3/json_test.go b/x/distribution/migrations/v3/json_test.go new file mode 100644 index 0000000..8fba6cf --- /dev/null +++ b/x/distribution/migrations/v3/json_test.go @@ -0,0 +1,65 @@ +package v3_test + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" + + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/client" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/distribution" + v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +func TestMigrateJSON(t *testing.T) { + encodingConfig := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + clientCtx := client.Context{}. + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithCodec(encodingConfig.Codec) + + distrGenState := types.DefaultGenesisState() + + oldDistrState := distrGenState + oldDistrState.Params.BaseProposerReward = sdkmath.LegacyNewDecWithPrec(1, 2) + oldDistrState.Params.BonusProposerReward = sdkmath.LegacyNewDecWithPrec(4, 2) + + migrated := v3.MigrateJSON(oldDistrState) + require.Equal(t, migrated, distrGenState) + + bz, err := clientCtx.Codec.MarshalJSON(migrated) + require.NoError(t, err) + + // Indent the JSON bz correctly. + var jsonObj map[string]interface{} + err = json.Unmarshal(bz, &jsonObj) + require.NoError(t, err) + indentedBz, err := json.MarshalIndent(jsonObj, "", "\t") + require.NoError(t, err) + + expected := `{ + "delegator_starting_infos": [], + "delegator_withdraw_infos": [], + "fee_pool": { + "community_pool": [] + }, + "outstanding_rewards": [], + "params": { + "base_proposer_reward": "0.000000000000000000", + "bonus_proposer_reward": "0.000000000000000000", + "community_tax": "0.020000000000000000", + "withdraw_addr_enabled": true + }, + "previous_proposer": "", + "validator_accumulated_commissions": [], + "validator_current_rewards": [], + "validator_historical_rewards": [], + "validator_slash_events": [] +}` + + require.Equal(t, expected, string(indentedBz)) +} diff --git a/x/distribution/migrations/v3/migrate.go b/x/distribution/migrations/v3/migrate.go new file mode 100644 index 0000000..5f59b59 --- /dev/null +++ b/x/distribution/migrations/v3/migrate.go @@ -0,0 +1,42 @@ +package v3 + +import ( + "cosmossdk.io/core/store" + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/exported" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +const ( + ModuleName = "distribution" +) + +var ParamsKey = []byte{0x09} + +// MigrateStore migrates the x/distribution module state from the consensus version 2 to +// version 3. Specifically, it takes the parameters that are currently stored +// and managed by the x/params module and stores them directly into the x/distribution +// module state. +func MigrateStore(ctx sdk.Context, storeService store.KVStoreService, legacySubspace exported.Subspace, cdc codec.BinaryCodec) error { + store := storeService.OpenKVStore(ctx) + var currParams types.Params + legacySubspace.GetParamSet(ctx, &currParams) + + // reset unused params + currParams.BaseProposerReward = sdkmath.LegacyZeroDec() + currParams.BonusProposerReward = sdkmath.LegacyZeroDec() + + if err := currParams.ValidateBasic(); err != nil { + return err + } + + bz, err := cdc.Marshal(&currParams) + if err != nil { + return err + } + + return store.Set(ParamsKey, bz) +} diff --git a/x/distribution/migrations/v3/migrate_test.go b/x/distribution/migrations/v3/migrate_test.go new file mode 100644 index 0000000..495f692 --- /dev/null +++ b/x/distribution/migrations/v3/migrate_test.go @@ -0,0 +1,47 @@ +package v3_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/distribution/exported" + v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +type mockSubspace struct { + ps types.Params +} + +func newMockSubspace(ps types.Params) mockSubspace { + return mockSubspace{ps: ps} +} + +func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { + *ps.(*types.Params) = ms.ps +} + +func TestMigrate(t *testing.T) { + cdc := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}).Codec + storeKey := storetypes.NewKVStoreKey(v3.ModuleName) + storeService := runtime.NewKVStoreService(storeKey) + tKey := storetypes.NewTransientStoreKey("transient_test") + ctx := testutil.DefaultContext(storeKey, tKey) + store := ctx.KVStore(storeKey) + + legacySubspace := newMockSubspace(types.DefaultParams()) + require.NoError(t, v3.MigrateStore(ctx, storeService, legacySubspace, cdc)) + + var res types.Params + bz := store.Get(v3.ParamsKey) + require.NoError(t, cdc.Unmarshal(bz, &res)) + require.Equal(t, legacySubspace.ps, res) +} diff --git a/x/distribution/module.go b/x/distribution/module.go new file mode 100644 index 0000000..5e00310 --- /dev/null +++ b/x/distribution/module.go @@ -0,0 +1,261 @@ +package distribution + +import ( + "context" + "encoding/json" + "fmt" + + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + + modulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + + sdkclient "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" + "github.com/cosmos/cosmos-sdk/x/distribution/exported" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + "github.com/cosmos/cosmos-sdk/x/distribution/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + staking "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// ConsensusVersion defines the current x/distribution module consensus version. +const ConsensusVersion = 3 + +var ( + _ module.AppModuleBasic = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the distribution module. +type AppModuleBasic struct { + cdc codec.Codec + ac address.Codec +} + +// Name returns the distribution module's name. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec registers the distribution module's types for the given codec. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +// DefaultGenesis returns default genesis state as raw bytes for the distribution +// module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesisState()) +} + +// ValidateGenesis performs genesis state validation for the distribution module. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ sdkclient.TxEncodingConfig, bz json.RawMessage) error { + var data types.GenesisState + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return types.ValidateGenesis(&data) +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the distribution module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *gwruntime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// GetTxCmd returns the root tx command for the distribution module. +func (ab AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd(ab.cdc.InterfaceRegistry().SigningContext().ValidatorAddressCodec(), ab.cdc.InterfaceRegistry().SigningContext().AddressCodec()) +} + +// RegisterInterfaces implements InterfaceModule +func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// AppModule implements an application module for the distribution module. +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + stakingKeeper types.StakingKeeper + + // legacySubspace is used solely for migration of x/params managed parameters + legacySubspace exported.Subspace +} + +// NewAppModule creates a new AppModule object +func NewAppModule( + cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper, + bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, ss exported.Subspace, +) AppModule { + return AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc, ac: accountKeeper.AddressCodec()}, + keeper: keeper, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + stakingKeeper: stakingKeeper, + legacySubspace: ss, + } +} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// RegisterInvariants registers the distribution module invariants. +func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { + keeper.RegisterInvariants(ir, am.keeper) +} + +// RegisterServices registers module services. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.keeper)) + + m := keeper.NewMigrator(am.keeper, am.legacySubspace) + if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", types.ModuleName, err)) + } + + if err := cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3); err != nil { + panic(fmt.Sprintf("failed to migrate x/%s from version 2 to 3: %v", types.ModuleName, err)) + } +} + +// InitGenesis performs genesis initialization for the distribution module. It returns +// no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { + var genesisState types.GenesisState + cdc.MustUnmarshalJSON(data, &genesisState) + am.keeper.InitGenesis(ctx, genesisState) +} + +// ExportGenesis returns the exported genesis state as raw bytes for the distribution +// module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + gs := am.keeper.ExportGenesis(ctx) + return cdc.MustMarshalJSON(gs) +} + +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } + +// BeginBlock returns the begin blocker for the distribution module. +func (am AppModule) BeginBlock(ctx context.Context) error { + c := sdk.UnwrapSDKContext(ctx) + return BeginBlocker(c, am.keeper) +} + +// AppModuleSimulation functions + +// GenerateGenesisState creates a randomized GenState of the distribution module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + simulation.RandomizedGenState(simState) +} + +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (AppModule) ProposalMsgs(_ module.SimulationState) []simtypes.WeightedProposalMsg { + return simulation.ProposalMsgs() +} + +// RegisterStoreDecoder registers a decoder for distribution module's types +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { + sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) +} + +// WeightedOperations returns the all the gov module operations with their respective weights. +func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + return simulation.WeightedOperations( + simState.AppParams, simState.Cdc, simState.TxConfig, + am.accountKeeper, am.bankKeeper, am.keeper, am.stakingKeeper, + ) +} + +// +// App Wiring Setup +// + +func init() { + appmodule.Register(&modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Config *modulev1.Module + StoreService store.KVStoreService + Cdc codec.Codec + + AccountKeeper types.AccountKeeper + BankKeeper types.BankKeeper + StakingKeeper types.StakingKeeper + + // LegacySubspace is used solely for migration of x/params managed parameters + LegacySubspace exported.Subspace `optional:"true"` +} + +type ModuleOutputs struct { + depinject.Out + + DistrKeeper keeper.Keeper + Module appmodule.AppModule + Hooks staking.StakingHooksWrapper +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + feeCollectorName := in.Config.FeeCollectorName + if feeCollectorName == "" { + feeCollectorName = authtypes.FeeCollectorName + } + + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + + k := keeper.NewKeeper( + in.Cdc, + in.StoreService, + in.AccountKeeper, + in.BankKeeper, + in.StakingKeeper, + feeCollectorName, + authority.String(), + ) + + m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.StakingKeeper, in.LegacySubspace) + + return ModuleOutputs{ + DistrKeeper: k, + Module: m, + Hooks: staking.StakingHooksWrapper{StakingHooks: k.Hooks()}, + } +} diff --git a/x/distribution/simulation/decoder.go b/x/distribution/simulation/decoder.go new file mode 100644 index 0000000..a1d64d2 --- /dev/null +++ b/x/distribution/simulation/decoder.go @@ -0,0 +1,70 @@ +package simulation + +import ( + "bytes" + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/kv" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's +// Value to the corresponding distribution type. +func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { + return func(kvA, kvB kv.Pair) string { + switch { + case bytes.Equal(kvA.Key[:1], types.FeePoolKey): + var feePoolA, feePoolB types.FeePool + cdc.MustUnmarshal(kvA.Value, &feePoolA) + cdc.MustUnmarshal(kvB.Value, &feePoolB) + return fmt.Sprintf("%v\n%v", feePoolA, feePoolB) + + case bytes.Equal(kvA.Key[:1], types.ProposerKey): + return fmt.Sprintf("%v\n%v", sdk.ConsAddress(kvA.Value), sdk.ConsAddress(kvB.Value)) + + case bytes.Equal(kvA.Key[:1], types.ValidatorOutstandingRewardsPrefix): + var rewardsA, rewardsB types.ValidatorOutstandingRewards + cdc.MustUnmarshal(kvA.Value, &rewardsA) + cdc.MustUnmarshal(kvB.Value, &rewardsB) + return fmt.Sprintf("%v\n%v", rewardsA, rewardsB) + + case bytes.Equal(kvA.Key[:1], types.DelegatorWithdrawAddrPrefix): + return fmt.Sprintf("%v\n%v", sdk.AccAddress(kvA.Value), sdk.AccAddress(kvB.Value)) + + case bytes.Equal(kvA.Key[:1], types.DelegatorStartingInfoPrefix): + var infoA, infoB types.DelegatorStartingInfo + cdc.MustUnmarshal(kvA.Value, &infoA) + cdc.MustUnmarshal(kvB.Value, &infoB) + return fmt.Sprintf("%v\n%v", infoA, infoB) + + case bytes.Equal(kvA.Key[:1], types.ValidatorHistoricalRewardsPrefix): + var rewardsA, rewardsB types.ValidatorHistoricalRewards + cdc.MustUnmarshal(kvA.Value, &rewardsA) + cdc.MustUnmarshal(kvB.Value, &rewardsB) + return fmt.Sprintf("%v\n%v", rewardsA, rewardsB) + + case bytes.Equal(kvA.Key[:1], types.ValidatorCurrentRewardsPrefix): + var rewardsA, rewardsB types.ValidatorCurrentRewards + cdc.MustUnmarshal(kvA.Value, &rewardsA) + cdc.MustUnmarshal(kvB.Value, &rewardsB) + return fmt.Sprintf("%v\n%v", rewardsA, rewardsB) + + case bytes.Equal(kvA.Key[:1], types.ValidatorAccumulatedCommissionPrefix): + var commissionA, commissionB types.ValidatorAccumulatedCommission + cdc.MustUnmarshal(kvA.Value, &commissionA) + cdc.MustUnmarshal(kvB.Value, &commissionB) + return fmt.Sprintf("%v\n%v", commissionA, commissionB) + + case bytes.Equal(kvA.Key[:1], types.ValidatorSlashEventPrefix): + var eventA, eventB types.ValidatorSlashEvent + cdc.MustUnmarshal(kvA.Value, &eventA) + cdc.MustUnmarshal(kvB.Value, &eventB) + return fmt.Sprintf("%v\n%v", eventA, eventB) + + default: + panic(fmt.Sprintf("invalid distribution key prefix %X", kvA.Key[:1])) + } + } +} diff --git a/x/distribution/simulation/decoder_test.go b/x/distribution/simulation/decoder_test.go new file mode 100644 index 0000000..7732081 --- /dev/null +++ b/x/distribution/simulation/decoder_test.go @@ -0,0 +1,84 @@ +package simulation_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/kv" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/distribution/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +var ( + delPk1 = ed25519.GenPrivKey().PubKey() + delAddr1 = sdk.AccAddress(delPk1.Address()) + valAddr1 = sdk.ValAddress(delPk1.Address()) + consAddr1 = sdk.ConsAddress(delPk1.Address().Bytes()) +) + +func TestDecodeDistributionStore(t *testing.T) { + encodingConfig := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) + cdc := encodingConfig.Codec + + dec := simulation.NewDecodeStore(cdc) + + decCoins := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyOneDec())} + feePool := types.InitialFeePool() + feePool.CommunityPool = decCoins + info := types.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200) + outstanding := types.ValidatorOutstandingRewards{Rewards: decCoins} + commission := types.ValidatorAccumulatedCommission{Commission: decCoins} + historicalRewards := types.NewValidatorHistoricalRewards(decCoins, 100) + currentRewards := types.NewValidatorCurrentRewards(decCoins, 5) + slashEvent := types.NewValidatorSlashEvent(10, math.LegacyOneDec()) + + kvPairs := kv.Pairs{ + Pairs: []kv.Pair{ + {Key: types.FeePoolKey, Value: cdc.MustMarshal(&feePool)}, + {Key: types.ProposerKey, Value: consAddr1.Bytes()}, + {Key: types.GetValidatorOutstandingRewardsKey(valAddr1), Value: cdc.MustMarshal(&outstanding)}, + {Key: types.GetDelegatorWithdrawAddrKey(delAddr1), Value: delAddr1.Bytes()}, + {Key: types.GetDelegatorStartingInfoKey(valAddr1, delAddr1), Value: cdc.MustMarshal(&info)}, + {Key: types.GetValidatorHistoricalRewardsKey(valAddr1, 100), Value: cdc.MustMarshal(&historicalRewards)}, + {Key: types.GetValidatorCurrentRewardsKey(valAddr1), Value: cdc.MustMarshal(¤tRewards)}, + {Key: types.GetValidatorAccumulatedCommissionKey(valAddr1), Value: cdc.MustMarshal(&commission)}, + {Key: types.GetValidatorSlashEventKeyPrefix(valAddr1, 13), Value: cdc.MustMarshal(&slashEvent)}, + {Key: []byte{0x99}, Value: []byte{0x99}}, + }, + } + + tests := []struct { + name string + expectedLog string + }{ + {"FeePool", fmt.Sprintf("%v\n%v", feePool, feePool)}, + {"Proposer", fmt.Sprintf("%v\n%v", consAddr1, consAddr1)}, + {"ValidatorOutstandingRewards", fmt.Sprintf("%v\n%v", outstanding, outstanding)}, + {"DelegatorWithdrawAddr", fmt.Sprintf("%v\n%v", delAddr1, delAddr1)}, + {"DelegatorStartingInfo", fmt.Sprintf("%v\n%v", info, info)}, + {"ValidatorHistoricalRewards", fmt.Sprintf("%v\n%v", historicalRewards, historicalRewards)}, + {"ValidatorCurrentRewards", fmt.Sprintf("%v\n%v", currentRewards, currentRewards)}, + {"ValidatorAccumulatedCommission", fmt.Sprintf("%v\n%v", commission, commission)}, + {"ValidatorSlashEvent", fmt.Sprintf("%v\n%v", slashEvent, slashEvent)}, + {"other", ""}, + } + for i, tt := range tests { + i, tt := i, tt + t.Run(tt.name, func(t *testing.T) { + switch i { + case len(tests) - 1: + require.Panics(t, func() { dec(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name) + default: + require.Equal(t, tt.expectedLog, dec(kvPairs.Pairs[i], kvPairs.Pairs[i]), tt.name) + } + }) + } +} diff --git a/x/distribution/simulation/genesis.go b/x/distribution/simulation/genesis.go new file mode 100644 index 0000000..1a50925 --- /dev/null +++ b/x/distribution/simulation/genesis.go @@ -0,0 +1,52 @@ +package simulation + +import ( + "encoding/json" + "fmt" + "math/rand" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// Simulation parameter constants +const ( + CommunityTax = "community_tax" + WithdrawEnabled = "withdraw_enabled" +) + +// GenCommunityTax randomized CommunityTax +func GenCommunityTax(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(1, 2).Add(math.LegacyNewDecWithPrec(int64(r.Intn(30)), 2)) +} + +// GenWithdrawEnabled returns a randomized WithdrawEnabled parameter. +func GenWithdrawEnabled(r *rand.Rand) bool { + return r.Int63n(101) <= 95 // 95% chance of withdraws being enabled +} + +// RandomizedGenState generates a random GenesisState for distribution +func RandomizedGenState(simState *module.SimulationState) { + var communityTax math.LegacyDec + simState.AppParams.GetOrGenerate(CommunityTax, &communityTax, simState.Rand, func(r *rand.Rand) { communityTax = GenCommunityTax(r) }) + + var withdrawEnabled bool + simState.AppParams.GetOrGenerate(WithdrawEnabled, &withdrawEnabled, simState.Rand, func(r *rand.Rand) { withdrawEnabled = GenWithdrawEnabled(r) }) + + distrGenesis := types.GenesisState{ + FeePool: types.InitialFeePool(), + Params: types.Params{ + CommunityTax: communityTax, + WithdrawAddrEnabled: withdrawEnabled, + }, + } + + bz, err := json.MarshalIndent(&distrGenesis, "", " ") + if err != nil { + panic(err) + } + fmt.Printf("Selected randomly generated distribution parameters:\n%s\n", bz) + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&distrGenesis) +} diff --git a/x/distribution/simulation/genesis_test.go b/x/distribution/simulation/genesis_test.go new file mode 100644 index 0000000..62e26f4 --- /dev/null +++ b/x/distribution/simulation/genesis_test.go @@ -0,0 +1,78 @@ +package simulation_test + +import ( + "encoding/json" + "math/rand" + "testing" + + "github.com/stretchr/testify/require" + + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +// TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. +// Abonormal scenarios are not tested here. +func TestRandomizedGenState(t *testing.T) { + interfaceRegistry := codectypes.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(interfaceRegistry) + s := rand.NewSource(1) + r := rand.New(s) + + simState := module.SimulationState{ + AppParams: make(simtypes.AppParams), + Cdc: cdc, + Rand: r, + NumBonded: 3, + Accounts: simtypes.RandomAccounts(r, 3), + InitialStake: sdkmath.NewInt(1000), + GenState: make(map[string]json.RawMessage), + } + + simulation.RandomizedGenState(&simState) + + var distrGenesis types.GenesisState + simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &distrGenesis) + + dec1, _ := sdkmath.LegacyNewDecFromStr("0.210000000000000000") + + require.Equal(t, dec1, distrGenesis.Params.CommunityTax) + require.Equal(t, true, distrGenesis.Params.WithdrawAddrEnabled) + require.Len(t, distrGenesis.DelegatorStartingInfos, 0) + require.Len(t, distrGenesis.DelegatorWithdrawInfos, 0) + require.Len(t, distrGenesis.ValidatorSlashEvents, 0) +} + +// TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. +func TestRandomizedGenState1(t *testing.T) { + interfaceRegistry := codectypes.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(interfaceRegistry) + + s := rand.NewSource(1) + r := rand.New(s) + + // all these tests will panic + tests := []struct { + simState module.SimulationState + panicMsg string + }{ + { // panic => reason: incomplete initialization of the simState + module.SimulationState{}, "invalid memory address or nil pointer dereference"}, + { // panic => reason: incomplete initialization of the simState + module.SimulationState{ + AppParams: make(simtypes.AppParams), + Cdc: cdc, + Rand: r, + }, "assignment to entry in nil map"}, + } + + for _, tt := range tests { + require.Panicsf(t, func() { simulation.RandomizedGenState(&tt.simState) }, tt.panicMsg) + } +} diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go new file mode 100644 index 0000000..4fff814 --- /dev/null +++ b/x/distribution/simulation/operations.go @@ -0,0 +1,280 @@ +package simulation + +import ( + "errors" + "fmt" + "math/rand" + + "cosmossdk.io/collections" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/cosmos/cosmos-sdk/x/simulation" +) + +// Simulation operation weights constants +const ( + OpWeightMsgSetWithdrawAddress = "op_weight_msg_set_withdraw_address" + OpWeightMsgWithdrawDelegationReward = "op_weight_msg_withdraw_delegation_reward" + OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission" + OpWeightMsgFundCommunityPool = "op_weight_msg_fund_community_pool" + + DefaultWeightMsgSetWithdrawAddress int = 50 + DefaultWeightMsgWithdrawDelegationReward int = 50 + DefaultWeightMsgWithdrawValidatorCommission int = 50 + DefaultWeightMsgFundCommunityPool int = 50 +) + +// WeightedOperations returns all the operations from the module with their respective weights +func WeightedOperations( + appParams simtypes.AppParams, + cdc codec.JSONCodec, + txConfig client.TxConfig, + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, + sk types.StakingKeeper, +) simulation.WeightedOperations { + var weightMsgSetWithdrawAddress int + appParams.GetOrGenerate(OpWeightMsgSetWithdrawAddress, &weightMsgSetWithdrawAddress, nil, func(_ *rand.Rand) { + weightMsgSetWithdrawAddress = DefaultWeightMsgSetWithdrawAddress + }) + + var weightMsgWithdrawDelegationReward int + appParams.GetOrGenerate(OpWeightMsgWithdrawDelegationReward, &weightMsgWithdrawDelegationReward, nil, func(_ *rand.Rand) { + weightMsgWithdrawDelegationReward = DefaultWeightMsgWithdrawDelegationReward + }) + + var weightMsgWithdrawValidatorCommission int + appParams.GetOrGenerate(OpWeightMsgWithdrawValidatorCommission, &weightMsgWithdrawValidatorCommission, nil, func(_ *rand.Rand) { + weightMsgWithdrawValidatorCommission = DefaultWeightMsgWithdrawValidatorCommission + }) + + var weightMsgFundCommunityPool int + appParams.GetOrGenerate(OpWeightMsgFundCommunityPool, &weightMsgFundCommunityPool, nil, func(_ *rand.Rand) { + weightMsgFundCommunityPool = DefaultWeightMsgFundCommunityPool + }) + + return simulation.WeightedOperations{ + simulation.NewWeightedOperation( + weightMsgSetWithdrawAddress, + SimulateMsgSetWithdrawAddress(txConfig, ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgWithdrawDelegationReward, + SimulateMsgWithdrawDelegatorReward(txConfig, ak, bk, k, sk), + ), + simulation.NewWeightedOperation( + weightMsgWithdrawValidatorCommission, + SimulateMsgWithdrawValidatorCommission(txConfig, ak, bk, k, sk), + ), + simulation.NewWeightedOperation( + weightMsgFundCommunityPool, + SimulateMsgFundCommunityPool(txConfig, ak, bk, k, sk), + ), + } +} + +// SimulateMsgSetWithdrawAddress generates a MsgSetWithdrawAddress with random values. +func SimulateMsgSetWithdrawAddress(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + isWithdrawAddrEnabled, err := k.GetWithdrawAddrEnabled(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgSetWithdrawAddress{}), "error getting params"), nil, err + } + + if !isWithdrawAddrEnabled { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgSetWithdrawAddress{}), "withdrawal is not enabled"), nil, nil + } + + simAccount, _ := simtypes.RandomAcc(r, accs) + simToAccount, _ := simtypes.RandomAcc(r, accs) + + account := ak.GetAccount(ctx, simAccount.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + msg := types.NewMsgSetWithdrawAddress(simAccount.Address, simToAccount.Address) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: txConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +// SimulateMsgWithdrawDelegatorReward generates a MsgWithdrawDelegatorReward with random values. +func SimulateMsgWithdrawDelegatorReward(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + delegations, err := sk.GetAllDelegatorDelegations(ctx, simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "error getting delegations"), nil, err + } + if len(delegations) == 0 { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "number of delegators equal 0"), nil, nil + } + + delegation := delegations[r.Intn(len(delegations))] + + delAddr, err := sk.ValidatorAddressCodec().StringToBytes(delegation.GetValidatorAddr()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "error converting validator address"), nil, err + } + validator, err := sk.Validator(ctx, delAddr) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "error getting validator"), nil, err + } + if validator == nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), "validator is nil"), nil, fmt.Errorf("validator %s not found", delegation.GetValidatorAddr()) + } + + account := ak.GetAccount(ctx, simAccount.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + msg := types.NewMsgWithdrawDelegatorReward(simAccount.Address.String(), validator.GetOperator()) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: txConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +// SimulateMsgWithdrawValidatorCommission generates a MsgWithdrawValidatorCommission with random values. +func SimulateMsgWithdrawValidatorCommission(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + msgType := sdk.MsgTypeURL(&types.MsgWithdrawValidatorCommission{}) + + allVals, err := sk.GetAllValidators(ctx) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting all validators"), nil, err + } + + validator, ok := testutil.RandSliceElem(r, allVals) + if !ok { + return simtypes.NoOpMsg(types.ModuleName, msgType, "random validator is not ok"), nil, nil + } + + valBz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error converting validator address"), nil, err + } + + commission, err := k.GetValidatorAccumulatedCommission(ctx, valBz) + + if err != nil && !errors.Is(err, collections.ErrNotFound) { + return simtypes.NoOpMsg(types.ModuleName, msgType, "error getting validator commission"), nil, err + } + + if commission.Commission.IsZero() { + return simtypes.NoOpMsg(types.ModuleName, msgType, "validator commission is zero"), nil, nil + } + + simAccount, found := simtypes.FindAccount(accs, sdk.AccAddress(valBz)) + if !found { + return simtypes.NoOpMsg(types.ModuleName, msgType, "could not find account"), nil, fmt.Errorf("validator %s not found", validator.GetOperator()) + } + + account := ak.GetAccount(ctx, simAccount.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + msg := types.NewMsgWithdrawValidatorCommission(validator.GetOperator()) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: txConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +// SimulateMsgFundCommunityPool simulates MsgFundCommunityPool execution where +// a random account sends a random amount of its funds to the community pool. +func SimulateMsgFundCommunityPool(txConfig client.TxConfig, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk types.StakingKeeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + funder, _ := simtypes.RandomAcc(r, accs) + + account := ak.GetAccount(ctx, funder.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + fundAmount := simtypes.RandSubsetCoins(r, spendable) + if fundAmount.Empty() { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgFundCommunityPool{}), "fund amount is empty"), nil, nil + } + + var ( + fees sdk.Coins + err error + ) + + coins, hasNeg := spendable.SafeSub(fundAmount...) + if !hasNeg { + fees, err = simtypes.RandomFees(r, ctx, coins) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgFundCommunityPool{}), "unable to generate fees"), nil, err + } + } + + msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address.String()) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: txConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: funder, + AccountKeeper: ak, + ModuleName: types.ModuleName, + } + + return simulation.GenAndDeliverTx(txCtx, fees) + } +} diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go new file mode 100644 index 0000000..69c5726 --- /dev/null +++ b/x/distribution/simulation/operations_test.go @@ -0,0 +1,335 @@ +package simulation_test + +import ( + "math/rand" + "testing" + + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/suite" + + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + "github.com/cosmos/cosmos-sdk/x/distribution/simulation" + distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// TestWeightedOperations tests the weights of the operations. +func (suite *SimTestSuite) TestWeightedOperations() { + appParams := make(simtypes.AppParams) + + weightedOps := simulation.WeightedOperations(appParams, suite.cdc, suite.txConfig, suite.accountKeeper, + suite.bankKeeper, suite.distrKeeper, suite.stakingKeeper) + + // setup 3 accounts + s := rand.NewSource(1) + r := rand.New(s) + accs := suite.getTestingAccounts(r, 3) + + expected := []struct { + weight int + opMsgRoute string + opMsgName string + }{ + {simulation.DefaultWeightMsgSetWithdrawAddress, types.ModuleName, sdk.MsgTypeURL(&types.MsgSetWithdrawAddress{})}, + {simulation.DefaultWeightMsgWithdrawDelegationReward, types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{})}, + {simulation.DefaultWeightMsgWithdrawValidatorCommission, types.ModuleName, sdk.MsgTypeURL(&types.MsgWithdrawValidatorCommission{})}, + {simulation.DefaultWeightMsgFundCommunityPool, types.ModuleName, sdk.MsgTypeURL(&types.MsgFundCommunityPool{})}, + } + + for i, w := range weightedOps { + operationMsg, _, err := w.Op()(r, suite.app.BaseApp, suite.ctx, accs, "") + suite.Require().NoError(err) + + // the following checks are very much dependent from the ordering of the output given + // by WeightedOperations. if the ordering in WeightedOperations changes some tests + // will fail + suite.Require().Equal(expected[i].weight, w.Weight(), "weight should be the same") + suite.Require().Equal(expected[i].opMsgRoute, operationMsg.Route, "route should be the same") + suite.Require().Equal(expected[i].opMsgName, operationMsg.Name, "operation Msg name should be the same") + } +} + +// TestSimulateMsgSetWithdrawAddress tests the normal scenario of a valid message of type TypeMsgSetWithdrawAddress. +// Abonormal scenarios, where the message is created by an errors, are not tested here. +func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { + // setup 3 accounts + s := rand.NewSource(1) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 3) + + suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.app.LastBlockHeight() + 1, + Hash: suite.app.LastCommitID().Hash, + }) + + // execute operation + op := simulation.SimulateMsgSetWithdrawAddress(suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.distrKeeper) + operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "") + suite.Require().NoError(err) + + var msg types.MsgSetWithdrawAddress + err = proto.Unmarshal(operationMsg.Msg, &msg) + suite.Require().NoError(err) + suite.Require().True(operationMsg.OK) + suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) + suite.Require().Equal("cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.WithdrawAddress) + suite.Require().Equal(sdk.MsgTypeURL(&types.MsgSetWithdrawAddress{}), sdk.MsgTypeURL(&msg)) + suite.Require().Len(futureOperations, 0) +} + +// TestSimulateMsgWithdrawDelegatorReward tests the normal scenario of a valid message +// of type TypeMsgWithdrawDelegatorReward. +// Abonormal scenarios, where the message is created by an errors, are not tested here. +func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { + // setup 3 accounts + s := rand.NewSource(4) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 3) + + // setup accounts[0] as validator + validator0 := suite.getTestingValidator0(accounts) + + // setup delegation + delTokens := sdk.TokensFromConsensusPower(2, sdk.DefaultPowerReduction) + validator0, issuedShares := validator0.AddTokensFromDel(delTokens) + delegator := accounts[1] + + delegation := stakingtypes.NewDelegation(delegator.Address.String(), validator0.GetOperator(), issuedShares) + suite.Require().NoError(suite.stakingKeeper.SetDelegation(suite.ctx, delegation)) + valBz, err := address.NewBech32Codec("cosmosvaloper").StringToBytes(validator0.GetOperator()) + suite.Require().NoError(err) + suite.distrKeeper.SetDelegatorStartingInfo(suite.ctx, valBz, delegator.Address, types.NewDelegatorStartingInfo(2, math.LegacyOneDec(), 200)) + + suite.setupValidatorRewards(valBz) + + _, err = suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.app.LastBlockHeight() + 1, + Hash: suite.app.LastCommitID().Hash, + }) + suite.Require().NoError(err) + + // execute operation + op := simulation.SimulateMsgWithdrawDelegatorReward(suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.distrKeeper, suite.stakingKeeper) + operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "") + suite.Require().NoError(err) + + var msg types.MsgWithdrawDelegatorReward + err = proto.Unmarshal(operationMsg.Msg, &msg) + suite.Require().NoError(err) + suite.Require().True(operationMsg.OK) + suite.Require().Equal("cosmosvaloper1l4s054098kk9hmr5753c6k3m2kw65h686d3mhr", msg.ValidatorAddress) + suite.Require().Equal("cosmos1d6u7zhjwmsucs678d7qn95uqajd4ucl9jcjt26", msg.DelegatorAddress) + suite.Require().Equal(sdk.MsgTypeURL(&types.MsgWithdrawDelegatorReward{}), sdk.MsgTypeURL(&msg)) + suite.Require().Len(futureOperations, 0) +} + +// TestSimulateMsgWithdrawValidatorCommission tests the normal scenario of a valid message +// of type TypeMsgWithdrawValidatorCommission. +// Abonormal scenarios, where the message is created by an errors, are not tested here. +func (suite *SimTestSuite) TestSimulateMsgWithdrawValidatorCommission() { + suite.testSimulateMsgWithdrawValidatorCommission("atoken") + suite.testSimulateMsgWithdrawValidatorCommission("tokenxxx") +} + +// all the checks in this function should not fail if we change the tokenName +func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName string) { + // setup 3 accounts + s := rand.NewSource(1) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 3) + + // setup accounts[0] as validator + validator0 := suite.getTestingValidator0(accounts) + + // set module account coins + distrAcc := suite.distrKeeper.GetDistributionAccount(suite.ctx) + suite.Require().NoError(banktestutil.FundModuleAccount(suite.ctx, suite.bankKeeper, distrAcc.GetName(), sdk.NewCoins( + sdk.NewCoin(tokenName, math.NewInt(10)), + sdk.NewCoin("stake", math.NewInt(5)), + ))) + suite.accountKeeper.SetModuleAccount(suite.ctx, distrAcc) + + // set outstanding rewards + valCommission := sdk.NewDecCoins( + sdk.NewDecCoinFromDec(tokenName, math.LegacyNewDec(5).Quo(math.LegacyNewDec(2))), + sdk.NewDecCoinFromDec("stake", math.LegacyNewDec(1).Quo(math.LegacyNewDec(1))), + ) + valCodec := address.NewBech32Codec("cosmosvaloper") + + val0, err := valCodec.StringToBytes(validator0.GetOperator()) + suite.Require().NoError(err) + + genVal0, err := valCodec.StringToBytes(suite.genesisVals[0].GetOperator()) + suite.Require().NoError(err) + + suite.distrKeeper.SetValidatorOutstandingRewards(suite.ctx, val0, types.ValidatorOutstandingRewards{Rewards: valCommission}) + suite.distrKeeper.SetValidatorOutstandingRewards(suite.ctx, genVal0, types.ValidatorOutstandingRewards{Rewards: valCommission}) + + // setup validator accumulated commission + suite.distrKeeper.SetValidatorAccumulatedCommission(suite.ctx, val0, types.ValidatorAccumulatedCommission{Commission: valCommission}) + suite.distrKeeper.SetValidatorAccumulatedCommission(suite.ctx, genVal0, types.ValidatorAccumulatedCommission{Commission: valCommission}) + + _, err = suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.app.LastBlockHeight() + 1, + Hash: suite.app.LastCommitID().Hash, + }) + suite.Require().NoError(err) + + // execute operation + op := simulation.SimulateMsgWithdrawValidatorCommission(suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.distrKeeper, suite.stakingKeeper) + operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "") + if !operationMsg.OK { + suite.Require().Equal("could not find account", operationMsg.Comment) + } else { + suite.Require().NoError(err) + + var msg types.MsgWithdrawValidatorCommission + err = proto.Unmarshal(operationMsg.Msg, &msg) + suite.Require().NoError(err) + suite.Require().True(operationMsg.OK) + suite.Require().Equal("cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) + suite.Require().Equal(sdk.MsgTypeURL(&types.MsgWithdrawValidatorCommission{}), sdk.MsgTypeURL(&msg)) + suite.Require().Len(futureOperations, 0) + } +} + +// TestSimulateMsgFundCommunityPool tests the normal scenario of a valid message of type TypeMsgFundCommunityPool. +// Abonormal scenarios, where the message is created by an errors, are not tested here. +func (suite *SimTestSuite) TestSimulateMsgFundCommunityPool() { + // setup 3 accounts + s := rand.NewSource(1) + r := rand.New(s) + accounts := suite.getTestingAccounts(r, 3) + + suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.app.LastBlockHeight() + 1, + Hash: suite.app.LastCommitID().Hash, + }) + + // execute operation + op := simulation.SimulateMsgFundCommunityPool(suite.txConfig, suite.accountKeeper, suite.bankKeeper, suite.distrKeeper, suite.stakingKeeper) + operationMsg, futureOperations, err := op(r, suite.app.BaseApp, suite.ctx, accounts, "") + suite.Require().NoError(err) + + var msg types.MsgFundCommunityPool + err = proto.Unmarshal(operationMsg.Msg, &msg) + suite.Require().NoError(err) + suite.Require().True(operationMsg.OK) + suite.Require().Equal("4896096stake", msg.Amount.String()) + suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) + suite.Require().Equal(sdk.MsgTypeURL(&types.MsgFundCommunityPool{}), sdk.MsgTypeURL(&msg)) + suite.Require().Len(futureOperations, 0) +} + +type SimTestSuite struct { + suite.Suite + + ctx sdk.Context + app *runtime.App + genesisVals []stakingtypes.Validator + + txConfig client.TxConfig + cdc codec.Codec + stakingKeeper *stakingkeeper.Keeper + accountKeeper authkeeper.AccountKeeper + bankKeeper bankkeeper.Keeper + distrKeeper keeper.Keeper +} + +func (suite *SimTestSuite) SetupTest() { + var ( + appBuilder *runtime.AppBuilder + err error + ) + suite.app, err = simtestutil.Setup( + depinject.Configs( + distrtestutil.AppConfig, + depinject.Supply(log.NewNopLogger()), + ), + &suite.accountKeeper, + &suite.bankKeeper, + &suite.cdc, + &appBuilder, + &suite.stakingKeeper, + &suite.distrKeeper, + &suite.txConfig, + ) + + suite.NoError(err) + + suite.ctx = suite.app.BaseApp.NewContext(false) + + genesisVals, err := suite.stakingKeeper.GetAllValidators(suite.ctx) + suite.Require().NoError(err) + suite.Require().Len(genesisVals, 1) + suite.genesisVals = genesisVals +} + +func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { + accounts := simtypes.RandomAccounts(r, n) + + initAmt := suite.stakingKeeper.TokensFromConsensusPower(suite.ctx, 200) + initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) + + // add coins to the accounts + for _, account := range accounts { + acc := suite.accountKeeper.NewAccountWithAddress(suite.ctx, account.Address) + suite.accountKeeper.SetAccount(suite.ctx, acc) + suite.Require().NoError(banktestutil.FundAccount(suite.ctx, suite.bankKeeper, account.Address, initCoins)) + } + + return accounts +} + +func (suite *SimTestSuite) getTestingValidator0(accounts []simtypes.Account) stakingtypes.Validator { + commission0 := stakingtypes.NewCommission(math.LegacyZeroDec(), math.LegacyOneDec(), math.LegacyOneDec()) + return suite.getTestingValidator(accounts, commission0, 0) +} + +func (suite *SimTestSuite) getTestingValidator(accounts []simtypes.Account, commission stakingtypes.Commission, n int) stakingtypes.Validator { + require := suite.Require() + account := accounts[n] + valPubKey := account.PubKey + valAddr := sdk.ValAddress(account.PubKey.Address().Bytes()) + validator, err := stakingtypes.NewValidator(valAddr.String(), valPubKey, stakingtypes. + Description{}) + require.NoError(err) + validator, err = validator.SetInitialCommission(commission) + require.NoError(err) + validator.DelegatorShares = math.LegacyNewDec(100) + validator.Tokens = math.NewInt(1000000) + + suite.stakingKeeper.SetValidator(suite.ctx, validator) + + return validator +} + +func (suite *SimTestSuite) setupValidatorRewards(valAddress sdk.ValAddress) { + decCoins := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyOneDec())} + historicalRewards := types.NewValidatorHistoricalRewards(decCoins, 2) + suite.distrKeeper.SetValidatorHistoricalRewards(suite.ctx, valAddress, 2, historicalRewards) + // setup current revards + currentRewards := types.NewValidatorCurrentRewards(decCoins, 3) + suite.distrKeeper.SetValidatorCurrentRewards(suite.ctx, valAddress, currentRewards) +} + +func TestSimTestSuite(t *testing.T) { + suite.Run(t, new(SimTestSuite)) +} diff --git a/x/distribution/simulation/proposals.go b/x/distribution/simulation/proposals.go new file mode 100644 index 0000000..bb5488a --- /dev/null +++ b/x/distribution/simulation/proposals.go @@ -0,0 +1,46 @@ +package simulation + +import ( + "math/rand" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/cosmos/cosmos-sdk/x/simulation" +) + +// Simulation operation weights constants +const ( + DefaultWeightMsgUpdateParams int = 50 + + OpWeightMsgUpdateParams = "op_weight_msg_update_params" +) + +// ProposalMsgs defines the module weighted proposals' contents +func ProposalMsgs() []simtypes.WeightedProposalMsg { + return []simtypes.WeightedProposalMsg{ + simulation.NewWeightedProposalMsg( + OpWeightMsgUpdateParams, + DefaultWeightMsgUpdateParams, + SimulateMsgUpdateParams, + ), + } +} + +// SimulateMsgUpdateParams returns a random MsgUpdateParams +func SimulateMsgUpdateParams(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg { + // use the default gov module account address as authority + var authority sdk.AccAddress = address.Module("gov") + + params := types.DefaultParams() + params.CommunityTax = simtypes.RandomDecAmount(r, sdkmath.LegacyNewDec(1)) + params.WithdrawAddrEnabled = r.Intn(2) == 0 + + return &types.MsgUpdateParams{ + Authority: authority.String(), + Params: params, + } +} diff --git a/x/distribution/simulation/proposals_test.go b/x/distribution/simulation/proposals_test.go new file mode 100644 index 0000000..99d0b91 --- /dev/null +++ b/x/distribution/simulation/proposals_test.go @@ -0,0 +1,44 @@ +package simulation_test + +import ( + "math/rand" + "testing" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "gotest.tools/v3/assert" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/simulation" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +func TestProposalMsgs(t *testing.T) { + // initialize parameters + s := rand.NewSource(1) + r := rand.New(s) + + ctx := sdk.NewContext(nil, cmtproto.Header{}, true, nil) + accounts := simtypes.RandomAccounts(r, 3) + + // execute ProposalMsgs function + weightedProposalMsgs := simulation.ProposalMsgs() + assert.Assert(t, len(weightedProposalMsgs) == 1) + + w0 := weightedProposalMsgs[0] + + // tests w0 interface: + assert.Equal(t, simulation.OpWeightMsgUpdateParams, w0.AppParamsKey()) + assert.Equal(t, simulation.DefaultWeightMsgUpdateParams, w0.DefaultWeight()) + + msg := w0.MsgSimulatorFn()(r, ctx, accounts) + msgUpdateParams, ok := msg.(*types.MsgUpdateParams) + assert.Assert(t, ok) + + assert.Equal(t, sdk.AccAddress(address.Module("gov")).String(), msgUpdateParams.Authority) + assert.DeepEqual(t, sdkmath.LegacyNewDec(0), msgUpdateParams.Params.CommunityTax) + assert.Equal(t, true, msgUpdateParams.Params.WithdrawAddrEnabled) +} diff --git a/x/distribution/testutil/app_config.go b/x/distribution/testutil/app_config.go new file mode 100644 index 0000000..c824f4d --- /dev/null +++ b/x/distribution/testutil/app_config.go @@ -0,0 +1,26 @@ +package testutil + +import ( + "github.com/cosmos/cosmos-sdk/testutil/configurator" + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/distribution" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/mint" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/params" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/staking" // import as blank for app wiring +) + +var AppConfig = configurator.NewAppConfig( + configurator.AuthModule(), + configurator.BankModule(), + configurator.StakingModule(), + configurator.TxModule(), + configurator.ConsensusModule(), + configurator.ParamsModule(), + configurator.GenutilModule(), + configurator.DistributionModule(), + configurator.MintModule(), +) diff --git a/x/distribution/testutil/expected_keepers_mocks.go b/x/distribution/testutil/expected_keepers_mocks.go new file mode 100644 index 0000000..c8d2225 --- /dev/null +++ b/x/distribution/testutil/expected_keepers_mocks.go @@ -0,0 +1,433 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/distribution/types/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + context "context" + reflect "reflect" + + address "cosmossdk.io/core/address" + types "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/x/staking/types" + gomock "github.com/golang/mock/gomock" +) + +// MockAccountKeeper is a mock of AccountKeeper interface. +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +// NewMockAccountKeeper creates a new mock instance. +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +// AddressCodec mocks base method. +func (m *MockAccountKeeper) AddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// AddressCodec indicates an expected call of AddressCodec. +func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddressCodec", reflect.TypeOf((*MockAccountKeeper)(nil).AddressCodec)) +} + +// GetAccount mocks base method. +func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccount", ctx, addr) + ret0, _ := ret[0].(types.AccountI) + return ret0 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) +} + +// GetModuleAccount mocks base method. +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, name string) types.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, name) + ret0, _ := ret[0].(types.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, name) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", name) + ret0, _ := ret[0].(types.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) +} + +// SetModuleAccount mocks base method. +func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types.ModuleAccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) +} + +// SetModuleAccount indicates an expected call of SetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) +} + +// MockBankKeeper is a mock of BankKeeper interface. +type MockBankKeeper struct { + ctrl *gomock.Controller + recorder *MockBankKeeperMockRecorder +} + +// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. +type MockBankKeeperMockRecorder struct { + mock *MockBankKeeper +} + +// NewMockBankKeeper creates a new mock instance. +func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { + mock := &MockBankKeeper{ctrl: ctrl} + mock.recorder = &MockBankKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { + return m.recorder +} + +// BlockedAddr mocks base method. +func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BlockedAddr", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// BlockedAddr indicates an expected call of BlockedAddr. +func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr) +} + +// GetAllBalances mocks base method. +func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types.AccAddress) types.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 +} + +// GetAllBalances indicates an expected call of GetAllBalances. +func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) +} + +// SendCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) +} + +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) +} + +// SendCoinsFromModuleToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) +} + +// SpendableCoins mocks base method. +func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 +} + +// SpendableCoins indicates an expected call of SpendableCoins. +func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) +} + +// MockStakingKeeper is a mock of StakingKeeper interface. +type MockStakingKeeper struct { + ctrl *gomock.Controller + recorder *MockStakingKeeperMockRecorder +} + +// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. +type MockStakingKeeperMockRecorder struct { + mock *MockStakingKeeper +} + +// NewMockStakingKeeper creates a new mock instance. +func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { + mock := &MockStakingKeeper{ctrl: ctrl} + mock.recorder = &MockStakingKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { + return m.recorder +} + +// ConsensusAddressCodec mocks base method. +func (m *MockStakingKeeper) ConsensusAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConsensusAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ConsensusAddressCodec indicates an expected call of ConsensusAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ConsensusAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsensusAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ConsensusAddressCodec)) +} + +// Delegation mocks base method. +func (m *MockStakingKeeper) Delegation(arg0 context.Context, arg1 types.AccAddress, arg2 types.ValAddress) (types0.DelegationI, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delegation", arg0, arg1, arg2) + ret0, _ := ret[0].(types0.DelegationI) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delegation indicates an expected call of Delegation. +func (mr *MockStakingKeeperMockRecorder) Delegation(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegation", reflect.TypeOf((*MockStakingKeeper)(nil).Delegation), arg0, arg1, arg2) +} + +// GetAllDelegatorDelegations mocks base method. +func (m *MockStakingKeeper) GetAllDelegatorDelegations(ctx context.Context, delegator types.AccAddress) ([]types0.Delegation, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllDelegatorDelegations", ctx, delegator) + ret0, _ := ret[0].([]types0.Delegation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllDelegatorDelegations indicates an expected call of GetAllDelegatorDelegations. +func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegator interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllDelegatorDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllDelegatorDelegations), ctx, delegator) +} + +// GetAllSDKDelegations mocks base method. +func (m *MockStakingKeeper) GetAllSDKDelegations(ctx context.Context) ([]types0.Delegation, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllSDKDelegations", ctx) + ret0, _ := ret[0].([]types0.Delegation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllSDKDelegations indicates an expected call of GetAllSDKDelegations. +func (mr *MockStakingKeeperMockRecorder) GetAllSDKDelegations(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSDKDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllSDKDelegations), ctx) +} + +// GetAllValidators mocks base method. +func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]types0.Validator, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllValidators", ctx) + ret0, _ := ret[0].([]types0.Validator) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllValidators indicates an expected call of GetAllValidators. +func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllValidators), ctx) +} + +// IterateDelegations mocks base method. +func (m *MockStakingKeeper) IterateDelegations(ctx context.Context, delegator types.AccAddress, fn func(int64, types0.DelegationI) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) + ret0, _ := ret[0].(error) + return ret0 +} + +// IterateDelegations indicates an expected call of IterateDelegations. +func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn) +} + +// IterateValidators mocks base method. +func (m *MockStakingKeeper) IterateValidators(arg0 context.Context, arg1 func(int64, types0.ValidatorI) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IterateValidators", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// IterateValidators indicates an expected call of IterateValidators. +func (mr *MockStakingKeeperMockRecorder) IterateValidators(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateValidators", reflect.TypeOf((*MockStakingKeeper)(nil).IterateValidators), arg0, arg1) +} + +// Validator mocks base method. +func (m *MockStakingKeeper) Validator(arg0 context.Context, arg1 types.ValAddress) (types0.ValidatorI, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Validator", arg0, arg1) + ret0, _ := ret[0].(types0.ValidatorI) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Validator indicates an expected call of Validator. +func (mr *MockStakingKeeperMockRecorder) Validator(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validator", reflect.TypeOf((*MockStakingKeeper)(nil).Validator), arg0, arg1) +} + +// ValidatorAddressCodec mocks base method. +func (m *MockStakingKeeper) ValidatorAddressCodec() address.Codec { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorAddressCodec") + ret0, _ := ret[0].(address.Codec) + return ret0 +} + +// ValidatorAddressCodec indicates an expected call of ValidatorAddressCodec. +func (mr *MockStakingKeeperMockRecorder) ValidatorAddressCodec() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorAddressCodec)) +} + +// ValidatorByConsAddr mocks base method. +func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types.ConsAddress) (types0.ValidatorI, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorByConsAddr", arg0, arg1) + ret0, _ := ret[0].(types0.ValidatorI) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr. +func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorByConsAddr), arg0, arg1) +} + +// MockStakingHooks is a mock of StakingHooks interface. +type MockStakingHooks struct { + ctrl *gomock.Controller + recorder *MockStakingHooksMockRecorder +} + +// MockStakingHooksMockRecorder is the mock recorder for MockStakingHooks. +type MockStakingHooksMockRecorder struct { + mock *MockStakingHooks +} + +// NewMockStakingHooks creates a new mock instance. +func NewMockStakingHooks(ctrl *gomock.Controller) *MockStakingHooks { + mock := &MockStakingHooks{ctrl: ctrl} + mock.recorder = &MockStakingHooksMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStakingHooks) EXPECT() *MockStakingHooksMockRecorder { + return m.recorder +} + +// AfterDelegationModified mocks base method. +func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AfterDelegationModified", ctx, delAddr, valAddr) + ret0, _ := ret[0].(error) + return ret0 +} + +// AfterDelegationModified indicates an expected call of AfterDelegationModified. +func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterDelegationModified", reflect.TypeOf((*MockStakingHooks)(nil).AfterDelegationModified), ctx, delAddr, valAddr) +} + +// AfterValidatorCreated mocks base method. +func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types.ValAddress) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AfterValidatorCreated", ctx, valAddr) + ret0, _ := ret[0].(error) + return ret0 +} + +// AfterValidatorCreated indicates an expected call of AfterValidatorCreated. +func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterValidatorCreated", reflect.TypeOf((*MockStakingHooks)(nil).AfterValidatorCreated), ctx, valAddr) +} diff --git a/x/distribution/testutil/staking_helper.go b/x/distribution/testutil/staking_helper.go new file mode 100644 index 0000000..a031774 --- /dev/null +++ b/x/distribution/testutil/staking_helper.go @@ -0,0 +1,143 @@ +package testutil + +import ( + "fmt" + + "cosmossdk.io/math" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func CreateValidator(pk cryptotypes.PubKey, stake math.Int) (stakingtypes.Validator, error) { + valConsAddr := sdk.GetConsAddress(pk) + val, err := stakingtypes.NewValidator(sdk.ValAddress(valConsAddr).String(), pk, stakingtypes.Description{Moniker: "TestValidator"}) + val.Tokens = stake + val.DelegatorShares = math.LegacyNewDecFromInt(val.Tokens) + return val, err +} + +func CallCreateValidatorHooks(ctx sdk.Context, k keeper.Keeper, addr sdk.AccAddress, valAddr sdk.ValAddress) error { + err := k.Hooks().AfterValidatorCreated(ctx, valAddr) + if err != nil { + return err + } + + err = k.Hooks().BeforeDelegationCreated(ctx, addr, valAddr) + if err != nil { + return err + } + + err = k.Hooks().AfterDelegationModified(ctx, addr, valAddr) + if err != nil { + return err + } + + return nil +} + +// SlashValidator copies what x/staking Slash does. It should be used for testing only. +// And it must be updated whenever the original function is updated. +// The passed validator will get its tokens updated. +func SlashValidator( + ctx sdk.Context, + consAddr sdk.ConsAddress, + infractionHeight int64, + power int64, + slashFactor math.LegacyDec, + validator *stakingtypes.Validator, + distrKeeper *keeper.Keeper, + sk *MockStakingKeeper, +) math.Int { + if slashFactor.IsNegative() { + panic(fmt.Errorf("attempted to slash with a negative slash factor: %v", slashFactor)) + } + + valBz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + panic(err) + } + + // call the before-modification hook + err = distrKeeper.Hooks().BeforeValidatorModified(ctx, valBz) + if err != nil { + panic(err) + } + + // we simplify this part, as we won't be able to test redelegations or + // unbonding delegations + if infractionHeight != ctx.BlockHeight() { + // if a new test lands here we might need to update this function to handle redelegations and unbonding + // or just make it an integration test. + panic("we can't test any other case here") + } + + slashAmountDec := math.LegacyNewDecFromInt(validator.Tokens).Mul(math.LegacyNewDecWithPrec(5, 1)) + slashAmount := slashAmountDec.TruncateInt() + + // cannot decrease balance below zero + tokensToBurn := math.MinInt(slashAmount, validator.Tokens) + tokensToBurn = math.MaxInt(tokensToBurn, math.ZeroInt()) // defensive. + + // we need to calculate the *effective* slash fraction for distribution + if validator.Tokens.IsPositive() { + effectiveFraction := math.LegacyNewDecFromInt(tokensToBurn).QuoRoundUp(math.LegacyNewDecFromInt(validator.Tokens)) + // possible if power has changed + if effectiveFraction.GT(math.LegacyOneDec()) { + effectiveFraction = math.LegacyOneDec() + } + // call the before-slashed hook + err := distrKeeper.Hooks().BeforeValidatorSlashed(ctx, valBz, effectiveFraction) + if err != nil { + panic(err) + } + } + // Deduct from validator's bonded tokens and update the validator. + // Burn the slashed tokens from the pool account and decrease the total supply. + validator.Tokens = validator.Tokens.Sub(tokensToBurn) + + return tokensToBurn +} + +// Delegate imitate what x/staking Delegate does. It should be used for testing only. +// If a delegation is passed we are simulating an update to a previous delegation, +// if it's nil then we simulate a new delegation. +func Delegate( + ctx sdk.Context, + distrKeeper keeper.Keeper, + delegator sdk.AccAddress, + validator *stakingtypes.Validator, + amount math.Int, + delegation *stakingtypes.Delegation, + sk *MockStakingKeeper, +) ( + newShares math.LegacyDec, + updatedDel stakingtypes.Delegation, + err error, +) { + valBz, err := sk.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + if err != nil { + return math.LegacyZeroDec(), stakingtypes.Delegation{}, err + } + if delegation != nil { + err = distrKeeper.Hooks().BeforeDelegationSharesModified(ctx, delegator, valBz) + } else { + err = distrKeeper.Hooks().BeforeDelegationCreated(ctx, delegator, valBz) + del := stakingtypes.NewDelegation(delegator.String(), validator.GetOperator(), math.LegacyZeroDec()) + delegation = &del + } + + if err != nil { + return math.LegacyZeroDec(), stakingtypes.Delegation{}, err + } + + // Add tokens from delegation to validator + updateVal, newShares := validator.AddTokensFromDel(amount) + *validator = updateVal + + delegation.Shares = delegation.Shares.Add(newShares) + + return newShares, *delegation, nil +} diff --git a/x/distribution/types/codec.go b/x/distribution/types/codec.go new file mode 100644 index 0000000..3cf2c73 --- /dev/null +++ b/x/distribution/types/codec.go @@ -0,0 +1,45 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +// RegisterLegacyAminoCodec registers the necessary x/distribution interfaces +// and concrete types on the provided LegacyAmino codec. These types are used +// for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgWithdrawDelegatorReward{}, "cosmos-sdk/MsgWithdrawDelegationReward") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawValidatorCommission{}, "cosmos-sdk/MsgWithdrawValCommission") + legacy.RegisterAminoMsg(cdc, &MsgSetWithdrawAddress{}, "cosmos-sdk/MsgModifyWithdrawAddress") + legacy.RegisterAminoMsg(cdc, &MsgFundCommunityPool{}, "cosmos-sdk/MsgFundCommunityPool") + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/distribution/MsgUpdateParams") + legacy.RegisterAminoMsg(cdc, &MsgCommunityPoolSpend{}, "cosmos-sdk/distr/MsgCommunityPoolSpend") + legacy.RegisterAminoMsg(cdc, &MsgDepositValidatorRewardsPool{}, "cosmos-sdk/distr/MsgDepositValRewards") + + cdc.RegisterConcrete(Params{}, "cosmos-sdk/x/distribution/Params", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgWithdrawDelegatorReward{}, + &MsgWithdrawValidatorCommission{}, + &MsgSetWithdrawAddress{}, + &MsgFundCommunityPool{}, + &MsgUpdateParams{}, + &MsgCommunityPoolSpend{}, + &MsgDepositValidatorRewardsPool{}, + ) + + registry.RegisterImplementations( + (*govtypes.Content)(nil), + &CommunityPoolSpendProposal{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/distribution/types/delegator.go b/x/distribution/types/delegator.go new file mode 100644 index 0000000..aa86ee8 --- /dev/null +++ b/x/distribution/types/delegator.go @@ -0,0 +1,12 @@ +package types + +import sdkmath "cosmossdk.io/math" + +// create a new DelegatorStartingInfo +func NewDelegatorStartingInfo(previousPeriod uint64, stake sdkmath.LegacyDec, height uint64) DelegatorStartingInfo { + return DelegatorStartingInfo{ + PreviousPeriod: previousPeriod, + Stake: stake, + Height: height, + } +} diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go new file mode 100644 index 0000000..bd9f9d1 --- /dev/null +++ b/x/distribution/types/distribution.pb.go @@ -0,0 +1,3352 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/distribution/v1beta1/distribution.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the set of params for the distribution module. +type Params struct { + CommunityTax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"community_tax"` + // Deprecated: The base_proposer_reward field is deprecated and is no longer used + // in the x/distribution module's reward mechanism. + BaseProposerReward cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"base_proposer_reward"` // Deprecated: Do not use. + // Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + // in the x/distribution module's reward mechanism. + BonusProposerReward cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"bonus_proposer_reward"` // Deprecated: Do not use. + WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetWithdrawAddrEnabled() bool { + if m != nil { + return m.WithdrawAddrEnabled + } + return false +} + +// ValidatorHistoricalRewards represents historical rewards for a validator. +// Height is implicit within the store key. +// Cumulative reward ratio is the sum from the zeroeth period +// until this period of rewards / tokens, per the spec. +// The reference count indicates the number of objects +// which might need to reference this historical entry at any point. +// ReferenceCount = +// +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization +type ValidatorHistoricalRewards struct { + CumulativeRewardRatio github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=cumulative_reward_ratio,json=cumulativeRewardRatio,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"cumulative_reward_ratio"` + ReferenceCount uint32 `protobuf:"varint,2,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty"` +} + +func (m *ValidatorHistoricalRewards) Reset() { *m = ValidatorHistoricalRewards{} } +func (m *ValidatorHistoricalRewards) String() string { return proto.CompactTextString(m) } +func (*ValidatorHistoricalRewards) ProtoMessage() {} +func (*ValidatorHistoricalRewards) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{1} +} +func (m *ValidatorHistoricalRewards) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorHistoricalRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorHistoricalRewards.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorHistoricalRewards) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorHistoricalRewards.Merge(m, src) +} +func (m *ValidatorHistoricalRewards) XXX_Size() int { + return m.Size() +} +func (m *ValidatorHistoricalRewards) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorHistoricalRewards.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorHistoricalRewards proto.InternalMessageInfo + +func (m *ValidatorHistoricalRewards) GetCumulativeRewardRatio() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.CumulativeRewardRatio + } + return nil +} + +func (m *ValidatorHistoricalRewards) GetReferenceCount() uint32 { + if m != nil { + return m.ReferenceCount + } + return 0 +} + +// ValidatorCurrentRewards represents current rewards and current +// period for a validator kept as a running counter and incremented +// each block as long as the validator's tokens remain constant. +type ValidatorCurrentRewards struct { + Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` + Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` +} + +func (m *ValidatorCurrentRewards) Reset() { *m = ValidatorCurrentRewards{} } +func (m *ValidatorCurrentRewards) String() string { return proto.CompactTextString(m) } +func (*ValidatorCurrentRewards) ProtoMessage() {} +func (*ValidatorCurrentRewards) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{2} +} +func (m *ValidatorCurrentRewards) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorCurrentRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorCurrentRewards.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorCurrentRewards) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorCurrentRewards.Merge(m, src) +} +func (m *ValidatorCurrentRewards) XXX_Size() int { + return m.Size() +} +func (m *ValidatorCurrentRewards) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorCurrentRewards.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorCurrentRewards proto.InternalMessageInfo + +func (m *ValidatorCurrentRewards) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Rewards + } + return nil +} + +func (m *ValidatorCurrentRewards) GetPeriod() uint64 { + if m != nil { + return m.Period + } + return 0 +} + +// ValidatorAccumulatedCommission represents accumulated commission +// for a validator kept as a running counter, can be withdrawn at any time. +type ValidatorAccumulatedCommission struct { + Commission github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=commission,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"commission"` +} + +func (m *ValidatorAccumulatedCommission) Reset() { *m = ValidatorAccumulatedCommission{} } +func (m *ValidatorAccumulatedCommission) String() string { return proto.CompactTextString(m) } +func (*ValidatorAccumulatedCommission) ProtoMessage() {} +func (*ValidatorAccumulatedCommission) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{3} +} +func (m *ValidatorAccumulatedCommission) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorAccumulatedCommission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorAccumulatedCommission.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorAccumulatedCommission) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorAccumulatedCommission.Merge(m, src) +} +func (m *ValidatorAccumulatedCommission) XXX_Size() int { + return m.Size() +} +func (m *ValidatorAccumulatedCommission) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorAccumulatedCommission.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorAccumulatedCommission proto.InternalMessageInfo + +func (m *ValidatorAccumulatedCommission) GetCommission() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Commission + } + return nil +} + +// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +// for a validator inexpensive to track, allows simple sanity checks. +type ValidatorOutstandingRewards struct { + Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` +} + +func (m *ValidatorOutstandingRewards) Reset() { *m = ValidatorOutstandingRewards{} } +func (m *ValidatorOutstandingRewards) String() string { return proto.CompactTextString(m) } +func (*ValidatorOutstandingRewards) ProtoMessage() {} +func (*ValidatorOutstandingRewards) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{4} +} +func (m *ValidatorOutstandingRewards) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorOutstandingRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorOutstandingRewards.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorOutstandingRewards) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorOutstandingRewards.Merge(m, src) +} +func (m *ValidatorOutstandingRewards) XXX_Size() int { + return m.Size() +} +func (m *ValidatorOutstandingRewards) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorOutstandingRewards.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorOutstandingRewards proto.InternalMessageInfo + +func (m *ValidatorOutstandingRewards) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Rewards + } + return nil +} + +// ValidatorSlashEvent represents a validator slash event. +// Height is implicit within the store key. +// This is needed to calculate appropriate amount of staking tokens +// for delegations which are withdrawn after a slash has occurred. +type ValidatorSlashEvent struct { + ValidatorPeriod uint64 `protobuf:"varint,1,opt,name=validator_period,json=validatorPeriod,proto3" json:"validator_period,omitempty"` + Fraction cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=fraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fraction"` +} + +func (m *ValidatorSlashEvent) Reset() { *m = ValidatorSlashEvent{} } +func (m *ValidatorSlashEvent) String() string { return proto.CompactTextString(m) } +func (*ValidatorSlashEvent) ProtoMessage() {} +func (*ValidatorSlashEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{5} +} +func (m *ValidatorSlashEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorSlashEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorSlashEvent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorSlashEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorSlashEvent.Merge(m, src) +} +func (m *ValidatorSlashEvent) XXX_Size() int { + return m.Size() +} +func (m *ValidatorSlashEvent) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorSlashEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorSlashEvent proto.InternalMessageInfo + +func (m *ValidatorSlashEvent) GetValidatorPeriod() uint64 { + if m != nil { + return m.ValidatorPeriod + } + return 0 +} + +// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +type ValidatorSlashEvents struct { + ValidatorSlashEvents []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events"` +} + +func (m *ValidatorSlashEvents) Reset() { *m = ValidatorSlashEvents{} } +func (m *ValidatorSlashEvents) String() string { return proto.CompactTextString(m) } +func (*ValidatorSlashEvents) ProtoMessage() {} +func (*ValidatorSlashEvents) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{6} +} +func (m *ValidatorSlashEvents) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorSlashEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorSlashEvents.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorSlashEvents) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorSlashEvents.Merge(m, src) +} +func (m *ValidatorSlashEvents) XXX_Size() int { + return m.Size() +} +func (m *ValidatorSlashEvents) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorSlashEvents.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorSlashEvents proto.InternalMessageInfo + +func (m *ValidatorSlashEvents) GetValidatorSlashEvents() []ValidatorSlashEvent { + if m != nil { + return m.ValidatorSlashEvents + } + return nil +} + +// FeePool is the global fee pool for distribution. +type FeePool struct { + CommunityPool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=community_pool,json=communityPool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"community_pool"` +} + +func (m *FeePool) Reset() { *m = FeePool{} } +func (m *FeePool) String() string { return proto.CompactTextString(m) } +func (*FeePool) ProtoMessage() {} +func (*FeePool) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{7} +} +func (m *FeePool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeePool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeePool) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeePool.Merge(m, src) +} +func (m *FeePool) XXX_Size() int { + return m.Size() +} +func (m *FeePool) XXX_DiscardUnknown() { + xxx_messageInfo_FeePool.DiscardUnknown(m) +} + +var xxx_messageInfo_FeePool proto.InternalMessageInfo + +func (m *FeePool) GetCommunityPool() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.CommunityPool + } + return nil +} + +// CommunityPoolSpendProposal details a proposal for use of community funds, +// together with how many coins are proposed to be spent, and to which +// recipient account. +// +// Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no +// longer a need for an explicit CommunityPoolSpendProposal. To spend community +// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov +// module via a v1 governance proposal. +// +// Deprecated: Do not use. +type CommunityPoolSpendProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *CommunityPoolSpendProposal) Reset() { *m = CommunityPoolSpendProposal{} } +func (m *CommunityPoolSpendProposal) String() string { return proto.CompactTextString(m) } +func (*CommunityPoolSpendProposal) ProtoMessage() {} +func (*CommunityPoolSpendProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{8} +} +func (m *CommunityPoolSpendProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommunityPoolSpendProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommunityPoolSpendProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommunityPoolSpendProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommunityPoolSpendProposal.Merge(m, src) +} +func (m *CommunityPoolSpendProposal) XXX_Size() int { + return m.Size() +} +func (m *CommunityPoolSpendProposal) XXX_DiscardUnknown() { + xxx_messageInfo_CommunityPoolSpendProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_CommunityPoolSpendProposal proto.InternalMessageInfo + +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, +// thus sdk.Dec is used. +type DelegatorStartingInfo struct { + PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty"` + Stake cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=stake,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stake"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"creation_height"` +} + +func (m *DelegatorStartingInfo) Reset() { *m = DelegatorStartingInfo{} } +func (m *DelegatorStartingInfo) String() string { return proto.CompactTextString(m) } +func (*DelegatorStartingInfo) ProtoMessage() {} +func (*DelegatorStartingInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{9} +} +func (m *DelegatorStartingInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DelegatorStartingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DelegatorStartingInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DelegatorStartingInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelegatorStartingInfo.Merge(m, src) +} +func (m *DelegatorStartingInfo) XXX_Size() int { + return m.Size() +} +func (m *DelegatorStartingInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DelegatorStartingInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_DelegatorStartingInfo proto.InternalMessageInfo + +func (m *DelegatorStartingInfo) GetPreviousPeriod() uint64 { + if m != nil { + return m.PreviousPeriod + } + return 0 +} + +func (m *DelegatorStartingInfo) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +// DelegationDelegatorReward represents the properties +// of a delegator's delegation reward. +type DelegationDelegatorReward struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Reward github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=reward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward"` +} + +func (m *DelegationDelegatorReward) Reset() { *m = DelegationDelegatorReward{} } +func (m *DelegationDelegatorReward) String() string { return proto.CompactTextString(m) } +func (*DelegationDelegatorReward) ProtoMessage() {} +func (*DelegationDelegatorReward) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{10} +} +func (m *DelegationDelegatorReward) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DelegationDelegatorReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DelegationDelegatorReward.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DelegationDelegatorReward) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelegationDelegatorReward.Merge(m, src) +} +func (m *DelegationDelegatorReward) XXX_Size() int { + return m.Size() +} +func (m *DelegationDelegatorReward) XXX_DiscardUnknown() { + xxx_messageInfo_DelegationDelegatorReward.DiscardUnknown(m) +} + +var xxx_messageInfo_DelegationDelegatorReward proto.InternalMessageInfo + +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit +type CommunityPoolSpendProposalWithDeposit struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (m *CommunityPoolSpendProposalWithDeposit) Reset() { *m = CommunityPoolSpendProposalWithDeposit{} } +func (m *CommunityPoolSpendProposalWithDeposit) String() string { return proto.CompactTextString(m) } +func (*CommunityPoolSpendProposalWithDeposit) ProtoMessage() {} +func (*CommunityPoolSpendProposalWithDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{11} +} +func (m *CommunityPoolSpendProposalWithDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommunityPoolSpendProposalWithDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommunityPoolSpendProposalWithDeposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommunityPoolSpendProposalWithDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommunityPoolSpendProposalWithDeposit.Merge(m, src) +} +func (m *CommunityPoolSpendProposalWithDeposit) XXX_Size() int { + return m.Size() +} +func (m *CommunityPoolSpendProposalWithDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_CommunityPoolSpendProposalWithDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_CommunityPoolSpendProposalWithDeposit proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "cosmos.distribution.v1beta1.Params") + proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos.distribution.v1beta1.ValidatorHistoricalRewards") + proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos.distribution.v1beta1.ValidatorCurrentRewards") + proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission") + proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos.distribution.v1beta1.ValidatorOutstandingRewards") + proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEvent") + proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEvents") + proto.RegisterType((*FeePool)(nil), "cosmos.distribution.v1beta1.FeePool") + proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposal") + proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos.distribution.v1beta1.DelegatorStartingInfo") + proto.RegisterType((*DelegationDelegatorReward)(nil), "cosmos.distribution.v1beta1.DelegationDelegatorReward") + proto.RegisterType((*CommunityPoolSpendProposalWithDeposit)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit") +} + +func init() { + proto.RegisterFile("cosmos/distribution/v1beta1/distribution.proto", fileDescriptor_cd78a31ea281a992) +} + +var fileDescriptor_cd78a31ea281a992 = []byte{ + // 1012 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x34, 0x89, 0xd3, 0x4c, 0xdb, 0x84, 0x4e, 0x9c, 0xd4, 0x71, 0x8b, 0x6d, 0x56, 0xaa, + 0x30, 0x81, 0xd8, 0xa4, 0x48, 0x08, 0xe5, 0xd6, 0xd8, 0xad, 0x40, 0x2a, 0x34, 0xda, 0x20, 0x90, + 0xe0, 0xb0, 0x1a, 0xef, 0x4e, 0xec, 0x21, 0xbb, 0x33, 0xcb, 0xcc, 0xd8, 0x49, 0x0e, 0xdc, 0x03, + 0x07, 0xe0, 0x06, 0xea, 0xa9, 0x82, 0x4b, 0xc5, 0x29, 0x87, 0xfc, 0x88, 0x8a, 0x53, 0x55, 0x10, + 0x42, 0x1c, 0x02, 0x24, 0x87, 0x20, 0x7e, 0x05, 0x9a, 0x9d, 0xf1, 0xae, 0x13, 0x42, 0x81, 0x22, + 0x8b, 0x4b, 0x94, 0x79, 0x6f, 0xf6, 0x7d, 0xdf, 0xf7, 0xe6, 0x9b, 0x37, 0x86, 0x75, 0x9f, 0xcb, + 0x88, 0xcb, 0x46, 0x40, 0xa5, 0x12, 0xb4, 0xdd, 0x53, 0x94, 0xb3, 0x46, 0x7f, 0xb9, 0x4d, 0x14, + 0x5e, 0x3e, 0x11, 0xac, 0xc7, 0x82, 0x2b, 0x8e, 0xae, 0x9a, 0xfd, 0xf5, 0x13, 0x29, 0xbb, 0xbf, + 0x54, 0xe8, 0xf0, 0x0e, 0x4f, 0xf6, 0x35, 0xf4, 0x7f, 0xe6, 0x93, 0x52, 0xd9, 0x42, 0xb4, 0xb1, + 0x24, 0x69, 0x69, 0x9f, 0x53, 0x5b, 0xb2, 0xb4, 0x60, 0xf2, 0x9e, 0xf9, 0xd0, 0xd6, 0x37, 0xa9, + 0xcb, 0x38, 0xa2, 0x8c, 0x37, 0x92, 0xbf, 0x26, 0xe4, 0xdc, 0x1b, 0x83, 0xf9, 0x35, 0x2c, 0x70, + 0x24, 0xd1, 0xfb, 0xf0, 0x92, 0xcf, 0xa3, 0xa8, 0xc7, 0xa8, 0xda, 0xf1, 0x14, 0xde, 0x2e, 0x82, + 0x2a, 0xa8, 0x4d, 0xad, 0xbe, 0xfa, 0xf0, 0xa0, 0x92, 0xfb, 0xe9, 0xa0, 0x62, 0xa9, 0xca, 0x60, + 0xb3, 0x4e, 0x79, 0x23, 0xc2, 0xaa, 0x5b, 0xbf, 0x43, 0x3a, 0xd8, 0xdf, 0x69, 0x11, 0xff, 0xf1, + 0xfe, 0x12, 0xb4, 0x48, 0x2d, 0xe2, 0x3f, 0x38, 0xde, 0x5b, 0x04, 0xee, 0xc5, 0xb4, 0xd8, 0xdb, + 0x78, 0x1b, 0x7d, 0x00, 0x0b, 0x9a, 0xb0, 0x66, 0x15, 0x73, 0x49, 0x84, 0x27, 0xc8, 0x16, 0x16, + 0x41, 0xf1, 0x5c, 0x82, 0xf1, 0xda, 0xd3, 0x61, 0x14, 0x81, 0x8b, 0x74, 0xd5, 0x35, 0x5b, 0xd4, + 0x4d, 0x6a, 0xa2, 0x10, 0xce, 0xb5, 0x39, 0xeb, 0xc9, 0x3f, 0x81, 0x8d, 0xfd, 0x47, 0xb0, 0xd9, + 0xa4, 0xec, 0x29, 0xb4, 0x1b, 0x70, 0x6e, 0x8b, 0xaa, 0x6e, 0x20, 0xf0, 0x96, 0x87, 0x83, 0x40, + 0x78, 0x84, 0xe1, 0x76, 0x48, 0x82, 0xe2, 0x78, 0x15, 0xd4, 0xce, 0xbb, 0xb3, 0x83, 0xe4, 0xcd, + 0x20, 0x10, 0xb7, 0x4c, 0x6a, 0xe5, 0xfa, 0x27, 0xc7, 0x7b, 0x8b, 0x55, 0x03, 0xb0, 0x24, 0x83, + 0xcd, 0xc6, 0xf6, 0x49, 0xc7, 0x98, 0x13, 0x71, 0x7e, 0x00, 0xb0, 0xf4, 0x0e, 0x0e, 0x69, 0x80, + 0x15, 0x17, 0xaf, 0x53, 0xa9, 0xb8, 0xa0, 0x3e, 0x0e, 0x0d, 0xb0, 0x44, 0x9f, 0x02, 0x78, 0xc5, + 0xef, 0x45, 0xbd, 0x10, 0x2b, 0xda, 0x27, 0x56, 0xa4, 0x27, 0xb0, 0xa2, 0xbc, 0x08, 0xaa, 0x63, + 0xb5, 0x0b, 0x37, 0xae, 0x59, 0x3f, 0xd6, 0x75, 0x97, 0x06, 0xbe, 0xd2, 0x8a, 0x9a, 0x9c, 0x32, + 0xd3, 0x88, 0x6f, 0x7e, 0xae, 0xbc, 0xd8, 0xa1, 0xaa, 0xdb, 0x6b, 0xd7, 0x7d, 0x1e, 0x59, 0xbf, + 0x34, 0x86, 0xa8, 0xa9, 0x9d, 0x98, 0xc8, 0xc1, 0x37, 0xd2, 0x9c, 0xed, 0x5c, 0x06, 0x6b, 0xc8, + 0xb8, 0x1a, 0x14, 0x3d, 0x0f, 0x67, 0x04, 0xd9, 0x20, 0x82, 0x30, 0x9f, 0x78, 0x3e, 0xef, 0x31, + 0x95, 0x9c, 0xef, 0x25, 0x77, 0x3a, 0x0d, 0x37, 0x75, 0xd4, 0xf9, 0x1a, 0xc0, 0x2b, 0xa9, 0xb0, + 0x66, 0x4f, 0x08, 0xc2, 0xd4, 0x40, 0x55, 0x0c, 0x27, 0x8d, 0x12, 0x39, 0x62, 0x11, 0x03, 0x18, + 0x34, 0x0f, 0xf3, 0x31, 0x11, 0x94, 0x1b, 0x37, 0x8e, 0xbb, 0x76, 0xe5, 0x7c, 0x09, 0x60, 0x39, + 0x65, 0x79, 0xd3, 0xb7, 0x9a, 0x49, 0xd0, 0xe4, 0x51, 0x44, 0xa5, 0xa4, 0x9c, 0xa1, 0x3e, 0x84, + 0x7e, 0xba, 0x1a, 0x31, 0xdf, 0x21, 0x24, 0xe7, 0x33, 0x00, 0xaf, 0xa6, 0xd4, 0xee, 0xf6, 0x94, + 0x54, 0x98, 0x05, 0x94, 0x75, 0xfe, 0xb7, 0x26, 0x6a, 0x46, 0xb3, 0x29, 0xa3, 0xf5, 0x10, 0xcb, + 0xee, 0xad, 0x3e, 0x61, 0x0a, 0xbd, 0x00, 0x9f, 0xe9, 0x0f, 0xc2, 0x9e, 0x6d, 0x33, 0x48, 0xda, + 0x3c, 0x93, 0xc6, 0xd7, 0x92, 0x30, 0x7a, 0x13, 0x9e, 0xdf, 0x10, 0xd8, 0xd7, 0x37, 0xc0, 0xce, + 0x85, 0xe5, 0x7f, 0x7d, 0x55, 0xdd, 0xb4, 0x84, 0xf3, 0x31, 0x80, 0x85, 0x33, 0x18, 0x49, 0xf4, + 0x21, 0x9c, 0xcf, 0x28, 0x49, 0x9d, 0xf0, 0x48, 0x92, 0xb1, 0xbd, 0x7a, 0xb9, 0xfe, 0x84, 0xa9, + 0x5c, 0x3f, 0xa3, 0xe4, 0xea, 0x94, 0xe6, 0x69, 0x1a, 0x52, 0xe8, 0x9f, 0x01, 0xe9, 0xec, 0x02, + 0x38, 0x79, 0x9b, 0x90, 0x35, 0xce, 0x43, 0xf4, 0x11, 0x9c, 0xce, 0xe6, 0x6c, 0xcc, 0x79, 0x38, + 0xe2, 0x23, 0xca, 0xa6, 0xba, 0x86, 0x77, 0xbe, 0x38, 0x07, 0x4b, 0xcd, 0xe1, 0xc8, 0x7a, 0x4c, + 0x58, 0x60, 0x86, 0x1a, 0x0e, 0x51, 0x01, 0x4e, 0x28, 0xaa, 0x42, 0x62, 0xa6, 0xbf, 0x6b, 0x16, + 0xa8, 0x0a, 0x2f, 0x04, 0x44, 0xfa, 0x82, 0xc6, 0xd9, 0xe9, 0xb8, 0xc3, 0x21, 0x74, 0x0d, 0x4e, + 0x09, 0xe2, 0xd3, 0x98, 0x12, 0xa6, 0xcc, 0xa0, 0x75, 0xb3, 0x00, 0xda, 0x81, 0x79, 0x1c, 0x25, + 0x03, 0x61, 0x3c, 0xd1, 0xba, 0x70, 0xa6, 0xd6, 0x44, 0xe8, 0x6d, 0x2b, 0xb4, 0xf6, 0x0f, 0x84, + 0x26, 0x2a, 0xef, 0x1d, 0xef, 0x2d, 0x5e, 0x0c, 0x13, 0x3b, 0x78, 0x7e, 0x26, 0xdb, 0x02, 0xae, + 0xd4, 0x76, 0xef, 0x57, 0x72, 0xbf, 0xdd, 0xaf, 0xe4, 0xbe, 0xdd, 0x5f, 0x2a, 0x59, 0xd4, 0x0e, + 0xef, 0x0f, 0x81, 0x32, 0xa5, 0x39, 0x03, 0xe7, 0x7b, 0x00, 0xe7, 0x5a, 0x44, 0x57, 0xd2, 0xa7, + 0xa7, 0xb0, 0x50, 0x94, 0x75, 0xde, 0x60, 0x1b, 0xc9, 0x60, 0x8b, 0x05, 0xe9, 0x53, 0xae, 0x1f, + 0x95, 0x61, 0x0f, 0x4f, 0x0f, 0xc2, 0xd6, 0xc2, 0x77, 0xe0, 0x84, 0x54, 0x78, 0x93, 0x58, 0xff, + 0x3e, 0xed, 0xdb, 0x69, 0x8a, 0xa0, 0x16, 0xcc, 0x77, 0x09, 0xed, 0x74, 0x4d, 0x43, 0xc7, 0x57, + 0x5f, 0xfa, 0xfd, 0xa0, 0x32, 0xe3, 0x0b, 0xa2, 0x87, 0x2d, 0xf3, 0x4c, 0xea, 0xab, 0xe3, 0xbd, + 0xc5, 0xd3, 0x31, 0xdb, 0x00, 0xb3, 0x70, 0x7e, 0x05, 0x70, 0xc1, 0xca, 0xa2, 0x9c, 0xa5, 0x02, + 0xed, 0xf3, 0xf5, 0x16, 0xbc, 0x9c, 0x5d, 0x06, 0xfd, 0x7e, 0x11, 0x29, 0xed, 0xcb, 0xff, 0xdc, + 0xe3, 0xfd, 0xa5, 0x67, 0x2d, 0xb5, 0x6c, 0x0e, 0x9a, 0x2d, 0xeb, 0x4a, 0xe8, 0x71, 0x93, 0xdd, + 0x6d, 0x1b, 0x47, 0x0c, 0xe6, 0xd3, 0xa7, 0x7d, 0x94, 0xae, 0xb6, 0x28, 0x2b, 0xe3, 0xfa, 0x78, + 0x9d, 0xef, 0x00, 0xbc, 0xfe, 0xd7, 0xa6, 0x7e, 0x97, 0xaa, 0x6e, 0x8b, 0xc4, 0x5c, 0x52, 0x35, + 0x22, 0x7f, 0xcf, 0x0f, 0xf9, 0x5b, 0xa7, 0xec, 0x0a, 0x15, 0xe1, 0x64, 0x60, 0x80, 0x8b, 0x13, + 0x49, 0x62, 0xb0, 0x5c, 0x71, 0x76, 0xff, 0xd6, 0x92, 0xab, 0x77, 0x1f, 0x1c, 0x96, 0xc1, 0xc3, + 0xc3, 0x32, 0x78, 0x74, 0x58, 0x06, 0xbf, 0x1c, 0x96, 0xc1, 0xe7, 0x47, 0xe5, 0xdc, 0xa3, 0xa3, + 0x72, 0xee, 0xc7, 0xa3, 0x72, 0xee, 0xbd, 0xe5, 0x27, 0xf6, 0xec, 0xd4, 0x2f, 0x8a, 0xa4, 0x85, + 0xed, 0x7c, 0xf2, 0xa3, 0xef, 0x95, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0xae, 0xbc, 0xbc, + 0xa7, 0x0a, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CommunityTax.Equal(that1.CommunityTax) { + return false + } + if !this.BaseProposerReward.Equal(that1.BaseProposerReward) { + return false + } + if !this.BonusProposerReward.Equal(that1.BonusProposerReward) { + return false + } + if this.WithdrawAddrEnabled != that1.WithdrawAddrEnabled { + return false + } + return true +} +func (this *ValidatorHistoricalRewards) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidatorHistoricalRewards) + if !ok { + that2, ok := that.(ValidatorHistoricalRewards) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CumulativeRewardRatio) != len(that1.CumulativeRewardRatio) { + return false + } + for i := range this.CumulativeRewardRatio { + if !this.CumulativeRewardRatio[i].Equal(&that1.CumulativeRewardRatio[i]) { + return false + } + } + if this.ReferenceCount != that1.ReferenceCount { + return false + } + return true +} +func (this *ValidatorCurrentRewards) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidatorCurrentRewards) + if !ok { + that2, ok := that.(ValidatorCurrentRewards) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Rewards) != len(that1.Rewards) { + return false + } + for i := range this.Rewards { + if !this.Rewards[i].Equal(&that1.Rewards[i]) { + return false + } + } + if this.Period != that1.Period { + return false + } + return true +} +func (this *ValidatorAccumulatedCommission) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidatorAccumulatedCommission) + if !ok { + that2, ok := that.(ValidatorAccumulatedCommission) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Commission) != len(that1.Commission) { + return false + } + for i := range this.Commission { + if !this.Commission[i].Equal(&that1.Commission[i]) { + return false + } + } + return true +} +func (this *ValidatorOutstandingRewards) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidatorOutstandingRewards) + if !ok { + that2, ok := that.(ValidatorOutstandingRewards) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Rewards) != len(that1.Rewards) { + return false + } + for i := range this.Rewards { + if !this.Rewards[i].Equal(&that1.Rewards[i]) { + return false + } + } + return true +} +func (this *ValidatorSlashEvent) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidatorSlashEvent) + if !ok { + that2, ok := that.(ValidatorSlashEvent) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ValidatorPeriod != that1.ValidatorPeriod { + return false + } + if !this.Fraction.Equal(that1.Fraction) { + return false + } + return true +} +func (this *ValidatorSlashEvents) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidatorSlashEvents) + if !ok { + that2, ok := that.(ValidatorSlashEvents) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.ValidatorSlashEvents) != len(that1.ValidatorSlashEvents) { + return false + } + for i := range this.ValidatorSlashEvents { + if !this.ValidatorSlashEvents[i].Equal(&that1.ValidatorSlashEvents[i]) { + return false + } + } + return true +} +func (this *FeePool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FeePool) + if !ok { + that2, ok := that.(FeePool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CommunityPool) != len(that1.CommunityPool) { + return false + } + for i := range this.CommunityPool { + if !this.CommunityPool[i].Equal(&that1.CommunityPool[i]) { + return false + } + } + return true +} +func (this *DelegatorStartingInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DelegatorStartingInfo) + if !ok { + that2, ok := that.(DelegatorStartingInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.PreviousPeriod != that1.PreviousPeriod { + return false + } + if !this.Stake.Equal(that1.Stake) { + return false + } + if this.Height != that1.Height { + return false + } + return true +} +func (this *DelegationDelegatorReward) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DelegationDelegatorReward) + if !ok { + that2, ok := that.(DelegationDelegatorReward) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ValidatorAddress != that1.ValidatorAddress { + return false + } + if len(this.Reward) != len(that1.Reward) { + return false + } + for i := range this.Reward { + if !this.Reward[i].Equal(&that1.Reward[i]) { + return false + } + } + return true +} +func (this *CommunityPoolSpendProposalWithDeposit) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CommunityPoolSpendProposalWithDeposit) + if !ok { + that2, ok := that.(CommunityPoolSpendProposalWithDeposit) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Recipient != that1.Recipient { + return false + } + if this.Amount != that1.Amount { + return false + } + if this.Deposit != that1.Deposit { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WithdrawAddrEnabled { + i-- + if m.WithdrawAddrEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + { + size := m.BonusProposerReward.Size() + i -= size + if _, err := m.BonusProposerReward.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.BaseProposerReward.Size() + i -= size + if _, err := m.BaseProposerReward.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.CommunityTax.Size() + i -= size + if _, err := m.CommunityTax.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValidatorHistoricalRewards) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorHistoricalRewards) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorHistoricalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ReferenceCount != 0 { + i = encodeVarintDistribution(dAtA, i, uint64(m.ReferenceCount)) + i-- + dAtA[i] = 0x10 + } + if len(m.CumulativeRewardRatio) > 0 { + for iNdEx := len(m.CumulativeRewardRatio) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CumulativeRewardRatio[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ValidatorCurrentRewards) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorCurrentRewards) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorCurrentRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Period != 0 { + i = encodeVarintDistribution(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x10 + } + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ValidatorAccumulatedCommission) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorAccumulatedCommission) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorAccumulatedCommission) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Commission) > 0 { + for iNdEx := len(m.Commission) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Commission[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ValidatorOutstandingRewards) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorOutstandingRewards) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorOutstandingRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ValidatorSlashEvent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorSlashEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorSlashEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Fraction.Size() + i -= size + if _, err := m.Fraction.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.ValidatorPeriod != 0 { + i = encodeVarintDistribution(dAtA, i, uint64(m.ValidatorPeriod)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ValidatorSlashEvents) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorSlashEvents) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorSlashEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorSlashEvents) > 0 { + for iNdEx := len(m.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorSlashEvents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *FeePool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeePool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CommunityPool) > 0 { + for iNdEx := len(m.CommunityPool) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CommunityPool[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CommunityPoolSpendProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommunityPoolSpendProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommunityPoolSpendProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DelegatorStartingInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DelegatorStartingInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegatorStartingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintDistribution(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + { + size := m.Stake.Size() + i -= size + if _, err := m.Stake.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.PreviousPeriod != 0 { + i = encodeVarintDistribution(dAtA, i, uint64(m.PreviousPeriod)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *DelegationDelegatorReward) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DelegationDelegatorReward) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegationDelegatorReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reward) > 0 { + for iNdEx := len(m.Reward) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Reward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDistribution(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CommunityPoolSpendProposalWithDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommunityPoolSpendProposalWithDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommunityPoolSpendProposalWithDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Deposit) > 0 { + i -= len(m.Deposit) + copy(dAtA[i:], m.Deposit) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Deposit))) + i-- + dAtA[i] = 0x2a + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintDistribution(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDistribution(dAtA []byte, offset int, v uint64) int { + offset -= sovDistribution(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CommunityTax.Size() + n += 1 + l + sovDistribution(uint64(l)) + l = m.BaseProposerReward.Size() + n += 1 + l + sovDistribution(uint64(l)) + l = m.BonusProposerReward.Size() + n += 1 + l + sovDistribution(uint64(l)) + if m.WithdrawAddrEnabled { + n += 2 + } + return n +} + +func (m *ValidatorHistoricalRewards) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CumulativeRewardRatio) > 0 { + for _, e := range m.CumulativeRewardRatio { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + if m.ReferenceCount != 0 { + n += 1 + sovDistribution(uint64(m.ReferenceCount)) + } + return n +} + +func (m *ValidatorCurrentRewards) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + if m.Period != 0 { + n += 1 + sovDistribution(uint64(m.Period)) + } + return n +} + +func (m *ValidatorAccumulatedCommission) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Commission) > 0 { + for _, e := range m.Commission { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + return n +} + +func (m *ValidatorOutstandingRewards) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + return n +} + +func (m *ValidatorSlashEvent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ValidatorPeriod != 0 { + n += 1 + sovDistribution(uint64(m.ValidatorPeriod)) + } + l = m.Fraction.Size() + n += 1 + l + sovDistribution(uint64(l)) + return n +} + +func (m *ValidatorSlashEvents) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ValidatorSlashEvents) > 0 { + for _, e := range m.ValidatorSlashEvents { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + return n +} + +func (m *FeePool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CommunityPool) > 0 { + for _, e := range m.CommunityPool { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + return n +} + +func (m *CommunityPoolSpendProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + return n +} + +func (m *DelegatorStartingInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PreviousPeriod != 0 { + n += 1 + sovDistribution(uint64(m.PreviousPeriod)) + } + l = m.Stake.Size() + n += 1 + l + sovDistribution(uint64(l)) + if m.Height != 0 { + n += 1 + sovDistribution(uint64(m.Height)) + } + return n +} + +func (m *DelegationDelegatorReward) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + if len(m.Reward) > 0 { + for _, e := range m.Reward { + l = e.Size() + n += 1 + l + sovDistribution(uint64(l)) + } + } + return n +} + +func (m *CommunityPoolSpendProposalWithDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + l = len(m.Deposit) + if l > 0 { + n += 1 + l + sovDistribution(uint64(l)) + } + return n +} + +func sovDistribution(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDistribution(x uint64) (n int) { + return sovDistribution(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommunityTax", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommunityTax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseProposerReward", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BaseProposerReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BonusProposerReward", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BonusProposerReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddrEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithdrawAddrEnabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorHistoricalRewards) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorHistoricalRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorHistoricalRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeRewardRatio", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CumulativeRewardRatio = append(m.CumulativeRewardRatio, types.DecCoin{}) + if err := m.CumulativeRewardRatio[len(m.CumulativeRewardRatio)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReferenceCount", wireType) + } + m.ReferenceCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReferenceCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorCurrentRewards) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorCurrentRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorCurrentRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types.DecCoin{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorAccumulatedCommission) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorAccumulatedCommission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorAccumulatedCommission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Commission = append(m.Commission, types.DecCoin{}) + if err := m.Commission[len(m.Commission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorOutstandingRewards) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorOutstandingRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorOutstandingRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types.DecCoin{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorSlashEvent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorSlashEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorSlashEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorPeriod", wireType) + } + m.ValidatorPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fraction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorSlashEvents) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorSlashEvents: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorSlashEvents: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvents", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSlashEvents = append(m.ValidatorSlashEvents, ValidatorSlashEvent{}) + if err := m.ValidatorSlashEvents[len(m.ValidatorSlashEvents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeePool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeePool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeePool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommunityPool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CommunityPool = append(m.CommunityPool, types.DecCoin{}) + if err := m.CommunityPool[len(m.CommunityPool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommunityPoolSpendProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommunityPoolSpendProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommunityPoolSpendProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DelegatorStartingInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DelegatorStartingInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DelegatorStartingInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousPeriod", wireType) + } + m.PreviousPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PreviousPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DelegationDelegatorReward) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DelegationDelegatorReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DelegationDelegatorReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reward", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reward = append(m.Reward, types.DecCoin{}) + if err := m.Reward[len(m.Reward)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommunityPoolSpendProposalWithDeposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDistribution + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDistribution + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDistribution(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDistribution + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDistribution(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDistribution + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDistribution + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDistribution + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDistribution + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDistribution + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDistribution + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDistribution = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDistribution = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDistribution = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/distribution/types/errors.go b/x/distribution/types/errors.go new file mode 100644 index 0000000..808d3f8 --- /dev/null +++ b/x/distribution/types/errors.go @@ -0,0 +1,19 @@ +package types + +import "cosmossdk.io/errors" + +// x/distribution module sentinel errors +var ( + ErrEmptyDelegatorAddr = errors.Register(ModuleName, 2, "delegator address is empty") + ErrEmptyWithdrawAddr = errors.Register(ModuleName, 3, "withdraw address is empty") + ErrEmptyValidatorAddr = errors.Register(ModuleName, 4, "validator address is empty") + ErrEmptyDelegationDistInfo = errors.Register(ModuleName, 5, "no delegation distribution info") + ErrNoValidatorDistInfo = errors.Register(ModuleName, 6, "no validator distribution info") + ErrNoValidatorCommission = errors.Register(ModuleName, 7, "no validator commission to withdraw") + ErrSetWithdrawAddrDisabled = errors.Register(ModuleName, 8, "set withdraw address disabled") + ErrBadDistribution = errors.Register(ModuleName, 9, "community pool does not have sufficient coins to distribute") + ErrInvalidProposalAmount = errors.Register(ModuleName, 10, "invalid community pool spend proposal amount") + ErrEmptyProposalRecipient = errors.Register(ModuleName, 11, "invalid community pool spend proposal recipient") + ErrNoValidatorExists = errors.Register(ModuleName, 12, "validator does not exist") + ErrNoDelegationExists = errors.Register(ModuleName, 13, "delegation does not exist") +) diff --git a/x/distribution/types/events.go b/x/distribution/types/events.go new file mode 100644 index 0000000..e0ea706 --- /dev/null +++ b/x/distribution/types/events.go @@ -0,0 +1,15 @@ +package types + +// distribution module event types +const ( + EventTypeSetWithdrawAddress = "set_withdraw_address" + EventTypeRewards = "rewards" + EventTypeCommission = "commission" + EventTypeWithdrawRewards = "withdraw_rewards" + EventTypeWithdrawCommission = "withdraw_commission" + EventTypeProposerReward = "proposer_reward" + + AttributeKeyWithdrawAddress = "withdraw_address" + AttributeKeyValidator = "validator" + AttributeKeyDelegator = "delegator" +) diff --git a/x/distribution/types/expected_keepers.go b/x/distribution/types/expected_keepers.go new file mode 100644 index 0000000..4237bb6 --- /dev/null +++ b/x/distribution/types/expected_keepers.go @@ -0,0 +1,62 @@ +package types + +import ( + context "context" + + "cosmossdk.io/core/address" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// AccountKeeper defines the expected account keeper used for simulations (noalias) +type AccountKeeper interface { + AddressCodec() address.Codec + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI + GetModuleAddress(name string) sdk.AccAddress + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI + // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 + SetModuleAccount(context.Context, sdk.ModuleAccountI) +} + +// BankKeeper defines the expected interface needed to retrieve account balances. +type BankKeeper interface { + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + + BlockedAddr(addr sdk.AccAddress) bool +} + +// StakingKeeper expected staking keeper (noalias) +type StakingKeeper interface { + ValidatorAddressCodec() address.Codec + ConsensusAddressCodec() address.Codec + // iterate through validators by operator address, execute func for each validator + IterateValidators(context.Context, + func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error + + Validator(context.Context, sdk.ValAddress) (stakingtypes.ValidatorI, error) // get a particular validator by operator address + ValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.ValidatorI, error) // get a particular validator by consensus address + + // Delegation allows for getting a particular delegation for a given validator + // and delegator outside the scope of the staking module. + Delegation(context.Context, sdk.AccAddress, sdk.ValAddress) (stakingtypes.DelegationI, error) + + IterateDelegations(ctx context.Context, delegator sdk.AccAddress, + fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error + + GetAllSDKDelegations(ctx context.Context) ([]stakingtypes.Delegation, error) + GetAllValidators(ctx context.Context) ([]stakingtypes.Validator, error) + GetAllDelegatorDelegations(ctx context.Context, delegator sdk.AccAddress) ([]stakingtypes.Delegation, error) +} + +// StakingHooks event hooks for staking validator object (noalias) +type StakingHooks interface { + AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error // Must be called when a validator is created + AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error +} diff --git a/x/distribution/types/fee_pool.go b/x/distribution/types/fee_pool.go new file mode 100644 index 0000000..645afd4 --- /dev/null +++ b/x/distribution/types/fee_pool.go @@ -0,0 +1,24 @@ +package types + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// zero fee pool +func InitialFeePool() FeePool { + return FeePool{ + CommunityPool: sdk.DecCoins{}, + } +} + +// ValidateGenesis validates the fee pool for a genesis state +func (f FeePool) ValidateGenesis() error { + if f.CommunityPool.IsAnyNegative() { + return fmt.Errorf("negative CommunityPool in distribution fee pool, is %v", + f.CommunityPool) + } + + return nil +} diff --git a/x/distribution/types/fee_pool_test.go b/x/distribution/types/fee_pool_test.go new file mode 100644 index 0000000..8d922e6 --- /dev/null +++ b/x/distribution/types/fee_pool_test.go @@ -0,0 +1,20 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +func TestValidateGenesis(t *testing.T) { + fp := types.InitialFeePool() + require.Nil(t, fp.ValidateGenesis()) + + fp2 := types.FeePool{CommunityPool: sdk.DecCoins{{Denom: "stake", Amount: math.LegacyNewDec(-1)}}} + require.NotNil(t, fp2.ValidateGenesis()) +} diff --git a/x/distribution/types/genesis.go b/x/distribution/types/genesis.go new file mode 100644 index 0000000..0affa8c --- /dev/null +++ b/x/distribution/types/genesis.go @@ -0,0 +1,48 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func NewGenesisState( + params Params, fp FeePool, dwis []DelegatorWithdrawInfo, pp sdk.ConsAddress, r []ValidatorOutstandingRewardsRecord, + acc []ValidatorAccumulatedCommissionRecord, historical []ValidatorHistoricalRewardsRecord, + cur []ValidatorCurrentRewardsRecord, dels []DelegatorStartingInfoRecord, slashes []ValidatorSlashEventRecord, +) *GenesisState { + return &GenesisState{ + Params: params, + FeePool: fp, + DelegatorWithdrawInfos: dwis, + PreviousProposer: pp.String(), + OutstandingRewards: r, + ValidatorAccumulatedCommissions: acc, + ValidatorHistoricalRewards: historical, + ValidatorCurrentRewards: cur, + DelegatorStartingInfos: dels, + ValidatorSlashEvents: slashes, + } +} + +// get raw genesis raw message for testing +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + FeePool: InitialFeePool(), + Params: DefaultParams(), + DelegatorWithdrawInfos: []DelegatorWithdrawInfo{}, + PreviousProposer: "", + OutstandingRewards: []ValidatorOutstandingRewardsRecord{}, + ValidatorAccumulatedCommissions: []ValidatorAccumulatedCommissionRecord{}, + ValidatorHistoricalRewards: []ValidatorHistoricalRewardsRecord{}, + ValidatorCurrentRewards: []ValidatorCurrentRewardsRecord{}, + DelegatorStartingInfos: []DelegatorStartingInfoRecord{}, + ValidatorSlashEvents: []ValidatorSlashEventRecord{}, + } +} + +// ValidateGenesis validates the genesis state of distribution genesis input +func ValidateGenesis(gs *GenesisState) error { + if err := gs.Params.ValidateBasic(); err != nil { + return err + } + return gs.FeePool.ValidateGenesis() +} diff --git a/x/distribution/types/genesis.pb.go b/x/distribution/types/genesis.pb.go new file mode 100644 index 0000000..10d09ba --- /dev/null +++ b/x/distribution/types/genesis.pb.go @@ -0,0 +1,2478 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/distribution/v1beta1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. +type DelegatorWithdrawInfo struct { + // delegator_address is the address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // withdraw_address is the address to withdraw the delegation rewards to. + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (m *DelegatorWithdrawInfo) Reset() { *m = DelegatorWithdrawInfo{} } +func (m *DelegatorWithdrawInfo) String() string { return proto.CompactTextString(m) } +func (*DelegatorWithdrawInfo) ProtoMessage() {} +func (*DelegatorWithdrawInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{0} +} +func (m *DelegatorWithdrawInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DelegatorWithdrawInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DelegatorWithdrawInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DelegatorWithdrawInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelegatorWithdrawInfo.Merge(m, src) +} +func (m *DelegatorWithdrawInfo) XXX_Size() int { + return m.Size() +} +func (m *DelegatorWithdrawInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DelegatorWithdrawInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_DelegatorWithdrawInfo proto.InternalMessageInfo + +// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +type ValidatorOutstandingRewardsRecord struct { + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // outstanding_rewards represents the outstanding rewards of a validator. + OutstandingRewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=outstanding_rewards,json=outstandingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"outstanding_rewards"` +} + +func (m *ValidatorOutstandingRewardsRecord) Reset() { *m = ValidatorOutstandingRewardsRecord{} } +func (m *ValidatorOutstandingRewardsRecord) String() string { return proto.CompactTextString(m) } +func (*ValidatorOutstandingRewardsRecord) ProtoMessage() {} +func (*ValidatorOutstandingRewardsRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{1} +} +func (m *ValidatorOutstandingRewardsRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorOutstandingRewardsRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorOutstandingRewardsRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorOutstandingRewardsRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorOutstandingRewardsRecord.Merge(m, src) +} +func (m *ValidatorOutstandingRewardsRecord) XXX_Size() int { + return m.Size() +} +func (m *ValidatorOutstandingRewardsRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorOutstandingRewardsRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorOutstandingRewardsRecord proto.InternalMessageInfo + +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. +type ValidatorAccumulatedCommissionRecord struct { + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // accumulated is the accumulated commission of a validator. + Accumulated ValidatorAccumulatedCommission `protobuf:"bytes,2,opt,name=accumulated,proto3" json:"accumulated"` +} + +func (m *ValidatorAccumulatedCommissionRecord) Reset() { *m = ValidatorAccumulatedCommissionRecord{} } +func (m *ValidatorAccumulatedCommissionRecord) String() string { return proto.CompactTextString(m) } +func (*ValidatorAccumulatedCommissionRecord) ProtoMessage() {} +func (*ValidatorAccumulatedCommissionRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{2} +} +func (m *ValidatorAccumulatedCommissionRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorAccumulatedCommissionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorAccumulatedCommissionRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorAccumulatedCommissionRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorAccumulatedCommissionRecord.Merge(m, src) +} +func (m *ValidatorAccumulatedCommissionRecord) XXX_Size() int { + return m.Size() +} +func (m *ValidatorAccumulatedCommissionRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorAccumulatedCommissionRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorAccumulatedCommissionRecord proto.InternalMessageInfo + +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. +type ValidatorHistoricalRewardsRecord struct { + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // period defines the period the historical rewards apply to. + Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` + // rewards defines the historical rewards of a validator. + Rewards ValidatorHistoricalRewards `protobuf:"bytes,3,opt,name=rewards,proto3" json:"rewards"` +} + +func (m *ValidatorHistoricalRewardsRecord) Reset() { *m = ValidatorHistoricalRewardsRecord{} } +func (m *ValidatorHistoricalRewardsRecord) String() string { return proto.CompactTextString(m) } +func (*ValidatorHistoricalRewardsRecord) ProtoMessage() {} +func (*ValidatorHistoricalRewardsRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{3} +} +func (m *ValidatorHistoricalRewardsRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorHistoricalRewardsRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorHistoricalRewardsRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorHistoricalRewardsRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorHistoricalRewardsRecord.Merge(m, src) +} +func (m *ValidatorHistoricalRewardsRecord) XXX_Size() int { + return m.Size() +} +func (m *ValidatorHistoricalRewardsRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorHistoricalRewardsRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorHistoricalRewardsRecord proto.InternalMessageInfo + +// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +type ValidatorCurrentRewardsRecord struct { + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // rewards defines the current rewards of a validator. + Rewards ValidatorCurrentRewards `protobuf:"bytes,2,opt,name=rewards,proto3" json:"rewards"` +} + +func (m *ValidatorCurrentRewardsRecord) Reset() { *m = ValidatorCurrentRewardsRecord{} } +func (m *ValidatorCurrentRewardsRecord) String() string { return proto.CompactTextString(m) } +func (*ValidatorCurrentRewardsRecord) ProtoMessage() {} +func (*ValidatorCurrentRewardsRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{4} +} +func (m *ValidatorCurrentRewardsRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorCurrentRewardsRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorCurrentRewardsRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorCurrentRewardsRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorCurrentRewardsRecord.Merge(m, src) +} +func (m *ValidatorCurrentRewardsRecord) XXX_Size() int { + return m.Size() +} +func (m *ValidatorCurrentRewardsRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorCurrentRewardsRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorCurrentRewardsRecord proto.InternalMessageInfo + +// DelegatorStartingInfoRecord used for import / export via genesis json. +type DelegatorStartingInfoRecord struct { + // delegator_address is the address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // starting_info defines the starting info of a delegator. + StartingInfo DelegatorStartingInfo `protobuf:"bytes,3,opt,name=starting_info,json=startingInfo,proto3" json:"starting_info"` +} + +func (m *DelegatorStartingInfoRecord) Reset() { *m = DelegatorStartingInfoRecord{} } +func (m *DelegatorStartingInfoRecord) String() string { return proto.CompactTextString(m) } +func (*DelegatorStartingInfoRecord) ProtoMessage() {} +func (*DelegatorStartingInfoRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{5} +} +func (m *DelegatorStartingInfoRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DelegatorStartingInfoRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DelegatorStartingInfoRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DelegatorStartingInfoRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelegatorStartingInfoRecord.Merge(m, src) +} +func (m *DelegatorStartingInfoRecord) XXX_Size() int { + return m.Size() +} +func (m *DelegatorStartingInfoRecord) XXX_DiscardUnknown() { + xxx_messageInfo_DelegatorStartingInfoRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_DelegatorStartingInfoRecord proto.InternalMessageInfo + +// ValidatorSlashEventRecord is used for import / export via genesis json. +type ValidatorSlashEventRecord struct { + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // height defines the block height at which the slash event occurred. + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // period is the period of the slash event. + Period uint64 `protobuf:"varint,3,opt,name=period,proto3" json:"period,omitempty"` + // validator_slash_event describes the slash event. + ValidatorSlashEvent ValidatorSlashEvent `protobuf:"bytes,4,opt,name=validator_slash_event,json=validatorSlashEvent,proto3" json:"validator_slash_event"` +} + +func (m *ValidatorSlashEventRecord) Reset() { *m = ValidatorSlashEventRecord{} } +func (m *ValidatorSlashEventRecord) String() string { return proto.CompactTextString(m) } +func (*ValidatorSlashEventRecord) ProtoMessage() {} +func (*ValidatorSlashEventRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{6} +} +func (m *ValidatorSlashEventRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorSlashEventRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorSlashEventRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorSlashEventRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorSlashEventRecord.Merge(m, src) +} +func (m *ValidatorSlashEventRecord) XXX_Size() int { + return m.Size() +} +func (m *ValidatorSlashEventRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorSlashEventRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorSlashEventRecord proto.InternalMessageInfo + +// GenesisState defines the distribution module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // fee_pool defines the fee pool at genesis. + FeePool FeePool `protobuf:"bytes,2,opt,name=fee_pool,json=feePool,proto3" json:"fee_pool"` + // fee_pool defines the delegator withdraw infos at genesis. + DelegatorWithdrawInfos []DelegatorWithdrawInfo `protobuf:"bytes,3,rep,name=delegator_withdraw_infos,json=delegatorWithdrawInfos,proto3" json:"delegator_withdraw_infos"` + // fee_pool defines the previous proposer at genesis. + PreviousProposer string `protobuf:"bytes,4,opt,name=previous_proposer,json=previousProposer,proto3" json:"previous_proposer,omitempty"` + // fee_pool defines the outstanding rewards of all validators at genesis. + OutstandingRewards []ValidatorOutstandingRewardsRecord `protobuf:"bytes,5,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards"` + // fee_pool defines the accumulated commissions of all validators at genesis. + ValidatorAccumulatedCommissions []ValidatorAccumulatedCommissionRecord `protobuf:"bytes,6,rep,name=validator_accumulated_commissions,json=validatorAccumulatedCommissions,proto3" json:"validator_accumulated_commissions"` + // fee_pool defines the historical rewards of all validators at genesis. + ValidatorHistoricalRewards []ValidatorHistoricalRewardsRecord `protobuf:"bytes,7,rep,name=validator_historical_rewards,json=validatorHistoricalRewards,proto3" json:"validator_historical_rewards"` + // fee_pool defines the current rewards of all validators at genesis. + ValidatorCurrentRewards []ValidatorCurrentRewardsRecord `protobuf:"bytes,8,rep,name=validator_current_rewards,json=validatorCurrentRewards,proto3" json:"validator_current_rewards"` + // fee_pool defines the delegator starting infos at genesis. + DelegatorStartingInfos []DelegatorStartingInfoRecord `protobuf:"bytes,9,rep,name=delegator_starting_infos,json=delegatorStartingInfos,proto3" json:"delegator_starting_infos"` + // fee_pool defines the validator slash events at genesis. + ValidatorSlashEvents []ValidatorSlashEventRecord `protobuf:"bytes,10,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_76eed0f9489db580, []int{7} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func init() { + proto.RegisterType((*DelegatorWithdrawInfo)(nil), "cosmos.distribution.v1beta1.DelegatorWithdrawInfo") + proto.RegisterType((*ValidatorOutstandingRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord") + proto.RegisterType((*ValidatorAccumulatedCommissionRecord)(nil), "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord") + proto.RegisterType((*ValidatorHistoricalRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord") + proto.RegisterType((*ValidatorCurrentRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord") + proto.RegisterType((*DelegatorStartingInfoRecord)(nil), "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord") + proto.RegisterType((*ValidatorSlashEventRecord)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEventRecord") + proto.RegisterType((*GenesisState)(nil), "cosmos.distribution.v1beta1.GenesisState") +} + +func init() { + proto.RegisterFile("cosmos/distribution/v1beta1/genesis.proto", fileDescriptor_76eed0f9489db580) +} + +var fileDescriptor_76eed0f9489db580 = []byte{ + // 938 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x3a, 0x25, 0x4d, 0x26, 0x45, 0x34, 0xd3, 0x34, 0x6c, 0xd2, 0x76, 0x9d, 0x94, 0x1e, + 0x0a, 0x28, 0x6b, 0x12, 0x10, 0x54, 0x45, 0x20, 0x35, 0x6e, 0xcb, 0x8f, 0x03, 0x8d, 0x6c, 0x09, + 0x04, 0x42, 0xb2, 0xc6, 0xbb, 0xe3, 0xf5, 0x08, 0x7b, 0xc7, 0x9a, 0x19, 0xaf, 0x01, 0x89, 0x03, + 0xa7, 0x22, 0xc4, 0x81, 0x13, 0xe2, 0x58, 0x71, 0xaa, 0x90, 0x90, 0x38, 0xf4, 0x8f, 0xe8, 0xb1, + 0xaa, 0x38, 0x70, 0x02, 0xe4, 0x1c, 0x40, 0x1c, 0xf9, 0x0b, 0xd0, 0xce, 0xcc, 0xee, 0x8e, 0xb3, + 0xdb, 0xad, 0x1b, 0xf0, 0xa5, 0x8d, 0x67, 0xde, 0x7b, 0xdf, 0xf7, 0xbd, 0xf7, 0xf6, 0xbd, 0x01, + 0xcf, 0x7b, 0x94, 0x0f, 0x28, 0xaf, 0xfb, 0x84, 0x0b, 0x46, 0x3a, 0x23, 0x41, 0x68, 0x58, 0x8f, + 0x76, 0x3b, 0x58, 0xa0, 0xdd, 0x7a, 0x80, 0x43, 0xcc, 0x09, 0x77, 0x87, 0x8c, 0x0a, 0x0a, 0xcf, + 0x29, 0x53, 0xd7, 0x34, 0x75, 0xb5, 0xe9, 0xe6, 0x5a, 0x40, 0x03, 0x2a, 0xed, 0xea, 0xf1, 0x5f, + 0xca, 0x65, 0xd3, 0xd1, 0xd1, 0x3b, 0x88, 0xe3, 0x34, 0xaa, 0x47, 0x49, 0xa8, 0xef, 0xdd, 0x32, + 0xf4, 0x29, 0x1c, 0x65, 0xbf, 0xa1, 0xec, 0xdb, 0x0a, 0x48, 0xf3, 0x51, 0x57, 0xab, 0x68, 0x40, + 0x42, 0x5a, 0x97, 0xff, 0xaa, 0xa3, 0x8b, 0x3f, 0x59, 0xe0, 0xec, 0x75, 0xdc, 0xc7, 0x01, 0x12, + 0x94, 0x7d, 0x40, 0x44, 0xcf, 0x67, 0x68, 0xfc, 0x4e, 0xd8, 0xa5, 0xf0, 0x06, 0x58, 0xf5, 0x93, + 0x8b, 0x36, 0xf2, 0x7d, 0x86, 0x39, 0xb7, 0xad, 0x2d, 0xeb, 0xf2, 0xf2, 0xbe, 0xfd, 0xf0, 0xde, + 0xce, 0x9a, 0x8e, 0x7c, 0x4d, 0xdd, 0xb4, 0x04, 0x23, 0x61, 0xd0, 0x3c, 0x9d, 0xba, 0xe8, 0x73, + 0xd8, 0x00, 0xa7, 0xc7, 0x3a, 0x6c, 0x1a, 0xa5, 0xfa, 0x98, 0x28, 0xcf, 0x24, 0x1e, 0xfa, 0xf8, + 0xea, 0xd2, 0x57, 0x77, 0x6a, 0x95, 0xbf, 0xee, 0xd4, 0x2a, 0x17, 0x6f, 0x57, 0xc1, 0xf6, 0xfb, + 0xa8, 0x4f, 0xfc, 0x18, 0xe3, 0xd6, 0x48, 0x70, 0x81, 0x42, 0x3f, 0xf6, 0xc1, 0x63, 0xc4, 0x7c, + 0xde, 0xc4, 0x1e, 0x65, 0x3e, 0x7c, 0x0f, 0xac, 0x46, 0x89, 0xd1, 0x11, 0xee, 0xdb, 0x0f, 0xef, + 0xed, 0x5c, 0xd0, 0xa8, 0x69, 0xa0, 0x23, 0x22, 0xa2, 0x23, 0xe7, 0xf0, 0xb6, 0x05, 0xce, 0xd0, + 0x0c, 0xac, 0xcd, 0x14, 0x9a, 0x5d, 0xdd, 0x5a, 0xb8, 0xbc, 0xb2, 0x77, 0x5e, 0x97, 0xc8, 0x8d, + 0x4b, 0x98, 0x54, 0xdb, 0xbd, 0x8e, 0xbd, 0x06, 0x25, 0xe1, 0xfe, 0x95, 0xfb, 0xbf, 0xd5, 0x2a, + 0x3f, 0xfe, 0x5e, 0x7b, 0x31, 0x20, 0xa2, 0x37, 0xea, 0xb8, 0x1e, 0x1d, 0xe8, 0xaa, 0xe8, 0xff, + 0x76, 0xb8, 0xff, 0x49, 0x5d, 0x7c, 0x36, 0xc4, 0x3c, 0xf1, 0xe1, 0x77, 0xff, 0xfc, 0xf9, 0x05, + 0xab, 0x09, 0x69, 0x4e, 0x9f, 0x91, 0x89, 0xbf, 0x2d, 0x70, 0x29, 0x13, 0xe0, 0x79, 0xa3, 0xc1, + 0xa8, 0x8f, 0x04, 0xf6, 0x1b, 0x74, 0x30, 0x20, 0x9c, 0x13, 0x1a, 0xce, 0x29, 0x19, 0x3d, 0xb0, + 0x82, 0x32, 0x38, 0x59, 0xcc, 0x95, 0xbd, 0xd7, 0xdd, 0x92, 0xce, 0x77, 0xcb, 0x79, 0xee, 0x2f, + 0xc7, 0x29, 0x52, 0x9a, 0xcd, 0xd0, 0x86, 0xd8, 0x7f, 0x2c, 0xb0, 0x95, 0x06, 0x79, 0x9b, 0x70, + 0x41, 0x19, 0xf1, 0x50, 0x7f, 0xbe, 0x55, 0x5f, 0x07, 0x8b, 0x43, 0xcc, 0x08, 0x55, 0x1a, 0x4f, + 0x34, 0xf5, 0x2f, 0xf8, 0x31, 0x38, 0x99, 0x34, 0xc0, 0x82, 0x14, 0xff, 0xda, 0x6c, 0xe2, 0x73, + 0xbc, 0x4d, 0xe1, 0x49, 0x48, 0x43, 0xf4, 0x2f, 0x16, 0xb8, 0x90, 0x3a, 0x37, 0x46, 0x8c, 0xe1, + 0x50, 0xcc, 0x57, 0xf1, 0x87, 0x99, 0x32, 0x55, 0xd6, 0x57, 0x66, 0x53, 0x36, 0x4d, 0xee, 0x31, + 0xb2, 0x7e, 0xa8, 0x82, 0x73, 0xe9, 0xc8, 0x69, 0x09, 0xc4, 0x04, 0x09, 0x83, 0x78, 0xe4, 0x68, + 0x51, 0xff, 0xd3, 0xe0, 0x29, 0xcc, 0x4d, 0xf5, 0xf8, 0xb9, 0xe9, 0x80, 0xa7, 0xb9, 0x26, 0xdb, + 0x26, 0x61, 0x97, 0xea, 0xda, 0xef, 0x95, 0x66, 0xa8, 0x50, 0xa7, 0x99, 0x9f, 0x53, 0xdc, 0xb8, + 0x30, 0x92, 0xf4, 0x5d, 0x15, 0x6c, 0xa4, 0xd4, 0x5a, 0x7d, 0xc4, 0x7b, 0x37, 0x22, 0x99, 0xe1, + 0x79, 0x75, 0x7a, 0x0f, 0x93, 0xa0, 0x27, 0x92, 0x4e, 0x57, 0xbf, 0x8c, 0x2f, 0x60, 0x61, 0xea, + 0x0b, 0xa0, 0xe0, 0x6c, 0x86, 0xcf, 0x63, 0x76, 0x6d, 0x1c, 0xd3, 0xb3, 0x4f, 0xc8, 0x9c, 0xbc, + 0x34, 0x5b, 0xd7, 0x64, 0xb2, 0xcc, 0x8c, 0x9c, 0x89, 0xf2, 0xf7, 0x46, 0x62, 0xbe, 0x59, 0x06, + 0xa7, 0xde, 0x52, 0x3b, 0xb7, 0x25, 0x90, 0xc0, 0xf0, 0x26, 0x58, 0x1c, 0x22, 0x86, 0x06, 0x2a, + 0x01, 0x2b, 0x7b, 0xcf, 0x95, 0x82, 0x1f, 0x48, 0x53, 0x13, 0x4f, 0x7b, 0xc3, 0x77, 0xc1, 0x52, + 0x17, 0xe3, 0xf6, 0x90, 0xd2, 0xbe, 0x6e, 0xfe, 0x4b, 0xa5, 0x91, 0x6e, 0x62, 0x7c, 0x40, 0x69, + 0x7f, 0xaa, 0xd9, 0xbb, 0xea, 0x0c, 0x8e, 0x81, 0x9d, 0xb5, 0x70, 0xba, 0xfe, 0xe2, 0xae, 0x89, + 0x47, 0xc6, 0xc2, 0xec, 0x6d, 0x63, 0x6e, 0x64, 0x13, 0x69, 0xdd, 0x2f, 0xb2, 0xe0, 0xf1, 0xb7, + 0x33, 0x64, 0x38, 0x22, 0x74, 0x24, 0x1f, 0x00, 0x43, 0xca, 0x31, 0x93, 0x45, 0x29, 0xfd, 0x76, + 0x12, 0x97, 0x03, 0xed, 0x01, 0x3f, 0x2f, 0x5e, 0x77, 0x4f, 0x49, 0xea, 0x6f, 0xce, 0x56, 0xdd, + 0x47, 0x2d, 0x67, 0x53, 0x46, 0xc1, 0x86, 0x83, 0xdf, 0x5b, 0x60, 0xdb, 0x68, 0xee, 0x6c, 0x1d, + 0xb4, 0xbd, 0x74, 0x63, 0x70, 0x7b, 0x51, 0x52, 0xb9, 0xf6, 0x1f, 0xb6, 0x4e, 0x9e, 0x4d, 0x2d, + 0x2a, 0x75, 0xe0, 0xf0, 0x6b, 0x0b, 0x9c, 0xcf, 0xa8, 0xf5, 0xd2, 0x71, 0x9e, 0x26, 0xe8, 0xa4, + 0x64, 0xf5, 0xc6, 0x31, 0xd7, 0x41, 0x9e, 0xd1, 0x66, 0xf4, 0x48, 0x63, 0xf8, 0xa5, 0x05, 0x36, + 0x32, 0x32, 0x9e, 0x9a, 0xc0, 0x29, 0x93, 0x25, 0xc9, 0xe4, 0xea, 0x71, 0xc6, 0x77, 0x9e, 0xc6, + 0xb3, 0x51, 0xb1, 0x25, 0xfc, 0xc2, 0xec, 0xf3, 0xa9, 0xe9, 0xc8, 0xed, 0x65, 0xc9, 0xe0, 0xca, + 0x93, 0x8f, 0xc7, 0x3c, 0x7e, 0xd6, 0xed, 0xa6, 0x1d, 0x87, 0x63, 0xb0, 0x5e, 0x38, 0x86, 0xb8, + 0x0d, 0x24, 0xf8, 0xab, 0x4f, 0x3a, 0x87, 0xf2, 0xd0, 0x6b, 0x05, 0xd3, 0xc8, 0x58, 0x66, 0xfb, + 0xb7, 0xee, 0x4e, 0x1c, 0xeb, 0xfe, 0xc4, 0xb1, 0x1e, 0x4c, 0x1c, 0xeb, 0x8f, 0x89, 0x63, 0x7d, + 0x7b, 0xe8, 0x54, 0x1e, 0x1c, 0x3a, 0x95, 0x5f, 0x0f, 0x9d, 0xca, 0x47, 0xbb, 0xa5, 0x6f, 0xbe, + 0x4f, 0xa7, 0xdf, 0xf4, 0xf2, 0x09, 0xd8, 0x59, 0x94, 0xef, 0xf2, 0x97, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0xbe, 0x75, 0xf7, 0x68, 0x75, 0x0c, 0x00, 0x00, +} + +func (m *DelegatorWithdrawInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DelegatorWithdrawInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegatorWithdrawInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WithdrawAddress) > 0 { + i -= len(m.WithdrawAddress) + copy(dAtA[i:], m.WithdrawAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.WithdrawAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorOutstandingRewardsRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorOutstandingRewardsRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorOutstandingRewardsRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OutstandingRewards) > 0 { + for iNdEx := len(m.OutstandingRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutstandingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorAccumulatedCommissionRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorAccumulatedCommissionRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorAccumulatedCommissionRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Accumulated.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorHistoricalRewardsRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorHistoricalRewardsRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorHistoricalRewardsRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Rewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Period != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x10 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorCurrentRewardsRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorCurrentRewardsRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorCurrentRewardsRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Rewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DelegatorStartingInfoRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DelegatorStartingInfoRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DelegatorStartingInfoRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.StartingInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorSlashEventRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorSlashEventRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorSlashEventRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ValidatorSlashEvent.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.Period != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x18 + } + if m.Height != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorSlashEvents) > 0 { + for iNdEx := len(m.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorSlashEvents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.DelegatorStartingInfos) > 0 { + for iNdEx := len(m.DelegatorStartingInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegatorStartingInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.ValidatorCurrentRewards) > 0 { + for iNdEx := len(m.ValidatorCurrentRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorCurrentRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.ValidatorHistoricalRewards) > 0 { + for iNdEx := len(m.ValidatorHistoricalRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorHistoricalRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.ValidatorAccumulatedCommissions) > 0 { + for iNdEx := len(m.ValidatorAccumulatedCommissions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorAccumulatedCommissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.OutstandingRewards) > 0 { + for iNdEx := len(m.OutstandingRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutstandingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.PreviousProposer) > 0 { + i -= len(m.PreviousProposer) + copy(dAtA[i:], m.PreviousProposer) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.PreviousProposer))) + i-- + dAtA[i] = 0x22 + } + if len(m.DelegatorWithdrawInfos) > 0 { + for iNdEx := len(m.DelegatorWithdrawInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegatorWithdrawInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.FeePool.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DelegatorWithdrawInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.WithdrawAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *ValidatorOutstandingRewardsRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.OutstandingRewards) > 0 { + for _, e := range m.OutstandingRewards { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *ValidatorAccumulatedCommissionRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Accumulated.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *ValidatorHistoricalRewardsRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Period != 0 { + n += 1 + sovGenesis(uint64(m.Period)) + } + l = m.Rewards.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *ValidatorCurrentRewardsRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Rewards.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *DelegatorStartingInfoRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.StartingInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *ValidatorSlashEventRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovGenesis(uint64(m.Height)) + } + if m.Period != 0 { + n += 1 + sovGenesis(uint64(m.Period)) + } + l = m.ValidatorSlashEvent.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.FeePool.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.DelegatorWithdrawInfos) > 0 { + for _, e := range m.DelegatorWithdrawInfos { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = len(m.PreviousProposer) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.OutstandingRewards) > 0 { + for _, e := range m.OutstandingRewards { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ValidatorAccumulatedCommissions) > 0 { + for _, e := range m.ValidatorAccumulatedCommissions { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ValidatorHistoricalRewards) > 0 { + for _, e := range m.ValidatorHistoricalRewards { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ValidatorCurrentRewards) > 0 { + for _, e := range m.ValidatorCurrentRewards { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.DelegatorStartingInfos) > 0 { + for _, e := range m.DelegatorStartingInfos { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ValidatorSlashEvents) > 0 { + for _, e := range m.ValidatorSlashEvents { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DelegatorWithdrawInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DelegatorWithdrawInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DelegatorWithdrawInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WithdrawAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorOutstandingRewardsRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorOutstandingRewardsRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorOutstandingRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutstandingRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OutstandingRewards = append(m.OutstandingRewards, types.DecCoin{}) + if err := m.OutstandingRewards[len(m.OutstandingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorAccumulatedCommissionRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorAccumulatedCommissionRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorAccumulatedCommissionRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accumulated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Accumulated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorHistoricalRewardsRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorHistoricalRewardsRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorHistoricalRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorCurrentRewardsRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorCurrentRewardsRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorCurrentRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DelegatorStartingInfoRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DelegatorStartingInfoRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DelegatorStartingInfoRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartingInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StartingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorSlashEventRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorSlashEventRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorSlashEventRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ValidatorSlashEvent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FeePool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorWithdrawInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorWithdrawInfos = append(m.DelegatorWithdrawInfos, DelegatorWithdrawInfo{}) + if err := m.DelegatorWithdrawInfos[len(m.DelegatorWithdrawInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousProposer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PreviousProposer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutstandingRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OutstandingRewards = append(m.OutstandingRewards, ValidatorOutstandingRewardsRecord{}) + if err := m.OutstandingRewards[len(m.OutstandingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAccumulatedCommissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAccumulatedCommissions = append(m.ValidatorAccumulatedCommissions, ValidatorAccumulatedCommissionRecord{}) + if err := m.ValidatorAccumulatedCommissions[len(m.ValidatorAccumulatedCommissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorHistoricalRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorHistoricalRewards = append(m.ValidatorHistoricalRewards, ValidatorHistoricalRewardsRecord{}) + if err := m.ValidatorHistoricalRewards[len(m.ValidatorHistoricalRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorCurrentRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorCurrentRewards = append(m.ValidatorCurrentRewards, ValidatorCurrentRewardsRecord{}) + if err := m.ValidatorCurrentRewards[len(m.ValidatorCurrentRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorStartingInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorStartingInfos = append(m.DelegatorStartingInfos, DelegatorStartingInfoRecord{}) + if err := m.DelegatorStartingInfos[len(m.DelegatorStartingInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvents", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorSlashEvents = append(m.ValidatorSlashEvents, ValidatorSlashEventRecord{}) + if err := m.ValidatorSlashEvents[len(m.ValidatorSlashEvents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/distribution/types/keys.go b/x/distribution/types/keys.go new file mode 100644 index 0000000..30aa892 --- /dev/null +++ b/x/distribution/types/keys.go @@ -0,0 +1,218 @@ +package types + +import ( + "encoding/binary" + + "cosmossdk.io/collections" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + "github.com/cosmos/cosmos-sdk/types/kv" +) + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "distribution" + + // StoreKey is the store key string for distribution + StoreKey = ModuleName + + // RouterKey is the message route for distribution + RouterKey = ModuleName +) + +// Keys for distribution store +// Items are stored with the following key: values +// +// - 0x00: FeePol +// +// - 0x01: sdk.ConsAddress +// +// - 0x02: ValidatorOutstandingRewards +// +// - 0x03: sdk.AccAddress +// +// - 0x04: DelegatorStartingInfo +// +// - 0x05: ValidatorHistoricalRewards +// +// - 0x06: ValidatorCurrentRewards +// +// - 0x07: ValidatorCurrentCommission +// +// - 0x08: ValidatorSlashEvent +// +// - 0x09: Params +var ( + FeePoolKey = collections.NewPrefix(0) // key for global distribution state + ProposerKey = []byte{0x01} // key for the proposer operator address + ValidatorOutstandingRewardsPrefix = []byte{0x02} // key for outstanding rewards + + DelegatorWithdrawAddrPrefix = []byte{0x03} // key for delegator withdraw address + DelegatorStartingInfoPrefix = []byte{0x04} // key for delegator starting info + ValidatorHistoricalRewardsPrefix = []byte{0x05} // key for historical validators rewards / stake + ValidatorCurrentRewardsPrefix = []byte{0x06} // key for current validator rewards + ValidatorAccumulatedCommissionPrefix = []byte{0x07} // key for accumulated validator commission + ValidatorSlashEventPrefix = []byte{0x08} // key for validator slash fraction + + ParamsKey = collections.NewPrefix(9) // key for distribution module params +) + +// GetValidatorOutstandingRewardsAddress creates an address from a validator's outstanding rewards key. +func GetValidatorOutstandingRewardsAddress(key []byte) (valAddr sdk.ValAddress) { + // key is in the format: + // 0x02 + + // Remove prefix and address length. + kv.AssertKeyAtLeastLength(key, 3) + addr := key[2:] + kv.AssertKeyLength(addr, int(key[1])) + + return sdk.ValAddress(addr) +} + +// GetDelegatorWithdrawInfoAddress creates an address from a delegator's withdraw info key. +func GetDelegatorWithdrawInfoAddress(key []byte) (delAddr sdk.AccAddress) { + // key is in the format: + // 0x03 + + // Remove prefix and address length. + kv.AssertKeyAtLeastLength(key, 3) + addr := key[2:] + kv.AssertKeyLength(addr, int(key[1])) + + return sdk.AccAddress(addr) +} + +// GetDelegatorStartingInfoAddresses creates the addresses from a delegator starting info key. +func GetDelegatorStartingInfoAddresses(key []byte) (valAddr sdk.ValAddress, delAddr sdk.AccAddress) { + // key is in the format: + // 0x04 + kv.AssertKeyAtLeastLength(key, 2) + valAddrLen := int(key[1]) + kv.AssertKeyAtLeastLength(key, 3+valAddrLen) + valAddr = sdk.ValAddress(key[2 : 2+valAddrLen]) + delAddrLen := int(key[2+valAddrLen]) + kv.AssertKeyAtLeastLength(key, 4+valAddrLen) + delAddr = sdk.AccAddress(key[3+valAddrLen:]) + kv.AssertKeyLength(delAddr.Bytes(), delAddrLen) + + return +} + +// GetValidatorHistoricalRewardsAddressPeriod creates the address & period from a validator's historical rewards key. +func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddress, period uint64) { + // key is in the format: + // 0x05 + kv.AssertKeyAtLeastLength(key, 2) + valAddrLen := int(key[1]) + kv.AssertKeyAtLeastLength(key, 3+valAddrLen) + valAddr = sdk.ValAddress(key[2 : 2+valAddrLen]) + b := key[2+valAddrLen:] + kv.AssertKeyLength(b, 8) + period = binary.LittleEndian.Uint64(b) + return +} + +// GetValidatorCurrentRewardsAddress creates the address from a validator's current rewards key. +func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress) { + // key is in the format: + // 0x06: ValidatorCurrentRewards + + // Remove prefix and address length. + kv.AssertKeyAtLeastLength(key, 3) + addr := key[2:] + kv.AssertKeyLength(addr, int(key[1])) + + return sdk.ValAddress(addr) +} + +// GetValidatorAccumulatedCommissionAddress creates the address from a validator's accumulated commission key. +func GetValidatorAccumulatedCommissionAddress(key []byte) (valAddr sdk.ValAddress) { + // key is in the format: + // 0x07: ValidatorCurrentRewards + + // Remove prefix and address length. + kv.AssertKeyAtLeastLength(key, 3) + addr := key[2:] + kv.AssertKeyLength(addr, int(key[1])) + + return sdk.ValAddress(addr) +} + +// GetValidatorSlashEventAddressHeight creates the height from a validator's slash event key. +func GetValidatorSlashEventAddressHeight(key []byte) (valAddr sdk.ValAddress, height uint64) { + // key is in the format: + // 0x08: ValidatorSlashEvent + kv.AssertKeyAtLeastLength(key, 2) + valAddrLen := int(key[1]) + kv.AssertKeyAtLeastLength(key, 3+valAddrLen) + valAddr = key[2 : 2+valAddrLen] + startB := 2 + valAddrLen + kv.AssertKeyAtLeastLength(key, startB+9) + b := key[startB : startB+8] // the next 8 bytes represent the height + height = binary.BigEndian.Uint64(b) + return +} + +// GetValidatorOutstandingRewardsKey creates the outstanding rewards key for a validator. +func GetValidatorOutstandingRewardsKey(valAddr sdk.ValAddress) []byte { + return append(ValidatorOutstandingRewardsPrefix, address.MustLengthPrefix(valAddr.Bytes())...) +} + +// GetDelegatorWithdrawAddrKey creates the key for a delegator's withdraw addr. +func GetDelegatorWithdrawAddrKey(delAddr sdk.AccAddress) []byte { + return append(DelegatorWithdrawAddrPrefix, address.MustLengthPrefix(delAddr.Bytes())...) +} + +// GetDelegatorStartingInfoKey creates the key for a delegator's starting info. +func GetDelegatorStartingInfoKey(v sdk.ValAddress, d sdk.AccAddress) []byte { + return append(append(DelegatorStartingInfoPrefix, address.MustLengthPrefix(v.Bytes())...), address.MustLengthPrefix(d.Bytes())...) +} + +// GetValidatorHistoricalRewardsPrefix creates the prefix key for a validator's historical rewards. +func GetValidatorHistoricalRewardsPrefix(v sdk.ValAddress) []byte { + return append(ValidatorHistoricalRewardsPrefix, address.MustLengthPrefix(v.Bytes())...) +} + +// GetValidatorHistoricalRewardsKey creates the key for a validator's historical rewards. +func GetValidatorHistoricalRewardsKey(v sdk.ValAddress, k uint64) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint64(b, k) + return append(append(ValidatorHistoricalRewardsPrefix, address.MustLengthPrefix(v.Bytes())...), b...) +} + +// GetValidatorCurrentRewardsKey creates the key for a validator's current rewards. +func GetValidatorCurrentRewardsKey(v sdk.ValAddress) []byte { + return append(ValidatorCurrentRewardsPrefix, address.MustLengthPrefix(v.Bytes())...) +} + +// GetValidatorAccumulatedCommissionKey creates the key for a validator's current commission. +func GetValidatorAccumulatedCommissionKey(v sdk.ValAddress) []byte { + return append(ValidatorAccumulatedCommissionPrefix, address.MustLengthPrefix(v.Bytes())...) +} + +// GetValidatorSlashEventPrefix creates the prefix key for a validator's slash fractions. +func GetValidatorSlashEventPrefix(v sdk.ValAddress) []byte { + return append(ValidatorSlashEventPrefix, address.MustLengthPrefix(v.Bytes())...) +} + +// GetValidatorSlashEventKeyPrefix creates the prefix key for a validator's slash fraction (ValidatorSlashEventPrefix + height). +func GetValidatorSlashEventKeyPrefix(v sdk.ValAddress, height uint64) []byte { + heightBz := make([]byte, 8) + binary.BigEndian.PutUint64(heightBz, height) + + return append( + ValidatorSlashEventPrefix, + append(address.MustLengthPrefix(v.Bytes()), heightBz...)..., + ) +} + +// GetValidatorSlashEventKey creates the key for a validator's slash fraction. +func GetValidatorSlashEventKey(v sdk.ValAddress, height, period uint64) []byte { + periodBz := make([]byte, 8) + binary.BigEndian.PutUint64(periodBz, period) + prefix := GetValidatorSlashEventKeyPrefix(v, height) + + return append(prefix, periodBz...) +} diff --git a/x/distribution/types/msg.go b/x/distribution/types/msg.go new file mode 100644 index 0000000..231e86b --- /dev/null +++ b/x/distribution/types/msg.go @@ -0,0 +1,54 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// Verify interface at compile time +var ( + _ sdk.Msg = (*MsgSetWithdrawAddress)(nil) + _ sdk.Msg = (*MsgWithdrawDelegatorReward)(nil) + _ sdk.Msg = (*MsgWithdrawValidatorCommission)(nil) + _ sdk.Msg = (*MsgUpdateParams)(nil) + _ sdk.Msg = (*MsgCommunityPoolSpend)(nil) + _ sdk.Msg = (*MsgDepositValidatorRewardsPool)(nil) +) + +func NewMsgSetWithdrawAddress(delAddr, withdrawAddr sdk.AccAddress) *MsgSetWithdrawAddress { + return &MsgSetWithdrawAddress{ + DelegatorAddress: delAddr.String(), + WithdrawAddress: withdrawAddr.String(), + } +} + +func NewMsgWithdrawDelegatorReward(delAddr, valAddr string) *MsgWithdrawDelegatorReward { + return &MsgWithdrawDelegatorReward{ + DelegatorAddress: delAddr, + ValidatorAddress: valAddr, + } +} + +func NewMsgWithdrawValidatorCommission(valAddr string) *MsgWithdrawValidatorCommission { + return &MsgWithdrawValidatorCommission{ + ValidatorAddress: valAddr, + } +} + +// NewMsgFundCommunityPool returns a new MsgFundCommunityPool with a sender and +// a funding amount. +func NewMsgFundCommunityPool(amount sdk.Coins, depositor string) *MsgFundCommunityPool { + return &MsgFundCommunityPool{ + Amount: amount, + Depositor: depositor, + } +} + +// NewMsgDepositValidatorRewardsPool returns a new MsgDepositValidatorRewardsPool +// with a depositor and a funding amount. +func NewMsgDepositValidatorRewardsPool(depositor, valAddr string, amount sdk.Coins) *MsgDepositValidatorRewardsPool { + return &MsgDepositValidatorRewardsPool{ + Amount: amount, + Depositor: depositor, + ValidatorAddress: valAddr, + } +} diff --git a/x/distribution/types/params.go b/x/distribution/types/params.go new file mode 100644 index 0000000..f7c9802 --- /dev/null +++ b/x/distribution/types/params.go @@ -0,0 +1,50 @@ +package types + +import ( + "fmt" + + "cosmossdk.io/math" +) + +// DefaultParams returns default distribution parameters +func DefaultParams() Params { + return Params{ + CommunityTax: math.LegacyNewDecWithPrec(2, 2), // 2% + BaseProposerReward: math.LegacyZeroDec(), // deprecated + BonusProposerReward: math.LegacyZeroDec(), // deprecated + WithdrawAddrEnabled: true, + } +} + +// ValidateBasic performs basic validation on distribution parameters. +func (p Params) ValidateBasic() error { + return validateCommunityTax(p.CommunityTax) +} + +func validateCommunityTax(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNil() { + return fmt.Errorf("community tax must be not nil") + } + if v.IsNegative() { + return fmt.Errorf("community tax must be positive: %s", v) + } + if v.GT(math.LegacyOneDec()) { + return fmt.Errorf("community tax too large: %s", v) + } + + return nil +} + +func validateWithdrawAddrEnabled(i interface{}) error { + _, ok := i.(bool) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} diff --git a/x/distribution/types/params_internal_test.go b/x/distribution/types/params_internal_test.go new file mode 100644 index 0000000..92cffd7 --- /dev/null +++ b/x/distribution/types/params_internal_test.go @@ -0,0 +1,32 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" +) + +func Test_validateAuxFuncs(t *testing.T) { + type args struct { + i interface{} + } + tests := []struct { + name string + args args + wantErr bool + }{ + {"wrong type", args{10.5}, true}, + {"empty math.LegacyDec", args{math.LegacyDec{}}, true}, + {"negative", args{math.LegacyNewDec(-1)}, true}, + {"one dec", args{math.LegacyNewDec(1)}, false}, + {"two dec", args{math.LegacyNewDec(2)}, true}, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.wantErr, validateCommunityTax(tt.args.i) != nil) + }) + } +} diff --git a/x/distribution/types/params_legacy.go b/x/distribution/types/params_legacy.go new file mode 100644 index 0000000..4805e8b --- /dev/null +++ b/x/distribution/types/params_legacy.go @@ -0,0 +1,22 @@ +package types + +import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + +// Parameter keys +var ( + ParamStoreKeyCommunityTax = []byte("communitytax") + ParamStoreKeyWithdrawAddrEnabled = []byte("withdrawaddrenabled") +) + +// Deprecated: ParamKeyTable returns the parameter key table. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// Deprecated: ParamSetPairs returns the parameter set pairs. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(ParamStoreKeyCommunityTax, &p.CommunityTax, validateCommunityTax), + paramtypes.NewParamSetPair(ParamStoreKeyWithdrawAddrEnabled, &p.WithdrawAddrEnabled, validateWithdrawAddrEnabled), + } +} diff --git a/x/distribution/types/params_test.go b/x/distribution/types/params_test.go new file mode 100644 index 0000000..dfd68a3 --- /dev/null +++ b/x/distribution/types/params_test.go @@ -0,0 +1,50 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +func TestParams_ValidateBasic(t *testing.T) { + toDec := sdkmath.LegacyMustNewDecFromStr + + type fields struct { + CommunityTax sdkmath.LegacyDec + BaseProposerReward sdkmath.LegacyDec + BonusProposerReward sdkmath.LegacyDec + WithdrawAddrEnabled bool + } + tests := []struct { + name string + fields fields + wantErr bool + }{ + {"success", fields{toDec("0.1"), toDec("0"), toDec("0"), false}, false}, + {"negative community tax", fields{toDec("-0.1"), toDec("0"), toDec("0"), false}, true}, + {"negative base proposer reward (must not matter)", fields{toDec("0.1"), toDec("0"), toDec("-0.1"), false}, false}, + {"negative bonus proposer reward (must not matter)", fields{toDec("0.1"), toDec("0"), toDec("-0.1"), false}, false}, + {"total sum greater than 1 (must not matter)", fields{toDec("0.2"), toDec("0.5"), toDec("0.4"), false}, false}, + {"community tax greater than 1", fields{toDec("1.1"), toDec("0"), toDec("0"), false}, true}, + {"community tax nil", fields{sdkmath.LegacyDec{}, toDec("0"), toDec("0"), false}, true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + p := types.Params{ + CommunityTax: tt.fields.CommunityTax, + WithdrawAddrEnabled: tt.fields.WithdrawAddrEnabled, + } + if err := p.ValidateBasic(); (err != nil) != tt.wantErr { + t.Errorf("ValidateBasic() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func TestDefaultParams(t *testing.T) { + require.NoError(t, types.DefaultParams().ValidateBasic()) +} diff --git a/x/distribution/types/proposal.go b/x/distribution/types/proposal.go new file mode 100644 index 0000000..847bdd3 --- /dev/null +++ b/x/distribution/types/proposal.go @@ -0,0 +1,33 @@ +package types + +import ( + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +// GetTitle returns the title of a community pool spend proposal. +func (csp *CommunityPoolSpendProposal) GetTitle() string { return csp.Title } + +// GetDescription returns the description of a community pool spend proposal. +func (csp *CommunityPoolSpendProposal) GetDescription() string { return csp.Description } + +// GetDescription returns the routing key of a community pool spend proposal. +func (csp *CommunityPoolSpendProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a community pool spend proposal. +func (csp *CommunityPoolSpendProposal) ProposalType() string { return "CommunityPoolSpend" } + +// ValidateBasic runs basic stateless validity checks +func (csp *CommunityPoolSpendProposal) ValidateBasic() error { + err := govtypes.ValidateAbstract(csp) + if err != nil { + return err + } + if !csp.Amount.IsValid() { + return ErrInvalidProposalAmount + } + if csp.Recipient == "" { + return ErrEmptyProposalRecipient + } + + return nil +} diff --git a/x/distribution/types/querier.go b/x/distribution/types/querier.go new file mode 100644 index 0000000..46f3039 --- /dev/null +++ b/x/distribution/types/querier.go @@ -0,0 +1,94 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// querier keys +const ( + QueryParams = "params" + QueryValidatorOutstandingRewards = "validator_outstanding_rewards" + QueryValidatorCommission = "validator_commission" + QueryValidatorSlashes = "validator_slashes" + QueryDelegationRewards = "delegation_rewards" + QueryDelegatorTotalRewards = "delegator_total_rewards" + QueryDelegatorValidators = "delegator_validators" + QueryWithdrawAddr = "withdraw_addr" + QueryCommunityPool = "community_pool" +) + +// params for query 'custom/distr/validator_outstanding_rewards' +type QueryValidatorOutstandingRewardsParams struct { + ValidatorAddress sdk.ValAddress `json:"validator_address" yaml:"validator_address"` +} + +// creates a new instance of QueryValidatorOutstandingRewardsParams +func NewQueryValidatorOutstandingRewardsParams(validatorAddr sdk.ValAddress) QueryValidatorOutstandingRewardsParams { + return QueryValidatorOutstandingRewardsParams{ + ValidatorAddress: validatorAddr, + } +} + +// params for query 'custom/distr/validator_commission' +type QueryValidatorCommissionParams struct { + ValidatorAddress sdk.ValAddress `json:"validator_address" yaml:"validator_address"` +} + +// creates a new instance of QueryValidatorCommissionParams +func NewQueryValidatorCommissionParams(validatorAddr sdk.ValAddress) QueryValidatorCommissionParams { + return QueryValidatorCommissionParams{ + ValidatorAddress: validatorAddr, + } +} + +// params for query 'custom/distr/validator_slashes' +type QueryValidatorSlashesParams struct { + ValidatorAddress sdk.ValAddress `json:"validator_address" yaml:"validator_address"` + StartingHeight uint64 `json:"starting_height" yaml:"starting_height"` + EndingHeight uint64 `json:"ending_height" yaml:"ending_height"` +} + +// creates a new instance of QueryValidatorSlashesParams +func NewQueryValidatorSlashesParams(validatorAddr sdk.ValAddress, startingHeight, endingHeight uint64) QueryValidatorSlashesParams { + return QueryValidatorSlashesParams{ + ValidatorAddress: validatorAddr, + StartingHeight: startingHeight, + EndingHeight: endingHeight, + } +} + +// params for query 'custom/distr/delegation_rewards' +type QueryDelegationRewardsParams struct { + DelegatorAddress sdk.AccAddress `json:"delegator_address" yaml:"delegator_address"` + ValidatorAddress sdk.ValAddress `json:"validator_address" yaml:"validator_address"` +} + +// creates a new instance of QueryDelegationRewardsParams +func NewQueryDelegationRewardsParams(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) QueryDelegationRewardsParams { + return QueryDelegationRewardsParams{ + DelegatorAddress: delegatorAddr, + ValidatorAddress: validatorAddr, + } +} + +// params for query 'custom/distr/delegator_total_rewards' and 'custom/distr/delegator_validators' +type QueryDelegatorParams struct { + DelegatorAddress sdk.AccAddress `json:"delegator_address" yaml:"delegator_address"` +} + +// creates a new instance of QueryDelegationRewardsParams +func NewQueryDelegatorParams(delegatorAddr sdk.AccAddress) QueryDelegatorParams { + return QueryDelegatorParams{ + DelegatorAddress: delegatorAddr, + } +} + +// params for query 'custom/distr/withdraw_addr' +type QueryDelegatorWithdrawAddrParams struct { + DelegatorAddress sdk.AccAddress `json:"delegator_address" yaml:"delegator_address"` +} + +// NewQueryDelegatorWithdrawAddrParams creates a new instance of QueryDelegatorWithdrawAddrParams. +func NewQueryDelegatorWithdrawAddrParams(delegatorAddr sdk.AccAddress) QueryDelegatorWithdrawAddrParams { + return QueryDelegatorWithdrawAddrParams{DelegatorAddress: delegatorAddr} +} diff --git a/x/distribution/types/query.go b/x/distribution/types/query.go new file mode 100644 index 0000000..973b038 --- /dev/null +++ b/x/distribution/types/query.go @@ -0,0 +1,37 @@ +package types + +import ( + "fmt" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// QueryDelegatorTotalRewardsResponse defines the properties of +// QueryDelegatorTotalRewards query's response. +type QueryDelegatorTotalRewardsResponse struct { + Rewards []DelegationDelegatorReward `json:"rewards" yaml:"rewards"` + Total sdk.DecCoins `json:"total" yaml:"total"` +} + +// NewQueryDelegatorTotalRewardsResponse constructs a QueryDelegatorTotalRewardsResponse +func NewQueryDelegatorTotalRewardsResponse(rewards []DelegationDelegatorReward, total sdk.DecCoins) QueryDelegatorTotalRewardsResponse { + return QueryDelegatorTotalRewardsResponse{Rewards: rewards, Total: total} +} + +func (res QueryDelegatorTotalRewardsResponse) String() string { + out := "Delegator Total Rewards:\n" + out += " Rewards:" + for _, reward := range res.Rewards { + out += fmt.Sprintf(` + ValidatorAddress: %s + Reward: %s`, reward.ValidatorAddress, reward.Reward) + } + out += fmt.Sprintf("\n Total: %s\n", res.Total) + return strings.TrimSpace(out) +} + +// NewDelegationDelegatorReward constructs a DelegationDelegatorReward. +func NewDelegationDelegatorReward(valAddr string, reward sdk.DecCoins) DelegationDelegatorReward { + return DelegationDelegatorReward{ValidatorAddress: valAddr, Reward: reward} +} diff --git a/x/distribution/types/query.pb.go b/x/distribution/types/query.pb.go new file mode 100644 index 0000000..e9e8838 --- /dev/null +++ b/x/distribution/types/query.pb.go @@ -0,0 +1,4423 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/distribution/v1beta1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method. +type QueryValidatorDistributionInfoRequest struct { + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *QueryValidatorDistributionInfoRequest) Reset() { *m = QueryValidatorDistributionInfoRequest{} } +func (m *QueryValidatorDistributionInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorDistributionInfoRequest) ProtoMessage() {} +func (*QueryValidatorDistributionInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{2} +} +func (m *QueryValidatorDistributionInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorDistributionInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorDistributionInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorDistributionInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorDistributionInfoRequest.Merge(m, src) +} +func (m *QueryValidatorDistributionInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorDistributionInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorDistributionInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorDistributionInfoRequest proto.InternalMessageInfo + +func (m *QueryValidatorDistributionInfoRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. +type QueryValidatorDistributionInfoResponse struct { + // operator_address defines the validator operator address. + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` + // self_bond_rewards defines the self delegations rewards. + SelfBondRewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=self_bond_rewards,json=selfBondRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"self_bond_rewards"` + // commission defines the commission the validator received. + Commission github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,3,rep,name=commission,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"commission"` +} + +func (m *QueryValidatorDistributionInfoResponse) Reset() { + *m = QueryValidatorDistributionInfoResponse{} +} +func (m *QueryValidatorDistributionInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorDistributionInfoResponse) ProtoMessage() {} +func (*QueryValidatorDistributionInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{3} +} +func (m *QueryValidatorDistributionInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorDistributionInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorDistributionInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorDistributionInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorDistributionInfoResponse.Merge(m, src) +} +func (m *QueryValidatorDistributionInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorDistributionInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorDistributionInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorDistributionInfoResponse proto.InternalMessageInfo + +func (m *QueryValidatorDistributionInfoResponse) GetOperatorAddress() string { + if m != nil { + return m.OperatorAddress + } + return "" +} + +func (m *QueryValidatorDistributionInfoResponse) GetSelfBondRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.SelfBondRewards + } + return nil +} + +func (m *QueryValidatorDistributionInfoResponse) GetCommission() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Commission + } + return nil +} + +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. +type QueryValidatorOutstandingRewardsRequest struct { + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *QueryValidatorOutstandingRewardsRequest) Reset() { + *m = QueryValidatorOutstandingRewardsRequest{} +} +func (m *QueryValidatorOutstandingRewardsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorOutstandingRewardsRequest) ProtoMessage() {} +func (*QueryValidatorOutstandingRewardsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{4} +} +func (m *QueryValidatorOutstandingRewardsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorOutstandingRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorOutstandingRewardsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorOutstandingRewardsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorOutstandingRewardsRequest.Merge(m, src) +} +func (m *QueryValidatorOutstandingRewardsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorOutstandingRewardsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorOutstandingRewardsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorOutstandingRewardsRequest proto.InternalMessageInfo + +func (m *QueryValidatorOutstandingRewardsRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +type QueryValidatorOutstandingRewardsResponse struct { + Rewards ValidatorOutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"` +} + +func (m *QueryValidatorOutstandingRewardsResponse) Reset() { + *m = QueryValidatorOutstandingRewardsResponse{} +} +func (m *QueryValidatorOutstandingRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {} +func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{5} +} +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.Merge(m, src) +} +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorOutstandingRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorOutstandingRewardsResponse proto.InternalMessageInfo + +func (m *QueryValidatorOutstandingRewardsResponse) GetRewards() ValidatorOutstandingRewards { + if m != nil { + return m.Rewards + } + return ValidatorOutstandingRewards{} +} + +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method +type QueryValidatorCommissionRequest struct { + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *QueryValidatorCommissionRequest) Reset() { *m = QueryValidatorCommissionRequest{} } +func (m *QueryValidatorCommissionRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorCommissionRequest) ProtoMessage() {} +func (*QueryValidatorCommissionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{6} +} +func (m *QueryValidatorCommissionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorCommissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorCommissionRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorCommissionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorCommissionRequest.Merge(m, src) +} +func (m *QueryValidatorCommissionRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorCommissionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorCommissionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorCommissionRequest proto.InternalMessageInfo + +func (m *QueryValidatorCommissionRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +type QueryValidatorCommissionResponse struct { + // commission defines the commission the validator received. + Commission ValidatorAccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission"` +} + +func (m *QueryValidatorCommissionResponse) Reset() { *m = QueryValidatorCommissionResponse{} } +func (m *QueryValidatorCommissionResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorCommissionResponse) ProtoMessage() {} +func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{7} +} +func (m *QueryValidatorCommissionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorCommissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorCommissionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorCommissionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorCommissionResponse.Merge(m, src) +} +func (m *QueryValidatorCommissionResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorCommissionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorCommissionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorCommissionResponse proto.InternalMessageInfo + +func (m *QueryValidatorCommissionResponse) GetCommission() ValidatorAccumulatedCommission { + if m != nil { + return m.Commission + } + return ValidatorAccumulatedCommission{} +} + +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method +type QueryValidatorSlashesRequest struct { + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // starting_height defines the optional starting height to query the slashes. + StartingHeight uint64 `protobuf:"varint,2,opt,name=starting_height,json=startingHeight,proto3" json:"starting_height,omitempty"` + // starting_height defines the optional ending height to query the slashes. + EndingHeight uint64 `protobuf:"varint,3,opt,name=ending_height,json=endingHeight,proto3" json:"ending_height,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryValidatorSlashesRequest) Reset() { *m = QueryValidatorSlashesRequest{} } +func (m *QueryValidatorSlashesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorSlashesRequest) ProtoMessage() {} +func (*QueryValidatorSlashesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{8} +} +func (m *QueryValidatorSlashesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorSlashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorSlashesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorSlashesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorSlashesRequest.Merge(m, src) +} +func (m *QueryValidatorSlashesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorSlashesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorSlashesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorSlashesRequest proto.InternalMessageInfo + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +type QueryValidatorSlashesResponse struct { + // slashes defines the slashes the validator received. + Slashes []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryValidatorSlashesResponse) Reset() { *m = QueryValidatorSlashesResponse{} } +func (m *QueryValidatorSlashesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorSlashesResponse) ProtoMessage() {} +func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{9} +} +func (m *QueryValidatorSlashesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorSlashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorSlashesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryValidatorSlashesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorSlashesResponse.Merge(m, src) +} +func (m *QueryValidatorSlashesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorSlashesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorSlashesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorSlashesResponse proto.InternalMessageInfo + +func (m *QueryValidatorSlashesResponse) GetSlashes() []ValidatorSlashEvent { + if m != nil { + return m.Slashes + } + return nil +} + +func (m *QueryValidatorSlashesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. +type QueryDelegationRewardsRequest struct { + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *QueryDelegationRewardsRequest) Reset() { *m = QueryDelegationRewardsRequest{} } +func (m *QueryDelegationRewardsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationRewardsRequest) ProtoMessage() {} +func (*QueryDelegationRewardsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{10} +} +func (m *QueryDelegationRewardsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegationRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationRewardsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegationRewardsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationRewardsRequest.Merge(m, src) +} +func (m *QueryDelegationRewardsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegationRewardsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationRewardsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationRewardsRequest proto.InternalMessageInfo + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +type QueryDelegationRewardsResponse struct { + // rewards defines the rewards accrued by a delegation. + Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` +} + +func (m *QueryDelegationRewardsResponse) Reset() { *m = QueryDelegationRewardsResponse{} } +func (m *QueryDelegationRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationRewardsResponse) ProtoMessage() {} +func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{11} +} +func (m *QueryDelegationRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegationRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationRewardsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegationRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationRewardsResponse.Merge(m, src) +} +func (m *QueryDelegationRewardsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegationRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationRewardsResponse proto.InternalMessageInfo + +func (m *QueryDelegationRewardsResponse) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Rewards + } + return nil +} + +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. +type QueryDelegationTotalRewardsRequest struct { + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (m *QueryDelegationTotalRewardsRequest) Reset() { *m = QueryDelegationTotalRewardsRequest{} } +func (m *QueryDelegationTotalRewardsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationTotalRewardsRequest) ProtoMessage() {} +func (*QueryDelegationTotalRewardsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{12} +} +func (m *QueryDelegationTotalRewardsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegationTotalRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationTotalRewardsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegationTotalRewardsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationTotalRewardsRequest.Merge(m, src) +} +func (m *QueryDelegationTotalRewardsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegationTotalRewardsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationTotalRewardsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationTotalRewardsRequest proto.InternalMessageInfo + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +type QueryDelegationTotalRewardsResponse struct { + // rewards defines all the rewards accrued by a delegator. + Rewards []DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards"` + // total defines the sum of all the rewards. + Total github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=total,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"total"` +} + +func (m *QueryDelegationTotalRewardsResponse) Reset() { *m = QueryDelegationTotalRewardsResponse{} } +func (m *QueryDelegationTotalRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {} +func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{13} +} +func (m *QueryDelegationTotalRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegationTotalRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationTotalRewardsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegationTotalRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationTotalRewardsResponse.Merge(m, src) +} +func (m *QueryDelegationTotalRewardsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegationTotalRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationTotalRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationTotalRewardsResponse proto.InternalMessageInfo + +func (m *QueryDelegationTotalRewardsResponse) GetRewards() []DelegationDelegatorReward { + if m != nil { + return m.Rewards + } + return nil +} + +func (m *QueryDelegationTotalRewardsResponse) GetTotal() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Total + } + return nil +} + +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. +type QueryDelegatorValidatorsRequest struct { + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (m *QueryDelegatorValidatorsRequest) Reset() { *m = QueryDelegatorValidatorsRequest{} } +func (m *QueryDelegatorValidatorsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorValidatorsRequest) ProtoMessage() {} +func (*QueryDelegatorValidatorsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{14} +} +func (m *QueryDelegatorValidatorsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegatorValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorValidatorsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegatorValidatorsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorValidatorsRequest.Merge(m, src) +} +func (m *QueryDelegatorValidatorsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegatorValidatorsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorValidatorsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorValidatorsRequest proto.InternalMessageInfo + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +type QueryDelegatorValidatorsResponse struct { + // validators defines the validators a delegator is delegating for. + Validators []string `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` +} + +func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegatorValidatorsResponse{} } +func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} +func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{15} +} +func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegatorValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorValidatorsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegatorValidatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorValidatorsResponse.Merge(m, src) +} +func (m *QueryDelegatorValidatorsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegatorValidatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorValidatorsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorValidatorsResponse proto.InternalMessageInfo + +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressRequest struct { + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (m *QueryDelegatorWithdrawAddressRequest) Reset() { *m = QueryDelegatorWithdrawAddressRequest{} } +func (m *QueryDelegatorWithdrawAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage() {} +func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{16} +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorWithdrawAddressRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorWithdrawAddressRequest.Merge(m, src) +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorWithdrawAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorWithdrawAddressRequest proto.InternalMessageInfo + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressResponse struct { + // withdraw_address defines the delegator address to query for. + WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDelegatorWithdrawAddressResponse{} } +func (m *QueryDelegatorWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} +func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{17} +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.Merge(m, src) +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorWithdrawAddressResponse proto.InternalMessageInfo + +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. +type QueryCommunityPoolRequest struct { +} + +func (m *QueryCommunityPoolRequest) Reset() { *m = QueryCommunityPoolRequest{} } +func (m *QueryCommunityPoolRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCommunityPoolRequest) ProtoMessage() {} +func (*QueryCommunityPoolRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{18} +} +func (m *QueryCommunityPoolRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCommunityPoolRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommunityPoolRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCommunityPoolRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommunityPoolRequest.Merge(m, src) +} +func (m *QueryCommunityPoolRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCommunityPoolRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommunityPoolRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommunityPoolRequest proto.InternalMessageInfo + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +type QueryCommunityPoolResponse struct { + // pool defines community pool's coins. + Pool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=pool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"pool"` +} + +func (m *QueryCommunityPoolResponse) Reset() { *m = QueryCommunityPoolResponse{} } +func (m *QueryCommunityPoolResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCommunityPoolResponse) ProtoMessage() {} +func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{19} +} +func (m *QueryCommunityPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCommunityPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommunityPoolResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCommunityPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommunityPoolResponse.Merge(m, src) +} +func (m *QueryCommunityPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCommunityPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommunityPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommunityPoolResponse proto.InternalMessageInfo + +func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Pool + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.distribution.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.distribution.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryValidatorDistributionInfoRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest") + proto.RegisterType((*QueryValidatorDistributionInfoResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse") + proto.RegisterType((*QueryValidatorOutstandingRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest") + proto.RegisterType((*QueryValidatorOutstandingRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse") + proto.RegisterType((*QueryValidatorCommissionRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest") + proto.RegisterType((*QueryValidatorCommissionResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse") + proto.RegisterType((*QueryValidatorSlashesRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest") + proto.RegisterType((*QueryValidatorSlashesResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse") + proto.RegisterType((*QueryDelegationRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest") + proto.RegisterType((*QueryDelegationRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse") + proto.RegisterType((*QueryDelegationTotalRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest") + proto.RegisterType((*QueryDelegationTotalRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse") + proto.RegisterType((*QueryDelegatorValidatorsRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest") + proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse") + proto.RegisterType((*QueryDelegatorWithdrawAddressRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest") + proto.RegisterType((*QueryDelegatorWithdrawAddressResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse") + proto.RegisterType((*QueryCommunityPoolRequest)(nil), "cosmos.distribution.v1beta1.QueryCommunityPoolRequest") + proto.RegisterType((*QueryCommunityPoolResponse)(nil), "cosmos.distribution.v1beta1.QueryCommunityPoolResponse") +} + +func init() { + proto.RegisterFile("cosmos/distribution/v1beta1/query.proto", fileDescriptor_5efd02cbc06efdc9) +} + +var fileDescriptor_5efd02cbc06efdc9 = []byte{ + // 1269 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6c, 0x1b, 0xc5, + 0x17, 0xce, 0xb8, 0x69, 0xfa, 0xcb, 0xeb, 0xaf, 0x24, 0x9e, 0x46, 0xc8, 0xd9, 0xa4, 0x4e, 0x70, + 0x68, 0x13, 0x35, 0x8a, 0xb7, 0x49, 0xa4, 0x52, 0x12, 0x2a, 0x88, 0x9d, 0x84, 0xa2, 0x46, 0x69, + 0xeb, 0x16, 0x22, 0x40, 0x95, 0xb5, 0xf6, 0x6e, 0x36, 0x0b, 0xf6, 0x8e, 0xb3, 0xb3, 0x8e, 0x89, + 0xaa, 0x5e, 0xca, 0xa5, 0xf4, 0x84, 0xe0, 0xc2, 0x91, 0x23, 0xe2, 0xc4, 0xa1, 0x9c, 0xe1, 0xc0, + 0xa1, 0xc7, 0xaa, 0x48, 0x88, 0x13, 0xa0, 0x04, 0x89, 0x72, 0x00, 0x71, 0xe3, 0x8a, 0x76, 0x66, + 0xd6, 0xde, 0xb5, 0xd7, 0xeb, 0x7f, 0xf2, 0x25, 0xb1, 0x66, 0xe7, 0x7d, 0xdf, 0xfb, 0xde, 0x7b, + 0x33, 0xfb, 0xd9, 0x30, 0x9b, 0x27, 0xb4, 0x48, 0xa8, 0xac, 0x1a, 0xd4, 0xb6, 0x8c, 0x5c, 0xd9, + 0x36, 0x88, 0x29, 0x1f, 0x2c, 0xe6, 0x34, 0x5b, 0x59, 0x94, 0xf7, 0xcb, 0x9a, 0x75, 0x98, 0x2c, + 0x59, 0xc4, 0x26, 0x78, 0x82, 0x6f, 0x4c, 0x7a, 0x37, 0x26, 0xc5, 0x46, 0xe9, 0xa2, 0x40, 0xc9, + 0x29, 0x54, 0xe3, 0x51, 0x55, 0x8c, 0x92, 0xa2, 0x1b, 0xa6, 0xc2, 0x76, 0x33, 0x20, 0x69, 0x4c, + 0x27, 0x3a, 0x61, 0x1f, 0x65, 0xe7, 0x93, 0x58, 0x9d, 0xd4, 0x09, 0xd1, 0x0b, 0x9a, 0xac, 0x94, + 0x0c, 0x59, 0x31, 0x4d, 0x62, 0xb3, 0x10, 0x2a, 0x9e, 0xc6, 0xbd, 0xf8, 0x2e, 0x72, 0x9e, 0x18, + 0x2e, 0x66, 0x32, 0x4c, 0x85, 0x2f, 0x63, 0xbe, 0x7f, 0x9c, 0xef, 0xcf, 0xf2, 0x34, 0x84, 0x32, + 0xfe, 0x28, 0xaa, 0x14, 0x0d, 0x93, 0xc8, 0xec, 0x2f, 0x5f, 0x4a, 0x8c, 0x01, 0xbe, 0xe5, 0x68, + 0xba, 0xa9, 0x58, 0x4a, 0x91, 0x66, 0xb4, 0xfd, 0xb2, 0x46, 0xed, 0xc4, 0x5d, 0x38, 0xeb, 0x5b, + 0xa5, 0x25, 0x62, 0x52, 0x0d, 0x6f, 0xc2, 0x50, 0x89, 0xad, 0xc4, 0xd0, 0x34, 0x9a, 0x3b, 0xbd, + 0x34, 0x93, 0x0c, 0x29, 0x5c, 0x92, 0x07, 0xa7, 0x86, 0x9f, 0xfc, 0x32, 0x35, 0xf0, 0xd5, 0x1f, + 0xdf, 0x5c, 0x44, 0x19, 0x11, 0x9d, 0xa8, 0xc0, 0x79, 0x06, 0xff, 0x8e, 0x52, 0x30, 0x54, 0xc5, + 0x26, 0xd6, 0xba, 0x27, 0xfe, 0x2d, 0x73, 0x97, 0x88, 0x3c, 0xf0, 0x36, 0x44, 0x0f, 0xdc, 0x3d, + 0x59, 0x45, 0x55, 0x2d, 0x8d, 0x72, 0xee, 0xe1, 0xd4, 0x4b, 0xcf, 0x1e, 0x2f, 0x9c, 0x13, 0xf4, + 0x55, 0x9c, 0x35, 0xbe, 0xe5, 0xb6, 0x6d, 0x19, 0xa6, 0x9e, 0x19, 0x3d, 0xa8, 0x5b, 0x4f, 0xfc, + 0x1d, 0x81, 0x0b, 0xad, 0x98, 0x85, 0xd6, 0x2d, 0x18, 0x25, 0x25, 0xcd, 0xea, 0x8e, 0x79, 0xc4, + 0x0d, 0x15, 0xcb, 0xf8, 0x01, 0x82, 0x28, 0xd5, 0x0a, 0xbb, 0xd9, 0x1c, 0x31, 0xd5, 0xac, 0xa5, + 0x55, 0x14, 0x4b, 0xa5, 0xb1, 0xc8, 0xf4, 0x89, 0xb9, 0xd3, 0x4b, 0x93, 0x6e, 0x15, 0x9d, 0x09, + 0xa8, 0x56, 0x6f, 0x5d, 0xcb, 0xa7, 0x89, 0x61, 0xa6, 0xae, 0x38, 0xe5, 0xfb, 0xfa, 0xd7, 0xa9, + 0x79, 0xdd, 0xb0, 0xf7, 0xca, 0xb9, 0x64, 0x9e, 0x14, 0x45, 0x53, 0xc5, 0xbf, 0x05, 0xaa, 0x7e, + 0x28, 0xdb, 0x87, 0x25, 0x8d, 0xba, 0x31, 0x94, 0x57, 0x7b, 0xc4, 0x21, 0x4c, 0x11, 0x53, 0xcd, + 0x70, 0x3a, 0xbc, 0x0f, 0x90, 0x27, 0xc5, 0xa2, 0x41, 0xa9, 0x41, 0xcc, 0xd8, 0x89, 0x36, 0xc8, + 0x97, 0xbb, 0x20, 0xcf, 0x78, 0x48, 0x12, 0x87, 0x30, 0xeb, 0xaf, 0xf7, 0x8d, 0xb2, 0x4d, 0x6d, + 0xc5, 0x54, 0x9d, 0x2a, 0xf1, 0xb4, 0xfa, 0xd5, 0xeb, 0x4f, 0x10, 0xcc, 0xb5, 0xe6, 0x16, 0xdd, + 0xbe, 0x0b, 0xa7, 0xdc, 0xa6, 0xf0, 0xd1, 0xbe, 0x12, 0x3a, 0xda, 0x21, 0x90, 0xde, 0x79, 0x77, + 0x31, 0x13, 0xfb, 0x30, 0xe5, 0x4f, 0x25, 0x5d, 0x2d, 0x51, 0xbf, 0xe4, 0x3f, 0x42, 0x30, 0xdd, + 0x9c, 0x53, 0xc8, 0xde, 0xf5, 0x4d, 0x04, 0x57, 0xbe, 0xda, 0x9e, 0xf2, 0xb5, 0x7c, 0xbe, 0x5c, + 0x2c, 0x17, 0x14, 0x5b, 0x53, 0x6b, 0xc0, 0x5e, 0xf1, 0xde, 0x31, 0x78, 0x14, 0x81, 0x49, 0x7f, + 0x32, 0xb7, 0x0b, 0x0a, 0xdd, 0xd3, 0xfa, 0xd5, 0x7c, 0x3c, 0x0b, 0x23, 0xd4, 0x56, 0x2c, 0xdb, + 0x30, 0xf5, 0xec, 0x9e, 0x66, 0xe8, 0x7b, 0x76, 0x2c, 0x32, 0x8d, 0xe6, 0x06, 0x33, 0x2f, 0xb8, + 0xcb, 0xd7, 0xd8, 0x2a, 0x9e, 0x81, 0x33, 0x1a, 0x6b, 0x9f, 0xbb, 0xed, 0x04, 0xdb, 0xf6, 0x7f, + 0xbe, 0x28, 0x36, 0x6d, 0x02, 0xd4, 0xae, 0xfa, 0xd8, 0x20, 0x2b, 0xd3, 0x05, 0xdf, 0xc1, 0xe1, + 0x6f, 0x93, 0xda, 0xcd, 0xa7, 0x6b, 0x42, 0x59, 0xc6, 0x13, 0xb9, 0x32, 0xf8, 0xf0, 0xcb, 0xa9, + 0x81, 0xc4, 0x77, 0x08, 0xce, 0x35, 0x29, 0x86, 0x68, 0xcb, 0xdb, 0x70, 0x8a, 0xf2, 0xa5, 0x18, + 0x62, 0xa7, 0xf4, 0x52, 0x7b, 0x3d, 0x61, 0x38, 0x1b, 0x07, 0x9a, 0x69, 0xfb, 0xa6, 0x50, 0x60, + 0xe1, 0x37, 0x7d, 0x32, 0x22, 0x4c, 0xc6, 0x6c, 0x4b, 0x19, 0x3c, 0x27, 0xaf, 0x8e, 0xc4, 0xf7, + 0xae, 0x82, 0x75, 0xad, 0xa0, 0xe9, 0x6c, 0xad, 0xee, 0x30, 0x6f, 0x40, 0x54, 0xe5, 0xcf, 0x1a, + 0xfa, 0x19, 0x7b, 0xf6, 0x78, 0x61, 0x4c, 0x90, 0xd6, 0xb5, 0xb1, 0x1a, 0xe2, 0xb6, 0x31, 0x70, + 0x2c, 0x22, 0x5d, 0x8f, 0xc5, 0xca, 0xff, 0x9c, 0x06, 0x3c, 0x77, 0x9a, 0xf0, 0x19, 0x82, 0x78, + 0x33, 0x09, 0xa2, 0x0b, 0x25, 0xef, 0x9d, 0xd0, 0xcf, 0x8b, 0xba, 0x7a, 0x4d, 0x94, 0x21, 0x51, + 0x97, 0xd3, 0x1d, 0x62, 0x2b, 0x85, 0xbe, 0xd4, 0xd6, 0x53, 0x8b, 0x7f, 0x10, 0xcc, 0x84, 0xf2, + 0x8a, 0x82, 0xbc, 0x5f, 0x5f, 0x90, 0xcb, 0xa1, 0x63, 0x59, 0x43, 0x5b, 0x77, 0xb9, 0x39, 0x62, + 0xd0, 0x15, 0x89, 0x0b, 0x70, 0xd2, 0x76, 0x48, 0xfb, 0xfc, 0x52, 0xe4, 0x24, 0x09, 0x4b, 0x5c, + 0xc8, 0xd5, 0xcc, 0xaa, 0x23, 0xd4, 0xbf, 0x32, 0x6f, 0x89, 0x0b, 0x39, 0x90, 0x53, 0x94, 0x38, + 0x0e, 0x50, 0x1d, 0x5a, 0x5e, 0xe5, 0xe1, 0x8c, 0x67, 0xc5, 0x83, 0x56, 0x81, 0x97, 0xfd, 0x68, + 0x3b, 0x86, 0xbd, 0xa7, 0x5a, 0x4a, 0x45, 0x10, 0xf7, 0x4d, 0xc6, 0x81, 0x30, 0x6f, 0xcd, 0x89, + 0x85, 0x96, 0x34, 0x8c, 0x56, 0xc4, 0xa3, 0xb6, 0x89, 0x47, 0x2a, 0x7e, 0x30, 0x0f, 0xef, 0x04, + 0x8c, 0x33, 0x5e, 0xe7, 0x6d, 0x53, 0x36, 0x0d, 0xfb, 0xf0, 0x26, 0x21, 0x05, 0xd7, 0xb0, 0x3e, + 0x44, 0x20, 0x05, 0x3d, 0x15, 0xa9, 0x7c, 0x00, 0x83, 0x25, 0x42, 0x0a, 0x7d, 0x3e, 0xc7, 0x8c, + 0x63, 0xe9, 0x87, 0x28, 0x9c, 0x64, 0xa9, 0xe0, 0x2f, 0x10, 0x0c, 0x71, 0x13, 0x8c, 0xe5, 0xd0, + 0x93, 0xd2, 0xe8, 0xc0, 0xa5, 0x4b, 0xed, 0x07, 0x70, 0x8d, 0x89, 0xf9, 0x07, 0x3f, 0xfe, 0xfe, + 0x79, 0xe4, 0x3c, 0x9e, 0x91, 0xc3, 0xbe, 0x30, 0x70, 0x07, 0x8e, 0xff, 0x44, 0x30, 0xde, 0xd4, + 0x03, 0xe3, 0x54, 0x6b, 0xf2, 0x56, 0xd6, 0x5d, 0x4a, 0xf7, 0x84, 0x21, 0x34, 0xa5, 0x99, 0xa6, + 0xab, 0x78, 0x35, 0x54, 0x53, 0xed, 0x7c, 0xc8, 0xf7, 0x1a, 0x5e, 0x17, 0xf7, 0xf1, 0xc7, 0x11, + 0x98, 0x08, 0x31, 0x6c, 0x78, 0xbd, 0x83, 0x4c, 0x9b, 0xda, 0x57, 0x69, 0xa3, 0x47, 0x14, 0xa1, + 0x78, 0x87, 0x29, 0xbe, 0x85, 0x6f, 0xf4, 0xa0, 0x58, 0x26, 0x35, 0x7c, 0xf7, 0xbb, 0x06, 0x3e, + 0x42, 0x70, 0x36, 0xc0, 0x0a, 0xe2, 0xd7, 0x3a, 0xc8, 0xbb, 0xc1, 0xb5, 0x4a, 0x57, 0xbb, 0x8c, + 0x16, 0x6a, 0xb7, 0x99, 0xda, 0x6b, 0x78, 0xb3, 0x17, 0xb5, 0x35, 0x9f, 0x89, 0x7f, 0x42, 0x30, + 0x5a, 0xef, 0xaa, 0xf0, 0xab, 0x1d, 0xe4, 0xe8, 0xb7, 0xa5, 0xd2, 0x4a, 0x37, 0xa1, 0x42, 0xdb, + 0x75, 0xa6, 0x6d, 0x03, 0xa7, 0x7b, 0xd1, 0xe6, 0x5a, 0xb7, 0xbf, 0x10, 0x44, 0x1b, 0x9c, 0x0a, + 0x6e, 0x23, 0xbd, 0x66, 0x0e, 0x4d, 0x5a, 0xed, 0x2a, 0x56, 0x68, 0xcb, 0x32, 0x6d, 0xef, 0xe2, + 0x9d, 0x50, 0x6d, 0xd5, 0x97, 0x08, 0x95, 0xef, 0x35, 0xbc, 0x83, 0xee, 0xcb, 0x62, 0x32, 0x03, + 0xcf, 0xec, 0x73, 0x04, 0x2f, 0x06, 0xbb, 0x11, 0xfc, 0x7a, 0x27, 0x89, 0x07, 0xf8, 0x27, 0xe9, + 0x8d, 0xee, 0x01, 0x3a, 0x6a, 0x6d, 0x7b, 0xf2, 0xd9, 0xc1, 0x0c, 0xb0, 0x04, 0xed, 0x1c, 0xcc, + 0xe6, 0xee, 0xa5, 0x9d, 0x83, 0x19, 0xe2, 0x43, 0xda, 0x3c, 0x98, 0x2d, 0x14, 0xd6, 0x66, 0x1b, + 0xff, 0x8b, 0x20, 0xd6, 0xcc, 0x30, 0xe0, 0xb5, 0x0e, 0x72, 0x0d, 0x76, 0x39, 0x52, 0xaa, 0x17, + 0x08, 0xa1, 0xf9, 0x0e, 0xd3, 0xbc, 0x8d, 0xb7, 0x7a, 0xd1, 0x5c, 0xef, 0x78, 0xf0, 0xb7, 0x08, + 0xce, 0xf8, 0x4c, 0x09, 0xbe, 0xdc, 0x3a, 0xd7, 0x20, 0x8f, 0x23, 0xbd, 0xd2, 0x71, 0x9c, 0x10, + 0xb6, 0xcc, 0x84, 0x2d, 0xe0, 0xf9, 0x50, 0x61, 0x79, 0x37, 0x36, 0xeb, 0xd8, 0x98, 0xd4, 0xf5, + 0x27, 0x47, 0x71, 0xf4, 0xf4, 0x28, 0x8e, 0x7e, 0x3b, 0x8a, 0xa3, 0x4f, 0x8f, 0xe3, 0x03, 0x4f, + 0x8f, 0xe3, 0x03, 0x3f, 0x1f, 0xc7, 0x07, 0xde, 0x5b, 0x0c, 0x35, 0x46, 0x1f, 0xf9, 0xd1, 0x99, + 0x4f, 0xca, 0x0d, 0xb1, 0x1f, 0x1b, 0x97, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x2b, 0x1c, + 0xf2, 0x92, 0x15, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params queries params of the distribution module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) + // ValidatorOutstandingRewards queries rewards of a validator address. + ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) + // ValidatorCommission queries accumulated commission for a validator. + ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) + // ValidatorSlashes queries slash events of a validator. + ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) + // DelegationRewards queries the total rewards accrued by a delegation. + DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) + // DelegationTotalRewards queries the total rewards accrued by each + // validator. + DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) + // DelegatorValidators queries the validators of a delegator. + DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) + // DelegatorWithdrawAddress queries withdraw address of a delegator. + DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) + // CommunityPool queries the community pool coins. + CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) { + out := new(QueryValidatorDistributionInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) { + out := new(QueryValidatorOutstandingRewardsResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) { + out := new(QueryValidatorCommissionResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorCommission", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) { + out := new(QueryValidatorSlashesResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) { + out := new(QueryDelegationRewardsResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegationRewards", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) { + out := new(QueryDelegationTotalRewardsResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { + out := new(QueryDelegatorValidatorsResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegatorValidators", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) { + out := new(QueryDelegatorWithdrawAddressResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) { + out := new(QueryCommunityPoolResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/CommunityPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries params of the distribution module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + ValidatorDistributionInfo(context.Context, *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error) + // ValidatorOutstandingRewards queries rewards of a validator address. + ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) + // ValidatorCommission queries accumulated commission for a validator. + ValidatorCommission(context.Context, *QueryValidatorCommissionRequest) (*QueryValidatorCommissionResponse, error) + // ValidatorSlashes queries slash events of a validator. + ValidatorSlashes(context.Context, *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) + // DelegationRewards queries the total rewards accrued by a delegation. + DelegationRewards(context.Context, *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) + // DelegationTotalRewards queries the total rewards accrued by each + // validator. + DelegationTotalRewards(context.Context, *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) + // DelegatorValidators queries the validators of a delegator. + DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) + // DelegatorWithdrawAddress queries withdraw address of a delegator. + DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) + // CommunityPool queries the community pool coins. + CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) ValidatorDistributionInfo(ctx context.Context, req *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorDistributionInfo not implemented") +} +func (*UnimplementedQueryServer) ValidatorOutstandingRewards(ctx context.Context, req *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorOutstandingRewards not implemented") +} +func (*UnimplementedQueryServer) ValidatorCommission(ctx context.Context, req *QueryValidatorCommissionRequest) (*QueryValidatorCommissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorCommission not implemented") +} +func (*UnimplementedQueryServer) ValidatorSlashes(ctx context.Context, req *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorSlashes not implemented") +} +func (*UnimplementedQueryServer) DelegationRewards(ctx context.Context, req *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegationRewards not implemented") +} +func (*UnimplementedQueryServer) DelegationTotalRewards(ctx context.Context, req *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegationTotalRewards not implemented") +} +func (*UnimplementedQueryServer) DelegatorValidators(ctx context.Context, req *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidators not implemented") +} +func (*UnimplementedQueryServer) DelegatorWithdrawAddress(ctx context.Context, req *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorWithdrawAddress not implemented") +} +func (*UnimplementedQueryServer) CommunityPool(ctx context.Context, req *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommunityPool not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorDistributionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorDistributionInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorDistributionInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorDistributionInfo(ctx, req.(*QueryValidatorDistributionInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorOutstandingRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorOutstandingRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorOutstandingRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorOutstandingRewards(ctx, req.(*QueryValidatorOutstandingRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorCommission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorCommissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorCommission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorCommission", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorCommission(ctx, req.(*QueryValidatorCommissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorSlashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorSlashesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorSlashes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorSlashes(ctx, req.(*QueryValidatorSlashesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegationRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegationRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegationRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/DelegationRewards", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegationRewards(ctx, req.(*QueryDelegationRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegationTotalRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegationTotalRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegationTotalRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegationTotalRewards(ctx, req.(*QueryDelegationTotalRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegatorValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorValidatorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegatorValidators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/DelegatorValidators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorValidators(ctx, req.(*QueryDelegatorValidatorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegatorWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorWithdrawAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegatorWithdrawAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorWithdrawAddress(ctx, req.(*QueryDelegatorWithdrawAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCommunityPoolRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CommunityPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/CommunityPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CommunityPool(ctx, req.(*QueryCommunityPoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.distribution.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "ValidatorDistributionInfo", + Handler: _Query_ValidatorDistributionInfo_Handler, + }, + { + MethodName: "ValidatorOutstandingRewards", + Handler: _Query_ValidatorOutstandingRewards_Handler, + }, + { + MethodName: "ValidatorCommission", + Handler: _Query_ValidatorCommission_Handler, + }, + { + MethodName: "ValidatorSlashes", + Handler: _Query_ValidatorSlashes_Handler, + }, + { + MethodName: "DelegationRewards", + Handler: _Query_DelegationRewards_Handler, + }, + { + MethodName: "DelegationTotalRewards", + Handler: _Query_DelegationTotalRewards_Handler, + }, + { + MethodName: "DelegatorValidators", + Handler: _Query_DelegatorValidators_Handler, + }, + { + MethodName: "DelegatorWithdrawAddress", + Handler: _Query_DelegatorWithdrawAddress_Handler, + }, + { + MethodName: "CommunityPool", + Handler: _Query_CommunityPool_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/distribution/v1beta1/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryValidatorDistributionInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorDistributionInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorDistributionInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorDistributionInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorDistributionInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorDistributionInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Commission) > 0 { + for iNdEx := len(m.Commission) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Commission[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.SelfBondRewards) > 0 { + for iNdEx := len(m.SelfBondRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelfBondRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorOutstandingRewardsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorOutstandingRewardsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorOutstandingRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorOutstandingRewardsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorOutstandingRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorOutstandingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Rewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryValidatorCommissionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorCommissionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorCommissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorCommissionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorCommissionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorCommissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryValidatorSlashesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorSlashesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorSlashesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.EndingHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EndingHeight)) + i-- + dAtA[i] = 0x18 + } + if m.StartingHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.StartingHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorSlashesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryValidatorSlashesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorSlashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Slashes) > 0 { + for iNdEx := len(m.Slashes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Slashes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationRewardsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegationRewardsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationRewardsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegationRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationTotalRewardsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegationTotalRewardsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationTotalRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationTotalRewardsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegationTotalRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationTotalRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Total) > 0 { + for iNdEx := len(m.Total) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Total[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorValidatorsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegatorValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorValidatorsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegatorValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Validators[iNdEx]) + copy(dAtA[i:], m.Validators[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validators[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorWithdrawAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegatorWithdrawAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorWithdrawAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorWithdrawAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDelegatorWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WithdrawAddress) > 0 { + i -= len(m.WithdrawAddress) + copy(dAtA[i:], m.WithdrawAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.WithdrawAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCommunityPoolRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCommunityPoolRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommunityPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCommunityPoolResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCommunityPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pool) > 0 { + for iNdEx := len(m.Pool) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pool[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorDistributionInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorDistributionInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.SelfBondRewards) > 0 { + for _, e := range m.SelfBondRewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Commission) > 0 { + for _, e := range m.Commission { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryValidatorOutstandingRewardsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorOutstandingRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Rewards.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorCommissionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorCommissionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Commission.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorSlashesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.StartingHeight != 0 { + n += 1 + sovQuery(uint64(m.StartingHeight)) + } + if m.EndingHeight != 0 { + n += 1 + sovQuery(uint64(m.EndingHeight)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorSlashesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Slashes) > 0 { + for _, e := range m.Slashes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegationRewardsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegationRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDelegationTotalRewardsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegationTotalRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Total) > 0 { + for _, e := range m.Total { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDelegatorValidatorsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorValidatorsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Validators) > 0 { + for _, s := range m.Validators { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDelegatorWithdrawAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorWithdrawAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.WithdrawAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCommunityPoolRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCommunityPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pool) > 0 { + for _, e := range m.Pool { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorDistributionInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorDistributionInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorDistributionInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorDistributionInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorDistributionInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorDistributionInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfBondRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelfBondRewards = append(m.SelfBondRewards, types.DecCoin{}) + if err := m.SelfBondRewards[len(m.SelfBondRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Commission = append(m.Commission, types.DecCoin{}) + if err := m.Commission[len(m.Commission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorOutstandingRewardsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorOutstandingRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorOutstandingRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorOutstandingRewardsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorCommissionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorCommissionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorCommissionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorCommissionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorCommissionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorCommissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorSlashesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorSlashesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorSlashesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartingHeight", wireType) + } + m.StartingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartingHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndingHeight", wireType) + } + m.EndingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EndingHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorSlashesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryValidatorSlashesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorSlashesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Slashes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Slashes = append(m.Slashes, ValidatorSlashEvent{}) + if err := m.Slashes[len(m.Slashes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegationRewardsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegationRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegationRewardsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegationRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types.DecCoin{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegationTotalRewardsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegationTotalRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationTotalRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegationTotalRewardsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, DelegationDelegatorReward{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Total = append(m.Total, types.DecCoin{}) + if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegatorValidatorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegatorWithdrawAddressRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDelegatorWithdrawAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WithdrawAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCommunityPoolRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCommunityPoolRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommunityPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCommunityPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCommunityPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pool = append(m.Pool, types.DecCoin{}) + if err := m.Pool[len(m.Pool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/distribution/types/query.pb.gw.go b/x/distribution/types/query.pb.gw.go new file mode 100644 index 0000000..9cf7f68 --- /dev/null +++ b/x/distribution/types/query.pb.gw.go @@ -0,0 +1,1066 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cosmos/distribution/v1beta1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValidatorDistributionInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorDistributionInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := client.ValidatorDistributionInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorDistributionInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorDistributionInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := server.ValidatorDistributionInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValidatorOutstandingRewards_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorOutstandingRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := client.ValidatorOutstandingRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorOutstandingRewards_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorOutstandingRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := server.ValidatorOutstandingRewards(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ValidatorCommission_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorCommissionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := client.ValidatorCommission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorCommission_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorCommissionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := server.ValidatorCommission(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ValidatorSlashes_0 = &utilities.DoubleArray{Encoding: map[string]int{"validator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_ValidatorSlashes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorSlashesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValidatorSlashes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ValidatorSlashes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ValidatorSlashes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorSlashesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ValidatorSlashes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ValidatorSlashes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_DelegationRewards_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegationRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := client.DelegationRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DelegationRewards_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegationRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := server.DelegationRewards(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_DelegationTotalRewards_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegationTotalRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := client.DelegationTotalRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DelegationTotalRewards_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegationTotalRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := server.DelegationTotalRewards(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_DelegatorValidators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegatorValidatorsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := client.DelegatorValidators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DelegatorValidators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegatorValidatorsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := server.DelegatorValidators(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_DelegatorWithdrawAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegatorWithdrawAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := client.DelegatorWithdrawAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DelegatorWithdrawAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegatorWithdrawAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := server.DelegatorWithdrawAddress(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CommunityPool_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCommunityPoolRequest + var metadata runtime.ServerMetadata + + msg, err := client.CommunityPool(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CommunityPool_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCommunityPoolRequest + var metadata runtime.ServerMetadata + + msg, err := server.CommunityPool(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorDistributionInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorDistributionInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorDistributionInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorOutstandingRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorOutstandingRewards_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorOutstandingRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorCommission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorCommission_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorCommission_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorSlashes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ValidatorSlashes_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorSlashes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegationRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_DelegationRewards_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegationRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegationTotalRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_DelegationTotalRewards_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegationTotalRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegatorValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_DelegatorValidators_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegatorValidators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegatorWithdrawAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_DelegatorWithdrawAddress_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegatorWithdrawAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CommunityPool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CommunityPool_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CommunityPool_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorDistributionInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorDistributionInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorDistributionInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorOutstandingRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorOutstandingRewards_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorOutstandingRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorCommission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorCommission_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorCommission_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ValidatorSlashes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ValidatorSlashes_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ValidatorSlashes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegationRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_DelegationRewards_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegationRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegationTotalRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_DelegationTotalRewards_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegationTotalRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegatorValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_DelegatorValidators_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegatorValidators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_DelegatorWithdrawAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_DelegatorWithdrawAddress_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegatorWithdrawAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CommunityPool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CommunityPool_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CommunityPool_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "distribution", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorDistributionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorOutstandingRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address", "outstanding_rewards"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorCommission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address", "commission"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ValidatorSlashes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address", "slashes"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_DelegationRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"cosmos", "distribution", "v1beta1", "delegators", "delegator_address", "rewards", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_DelegationTotalRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "delegators", "delegator_address", "rewards"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_DelegatorValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "delegators", "delegator_address", "validators"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_DelegatorWithdrawAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "delegators", "delegator_address", "withdraw_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CommunityPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "distribution", "v1beta1", "community_pool"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorDistributionInfo_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorOutstandingRewards_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorCommission_0 = runtime.ForwardResponseMessage + + forward_Query_ValidatorSlashes_0 = runtime.ForwardResponseMessage + + forward_Query_DelegationRewards_0 = runtime.ForwardResponseMessage + + forward_Query_DelegationTotalRewards_0 = runtime.ForwardResponseMessage + + forward_Query_DelegatorValidators_0 = runtime.ForwardResponseMessage + + forward_Query_DelegatorWithdrawAddress_0 = runtime.ForwardResponseMessage + + forward_Query_CommunityPool_0 = runtime.ForwardResponseMessage +) diff --git a/x/distribution/types/tx.pb.go b/x/distribution/types/tx.pb.go new file mode 100644 index 0000000..b38aa0c --- /dev/null +++ b/x/distribution/types/tx.pb.go @@ -0,0 +1,3341 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/distribution/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgSetWithdrawAddress sets the withdraw address for +// a delegator (or validator self-delegation). +type MsgSetWithdrawAddress struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (m *MsgSetWithdrawAddress) Reset() { *m = MsgSetWithdrawAddress{} } +func (m *MsgSetWithdrawAddress) String() string { return proto.CompactTextString(m) } +func (*MsgSetWithdrawAddress) ProtoMessage() {} +func (*MsgSetWithdrawAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{0} +} +func (m *MsgSetWithdrawAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetWithdrawAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetWithdrawAddress.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetWithdrawAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetWithdrawAddress.Merge(m, src) +} +func (m *MsgSetWithdrawAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgSetWithdrawAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetWithdrawAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetWithdrawAddress proto.InternalMessageInfo + +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response +// type. +type MsgSetWithdrawAddressResponse struct { +} + +func (m *MsgSetWithdrawAddressResponse) Reset() { *m = MsgSetWithdrawAddressResponse{} } +func (m *MsgSetWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetWithdrawAddressResponse) ProtoMessage() {} +func (*MsgSetWithdrawAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{1} +} +func (m *MsgSetWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetWithdrawAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetWithdrawAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetWithdrawAddressResponse.Merge(m, src) +} +func (m *MsgSetWithdrawAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetWithdrawAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetWithdrawAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetWithdrawAddressResponse proto.InternalMessageInfo + +// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +// from a single validator. +type MsgWithdrawDelegatorReward struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *MsgWithdrawDelegatorReward) Reset() { *m = MsgWithdrawDelegatorReward{} } +func (m *MsgWithdrawDelegatorReward) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawDelegatorReward) ProtoMessage() {} +func (*MsgWithdrawDelegatorReward) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{2} +} +func (m *MsgWithdrawDelegatorReward) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawDelegatorReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawDelegatorReward.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdrawDelegatorReward) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawDelegatorReward.Merge(m, src) +} +func (m *MsgWithdrawDelegatorReward) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawDelegatorReward) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawDelegatorReward.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawDelegatorReward proto.InternalMessageInfo + +// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward +// response type. +type MsgWithdrawDelegatorRewardResponse struct { + // Since: cosmos-sdk 0.46 + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgWithdrawDelegatorRewardResponse) Reset() { *m = MsgWithdrawDelegatorRewardResponse{} } +func (m *MsgWithdrawDelegatorRewardResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawDelegatorRewardResponse) ProtoMessage() {} +func (*MsgWithdrawDelegatorRewardResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{3} +} +func (m *MsgWithdrawDelegatorRewardResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawDelegatorRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawDelegatorRewardResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdrawDelegatorRewardResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawDelegatorRewardResponse.Merge(m, src) +} +func (m *MsgWithdrawDelegatorRewardResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawDelegatorRewardResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawDelegatorRewardResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawDelegatorRewardResponse proto.InternalMessageInfo + +func (m *MsgWithdrawDelegatorRewardResponse) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. +type MsgWithdrawValidatorCommission struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *MsgWithdrawValidatorCommission) Reset() { *m = MsgWithdrawValidatorCommission{} } +func (m *MsgWithdrawValidatorCommission) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawValidatorCommission) ProtoMessage() {} +func (*MsgWithdrawValidatorCommission) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{4} +} +func (m *MsgWithdrawValidatorCommission) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawValidatorCommission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawValidatorCommission.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdrawValidatorCommission) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawValidatorCommission.Merge(m, src) +} +func (m *MsgWithdrawValidatorCommission) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawValidatorCommission) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawValidatorCommission.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawValidatorCommission proto.InternalMessageInfo + +// MsgWithdrawValidatorCommissionResponse defines the +// Msg/WithdrawValidatorCommission response type. +type MsgWithdrawValidatorCommissionResponse struct { + // Since: cosmos-sdk 0.46 + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgWithdrawValidatorCommissionResponse) Reset() { + *m = MsgWithdrawValidatorCommissionResponse{} +} +func (m *MsgWithdrawValidatorCommissionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawValidatorCommissionResponse) ProtoMessage() {} +func (*MsgWithdrawValidatorCommissionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{5} +} +func (m *MsgWithdrawValidatorCommissionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawValidatorCommissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawValidatorCommissionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdrawValidatorCommissionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawValidatorCommissionResponse.Merge(m, src) +} +func (m *MsgWithdrawValidatorCommissionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawValidatorCommissionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawValidatorCommissionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawValidatorCommissionResponse proto.InternalMessageInfo + +func (m *MsgWithdrawValidatorCommissionResponse) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// MsgFundCommunityPool allows an account to directly +// fund the community pool. +type MsgFundCommunityPool struct { + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` +} + +func (m *MsgFundCommunityPool) Reset() { *m = MsgFundCommunityPool{} } +func (m *MsgFundCommunityPool) String() string { return proto.CompactTextString(m) } +func (*MsgFundCommunityPool) ProtoMessage() {} +func (*MsgFundCommunityPool) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{6} +} +func (m *MsgFundCommunityPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFundCommunityPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFundCommunityPool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgFundCommunityPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFundCommunityPool.Merge(m, src) +} +func (m *MsgFundCommunityPool) XXX_Size() int { + return m.Size() +} +func (m *MsgFundCommunityPool) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFundCommunityPool.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFundCommunityPool proto.InternalMessageInfo + +// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +type MsgFundCommunityPoolResponse struct { +} + +func (m *MsgFundCommunityPoolResponse) Reset() { *m = MsgFundCommunityPoolResponse{} } +func (m *MsgFundCommunityPoolResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFundCommunityPoolResponse) ProtoMessage() {} +func (*MsgFundCommunityPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{7} +} +func (m *MsgFundCommunityPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFundCommunityPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFundCommunityPoolResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgFundCommunityPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFundCommunityPoolResponse.Merge(m, src) +} +func (m *MsgFundCommunityPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgFundCommunityPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFundCommunityPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFundCommunityPoolResponse proto.InternalMessageInfo + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/distribution parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{8} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{9} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgCommunityPoolSpend defines a message for sending tokens from the community +// pool to another account. This message is typically executed via a governance +// proposal with the governance module being the executing authority. +// +// Since: cosmos-sdk 0.47 +type MsgCommunityPoolSpend struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgCommunityPoolSpend) Reset() { *m = MsgCommunityPoolSpend{} } +func (m *MsgCommunityPoolSpend) String() string { return proto.CompactTextString(m) } +func (*MsgCommunityPoolSpend) ProtoMessage() {} +func (*MsgCommunityPoolSpend) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{10} +} +func (m *MsgCommunityPoolSpend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCommunityPoolSpend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCommunityPoolSpend.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCommunityPoolSpend) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCommunityPoolSpend.Merge(m, src) +} +func (m *MsgCommunityPoolSpend) XXX_Size() int { + return m.Size() +} +func (m *MsgCommunityPoolSpend) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCommunityPoolSpend.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCommunityPoolSpend proto.InternalMessageInfo + +func (m *MsgCommunityPoolSpend) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgCommunityPoolSpend) GetRecipient() string { + if m != nil { + return m.Recipient + } + return "" +} + +func (m *MsgCommunityPoolSpend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// MsgCommunityPoolSpendResponse defines the response to executing a +// MsgCommunityPoolSpend message. +// +// Since: cosmos-sdk 0.47 +type MsgCommunityPoolSpendResponse struct { +} + +func (m *MsgCommunityPoolSpendResponse) Reset() { *m = MsgCommunityPoolSpendResponse{} } +func (m *MsgCommunityPoolSpendResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCommunityPoolSpendResponse) ProtoMessage() {} +func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{11} +} +func (m *MsgCommunityPoolSpendResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCommunityPoolSpendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCommunityPoolSpendResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCommunityPoolSpendResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCommunityPoolSpendResponse.Merge(m, src) +} +func (m *MsgCommunityPoolSpendResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCommunityPoolSpendResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCommunityPoolSpendResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCommunityPoolSpendResponse proto.InternalMessageInfo + +// DepositValidatorRewardsPool defines the request structure to provide +// additional rewards to delegators from a specific validator. +// +// Since: cosmos-sdk 0.50 +type MsgDepositValidatorRewardsPool struct { + Depositor string `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgDepositValidatorRewardsPool) Reset() { *m = MsgDepositValidatorRewardsPool{} } +func (m *MsgDepositValidatorRewardsPool) String() string { return proto.CompactTextString(m) } +func (*MsgDepositValidatorRewardsPool) ProtoMessage() {} +func (*MsgDepositValidatorRewardsPool) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{12} +} +func (m *MsgDepositValidatorRewardsPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositValidatorRewardsPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositValidatorRewardsPool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDepositValidatorRewardsPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositValidatorRewardsPool.Merge(m, src) +} +func (m *MsgDepositValidatorRewardsPool) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositValidatorRewardsPool) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositValidatorRewardsPool.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositValidatorRewardsPool proto.InternalMessageInfo + +// MsgDepositValidatorRewardsPoolResponse defines the response to executing a +// MsgDepositValidatorRewardsPool message. +// +// Since: cosmos-sdk 0.50 +type MsgDepositValidatorRewardsPoolResponse struct { +} + +func (m *MsgDepositValidatorRewardsPoolResponse) Reset() { + *m = MsgDepositValidatorRewardsPoolResponse{} +} +func (m *MsgDepositValidatorRewardsPoolResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositValidatorRewardsPoolResponse) ProtoMessage() {} +func (*MsgDepositValidatorRewardsPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{13} +} +func (m *MsgDepositValidatorRewardsPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositValidatorRewardsPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositValidatorRewardsPoolResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDepositValidatorRewardsPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositValidatorRewardsPoolResponse.Merge(m, src) +} +func (m *MsgDepositValidatorRewardsPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositValidatorRewardsPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositValidatorRewardsPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositValidatorRewardsPoolResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos.distribution.v1beta1.MsgSetWithdrawAddress") + proto.RegisterType((*MsgSetWithdrawAddressResponse)(nil), "cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse") + proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward") + proto.RegisterType((*MsgWithdrawDelegatorRewardResponse)(nil), "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse") + proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission") + proto.RegisterType((*MsgWithdrawValidatorCommissionResponse)(nil), "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse") + proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.distribution.v1beta1.MsgFundCommunityPool") + proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.distribution.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.distribution.v1beta1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgCommunityPoolSpend)(nil), "cosmos.distribution.v1beta1.MsgCommunityPoolSpend") + proto.RegisterType((*MsgCommunityPoolSpendResponse)(nil), "cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse") + proto.RegisterType((*MsgDepositValidatorRewardsPool)(nil), "cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool") + proto.RegisterType((*MsgDepositValidatorRewardsPoolResponse)(nil), "cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse") +} + +func init() { + proto.RegisterFile("cosmos/distribution/v1beta1/tx.proto", fileDescriptor_ed4f433d965e58ca) +} + +var fileDescriptor_ed4f433d965e58ca = []byte{ + // 925 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0xa4, 0xa2, 0x28, 0xb3, 0x2b, 0xed, 0x26, 0x2a, 0x6a, 0xeb, 0xdd, 0x75, 0x16, 0x17, + 0x4a, 0x14, 0x51, 0x5b, 0x09, 0x08, 0x54, 0x73, 0x00, 0x92, 0x12, 0x89, 0x43, 0xa0, 0x4a, 0x05, + 0x48, 0x5c, 0x2a, 0x27, 0x36, 0xee, 0x88, 0xda, 0x63, 0x79, 0x26, 0x49, 0x73, 0x03, 0x04, 0x12, + 0xe2, 0x84, 0xc4, 0x8d, 0x4b, 0x2b, 0xf5, 0x52, 0x71, 0xca, 0xa1, 0x07, 0x7e, 0x42, 0x2f, 0x48, + 0x55, 0x4f, 0x9c, 0x00, 0xa5, 0x42, 0x41, 0x82, 0xdf, 0x80, 0x90, 0xed, 0x89, 0x63, 0xc7, 0x8e, + 0xdd, 0x96, 0x8a, 0x72, 0x69, 0xab, 0x99, 0xf7, 0xbe, 0xf9, 0xde, 0x37, 0xdf, 0xbc, 0xe7, 0xc2, + 0x17, 0x3a, 0x98, 0x18, 0x98, 0x48, 0x2a, 0x22, 0xd4, 0x46, 0xed, 0x2e, 0x45, 0xd8, 0x94, 0x7a, + 0x95, 0xb6, 0x46, 0x95, 0x8a, 0x44, 0x0f, 0x44, 0xcb, 0xc6, 0x14, 0x17, 0x1e, 0x79, 0x51, 0x62, + 0x30, 0x4a, 0x64, 0x51, 0xdc, 0x92, 0x8e, 0x75, 0xec, 0xc6, 0x49, 0xce, 0x5f, 0x5e, 0x0a, 0xc7, + 0x33, 0xe0, 0xb6, 0x42, 0x34, 0x1f, 0xb0, 0x83, 0x91, 0xc9, 0xf6, 0x57, 0xbd, 0xfd, 0x5d, 0x2f, + 0x91, 0xe1, 0x7b, 0x5b, 0xcb, 0x2c, 0xd5, 0x20, 0xba, 0xd4, 0xab, 0x38, 0xbf, 0xd8, 0x46, 0x5e, + 0x31, 0x90, 0x89, 0x25, 0xf7, 0x27, 0x5b, 0x12, 0x93, 0xf8, 0x87, 0xe8, 0xba, 0xf1, 0xc2, 0x9f, + 0x00, 0x3e, 0xd7, 0x24, 0xfa, 0x8e, 0x46, 0x3f, 0x42, 0x74, 0x4f, 0xb5, 0x95, 0xfe, 0xdb, 0xaa, + 0x6a, 0x6b, 0x84, 0x14, 0xde, 0x81, 0x79, 0x55, 0xdb, 0xd7, 0x74, 0x85, 0x62, 0x7b, 0x57, 0xf1, + 0x16, 0x57, 0xc0, 0x53, 0x50, 0xca, 0xd5, 0x56, 0x2e, 0x4e, 0x37, 0x96, 0x18, 0x45, 0x16, 0xbe, + 0x43, 0x6d, 0x64, 0xea, 0xad, 0x87, 0x7e, 0xca, 0x04, 0xa6, 0x0e, 0x1f, 0xf6, 0x19, 0xb2, 0x8f, + 0x92, 0x4d, 0x41, 0x79, 0xd0, 0x0f, 0x73, 0x91, 0x1b, 0x5f, 0x1f, 0x15, 0x33, 0x7f, 0x1c, 0x15, + 0x33, 0x5f, 0x8c, 0x87, 0xe5, 0x28, 0xad, 0x6f, 0xc6, 0xc3, 0xf2, 0x9a, 0x87, 0xb4, 0x41, 0xd4, + 0x4f, 0xa5, 0x26, 0xd1, 0x9b, 0x58, 0x45, 0x9f, 0x0c, 0x66, 0x6a, 0x12, 0x8a, 0xf0, 0x49, 0x6c, + 0xb1, 0x2d, 0x8d, 0x58, 0xd8, 0x24, 0x9a, 0xf0, 0x37, 0x80, 0x5c, 0x93, 0xe8, 0x93, 0xed, 0xad, + 0xc9, 0x49, 0x2d, 0xad, 0xaf, 0xd8, 0xea, 0x6d, 0x69, 0xf2, 0x1e, 0xcc, 0xf7, 0x94, 0x7d, 0xa4, + 0x86, 0x60, 0x3c, 0x51, 0x9e, 0xbf, 0x38, 0xdd, 0x78, 0xc2, 0x60, 0x3e, 0x9c, 0xc4, 0xcc, 0xe0, + 0xf5, 0x66, 0xd6, 0xe5, 0x77, 0xd3, 0xe5, 0x59, 0x0f, 0xcb, 0x33, 0x53, 0x20, 0xc2, 0xa6, 0x57, + 0xa1, 0x70, 0x08, 0xa0, 0x30, 0x5f, 0x80, 0x89, 0x4e, 0x85, 0x01, 0x5c, 0x54, 0x0c, 0xdc, 0x35, + 0xe9, 0x0a, 0x78, 0xba, 0x50, 0xba, 0x57, 0x5d, 0x65, 0xbe, 0x13, 0x1d, 0x7b, 0x4f, 0x5e, 0x82, + 0x58, 0xc7, 0xc8, 0xac, 0x35, 0xce, 0x7e, 0x29, 0x66, 0x7e, 0xf8, 0xb5, 0x58, 0xd2, 0x11, 0xdd, + 0xeb, 0xb6, 0xc5, 0x0e, 0x36, 0x98, 0xbd, 0xa5, 0x00, 0x27, 0x3a, 0xb0, 0x34, 0xe2, 0x26, 0x90, + 0xef, 0xc7, 0xc3, 0xf2, 0x7d, 0xe7, 0xd8, 0xce, 0x60, 0xd7, 0x79, 0x20, 0xe4, 0x64, 0x3c, 0x2c, + 0x83, 0x16, 0x3b, 0x50, 0xf8, 0x11, 0x40, 0x3e, 0xc0, 0xd0, 0x17, 0xa9, 0x8e, 0x0d, 0x03, 0x11, + 0x82, 0xb0, 0x19, 0xaf, 0x2f, 0xb8, 0xb9, 0xbe, 0x61, 0xfb, 0x45, 0xa0, 0x63, 0xec, 0x17, 0x60, + 0x37, 0xe5, 0x25, 0x1c, 0x03, 0xb8, 0x9e, 0x4c, 0xfd, 0xff, 0x20, 0xf0, 0x57, 0x59, 0xb8, 0xd4, + 0x24, 0x7a, 0xa3, 0x6b, 0xaa, 0x0e, 0xb1, 0xae, 0x89, 0xe8, 0x60, 0x1b, 0xe3, 0xfd, 0x3b, 0xe4, + 0x54, 0x78, 0x0d, 0xe6, 0x54, 0xcd, 0xc2, 0x04, 0x51, 0x6c, 0xa7, 0xb6, 0x8f, 0x69, 0xa8, 0x2c, + 0x07, 0x6f, 0x6e, 0xba, 0xee, 0xdc, 0x58, 0x31, 0x7c, 0x63, 0x91, 0x72, 0x05, 0x1e, 0x3e, 0x8e, + 0x5b, 0xf7, 0x7b, 0xc5, 0x4f, 0x00, 0x3e, 0x68, 0x12, 0xfd, 0x03, 0x4b, 0x55, 0xa8, 0xb6, 0xad, + 0xd8, 0x8a, 0x41, 0x1c, 0x9e, 0x4a, 0x97, 0xee, 0x61, 0x1b, 0xd1, 0x41, 0x6a, 0x63, 0x98, 0x86, + 0x16, 0x1a, 0x70, 0xd1, 0x72, 0x11, 0xdc, 0xe2, 0xee, 0x55, 0xd7, 0xc4, 0x84, 0x09, 0x23, 0x7a, + 0x87, 0xd5, 0x72, 0x8e, 0xc8, 0x4c, 0x27, 0x2f, 0x5b, 0x96, 0xdd, 0x3a, 0x7d, 0x5c, 0xa7, 0xce, + 0x97, 0x02, 0x75, 0x86, 0xa6, 0xc2, 0x0c, 0x77, 0x61, 0x15, 0x2e, 0xcf, 0x2c, 0xf9, 0xa5, 0x1e, + 0x67, 0xdd, 0x29, 0x11, 0xd2, 0x61, 0xc7, 0xd2, 0x4c, 0xf5, 0xc6, 0x05, 0x3f, 0x86, 0x39, 0x5b, + 0xeb, 0x20, 0x0b, 0x69, 0x26, 0xf5, 0x2e, 0xb4, 0x35, 0x5d, 0x08, 0x38, 0x6d, 0xe1, 0x3f, 0x76, + 0x9a, 0xbc, 0x19, 0x55, 0x70, 0x7d, 0x56, 0x41, 0x29, 0x56, 0x0b, 0x36, 0x5d, 0xa2, 0x1b, 0xbe, + 0x8c, 0xbf, 0x67, 0xdd, 0xd6, 0xb5, 0xe5, 0xd9, 0xd0, 0x7f, 0xfe, 0x5e, 0x6f, 0x25, 0xee, 0x1b, + 0x0b, 0x19, 0x1d, 0x5c, 0xd9, 0xe8, 0xb7, 0x3d, 0x52, 0xee, 0xf2, 0x06, 0xde, 0x9a, 0xff, 0x66, + 0x5f, 0x8c, 0xbb, 0x89, 0xa9, 0x9c, 0x4c, 0x48, 0xa1, 0xe4, 0xb6, 0xd9, 0x04, 0x99, 0x27, 0x37, + 0x52, 0xfd, 0xeb, 0x59, 0xb8, 0xd0, 0x24, 0x7a, 0xe1, 0x4b, 0x00, 0x0b, 0x31, 0xdf, 0x40, 0xd5, + 0xc4, 0x67, 0x18, 0xfb, 0x29, 0xc1, 0xc9, 0xd7, 0xcf, 0xf1, 0xbb, 0xfe, 0x77, 0x00, 0x2e, 0xcf, + 0xfb, 0xf6, 0x78, 0x3d, 0x0d, 0x77, 0x4e, 0x22, 0xf7, 0xe6, 0x0d, 0x13, 0x7d, 0x56, 0x87, 0x00, + 0x3e, 0x4a, 0x1a, 0xb7, 0x6f, 0x5c, 0xf5, 0x80, 0x98, 0x64, 0xae, 0xfe, 0x2f, 0x92, 0x7d, 0x86, + 0x9f, 0x03, 0x98, 0x8f, 0xce, 0xab, 0x4a, 0x1a, 0x74, 0x24, 0x85, 0xdb, 0xbc, 0x76, 0x8a, 0xcf, + 0xc1, 0x86, 0xf7, 0x43, 0xa3, 0xe0, 0xe5, 0x34, 0xa8, 0x60, 0x34, 0xf7, 0xea, 0x75, 0xa2, 0xfd, + 0x33, 0x1d, 0xdb, 0xc6, 0x34, 0xe5, 0x54, 0xdb, 0x46, 0x73, 0xd2, 0x6d, 0x3b, 0xbf, 0xaf, 0xb9, + 0x06, 0x49, 0x6a, 0x6a, 0xa9, 0x06, 0x49, 0x48, 0x4e, 0x37, 0xc8, 0x15, 0xde, 0x39, 0xf7, 0xcc, + 0x67, 0x4e, 0x8b, 0xa9, 0xbd, 0x7f, 0x32, 0xe2, 0xc1, 0xd9, 0x88, 0x07, 0xe7, 0x23, 0x1e, 0xfc, + 0x36, 0xe2, 0xc1, 0xb7, 0x97, 0x7c, 0xe6, 0xfc, 0x92, 0xcf, 0xfc, 0x7c, 0xc9, 0x67, 0x3e, 0xae, + 0x24, 0x36, 0xb0, 0x83, 0xf0, 0xf4, 0x74, 0xfb, 0x59, 0x7b, 0xd1, 0xfd, 0x2f, 0xea, 0x95, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x97, 0xa4, 0x34, 0x89, 0x37, 0x0e, 0x00, 0x00, +} + +func (this *MsgSetWithdrawAddressResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgSetWithdrawAddressResponse) + if !ok { + that2, ok := that.(MsgSetWithdrawAddressResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *MsgWithdrawDelegatorRewardResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgWithdrawDelegatorRewardResponse) + if !ok { + that2, ok := that.(MsgWithdrawDelegatorRewardResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Amount) != len(that1.Amount) { + return false + } + for i := range this.Amount { + if !this.Amount[i].Equal(&that1.Amount[i]) { + return false + } + } + return true +} +func (this *MsgWithdrawValidatorCommissionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgWithdrawValidatorCommissionResponse) + if !ok { + that2, ok := that.(MsgWithdrawValidatorCommissionResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Amount) != len(that1.Amount) { + return false + } + for i := range this.Amount { + if !this.Amount[i].Equal(&that1.Amount[i]) { + return false + } + } + return true +} +func (this *MsgFundCommunityPoolResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgFundCommunityPoolResponse) + if !ok { + that2, ok := that.(MsgFundCommunityPoolResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *MsgUpdateParams) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgUpdateParams) + if !ok { + that2, ok := that.(MsgUpdateParams) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if !this.Params.Equal(&that1.Params) { + return false + } + return true +} +func (this *MsgUpdateParamsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgUpdateParamsResponse) + if !ok { + that2, ok := that.(MsgUpdateParamsResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *MsgCommunityPoolSpend) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgCommunityPoolSpend) + if !ok { + that2, ok := that.(MsgCommunityPoolSpend) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Recipient != that1.Recipient { + return false + } + if len(this.Amount) != len(that1.Amount) { + return false + } + for i := range this.Amount { + if !this.Amount[i].Equal(&that1.Amount[i]) { + return false + } + } + return true +} +func (this *MsgCommunityPoolSpendResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgCommunityPoolSpendResponse) + if !ok { + that2, ok := that.(MsgCommunityPoolSpendResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *MsgDepositValidatorRewardsPoolResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgDepositValidatorRewardsPoolResponse) + if !ok { + that2, ok := that.(MsgDepositValidatorRewardsPoolResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) + // UpdateParams defines a governance operation for updating the x/distribution + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/distribution module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + // + // Since: cosmos-sdk 0.47 + CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) + // DepositValidatorRewardsPool defines a method to provide additional rewards + // to delegators to a specific validator. + // + // Since: cosmos-sdk 0.50 + DepositValidatorRewardsPool(ctx context.Context, in *MsgDepositValidatorRewardsPool, opts ...grpc.CallOption) (*MsgDepositValidatorRewardsPoolResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) { + out := new(MsgSetWithdrawAddressResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) { + out := new(MsgWithdrawDelegatorRewardResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) { + out := new(MsgWithdrawValidatorCommissionResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) { + out := new(MsgFundCommunityPoolResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) { + out := new(MsgCommunityPoolSpendResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositValidatorRewardsPool(ctx context.Context, in *MsgDepositValidatorRewardsPool, opts ...grpc.CallOption) (*MsgDepositValidatorRewardsPoolResponse, error) { + out := new(MsgDepositValidatorRewardsPoolResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + SetWithdrawAddress(context.Context, *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error) + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + WithdrawDelegatorReward(context.Context, *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error) + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + WithdrawValidatorCommission(context.Context, *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) + // UpdateParams defines a governance operation for updating the x/distribution + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/distribution module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + // + // Since: cosmos-sdk 0.47 + CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) + // DepositValidatorRewardsPool defines a method to provide additional rewards + // to delegators to a specific validator. + // + // Since: cosmos-sdk 0.50 + DepositValidatorRewardsPool(context.Context, *MsgDepositValidatorRewardsPool) (*MsgDepositValidatorRewardsPoolResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) SetWithdrawAddress(ctx context.Context, req *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetWithdrawAddress not implemented") +} +func (*UnimplementedMsgServer) WithdrawDelegatorReward(ctx context.Context, req *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawDelegatorReward not implemented") +} +func (*UnimplementedMsgServer) WithdrawValidatorCommission(ctx context.Context, req *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawValidatorCommission not implemented") +} +func (*UnimplementedMsgServer) FundCommunityPool(ctx context.Context, req *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FundCommunityPool not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) CommunityPoolSpend(ctx context.Context, req *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") +} +func (*UnimplementedMsgServer) DepositValidatorRewardsPool(ctx context.Context, req *MsgDepositValidatorRewardsPool) (*MsgDepositValidatorRewardsPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositValidatorRewardsPool not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_SetWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetWithdrawAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetWithdrawAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetWithdrawAddress(ctx, req.(*MsgSetWithdrawAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawDelegatorReward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawDelegatorReward) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawDelegatorReward(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawDelegatorReward(ctx, req.(*MsgWithdrawDelegatorReward)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawValidatorCommission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawValidatorCommission) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawValidatorCommission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawValidatorCommission(ctx, req.(*MsgWithdrawValidatorCommission)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_FundCommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFundCommunityPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FundCommunityPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FundCommunityPool(ctx, req.(*MsgFundCommunityPool)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCommunityPoolSpend) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CommunityPoolSpend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CommunityPoolSpend(ctx, req.(*MsgCommunityPoolSpend)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositValidatorRewardsPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositValidatorRewardsPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositValidatorRewardsPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositValidatorRewardsPool(ctx, req.(*MsgDepositValidatorRewardsPool)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.distribution.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetWithdrawAddress", + Handler: _Msg_SetWithdrawAddress_Handler, + }, + { + MethodName: "WithdrawDelegatorReward", + Handler: _Msg_WithdrawDelegatorReward_Handler, + }, + { + MethodName: "WithdrawValidatorCommission", + Handler: _Msg_WithdrawValidatorCommission_Handler, + }, + { + MethodName: "FundCommunityPool", + Handler: _Msg_FundCommunityPool_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "CommunityPoolSpend", + Handler: _Msg_CommunityPoolSpend_Handler, + }, + { + MethodName: "DepositValidatorRewardsPool", + Handler: _Msg_DepositValidatorRewardsPool_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/distribution/v1beta1/tx.proto", +} + +func (m *MsgSetWithdrawAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetWithdrawAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetWithdrawAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WithdrawAddress) > 0 { + i -= len(m.WithdrawAddress) + copy(dAtA[i:], m.WithdrawAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.WithdrawAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetWithdrawAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawDelegatorReward) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdrawDelegatorReward) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawDelegatorReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawDelegatorRewardResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdrawDelegatorRewardResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawDelegatorRewardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawValidatorCommission) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdrawValidatorCommission) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawValidatorCommission) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawValidatorCommissionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdrawValidatorCommissionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawValidatorCommissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgFundCommunityPool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgFundCommunityPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFundCommunityPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgFundCommunityPoolResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgFundCommunityPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFundCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCommunityPoolSpend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCommunityPoolSpend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCommunityPoolSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCommunityPoolSpendResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCommunityPoolSpendResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCommunityPoolSpendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDepositValidatorRewardsPool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDepositValidatorRewardsPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositValidatorRewardsPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDepositValidatorRewardsPoolResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDepositValidatorRewardsPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositValidatorRewardsPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgSetWithdrawAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.WithdrawAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSetWithdrawAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawDelegatorReward) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgWithdrawDelegatorRewardResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgWithdrawValidatorCommission) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgWithdrawValidatorCommissionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgFundCommunityPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgFundCommunityPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCommunityPoolSpend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Recipient) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgCommunityPoolSpendResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDepositValidatorRewardsPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgDepositValidatorRewardsPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSetWithdrawAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetWithdrawAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetWithdrawAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WithdrawAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetWithdrawAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetWithdrawAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawDelegatorReward) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdrawDelegatorReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawDelegatorReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawDelegatorRewardResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdrawDelegatorRewardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawDelegatorRewardResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawValidatorCommission) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdrawValidatorCommission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawValidatorCommission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawValidatorCommissionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdrawValidatorCommissionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawValidatorCommissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgFundCommunityPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgFundCommunityPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFundCommunityPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgFundCommunityPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgFundCommunityPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFundCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCommunityPoolSpend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCommunityPoolSpend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCommunityPoolSpend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCommunityPoolSpendResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCommunityPoolSpendResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCommunityPoolSpendResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositValidatorRewardsPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDepositValidatorRewardsPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositValidatorRewardsPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositValidatorRewardsPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDepositValidatorRewardsPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositValidatorRewardsPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/distribution/types/validator.go b/x/distribution/types/validator.go new file mode 100644 index 0000000..3910387 --- /dev/null +++ b/x/distribution/types/validator.go @@ -0,0 +1,36 @@ +package types + +import ( + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// create a new ValidatorHistoricalRewards +func NewValidatorHistoricalRewards(cumulativeRewardRatio sdk.DecCoins, referenceCount uint32) ValidatorHistoricalRewards { + return ValidatorHistoricalRewards{ + CumulativeRewardRatio: cumulativeRewardRatio, + ReferenceCount: referenceCount, + } +} + +// create a new ValidatorCurrentRewards +func NewValidatorCurrentRewards(rewards sdk.DecCoins, period uint64) ValidatorCurrentRewards { + return ValidatorCurrentRewards{ + Rewards: rewards, + Period: period, + } +} + +// return the initial accumulated commission (zero) +func InitialValidatorAccumulatedCommission() ValidatorAccumulatedCommission { + return ValidatorAccumulatedCommission{} +} + +// create a new ValidatorSlashEvent +func NewValidatorSlashEvent(validatorPeriod uint64, fraction sdkmath.LegacyDec) ValidatorSlashEvent { + return ValidatorSlashEvent{ + ValidatorPeriod: validatorPeriod, + Fraction: fraction, + } +} From 26adbc020adb5a269db2e543321e55dc1d9b1d94 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 21 Feb 2024 17:30:49 -0600 Subject: [PATCH 2/5] move namespace --- app/apptesting/test_suite.go | 2 +- app/test_helpers.go | 2 +- x/distribution/abci.go | 4 ++-- x/distribution/client/cli/tx.go | 2 +- x/distribution/client/cli/tx_test.go | 4 ++-- x/distribution/client/common/common.go | 2 +- x/distribution/keeper/alias_functions.go | 2 +- x/distribution/keeper/allocation.go | 2 +- x/distribution/keeper/allocation_test.go | 8 ++++---- x/distribution/keeper/common_test.go | 2 +- x/distribution/keeper/delegation.go | 2 +- x/distribution/keeper/delegation_test.go | 8 ++++---- x/distribution/keeper/fee_pool.go | 2 +- x/distribution/keeper/genesis.go | 2 +- x/distribution/keeper/grpc_query.go | 2 +- x/distribution/keeper/hooks.go | 2 +- x/distribution/keeper/invariants.go | 2 +- x/distribution/keeper/keeper.go | 2 +- x/distribution/keeper/keeper_test.go | 8 ++++---- x/distribution/keeper/migrations.go | 6 +++--- x/distribution/keeper/msg_server.go | 2 +- x/distribution/keeper/store.go | 2 +- x/distribution/keeper/validator.go | 2 +- x/distribution/migrations/v2/store.go | 2 +- x/distribution/migrations/v2/store_test.go | 6 +++--- x/distribution/migrations/v3/json.go | 2 +- x/distribution/migrations/v3/json_test.go | 6 +++--- x/distribution/migrations/v3/migrate.go | 4 ++-- x/distribution/migrations/v3/migrate_test.go | 8 ++++---- x/distribution/module.go | 10 +++++----- x/distribution/simulation/decoder.go | 2 +- x/distribution/simulation/decoder_test.go | 6 +++--- x/distribution/simulation/genesis.go | 2 +- x/distribution/simulation/genesis_test.go | 4 ++-- x/distribution/simulation/operations.go | 4 ++-- x/distribution/simulation/operations_test.go | 8 ++++---- x/distribution/simulation/proposals.go | 2 +- x/distribution/simulation/proposals_test.go | 4 ++-- x/distribution/testutil/app_config.go | 18 +++++++++--------- x/distribution/testutil/staking_helper.go | 2 +- x/distribution/types/fee_pool_test.go | 2 +- x/distribution/types/params_test.go | 2 +- 42 files changed, 83 insertions(+), 83 deletions(-) diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index 75f2ab3..c740e55 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -27,11 +27,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakinghelper "github.com/cosmos/cosmos-sdk/x/staking/testutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" ) type KeeperTestHelper struct { diff --git a/app/test_helpers.go b/app/test_helpers.go index 6540434..6e3f587 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -44,10 +44,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // SimAppChainID hardcoded chainID for simulation diff --git a/x/distribution/abci.go b/x/distribution/abci.go index 2751cfa..4577b55 100644 --- a/x/distribution/abci.go +++ b/x/distribution/abci.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // BeginBlocker sets the proposer for determining distribution during endblock diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 5773890..278729b 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // Transaction flags for the x/distribution module diff --git a/x/distribution/client/cli/tx_test.go b/x/distribution/client/cli/tx_test.go index 94e9d8a..fb5c646 100644 --- a/x/distribution/client/cli/tx_test.go +++ b/x/distribution/client/cli/tx_test.go @@ -24,10 +24,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/bank" - "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" - distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" "github.com/cosmos/cosmos-sdk/x/gov" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/liftedinit/manifest-ledger/x/distribution/client/cli" + distrtestutil "github.com/liftedinit/manifest-ledger/x/distribution/testutil" ) type CLITestSuite struct { diff --git a/x/distribution/client/common/common.go b/x/distribution/client/common/common.go index b8b363a..3ec8a1a 100644 --- a/x/distribution/client/common/common.go +++ b/x/distribution/client/common/common.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // QueryDelegationRewards queries a delegation rewards between a delegator and a diff --git a/x/distribution/keeper/alias_functions.go b/x/distribution/keeper/alias_functions.go index 28ea51c..1c83c3d 100644 --- a/x/distribution/keeper/alias_functions.go +++ b/x/distribution/keeper/alias_functions.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // get outstanding rewards diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go index 83db0ae..b88b868 100644 --- a/x/distribution/keeper/allocation.go +++ b/x/distribution/keeper/allocation.go @@ -8,8 +8,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // AllocateTokens performs reward and fee distribution to all validators based diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index 6ed8d07..0b4c2e2 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -18,11 +18,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" - disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + distrtestutil "github.com/liftedinit/manifest-ledger/x/distribution/testutil" + disttypes "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestAllocateTokensToValidatorWithCommission(t *testing.T) { diff --git a/x/distribution/keeper/common_test.go b/x/distribution/keeper/common_test.go index 642cbe4..c6368e2 100644 --- a/x/distribution/keeper/common_test.go +++ b/x/distribution/keeper/common_test.go @@ -4,7 +4,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) var ( diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go index 2b0e99d..8b8aca0 100644 --- a/x/distribution/keeper/delegation.go +++ b/x/distribution/keeper/delegation.go @@ -7,8 +7,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // initialize starting info for a new delegation diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index 4678d53..e734c91 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -16,11 +16,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" - disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + distrtestutil "github.com/liftedinit/manifest-ledger/x/distribution/testutil" + disttypes "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestCalculateRewardsBasic(t *testing.T) { diff --git a/x/distribution/keeper/fee_pool.go b/x/distribution/keeper/fee_pool.go index 63c6678..525659a 100644 --- a/x/distribution/keeper/fee_pool.go +++ b/x/distribution/keeper/fee_pool.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // DistributeFromFeePool distributes funds from the distribution module account to diff --git a/x/distribution/keeper/genesis.go b/x/distribution/keeper/genesis.go index 7d8fa26..6990bd7 100644 --- a/x/distribution/keeper/genesis.go +++ b/x/distribution/keeper/genesis.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // InitGenesis sets distribution information for genesis diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index b80ca32..93b8d8b 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) var _ types.QueryServer = Querier{} diff --git a/x/distribution/keeper/hooks.go b/x/distribution/keeper/hooks.go index 006f35e..19e2a61 100644 --- a/x/distribution/keeper/hooks.go +++ b/x/distribution/keeper/hooks.go @@ -6,8 +6,8 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // Wrapper struct diff --git a/x/distribution/keeper/invariants.go b/x/distribution/keeper/invariants.go index 060dfd5..acef997 100644 --- a/x/distribution/keeper/invariants.go +++ b/x/distribution/keeper/invariants.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // register all distribution invariants diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 7bea201..7a03426 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // Keeper of the distribution store diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index f438969..643054f 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -17,10 +17,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + distrtestutil "github.com/liftedinit/manifest-ledger/x/distribution/testutil" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestSetWithdrawAddr(t *testing.T) { diff --git a/x/distribution/keeper/migrations.go b/x/distribution/keeper/migrations.go index bfcf880..3045238 100644 --- a/x/distribution/keeper/migrations.go +++ b/x/distribution/keeper/migrations.go @@ -2,9 +2,9 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/exported" - v2 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v2" - v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" + "github.com/liftedinit/manifest-ledger/x/distribution/exported" + v2 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v2" + v3 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v3" ) // Migrator is a struct for handling in-place store migrations. diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index 1f4c64e..7b84245 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -10,8 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) type msgServer struct { diff --git a/x/distribution/keeper/store.go b/x/distribution/keeper/store.go index 6ba1279..dc5c486 100644 --- a/x/distribution/keeper/store.go +++ b/x/distribution/keeper/store.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // get the delegator withdraw address, defaulting to the delegator address diff --git a/x/distribution/keeper/validator.go b/x/distribution/keeper/validator.go index 9b830e5..6278199 100644 --- a/x/distribution/keeper/validator.go +++ b/x/distribution/keeper/validator.go @@ -7,8 +7,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // initialize rewards for a new validator diff --git a/x/distribution/migrations/v2/store.go b/x/distribution/migrations/v2/store.go index fe6aea2..a3c1858 100644 --- a/x/distribution/migrations/v2/store.go +++ b/x/distribution/migrations/v2/store.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" - v1 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v1" + v1 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v1" ) // MigrateStore performs in-place store migrations from v0.40 to v0.43. The diff --git a/x/distribution/migrations/v2/store_test.go b/x/distribution/migrations/v2/store_test.go index ed49612..6888eee 100644 --- a/x/distribution/migrations/v2/store_test.go +++ b/x/distribution/migrations/v2/store_test.go @@ -12,9 +12,9 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v1 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v1" - v2 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v2" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + v1 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v1" + v2 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v2" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestStoreMigration(t *testing.T) { diff --git a/x/distribution/migrations/v3/json.go b/x/distribution/migrations/v3/json.go index e384b48..4bacab9 100644 --- a/x/distribution/migrations/v3/json.go +++ b/x/distribution/migrations/v3/json.go @@ -3,7 +3,7 @@ package v3 import ( sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // MigrateJSON accepts exported v2 (v0.46) x/distribution genesis state and migrates it to diff --git a/x/distribution/migrations/v3/json_test.go b/x/distribution/migrations/v3/json_test.go index 8fba6cf..b207d1b 100644 --- a/x/distribution/migrations/v3/json_test.go +++ b/x/distribution/migrations/v3/json_test.go @@ -10,9 +10,9 @@ import ( "github.com/cosmos/cosmos-sdk/client" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/distribution" - v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution" + v3 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v3" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestMigrateJSON(t *testing.T) { diff --git a/x/distribution/migrations/v3/migrate.go b/x/distribution/migrations/v3/migrate.go index 5f59b59..8dcd342 100644 --- a/x/distribution/migrations/v3/migrate.go +++ b/x/distribution/migrations/v3/migrate.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/exported" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/exported" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) const ( diff --git a/x/distribution/migrations/v3/migrate_test.go b/x/distribution/migrations/v3/migrate_test.go index 495f692..bfa6601 100644 --- a/x/distribution/migrations/v3/migrate_test.go +++ b/x/distribution/migrations/v3/migrate_test.go @@ -11,10 +11,10 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/cosmos/cosmos-sdk/x/distribution/exported" - v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution" + "github.com/liftedinit/manifest-ledger/x/distribution/exported" + v3 "github.com/liftedinit/manifest-ledger/x/distribution/migrations/v3" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) type mockSubspace struct { diff --git a/x/distribution/module.go b/x/distribution/module.go index 5e00310..af28132 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -21,13 +21,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" - "github.com/cosmos/cosmos-sdk/x/distribution/exported" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/distribution/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/client/cli" + "github.com/liftedinit/manifest-ledger/x/distribution/exported" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + "github.com/liftedinit/manifest-ledger/x/distribution/simulation" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // ConsensusVersion defines the current x/distribution module consensus version. diff --git a/x/distribution/simulation/decoder.go b/x/distribution/simulation/decoder.go index a1d64d2..0c47870 100644 --- a/x/distribution/simulation/decoder.go +++ b/x/distribution/simulation/decoder.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/x/distribution/simulation/decoder_test.go b/x/distribution/simulation/decoder_test.go index 7732081..43176c4 100644 --- a/x/distribution/simulation/decoder_test.go +++ b/x/distribution/simulation/decoder_test.go @@ -12,9 +12,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/cosmos/cosmos-sdk/x/distribution/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution" + "github.com/liftedinit/manifest-ledger/x/distribution/simulation" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) var ( diff --git a/x/distribution/simulation/genesis.go b/x/distribution/simulation/genesis.go index 1a50925..5089a4b 100644 --- a/x/distribution/simulation/genesis.go +++ b/x/distribution/simulation/genesis.go @@ -8,7 +8,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // Simulation parameter constants diff --git a/x/distribution/simulation/genesis_test.go b/x/distribution/simulation/genesis_test.go index 62e26f4..1a13cfb 100644 --- a/x/distribution/simulation/genesis_test.go +++ b/x/distribution/simulation/genesis_test.go @@ -13,8 +13,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/simulation" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go index 4fff814..9dc3479 100644 --- a/x/distribution/simulation/operations.go +++ b/x/distribution/simulation/operations.go @@ -13,9 +13,9 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/simulation" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // Simulation operation weights constants diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 69c5726..0e54e46 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -22,12 +22,12 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - "github.com/cosmos/cosmos-sdk/x/distribution/simulation" - distrtestutil "github.com/cosmos/cosmos-sdk/x/distribution/testutil" - "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + "github.com/liftedinit/manifest-ledger/x/distribution/simulation" + distrtestutil "github.com/liftedinit/manifest-ledger/x/distribution/testutil" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // TestWeightedOperations tests the weights of the operations. diff --git a/x/distribution/simulation/proposals.go b/x/distribution/simulation/proposals.go index bb5488a..365a1bd 100644 --- a/x/distribution/simulation/proposals.go +++ b/x/distribution/simulation/proposals.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/simulation" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // Simulation operation weights constants diff --git a/x/distribution/simulation/proposals_test.go b/x/distribution/simulation/proposals_test.go index 99d0b91..ae261a9 100644 --- a/x/distribution/simulation/proposals_test.go +++ b/x/distribution/simulation/proposals_test.go @@ -12,8 +12,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/simulation" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/simulation" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestProposalMsgs(t *testing.T) { diff --git a/x/distribution/testutil/app_config.go b/x/distribution/testutil/app_config.go index c824f4d..e2f5d8d 100644 --- a/x/distribution/testutil/app_config.go +++ b/x/distribution/testutil/app_config.go @@ -2,15 +2,15 @@ package testutil import ( "github.com/cosmos/cosmos-sdk/testutil/configurator" - _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/distribution" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/mint" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/params" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/staking" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/mint" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/params" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/staking" // import as blank for app wiring + _ "github.com/liftedinit/manifest-ledger/x/distribution" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/x/distribution/testutil/staking_helper.go b/x/distribution/testutil/staking_helper.go index a031774..5054071 100644 --- a/x/distribution/testutil/staking_helper.go +++ b/x/distribution/testutil/staking_helper.go @@ -7,8 +7,8 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/liftedinit/manifest-ledger/x/distribution/keeper" ) func CreateValidator(pk cryptotypes.PubKey, stake math.Int) (stakingtypes.Validator, error) { diff --git a/x/distribution/types/fee_pool_test.go b/x/distribution/types/fee_pool_test.go index 8d922e6..4a331a7 100644 --- a/x/distribution/types/fee_pool_test.go +++ b/x/distribution/types/fee_pool_test.go @@ -8,7 +8,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestValidateGenesis(t *testing.T) { diff --git a/x/distribution/types/params_test.go b/x/distribution/types/params_test.go index dfd68a3..45fe019 100644 --- a/x/distribution/types/params_test.go +++ b/x/distribution/types/params_test.go @@ -7,7 +7,7 @@ import ( sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/distribution/types" ) func TestParams_ValidateBasic(t *testing.T) { From b91bf19ac0eedb2d6cb255c535c573a43b9019e4 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 21 Feb 2024 17:54:22 -0600 Subject: [PATCH 3/5] make proto happy --- api/distribution/module/v1/module.pulsar.go | 660 + .../v1beta1/distribution.pulsar.go | 7607 +++++++++++ api/distribution/v1beta1/genesis.pulsar.go | 6198 +++++++++ api/distribution/v1beta1/query.pulsar.go | 10963 ++++++++++++++++ api/distribution/v1beta1/query_grpc.pb.go | 464 + api/distribution/v1beta1/tx.pulsar.go | 7546 +++++++++++ api/distribution/v1beta1/tx_grpc.pb.go | 375 + api/manifest/module/v1/module.pulsar.go | 141 +- api/manifest/v1/genesis.pulsar.go | 295 +- api/manifest/v1/query.pulsar.go | 213 +- api/manifest/v1/query_grpc.pb.go | 8 +- api/manifest/v1/tx.pulsar.go | 412 +- api/manifest/v1/tx_grpc.pb.go | 10 +- app/app.go | 6 +- .../distribution/module/v1/module.proto | 17 + .../distribution/v1beta1/distribution.proto | 194 + .../distribution/v1beta1/genesis.proto | 155 + .../manifest/distribution/v1beta1/query.proto | 255 + proto/manifest/distribution/v1beta1/tx.proto | 215 + .../{ => manifest}/module/v1/module.proto | 4 +- .../manifest/{ => manifest}/v1/genesis.proto | 2 +- proto/manifest/{ => manifest}/v1/query.proto | 4 +- proto/manifest/{ => manifest}/v1/tx.proto | 4 +- scripts/protocgen.sh | 2 +- x/distribution/keeper/delegation.go | 3 +- x/distribution/keeper/fee_pool.go | 3 +- x/distribution/keeper/grpc_query.go | 13 +- x/distribution/keeper/keeper.go | 9 +- x/distribution/keeper/msg_server.go | 3 +- x/distribution/types/codec.go | 16 +- x/distribution/types/distribution.pb.go | 189 +- x/distribution/types/errors.go | 19 - x/distribution/types/genesis.pb.go | 164 +- x/distribution/types/proposal.go | 5 +- x/distribution/types/query.pb.go | 297 +- x/distribution/types/query.pb.gw.go | 2 +- x/distribution/types/tx.pb.go | 218 +- x/manifest/types/genesis.pb.go | 68 +- x/manifest/types/query.pb.go | 64 +- x/manifest/types/query.pb.gw.go | 2 +- x/manifest/types/tx.pb.go | 104 +- 41 files changed, 35799 insertions(+), 1130 deletions(-) create mode 100644 api/distribution/module/v1/module.pulsar.go create mode 100644 api/distribution/v1beta1/distribution.pulsar.go create mode 100644 api/distribution/v1beta1/genesis.pulsar.go create mode 100644 api/distribution/v1beta1/query.pulsar.go create mode 100644 api/distribution/v1beta1/query_grpc.pb.go create mode 100644 api/distribution/v1beta1/tx.pulsar.go create mode 100644 api/distribution/v1beta1/tx_grpc.pb.go create mode 100644 proto/manifest/distribution/module/v1/module.proto create mode 100644 proto/manifest/distribution/v1beta1/distribution.proto create mode 100644 proto/manifest/distribution/v1beta1/genesis.proto create mode 100644 proto/manifest/distribution/v1beta1/query.proto create mode 100644 proto/manifest/distribution/v1beta1/tx.proto rename proto/manifest/{ => manifest}/module/v1/module.proto (71%) rename proto/manifest/{ => manifest}/v1/genesis.proto (96%) rename proto/manifest/{ => manifest}/v1/query.proto (89%) rename proto/manifest/{ => manifest}/v1/tx.proto (96%) delete mode 100644 x/distribution/types/errors.go diff --git a/api/distribution/module/v1/module.pulsar.go b/api/distribution/module/v1/module.pulsar.go new file mode 100644 index 0000000..3d158d3 --- /dev/null +++ b/api/distribution/module/v1/module.pulsar.go @@ -0,0 +1,660 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor + fd_Module_fee_collector_name protoreflect.FieldDescriptor + fd_Module_authority protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_module_v1_module_proto_init() + md_Module = File_manifest_distribution_module_v1_module_proto.Messages().ByName("Module") + fd_Module_fee_collector_name = md_Module.Fields().ByName("fee_collector_name") + fd_Module_authority = md_Module.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_module_v1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FeeCollectorName != "" { + value := protoreflect.ValueOfString(x.FeeCollectorName) + if !f(fd_Module_fee_collector_name, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.module.v1.Module.fee_collector_name": + return x.FeeCollectorName != "" + case "manifest.distribution.module.v1.Module.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.module.v1.Module")) + } + panic(fmt.Errorf("message manifest.distribution.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.module.v1.Module.fee_collector_name": + x.FeeCollectorName = "" + case "manifest.distribution.module.v1.Module.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.module.v1.Module")) + } + panic(fmt.Errorf("message manifest.distribution.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.module.v1.Module.fee_collector_name": + value := x.FeeCollectorName + return protoreflect.ValueOfString(value) + case "manifest.distribution.module.v1.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.module.v1.Module")) + } + panic(fmt.Errorf("message manifest.distribution.module.v1.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.module.v1.Module.fee_collector_name": + x.FeeCollectorName = value.Interface().(string) + case "manifest.distribution.module.v1.Module.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.module.v1.Module")) + } + panic(fmt.Errorf("message manifest.distribution.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.module.v1.Module.fee_collector_name": + panic(fmt.Errorf("field fee_collector_name of message manifest.distribution.module.v1.Module is not mutable")) + case "manifest.distribution.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message manifest.distribution.module.v1.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.module.v1.Module")) + } + panic(fmt.Errorf("message manifest.distribution.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.module.v1.Module.fee_collector_name": + return protoreflect.ValueOfString("") + case "manifest.distribution.module.v1.Module.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.module.v1.Module")) + } + panic(fmt.Errorf("message manifest.distribution.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.module.v1.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.FeeCollectorName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x12 + } + if len(x.FeeCollectorName) > 0 { + i -= len(x.FeeCollectorName) + copy(dAtA[i:], x.FeeCollectorName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeCollectorName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeCollectorName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeeCollectorName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: manifest/distribution/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the config object of the distribution module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FeeCollectorName string `protobuf:"bytes,1,opt,name=fee_collector_name,json=feeCollectorName,proto3" json:"fee_collector_name,omitempty"` + // authority defines the custom module authority. If not set, defaults to the governance module. + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_manifest_distribution_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetFeeCollectorName() string { + if x != nil { + return x.FeeCollectorName + } + return "" +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +var File_manifest_distribution_module_v1_module_proto protoreflect.FileDescriptor + +var file_manifest_distribution_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, + 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, + 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x12, + 0x66, 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x65, 0x65, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x3c, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x36, + 0x0a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, + 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x78, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xa5, 0x02, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, + 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x44, 0x4d, 0xaa, 0x02, 0x1f, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2b, 0x4d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_manifest_distribution_module_v1_module_proto_rawDescOnce sync.Once + file_manifest_distribution_module_v1_module_proto_rawDescData = file_manifest_distribution_module_v1_module_proto_rawDesc +) + +func file_manifest_distribution_module_v1_module_proto_rawDescGZIP() []byte { + file_manifest_distribution_module_v1_module_proto_rawDescOnce.Do(func() { + file_manifest_distribution_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_distribution_module_v1_module_proto_rawDescData) + }) + return file_manifest_distribution_module_v1_module_proto_rawDescData +} + +var file_manifest_distribution_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_manifest_distribution_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: manifest.distribution.module.v1.Module +} +var file_manifest_distribution_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_manifest_distribution_module_v1_module_proto_init() } +func file_manifest_distribution_module_v1_module_proto_init() { + if File_manifest_distribution_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_manifest_distribution_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_manifest_distribution_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_manifest_distribution_module_v1_module_proto_goTypes, + DependencyIndexes: file_manifest_distribution_module_v1_module_proto_depIdxs, + MessageInfos: file_manifest_distribution_module_v1_module_proto_msgTypes, + }.Build() + File_manifest_distribution_module_v1_module_proto = out.File + file_manifest_distribution_module_v1_module_proto_rawDesc = nil + file_manifest_distribution_module_v1_module_proto_goTypes = nil + file_manifest_distribution_module_v1_module_proto_depIdxs = nil +} diff --git a/api/distribution/v1beta1/distribution.pulsar.go b/api/distribution/v1beta1/distribution.pulsar.go new file mode 100644 index 0000000..25f819a --- /dev/null +++ b/api/distribution/v1beta1/distribution.pulsar.go @@ -0,0 +1,7607 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package distributionv1beta1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + types "cosmossdk.io/api/cosmos/base/v1beta1" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_community_tax protoreflect.FieldDescriptor + fd_Params_base_proposer_reward protoreflect.FieldDescriptor + fd_Params_bonus_proposer_reward protoreflect.FieldDescriptor + fd_Params_withdraw_addr_enabled protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_Params = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("Params") + fd_Params_community_tax = md_Params.Fields().ByName("community_tax") + fd_Params_base_proposer_reward = md_Params.Fields().ByName("base_proposer_reward") + fd_Params_bonus_proposer_reward = md_Params.Fields().ByName("bonus_proposer_reward") + fd_Params_withdraw_addr_enabled = md_Params.Fields().ByName("withdraw_addr_enabled") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CommunityTax != "" { + value := protoreflect.ValueOfString(x.CommunityTax) + if !f(fd_Params_community_tax, value) { + return + } + } + if x.BaseProposerReward != "" { + value := protoreflect.ValueOfString(x.BaseProposerReward) + if !f(fd_Params_base_proposer_reward, value) { + return + } + } + if x.BonusProposerReward != "" { + value := protoreflect.ValueOfString(x.BonusProposerReward) + if !f(fd_Params_bonus_proposer_reward, value) { + return + } + } + if x.WithdrawAddrEnabled != false { + value := protoreflect.ValueOfBool(x.WithdrawAddrEnabled) + if !f(fd_Params_withdraw_addr_enabled, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.Params.community_tax": + return x.CommunityTax != "" + case "manifest.distribution.v1beta1.Params.base_proposer_reward": + return x.BaseProposerReward != "" + case "manifest.distribution.v1beta1.Params.bonus_proposer_reward": + return x.BonusProposerReward != "" + case "manifest.distribution.v1beta1.Params.withdraw_addr_enabled": + return x.WithdrawAddrEnabled != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.Params")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.Params does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.Params.community_tax": + x.CommunityTax = "" + case "manifest.distribution.v1beta1.Params.base_proposer_reward": + x.BaseProposerReward = "" + case "manifest.distribution.v1beta1.Params.bonus_proposer_reward": + x.BonusProposerReward = "" + case "manifest.distribution.v1beta1.Params.withdraw_addr_enabled": + x.WithdrawAddrEnabled = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.Params")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.Params does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.Params.community_tax": + value := x.CommunityTax + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.Params.base_proposer_reward": + value := x.BaseProposerReward + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.Params.bonus_proposer_reward": + value := x.BonusProposerReward + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.Params.withdraw_addr_enabled": + value := x.WithdrawAddrEnabled + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.Params")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.Params does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.Params.community_tax": + x.CommunityTax = value.Interface().(string) + case "manifest.distribution.v1beta1.Params.base_proposer_reward": + x.BaseProposerReward = value.Interface().(string) + case "manifest.distribution.v1beta1.Params.bonus_proposer_reward": + x.BonusProposerReward = value.Interface().(string) + case "manifest.distribution.v1beta1.Params.withdraw_addr_enabled": + x.WithdrawAddrEnabled = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.Params")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.Params does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.Params.community_tax": + panic(fmt.Errorf("field community_tax of message manifest.distribution.v1beta1.Params is not mutable")) + case "manifest.distribution.v1beta1.Params.base_proposer_reward": + panic(fmt.Errorf("field base_proposer_reward of message manifest.distribution.v1beta1.Params is not mutable")) + case "manifest.distribution.v1beta1.Params.bonus_proposer_reward": + panic(fmt.Errorf("field bonus_proposer_reward of message manifest.distribution.v1beta1.Params is not mutable")) + case "manifest.distribution.v1beta1.Params.withdraw_addr_enabled": + panic(fmt.Errorf("field withdraw_addr_enabled of message manifest.distribution.v1beta1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.Params")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.Params does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.Params.community_tax": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.Params.base_proposer_reward": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.Params.bonus_proposer_reward": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.Params.withdraw_addr_enabled": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.Params")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.Params does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.Params", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Params) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.CommunityTax) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BaseProposerReward) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BonusProposerReward) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.WithdrawAddrEnabled { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.WithdrawAddrEnabled { + i-- + if x.WithdrawAddrEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(x.BonusProposerReward) > 0 { + i -= len(x.BonusProposerReward) + copy(dAtA[i:], x.BonusProposerReward) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BonusProposerReward))) + i-- + dAtA[i] = 0x1a + } + if len(x.BaseProposerReward) > 0 { + i -= len(x.BaseProposerReward) + copy(dAtA[i:], x.BaseProposerReward) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseProposerReward))) + i-- + dAtA[i] = 0x12 + } + if len(x.CommunityTax) > 0 { + i -= len(x.CommunityTax) + copy(dAtA[i:], x.CommunityTax) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityTax))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityTax", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CommunityTax = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseProposerReward", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BaseProposerReward = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BonusProposerReward", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BonusProposerReward = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddrEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.WithdrawAddrEnabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorHistoricalRewards_1_list)(nil) + +type _ValidatorHistoricalRewards_1_list struct { + list *[]*types.DecCoin +} + +func (x *_ValidatorHistoricalRewards_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorHistoricalRewards_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorHistoricalRewards_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorHistoricalRewards_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorHistoricalRewards_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorHistoricalRewards_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorHistoricalRewards_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorHistoricalRewards_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorHistoricalRewards protoreflect.MessageDescriptor + fd_ValidatorHistoricalRewards_cumulative_reward_ratio protoreflect.FieldDescriptor + fd_ValidatorHistoricalRewards_reference_count protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_ValidatorHistoricalRewards = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorHistoricalRewards") + fd_ValidatorHistoricalRewards_cumulative_reward_ratio = md_ValidatorHistoricalRewards.Fields().ByName("cumulative_reward_ratio") + fd_ValidatorHistoricalRewards_reference_count = md_ValidatorHistoricalRewards.Fields().ByName("reference_count") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorHistoricalRewards)(nil) + +type fastReflection_ValidatorHistoricalRewards ValidatorHistoricalRewards + +func (x *ValidatorHistoricalRewards) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorHistoricalRewards)(x) +} + +func (x *ValidatorHistoricalRewards) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorHistoricalRewards_messageType fastReflection_ValidatorHistoricalRewards_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorHistoricalRewards_messageType{} + +type fastReflection_ValidatorHistoricalRewards_messageType struct{} + +func (x fastReflection_ValidatorHistoricalRewards_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorHistoricalRewards)(nil) +} +func (x fastReflection_ValidatorHistoricalRewards_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorHistoricalRewards) +} +func (x fastReflection_ValidatorHistoricalRewards_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorHistoricalRewards +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorHistoricalRewards) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorHistoricalRewards +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorHistoricalRewards) Type() protoreflect.MessageType { + return _fastReflection_ValidatorHistoricalRewards_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorHistoricalRewards) New() protoreflect.Message { + return new(fastReflection_ValidatorHistoricalRewards) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorHistoricalRewards) Interface() protoreflect.ProtoMessage { + return (*ValidatorHistoricalRewards)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorHistoricalRewards) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.CumulativeRewardRatio) != 0 { + value := protoreflect.ValueOfList(&_ValidatorHistoricalRewards_1_list{list: &x.CumulativeRewardRatio}) + if !f(fd_ValidatorHistoricalRewards_cumulative_reward_ratio, value) { + return + } + } + if x.ReferenceCount != uint32(0) { + value := protoreflect.ValueOfUint32(x.ReferenceCount) + if !f(fd_ValidatorHistoricalRewards_reference_count, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorHistoricalRewards) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": + return len(x.CumulativeRewardRatio) != 0 + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": + return x.ReferenceCount != uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewards does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewards) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": + x.CumulativeRewardRatio = nil + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": + x.ReferenceCount = uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewards does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorHistoricalRewards) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": + if len(x.CumulativeRewardRatio) == 0 { + return protoreflect.ValueOfList(&_ValidatorHistoricalRewards_1_list{}) + } + listValue := &_ValidatorHistoricalRewards_1_list{list: &x.CumulativeRewardRatio} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": + value := x.ReferenceCount + return protoreflect.ValueOfUint32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewards does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewards) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": + lv := value.List() + clv := lv.(*_ValidatorHistoricalRewards_1_list) + x.CumulativeRewardRatio = *clv.list + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": + x.ReferenceCount = uint32(value.Uint()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewards does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewards) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": + if x.CumulativeRewardRatio == nil { + x.CumulativeRewardRatio = []*types.DecCoin{} + } + value := &_ValidatorHistoricalRewards_1_list{list: &x.CumulativeRewardRatio} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": + panic(fmt.Errorf("field reference_count of message manifest.distribution.v1beta1.ValidatorHistoricalRewards is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewards does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorHistoricalRewards) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_ValidatorHistoricalRewards_1_list{list: &list}) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewards.reference_count": + return protoreflect.ValueOfUint32(uint32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewards does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorHistoricalRewards) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorHistoricalRewards", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorHistoricalRewards) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewards) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorHistoricalRewards) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorHistoricalRewards) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorHistoricalRewards) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.CumulativeRewardRatio) > 0 { + for _, e := range x.CumulativeRewardRatio { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.ReferenceCount != 0 { + n += 1 + runtime.Sov(uint64(x.ReferenceCount)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorHistoricalRewards) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ReferenceCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ReferenceCount)) + i-- + dAtA[i] = 0x10 + } + if len(x.CumulativeRewardRatio) > 0 { + for iNdEx := len(x.CumulativeRewardRatio) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CumulativeRewardRatio[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorHistoricalRewards) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorHistoricalRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorHistoricalRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CumulativeRewardRatio", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CumulativeRewardRatio = append(x.CumulativeRewardRatio, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CumulativeRewardRatio[len(x.CumulativeRewardRatio)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ReferenceCount", wireType) + } + x.ReferenceCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ReferenceCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorCurrentRewards_1_list)(nil) + +type _ValidatorCurrentRewards_1_list struct { + list *[]*types.DecCoin +} + +func (x *_ValidatorCurrentRewards_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorCurrentRewards_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorCurrentRewards_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorCurrentRewards_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorCurrentRewards_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorCurrentRewards_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorCurrentRewards_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorCurrentRewards_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorCurrentRewards protoreflect.MessageDescriptor + fd_ValidatorCurrentRewards_rewards protoreflect.FieldDescriptor + fd_ValidatorCurrentRewards_period protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_ValidatorCurrentRewards = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorCurrentRewards") + fd_ValidatorCurrentRewards_rewards = md_ValidatorCurrentRewards.Fields().ByName("rewards") + fd_ValidatorCurrentRewards_period = md_ValidatorCurrentRewards.Fields().ByName("period") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorCurrentRewards)(nil) + +type fastReflection_ValidatorCurrentRewards ValidatorCurrentRewards + +func (x *ValidatorCurrentRewards) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorCurrentRewards)(x) +} + +func (x *ValidatorCurrentRewards) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorCurrentRewards_messageType fastReflection_ValidatorCurrentRewards_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorCurrentRewards_messageType{} + +type fastReflection_ValidatorCurrentRewards_messageType struct{} + +func (x fastReflection_ValidatorCurrentRewards_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorCurrentRewards)(nil) +} +func (x fastReflection_ValidatorCurrentRewards_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorCurrentRewards) +} +func (x fastReflection_ValidatorCurrentRewards_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorCurrentRewards +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorCurrentRewards) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorCurrentRewards +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorCurrentRewards) Type() protoreflect.MessageType { + return _fastReflection_ValidatorCurrentRewards_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorCurrentRewards) New() protoreflect.Message { + return new(fastReflection_ValidatorCurrentRewards) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorCurrentRewards) Interface() protoreflect.ProtoMessage { + return (*ValidatorCurrentRewards)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorCurrentRewards) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rewards) != 0 { + value := protoreflect.ValueOfList(&_ValidatorCurrentRewards_1_list{list: &x.Rewards}) + if !f(fd_ValidatorCurrentRewards_rewards, value) { + return + } + } + if x.Period != uint64(0) { + value := protoreflect.ValueOfUint64(x.Period) + if !f(fd_ValidatorCurrentRewards_period, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorCurrentRewards) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards": + return len(x.Rewards) != 0 + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.period": + return x.Period != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewards does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewards) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards": + x.Rewards = nil + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.period": + x.Period = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewards does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorCurrentRewards) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards": + if len(x.Rewards) == 0 { + return protoreflect.ValueOfList(&_ValidatorCurrentRewards_1_list{}) + } + listValue := &_ValidatorCurrentRewards_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.period": + value := x.Period + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewards does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewards) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards": + lv := value.List() + clv := lv.(*_ValidatorCurrentRewards_1_list) + x.Rewards = *clv.list + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.period": + x.Period = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewards does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewards) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards": + if x.Rewards == nil { + x.Rewards = []*types.DecCoin{} + } + value := &_ValidatorCurrentRewards_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.period": + panic(fmt.Errorf("field period of message manifest.distribution.v1beta1.ValidatorCurrentRewards is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewards does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorCurrentRewards) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_ValidatorCurrentRewards_1_list{list: &list}) + case "manifest.distribution.v1beta1.ValidatorCurrentRewards.period": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewards does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorCurrentRewards) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorCurrentRewards", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorCurrentRewards) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewards) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorCurrentRewards) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorCurrentRewards) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorCurrentRewards) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Rewards) > 0 { + for _, e := range x.Rewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Period != 0 { + n += 1 + runtime.Sov(uint64(x.Period)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorCurrentRewards) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Period != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + i-- + dAtA[i] = 0x10 + } + if len(x.Rewards) > 0 { + for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Rewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorCurrentRewards) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorCurrentRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorCurrentRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rewards = append(x.Rewards, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + x.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Period |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorAccumulatedCommission_1_list)(nil) + +type _ValidatorAccumulatedCommission_1_list struct { + list *[]*types.DecCoin +} + +func (x *_ValidatorAccumulatedCommission_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorAccumulatedCommission_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorAccumulatedCommission_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorAccumulatedCommission_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorAccumulatedCommission_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorAccumulatedCommission_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorAccumulatedCommission_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorAccumulatedCommission_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorAccumulatedCommission protoreflect.MessageDescriptor + fd_ValidatorAccumulatedCommission_commission protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_ValidatorAccumulatedCommission = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorAccumulatedCommission") + fd_ValidatorAccumulatedCommission_commission = md_ValidatorAccumulatedCommission.Fields().ByName("commission") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorAccumulatedCommission)(nil) + +type fastReflection_ValidatorAccumulatedCommission ValidatorAccumulatedCommission + +func (x *ValidatorAccumulatedCommission) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorAccumulatedCommission)(x) +} + +func (x *ValidatorAccumulatedCommission) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorAccumulatedCommission_messageType fastReflection_ValidatorAccumulatedCommission_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorAccumulatedCommission_messageType{} + +type fastReflection_ValidatorAccumulatedCommission_messageType struct{} + +func (x fastReflection_ValidatorAccumulatedCommission_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorAccumulatedCommission)(nil) +} +func (x fastReflection_ValidatorAccumulatedCommission_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorAccumulatedCommission) +} +func (x fastReflection_ValidatorAccumulatedCommission_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorAccumulatedCommission +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorAccumulatedCommission) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorAccumulatedCommission +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorAccumulatedCommission) Type() protoreflect.MessageType { + return _fastReflection_ValidatorAccumulatedCommission_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorAccumulatedCommission) New() protoreflect.Message { + return new(fastReflection_ValidatorAccumulatedCommission) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorAccumulatedCommission) Interface() protoreflect.ProtoMessage { + return (*ValidatorAccumulatedCommission)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorAccumulatedCommission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Commission) != 0 { + value := protoreflect.ValueOfList(&_ValidatorAccumulatedCommission_1_list{list: &x.Commission}) + if !f(fd_ValidatorAccumulatedCommission_commission, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorAccumulatedCommission) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission": + return len(x.Commission) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommission does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommission) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission": + x.Commission = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommission does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorAccumulatedCommission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission": + if len(x.Commission) == 0 { + return protoreflect.ValueOfList(&_ValidatorAccumulatedCommission_1_list{}) + } + listValue := &_ValidatorAccumulatedCommission_1_list{list: &x.Commission} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommission does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission": + lv := value.List() + clv := lv.(*_ValidatorAccumulatedCommission_1_list) + x.Commission = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommission does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission": + if x.Commission == nil { + x.Commission = []*types.DecCoin{} + } + value := &_ValidatorAccumulatedCommission_1_list{list: &x.Commission} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommission does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorAccumulatedCommission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_ValidatorAccumulatedCommission_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommission does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorAccumulatedCommission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorAccumulatedCommission", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorAccumulatedCommission) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommission) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorAccumulatedCommission) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorAccumulatedCommission) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorAccumulatedCommission) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Commission) > 0 { + for _, e := range x.Commission { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorAccumulatedCommission) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Commission) > 0 { + for iNdEx := len(x.Commission) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Commission[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorAccumulatedCommission) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorAccumulatedCommission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorAccumulatedCommission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Commission = append(x.Commission, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission[len(x.Commission)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorOutstandingRewards_1_list)(nil) + +type _ValidatorOutstandingRewards_1_list struct { + list *[]*types.DecCoin +} + +func (x *_ValidatorOutstandingRewards_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorOutstandingRewards_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorOutstandingRewards_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorOutstandingRewards_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorOutstandingRewards_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorOutstandingRewards_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorOutstandingRewards_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorOutstandingRewards_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorOutstandingRewards protoreflect.MessageDescriptor + fd_ValidatorOutstandingRewards_rewards protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_ValidatorOutstandingRewards = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorOutstandingRewards") + fd_ValidatorOutstandingRewards_rewards = md_ValidatorOutstandingRewards.Fields().ByName("rewards") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorOutstandingRewards)(nil) + +type fastReflection_ValidatorOutstandingRewards ValidatorOutstandingRewards + +func (x *ValidatorOutstandingRewards) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorOutstandingRewards)(x) +} + +func (x *ValidatorOutstandingRewards) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorOutstandingRewards_messageType fastReflection_ValidatorOutstandingRewards_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorOutstandingRewards_messageType{} + +type fastReflection_ValidatorOutstandingRewards_messageType struct{} + +func (x fastReflection_ValidatorOutstandingRewards_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorOutstandingRewards)(nil) +} +func (x fastReflection_ValidatorOutstandingRewards_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorOutstandingRewards) +} +func (x fastReflection_ValidatorOutstandingRewards_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorOutstandingRewards +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorOutstandingRewards) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorOutstandingRewards +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorOutstandingRewards) Type() protoreflect.MessageType { + return _fastReflection_ValidatorOutstandingRewards_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorOutstandingRewards) New() protoreflect.Message { + return new(fastReflection_ValidatorOutstandingRewards) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorOutstandingRewards) Interface() protoreflect.ProtoMessage { + return (*ValidatorOutstandingRewards)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorOutstandingRewards) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rewards) != 0 { + value := protoreflect.ValueOfList(&_ValidatorOutstandingRewards_1_list{list: &x.Rewards}) + if !f(fd_ValidatorOutstandingRewards_rewards, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorOutstandingRewards) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards": + return len(x.Rewards) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewards does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewards) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards": + x.Rewards = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewards does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorOutstandingRewards) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards": + if len(x.Rewards) == 0 { + return protoreflect.ValueOfList(&_ValidatorOutstandingRewards_1_list{}) + } + listValue := &_ValidatorOutstandingRewards_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewards does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewards) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards": + lv := value.List() + clv := lv.(*_ValidatorOutstandingRewards_1_list) + x.Rewards = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewards does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewards) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards": + if x.Rewards == nil { + x.Rewards = []*types.DecCoin{} + } + value := &_ValidatorOutstandingRewards_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewards does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorOutstandingRewards) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_ValidatorOutstandingRewards_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewards")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewards does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorOutstandingRewards) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorOutstandingRewards", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorOutstandingRewards) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewards) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorOutstandingRewards) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorOutstandingRewards) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorOutstandingRewards) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Rewards) > 0 { + for _, e := range x.Rewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorOutstandingRewards) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Rewards) > 0 { + for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Rewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorOutstandingRewards) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorOutstandingRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorOutstandingRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rewards = append(x.Rewards, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ValidatorSlashEvent protoreflect.MessageDescriptor + fd_ValidatorSlashEvent_validator_period protoreflect.FieldDescriptor + fd_ValidatorSlashEvent_fraction protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_ValidatorSlashEvent = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorSlashEvent") + fd_ValidatorSlashEvent_validator_period = md_ValidatorSlashEvent.Fields().ByName("validator_period") + fd_ValidatorSlashEvent_fraction = md_ValidatorSlashEvent.Fields().ByName("fraction") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorSlashEvent)(nil) + +type fastReflection_ValidatorSlashEvent ValidatorSlashEvent + +func (x *ValidatorSlashEvent) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorSlashEvent)(x) +} + +func (x *ValidatorSlashEvent) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorSlashEvent_messageType fastReflection_ValidatorSlashEvent_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorSlashEvent_messageType{} + +type fastReflection_ValidatorSlashEvent_messageType struct{} + +func (x fastReflection_ValidatorSlashEvent_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorSlashEvent)(nil) +} +func (x fastReflection_ValidatorSlashEvent_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorSlashEvent) +} +func (x fastReflection_ValidatorSlashEvent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSlashEvent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorSlashEvent) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSlashEvent +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorSlashEvent) Type() protoreflect.MessageType { + return _fastReflection_ValidatorSlashEvent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorSlashEvent) New() protoreflect.Message { + return new(fastReflection_ValidatorSlashEvent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorSlashEvent) Interface() protoreflect.ProtoMessage { + return (*ValidatorSlashEvent)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorSlashEvent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorPeriod != uint64(0) { + value := protoreflect.ValueOfUint64(x.ValidatorPeriod) + if !f(fd_ValidatorSlashEvent_validator_period, value) { + return + } + } + if x.Fraction != "" { + value := protoreflect.ValueOfString(x.Fraction) + if !f(fd_ValidatorSlashEvent_fraction, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorSlashEvent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvent.validator_period": + return x.ValidatorPeriod != uint64(0) + case "manifest.distribution.v1beta1.ValidatorSlashEvent.fraction": + return x.Fraction != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvent")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvent does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvent.validator_period": + x.ValidatorPeriod = uint64(0) + case "manifest.distribution.v1beta1.ValidatorSlashEvent.fraction": + x.Fraction = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvent")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvent does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorSlashEvent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvent.validator_period": + value := x.ValidatorPeriod + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.ValidatorSlashEvent.fraction": + value := x.Fraction + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvent")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvent does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvent.validator_period": + x.ValidatorPeriod = value.Uint() + case "manifest.distribution.v1beta1.ValidatorSlashEvent.fraction": + x.Fraction = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvent")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvent does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvent.validator_period": + panic(fmt.Errorf("field validator_period of message manifest.distribution.v1beta1.ValidatorSlashEvent is not mutable")) + case "manifest.distribution.v1beta1.ValidatorSlashEvent.fraction": + panic(fmt.Errorf("field fraction of message manifest.distribution.v1beta1.ValidatorSlashEvent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvent")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvent does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorSlashEvent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvent.validator_period": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.ValidatorSlashEvent.fraction": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvent")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvent does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorSlashEvent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorSlashEvent", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorSlashEvent) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvent) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorSlashEvent) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorSlashEvent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorSlashEvent) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ValidatorPeriod != 0 { + n += 1 + runtime.Sov(uint64(x.ValidatorPeriod)) + } + l = len(x.Fraction) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorSlashEvent) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Fraction) > 0 { + i -= len(x.Fraction) + copy(dAtA[i:], x.Fraction) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fraction))) + i-- + dAtA[i] = 0x12 + } + if x.ValidatorPeriod != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorPeriod)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorSlashEvent) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorPeriod", wireType) + } + x.ValidatorPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ValidatorPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fraction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Fraction = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorSlashEvents_1_list)(nil) + +type _ValidatorSlashEvents_1_list struct { + list *[]*ValidatorSlashEvent +} + +func (x *_ValidatorSlashEvents_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorSlashEvents_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorSlashEvents_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorSlashEvents_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorSlashEvents_1_list) AppendMutable() protoreflect.Value { + v := new(ValidatorSlashEvent) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorSlashEvents_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorSlashEvents_1_list) NewElement() protoreflect.Value { + v := new(ValidatorSlashEvent) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorSlashEvents_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorSlashEvents protoreflect.MessageDescriptor + fd_ValidatorSlashEvents_validator_slash_events protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_ValidatorSlashEvents = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("ValidatorSlashEvents") + fd_ValidatorSlashEvents_validator_slash_events = md_ValidatorSlashEvents.Fields().ByName("validator_slash_events") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorSlashEvents)(nil) + +type fastReflection_ValidatorSlashEvents ValidatorSlashEvents + +func (x *ValidatorSlashEvents) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorSlashEvents)(x) +} + +func (x *ValidatorSlashEvents) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorSlashEvents_messageType fastReflection_ValidatorSlashEvents_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorSlashEvents_messageType{} + +type fastReflection_ValidatorSlashEvents_messageType struct{} + +func (x fastReflection_ValidatorSlashEvents_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorSlashEvents)(nil) +} +func (x fastReflection_ValidatorSlashEvents_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorSlashEvents) +} +func (x fastReflection_ValidatorSlashEvents_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSlashEvents +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorSlashEvents) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSlashEvents +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorSlashEvents) Type() protoreflect.MessageType { + return _fastReflection_ValidatorSlashEvents_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorSlashEvents) New() protoreflect.Message { + return new(fastReflection_ValidatorSlashEvents) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorSlashEvents) Interface() protoreflect.ProtoMessage { + return (*ValidatorSlashEvents)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorSlashEvents) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ValidatorSlashEvents) != 0 { + value := protoreflect.ValueOfList(&_ValidatorSlashEvents_1_list{list: &x.ValidatorSlashEvents}) + if !f(fd_ValidatorSlashEvents_validator_slash_events, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorSlashEvents) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": + return len(x.ValidatorSlashEvents) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvents")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvents does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvents) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": + x.ValidatorSlashEvents = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvents")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvents does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorSlashEvents) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": + if len(x.ValidatorSlashEvents) == 0 { + return protoreflect.ValueOfList(&_ValidatorSlashEvents_1_list{}) + } + listValue := &_ValidatorSlashEvents_1_list{list: &x.ValidatorSlashEvents} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvents")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvents does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvents) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": + lv := value.List() + clv := lv.(*_ValidatorSlashEvents_1_list) + x.ValidatorSlashEvents = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvents")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvents does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvents) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": + if x.ValidatorSlashEvents == nil { + x.ValidatorSlashEvents = []*ValidatorSlashEvent{} + } + value := &_ValidatorSlashEvents_1_list{list: &x.ValidatorSlashEvents} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvents")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvents does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorSlashEvents) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events": + list := []*ValidatorSlashEvent{} + return protoreflect.ValueOfList(&_ValidatorSlashEvents_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEvents")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEvents does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorSlashEvents) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorSlashEvents", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorSlashEvents) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEvents) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorSlashEvents) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorSlashEvents) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorSlashEvents) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ValidatorSlashEvents) > 0 { + for _, e := range x.ValidatorSlashEvents { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorSlashEvents) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorSlashEvents) > 0 { + for iNdEx := len(x.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ValidatorSlashEvents[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorSlashEvents) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEvents: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEvents: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvents", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorSlashEvents = append(x.ValidatorSlashEvents, &ValidatorSlashEvent{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSlashEvents[len(x.ValidatorSlashEvents)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_FeePool_1_list)(nil) + +type _FeePool_1_list struct { + list *[]*types.DecCoin +} + +func (x *_FeePool_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_FeePool_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_FeePool_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_FeePool_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_FeePool_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_FeePool_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_FeePool_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_FeePool_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_FeePool protoreflect.MessageDescriptor + fd_FeePool_community_pool protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_FeePool = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("FeePool") + fd_FeePool_community_pool = md_FeePool.Fields().ByName("community_pool") +} + +var _ protoreflect.Message = (*fastReflection_FeePool)(nil) + +type fastReflection_FeePool FeePool + +func (x *FeePool) ProtoReflect() protoreflect.Message { + return (*fastReflection_FeePool)(x) +} + +func (x *FeePool) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_FeePool_messageType fastReflection_FeePool_messageType +var _ protoreflect.MessageType = fastReflection_FeePool_messageType{} + +type fastReflection_FeePool_messageType struct{} + +func (x fastReflection_FeePool_messageType) Zero() protoreflect.Message { + return (*fastReflection_FeePool)(nil) +} +func (x fastReflection_FeePool_messageType) New() protoreflect.Message { + return new(fastReflection_FeePool) +} +func (x fastReflection_FeePool_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FeePool +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_FeePool) Descriptor() protoreflect.MessageDescriptor { + return md_FeePool +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_FeePool) Type() protoreflect.MessageType { + return _fastReflection_FeePool_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_FeePool) New() protoreflect.Message { + return new(fastReflection_FeePool) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_FeePool) Interface() protoreflect.ProtoMessage { + return (*FeePool)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_FeePool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.CommunityPool) != 0 { + value := protoreflect.ValueOfList(&_FeePool_1_list{list: &x.CommunityPool}) + if !f(fd_FeePool_community_pool, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_FeePool) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.FeePool.community_pool": + return len(x.CommunityPool) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.FeePool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.FeePool does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeePool) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.FeePool.community_pool": + x.CommunityPool = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.FeePool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.FeePool does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_FeePool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.FeePool.community_pool": + if len(x.CommunityPool) == 0 { + return protoreflect.ValueOfList(&_FeePool_1_list{}) + } + listValue := &_FeePool_1_list{list: &x.CommunityPool} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.FeePool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.FeePool does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeePool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.FeePool.community_pool": + lv := value.List() + clv := lv.(*_FeePool_1_list) + x.CommunityPool = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.FeePool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.FeePool does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeePool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.FeePool.community_pool": + if x.CommunityPool == nil { + x.CommunityPool = []*types.DecCoin{} + } + value := &_FeePool_1_list{list: &x.CommunityPool} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.FeePool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.FeePool does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_FeePool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.FeePool.community_pool": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_FeePool_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.FeePool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.FeePool does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_FeePool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.FeePool", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_FeePool) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeePool) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_FeePool) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_FeePool) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*FeePool) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.CommunityPool) > 0 { + for _, e := range x.CommunityPool { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*FeePool) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.CommunityPool) > 0 { + for iNdEx := len(x.CommunityPool) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CommunityPool[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*FeePool) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeePool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeePool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CommunityPool = append(x.CommunityPool, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CommunityPool[len(x.CommunityPool)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_CommunityPoolSpendProposal_4_list)(nil) + +type _CommunityPoolSpendProposal_4_list struct { + list *[]*types.Coin +} + +func (x *_CommunityPoolSpendProposal_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CommunityPoolSpendProposal_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_CommunityPoolSpendProposal_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_CommunityPoolSpendProposal_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_CommunityPoolSpendProposal_4_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CommunityPoolSpendProposal_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_CommunityPoolSpendProposal_4_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CommunityPoolSpendProposal_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_CommunityPoolSpendProposal protoreflect.MessageDescriptor + fd_CommunityPoolSpendProposal_title protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposal_description protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposal_recipient protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposal_amount protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_CommunityPoolSpendProposal = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("CommunityPoolSpendProposal") + fd_CommunityPoolSpendProposal_title = md_CommunityPoolSpendProposal.Fields().ByName("title") + fd_CommunityPoolSpendProposal_description = md_CommunityPoolSpendProposal.Fields().ByName("description") + fd_CommunityPoolSpendProposal_recipient = md_CommunityPoolSpendProposal.Fields().ByName("recipient") + fd_CommunityPoolSpendProposal_amount = md_CommunityPoolSpendProposal.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_CommunityPoolSpendProposal)(nil) + +type fastReflection_CommunityPoolSpendProposal CommunityPoolSpendProposal + +func (x *CommunityPoolSpendProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_CommunityPoolSpendProposal)(x) +} + +func (x *CommunityPoolSpendProposal) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CommunityPoolSpendProposal_messageType fastReflection_CommunityPoolSpendProposal_messageType +var _ protoreflect.MessageType = fastReflection_CommunityPoolSpendProposal_messageType{} + +type fastReflection_CommunityPoolSpendProposal_messageType struct{} + +func (x fastReflection_CommunityPoolSpendProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_CommunityPoolSpendProposal)(nil) +} +func (x fastReflection_CommunityPoolSpendProposal_messageType) New() protoreflect.Message { + return new(fastReflection_CommunityPoolSpendProposal) +} +func (x fastReflection_CommunityPoolSpendProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CommunityPoolSpendProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CommunityPoolSpendProposal) Descriptor() protoreflect.MessageDescriptor { + return md_CommunityPoolSpendProposal +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CommunityPoolSpendProposal) Type() protoreflect.MessageType { + return _fastReflection_CommunityPoolSpendProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CommunityPoolSpendProposal) New() protoreflect.Message { + return new(fastReflection_CommunityPoolSpendProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CommunityPoolSpendProposal) Interface() protoreflect.ProtoMessage { + return (*CommunityPoolSpendProposal)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CommunityPoolSpendProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_CommunityPoolSpendProposal_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_CommunityPoolSpendProposal_description, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_CommunityPoolSpendProposal_recipient, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_CommunityPoolSpendProposal_4_list{list: &x.Amount}) + if !f(fd_CommunityPoolSpendProposal_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CommunityPoolSpendProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.title": + return x.Title != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.description": + return x.Description != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.recipient": + return x.Recipient != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposal")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposal does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.title": + x.Title = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.description": + x.Description = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.recipient": + x.Recipient = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposal")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposal does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CommunityPoolSpendProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_CommunityPoolSpendProposal_4_list{}) + } + listValue := &_CommunityPoolSpendProposal_4_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposal")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposal does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.title": + x.Title = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.description": + x.Description = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.recipient": + x.Recipient = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount": + lv := value.List() + clv := lv.(*_CommunityPoolSpendProposal_4_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposal")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposal does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount": + if x.Amount == nil { + x.Amount = []*types.Coin{} + } + value := &_CommunityPoolSpendProposal_4_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.title": + panic(fmt.Errorf("field title of message manifest.distribution.v1beta1.CommunityPoolSpendProposal is not mutable")) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.description": + panic(fmt.Errorf("field description of message manifest.distribution.v1beta1.CommunityPoolSpendProposal is not mutable")) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.recipient": + panic(fmt.Errorf("field recipient of message manifest.distribution.v1beta1.CommunityPoolSpendProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposal")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposal does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CommunityPoolSpendProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.title": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.description": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.recipient": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_CommunityPoolSpendProposal_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposal")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposal does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CommunityPoolSpendProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.CommunityPoolSpendProposal", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CommunityPoolSpendProposal) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposal) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CommunityPoolSpendProposal) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CommunityPoolSpendProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CommunityPoolSpendProposal) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CommunityPoolSpendProposal) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CommunityPoolSpendProposal) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolSpendProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolSpendProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_DelegatorStartingInfo protoreflect.MessageDescriptor + fd_DelegatorStartingInfo_previous_period protoreflect.FieldDescriptor + fd_DelegatorStartingInfo_stake protoreflect.FieldDescriptor + fd_DelegatorStartingInfo_height protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_DelegatorStartingInfo = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("DelegatorStartingInfo") + fd_DelegatorStartingInfo_previous_period = md_DelegatorStartingInfo.Fields().ByName("previous_period") + fd_DelegatorStartingInfo_stake = md_DelegatorStartingInfo.Fields().ByName("stake") + fd_DelegatorStartingInfo_height = md_DelegatorStartingInfo.Fields().ByName("height") +} + +var _ protoreflect.Message = (*fastReflection_DelegatorStartingInfo)(nil) + +type fastReflection_DelegatorStartingInfo DelegatorStartingInfo + +func (x *DelegatorStartingInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_DelegatorStartingInfo)(x) +} + +func (x *DelegatorStartingInfo) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DelegatorStartingInfo_messageType fastReflection_DelegatorStartingInfo_messageType +var _ protoreflect.MessageType = fastReflection_DelegatorStartingInfo_messageType{} + +type fastReflection_DelegatorStartingInfo_messageType struct{} + +func (x fastReflection_DelegatorStartingInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_DelegatorStartingInfo)(nil) +} +func (x fastReflection_DelegatorStartingInfo_messageType) New() protoreflect.Message { + return new(fastReflection_DelegatorStartingInfo) +} +func (x fastReflection_DelegatorStartingInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DelegatorStartingInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DelegatorStartingInfo) Descriptor() protoreflect.MessageDescriptor { + return md_DelegatorStartingInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DelegatorStartingInfo) Type() protoreflect.MessageType { + return _fastReflection_DelegatorStartingInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DelegatorStartingInfo) New() protoreflect.Message { + return new(fastReflection_DelegatorStartingInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DelegatorStartingInfo) Interface() protoreflect.ProtoMessage { + return (*DelegatorStartingInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DelegatorStartingInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PreviousPeriod != uint64(0) { + value := protoreflect.ValueOfUint64(x.PreviousPeriod) + if !f(fd_DelegatorStartingInfo_previous_period, value) { + return + } + } + if x.Stake != "" { + value := protoreflect.ValueOfString(x.Stake) + if !f(fd_DelegatorStartingInfo_stake, value) { + return + } + } + if x.Height != uint64(0) { + value := protoreflect.ValueOfUint64(x.Height) + if !f(fd_DelegatorStartingInfo_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DelegatorStartingInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfo.previous_period": + return x.PreviousPeriod != uint64(0) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.stake": + return x.Stake != "" + case "manifest.distribution.v1beta1.DelegatorStartingInfo.height": + return x.Height != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfo.previous_period": + x.PreviousPeriod = uint64(0) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.stake": + x.Stake = "" + case "manifest.distribution.v1beta1.DelegatorStartingInfo.height": + x.Height = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DelegatorStartingInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfo.previous_period": + value := x.PreviousPeriod + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.stake": + value := x.Stake + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.height": + value := x.Height + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfo.previous_period": + x.PreviousPeriod = value.Uint() + case "manifest.distribution.v1beta1.DelegatorStartingInfo.stake": + x.Stake = value.Interface().(string) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.height": + x.Height = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfo.previous_period": + panic(fmt.Errorf("field previous_period of message manifest.distribution.v1beta1.DelegatorStartingInfo is not mutable")) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.stake": + panic(fmt.Errorf("field stake of message manifest.distribution.v1beta1.DelegatorStartingInfo is not mutable")) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.height": + panic(fmt.Errorf("field height of message manifest.distribution.v1beta1.DelegatorStartingInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DelegatorStartingInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfo.previous_period": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.DelegatorStartingInfo.stake": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.DelegatorStartingInfo.height": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DelegatorStartingInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.DelegatorStartingInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DelegatorStartingInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DelegatorStartingInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DelegatorStartingInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DelegatorStartingInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.PreviousPeriod != 0 { + n += 1 + runtime.Sov(uint64(x.PreviousPeriod)) + } + l = len(x.Stake) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DelegatorStartingInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x18 + } + if len(x.Stake) > 0 { + i -= len(x.Stake) + copy(dAtA[i:], x.Stake) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Stake))) + i-- + dAtA[i] = 0x12 + } + if x.PreviousPeriod != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.PreviousPeriod)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DelegatorStartingInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorStartingInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorStartingInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousPeriod", wireType) + } + x.PreviousPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.PreviousPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Stake = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_DelegationDelegatorReward_2_list)(nil) + +type _DelegationDelegatorReward_2_list struct { + list *[]*types.DecCoin +} + +func (x *_DelegationDelegatorReward_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DelegationDelegatorReward_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_DelegationDelegatorReward_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_DelegationDelegatorReward_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_DelegationDelegatorReward_2_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DelegationDelegatorReward_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_DelegationDelegatorReward_2_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_DelegationDelegatorReward_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DelegationDelegatorReward protoreflect.MessageDescriptor + fd_DelegationDelegatorReward_validator_address protoreflect.FieldDescriptor + fd_DelegationDelegatorReward_reward protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_DelegationDelegatorReward = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("DelegationDelegatorReward") + fd_DelegationDelegatorReward_validator_address = md_DelegationDelegatorReward.Fields().ByName("validator_address") + fd_DelegationDelegatorReward_reward = md_DelegationDelegatorReward.Fields().ByName("reward") +} + +var _ protoreflect.Message = (*fastReflection_DelegationDelegatorReward)(nil) + +type fastReflection_DelegationDelegatorReward DelegationDelegatorReward + +func (x *DelegationDelegatorReward) ProtoReflect() protoreflect.Message { + return (*fastReflection_DelegationDelegatorReward)(x) +} + +func (x *DelegationDelegatorReward) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DelegationDelegatorReward_messageType fastReflection_DelegationDelegatorReward_messageType +var _ protoreflect.MessageType = fastReflection_DelegationDelegatorReward_messageType{} + +type fastReflection_DelegationDelegatorReward_messageType struct{} + +func (x fastReflection_DelegationDelegatorReward_messageType) Zero() protoreflect.Message { + return (*fastReflection_DelegationDelegatorReward)(nil) +} +func (x fastReflection_DelegationDelegatorReward_messageType) New() protoreflect.Message { + return new(fastReflection_DelegationDelegatorReward) +} +func (x fastReflection_DelegationDelegatorReward_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DelegationDelegatorReward +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DelegationDelegatorReward) Descriptor() protoreflect.MessageDescriptor { + return md_DelegationDelegatorReward +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DelegationDelegatorReward) Type() protoreflect.MessageType { + return _fastReflection_DelegationDelegatorReward_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DelegationDelegatorReward) New() protoreflect.Message { + return new(fastReflection_DelegationDelegatorReward) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DelegationDelegatorReward) Interface() protoreflect.ProtoMessage { + return (*DelegationDelegatorReward)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DelegationDelegatorReward) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_DelegationDelegatorReward_validator_address, value) { + return + } + } + if len(x.Reward) != 0 { + value := protoreflect.ValueOfList(&_DelegationDelegatorReward_2_list{list: &x.Reward}) + if !f(fd_DelegationDelegatorReward_reward, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DelegationDelegatorReward) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegationDelegatorReward.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.DelegationDelegatorReward.reward": + return len(x.Reward) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegationDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegationDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegationDelegatorReward) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegationDelegatorReward.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.DelegationDelegatorReward.reward": + x.Reward = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegationDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegationDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DelegationDelegatorReward) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.DelegationDelegatorReward.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.DelegationDelegatorReward.reward": + if len(x.Reward) == 0 { + return protoreflect.ValueOfList(&_DelegationDelegatorReward_2_list{}) + } + listValue := &_DelegationDelegatorReward_2_list{list: &x.Reward} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegationDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegationDelegatorReward does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegationDelegatorReward) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegationDelegatorReward.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.DelegationDelegatorReward.reward": + lv := value.List() + clv := lv.(*_DelegationDelegatorReward_2_list) + x.Reward = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegationDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegationDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegationDelegatorReward) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegationDelegatorReward.reward": + if x.Reward == nil { + x.Reward = []*types.DecCoin{} + } + value := &_DelegationDelegatorReward_2_list{list: &x.Reward} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.DelegationDelegatorReward.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.DelegationDelegatorReward is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegationDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegationDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DelegationDelegatorReward) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegationDelegatorReward.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.DelegationDelegatorReward.reward": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_DelegationDelegatorReward_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegationDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegationDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DelegationDelegatorReward) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.DelegationDelegatorReward", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DelegationDelegatorReward) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegationDelegatorReward) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DelegationDelegatorReward) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DelegationDelegatorReward) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DelegationDelegatorReward) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Reward) > 0 { + for _, e := range x.Reward { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DelegationDelegatorReward) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Reward) > 0 { + for iNdEx := len(x.Reward) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Reward[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DelegationDelegatorReward) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegationDelegatorReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegationDelegatorReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reward", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Reward = append(x.Reward, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Reward[len(x.Reward)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_CommunityPoolSpendProposalWithDeposit protoreflect.MessageDescriptor + fd_CommunityPoolSpendProposalWithDeposit_title protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposalWithDeposit_description protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposalWithDeposit_recipient protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposalWithDeposit_amount protoreflect.FieldDescriptor + fd_CommunityPoolSpendProposalWithDeposit_deposit protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_distribution_proto_init() + md_CommunityPoolSpendProposalWithDeposit = File_manifest_distribution_v1beta1_distribution_proto.Messages().ByName("CommunityPoolSpendProposalWithDeposit") + fd_CommunityPoolSpendProposalWithDeposit_title = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("title") + fd_CommunityPoolSpendProposalWithDeposit_description = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("description") + fd_CommunityPoolSpendProposalWithDeposit_recipient = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("recipient") + fd_CommunityPoolSpendProposalWithDeposit_amount = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("amount") + fd_CommunityPoolSpendProposalWithDeposit_deposit = md_CommunityPoolSpendProposalWithDeposit.Fields().ByName("deposit") +} + +var _ protoreflect.Message = (*fastReflection_CommunityPoolSpendProposalWithDeposit)(nil) + +type fastReflection_CommunityPoolSpendProposalWithDeposit CommunityPoolSpendProposalWithDeposit + +func (x *CommunityPoolSpendProposalWithDeposit) ProtoReflect() protoreflect.Message { + return (*fastReflection_CommunityPoolSpendProposalWithDeposit)(x) +} + +func (x *CommunityPoolSpendProposalWithDeposit) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CommunityPoolSpendProposalWithDeposit_messageType fastReflection_CommunityPoolSpendProposalWithDeposit_messageType +var _ protoreflect.MessageType = fastReflection_CommunityPoolSpendProposalWithDeposit_messageType{} + +type fastReflection_CommunityPoolSpendProposalWithDeposit_messageType struct{} + +func (x fastReflection_CommunityPoolSpendProposalWithDeposit_messageType) Zero() protoreflect.Message { + return (*fastReflection_CommunityPoolSpendProposalWithDeposit)(nil) +} +func (x fastReflection_CommunityPoolSpendProposalWithDeposit_messageType) New() protoreflect.Message { + return new(fastReflection_CommunityPoolSpendProposalWithDeposit) +} +func (x fastReflection_CommunityPoolSpendProposalWithDeposit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CommunityPoolSpendProposalWithDeposit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Descriptor() protoreflect.MessageDescriptor { + return md_CommunityPoolSpendProposalWithDeposit +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Type() protoreflect.MessageType { + return _fastReflection_CommunityPoolSpendProposalWithDeposit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) New() protoreflect.Message { + return new(fastReflection_CommunityPoolSpendProposalWithDeposit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Interface() protoreflect.ProtoMessage { + return (*CommunityPoolSpendProposalWithDeposit)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_CommunityPoolSpendProposalWithDeposit_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_CommunityPoolSpendProposalWithDeposit_description, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_CommunityPoolSpendProposalWithDeposit_recipient, value) { + return + } + } + if x.Amount != "" { + value := protoreflect.ValueOfString(x.Amount) + if !f(fd_CommunityPoolSpendProposalWithDeposit_amount, value) { + return + } + } + if x.Deposit != "" { + value := protoreflect.ValueOfString(x.Deposit) + if !f(fd_CommunityPoolSpendProposalWithDeposit_deposit, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": + return x.Title != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": + return x.Description != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": + return x.Recipient != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": + return x.Amount != "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": + return x.Deposit != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": + x.Title = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": + x.Description = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": + x.Recipient = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": + x.Amount = "" + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": + x.Deposit = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": + value := x.Amount + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": + value := x.Deposit + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": + x.Title = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": + x.Description = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": + x.Recipient = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": + x.Amount = value.Interface().(string) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": + x.Deposit = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": + panic(fmt.Errorf("field title of message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": + panic(fmt.Errorf("field description of message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": + panic(fmt.Errorf("field recipient of message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": + panic(fmt.Errorf("field amount of message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": + panic(fmt.Errorf("field deposit of message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.title": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.description": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.recipient": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.amount": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deposit": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CommunityPoolSpendProposalWithDeposit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CommunityPoolSpendProposalWithDeposit) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Amount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Deposit) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CommunityPoolSpendProposalWithDeposit) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Deposit) > 0 { + i -= len(x.Deposit) + copy(dAtA[i:], x.Deposit) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Deposit))) + i-- + dAtA[i] = 0x2a + } + if len(x.Amount) > 0 { + i -= len(x.Amount) + copy(dAtA[i:], x.Amount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + i-- + dAtA[i] = 0x22 + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CommunityPoolSpendProposalWithDeposit) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Deposit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: manifest/distribution/v1beta1/distribution.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Params defines the set of params for the distribution module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommunityTax string `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3" json:"community_tax,omitempty"` + // Deprecated: The base_proposer_reward field is deprecated and is no longer used + // in the x/distribution module's reward mechanism. + // + // Deprecated: Do not use. + BaseProposerReward string `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3" json:"base_proposer_reward,omitempty"` + // Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + // in the x/distribution module's reward mechanism. + // + // Deprecated: Do not use. + BonusProposerReward string `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3" json:"bonus_proposer_reward,omitempty"` + WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetCommunityTax() string { + if x != nil { + return x.CommunityTax + } + return "" +} + +// Deprecated: Do not use. +func (x *Params) GetBaseProposerReward() string { + if x != nil { + return x.BaseProposerReward + } + return "" +} + +// Deprecated: Do not use. +func (x *Params) GetBonusProposerReward() string { + if x != nil { + return x.BonusProposerReward + } + return "" +} + +func (x *Params) GetWithdrawAddrEnabled() bool { + if x != nil { + return x.WithdrawAddrEnabled + } + return false +} + +// ValidatorHistoricalRewards represents historical rewards for a validator. +// Height is implicit within the store key. +// Cumulative reward ratio is the sum from the zeroeth period +// until this period of rewards / tokens, per the spec. +// The reference count indicates the number of objects +// which might need to reference this historical entry at any point. +// ReferenceCount = +// +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization +type ValidatorHistoricalRewards struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CumulativeRewardRatio []*types.DecCoin `protobuf:"bytes,1,rep,name=cumulative_reward_ratio,json=cumulativeRewardRatio,proto3" json:"cumulative_reward_ratio,omitempty"` + ReferenceCount uint32 `protobuf:"varint,2,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty"` +} + +func (x *ValidatorHistoricalRewards) Reset() { + *x = ValidatorHistoricalRewards{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorHistoricalRewards) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorHistoricalRewards) ProtoMessage() {} + +// Deprecated: Use ValidatorHistoricalRewards.ProtoReflect.Descriptor instead. +func (*ValidatorHistoricalRewards) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{1} +} + +func (x *ValidatorHistoricalRewards) GetCumulativeRewardRatio() []*types.DecCoin { + if x != nil { + return x.CumulativeRewardRatio + } + return nil +} + +func (x *ValidatorHistoricalRewards) GetReferenceCount() uint32 { + if x != nil { + return x.ReferenceCount + } + return 0 +} + +// ValidatorCurrentRewards represents current rewards and current +// period for a validator kept as a running counter and incremented +// each block as long as the validator's tokens remain constant. +type ValidatorCurrentRewards struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rewards []*types.DecCoin `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` + Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` +} + +func (x *ValidatorCurrentRewards) Reset() { + *x = ValidatorCurrentRewards{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorCurrentRewards) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorCurrentRewards) ProtoMessage() {} + +// Deprecated: Use ValidatorCurrentRewards.ProtoReflect.Descriptor instead. +func (*ValidatorCurrentRewards) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{2} +} + +func (x *ValidatorCurrentRewards) GetRewards() []*types.DecCoin { + if x != nil { + return x.Rewards + } + return nil +} + +func (x *ValidatorCurrentRewards) GetPeriod() uint64 { + if x != nil { + return x.Period + } + return 0 +} + +// ValidatorAccumulatedCommission represents accumulated commission +// for a validator kept as a running counter, can be withdrawn at any time. +type ValidatorAccumulatedCommission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commission []*types.DecCoin `protobuf:"bytes,1,rep,name=commission,proto3" json:"commission,omitempty"` +} + +func (x *ValidatorAccumulatedCommission) Reset() { + *x = ValidatorAccumulatedCommission{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorAccumulatedCommission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorAccumulatedCommission) ProtoMessage() {} + +// Deprecated: Use ValidatorAccumulatedCommission.ProtoReflect.Descriptor instead. +func (*ValidatorAccumulatedCommission) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{3} +} + +func (x *ValidatorAccumulatedCommission) GetCommission() []*types.DecCoin { + if x != nil { + return x.Commission + } + return nil +} + +// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +// for a validator inexpensive to track, allows simple sanity checks. +type ValidatorOutstandingRewards struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rewards []*types.DecCoin `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` +} + +func (x *ValidatorOutstandingRewards) Reset() { + *x = ValidatorOutstandingRewards{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorOutstandingRewards) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorOutstandingRewards) ProtoMessage() {} + +// Deprecated: Use ValidatorOutstandingRewards.ProtoReflect.Descriptor instead. +func (*ValidatorOutstandingRewards) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{4} +} + +func (x *ValidatorOutstandingRewards) GetRewards() []*types.DecCoin { + if x != nil { + return x.Rewards + } + return nil +} + +// ValidatorSlashEvent represents a validator slash event. +// Height is implicit within the store key. +// This is needed to calculate appropriate amount of staking tokens +// for delegations which are withdrawn after a slash has occurred. +type ValidatorSlashEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorPeriod uint64 `protobuf:"varint,1,opt,name=validator_period,json=validatorPeriod,proto3" json:"validator_period,omitempty"` + Fraction string `protobuf:"bytes,2,opt,name=fraction,proto3" json:"fraction,omitempty"` +} + +func (x *ValidatorSlashEvent) Reset() { + *x = ValidatorSlashEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorSlashEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorSlashEvent) ProtoMessage() {} + +// Deprecated: Use ValidatorSlashEvent.ProtoReflect.Descriptor instead. +func (*ValidatorSlashEvent) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{5} +} + +func (x *ValidatorSlashEvent) GetValidatorPeriod() uint64 { + if x != nil { + return x.ValidatorPeriod + } + return 0 +} + +func (x *ValidatorSlashEvent) GetFraction() string { + if x != nil { + return x.Fraction + } + return "" +} + +// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +type ValidatorSlashEvents struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorSlashEvents []*ValidatorSlashEvent `protobuf:"bytes,1,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events,omitempty"` +} + +func (x *ValidatorSlashEvents) Reset() { + *x = ValidatorSlashEvents{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorSlashEvents) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorSlashEvents) ProtoMessage() {} + +// Deprecated: Use ValidatorSlashEvents.ProtoReflect.Descriptor instead. +func (*ValidatorSlashEvents) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{6} +} + +func (x *ValidatorSlashEvents) GetValidatorSlashEvents() []*ValidatorSlashEvent { + if x != nil { + return x.ValidatorSlashEvents + } + return nil +} + +// FeePool is the global fee pool for distribution. +type FeePool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommunityPool []*types.DecCoin `protobuf:"bytes,1,rep,name=community_pool,json=communityPool,proto3" json:"community_pool,omitempty"` +} + +func (x *FeePool) Reset() { + *x = FeePool{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeePool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeePool) ProtoMessage() {} + +// Deprecated: Use FeePool.ProtoReflect.Descriptor instead. +func (*FeePool) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{7} +} + +func (x *FeePool) GetCommunityPool() []*types.DecCoin { + if x != nil { + return x.CommunityPool + } + return nil +} + +// CommunityPoolSpendProposal details a proposal for use of community funds, +// together with how many coins are proposed to be spent, and to which +// recipient account. +// +// Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no +// longer a need for an explicit CommunityPoolSpendProposal. To spend community +// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov +// module via a v1 governance proposal. +// +// Deprecated: Do not use. +type CommunityPoolSpendProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount []*types.Coin `protobuf:"bytes,4,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *CommunityPoolSpendProposal) Reset() { + *x = CommunityPoolSpendProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommunityPoolSpendProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommunityPoolSpendProposal) ProtoMessage() {} + +// Deprecated: Use CommunityPoolSpendProposal.ProtoReflect.Descriptor instead. +func (*CommunityPoolSpendProposal) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{8} +} + +func (x *CommunityPoolSpendProposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CommunityPoolSpendProposal) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CommunityPoolSpendProposal) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *CommunityPoolSpendProposal) GetAmount() []*types.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, +// thus sdk.Dec is used. +type DelegatorStartingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty"` + Stake string `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *DelegatorStartingInfo) Reset() { + *x = DelegatorStartingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DelegatorStartingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegatorStartingInfo) ProtoMessage() {} + +// Deprecated: Use DelegatorStartingInfo.ProtoReflect.Descriptor instead. +func (*DelegatorStartingInfo) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{9} +} + +func (x *DelegatorStartingInfo) GetPreviousPeriod() uint64 { + if x != nil { + return x.PreviousPeriod + } + return 0 +} + +func (x *DelegatorStartingInfo) GetStake() string { + if x != nil { + return x.Stake + } + return "" +} + +func (x *DelegatorStartingInfo) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} + +// DelegationDelegatorReward represents the properties +// of a delegator's delegation reward. +type DelegationDelegatorReward struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Reward []*types.DecCoin `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward,omitempty"` +} + +func (x *DelegationDelegatorReward) Reset() { + *x = DelegationDelegatorReward{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DelegationDelegatorReward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegationDelegatorReward) ProtoMessage() {} + +// Deprecated: Use DelegationDelegatorReward.ProtoReflect.Descriptor instead. +func (*DelegationDelegatorReward) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{10} +} + +func (x *DelegationDelegatorReward) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *DelegationDelegatorReward) GetReward() []*types.DecCoin { + if x != nil { + return x.Reward + } + return nil +} + +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit +type CommunityPoolSpendProposalWithDeposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (x *CommunityPoolSpendProposalWithDeposit) Reset() { + *x = CommunityPoolSpendProposalWithDeposit{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_distribution_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommunityPoolSpendProposalWithDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommunityPoolSpendProposalWithDeposit) ProtoMessage() {} + +// Deprecated: Use CommunityPoolSpendProposalWithDeposit.ProtoReflect.Descriptor instead. +func (*CommunityPoolSpendProposalWithDeposit) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP(), []int{11} +} + +func (x *CommunityPoolSpendProposalWithDeposit) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CommunityPoolSpendProposalWithDeposit) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CommunityPoolSpendProposalWithDeposit) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *CommunityPoolSpendProposalWithDeposit) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *CommunityPoolSpendProposalWithDeposit) GetDeposit() string { + if x != nil { + return x.Deposit + } + return "" +} + +var File_manifest_distribution_v1beta1_distribution_proto protoreflect.FileDescriptor + +var file_manifest_distribution_v1beta1_distribution_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1d, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x5b, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x61, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x61, 0x78, 0x12, 0x6a, 0x0a, + 0x14, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0x18, 0x01, 0xc8, + 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, + 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x62, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x6c, 0x0a, 0x15, 0x62, 0x6f, 0x6e, + 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0x18, 0x01, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x13, 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x41, 0x64, 0x64, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x25, 0x8a, 0xe7, 0xb0, + 0x2a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x17, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, + 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x15, 0x63, 0x75, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, + 0x69, 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x17, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x22, 0x98, 0x01, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8f, 0x01, 0x0a, + 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x07, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x8f, + 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, + 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x12, 0x4d, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, + 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x73, 0x0a, 0x16, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x88, + 0x01, 0x0a, 0x07, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x7d, 0x0a, 0x0e, 0x63, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x97, 0x02, 0x0a, 0x1a, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, + 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x28, 0x18, 0x01, 0x88, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x22, 0xd4, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x0a, + 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x4c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0xea, 0xde, 0x1f, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0xa2, 0xe7, 0xb0, 0x2a, 0x0f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xd3, + 0x01, 0x0a, 0x25, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, + 0x53, 0x70, 0x65, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x57, 0x69, 0x74, + 0x68, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x3a, 0x22, 0x88, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x42, 0xad, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x44, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, + 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, + 0x44, 0x58, 0xaa, 0x02, 0x1d, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x1d, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x29, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x1f, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_manifest_distribution_v1beta1_distribution_proto_rawDescOnce sync.Once + file_manifest_distribution_v1beta1_distribution_proto_rawDescData = file_manifest_distribution_v1beta1_distribution_proto_rawDesc +) + +func file_manifest_distribution_v1beta1_distribution_proto_rawDescGZIP() []byte { + file_manifest_distribution_v1beta1_distribution_proto_rawDescOnce.Do(func() { + file_manifest_distribution_v1beta1_distribution_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_distribution_v1beta1_distribution_proto_rawDescData) + }) + return file_manifest_distribution_v1beta1_distribution_proto_rawDescData +} + +var file_manifest_distribution_v1beta1_distribution_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_manifest_distribution_v1beta1_distribution_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: manifest.distribution.v1beta1.Params + (*ValidatorHistoricalRewards)(nil), // 1: manifest.distribution.v1beta1.ValidatorHistoricalRewards + (*ValidatorCurrentRewards)(nil), // 2: manifest.distribution.v1beta1.ValidatorCurrentRewards + (*ValidatorAccumulatedCommission)(nil), // 3: manifest.distribution.v1beta1.ValidatorAccumulatedCommission + (*ValidatorOutstandingRewards)(nil), // 4: manifest.distribution.v1beta1.ValidatorOutstandingRewards + (*ValidatorSlashEvent)(nil), // 5: manifest.distribution.v1beta1.ValidatorSlashEvent + (*ValidatorSlashEvents)(nil), // 6: manifest.distribution.v1beta1.ValidatorSlashEvents + (*FeePool)(nil), // 7: manifest.distribution.v1beta1.FeePool + (*CommunityPoolSpendProposal)(nil), // 8: manifest.distribution.v1beta1.CommunityPoolSpendProposal + (*DelegatorStartingInfo)(nil), // 9: manifest.distribution.v1beta1.DelegatorStartingInfo + (*DelegationDelegatorReward)(nil), // 10: manifest.distribution.v1beta1.DelegationDelegatorReward + (*CommunityPoolSpendProposalWithDeposit)(nil), // 11: manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + (*types.DecCoin)(nil), // 12: cosmos.base.v1beta1.DecCoin + (*types.Coin)(nil), // 13: cosmos.base.v1beta1.Coin +} +var file_manifest_distribution_v1beta1_distribution_proto_depIdxs = []int32{ + 12, // 0: manifest.distribution.v1beta1.ValidatorHistoricalRewards.cumulative_reward_ratio:type_name -> cosmos.base.v1beta1.DecCoin + 12, // 1: manifest.distribution.v1beta1.ValidatorCurrentRewards.rewards:type_name -> cosmos.base.v1beta1.DecCoin + 12, // 2: manifest.distribution.v1beta1.ValidatorAccumulatedCommission.commission:type_name -> cosmos.base.v1beta1.DecCoin + 12, // 3: manifest.distribution.v1beta1.ValidatorOutstandingRewards.rewards:type_name -> cosmos.base.v1beta1.DecCoin + 5, // 4: manifest.distribution.v1beta1.ValidatorSlashEvents.validator_slash_events:type_name -> manifest.distribution.v1beta1.ValidatorSlashEvent + 12, // 5: manifest.distribution.v1beta1.FeePool.community_pool:type_name -> cosmos.base.v1beta1.DecCoin + 13, // 6: manifest.distribution.v1beta1.CommunityPoolSpendProposal.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 7: manifest.distribution.v1beta1.DelegationDelegatorReward.reward:type_name -> cosmos.base.v1beta1.DecCoin + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_manifest_distribution_v1beta1_distribution_proto_init() } +func file_manifest_distribution_v1beta1_distribution_proto_init() { + if File_manifest_distribution_v1beta1_distribution_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorHistoricalRewards); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorCurrentRewards); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorAccumulatedCommission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorOutstandingRewards); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorSlashEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorSlashEvents); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeePool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommunityPoolSpendProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelegatorStartingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelegationDelegatorReward); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_distribution_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommunityPoolSpendProposalWithDeposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_manifest_distribution_v1beta1_distribution_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_manifest_distribution_v1beta1_distribution_proto_goTypes, + DependencyIndexes: file_manifest_distribution_v1beta1_distribution_proto_depIdxs, + MessageInfos: file_manifest_distribution_v1beta1_distribution_proto_msgTypes, + }.Build() + File_manifest_distribution_v1beta1_distribution_proto = out.File + file_manifest_distribution_v1beta1_distribution_proto_rawDesc = nil + file_manifest_distribution_v1beta1_distribution_proto_goTypes = nil + file_manifest_distribution_v1beta1_distribution_proto_depIdxs = nil +} diff --git a/api/distribution/v1beta1/genesis.pulsar.go b/api/distribution/v1beta1/genesis.pulsar.go new file mode 100644 index 0000000..199b503 --- /dev/null +++ b/api/distribution/v1beta1/genesis.pulsar.go @@ -0,0 +1,6198 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package distributionv1beta1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + types "cosmossdk.io/api/cosmos/base/v1beta1" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_DelegatorWithdrawInfo protoreflect.MessageDescriptor + fd_DelegatorWithdrawInfo_delegator_address protoreflect.FieldDescriptor + fd_DelegatorWithdrawInfo_withdraw_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_DelegatorWithdrawInfo = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("DelegatorWithdrawInfo") + fd_DelegatorWithdrawInfo_delegator_address = md_DelegatorWithdrawInfo.Fields().ByName("delegator_address") + fd_DelegatorWithdrawInfo_withdraw_address = md_DelegatorWithdrawInfo.Fields().ByName("withdraw_address") +} + +var _ protoreflect.Message = (*fastReflection_DelegatorWithdrawInfo)(nil) + +type fastReflection_DelegatorWithdrawInfo DelegatorWithdrawInfo + +func (x *DelegatorWithdrawInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_DelegatorWithdrawInfo)(x) +} + +func (x *DelegatorWithdrawInfo) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DelegatorWithdrawInfo_messageType fastReflection_DelegatorWithdrawInfo_messageType +var _ protoreflect.MessageType = fastReflection_DelegatorWithdrawInfo_messageType{} + +type fastReflection_DelegatorWithdrawInfo_messageType struct{} + +func (x fastReflection_DelegatorWithdrawInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_DelegatorWithdrawInfo)(nil) +} +func (x fastReflection_DelegatorWithdrawInfo_messageType) New() protoreflect.Message { + return new(fastReflection_DelegatorWithdrawInfo) +} +func (x fastReflection_DelegatorWithdrawInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DelegatorWithdrawInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DelegatorWithdrawInfo) Descriptor() protoreflect.MessageDescriptor { + return md_DelegatorWithdrawInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DelegatorWithdrawInfo) Type() protoreflect.MessageType { + return _fastReflection_DelegatorWithdrawInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DelegatorWithdrawInfo) New() protoreflect.Message { + return new(fastReflection_DelegatorWithdrawInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DelegatorWithdrawInfo) Interface() protoreflect.ProtoMessage { + return (*DelegatorWithdrawInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DelegatorWithdrawInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_DelegatorWithdrawInfo_delegator_address, value) { + return + } + } + if x.WithdrawAddress != "" { + value := protoreflect.ValueOfString(x.WithdrawAddress) + if !f(fd_DelegatorWithdrawInfo_withdraw_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DelegatorWithdrawInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": + return x.DelegatorAddress != "" + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": + return x.WithdrawAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorWithdrawInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorWithdrawInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorWithdrawInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": + x.DelegatorAddress = "" + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": + x.WithdrawAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorWithdrawInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorWithdrawInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DelegatorWithdrawInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": + value := x.WithdrawAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorWithdrawInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorWithdrawInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorWithdrawInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": + x.DelegatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": + x.WithdrawAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorWithdrawInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorWithdrawInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorWithdrawInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.DelegatorWithdrawInfo is not mutable")) + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": + panic(fmt.Errorf("field withdraw_address of message manifest.distribution.v1beta1.DelegatorWithdrawInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorWithdrawInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorWithdrawInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DelegatorWithdrawInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.delegator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.DelegatorWithdrawInfo.withdraw_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorWithdrawInfo")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorWithdrawInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DelegatorWithdrawInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.DelegatorWithdrawInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DelegatorWithdrawInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorWithdrawInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DelegatorWithdrawInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DelegatorWithdrawInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DelegatorWithdrawInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.WithdrawAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DelegatorWithdrawInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.WithdrawAddress) > 0 { + i -= len(x.WithdrawAddress) + copy(dAtA[i:], x.WithdrawAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DelegatorWithdrawInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorWithdrawInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorWithdrawInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.WithdrawAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorOutstandingRewardsRecord_2_list)(nil) + +type _ValidatorOutstandingRewardsRecord_2_list struct { + list *[]*types.DecCoin +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorOutstandingRewardsRecord_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorOutstandingRewardsRecord protoreflect.MessageDescriptor + fd_ValidatorOutstandingRewardsRecord_validator_address protoreflect.FieldDescriptor + fd_ValidatorOutstandingRewardsRecord_outstanding_rewards protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_ValidatorOutstandingRewardsRecord = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorOutstandingRewardsRecord") + fd_ValidatorOutstandingRewardsRecord_validator_address = md_ValidatorOutstandingRewardsRecord.Fields().ByName("validator_address") + fd_ValidatorOutstandingRewardsRecord_outstanding_rewards = md_ValidatorOutstandingRewardsRecord.Fields().ByName("outstanding_rewards") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorOutstandingRewardsRecord)(nil) + +type fastReflection_ValidatorOutstandingRewardsRecord ValidatorOutstandingRewardsRecord + +func (x *ValidatorOutstandingRewardsRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorOutstandingRewardsRecord)(x) +} + +func (x *ValidatorOutstandingRewardsRecord) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorOutstandingRewardsRecord_messageType fastReflection_ValidatorOutstandingRewardsRecord_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorOutstandingRewardsRecord_messageType{} + +type fastReflection_ValidatorOutstandingRewardsRecord_messageType struct{} + +func (x fastReflection_ValidatorOutstandingRewardsRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorOutstandingRewardsRecord)(nil) +} +func (x fastReflection_ValidatorOutstandingRewardsRecord_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorOutstandingRewardsRecord) +} +func (x fastReflection_ValidatorOutstandingRewardsRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorOutstandingRewardsRecord +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorOutstandingRewardsRecord +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Type() protoreflect.MessageType { + return _fastReflection_ValidatorOutstandingRewardsRecord_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) New() protoreflect.Message { + return new(fastReflection_ValidatorOutstandingRewardsRecord) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Interface() protoreflect.ProtoMessage { + return (*ValidatorOutstandingRewardsRecord)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_ValidatorOutstandingRewardsRecord_validator_address, value) { + return + } + } + if len(x.OutstandingRewards) != 0 { + value := protoreflect.ValueOfList(&_ValidatorOutstandingRewardsRecord_2_list{list: &x.OutstandingRewards}) + if !f(fd_ValidatorOutstandingRewardsRecord_outstanding_rewards, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": + return len(x.OutstandingRewards) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": + x.OutstandingRewards = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": + if len(x.OutstandingRewards) == 0 { + return protoreflect.ValueOfList(&_ValidatorOutstandingRewardsRecord_2_list{}) + } + listValue := &_ValidatorOutstandingRewardsRecord_2_list{list: &x.OutstandingRewards} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": + lv := value.List() + clv := lv.(*_ValidatorOutstandingRewardsRecord_2_list) + x.OutstandingRewards = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": + if x.OutstandingRewards == nil { + x.OutstandingRewards = []*types.DecCoin{} + } + value := &_ValidatorOutstandingRewardsRecord_2_list{list: &x.OutstandingRewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_ValidatorOutstandingRewardsRecord_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorOutstandingRewardsRecord) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorOutstandingRewardsRecord) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.OutstandingRewards) > 0 { + for _, e := range x.OutstandingRewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorOutstandingRewardsRecord) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.OutstandingRewards) > 0 { + for iNdEx := len(x.OutstandingRewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OutstandingRewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorOutstandingRewardsRecord) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorOutstandingRewardsRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorOutstandingRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutstandingRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OutstandingRewards = append(x.OutstandingRewards, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutstandingRewards[len(x.OutstandingRewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ValidatorAccumulatedCommissionRecord protoreflect.MessageDescriptor + fd_ValidatorAccumulatedCommissionRecord_validator_address protoreflect.FieldDescriptor + fd_ValidatorAccumulatedCommissionRecord_accumulated protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_ValidatorAccumulatedCommissionRecord = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorAccumulatedCommissionRecord") + fd_ValidatorAccumulatedCommissionRecord_validator_address = md_ValidatorAccumulatedCommissionRecord.Fields().ByName("validator_address") + fd_ValidatorAccumulatedCommissionRecord_accumulated = md_ValidatorAccumulatedCommissionRecord.Fields().ByName("accumulated") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorAccumulatedCommissionRecord)(nil) + +type fastReflection_ValidatorAccumulatedCommissionRecord ValidatorAccumulatedCommissionRecord + +func (x *ValidatorAccumulatedCommissionRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorAccumulatedCommissionRecord)(x) +} + +func (x *ValidatorAccumulatedCommissionRecord) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorAccumulatedCommissionRecord_messageType fastReflection_ValidatorAccumulatedCommissionRecord_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorAccumulatedCommissionRecord_messageType{} + +type fastReflection_ValidatorAccumulatedCommissionRecord_messageType struct{} + +func (x fastReflection_ValidatorAccumulatedCommissionRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorAccumulatedCommissionRecord)(nil) +} +func (x fastReflection_ValidatorAccumulatedCommissionRecord_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorAccumulatedCommissionRecord) +} +func (x fastReflection_ValidatorAccumulatedCommissionRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorAccumulatedCommissionRecord +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorAccumulatedCommissionRecord +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Type() protoreflect.MessageType { + return _fastReflection_ValidatorAccumulatedCommissionRecord_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) New() protoreflect.Message { + return new(fastReflection_ValidatorAccumulatedCommissionRecord) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Interface() protoreflect.ProtoMessage { + return (*ValidatorAccumulatedCommissionRecord)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_ValidatorAccumulatedCommissionRecord_validator_address, value) { + return + } + } + if x.Accumulated != nil { + value := protoreflect.ValueOfMessage(x.Accumulated.ProtoReflect()) + if !f(fd_ValidatorAccumulatedCommissionRecord_accumulated, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": + return x.Accumulated != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": + x.Accumulated = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": + value := x.Accumulated + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": + x.Accumulated = value.Message().Interface().(*ValidatorAccumulatedCommission) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": + if x.Accumulated == nil { + x.Accumulated = new(ValidatorAccumulatedCommission) + } + return protoreflect.ValueOfMessage(x.Accumulated.ProtoReflect()) + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated": + m := new(ValidatorAccumulatedCommission) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorAccumulatedCommissionRecord) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorAccumulatedCommissionRecord) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Accumulated != nil { + l = options.Size(x.Accumulated) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorAccumulatedCommissionRecord) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Accumulated != nil { + encoded, err := options.Marshal(x.Accumulated) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorAccumulatedCommissionRecord) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorAccumulatedCommissionRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorAccumulatedCommissionRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Accumulated == nil { + x.Accumulated = &ValidatorAccumulatedCommission{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accumulated); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ValidatorHistoricalRewardsRecord protoreflect.MessageDescriptor + fd_ValidatorHistoricalRewardsRecord_validator_address protoreflect.FieldDescriptor + fd_ValidatorHistoricalRewardsRecord_period protoreflect.FieldDescriptor + fd_ValidatorHistoricalRewardsRecord_rewards protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_ValidatorHistoricalRewardsRecord = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorHistoricalRewardsRecord") + fd_ValidatorHistoricalRewardsRecord_validator_address = md_ValidatorHistoricalRewardsRecord.Fields().ByName("validator_address") + fd_ValidatorHistoricalRewardsRecord_period = md_ValidatorHistoricalRewardsRecord.Fields().ByName("period") + fd_ValidatorHistoricalRewardsRecord_rewards = md_ValidatorHistoricalRewardsRecord.Fields().ByName("rewards") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorHistoricalRewardsRecord)(nil) + +type fastReflection_ValidatorHistoricalRewardsRecord ValidatorHistoricalRewardsRecord + +func (x *ValidatorHistoricalRewardsRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorHistoricalRewardsRecord)(x) +} + +func (x *ValidatorHistoricalRewardsRecord) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorHistoricalRewardsRecord_messageType fastReflection_ValidatorHistoricalRewardsRecord_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorHistoricalRewardsRecord_messageType{} + +type fastReflection_ValidatorHistoricalRewardsRecord_messageType struct{} + +func (x fastReflection_ValidatorHistoricalRewardsRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorHistoricalRewardsRecord)(nil) +} +func (x fastReflection_ValidatorHistoricalRewardsRecord_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorHistoricalRewardsRecord) +} +func (x fastReflection_ValidatorHistoricalRewardsRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorHistoricalRewardsRecord +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorHistoricalRewardsRecord +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Type() protoreflect.MessageType { + return _fastReflection_ValidatorHistoricalRewardsRecord_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) New() protoreflect.Message { + return new(fastReflection_ValidatorHistoricalRewardsRecord) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Interface() protoreflect.ProtoMessage { + return (*ValidatorHistoricalRewardsRecord)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_ValidatorHistoricalRewardsRecord_validator_address, value) { + return + } + } + if x.Period != uint64(0) { + value := protoreflect.ValueOfUint64(x.Period) + if !f(fd_ValidatorHistoricalRewardsRecord_period, value) { + return + } + } + if x.Rewards != nil { + value := protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) + if !f(fd_ValidatorHistoricalRewardsRecord_rewards, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": + return x.Period != uint64(0) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": + return x.Rewards != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": + x.Period = uint64(0) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": + x.Rewards = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": + value := x.Period + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": + value := x.Rewards + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": + x.Period = value.Uint() + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": + x.Rewards = value.Message().Interface().(*ValidatorHistoricalRewards) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": + if x.Rewards == nil { + x.Rewards = new(ValidatorHistoricalRewards) + } + return protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord is not mutable")) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": + panic(fmt.Errorf("field period of message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.period": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards": + m := new(ValidatorHistoricalRewards) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorHistoricalRewardsRecord) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorHistoricalRewardsRecord) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Period != 0 { + n += 1 + runtime.Sov(uint64(x.Period)) + } + if x.Rewards != nil { + l = options.Size(x.Rewards) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorHistoricalRewardsRecord) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Rewards != nil { + encoded, err := options.Marshal(x.Rewards) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Period != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + i-- + dAtA[i] = 0x10 + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorHistoricalRewardsRecord) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorHistoricalRewardsRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorHistoricalRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + x.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Period |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Rewards == nil { + x.Rewards = &ValidatorHistoricalRewards{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ValidatorCurrentRewardsRecord protoreflect.MessageDescriptor + fd_ValidatorCurrentRewardsRecord_validator_address protoreflect.FieldDescriptor + fd_ValidatorCurrentRewardsRecord_rewards protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_ValidatorCurrentRewardsRecord = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorCurrentRewardsRecord") + fd_ValidatorCurrentRewardsRecord_validator_address = md_ValidatorCurrentRewardsRecord.Fields().ByName("validator_address") + fd_ValidatorCurrentRewardsRecord_rewards = md_ValidatorCurrentRewardsRecord.Fields().ByName("rewards") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorCurrentRewardsRecord)(nil) + +type fastReflection_ValidatorCurrentRewardsRecord ValidatorCurrentRewardsRecord + +func (x *ValidatorCurrentRewardsRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorCurrentRewardsRecord)(x) +} + +func (x *ValidatorCurrentRewardsRecord) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorCurrentRewardsRecord_messageType fastReflection_ValidatorCurrentRewardsRecord_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorCurrentRewardsRecord_messageType{} + +type fastReflection_ValidatorCurrentRewardsRecord_messageType struct{} + +func (x fastReflection_ValidatorCurrentRewardsRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorCurrentRewardsRecord)(nil) +} +func (x fastReflection_ValidatorCurrentRewardsRecord_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorCurrentRewardsRecord) +} +func (x fastReflection_ValidatorCurrentRewardsRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorCurrentRewardsRecord +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorCurrentRewardsRecord +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Type() protoreflect.MessageType { + return _fastReflection_ValidatorCurrentRewardsRecord_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorCurrentRewardsRecord) New() protoreflect.Message { + return new(fastReflection_ValidatorCurrentRewardsRecord) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Interface() protoreflect.ProtoMessage { + return (*ValidatorCurrentRewardsRecord)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_ValidatorCurrentRewardsRecord_validator_address, value) { + return + } + } + if x.Rewards != nil { + value := protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) + if !f(fd_ValidatorCurrentRewardsRecord_rewards, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": + return x.Rewards != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": + x.Rewards = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": + value := x.Rewards + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": + x.Rewards = value.Message().Interface().(*ValidatorCurrentRewards) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewardsRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": + if x.Rewards == nil { + x.Rewards = new(ValidatorCurrentRewards) + } + return protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorCurrentRewardsRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards": + m := new(ValidatorCurrentRewards) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorCurrentRewardsRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorCurrentRewardsRecord) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorCurrentRewardsRecord) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorCurrentRewardsRecord) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorCurrentRewardsRecord) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorCurrentRewardsRecord) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Rewards != nil { + l = options.Size(x.Rewards) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorCurrentRewardsRecord) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Rewards != nil { + encoded, err := options.Marshal(x.Rewards) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorCurrentRewardsRecord) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorCurrentRewardsRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorCurrentRewardsRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Rewards == nil { + x.Rewards = &ValidatorCurrentRewards{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_DelegatorStartingInfoRecord protoreflect.MessageDescriptor + fd_DelegatorStartingInfoRecord_delegator_address protoreflect.FieldDescriptor + fd_DelegatorStartingInfoRecord_validator_address protoreflect.FieldDescriptor + fd_DelegatorStartingInfoRecord_starting_info protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_DelegatorStartingInfoRecord = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("DelegatorStartingInfoRecord") + fd_DelegatorStartingInfoRecord_delegator_address = md_DelegatorStartingInfoRecord.Fields().ByName("delegator_address") + fd_DelegatorStartingInfoRecord_validator_address = md_DelegatorStartingInfoRecord.Fields().ByName("validator_address") + fd_DelegatorStartingInfoRecord_starting_info = md_DelegatorStartingInfoRecord.Fields().ByName("starting_info") +} + +var _ protoreflect.Message = (*fastReflection_DelegatorStartingInfoRecord)(nil) + +type fastReflection_DelegatorStartingInfoRecord DelegatorStartingInfoRecord + +func (x *DelegatorStartingInfoRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_DelegatorStartingInfoRecord)(x) +} + +func (x *DelegatorStartingInfoRecord) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DelegatorStartingInfoRecord_messageType fastReflection_DelegatorStartingInfoRecord_messageType +var _ protoreflect.MessageType = fastReflection_DelegatorStartingInfoRecord_messageType{} + +type fastReflection_DelegatorStartingInfoRecord_messageType struct{} + +func (x fastReflection_DelegatorStartingInfoRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_DelegatorStartingInfoRecord)(nil) +} +func (x fastReflection_DelegatorStartingInfoRecord_messageType) New() protoreflect.Message { + return new(fastReflection_DelegatorStartingInfoRecord) +} +func (x fastReflection_DelegatorStartingInfoRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DelegatorStartingInfoRecord +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DelegatorStartingInfoRecord) Descriptor() protoreflect.MessageDescriptor { + return md_DelegatorStartingInfoRecord +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DelegatorStartingInfoRecord) Type() protoreflect.MessageType { + return _fastReflection_DelegatorStartingInfoRecord_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DelegatorStartingInfoRecord) New() protoreflect.Message { + return new(fastReflection_DelegatorStartingInfoRecord) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DelegatorStartingInfoRecord) Interface() protoreflect.ProtoMessage { + return (*DelegatorStartingInfoRecord)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DelegatorStartingInfoRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_DelegatorStartingInfoRecord_delegator_address, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_DelegatorStartingInfoRecord_validator_address, value) { + return + } + } + if x.StartingInfo != nil { + value := protoreflect.ValueOfMessage(x.StartingInfo.ProtoReflect()) + if !f(fd_DelegatorStartingInfoRecord_starting_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DelegatorStartingInfoRecord) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": + return x.DelegatorAddress != "" + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": + return x.StartingInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfoRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfoRecord does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfoRecord) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": + x.DelegatorAddress = "" + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": + x.StartingInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfoRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfoRecord does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DelegatorStartingInfoRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": + value := x.StartingInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfoRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfoRecord does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfoRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": + x.DelegatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": + x.StartingInfo = value.Message().Interface().(*DelegatorStartingInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfoRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfoRecord does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfoRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": + if x.StartingInfo == nil { + x.StartingInfo = new(DelegatorStartingInfo) + } + return protoreflect.ValueOfMessage(x.StartingInfo.ProtoReflect()) + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.DelegatorStartingInfoRecord is not mutable")) + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.DelegatorStartingInfoRecord is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfoRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfoRecord does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DelegatorStartingInfoRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.delegator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info": + m := new(DelegatorStartingInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.DelegatorStartingInfoRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.DelegatorStartingInfoRecord does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DelegatorStartingInfoRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.DelegatorStartingInfoRecord", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DelegatorStartingInfoRecord) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DelegatorStartingInfoRecord) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DelegatorStartingInfoRecord) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DelegatorStartingInfoRecord) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DelegatorStartingInfoRecord) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartingInfo != nil { + l = options.Size(x.StartingInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DelegatorStartingInfoRecord) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.StartingInfo != nil { + encoded, err := options.Marshal(x.StartingInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DelegatorStartingInfoRecord) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorStartingInfoRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorStartingInfoRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartingInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.StartingInfo == nil { + x.StartingInfo = &DelegatorStartingInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartingInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ValidatorSlashEventRecord protoreflect.MessageDescriptor + fd_ValidatorSlashEventRecord_validator_address protoreflect.FieldDescriptor + fd_ValidatorSlashEventRecord_height protoreflect.FieldDescriptor + fd_ValidatorSlashEventRecord_period protoreflect.FieldDescriptor + fd_ValidatorSlashEventRecord_validator_slash_event protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_ValidatorSlashEventRecord = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("ValidatorSlashEventRecord") + fd_ValidatorSlashEventRecord_validator_address = md_ValidatorSlashEventRecord.Fields().ByName("validator_address") + fd_ValidatorSlashEventRecord_height = md_ValidatorSlashEventRecord.Fields().ByName("height") + fd_ValidatorSlashEventRecord_period = md_ValidatorSlashEventRecord.Fields().ByName("period") + fd_ValidatorSlashEventRecord_validator_slash_event = md_ValidatorSlashEventRecord.Fields().ByName("validator_slash_event") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorSlashEventRecord)(nil) + +type fastReflection_ValidatorSlashEventRecord ValidatorSlashEventRecord + +func (x *ValidatorSlashEventRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorSlashEventRecord)(x) +} + +func (x *ValidatorSlashEventRecord) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ValidatorSlashEventRecord_messageType fastReflection_ValidatorSlashEventRecord_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorSlashEventRecord_messageType{} + +type fastReflection_ValidatorSlashEventRecord_messageType struct{} + +func (x fastReflection_ValidatorSlashEventRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorSlashEventRecord)(nil) +} +func (x fastReflection_ValidatorSlashEventRecord_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorSlashEventRecord) +} +func (x fastReflection_ValidatorSlashEventRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSlashEventRecord +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorSlashEventRecord) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorSlashEventRecord +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorSlashEventRecord) Type() protoreflect.MessageType { + return _fastReflection_ValidatorSlashEventRecord_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorSlashEventRecord) New() protoreflect.Message { + return new(fastReflection_ValidatorSlashEventRecord) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorSlashEventRecord) Interface() protoreflect.ProtoMessage { + return (*ValidatorSlashEventRecord)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorSlashEventRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_ValidatorSlashEventRecord_validator_address, value) { + return + } + } + if x.Height != uint64(0) { + value := protoreflect.ValueOfUint64(x.Height) + if !f(fd_ValidatorSlashEventRecord_height, value) { + return + } + } + if x.Period != uint64(0) { + value := protoreflect.ValueOfUint64(x.Period) + if !f(fd_ValidatorSlashEventRecord_period, value) { + return + } + } + if x.ValidatorSlashEvent != nil { + value := protoreflect.ValueOfMessage(x.ValidatorSlashEvent.ProtoReflect()) + if !f(fd_ValidatorSlashEventRecord_validator_slash_event, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorSlashEventRecord) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.height": + return x.Height != uint64(0) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.period": + return x.Period != uint64(0) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": + return x.ValidatorSlashEvent != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEventRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEventRecord does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEventRecord) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.height": + x.Height = uint64(0) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.period": + x.Period = uint64(0) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": + x.ValidatorSlashEvent = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEventRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEventRecord does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorSlashEventRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.height": + value := x.Height + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.period": + value := x.Period + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": + value := x.ValidatorSlashEvent + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEventRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEventRecord does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEventRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.height": + x.Height = value.Uint() + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.period": + x.Period = value.Uint() + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": + x.ValidatorSlashEvent = value.Message().Interface().(*ValidatorSlashEvent) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEventRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEventRecord does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEventRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": + if x.ValidatorSlashEvent == nil { + x.ValidatorSlashEvent = new(ValidatorSlashEvent) + } + return protoreflect.ValueOfMessage(x.ValidatorSlashEvent.ProtoReflect()) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.ValidatorSlashEventRecord is not mutable")) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.height": + panic(fmt.Errorf("field height of message manifest.distribution.v1beta1.ValidatorSlashEventRecord is not mutable")) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.period": + panic(fmt.Errorf("field period of message manifest.distribution.v1beta1.ValidatorSlashEventRecord is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEventRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEventRecord does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorSlashEventRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.height": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.period": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event": + m := new(ValidatorSlashEvent) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.ValidatorSlashEventRecord")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.ValidatorSlashEventRecord does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorSlashEventRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.ValidatorSlashEventRecord", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorSlashEventRecord) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorSlashEventRecord) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorSlashEventRecord) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorSlashEventRecord) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorSlashEventRecord) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != 0 { + n += 1 + runtime.Sov(uint64(x.Height)) + } + if x.Period != 0 { + n += 1 + runtime.Sov(uint64(x.Period)) + } + if x.ValidatorSlashEvent != nil { + l = options.Size(x.ValidatorSlashEvent) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ValidatorSlashEventRecord) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ValidatorSlashEvent != nil { + encoded, err := options.Marshal(x.ValidatorSlashEvent) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if x.Period != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Period)) + i-- + dAtA[i] = 0x18 + } + if x.Height != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) + i-- + dAtA[i] = 0x10 + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ValidatorSlashEventRecord) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEventRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSlashEventRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + x.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + x.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Period |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ValidatorSlashEvent == nil { + x.ValidatorSlashEvent = &ValidatorSlashEvent{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSlashEvent); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*DelegatorWithdrawInfo +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DelegatorWithdrawInfo) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DelegatorWithdrawInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(DelegatorWithdrawInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(DelegatorWithdrawInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_5_list)(nil) + +type _GenesisState_5_list struct { + list *[]*ValidatorOutstandingRewardsRecord +} + +func (x *_GenesisState_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorOutstandingRewardsRecord) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorOutstandingRewardsRecord) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { + v := new(ValidatorOutstandingRewardsRecord) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_5_list) NewElement() protoreflect.Value { + v := new(ValidatorOutstandingRewardsRecord) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_6_list)(nil) + +type _GenesisState_6_list struct { + list *[]*ValidatorAccumulatedCommissionRecord +} + +func (x *_GenesisState_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorAccumulatedCommissionRecord) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorAccumulatedCommissionRecord) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { + v := new(ValidatorAccumulatedCommissionRecord) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_6_list) NewElement() protoreflect.Value { + v := new(ValidatorAccumulatedCommissionRecord) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_7_list)(nil) + +type _GenesisState_7_list struct { + list *[]*ValidatorHistoricalRewardsRecord +} + +func (x *_GenesisState_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorHistoricalRewardsRecord) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorHistoricalRewardsRecord) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { + v := new(ValidatorHistoricalRewardsRecord) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_7_list) NewElement() protoreflect.Value { + v := new(ValidatorHistoricalRewardsRecord) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_8_list)(nil) + +type _GenesisState_8_list struct { + list *[]*ValidatorCurrentRewardsRecord +} + +func (x *_GenesisState_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorCurrentRewardsRecord) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorCurrentRewardsRecord) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_8_list) AppendMutable() protoreflect.Value { + v := new(ValidatorCurrentRewardsRecord) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_8_list) NewElement() protoreflect.Value { + v := new(ValidatorCurrentRewardsRecord) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_8_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_9_list)(nil) + +type _GenesisState_9_list struct { + list *[]*DelegatorStartingInfoRecord +} + +func (x *_GenesisState_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DelegatorStartingInfoRecord) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DelegatorStartingInfoRecord) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_9_list) AppendMutable() protoreflect.Value { + v := new(DelegatorStartingInfoRecord) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_9_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_9_list) NewElement() protoreflect.Value { + v := new(DelegatorStartingInfoRecord) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_9_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_10_list)(nil) + +type _GenesisState_10_list struct { + list *[]*ValidatorSlashEventRecord +} + +func (x *_GenesisState_10_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_10_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_10_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEventRecord) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_10_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEventRecord) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_10_list) AppendMutable() protoreflect.Value { + v := new(ValidatorSlashEventRecord) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_10_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_10_list) NewElement() protoreflect.Value { + v := new(ValidatorSlashEventRecord) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_10_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_fee_pool protoreflect.FieldDescriptor + fd_GenesisState_delegator_withdraw_infos protoreflect.FieldDescriptor + fd_GenesisState_previous_proposer protoreflect.FieldDescriptor + fd_GenesisState_outstanding_rewards protoreflect.FieldDescriptor + fd_GenesisState_validator_accumulated_commissions protoreflect.FieldDescriptor + fd_GenesisState_validator_historical_rewards protoreflect.FieldDescriptor + fd_GenesisState_validator_current_rewards protoreflect.FieldDescriptor + fd_GenesisState_delegator_starting_infos protoreflect.FieldDescriptor + fd_GenesisState_validator_slash_events protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_genesis_proto_init() + md_GenesisState = File_manifest_distribution_v1beta1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_fee_pool = md_GenesisState.Fields().ByName("fee_pool") + fd_GenesisState_delegator_withdraw_infos = md_GenesisState.Fields().ByName("delegator_withdraw_infos") + fd_GenesisState_previous_proposer = md_GenesisState.Fields().ByName("previous_proposer") + fd_GenesisState_outstanding_rewards = md_GenesisState.Fields().ByName("outstanding_rewards") + fd_GenesisState_validator_accumulated_commissions = md_GenesisState.Fields().ByName("validator_accumulated_commissions") + fd_GenesisState_validator_historical_rewards = md_GenesisState.Fields().ByName("validator_historical_rewards") + fd_GenesisState_validator_current_rewards = md_GenesisState.Fields().ByName("validator_current_rewards") + fd_GenesisState_delegator_starting_infos = md_GenesisState.Fields().ByName("delegator_starting_infos") + fd_GenesisState_validator_slash_events = md_GenesisState.Fields().ByName("validator_slash_events") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } + if x.FeePool != nil { + value := protoreflect.ValueOfMessage(x.FeePool.ProtoReflect()) + if !f(fd_GenesisState_fee_pool, value) { + return + } + } + if len(x.DelegatorWithdrawInfos) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.DelegatorWithdrawInfos}) + if !f(fd_GenesisState_delegator_withdraw_infos, value) { + return + } + } + if x.PreviousProposer != "" { + value := protoreflect.ValueOfString(x.PreviousProposer) + if !f(fd_GenesisState_previous_proposer, value) { + return + } + } + if len(x.OutstandingRewards) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.OutstandingRewards}) + if !f(fd_GenesisState_outstanding_rewards, value) { + return + } + } + if len(x.ValidatorAccumulatedCommissions) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.ValidatorAccumulatedCommissions}) + if !f(fd_GenesisState_validator_accumulated_commissions, value) { + return + } + } + if len(x.ValidatorHistoricalRewards) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.ValidatorHistoricalRewards}) + if !f(fd_GenesisState_validator_historical_rewards, value) { + return + } + } + if len(x.ValidatorCurrentRewards) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_8_list{list: &x.ValidatorCurrentRewards}) + if !f(fd_GenesisState_validator_current_rewards, value) { + return + } + } + if len(x.DelegatorStartingInfos) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_9_list{list: &x.DelegatorStartingInfos}) + if !f(fd_GenesisState_delegator_starting_infos, value) { + return + } + } + if len(x.ValidatorSlashEvents) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_10_list{list: &x.ValidatorSlashEvents}) + if !f(fd_GenesisState_validator_slash_events, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.GenesisState.params": + return x.Params != nil + case "manifest.distribution.v1beta1.GenesisState.fee_pool": + return x.FeePool != nil + case "manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos": + return len(x.DelegatorWithdrawInfos) != 0 + case "manifest.distribution.v1beta1.GenesisState.previous_proposer": + return x.PreviousProposer != "" + case "manifest.distribution.v1beta1.GenesisState.outstanding_rewards": + return len(x.OutstandingRewards) != 0 + case "manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions": + return len(x.ValidatorAccumulatedCommissions) != 0 + case "manifest.distribution.v1beta1.GenesisState.validator_historical_rewards": + return len(x.ValidatorHistoricalRewards) != 0 + case "manifest.distribution.v1beta1.GenesisState.validator_current_rewards": + return len(x.ValidatorCurrentRewards) != 0 + case "manifest.distribution.v1beta1.GenesisState.delegator_starting_infos": + return len(x.DelegatorStartingInfos) != 0 + case "manifest.distribution.v1beta1.GenesisState.validator_slash_events": + return len(x.ValidatorSlashEvents) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.GenesisState.params": + x.Params = nil + case "manifest.distribution.v1beta1.GenesisState.fee_pool": + x.FeePool = nil + case "manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos": + x.DelegatorWithdrawInfos = nil + case "manifest.distribution.v1beta1.GenesisState.previous_proposer": + x.PreviousProposer = "" + case "manifest.distribution.v1beta1.GenesisState.outstanding_rewards": + x.OutstandingRewards = nil + case "manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions": + x.ValidatorAccumulatedCommissions = nil + case "manifest.distribution.v1beta1.GenesisState.validator_historical_rewards": + x.ValidatorHistoricalRewards = nil + case "manifest.distribution.v1beta1.GenesisState.validator_current_rewards": + x.ValidatorCurrentRewards = nil + case "manifest.distribution.v1beta1.GenesisState.delegator_starting_infos": + x.DelegatorStartingInfos = nil + case "manifest.distribution.v1beta1.GenesisState.validator_slash_events": + x.ValidatorSlashEvents = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "manifest.distribution.v1beta1.GenesisState.fee_pool": + value := x.FeePool + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos": + if len(x.DelegatorWithdrawInfos) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.DelegatorWithdrawInfos} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.GenesisState.previous_proposer": + value := x.PreviousProposer + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.GenesisState.outstanding_rewards": + if len(x.OutstandingRewards) == 0 { + return protoreflect.ValueOfList(&_GenesisState_5_list{}) + } + listValue := &_GenesisState_5_list{list: &x.OutstandingRewards} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions": + if len(x.ValidatorAccumulatedCommissions) == 0 { + return protoreflect.ValueOfList(&_GenesisState_6_list{}) + } + listValue := &_GenesisState_6_list{list: &x.ValidatorAccumulatedCommissions} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.GenesisState.validator_historical_rewards": + if len(x.ValidatorHistoricalRewards) == 0 { + return protoreflect.ValueOfList(&_GenesisState_7_list{}) + } + listValue := &_GenesisState_7_list{list: &x.ValidatorHistoricalRewards} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.GenesisState.validator_current_rewards": + if len(x.ValidatorCurrentRewards) == 0 { + return protoreflect.ValueOfList(&_GenesisState_8_list{}) + } + listValue := &_GenesisState_8_list{list: &x.ValidatorCurrentRewards} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.GenesisState.delegator_starting_infos": + if len(x.DelegatorStartingInfos) == 0 { + return protoreflect.ValueOfList(&_GenesisState_9_list{}) + } + listValue := &_GenesisState_9_list{list: &x.DelegatorStartingInfos} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.GenesisState.validator_slash_events": + if len(x.ValidatorSlashEvents) == 0 { + return protoreflect.ValueOfList(&_GenesisState_10_list{}) + } + listValue := &_GenesisState_10_list{list: &x.ValidatorSlashEvents} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "manifest.distribution.v1beta1.GenesisState.fee_pool": + x.FeePool = value.Message().Interface().(*FeePool) + case "manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.DelegatorWithdrawInfos = *clv.list + case "manifest.distribution.v1beta1.GenesisState.previous_proposer": + x.PreviousProposer = value.Interface().(string) + case "manifest.distribution.v1beta1.GenesisState.outstanding_rewards": + lv := value.List() + clv := lv.(*_GenesisState_5_list) + x.OutstandingRewards = *clv.list + case "manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions": + lv := value.List() + clv := lv.(*_GenesisState_6_list) + x.ValidatorAccumulatedCommissions = *clv.list + case "manifest.distribution.v1beta1.GenesisState.validator_historical_rewards": + lv := value.List() + clv := lv.(*_GenesisState_7_list) + x.ValidatorHistoricalRewards = *clv.list + case "manifest.distribution.v1beta1.GenesisState.validator_current_rewards": + lv := value.List() + clv := lv.(*_GenesisState_8_list) + x.ValidatorCurrentRewards = *clv.list + case "manifest.distribution.v1beta1.GenesisState.delegator_starting_infos": + lv := value.List() + clv := lv.(*_GenesisState_9_list) + x.DelegatorStartingInfos = *clv.list + case "manifest.distribution.v1beta1.GenesisState.validator_slash_events": + lv := value.List() + clv := lv.(*_GenesisState_10_list) + x.ValidatorSlashEvents = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "manifest.distribution.v1beta1.GenesisState.fee_pool": + if x.FeePool == nil { + x.FeePool = new(FeePool) + } + return protoreflect.ValueOfMessage(x.FeePool.ProtoReflect()) + case "manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos": + if x.DelegatorWithdrawInfos == nil { + x.DelegatorWithdrawInfos = []*DelegatorWithdrawInfo{} + } + value := &_GenesisState_3_list{list: &x.DelegatorWithdrawInfos} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.outstanding_rewards": + if x.OutstandingRewards == nil { + x.OutstandingRewards = []*ValidatorOutstandingRewardsRecord{} + } + value := &_GenesisState_5_list{list: &x.OutstandingRewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions": + if x.ValidatorAccumulatedCommissions == nil { + x.ValidatorAccumulatedCommissions = []*ValidatorAccumulatedCommissionRecord{} + } + value := &_GenesisState_6_list{list: &x.ValidatorAccumulatedCommissions} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.validator_historical_rewards": + if x.ValidatorHistoricalRewards == nil { + x.ValidatorHistoricalRewards = []*ValidatorHistoricalRewardsRecord{} + } + value := &_GenesisState_7_list{list: &x.ValidatorHistoricalRewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.validator_current_rewards": + if x.ValidatorCurrentRewards == nil { + x.ValidatorCurrentRewards = []*ValidatorCurrentRewardsRecord{} + } + value := &_GenesisState_8_list{list: &x.ValidatorCurrentRewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.delegator_starting_infos": + if x.DelegatorStartingInfos == nil { + x.DelegatorStartingInfos = []*DelegatorStartingInfoRecord{} + } + value := &_GenesisState_9_list{list: &x.DelegatorStartingInfos} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.validator_slash_events": + if x.ValidatorSlashEvents == nil { + x.ValidatorSlashEvents = []*ValidatorSlashEventRecord{} + } + value := &_GenesisState_10_list{list: &x.ValidatorSlashEvents} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.GenesisState.previous_proposer": + panic(fmt.Errorf("field previous_proposer of message manifest.distribution.v1beta1.GenesisState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "manifest.distribution.v1beta1.GenesisState.fee_pool": + m := new(FeePool) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos": + list := []*DelegatorWithdrawInfo{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "manifest.distribution.v1beta1.GenesisState.previous_proposer": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.GenesisState.outstanding_rewards": + list := []*ValidatorOutstandingRewardsRecord{} + return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + case "manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions": + list := []*ValidatorAccumulatedCommissionRecord{} + return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) + case "manifest.distribution.v1beta1.GenesisState.validator_historical_rewards": + list := []*ValidatorHistoricalRewardsRecord{} + return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) + case "manifest.distribution.v1beta1.GenesisState.validator_current_rewards": + list := []*ValidatorCurrentRewardsRecord{} + return protoreflect.ValueOfList(&_GenesisState_8_list{list: &list}) + case "manifest.distribution.v1beta1.GenesisState.delegator_starting_infos": + list := []*DelegatorStartingInfoRecord{} + return protoreflect.ValueOfList(&_GenesisState_9_list{list: &list}) + case "manifest.distribution.v1beta1.GenesisState.validator_slash_events": + list := []*ValidatorSlashEventRecord{} + return protoreflect.ValueOfList(&_GenesisState_10_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.FeePool != nil { + l = options.Size(x.FeePool) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.DelegatorWithdrawInfos) > 0 { + for _, e := range x.DelegatorWithdrawInfos { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.PreviousProposer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.OutstandingRewards) > 0 { + for _, e := range x.OutstandingRewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ValidatorAccumulatedCommissions) > 0 { + for _, e := range x.ValidatorAccumulatedCommissions { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ValidatorHistoricalRewards) > 0 { + for _, e := range x.ValidatorHistoricalRewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ValidatorCurrentRewards) > 0 { + for _, e := range x.ValidatorCurrentRewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.DelegatorStartingInfos) > 0 { + for _, e := range x.DelegatorStartingInfos { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ValidatorSlashEvents) > 0 { + for _, e := range x.ValidatorSlashEvents { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorSlashEvents) > 0 { + for iNdEx := len(x.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ValidatorSlashEvents[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x52 + } + } + if len(x.DelegatorStartingInfos) > 0 { + for iNdEx := len(x.DelegatorStartingInfos) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DelegatorStartingInfos[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + } + if len(x.ValidatorCurrentRewards) > 0 { + for iNdEx := len(x.ValidatorCurrentRewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ValidatorCurrentRewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.ValidatorHistoricalRewards) > 0 { + for iNdEx := len(x.ValidatorHistoricalRewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ValidatorHistoricalRewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.ValidatorAccumulatedCommissions) > 0 { + for iNdEx := len(x.ValidatorAccumulatedCommissions) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ValidatorAccumulatedCommissions[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } + if len(x.OutstandingRewards) > 0 { + for iNdEx := len(x.OutstandingRewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OutstandingRewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.PreviousProposer) > 0 { + i -= len(x.PreviousProposer) + copy(dAtA[i:], x.PreviousProposer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousProposer))) + i-- + dAtA[i] = 0x22 + } + if len(x.DelegatorWithdrawInfos) > 0 { + for iNdEx := len(x.DelegatorWithdrawInfos) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.DelegatorWithdrawInfos[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if x.FeePool != nil { + encoded, err := options.Marshal(x.FeePool) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeePool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.FeePool == nil { + x.FeePool = &FeePool{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeePool); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorWithdrawInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorWithdrawInfos = append(x.DelegatorWithdrawInfos, &DelegatorWithdrawInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatorWithdrawInfos[len(x.DelegatorWithdrawInfos)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousProposer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PreviousProposer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutstandingRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OutstandingRewards = append(x.OutstandingRewards, &ValidatorOutstandingRewardsRecord{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutstandingRewards[len(x.OutstandingRewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAccumulatedCommissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAccumulatedCommissions = append(x.ValidatorAccumulatedCommissions, &ValidatorAccumulatedCommissionRecord{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorAccumulatedCommissions[len(x.ValidatorAccumulatedCommissions)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorHistoricalRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorHistoricalRewards = append(x.ValidatorHistoricalRewards, &ValidatorHistoricalRewardsRecord{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorHistoricalRewards[len(x.ValidatorHistoricalRewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorCurrentRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorCurrentRewards = append(x.ValidatorCurrentRewards, &ValidatorCurrentRewardsRecord{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorCurrentRewards[len(x.ValidatorCurrentRewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorStartingInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorStartingInfos = append(x.DelegatorStartingInfos, &DelegatorStartingInfoRecord{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatorStartingInfos[len(x.DelegatorStartingInfos)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvents", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorSlashEvents = append(x.ValidatorSlashEvents, &ValidatorSlashEventRecord{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorSlashEvents[len(x.ValidatorSlashEvents)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: manifest/distribution/v1beta1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. +type DelegatorWithdrawInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // delegator_address is the address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // withdraw_address is the address to withdraw the delegation rewards to. + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (x *DelegatorWithdrawInfo) Reset() { + *x = DelegatorWithdrawInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DelegatorWithdrawInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegatorWithdrawInfo) ProtoMessage() {} + +// Deprecated: Use DelegatorWithdrawInfo.ProtoReflect.Descriptor instead. +func (*DelegatorWithdrawInfo) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *DelegatorWithdrawInfo) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *DelegatorWithdrawInfo) GetWithdrawAddress() string { + if x != nil { + return x.WithdrawAddress + } + return "" +} + +// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +type ValidatorOutstandingRewardsRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // outstanding_rewards represents the outstanding rewards of a validator. + OutstandingRewards []*types.DecCoin `protobuf:"bytes,2,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards,omitempty"` +} + +func (x *ValidatorOutstandingRewardsRecord) Reset() { + *x = ValidatorOutstandingRewardsRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorOutstandingRewardsRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorOutstandingRewardsRecord) ProtoMessage() {} + +// Deprecated: Use ValidatorOutstandingRewardsRecord.ProtoReflect.Descriptor instead. +func (*ValidatorOutstandingRewardsRecord) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *ValidatorOutstandingRewardsRecord) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *ValidatorOutstandingRewardsRecord) GetOutstandingRewards() []*types.DecCoin { + if x != nil { + return x.OutstandingRewards + } + return nil +} + +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. +type ValidatorAccumulatedCommissionRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // accumulated is the accumulated commission of a validator. + Accumulated *ValidatorAccumulatedCommission `protobuf:"bytes,2,opt,name=accumulated,proto3" json:"accumulated,omitempty"` +} + +func (x *ValidatorAccumulatedCommissionRecord) Reset() { + *x = ValidatorAccumulatedCommissionRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorAccumulatedCommissionRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorAccumulatedCommissionRecord) ProtoMessage() {} + +// Deprecated: Use ValidatorAccumulatedCommissionRecord.ProtoReflect.Descriptor instead. +func (*ValidatorAccumulatedCommissionRecord) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{2} +} + +func (x *ValidatorAccumulatedCommissionRecord) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *ValidatorAccumulatedCommissionRecord) GetAccumulated() *ValidatorAccumulatedCommission { + if x != nil { + return x.Accumulated + } + return nil +} + +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. +type ValidatorHistoricalRewardsRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // period defines the period the historical rewards apply to. + Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` + // rewards defines the historical rewards of a validator. + Rewards *ValidatorHistoricalRewards `protobuf:"bytes,3,opt,name=rewards,proto3" json:"rewards,omitempty"` +} + +func (x *ValidatorHistoricalRewardsRecord) Reset() { + *x = ValidatorHistoricalRewardsRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorHistoricalRewardsRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorHistoricalRewardsRecord) ProtoMessage() {} + +// Deprecated: Use ValidatorHistoricalRewardsRecord.ProtoReflect.Descriptor instead. +func (*ValidatorHistoricalRewardsRecord) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{3} +} + +func (x *ValidatorHistoricalRewardsRecord) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *ValidatorHistoricalRewardsRecord) GetPeriod() uint64 { + if x != nil { + return x.Period + } + return 0 +} + +func (x *ValidatorHistoricalRewardsRecord) GetRewards() *ValidatorHistoricalRewards { + if x != nil { + return x.Rewards + } + return nil +} + +// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +type ValidatorCurrentRewardsRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // rewards defines the current rewards of a validator. + Rewards *ValidatorCurrentRewards `protobuf:"bytes,2,opt,name=rewards,proto3" json:"rewards,omitempty"` +} + +func (x *ValidatorCurrentRewardsRecord) Reset() { + *x = ValidatorCurrentRewardsRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorCurrentRewardsRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorCurrentRewardsRecord) ProtoMessage() {} + +// Deprecated: Use ValidatorCurrentRewardsRecord.ProtoReflect.Descriptor instead. +func (*ValidatorCurrentRewardsRecord) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{4} +} + +func (x *ValidatorCurrentRewardsRecord) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *ValidatorCurrentRewardsRecord) GetRewards() *ValidatorCurrentRewards { + if x != nil { + return x.Rewards + } + return nil +} + +// DelegatorStartingInfoRecord used for import / export via genesis json. +type DelegatorStartingInfoRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // delegator_address is the address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // starting_info defines the starting info of a delegator. + StartingInfo *DelegatorStartingInfo `protobuf:"bytes,3,opt,name=starting_info,json=startingInfo,proto3" json:"starting_info,omitempty"` +} + +func (x *DelegatorStartingInfoRecord) Reset() { + *x = DelegatorStartingInfoRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DelegatorStartingInfoRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegatorStartingInfoRecord) ProtoMessage() {} + +// Deprecated: Use DelegatorStartingInfoRecord.ProtoReflect.Descriptor instead. +func (*DelegatorStartingInfoRecord) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{5} +} + +func (x *DelegatorStartingInfoRecord) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *DelegatorStartingInfoRecord) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *DelegatorStartingInfoRecord) GetStartingInfo() *DelegatorStartingInfo { + if x != nil { + return x.StartingInfo + } + return nil +} + +// ValidatorSlashEventRecord is used for import / export via genesis json. +type ValidatorSlashEventRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address is the address of the validator. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // height defines the block height at which the slash event occurred. + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // period is the period of the slash event. + Period uint64 `protobuf:"varint,3,opt,name=period,proto3" json:"period,omitempty"` + // validator_slash_event describes the slash event. + ValidatorSlashEvent *ValidatorSlashEvent `protobuf:"bytes,4,opt,name=validator_slash_event,json=validatorSlashEvent,proto3" json:"validator_slash_event,omitempty"` +} + +func (x *ValidatorSlashEventRecord) Reset() { + *x = ValidatorSlashEventRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorSlashEventRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorSlashEventRecord) ProtoMessage() {} + +// Deprecated: Use ValidatorSlashEventRecord.ProtoReflect.Descriptor instead. +func (*ValidatorSlashEventRecord) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{6} +} + +func (x *ValidatorSlashEventRecord) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *ValidatorSlashEventRecord) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *ValidatorSlashEventRecord) GetPeriod() uint64 { + if x != nil { + return x.Period + } + return 0 +} + +func (x *ValidatorSlashEventRecord) GetValidatorSlashEvent() *ValidatorSlashEvent { + if x != nil { + return x.ValidatorSlashEvent + } + return nil +} + +// GenesisState defines the distribution module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines all the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // fee_pool defines the fee pool at genesis. + FeePool *FeePool `protobuf:"bytes,2,opt,name=fee_pool,json=feePool,proto3" json:"fee_pool,omitempty"` + // fee_pool defines the delegator withdraw infos at genesis. + DelegatorWithdrawInfos []*DelegatorWithdrawInfo `protobuf:"bytes,3,rep,name=delegator_withdraw_infos,json=delegatorWithdrawInfos,proto3" json:"delegator_withdraw_infos,omitempty"` + // fee_pool defines the previous proposer at genesis. + PreviousProposer string `protobuf:"bytes,4,opt,name=previous_proposer,json=previousProposer,proto3" json:"previous_proposer,omitempty"` + // fee_pool defines the outstanding rewards of all validators at genesis. + OutstandingRewards []*ValidatorOutstandingRewardsRecord `protobuf:"bytes,5,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards,omitempty"` + // fee_pool defines the accumulated commissions of all validators at genesis. + ValidatorAccumulatedCommissions []*ValidatorAccumulatedCommissionRecord `protobuf:"bytes,6,rep,name=validator_accumulated_commissions,json=validatorAccumulatedCommissions,proto3" json:"validator_accumulated_commissions,omitempty"` + // fee_pool defines the historical rewards of all validators at genesis. + ValidatorHistoricalRewards []*ValidatorHistoricalRewardsRecord `protobuf:"bytes,7,rep,name=validator_historical_rewards,json=validatorHistoricalRewards,proto3" json:"validator_historical_rewards,omitempty"` + // fee_pool defines the current rewards of all validators at genesis. + ValidatorCurrentRewards []*ValidatorCurrentRewardsRecord `protobuf:"bytes,8,rep,name=validator_current_rewards,json=validatorCurrentRewards,proto3" json:"validator_current_rewards,omitempty"` + // fee_pool defines the delegator starting infos at genesis. + DelegatorStartingInfos []*DelegatorStartingInfoRecord `protobuf:"bytes,9,rep,name=delegator_starting_infos,json=delegatorStartingInfos,proto3" json:"delegator_starting_infos,omitempty"` + // fee_pool defines the validator slash events at genesis. + ValidatorSlashEvents []*ValidatorSlashEventRecord `protobuf:"bytes,10,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_genesis_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP(), []int{7} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetFeePool() *FeePool { + if x != nil { + return x.FeePool + } + return nil +} + +func (x *GenesisState) GetDelegatorWithdrawInfos() []*DelegatorWithdrawInfo { + if x != nil { + return x.DelegatorWithdrawInfos + } + return nil +} + +func (x *GenesisState) GetPreviousProposer() string { + if x != nil { + return x.PreviousProposer + } + return "" +} + +func (x *GenesisState) GetOutstandingRewards() []*ValidatorOutstandingRewardsRecord { + if x != nil { + return x.OutstandingRewards + } + return nil +} + +func (x *GenesisState) GetValidatorAccumulatedCommissions() []*ValidatorAccumulatedCommissionRecord { + if x != nil { + return x.ValidatorAccumulatedCommissions + } + return nil +} + +func (x *GenesisState) GetValidatorHistoricalRewards() []*ValidatorHistoricalRewardsRecord { + if x != nil { + return x.ValidatorHistoricalRewards + } + return nil +} + +func (x *GenesisState) GetValidatorCurrentRewards() []*ValidatorCurrentRewardsRecord { + if x != nil { + return x.ValidatorCurrentRewards + } + return nil +} + +func (x *GenesisState) GetDelegatorStartingInfos() []*DelegatorStartingInfoRecord { + if x != nil { + return x.DelegatorStartingInfos + } + return nil +} + +func (x *GenesisState) GetValidatorSlashEvents() []*ValidatorSlashEventRecord { + if x != nil { + return x.ValidatorSlashEvents + } + return nil +} + +var File_manifest_distribution_v1beta1_genesis_proto protoreflect.FileDescriptor + +var file_manifest_distribution_v1beta1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x30, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xad, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x45, 0x0a, 0x11, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x22, 0x87, 0x02, 0x0a, 0x21, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x6f, 0x75, 0x74, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, + 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xec, 0x01, 0x0a, + 0x24, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x6a, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xf4, 0x01, 0x0a, 0x20, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, + 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x5e, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x22, 0xd6, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x5b, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xa4, 0x02, 0x0a, 0x1b, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, + 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x64, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x42, + 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x22, 0x98, 0x02, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x12, 0x71, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x6c, + 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x9e, 0x09, + 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x48, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, + 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x50, 0x6f, + 0x6f, 0x6c, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x66, + 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x79, 0x0a, 0x18, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x12, 0x45, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x7c, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x73, + 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, + 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x12, 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x21, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x1f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, + 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x1c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x1a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x19, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x7f, 0x0a, 0x18, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x16, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x79, 0x0a, 0x16, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x14, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xa8, + 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x44, 0x58, 0xaa, 0x02, 0x1d, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1d, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x29, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, + 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_manifest_distribution_v1beta1_genesis_proto_rawDescOnce sync.Once + file_manifest_distribution_v1beta1_genesis_proto_rawDescData = file_manifest_distribution_v1beta1_genesis_proto_rawDesc +) + +func file_manifest_distribution_v1beta1_genesis_proto_rawDescGZIP() []byte { + file_manifest_distribution_v1beta1_genesis_proto_rawDescOnce.Do(func() { + file_manifest_distribution_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_distribution_v1beta1_genesis_proto_rawDescData) + }) + return file_manifest_distribution_v1beta1_genesis_proto_rawDescData +} + +var file_manifest_distribution_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_manifest_distribution_v1beta1_genesis_proto_goTypes = []interface{}{ + (*DelegatorWithdrawInfo)(nil), // 0: manifest.distribution.v1beta1.DelegatorWithdrawInfo + (*ValidatorOutstandingRewardsRecord)(nil), // 1: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord + (*ValidatorAccumulatedCommissionRecord)(nil), // 2: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + (*ValidatorHistoricalRewardsRecord)(nil), // 3: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord + (*ValidatorCurrentRewardsRecord)(nil), // 4: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord + (*DelegatorStartingInfoRecord)(nil), // 5: manifest.distribution.v1beta1.DelegatorStartingInfoRecord + (*ValidatorSlashEventRecord)(nil), // 6: manifest.distribution.v1beta1.ValidatorSlashEventRecord + (*GenesisState)(nil), // 7: manifest.distribution.v1beta1.GenesisState + (*types.DecCoin)(nil), // 8: cosmos.base.v1beta1.DecCoin + (*ValidatorAccumulatedCommission)(nil), // 9: manifest.distribution.v1beta1.ValidatorAccumulatedCommission + (*ValidatorHistoricalRewards)(nil), // 10: manifest.distribution.v1beta1.ValidatorHistoricalRewards + (*ValidatorCurrentRewards)(nil), // 11: manifest.distribution.v1beta1.ValidatorCurrentRewards + (*DelegatorStartingInfo)(nil), // 12: manifest.distribution.v1beta1.DelegatorStartingInfo + (*ValidatorSlashEvent)(nil), // 13: manifest.distribution.v1beta1.ValidatorSlashEvent + (*Params)(nil), // 14: manifest.distribution.v1beta1.Params + (*FeePool)(nil), // 15: manifest.distribution.v1beta1.FeePool +} +var file_manifest_distribution_v1beta1_genesis_proto_depIdxs = []int32{ + 8, // 0: manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstanding_rewards:type_name -> cosmos.base.v1beta1.DecCoin + 9, // 1: manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated:type_name -> manifest.distribution.v1beta1.ValidatorAccumulatedCommission + 10, // 2: manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards:type_name -> manifest.distribution.v1beta1.ValidatorHistoricalRewards + 11, // 3: manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards:type_name -> manifest.distribution.v1beta1.ValidatorCurrentRewards + 12, // 4: manifest.distribution.v1beta1.DelegatorStartingInfoRecord.starting_info:type_name -> manifest.distribution.v1beta1.DelegatorStartingInfo + 13, // 5: manifest.distribution.v1beta1.ValidatorSlashEventRecord.validator_slash_event:type_name -> manifest.distribution.v1beta1.ValidatorSlashEvent + 14, // 6: manifest.distribution.v1beta1.GenesisState.params:type_name -> manifest.distribution.v1beta1.Params + 15, // 7: manifest.distribution.v1beta1.GenesisState.fee_pool:type_name -> manifest.distribution.v1beta1.FeePool + 0, // 8: manifest.distribution.v1beta1.GenesisState.delegator_withdraw_infos:type_name -> manifest.distribution.v1beta1.DelegatorWithdrawInfo + 1, // 9: manifest.distribution.v1beta1.GenesisState.outstanding_rewards:type_name -> manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord + 2, // 10: manifest.distribution.v1beta1.GenesisState.validator_accumulated_commissions:type_name -> manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + 3, // 11: manifest.distribution.v1beta1.GenesisState.validator_historical_rewards:type_name -> manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord + 4, // 12: manifest.distribution.v1beta1.GenesisState.validator_current_rewards:type_name -> manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord + 5, // 13: manifest.distribution.v1beta1.GenesisState.delegator_starting_infos:type_name -> manifest.distribution.v1beta1.DelegatorStartingInfoRecord + 6, // 14: manifest.distribution.v1beta1.GenesisState.validator_slash_events:type_name -> manifest.distribution.v1beta1.ValidatorSlashEventRecord + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_manifest_distribution_v1beta1_genesis_proto_init() } +func file_manifest_distribution_v1beta1_genesis_proto_init() { + if File_manifest_distribution_v1beta1_genesis_proto != nil { + return + } + file_manifest_distribution_v1beta1_distribution_proto_init() + if !protoimpl.UnsafeEnabled { + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelegatorWithdrawInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorOutstandingRewardsRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorAccumulatedCommissionRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorHistoricalRewardsRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorCurrentRewardsRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelegatorStartingInfoRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorSlashEventRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_manifest_distribution_v1beta1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_manifest_distribution_v1beta1_genesis_proto_goTypes, + DependencyIndexes: file_manifest_distribution_v1beta1_genesis_proto_depIdxs, + MessageInfos: file_manifest_distribution_v1beta1_genesis_proto_msgTypes, + }.Build() + File_manifest_distribution_v1beta1_genesis_proto = out.File + file_manifest_distribution_v1beta1_genesis_proto_rawDesc = nil + file_manifest_distribution_v1beta1_genesis_proto_goTypes = nil + file_manifest_distribution_v1beta1_genesis_proto_depIdxs = nil +} diff --git a/api/distribution/v1beta1/query.pulsar.go b/api/distribution/v1beta1/query.pulsar.go new file mode 100644 index 0000000..934bf5a --- /dev/null +++ b/api/distribution/v1beta1/query.pulsar.go @@ -0,0 +1,10963 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package distributionv1beta1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + query "cosmossdk.io/api/cosmos/base/query/v1beta1" + types "cosmossdk.io/api/cosmos/base/v1beta1" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryParamsRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryParamsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryParamsResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorDistributionInfoRequest protoreflect.MessageDescriptor + fd_QueryValidatorDistributionInfoRequest_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorDistributionInfoRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorDistributionInfoRequest") + fd_QueryValidatorDistributionInfoRequest_validator_address = md_QueryValidatorDistributionInfoRequest.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorDistributionInfoRequest)(nil) + +type fastReflection_QueryValidatorDistributionInfoRequest QueryValidatorDistributionInfoRequest + +func (x *QueryValidatorDistributionInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorDistributionInfoRequest)(x) +} + +func (x *QueryValidatorDistributionInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorDistributionInfoRequest_messageType fastReflection_QueryValidatorDistributionInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorDistributionInfoRequest_messageType{} + +type fastReflection_QueryValidatorDistributionInfoRequest_messageType struct{} + +func (x fastReflection_QueryValidatorDistributionInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorDistributionInfoRequest)(nil) +} +func (x fastReflection_QueryValidatorDistributionInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorDistributionInfoRequest) +} +func (x fastReflection_QueryValidatorDistributionInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorDistributionInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorDistributionInfoRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorDistributionInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryValidatorDistributionInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorDistributionInfoRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_QueryValidatorDistributionInfoRequest_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorDistributionInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorDistributionInfoRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorDistributionInfoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorDistributionInfoRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorDistributionInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorDistributionInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryValidatorDistributionInfoResponse_2_list)(nil) + +type _QueryValidatorDistributionInfoResponse_2_list struct { + list *[]*types.DecCoin +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryValidatorDistributionInfoResponse_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryValidatorDistributionInfoResponse_3_list)(nil) + +type _QueryValidatorDistributionInfoResponse_3_list struct { + list *[]*types.DecCoin +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryValidatorDistributionInfoResponse_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryValidatorDistributionInfoResponse protoreflect.MessageDescriptor + fd_QueryValidatorDistributionInfoResponse_operator_address protoreflect.FieldDescriptor + fd_QueryValidatorDistributionInfoResponse_self_bond_rewards protoreflect.FieldDescriptor + fd_QueryValidatorDistributionInfoResponse_commission protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorDistributionInfoResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorDistributionInfoResponse") + fd_QueryValidatorDistributionInfoResponse_operator_address = md_QueryValidatorDistributionInfoResponse.Fields().ByName("operator_address") + fd_QueryValidatorDistributionInfoResponse_self_bond_rewards = md_QueryValidatorDistributionInfoResponse.Fields().ByName("self_bond_rewards") + fd_QueryValidatorDistributionInfoResponse_commission = md_QueryValidatorDistributionInfoResponse.Fields().ByName("commission") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorDistributionInfoResponse)(nil) + +type fastReflection_QueryValidatorDistributionInfoResponse QueryValidatorDistributionInfoResponse + +func (x *QueryValidatorDistributionInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorDistributionInfoResponse)(x) +} + +func (x *QueryValidatorDistributionInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorDistributionInfoResponse_messageType fastReflection_QueryValidatorDistributionInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorDistributionInfoResponse_messageType{} + +type fastReflection_QueryValidatorDistributionInfoResponse_messageType struct{} + +func (x fastReflection_QueryValidatorDistributionInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorDistributionInfoResponse)(nil) +} +func (x fastReflection_QueryValidatorDistributionInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorDistributionInfoResponse) +} +func (x fastReflection_QueryValidatorDistributionInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorDistributionInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorDistributionInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorDistributionInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryValidatorDistributionInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorDistributionInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.OperatorAddress != "" { + value := protoreflect.ValueOfString(x.OperatorAddress) + if !f(fd_QueryValidatorDistributionInfoResponse_operator_address, value) { + return + } + } + if len(x.SelfBondRewards) != 0 { + value := protoreflect.ValueOfList(&_QueryValidatorDistributionInfoResponse_2_list{list: &x.SelfBondRewards}) + if !f(fd_QueryValidatorDistributionInfoResponse_self_bond_rewards, value) { + return + } + } + if len(x.Commission) != 0 { + value := protoreflect.ValueOfList(&_QueryValidatorDistributionInfoResponse_3_list{list: &x.Commission}) + if !f(fd_QueryValidatorDistributionInfoResponse_commission, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.operator_address": + return x.OperatorAddress != "" + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards": + return len(x.SelfBondRewards) != 0 + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission": + return len(x.Commission) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.operator_address": + x.OperatorAddress = "" + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards": + x.SelfBondRewards = nil + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission": + x.Commission = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.operator_address": + value := x.OperatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards": + if len(x.SelfBondRewards) == 0 { + return protoreflect.ValueOfList(&_QueryValidatorDistributionInfoResponse_2_list{}) + } + listValue := &_QueryValidatorDistributionInfoResponse_2_list{list: &x.SelfBondRewards} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission": + if len(x.Commission) == 0 { + return protoreflect.ValueOfList(&_QueryValidatorDistributionInfoResponse_3_list{}) + } + listValue := &_QueryValidatorDistributionInfoResponse_3_list{list: &x.Commission} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.operator_address": + x.OperatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards": + lv := value.List() + clv := lv.(*_QueryValidatorDistributionInfoResponse_2_list) + x.SelfBondRewards = *clv.list + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission": + lv := value.List() + clv := lv.(*_QueryValidatorDistributionInfoResponse_3_list) + x.Commission = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards": + if x.SelfBondRewards == nil { + x.SelfBondRewards = []*types.DecCoin{} + } + value := &_QueryValidatorDistributionInfoResponse_2_list{list: &x.SelfBondRewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission": + if x.Commission == nil { + x.Commission = []*types.DecCoin{} + } + value := &_QueryValidatorDistributionInfoResponse_3_list{list: &x.Commission} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.operator_address": + panic(fmt.Errorf("field operator_address of message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.operator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_QueryValidatorDistributionInfoResponse_2_list{list: &list}) + case "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_QueryValidatorDistributionInfoResponse_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorDistributionInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorDistributionInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.OperatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.SelfBondRewards) > 0 { + for _, e := range x.SelfBondRewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Commission) > 0 { + for _, e := range x.Commission { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorDistributionInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Commission) > 0 { + for iNdEx := len(x.Commission) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Commission[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.SelfBondRewards) > 0 { + for iNdEx := len(x.SelfBondRewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SelfBondRewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.OperatorAddress) > 0 { + i -= len(x.OperatorAddress) + copy(dAtA[i:], x.OperatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorDistributionInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorDistributionInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorDistributionInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SelfBondRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SelfBondRewards = append(x.SelfBondRewards, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SelfBondRewards[len(x.SelfBondRewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Commission = append(x.Commission, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission[len(x.Commission)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorOutstandingRewardsRequest protoreflect.MessageDescriptor + fd_QueryValidatorOutstandingRewardsRequest_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorOutstandingRewardsRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorOutstandingRewardsRequest") + fd_QueryValidatorOutstandingRewardsRequest_validator_address = md_QueryValidatorOutstandingRewardsRequest.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorOutstandingRewardsRequest)(nil) + +type fastReflection_QueryValidatorOutstandingRewardsRequest QueryValidatorOutstandingRewardsRequest + +func (x *QueryValidatorOutstandingRewardsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorOutstandingRewardsRequest)(x) +} + +func (x *QueryValidatorOutstandingRewardsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorOutstandingRewardsRequest_messageType fastReflection_QueryValidatorOutstandingRewardsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorOutstandingRewardsRequest_messageType{} + +type fastReflection_QueryValidatorOutstandingRewardsRequest_messageType struct{} + +func (x fastReflection_QueryValidatorOutstandingRewardsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorOutstandingRewardsRequest)(nil) +} +func (x fastReflection_QueryValidatorOutstandingRewardsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorOutstandingRewardsRequest) +} +func (x fastReflection_QueryValidatorOutstandingRewardsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorOutstandingRewardsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorOutstandingRewardsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorOutstandingRewardsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) New() protoreflect.Message { + return new(fastReflection_QueryValidatorOutstandingRewardsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorOutstandingRewardsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_QueryValidatorOutstandingRewardsRequest_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorOutstandingRewardsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorOutstandingRewardsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorOutstandingRewardsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorOutstandingRewardsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorOutstandingRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorOutstandingRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorOutstandingRewardsResponse protoreflect.MessageDescriptor + fd_QueryValidatorOutstandingRewardsResponse_rewards protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorOutstandingRewardsResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorOutstandingRewardsResponse") + fd_QueryValidatorOutstandingRewardsResponse_rewards = md_QueryValidatorOutstandingRewardsResponse.Fields().ByName("rewards") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorOutstandingRewardsResponse)(nil) + +type fastReflection_QueryValidatorOutstandingRewardsResponse QueryValidatorOutstandingRewardsResponse + +func (x *QueryValidatorOutstandingRewardsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorOutstandingRewardsResponse)(x) +} + +func (x *QueryValidatorOutstandingRewardsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorOutstandingRewardsResponse_messageType fastReflection_QueryValidatorOutstandingRewardsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorOutstandingRewardsResponse_messageType{} + +type fastReflection_QueryValidatorOutstandingRewardsResponse_messageType struct{} + +func (x fastReflection_QueryValidatorOutstandingRewardsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorOutstandingRewardsResponse)(nil) +} +func (x fastReflection_QueryValidatorOutstandingRewardsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorOutstandingRewardsResponse) +} +func (x fastReflection_QueryValidatorOutstandingRewardsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorOutstandingRewardsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorOutstandingRewardsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorOutstandingRewardsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) New() protoreflect.Message { + return new(fastReflection_QueryValidatorOutstandingRewardsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorOutstandingRewardsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Rewards != nil { + value := protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) + if !f(fd_QueryValidatorOutstandingRewardsResponse_rewards, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": + return x.Rewards != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": + x.Rewards = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": + value := x.Rewards + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": + x.Rewards = value.Message().Interface().(*ValidatorOutstandingRewards) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": + if x.Rewards == nil { + x.Rewards = new(ValidatorOutstandingRewards) + } + return protoreflect.ValueOfMessage(x.Rewards.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards": + m := new(ValidatorOutstandingRewards) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorOutstandingRewardsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorOutstandingRewardsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Rewards != nil { + l = options.Size(x.Rewards) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorOutstandingRewardsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Rewards != nil { + encoded, err := options.Marshal(x.Rewards) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorOutstandingRewardsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Rewards == nil { + x.Rewards = &ValidatorOutstandingRewards{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorCommissionRequest protoreflect.MessageDescriptor + fd_QueryValidatorCommissionRequest_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorCommissionRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorCommissionRequest") + fd_QueryValidatorCommissionRequest_validator_address = md_QueryValidatorCommissionRequest.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorCommissionRequest)(nil) + +type fastReflection_QueryValidatorCommissionRequest QueryValidatorCommissionRequest + +func (x *QueryValidatorCommissionRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorCommissionRequest)(x) +} + +func (x *QueryValidatorCommissionRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorCommissionRequest_messageType fastReflection_QueryValidatorCommissionRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorCommissionRequest_messageType{} + +type fastReflection_QueryValidatorCommissionRequest_messageType struct{} + +func (x fastReflection_QueryValidatorCommissionRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorCommissionRequest)(nil) +} +func (x fastReflection_QueryValidatorCommissionRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorCommissionRequest) +} +func (x fastReflection_QueryValidatorCommissionRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorCommissionRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorCommissionRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorCommissionRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorCommissionRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorCommissionRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorCommissionRequest) New() protoreflect.Message { + return new(fastReflection_QueryValidatorCommissionRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorCommissionRequest) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorCommissionRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorCommissionRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_QueryValidatorCommissionRequest_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorCommissionRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorCommissionRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.QueryValidatorCommissionRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorCommissionRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionRequest.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorCommissionRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorCommissionRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorCommissionRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorCommissionRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorCommissionRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorCommissionRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorCommissionRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorCommissionRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorCommissionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorCommissionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorCommissionResponse protoreflect.MessageDescriptor + fd_QueryValidatorCommissionResponse_commission protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorCommissionResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorCommissionResponse") + fd_QueryValidatorCommissionResponse_commission = md_QueryValidatorCommissionResponse.Fields().ByName("commission") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorCommissionResponse)(nil) + +type fastReflection_QueryValidatorCommissionResponse QueryValidatorCommissionResponse + +func (x *QueryValidatorCommissionResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorCommissionResponse)(x) +} + +func (x *QueryValidatorCommissionResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorCommissionResponse_messageType fastReflection_QueryValidatorCommissionResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorCommissionResponse_messageType{} + +type fastReflection_QueryValidatorCommissionResponse_messageType struct{} + +func (x fastReflection_QueryValidatorCommissionResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorCommissionResponse)(nil) +} +func (x fastReflection_QueryValidatorCommissionResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorCommissionResponse) +} +func (x fastReflection_QueryValidatorCommissionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorCommissionResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorCommissionResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorCommissionResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorCommissionResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorCommissionResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorCommissionResponse) New() protoreflect.Message { + return new(fastReflection_QueryValidatorCommissionResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorCommissionResponse) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorCommissionResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorCommissionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Commission != nil { + value := protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) + if !f(fd_QueryValidatorCommissionResponse_commission, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorCommissionResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission": + return x.Commission != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission": + x.Commission = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorCommissionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission": + value := x.Commission + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission": + x.Commission = value.Message().Interface().(*ValidatorAccumulatedCommission) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission": + if x.Commission == nil { + x.Commission = new(ValidatorAccumulatedCommission) + } + return protoreflect.ValueOfMessage(x.Commission.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorCommissionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission": + m := new(ValidatorAccumulatedCommission) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorCommissionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorCommissionResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorCommissionResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorCommissionResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorCommissionResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorCommissionResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorCommissionResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Commission != nil { + l = options.Size(x.Commission) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorCommissionResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Commission != nil { + encoded, err := options.Marshal(x.Commission) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorCommissionResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorCommissionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorCommissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Commission == nil { + x.Commission = &ValidatorAccumulatedCommission{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commission); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryValidatorSlashesRequest protoreflect.MessageDescriptor + fd_QueryValidatorSlashesRequest_validator_address protoreflect.FieldDescriptor + fd_QueryValidatorSlashesRequest_starting_height protoreflect.FieldDescriptor + fd_QueryValidatorSlashesRequest_ending_height protoreflect.FieldDescriptor + fd_QueryValidatorSlashesRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorSlashesRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorSlashesRequest") + fd_QueryValidatorSlashesRequest_validator_address = md_QueryValidatorSlashesRequest.Fields().ByName("validator_address") + fd_QueryValidatorSlashesRequest_starting_height = md_QueryValidatorSlashesRequest.Fields().ByName("starting_height") + fd_QueryValidatorSlashesRequest_ending_height = md_QueryValidatorSlashesRequest.Fields().ByName("ending_height") + fd_QueryValidatorSlashesRequest_pagination = md_QueryValidatorSlashesRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorSlashesRequest)(nil) + +type fastReflection_QueryValidatorSlashesRequest QueryValidatorSlashesRequest + +func (x *QueryValidatorSlashesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorSlashesRequest)(x) +} + +func (x *QueryValidatorSlashesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorSlashesRequest_messageType fastReflection_QueryValidatorSlashesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorSlashesRequest_messageType{} + +type fastReflection_QueryValidatorSlashesRequest_messageType struct{} + +func (x fastReflection_QueryValidatorSlashesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorSlashesRequest)(nil) +} +func (x fastReflection_QueryValidatorSlashesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorSlashesRequest) +} +func (x fastReflection_QueryValidatorSlashesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorSlashesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorSlashesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorSlashesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorSlashesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorSlashesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorSlashesRequest) New() protoreflect.Message { + return new(fastReflection_QueryValidatorSlashesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorSlashesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorSlashesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorSlashesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_QueryValidatorSlashesRequest_validator_address, value) { + return + } + } + if x.StartingHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.StartingHeight) + if !f(fd_QueryValidatorSlashesRequest_starting_height, value) { + return + } + } + if x.EndingHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.EndingHeight) + if !f(fd_QueryValidatorSlashesRequest_ending_height, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryValidatorSlashesRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorSlashesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": + return x.StartingHeight != uint64(0) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": + return x.EndingHeight != uint64(0) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": + x.StartingHeight = uint64(0) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": + x.EndingHeight = uint64(0) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorSlashesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": + value := x.StartingHeight + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": + value := x.EndingHeight + return protoreflect.ValueOfUint64(value) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": + x.StartingHeight = value.Uint() + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": + x.EndingHeight = value.Uint() + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": + x.Pagination = value.Message().Interface().(*query.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(query.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.QueryValidatorSlashesRequest is not mutable")) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": + panic(fmt.Errorf("field starting_height of message manifest.distribution.v1beta1.QueryValidatorSlashesRequest is not mutable")) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": + panic(fmt.Errorf("field ending_height of message manifest.distribution.v1beta1.QueryValidatorSlashesRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorSlashesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.starting_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.ending_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination": + m := new(query.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorSlashesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorSlashesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorSlashesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorSlashesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorSlashesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorSlashesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.StartingHeight != 0 { + n += 1 + runtime.Sov(uint64(x.StartingHeight)) + } + if x.EndingHeight != 0 { + n += 1 + runtime.Sov(uint64(x.EndingHeight)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorSlashesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if x.EndingHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.EndingHeight)) + i-- + dAtA[i] = 0x18 + } + if x.StartingHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StartingHeight)) + i-- + dAtA[i] = 0x10 + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorSlashesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorSlashesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorSlashesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartingHeight", wireType) + } + x.StartingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.StartingHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndingHeight", wireType) + } + x.EndingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.EndingHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &query.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryValidatorSlashesResponse_1_list)(nil) + +type _QueryValidatorSlashesResponse_1_list struct { + list *[]*ValidatorSlashEvent +} + +func (x *_QueryValidatorSlashesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryValidatorSlashesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryValidatorSlashesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) + (*x.list)[i] = concreteValue +} + +func (x *_QueryValidatorSlashesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorSlashEvent) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryValidatorSlashesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(ValidatorSlashEvent) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryValidatorSlashesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryValidatorSlashesResponse_1_list) NewElement() protoreflect.Value { + v := new(ValidatorSlashEvent) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryValidatorSlashesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryValidatorSlashesResponse protoreflect.MessageDescriptor + fd_QueryValidatorSlashesResponse_slashes protoreflect.FieldDescriptor + fd_QueryValidatorSlashesResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryValidatorSlashesResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryValidatorSlashesResponse") + fd_QueryValidatorSlashesResponse_slashes = md_QueryValidatorSlashesResponse.Fields().ByName("slashes") + fd_QueryValidatorSlashesResponse_pagination = md_QueryValidatorSlashesResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryValidatorSlashesResponse)(nil) + +type fastReflection_QueryValidatorSlashesResponse QueryValidatorSlashesResponse + +func (x *QueryValidatorSlashesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryValidatorSlashesResponse)(x) +} + +func (x *QueryValidatorSlashesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryValidatorSlashesResponse_messageType fastReflection_QueryValidatorSlashesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryValidatorSlashesResponse_messageType{} + +type fastReflection_QueryValidatorSlashesResponse_messageType struct{} + +func (x fastReflection_QueryValidatorSlashesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryValidatorSlashesResponse)(nil) +} +func (x fastReflection_QueryValidatorSlashesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryValidatorSlashesResponse) +} +func (x fastReflection_QueryValidatorSlashesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorSlashesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryValidatorSlashesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryValidatorSlashesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryValidatorSlashesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryValidatorSlashesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryValidatorSlashesResponse) New() protoreflect.Message { + return new(fastReflection_QueryValidatorSlashesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryValidatorSlashesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryValidatorSlashesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryValidatorSlashesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Slashes) != 0 { + value := protoreflect.ValueOfList(&_QueryValidatorSlashesResponse_1_list{list: &x.Slashes}) + if !f(fd_QueryValidatorSlashesResponse_slashes, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryValidatorSlashesResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryValidatorSlashesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": + return len(x.Slashes) != 0 + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": + x.Slashes = nil + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryValidatorSlashesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": + if len(x.Slashes) == 0 { + return protoreflect.ValueOfList(&_QueryValidatorSlashesResponse_1_list{}) + } + listValue := &_QueryValidatorSlashesResponse_1_list{list: &x.Slashes} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": + lv := value.List() + clv := lv.(*_QueryValidatorSlashesResponse_1_list) + x.Slashes = *clv.list + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": + x.Pagination = value.Message().Interface().(*query.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": + if x.Slashes == nil { + x.Slashes = []*ValidatorSlashEvent{} + } + value := &_QueryValidatorSlashesResponse_1_list{list: &x.Slashes} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(query.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryValidatorSlashesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes": + list := []*ValidatorSlashEvent{} + return protoreflect.ValueOfList(&_QueryValidatorSlashesResponse_1_list{list: &list}) + case "manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination": + m := new(query.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryValidatorSlashesResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryValidatorSlashesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryValidatorSlashesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryValidatorSlashesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryValidatorSlashesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryValidatorSlashesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryValidatorSlashesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryValidatorSlashesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryValidatorSlashesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Slashes) > 0 { + for _, e := range x.Slashes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorSlashesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Slashes) > 0 { + for iNdEx := len(x.Slashes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Slashes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryValidatorSlashesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorSlashesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryValidatorSlashesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Slashes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Slashes = append(x.Slashes, &ValidatorSlashEvent{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Slashes[len(x.Slashes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &query.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryDelegationRewardsRequest protoreflect.MessageDescriptor + fd_QueryDelegationRewardsRequest_delegator_address protoreflect.FieldDescriptor + fd_QueryDelegationRewardsRequest_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegationRewardsRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationRewardsRequest") + fd_QueryDelegationRewardsRequest_delegator_address = md_QueryDelegationRewardsRequest.Fields().ByName("delegator_address") + fd_QueryDelegationRewardsRequest_validator_address = md_QueryDelegationRewardsRequest.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegationRewardsRequest)(nil) + +type fastReflection_QueryDelegationRewardsRequest QueryDelegationRewardsRequest + +func (x *QueryDelegationRewardsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegationRewardsRequest)(x) +} + +func (x *QueryDelegationRewardsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegationRewardsRequest_messageType fastReflection_QueryDelegationRewardsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegationRewardsRequest_messageType{} + +type fastReflection_QueryDelegationRewardsRequest_messageType struct{} + +func (x fastReflection_QueryDelegationRewardsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegationRewardsRequest)(nil) +} +func (x fastReflection_QueryDelegationRewardsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegationRewardsRequest) +} +func (x fastReflection_QueryDelegationRewardsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationRewardsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegationRewardsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationRewardsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegationRewardsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegationRewardsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegationRewardsRequest) New() protoreflect.Message { + return new(fastReflection_QueryDelegationRewardsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegationRewardsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDelegationRewardsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegationRewardsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_QueryDelegationRewardsRequest_delegator_address, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_QueryDelegationRewardsRequest_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegationRewardsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": + return x.DelegatorAddress != "" + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": + x.DelegatorAddress = "" + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegationRewardsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": + x.DelegatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.QueryDelegationRewardsRequest is not mutable")) + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.QueryDelegationRewardsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegationRewardsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.delegator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.QueryDelegationRewardsRequest.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegationRewardsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegationRewardsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegationRewardsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegationRewardsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegationRewardsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegationRewardsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationRewardsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationRewardsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryDelegationRewardsResponse_1_list)(nil) + +type _QueryDelegationRewardsResponse_1_list struct { + list *[]*types.DecCoin +} + +func (x *_QueryDelegationRewardsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDelegationRewardsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDelegationRewardsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDelegationRewardsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDelegationRewardsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDelegationRewardsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDelegationRewardsResponse_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDelegationRewardsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryDelegationRewardsResponse protoreflect.MessageDescriptor + fd_QueryDelegationRewardsResponse_rewards protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegationRewardsResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationRewardsResponse") + fd_QueryDelegationRewardsResponse_rewards = md_QueryDelegationRewardsResponse.Fields().ByName("rewards") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegationRewardsResponse)(nil) + +type fastReflection_QueryDelegationRewardsResponse QueryDelegationRewardsResponse + +func (x *QueryDelegationRewardsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegationRewardsResponse)(x) +} + +func (x *QueryDelegationRewardsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegationRewardsResponse_messageType fastReflection_QueryDelegationRewardsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegationRewardsResponse_messageType{} + +type fastReflection_QueryDelegationRewardsResponse_messageType struct{} + +func (x fastReflection_QueryDelegationRewardsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegationRewardsResponse)(nil) +} +func (x fastReflection_QueryDelegationRewardsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegationRewardsResponse) +} +func (x fastReflection_QueryDelegationRewardsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationRewardsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegationRewardsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationRewardsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegationRewardsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegationRewardsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegationRewardsResponse) New() protoreflect.Message { + return new(fastReflection_QueryDelegationRewardsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegationRewardsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDelegationRewardsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegationRewardsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rewards) != 0 { + value := protoreflect.ValueOfList(&_QueryDelegationRewardsResponse_1_list{list: &x.Rewards}) + if !f(fd_QueryDelegationRewardsResponse_rewards, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegationRewardsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": + return len(x.Rewards) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": + x.Rewards = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegationRewardsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": + if len(x.Rewards) == 0 { + return protoreflect.ValueOfList(&_QueryDelegationRewardsResponse_1_list{}) + } + listValue := &_QueryDelegationRewardsResponse_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": + lv := value.List() + clv := lv.(*_QueryDelegationRewardsResponse_1_list) + x.Rewards = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": + if x.Rewards == nil { + x.Rewards = []*types.DecCoin{} + } + value := &_QueryDelegationRewardsResponse_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegationRewardsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_QueryDelegationRewardsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegationRewardsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegationRewardsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegationRewardsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationRewardsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegationRewardsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegationRewardsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegationRewardsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Rewards) > 0 { + for _, e := range x.Rewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationRewardsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Rewards) > 0 { + for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Rewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationRewardsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rewards = append(x.Rewards, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryDelegationTotalRewardsRequest protoreflect.MessageDescriptor + fd_QueryDelegationTotalRewardsRequest_delegator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegationTotalRewardsRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationTotalRewardsRequest") + fd_QueryDelegationTotalRewardsRequest_delegator_address = md_QueryDelegationTotalRewardsRequest.Fields().ByName("delegator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegationTotalRewardsRequest)(nil) + +type fastReflection_QueryDelegationTotalRewardsRequest QueryDelegationTotalRewardsRequest + +func (x *QueryDelegationTotalRewardsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegationTotalRewardsRequest)(x) +} + +func (x *QueryDelegationTotalRewardsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegationTotalRewardsRequest_messageType fastReflection_QueryDelegationTotalRewardsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegationTotalRewardsRequest_messageType{} + +type fastReflection_QueryDelegationTotalRewardsRequest_messageType struct{} + +func (x fastReflection_QueryDelegationTotalRewardsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegationTotalRewardsRequest)(nil) +} +func (x fastReflection_QueryDelegationTotalRewardsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegationTotalRewardsRequest) +} +func (x fastReflection_QueryDelegationTotalRewardsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationTotalRewardsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationTotalRewardsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegationTotalRewardsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) New() protoreflect.Message { + return new(fastReflection_QueryDelegationTotalRewardsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDelegationTotalRewardsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_QueryDelegationTotalRewardsRequest_delegator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": + return x.DelegatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": + x.DelegatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": + x.DelegatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest.delegator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegationTotalRewardsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegationTotalRewardsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationTotalRewardsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationTotalRewardsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationTotalRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationTotalRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryDelegationTotalRewardsResponse_1_list)(nil) + +type _QueryDelegationTotalRewardsResponse_1_list struct { + list *[]*DelegationDelegatorReward +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DelegationDelegatorReward) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*DelegationDelegatorReward) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(DelegationDelegatorReward) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) NewElement() protoreflect.Value { + v := new(DelegationDelegatorReward) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDelegationTotalRewardsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_QueryDelegationTotalRewardsResponse_2_list)(nil) + +type _QueryDelegationTotalRewardsResponse_2_list struct { + list *[]*types.DecCoin +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDelegationTotalRewardsResponse_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryDelegationTotalRewardsResponse protoreflect.MessageDescriptor + fd_QueryDelegationTotalRewardsResponse_rewards protoreflect.FieldDescriptor + fd_QueryDelegationTotalRewardsResponse_total protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegationTotalRewardsResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegationTotalRewardsResponse") + fd_QueryDelegationTotalRewardsResponse_rewards = md_QueryDelegationTotalRewardsResponse.Fields().ByName("rewards") + fd_QueryDelegationTotalRewardsResponse_total = md_QueryDelegationTotalRewardsResponse.Fields().ByName("total") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegationTotalRewardsResponse)(nil) + +type fastReflection_QueryDelegationTotalRewardsResponse QueryDelegationTotalRewardsResponse + +func (x *QueryDelegationTotalRewardsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegationTotalRewardsResponse)(x) +} + +func (x *QueryDelegationTotalRewardsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegationTotalRewardsResponse_messageType fastReflection_QueryDelegationTotalRewardsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegationTotalRewardsResponse_messageType{} + +type fastReflection_QueryDelegationTotalRewardsResponse_messageType struct{} + +func (x fastReflection_QueryDelegationTotalRewardsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegationTotalRewardsResponse)(nil) +} +func (x fastReflection_QueryDelegationTotalRewardsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegationTotalRewardsResponse) +} +func (x fastReflection_QueryDelegationTotalRewardsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationTotalRewardsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegationTotalRewardsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegationTotalRewardsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) New() protoreflect.Message { + return new(fastReflection_QueryDelegationTotalRewardsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDelegationTotalRewardsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rewards) != 0 { + value := protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_1_list{list: &x.Rewards}) + if !f(fd_QueryDelegationTotalRewardsResponse_rewards, value) { + return + } + } + if len(x.Total) != 0 { + value := protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_2_list{list: &x.Total}) + if !f(fd_QueryDelegationTotalRewardsResponse_total, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": + return len(x.Rewards) != 0 + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": + return len(x.Total) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": + x.Rewards = nil + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": + x.Total = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": + if len(x.Rewards) == 0 { + return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_1_list{}) + } + listValue := &_QueryDelegationTotalRewardsResponse_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": + if len(x.Total) == 0 { + return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_2_list{}) + } + listValue := &_QueryDelegationTotalRewardsResponse_2_list{list: &x.Total} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": + lv := value.List() + clv := lv.(*_QueryDelegationTotalRewardsResponse_1_list) + x.Rewards = *clv.list + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": + lv := value.List() + clv := lv.(*_QueryDelegationTotalRewardsResponse_2_list) + x.Total = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": + if x.Rewards == nil { + x.Rewards = []*DelegationDelegatorReward{} + } + value := &_QueryDelegationTotalRewardsResponse_1_list{list: &x.Rewards} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": + if x.Total == nil { + x.Total = []*types.DecCoin{} + } + value := &_QueryDelegationTotalRewardsResponse_2_list{list: &x.Total} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards": + list := []*DelegationDelegatorReward{} + return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_1_list{list: &list}) + case "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_QueryDelegationTotalRewardsResponse_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegationTotalRewardsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegationTotalRewardsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Rewards) > 0 { + for _, e := range x.Rewards { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Total) > 0 { + for _, e := range x.Total { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationTotalRewardsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Total) > 0 { + for iNdEx := len(x.Total) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Total[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Rewards) > 0 { + for iNdEx := len(x.Rewards) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Rewards[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegationTotalRewardsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rewards = append(x.Rewards, &DelegationDelegatorReward{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rewards[len(x.Rewards)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Total = append(x.Total, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Total[len(x.Total)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryDelegatorValidatorsRequest protoreflect.MessageDescriptor + fd_QueryDelegatorValidatorsRequest_delegator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegatorValidatorsRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorsRequest") + fd_QueryDelegatorValidatorsRequest_delegator_address = md_QueryDelegatorValidatorsRequest.Fields().ByName("delegator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorsRequest)(nil) + +type fastReflection_QueryDelegatorValidatorsRequest QueryDelegatorValidatorsRequest + +func (x *QueryDelegatorValidatorsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegatorValidatorsRequest)(x) +} + +func (x *QueryDelegatorValidatorsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegatorValidatorsRequest_messageType fastReflection_QueryDelegatorValidatorsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorsRequest_messageType{} + +type fastReflection_QueryDelegatorValidatorsRequest_messageType struct{} + +func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegatorValidatorsRequest)(nil) +} +func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorValidatorsRequest) +} +func (x fastReflection_QueryDelegatorValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorValidatorsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorValidatorsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegatorValidatorsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegatorValidatorsRequest) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorValidatorsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDelegatorValidatorsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_QueryDelegatorValidatorsRequest_delegator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": + return x.DelegatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": + x.DelegatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": + x.DelegatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegatorValidatorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest.delegator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegatorValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegatorValidatorsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegatorValidatorsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegatorValidatorsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegatorValidatorsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorValidatorsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorValidatorsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryDelegatorValidatorsResponse_1_list)(nil) + +type _QueryDelegatorValidatorsResponse_1_list struct { + list *[]string +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryDelegatorValidatorsResponse at list field Validators as it is not of Message kind")) +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryDelegatorValidatorsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryDelegatorValidatorsResponse protoreflect.MessageDescriptor + fd_QueryDelegatorValidatorsResponse_validators protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegatorValidatorsResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorValidatorsResponse") + fd_QueryDelegatorValidatorsResponse_validators = md_QueryDelegatorValidatorsResponse.Fields().ByName("validators") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegatorValidatorsResponse)(nil) + +type fastReflection_QueryDelegatorValidatorsResponse QueryDelegatorValidatorsResponse + +func (x *QueryDelegatorValidatorsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegatorValidatorsResponse)(x) +} + +func (x *QueryDelegatorValidatorsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegatorValidatorsResponse_messageType fastReflection_QueryDelegatorValidatorsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegatorValidatorsResponse_messageType{} + +type fastReflection_QueryDelegatorValidatorsResponse_messageType struct{} + +func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegatorValidatorsResponse)(nil) +} +func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorValidatorsResponse) +} +func (x fastReflection_QueryDelegatorValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorValidatorsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorValidatorsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegatorValidatorsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegatorValidatorsResponse) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorValidatorsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDelegatorValidatorsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Validators) != 0 { + value := protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators}) + if !f(fd_QueryDelegatorValidatorsResponse_validators, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": + return len(x.Validators) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": + x.Validators = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": + if len(x.Validators) == 0 { + return protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{}) + } + listValue := &_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": + lv := value.List() + clv := lv.(*_QueryDelegatorValidatorsResponse_1_list) + x.Validators = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": + if x.Validators == nil { + x.Validators = []string{} + } + value := &_QueryDelegatorValidatorsResponse_1_list{list: &x.Validators} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegatorValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators": + list := []string{} + return protoreflect.ValueOfList(&_QueryDelegatorValidatorsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegatorValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegatorValidatorsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorValidatorsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegatorValidatorsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegatorValidatorsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Validators) > 0 { + for _, s := range x.Validators { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Validators) > 0 { + for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Validators[iNdEx]) + copy(dAtA[i:], x.Validators[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validators[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorValidatorsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Validators = append(x.Validators, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryDelegatorWithdrawAddressRequest protoreflect.MessageDescriptor + fd_QueryDelegatorWithdrawAddressRequest_delegator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegatorWithdrawAddressRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorWithdrawAddressRequest") + fd_QueryDelegatorWithdrawAddressRequest_delegator_address = md_QueryDelegatorWithdrawAddressRequest.Fields().ByName("delegator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegatorWithdrawAddressRequest)(nil) + +type fastReflection_QueryDelegatorWithdrawAddressRequest QueryDelegatorWithdrawAddressRequest + +func (x *QueryDelegatorWithdrawAddressRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegatorWithdrawAddressRequest)(x) +} + +func (x *QueryDelegatorWithdrawAddressRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegatorWithdrawAddressRequest_messageType fastReflection_QueryDelegatorWithdrawAddressRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegatorWithdrawAddressRequest_messageType{} + +type fastReflection_QueryDelegatorWithdrawAddressRequest_messageType struct{} + +func (x fastReflection_QueryDelegatorWithdrawAddressRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegatorWithdrawAddressRequest)(nil) +} +func (x fastReflection_QueryDelegatorWithdrawAddressRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorWithdrawAddressRequest) +} +func (x fastReflection_QueryDelegatorWithdrawAddressRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorWithdrawAddressRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorWithdrawAddressRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegatorWithdrawAddressRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorWithdrawAddressRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDelegatorWithdrawAddressRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_QueryDelegatorWithdrawAddressRequest_delegator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": + return x.DelegatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": + x.DelegatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": + x.DelegatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.delegator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegatorWithdrawAddressRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegatorWithdrawAddressRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorWithdrawAddressRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorWithdrawAddressRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorWithdrawAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorWithdrawAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryDelegatorWithdrawAddressResponse protoreflect.MessageDescriptor + fd_QueryDelegatorWithdrawAddressResponse_withdraw_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryDelegatorWithdrawAddressResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryDelegatorWithdrawAddressResponse") + fd_QueryDelegatorWithdrawAddressResponse_withdraw_address = md_QueryDelegatorWithdrawAddressResponse.Fields().ByName("withdraw_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryDelegatorWithdrawAddressResponse)(nil) + +type fastReflection_QueryDelegatorWithdrawAddressResponse QueryDelegatorWithdrawAddressResponse + +func (x *QueryDelegatorWithdrawAddressResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDelegatorWithdrawAddressResponse)(x) +} + +func (x *QueryDelegatorWithdrawAddressResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryDelegatorWithdrawAddressResponse_messageType fastReflection_QueryDelegatorWithdrawAddressResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDelegatorWithdrawAddressResponse_messageType{} + +type fastReflection_QueryDelegatorWithdrawAddressResponse_messageType struct{} + +func (x fastReflection_QueryDelegatorWithdrawAddressResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDelegatorWithdrawAddressResponse)(nil) +} +func (x fastReflection_QueryDelegatorWithdrawAddressResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorWithdrawAddressResponse) +} +func (x fastReflection_QueryDelegatorWithdrawAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorWithdrawAddressResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDelegatorWithdrawAddressResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDelegatorWithdrawAddressResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) New() protoreflect.Message { + return new(fastReflection_QueryDelegatorWithdrawAddressResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDelegatorWithdrawAddressResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.WithdrawAddress != "" { + value := protoreflect.ValueOfString(x.WithdrawAddress) + if !f(fd_QueryDelegatorWithdrawAddressResponse_withdraw_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": + return x.WithdrawAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": + x.WithdrawAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": + value := x.WithdrawAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": + x.WithdrawAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": + panic(fmt.Errorf("field withdraw_address of message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.withdraw_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryDelegatorWithdrawAddressResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDelegatorWithdrawAddressResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.WithdrawAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorWithdrawAddressResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.WithdrawAddress) > 0 { + i -= len(x.WithdrawAddress) + copy(dAtA[i:], x.WithdrawAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryDelegatorWithdrawAddressResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.WithdrawAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCommunityPoolRequest protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryCommunityPoolRequest = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryCommunityPoolRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryCommunityPoolRequest)(nil) + +type fastReflection_QueryCommunityPoolRequest QueryCommunityPoolRequest + +func (x *QueryCommunityPoolRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCommunityPoolRequest)(x) +} + +func (x *QueryCommunityPoolRequest) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCommunityPoolRequest_messageType fastReflection_QueryCommunityPoolRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCommunityPoolRequest_messageType{} + +type fastReflection_QueryCommunityPoolRequest_messageType struct{} + +func (x fastReflection_QueryCommunityPoolRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCommunityPoolRequest)(nil) +} +func (x fastReflection_QueryCommunityPoolRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCommunityPoolRequest) +} +func (x fastReflection_QueryCommunityPoolRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCommunityPoolRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCommunityPoolRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCommunityPoolRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCommunityPoolRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCommunityPoolRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCommunityPoolRequest) New() protoreflect.Message { + return new(fastReflection_QueryCommunityPoolRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCommunityPoolRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCommunityPoolRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCommunityPoolRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCommunityPoolRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCommunityPoolRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCommunityPoolRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolRequest")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCommunityPoolRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryCommunityPoolRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCommunityPoolRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCommunityPoolRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCommunityPoolRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCommunityPoolRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCommunityPoolRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCommunityPoolRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCommunityPoolRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCommunityPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryCommunityPoolResponse_1_list)(nil) + +type _QueryCommunityPoolResponse_1_list struct { + list *[]*types.DecCoin +} + +func (x *_QueryCommunityPoolResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryCommunityPoolResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryCommunityPoolResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryCommunityPoolResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.DecCoin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryCommunityPoolResponse_1_list) AppendMutable() protoreflect.Value { + v := new(types.DecCoin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryCommunityPoolResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryCommunityPoolResponse_1_list) NewElement() protoreflect.Value { + v := new(types.DecCoin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryCommunityPoolResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryCommunityPoolResponse protoreflect.MessageDescriptor + fd_QueryCommunityPoolResponse_pool protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_query_proto_init() + md_QueryCommunityPoolResponse = File_manifest_distribution_v1beta1_query_proto.Messages().ByName("QueryCommunityPoolResponse") + fd_QueryCommunityPoolResponse_pool = md_QueryCommunityPoolResponse.Fields().ByName("pool") +} + +var _ protoreflect.Message = (*fastReflection_QueryCommunityPoolResponse)(nil) + +type fastReflection_QueryCommunityPoolResponse QueryCommunityPoolResponse + +func (x *QueryCommunityPoolResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCommunityPoolResponse)(x) +} + +func (x *QueryCommunityPoolResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCommunityPoolResponse_messageType fastReflection_QueryCommunityPoolResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCommunityPoolResponse_messageType{} + +type fastReflection_QueryCommunityPoolResponse_messageType struct{} + +func (x fastReflection_QueryCommunityPoolResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCommunityPoolResponse)(nil) +} +func (x fastReflection_QueryCommunityPoolResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCommunityPoolResponse) +} +func (x fastReflection_QueryCommunityPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCommunityPoolResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCommunityPoolResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCommunityPoolResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCommunityPoolResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCommunityPoolResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCommunityPoolResponse) New() protoreflect.Message { + return new(fastReflection_QueryCommunityPoolResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCommunityPoolResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCommunityPoolResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCommunityPoolResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Pool) != 0 { + value := protoreflect.ValueOfList(&_QueryCommunityPoolResponse_1_list{list: &x.Pool}) + if !f(fd_QueryCommunityPoolResponse_pool, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCommunityPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool": + return len(x.Pool) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool": + x.Pool = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCommunityPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool": + if len(x.Pool) == 0 { + return protoreflect.ValueOfList(&_QueryCommunityPoolResponse_1_list{}) + } + listValue := &_QueryCommunityPoolResponse_1_list{list: &x.Pool} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool": + lv := value.List() + clv := lv.(*_QueryCommunityPoolResponse_1_list) + x.Pool = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool": + if x.Pool == nil { + x.Pool = []*types.DecCoin{} + } + value := &_QueryCommunityPoolResponse_1_list{list: &x.Pool} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCommunityPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool": + list := []*types.DecCoin{} + return protoreflect.ValueOfList(&_QueryCommunityPoolResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.QueryCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.QueryCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCommunityPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.QueryCommunityPoolResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCommunityPoolResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCommunityPoolResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCommunityPoolResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCommunityPoolResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCommunityPoolResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Pool) > 0 { + for _, e := range x.Pool { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCommunityPoolResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Pool) > 0 { + for iNdEx := len(x.Pool) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Pool[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCommunityPoolResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCommunityPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Pool = append(x.Pool, &types.DecCoin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pool[len(x.Pool)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: manifest/distribution/v1beta1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method. +type QueryValidatorDistributionInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *QueryValidatorDistributionInfoRequest) Reset() { + *x = QueryValidatorDistributionInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorDistributionInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorDistributionInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryValidatorDistributionInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryValidatorDistributionInfoRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryValidatorDistributionInfoRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. +type QueryValidatorDistributionInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // operator_address defines the validator operator address. + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` + // self_bond_rewards defines the self delegations rewards. + SelfBondRewards []*types.DecCoin `protobuf:"bytes,2,rep,name=self_bond_rewards,json=selfBondRewards,proto3" json:"self_bond_rewards,omitempty"` + // commission defines the commission the validator received. + Commission []*types.DecCoin `protobuf:"bytes,3,rep,name=commission,proto3" json:"commission,omitempty"` +} + +func (x *QueryValidatorDistributionInfoResponse) Reset() { + *x = QueryValidatorDistributionInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorDistributionInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorDistributionInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryValidatorDistributionInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryValidatorDistributionInfoResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryValidatorDistributionInfoResponse) GetOperatorAddress() string { + if x != nil { + return x.OperatorAddress + } + return "" +} + +func (x *QueryValidatorDistributionInfoResponse) GetSelfBondRewards() []*types.DecCoin { + if x != nil { + return x.SelfBondRewards + } + return nil +} + +func (x *QueryValidatorDistributionInfoResponse) GetCommission() []*types.DecCoin { + if x != nil { + return x.Commission + } + return nil +} + +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. +type QueryValidatorOutstandingRewardsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *QueryValidatorOutstandingRewardsRequest) Reset() { + *x = QueryValidatorOutstandingRewardsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorOutstandingRewardsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorOutstandingRewardsRequest) ProtoMessage() {} + +// Deprecated: Use QueryValidatorOutstandingRewardsRequest.ProtoReflect.Descriptor instead. +func (*QueryValidatorOutstandingRewardsRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryValidatorOutstandingRewardsRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +type QueryValidatorOutstandingRewardsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rewards *ValidatorOutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"` +} + +func (x *QueryValidatorOutstandingRewardsResponse) Reset() { + *x = QueryValidatorOutstandingRewardsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorOutstandingRewardsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {} + +// Deprecated: Use QueryValidatorOutstandingRewardsResponse.ProtoReflect.Descriptor instead. +func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryValidatorOutstandingRewardsResponse) GetRewards() *ValidatorOutstandingRewards { + if x != nil { + return x.Rewards + } + return nil +} + +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method +type QueryValidatorCommissionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *QueryValidatorCommissionRequest) Reset() { + *x = QueryValidatorCommissionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorCommissionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorCommissionRequest) ProtoMessage() {} + +// Deprecated: Use QueryValidatorCommissionRequest.ProtoReflect.Descriptor instead. +func (*QueryValidatorCommissionRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryValidatorCommissionRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +type QueryValidatorCommissionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // commission defines the commission the validator received. + Commission *ValidatorAccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission,omitempty"` +} + +func (x *QueryValidatorCommissionResponse) Reset() { + *x = QueryValidatorCommissionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorCommissionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorCommissionResponse) ProtoMessage() {} + +// Deprecated: Use QueryValidatorCommissionResponse.ProtoReflect.Descriptor instead. +func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryValidatorCommissionResponse) GetCommission() *ValidatorAccumulatedCommission { + if x != nil { + return x.Commission + } + return nil +} + +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method +type QueryValidatorSlashesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // starting_height defines the optional starting height to query the slashes. + StartingHeight uint64 `protobuf:"varint,2,opt,name=starting_height,json=startingHeight,proto3" json:"starting_height,omitempty"` + // starting_height defines the optional ending height to query the slashes. + EndingHeight uint64 `protobuf:"varint,3,opt,name=ending_height,json=endingHeight,proto3" json:"ending_height,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryValidatorSlashesRequest) Reset() { + *x = QueryValidatorSlashesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorSlashesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorSlashesRequest) ProtoMessage() {} + +// Deprecated: Use QueryValidatorSlashesRequest.ProtoReflect.Descriptor instead. +func (*QueryValidatorSlashesRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryValidatorSlashesRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *QueryValidatorSlashesRequest) GetStartingHeight() uint64 { + if x != nil { + return x.StartingHeight + } + return 0 +} + +func (x *QueryValidatorSlashesRequest) GetEndingHeight() uint64 { + if x != nil { + return x.EndingHeight + } + return 0 +} + +func (x *QueryValidatorSlashesRequest) GetPagination() *query.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +type QueryValidatorSlashesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // slashes defines the slashes the validator received. + Slashes []*ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryValidatorSlashesResponse) Reset() { + *x = QueryValidatorSlashesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryValidatorSlashesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryValidatorSlashesResponse) ProtoMessage() {} + +// Deprecated: Use QueryValidatorSlashesResponse.ProtoReflect.Descriptor instead. +func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryValidatorSlashesResponse) GetSlashes() []*ValidatorSlashEvent { + if x != nil { + return x.Slashes + } + return nil +} + +func (x *QueryValidatorSlashesResponse) GetPagination() *query.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. +type QueryDelegationRewardsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // validator_address defines the validator address to query for. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *QueryDelegationRewardsRequest) Reset() { + *x = QueryDelegationRewardsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegationRewardsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegationRewardsRequest) ProtoMessage() {} + +// Deprecated: Use QueryDelegationRewardsRequest.ProtoReflect.Descriptor instead. +func (*QueryDelegationRewardsRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryDelegationRewardsRequest) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *QueryDelegationRewardsRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +type QueryDelegationRewardsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // rewards defines the rewards accrued by a delegation. + Rewards []*types.DecCoin `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` +} + +func (x *QueryDelegationRewardsResponse) Reset() { + *x = QueryDelegationRewardsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegationRewardsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegationRewardsResponse) ProtoMessage() {} + +// Deprecated: Use QueryDelegationRewardsResponse.ProtoReflect.Descriptor instead. +func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryDelegationRewardsResponse) GetRewards() []*types.DecCoin { + if x != nil { + return x.Rewards + } + return nil +} + +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. +type QueryDelegationTotalRewardsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (x *QueryDelegationTotalRewardsRequest) Reset() { + *x = QueryDelegationTotalRewardsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegationTotalRewardsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegationTotalRewardsRequest) ProtoMessage() {} + +// Deprecated: Use QueryDelegationTotalRewardsRequest.ProtoReflect.Descriptor instead. +func (*QueryDelegationTotalRewardsRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryDelegationTotalRewardsRequest) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +type QueryDelegationTotalRewardsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // rewards defines all the rewards accrued by a delegator. + Rewards []*DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` + // total defines the sum of all the rewards. + Total []*types.DecCoin `protobuf:"bytes,2,rep,name=total,proto3" json:"total,omitempty"` +} + +func (x *QueryDelegationTotalRewardsResponse) Reset() { + *x = QueryDelegationTotalRewardsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegationTotalRewardsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {} + +// Deprecated: Use QueryDelegationTotalRewardsResponse.ProtoReflect.Descriptor instead. +func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryDelegationTotalRewardsResponse) GetRewards() []*DelegationDelegatorReward { + if x != nil { + return x.Rewards + } + return nil +} + +func (x *QueryDelegationTotalRewardsResponse) GetTotal() []*types.DecCoin { + if x != nil { + return x.Total + } + return nil +} + +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. +type QueryDelegatorValidatorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (x *QueryDelegatorValidatorsRequest) Reset() { + *x = QueryDelegatorValidatorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegatorValidatorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegatorValidatorsRequest) ProtoMessage() {} + +// Deprecated: Use QueryDelegatorValidatorsRequest.ProtoReflect.Descriptor instead. +func (*QueryDelegatorValidatorsRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{14} +} + +func (x *QueryDelegatorValidatorsRequest) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +type QueryDelegatorValidatorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // validators defines the validators a delegator is delegating for. + Validators []string `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` +} + +func (x *QueryDelegatorValidatorsResponse) Reset() { + *x = QueryDelegatorValidatorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegatorValidatorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} + +// Deprecated: Use QueryDelegatorValidatorsResponse.ProtoReflect.Descriptor instead. +func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{15} +} + +func (x *QueryDelegatorValidatorsResponse) GetValidators() []string { + if x != nil { + return x.Validators + } + return nil +} + +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (x *QueryDelegatorWithdrawAddressRequest) Reset() { + *x = QueryDelegatorWithdrawAddressRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegatorWithdrawAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage() {} + +// Deprecated: Use QueryDelegatorWithdrawAddressRequest.ProtoReflect.Descriptor instead. +func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{16} +} + +func (x *QueryDelegatorWithdrawAddressRequest) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // withdraw_address defines the delegator address to query for. + WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (x *QueryDelegatorWithdrawAddressResponse) Reset() { + *x = QueryDelegatorWithdrawAddressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDelegatorWithdrawAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} + +// Deprecated: Use QueryDelegatorWithdrawAddressResponse.ProtoReflect.Descriptor instead. +func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{17} +} + +func (x *QueryDelegatorWithdrawAddressResponse) GetWithdrawAddress() string { + if x != nil { + return x.WithdrawAddress + } + return "" +} + +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. +type QueryCommunityPoolRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryCommunityPoolRequest) Reset() { + *x = QueryCommunityPoolRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCommunityPoolRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCommunityPoolRequest) ProtoMessage() {} + +// Deprecated: Use QueryCommunityPoolRequest.ProtoReflect.Descriptor instead. +func (*QueryCommunityPoolRequest) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{18} +} + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +type QueryCommunityPoolResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pool defines community pool's coins. + Pool []*types.DecCoin `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"` +} + +func (x *QueryCommunityPoolResponse) Reset() { + *x = QueryCommunityPoolResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_query_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCommunityPoolResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCommunityPoolResponse) ProtoMessage() {} + +// Deprecated: Use QueryCommunityPoolResponse.ProtoReflect.Descriptor instead. +func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_query_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryCommunityPoolResponse) GetPool() []*types.DecCoin { + if x != nil { + return x.Pool + } + return nil +} + +var File_manifest_distribution_v1beta1_query_proto protoreflect.FileDescriptor + +var file_manifest_distribution_v1beta1_query_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x5f, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x77, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xee, 0x02, 0x0a, 0x26, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x62, 0x6f, 0x6e, + 0x64, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x73, 0x65, 0x6c, 0x66, 0x42, 0x6f, 0x6e, + 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x71, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x33, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, + 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x27, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, + 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x22, 0x71, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x02, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0x88, + 0xa0, 0x1f, 0x00, 0x22, 0xc1, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x07, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x47, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, + 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, + 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, + 0x75, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xf2, 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, + 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x38, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x6c, 0x0a, + 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x72, 0x0a, 0x1f, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, + 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, + 0x4c, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x77, 0x0a, + 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x76, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x1b, + 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x1a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x04, 0x70, 0x6f, + 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x38, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x32, 0xec, 0x11, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x9c, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x31, 0x2e, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0xed, 0x01, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x2e, + 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, + 0x87, 0x02, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, + 0x46, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, + 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0xe6, 0x01, 0x0a, 0x13, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x3e, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3f, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0xda, 0x01, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x3b, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, + 0xf1, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x3c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x5f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x12, 0x57, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, + 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x7d, 0x12, 0xec, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x41, + 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x42, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x12, 0xe6, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x48, 0x12, 0x46, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xfb, 0x01, 0x0a, 0x18, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, + 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0xb9, 0x01, 0x0a, 0x0d, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x38, 0x2e, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x42, 0xa2, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, + 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x44, 0x58, 0xaa, 0x02, 0x1d, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1d, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x29, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x4d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_manifest_distribution_v1beta1_query_proto_rawDescOnce sync.Once + file_manifest_distribution_v1beta1_query_proto_rawDescData = file_manifest_distribution_v1beta1_query_proto_rawDesc +) + +func file_manifest_distribution_v1beta1_query_proto_rawDescGZIP() []byte { + file_manifest_distribution_v1beta1_query_proto_rawDescOnce.Do(func() { + file_manifest_distribution_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_distribution_v1beta1_query_proto_rawDescData) + }) + return file_manifest_distribution_v1beta1_query_proto_rawDescData +} + +var file_manifest_distribution_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_manifest_distribution_v1beta1_query_proto_goTypes = []interface{}{ + (*QueryParamsRequest)(nil), // 0: manifest.distribution.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: manifest.distribution.v1beta1.QueryParamsResponse + (*QueryValidatorDistributionInfoRequest)(nil), // 2: manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest + (*QueryValidatorDistributionInfoResponse)(nil), // 3: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse + (*QueryValidatorOutstandingRewardsRequest)(nil), // 4: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + (*QueryValidatorOutstandingRewardsResponse)(nil), // 5: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + (*QueryValidatorCommissionRequest)(nil), // 6: manifest.distribution.v1beta1.QueryValidatorCommissionRequest + (*QueryValidatorCommissionResponse)(nil), // 7: manifest.distribution.v1beta1.QueryValidatorCommissionResponse + (*QueryValidatorSlashesRequest)(nil), // 8: manifest.distribution.v1beta1.QueryValidatorSlashesRequest + (*QueryValidatorSlashesResponse)(nil), // 9: manifest.distribution.v1beta1.QueryValidatorSlashesResponse + (*QueryDelegationRewardsRequest)(nil), // 10: manifest.distribution.v1beta1.QueryDelegationRewardsRequest + (*QueryDelegationRewardsResponse)(nil), // 11: manifest.distribution.v1beta1.QueryDelegationRewardsResponse + (*QueryDelegationTotalRewardsRequest)(nil), // 12: manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest + (*QueryDelegationTotalRewardsResponse)(nil), // 13: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse + (*QueryDelegatorValidatorsRequest)(nil), // 14: manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest + (*QueryDelegatorValidatorsResponse)(nil), // 15: manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse + (*QueryDelegatorWithdrawAddressRequest)(nil), // 16: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + (*QueryDelegatorWithdrawAddressResponse)(nil), // 17: manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + (*QueryCommunityPoolRequest)(nil), // 18: manifest.distribution.v1beta1.QueryCommunityPoolRequest + (*QueryCommunityPoolResponse)(nil), // 19: manifest.distribution.v1beta1.QueryCommunityPoolResponse + (*Params)(nil), // 20: manifest.distribution.v1beta1.Params + (*types.DecCoin)(nil), // 21: cosmos.base.v1beta1.DecCoin + (*ValidatorOutstandingRewards)(nil), // 22: manifest.distribution.v1beta1.ValidatorOutstandingRewards + (*ValidatorAccumulatedCommission)(nil), // 23: manifest.distribution.v1beta1.ValidatorAccumulatedCommission + (*query.PageRequest)(nil), // 24: cosmos.base.query.v1beta1.PageRequest + (*ValidatorSlashEvent)(nil), // 25: manifest.distribution.v1beta1.ValidatorSlashEvent + (*query.PageResponse)(nil), // 26: cosmos.base.query.v1beta1.PageResponse + (*DelegationDelegatorReward)(nil), // 27: manifest.distribution.v1beta1.DelegationDelegatorReward +} +var file_manifest_distribution_v1beta1_query_proto_depIdxs = []int32{ + 20, // 0: manifest.distribution.v1beta1.QueryParamsResponse.params:type_name -> manifest.distribution.v1beta1.Params + 21, // 1: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.self_bond_rewards:type_name -> cosmos.base.v1beta1.DecCoin + 21, // 2: manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse.commission:type_name -> cosmos.base.v1beta1.DecCoin + 22, // 3: manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards:type_name -> manifest.distribution.v1beta1.ValidatorOutstandingRewards + 23, // 4: manifest.distribution.v1beta1.QueryValidatorCommissionResponse.commission:type_name -> manifest.distribution.v1beta1.ValidatorAccumulatedCommission + 24, // 5: manifest.distribution.v1beta1.QueryValidatorSlashesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 25, // 6: manifest.distribution.v1beta1.QueryValidatorSlashesResponse.slashes:type_name -> manifest.distribution.v1beta1.ValidatorSlashEvent + 26, // 7: manifest.distribution.v1beta1.QueryValidatorSlashesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 8: manifest.distribution.v1beta1.QueryDelegationRewardsResponse.rewards:type_name -> cosmos.base.v1beta1.DecCoin + 27, // 9: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards:type_name -> manifest.distribution.v1beta1.DelegationDelegatorReward + 21, // 10: manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total:type_name -> cosmos.base.v1beta1.DecCoin + 21, // 11: manifest.distribution.v1beta1.QueryCommunityPoolResponse.pool:type_name -> cosmos.base.v1beta1.DecCoin + 0, // 12: manifest.distribution.v1beta1.Query.Params:input_type -> manifest.distribution.v1beta1.QueryParamsRequest + 2, // 13: manifest.distribution.v1beta1.Query.ValidatorDistributionInfo:input_type -> manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest + 4, // 14: manifest.distribution.v1beta1.Query.ValidatorOutstandingRewards:input_type -> manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + 6, // 15: manifest.distribution.v1beta1.Query.ValidatorCommission:input_type -> manifest.distribution.v1beta1.QueryValidatorCommissionRequest + 8, // 16: manifest.distribution.v1beta1.Query.ValidatorSlashes:input_type -> manifest.distribution.v1beta1.QueryValidatorSlashesRequest + 10, // 17: manifest.distribution.v1beta1.Query.DelegationRewards:input_type -> manifest.distribution.v1beta1.QueryDelegationRewardsRequest + 12, // 18: manifest.distribution.v1beta1.Query.DelegationTotalRewards:input_type -> manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest + 14, // 19: manifest.distribution.v1beta1.Query.DelegatorValidators:input_type -> manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest + 16, // 20: manifest.distribution.v1beta1.Query.DelegatorWithdrawAddress:input_type -> manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + 18, // 21: manifest.distribution.v1beta1.Query.CommunityPool:input_type -> manifest.distribution.v1beta1.QueryCommunityPoolRequest + 1, // 22: manifest.distribution.v1beta1.Query.Params:output_type -> manifest.distribution.v1beta1.QueryParamsResponse + 3, // 23: manifest.distribution.v1beta1.Query.ValidatorDistributionInfo:output_type -> manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse + 5, // 24: manifest.distribution.v1beta1.Query.ValidatorOutstandingRewards:output_type -> manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + 7, // 25: manifest.distribution.v1beta1.Query.ValidatorCommission:output_type -> manifest.distribution.v1beta1.QueryValidatorCommissionResponse + 9, // 26: manifest.distribution.v1beta1.Query.ValidatorSlashes:output_type -> manifest.distribution.v1beta1.QueryValidatorSlashesResponse + 11, // 27: manifest.distribution.v1beta1.Query.DelegationRewards:output_type -> manifest.distribution.v1beta1.QueryDelegationRewardsResponse + 13, // 28: manifest.distribution.v1beta1.Query.DelegationTotalRewards:output_type -> manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse + 15, // 29: manifest.distribution.v1beta1.Query.DelegatorValidators:output_type -> manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse + 17, // 30: manifest.distribution.v1beta1.Query.DelegatorWithdrawAddress:output_type -> manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + 19, // 31: manifest.distribution.v1beta1.Query.CommunityPool:output_type -> manifest.distribution.v1beta1.QueryCommunityPoolResponse + 22, // [22:32] is the sub-list for method output_type + 12, // [12:22] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_manifest_distribution_v1beta1_query_proto_init() } +func file_manifest_distribution_v1beta1_query_proto_init() { + if File_manifest_distribution_v1beta1_query_proto != nil { + return + } + file_manifest_distribution_v1beta1_distribution_proto_init() + if !protoimpl.UnsafeEnabled { + file_manifest_distribution_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorDistributionInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorDistributionInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorOutstandingRewardsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorOutstandingRewardsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorCommissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorCommissionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorSlashesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryValidatorSlashesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegationRewardsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegationRewardsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegationTotalRewardsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegationTotalRewardsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegatorValidatorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegatorValidatorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegatorWithdrawAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDelegatorWithdrawAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCommunityPoolRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCommunityPoolResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_manifest_distribution_v1beta1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_manifest_distribution_v1beta1_query_proto_goTypes, + DependencyIndexes: file_manifest_distribution_v1beta1_query_proto_depIdxs, + MessageInfos: file_manifest_distribution_v1beta1_query_proto_msgTypes, + }.Build() + File_manifest_distribution_v1beta1_query_proto = out.File + file_manifest_distribution_v1beta1_query_proto_rawDesc = nil + file_manifest_distribution_v1beta1_query_proto_goTypes = nil + file_manifest_distribution_v1beta1_query_proto_depIdxs = nil +} diff --git a/api/distribution/v1beta1/query_grpc.pb.go b/api/distribution/v1beta1/query_grpc.pb.go new file mode 100644 index 0000000..77c1b54 --- /dev/null +++ b/api/distribution/v1beta1/query_grpc.pb.go @@ -0,0 +1,464 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: manifest/distribution/v1beta1/query.proto + +package distributionv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_Params_FullMethodName = "/manifest.distribution.v1beta1.Query/Params" + Query_ValidatorDistributionInfo_FullMethodName = "/manifest.distribution.v1beta1.Query/ValidatorDistributionInfo" + Query_ValidatorOutstandingRewards_FullMethodName = "/manifest.distribution.v1beta1.Query/ValidatorOutstandingRewards" + Query_ValidatorCommission_FullMethodName = "/manifest.distribution.v1beta1.Query/ValidatorCommission" + Query_ValidatorSlashes_FullMethodName = "/manifest.distribution.v1beta1.Query/ValidatorSlashes" + Query_DelegationRewards_FullMethodName = "/manifest.distribution.v1beta1.Query/DelegationRewards" + Query_DelegationTotalRewards_FullMethodName = "/manifest.distribution.v1beta1.Query/DelegationTotalRewards" + Query_DelegatorValidators_FullMethodName = "/manifest.distribution.v1beta1.Query/DelegatorValidators" + Query_DelegatorWithdrawAddress_FullMethodName = "/manifest.distribution.v1beta1.Query/DelegatorWithdrawAddress" + Query_CommunityPool_FullMethodName = "/manifest.distribution.v1beta1.Query/CommunityPool" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Params queries params of the distribution module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) + // ValidatorOutstandingRewards queries rewards of a validator address. + ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) + // ValidatorCommission queries accumulated commission for a validator. + ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) + // ValidatorSlashes queries slash events of a validator. + ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) + // DelegationRewards queries the total rewards accrued by a delegation. + DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) + // DelegationTotalRewards queries the total rewards accrued by each + // validator. + DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) + // DelegatorValidators queries the validators of a delegator. + DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) + // DelegatorWithdrawAddress queries withdraw address of a delegator. + DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) + // CommunityPool queries the community pool coins. + CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) { + out := new(QueryValidatorDistributionInfoResponse) + err := c.cc.Invoke(ctx, Query_ValidatorDistributionInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) { + out := new(QueryValidatorOutstandingRewardsResponse) + err := c.cc.Invoke(ctx, Query_ValidatorOutstandingRewards_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) { + out := new(QueryValidatorCommissionResponse) + err := c.cc.Invoke(ctx, Query_ValidatorCommission_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) { + out := new(QueryValidatorSlashesResponse) + err := c.cc.Invoke(ctx, Query_ValidatorSlashes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) { + out := new(QueryDelegationRewardsResponse) + err := c.cc.Invoke(ctx, Query_DelegationRewards_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) { + out := new(QueryDelegationTotalRewardsResponse) + err := c.cc.Invoke(ctx, Query_DelegationTotalRewards_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { + out := new(QueryDelegatorValidatorsResponse) + err := c.cc.Invoke(ctx, Query_DelegatorValidators_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) { + out := new(QueryDelegatorWithdrawAddressResponse) + err := c.cc.Invoke(ctx, Query_DelegatorWithdrawAddress_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) { + out := new(QueryCommunityPoolResponse) + err := c.cc.Invoke(ctx, Query_CommunityPool_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // Params queries params of the distribution module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + ValidatorDistributionInfo(context.Context, *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error) + // ValidatorOutstandingRewards queries rewards of a validator address. + ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) + // ValidatorCommission queries accumulated commission for a validator. + ValidatorCommission(context.Context, *QueryValidatorCommissionRequest) (*QueryValidatorCommissionResponse, error) + // ValidatorSlashes queries slash events of a validator. + ValidatorSlashes(context.Context, *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) + // DelegationRewards queries the total rewards accrued by a delegation. + DelegationRewards(context.Context, *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) + // DelegationTotalRewards queries the total rewards accrued by each + // validator. + DelegationTotalRewards(context.Context, *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) + // DelegatorValidators queries the validators of a delegator. + DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) + // DelegatorWithdrawAddress queries withdraw address of a delegator. + DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) + // CommunityPool queries the community pool coins. + CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) ValidatorDistributionInfo(context.Context, *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorDistributionInfo not implemented") +} +func (UnimplementedQueryServer) ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorOutstandingRewards not implemented") +} +func (UnimplementedQueryServer) ValidatorCommission(context.Context, *QueryValidatorCommissionRequest) (*QueryValidatorCommissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorCommission not implemented") +} +func (UnimplementedQueryServer) ValidatorSlashes(context.Context, *QueryValidatorSlashesRequest) (*QueryValidatorSlashesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorSlashes not implemented") +} +func (UnimplementedQueryServer) DelegationRewards(context.Context, *QueryDelegationRewardsRequest) (*QueryDelegationRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegationRewards not implemented") +} +func (UnimplementedQueryServer) DelegationTotalRewards(context.Context, *QueryDelegationTotalRewardsRequest) (*QueryDelegationTotalRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegationTotalRewards not implemented") +} +func (UnimplementedQueryServer) DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidators not implemented") +} +func (UnimplementedQueryServer) DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorWithdrawAddress not implemented") +} +func (UnimplementedQueryServer) CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommunityPool not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorDistributionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorDistributionInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorDistributionInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ValidatorDistributionInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorDistributionInfo(ctx, req.(*QueryValidatorDistributionInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorOutstandingRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorOutstandingRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorOutstandingRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ValidatorOutstandingRewards_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorOutstandingRewards(ctx, req.(*QueryValidatorOutstandingRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorCommission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorCommissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorCommission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ValidatorCommission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorCommission(ctx, req.(*QueryValidatorCommissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ValidatorSlashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorSlashesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorSlashes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ValidatorSlashes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorSlashes(ctx, req.(*QueryValidatorSlashesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegationRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegationRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegationRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_DelegationRewards_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegationRewards(ctx, req.(*QueryDelegationRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegationTotalRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegationTotalRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegationTotalRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_DelegationTotalRewards_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegationTotalRewards(ctx, req.(*QueryDelegationTotalRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegatorValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorValidatorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegatorValidators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_DelegatorValidators_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorValidators(ctx, req.(*QueryDelegatorValidatorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DelegatorWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorWithdrawAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegatorWithdrawAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_DelegatorWithdrawAddress_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorWithdrawAddress(ctx, req.(*QueryDelegatorWithdrawAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCommunityPoolRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CommunityPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CommunityPool_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CommunityPool(ctx, req.(*QueryCommunityPoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "manifest.distribution.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "ValidatorDistributionInfo", + Handler: _Query_ValidatorDistributionInfo_Handler, + }, + { + MethodName: "ValidatorOutstandingRewards", + Handler: _Query_ValidatorOutstandingRewards_Handler, + }, + { + MethodName: "ValidatorCommission", + Handler: _Query_ValidatorCommission_Handler, + }, + { + MethodName: "ValidatorSlashes", + Handler: _Query_ValidatorSlashes_Handler, + }, + { + MethodName: "DelegationRewards", + Handler: _Query_DelegationRewards_Handler, + }, + { + MethodName: "DelegationTotalRewards", + Handler: _Query_DelegationTotalRewards_Handler, + }, + { + MethodName: "DelegatorValidators", + Handler: _Query_DelegatorValidators_Handler, + }, + { + MethodName: "DelegatorWithdrawAddress", + Handler: _Query_DelegatorWithdrawAddress_Handler, + }, + { + MethodName: "CommunityPool", + Handler: _Query_CommunityPool_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "manifest/distribution/v1beta1/query.proto", +} diff --git a/api/distribution/v1beta1/tx.pulsar.go b/api/distribution/v1beta1/tx.pulsar.go new file mode 100644 index 0000000..1ff0396 --- /dev/null +++ b/api/distribution/v1beta1/tx.pulsar.go @@ -0,0 +1,7546 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package distributionv1beta1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + types "cosmossdk.io/api/cosmos/base/v1beta1" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgSetWithdrawAddress protoreflect.MessageDescriptor + fd_MsgSetWithdrawAddress_delegator_address protoreflect.FieldDescriptor + fd_MsgSetWithdrawAddress_withdraw_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgSetWithdrawAddress = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgSetWithdrawAddress") + fd_MsgSetWithdrawAddress_delegator_address = md_MsgSetWithdrawAddress.Fields().ByName("delegator_address") + fd_MsgSetWithdrawAddress_withdraw_address = md_MsgSetWithdrawAddress.Fields().ByName("withdraw_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetWithdrawAddress)(nil) + +type fastReflection_MsgSetWithdrawAddress MsgSetWithdrawAddress + +func (x *MsgSetWithdrawAddress) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetWithdrawAddress)(x) +} + +func (x *MsgSetWithdrawAddress) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSetWithdrawAddress_messageType fastReflection_MsgSetWithdrawAddress_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetWithdrawAddress_messageType{} + +type fastReflection_MsgSetWithdrawAddress_messageType struct{} + +func (x fastReflection_MsgSetWithdrawAddress_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetWithdrawAddress)(nil) +} +func (x fastReflection_MsgSetWithdrawAddress_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetWithdrawAddress) +} +func (x fastReflection_MsgSetWithdrawAddress_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetWithdrawAddress +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetWithdrawAddress) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetWithdrawAddress +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetWithdrawAddress) Type() protoreflect.MessageType { + return _fastReflection_MsgSetWithdrawAddress_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetWithdrawAddress) New() protoreflect.Message { + return new(fastReflection_MsgSetWithdrawAddress) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetWithdrawAddress) Interface() protoreflect.ProtoMessage { + return (*MsgSetWithdrawAddress)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetWithdrawAddress) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_MsgSetWithdrawAddress_delegator_address, value) { + return + } + } + if x.WithdrawAddress != "" { + value := protoreflect.ValueOfString(x.WithdrawAddress) + if !f(fd_MsgSetWithdrawAddress_withdraw_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetWithdrawAddress) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": + return x.DelegatorAddress != "" + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": + return x.WithdrawAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddress")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddress does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddress) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": + x.DelegatorAddress = "" + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": + x.WithdrawAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddress")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddress does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetWithdrawAddress) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": + value := x.WithdrawAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddress")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddress does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddress) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": + x.DelegatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": + x.WithdrawAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddress")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddress does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddress) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.MsgSetWithdrawAddress is not mutable")) + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": + panic(fmt.Errorf("field withdraw_address of message manifest.distribution.v1beta1.MsgSetWithdrawAddress is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddress")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddress does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetWithdrawAddress) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.delegator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgSetWithdrawAddress.withdraw_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddress")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddress does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetWithdrawAddress) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgSetWithdrawAddress", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetWithdrawAddress) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddress) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetWithdrawAddress) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetWithdrawAddress) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetWithdrawAddress) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.WithdrawAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetWithdrawAddress) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.WithdrawAddress) > 0 { + i -= len(x.WithdrawAddress) + copy(dAtA[i:], x.WithdrawAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetWithdrawAddress) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetWithdrawAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetWithdrawAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.WithdrawAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSetWithdrawAddressResponse protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgSetWithdrawAddressResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgSetWithdrawAddressResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetWithdrawAddressResponse)(nil) + +type fastReflection_MsgSetWithdrawAddressResponse MsgSetWithdrawAddressResponse + +func (x *MsgSetWithdrawAddressResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetWithdrawAddressResponse)(x) +} + +func (x *MsgSetWithdrawAddressResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSetWithdrawAddressResponse_messageType fastReflection_MsgSetWithdrawAddressResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetWithdrawAddressResponse_messageType{} + +type fastReflection_MsgSetWithdrawAddressResponse_messageType struct{} + +func (x fastReflection_MsgSetWithdrawAddressResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetWithdrawAddressResponse)(nil) +} +func (x fastReflection_MsgSetWithdrawAddressResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetWithdrawAddressResponse) +} +func (x fastReflection_MsgSetWithdrawAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetWithdrawAddressResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetWithdrawAddressResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSetWithdrawAddressResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetWithdrawAddressResponse) New() protoreflect.Message { + return new(fastReflection_MsgSetWithdrawAddressResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSetWithdrawAddressResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetWithdrawAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetWithdrawAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetWithdrawAddressResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetWithdrawAddressResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetWithdrawAddressResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetWithdrawAddressResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetWithdrawAddressResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetWithdrawAddressResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetWithdrawAddressResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetWithdrawAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgWithdrawDelegatorReward protoreflect.MessageDescriptor + fd_MsgWithdrawDelegatorReward_delegator_address protoreflect.FieldDescriptor + fd_MsgWithdrawDelegatorReward_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgWithdrawDelegatorReward = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawDelegatorReward") + fd_MsgWithdrawDelegatorReward_delegator_address = md_MsgWithdrawDelegatorReward.Fields().ByName("delegator_address") + fd_MsgWithdrawDelegatorReward_validator_address = md_MsgWithdrawDelegatorReward.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawDelegatorReward)(nil) + +type fastReflection_MsgWithdrawDelegatorReward MsgWithdrawDelegatorReward + +func (x *MsgWithdrawDelegatorReward) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawDelegatorReward)(x) +} + +func (x *MsgWithdrawDelegatorReward) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgWithdrawDelegatorReward_messageType fastReflection_MsgWithdrawDelegatorReward_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawDelegatorReward_messageType{} + +type fastReflection_MsgWithdrawDelegatorReward_messageType struct{} + +func (x fastReflection_MsgWithdrawDelegatorReward_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawDelegatorReward)(nil) +} +func (x fastReflection_MsgWithdrawDelegatorReward_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawDelegatorReward) +} +func (x fastReflection_MsgWithdrawDelegatorReward_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawDelegatorReward +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawDelegatorReward) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawDelegatorReward +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdrawDelegatorReward) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawDelegatorReward_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawDelegatorReward) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawDelegatorReward) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawDelegatorReward) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawDelegatorReward)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdrawDelegatorReward) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DelegatorAddress != "" { + value := protoreflect.ValueOfString(x.DelegatorAddress) + if !f(fd_MsgWithdrawDelegatorReward_delegator_address, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgWithdrawDelegatorReward_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawDelegatorReward) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": + return x.DelegatorAddress != "" + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorReward) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": + x.DelegatorAddress = "" + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdrawDelegatorReward) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": + value := x.DelegatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorReward) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": + x.DelegatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorReward) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": + panic(fmt.Errorf("field delegator_address of message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward is not mutable")) + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdrawDelegatorReward) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.delegator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorReward does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdrawDelegatorReward) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgWithdrawDelegatorReward", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdrawDelegatorReward) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorReward) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdrawDelegatorReward) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdrawDelegatorReward) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawDelegatorReward) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DelegatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawDelegatorReward) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DelegatorAddress) > 0 { + i -= len(x.DelegatorAddress) + copy(dAtA[i:], x.DelegatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawDelegatorReward) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawDelegatorReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawDelegatorReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgWithdrawDelegatorRewardResponse_1_list)(nil) + +type _MsgWithdrawDelegatorRewardResponse_1_list struct { + list *[]*types.Coin +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawDelegatorRewardResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawDelegatorRewardResponse protoreflect.MessageDescriptor + fd_MsgWithdrawDelegatorRewardResponse_amount protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgWithdrawDelegatorRewardResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawDelegatorRewardResponse") + fd_MsgWithdrawDelegatorRewardResponse_amount = md_MsgWithdrawDelegatorRewardResponse.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawDelegatorRewardResponse)(nil) + +type fastReflection_MsgWithdrawDelegatorRewardResponse MsgWithdrawDelegatorRewardResponse + +func (x *MsgWithdrawDelegatorRewardResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawDelegatorRewardResponse)(x) +} + +func (x *MsgWithdrawDelegatorRewardResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgWithdrawDelegatorRewardResponse_messageType fastReflection_MsgWithdrawDelegatorRewardResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawDelegatorRewardResponse_messageType{} + +type fastReflection_MsgWithdrawDelegatorRewardResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawDelegatorRewardResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawDelegatorRewardResponse)(nil) +} +func (x fastReflection_MsgWithdrawDelegatorRewardResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawDelegatorRewardResponse) +} +func (x fastReflection_MsgWithdrawDelegatorRewardResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawDelegatorRewardResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawDelegatorRewardResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawDelegatorRewardResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawDelegatorRewardResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawDelegatorRewardResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawDelegatorRewardResponse_1_list{list: &x.Amount}) + if !f(fd_MsgWithdrawDelegatorRewardResponse_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawDelegatorRewardResponse_1_list{}) + } + listValue := &_MsgWithdrawDelegatorRewardResponse_1_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": + lv := value.List() + clv := lv.(*_MsgWithdrawDelegatorRewardResponse_1_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": + if x.Amount == nil { + x.Amount = []*types.Coin{} + } + value := &_MsgWithdrawDelegatorRewardResponse_1_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawDelegatorRewardResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdrawDelegatorRewardResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawDelegatorRewardResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawDelegatorRewardResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawDelegatorRewardResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawDelegatorRewardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawDelegatorRewardResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgWithdrawValidatorCommission protoreflect.MessageDescriptor + fd_MsgWithdrawValidatorCommission_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgWithdrawValidatorCommission = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawValidatorCommission") + fd_MsgWithdrawValidatorCommission_validator_address = md_MsgWithdrawValidatorCommission.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawValidatorCommission)(nil) + +type fastReflection_MsgWithdrawValidatorCommission MsgWithdrawValidatorCommission + +func (x *MsgWithdrawValidatorCommission) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawValidatorCommission)(x) +} + +func (x *MsgWithdrawValidatorCommission) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgWithdrawValidatorCommission_messageType fastReflection_MsgWithdrawValidatorCommission_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawValidatorCommission_messageType{} + +type fastReflection_MsgWithdrawValidatorCommission_messageType struct{} + +func (x fastReflection_MsgWithdrawValidatorCommission_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawValidatorCommission)(nil) +} +func (x fastReflection_MsgWithdrawValidatorCommission_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawValidatorCommission) +} +func (x fastReflection_MsgWithdrawValidatorCommission_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawValidatorCommission +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawValidatorCommission) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawValidatorCommission +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdrawValidatorCommission) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawValidatorCommission_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawValidatorCommission) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawValidatorCommission) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawValidatorCommission) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawValidatorCommission)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdrawValidatorCommission) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgWithdrawValidatorCommission_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawValidatorCommission) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommission) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdrawValidatorCommission) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommission) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommission) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdrawValidatorCommission) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommission does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdrawValidatorCommission) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgWithdrawValidatorCommission", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdrawValidatorCommission) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommission) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdrawValidatorCommission) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdrawValidatorCommission) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawValidatorCommission) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawValidatorCommission) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawValidatorCommission) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawValidatorCommission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawValidatorCommission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgWithdrawValidatorCommissionResponse_1_list)(nil) + +type _MsgWithdrawValidatorCommissionResponse_1_list struct { + list *[]*types.Coin +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawValidatorCommissionResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawValidatorCommissionResponse protoreflect.MessageDescriptor + fd_MsgWithdrawValidatorCommissionResponse_amount protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgWithdrawValidatorCommissionResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgWithdrawValidatorCommissionResponse") + fd_MsgWithdrawValidatorCommissionResponse_amount = md_MsgWithdrawValidatorCommissionResponse.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawValidatorCommissionResponse)(nil) + +type fastReflection_MsgWithdrawValidatorCommissionResponse MsgWithdrawValidatorCommissionResponse + +func (x *MsgWithdrawValidatorCommissionResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawValidatorCommissionResponse)(x) +} + +func (x *MsgWithdrawValidatorCommissionResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgWithdrawValidatorCommissionResponse_messageType fastReflection_MsgWithdrawValidatorCommissionResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawValidatorCommissionResponse_messageType{} + +type fastReflection_MsgWithdrawValidatorCommissionResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawValidatorCommissionResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawValidatorCommissionResponse)(nil) +} +func (x fastReflection_MsgWithdrawValidatorCommissionResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawValidatorCommissionResponse) +} +func (x fastReflection_MsgWithdrawValidatorCommissionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawValidatorCommissionResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawValidatorCommissionResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawValidatorCommissionResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawValidatorCommissionResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawValidatorCommissionResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawValidatorCommissionResponse_1_list{list: &x.Amount}) + if !f(fd_MsgWithdrawValidatorCommissionResponse_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawValidatorCommissionResponse_1_list{}) + } + listValue := &_MsgWithdrawValidatorCommissionResponse_1_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": + lv := value.List() + clv := lv.(*_MsgWithdrawValidatorCommissionResponse_1_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": + if x.Amount == nil { + x.Amount = []*types.Coin{} + } + value := &_MsgWithdrawValidatorCommissionResponse_1_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawValidatorCommissionResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgWithdrawValidatorCommissionResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawValidatorCommissionResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawValidatorCommissionResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgWithdrawValidatorCommissionResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawValidatorCommissionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawValidatorCommissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgFundCommunityPool_1_list)(nil) + +type _MsgFundCommunityPool_1_list struct { + list *[]*types.Coin +} + +func (x *_MsgFundCommunityPool_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgFundCommunityPool_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgFundCommunityPool_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgFundCommunityPool_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgFundCommunityPool_1_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgFundCommunityPool_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgFundCommunityPool_1_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgFundCommunityPool_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgFundCommunityPool protoreflect.MessageDescriptor + fd_MsgFundCommunityPool_amount protoreflect.FieldDescriptor + fd_MsgFundCommunityPool_depositor protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgFundCommunityPool = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgFundCommunityPool") + fd_MsgFundCommunityPool_amount = md_MsgFundCommunityPool.Fields().ByName("amount") + fd_MsgFundCommunityPool_depositor = md_MsgFundCommunityPool.Fields().ByName("depositor") +} + +var _ protoreflect.Message = (*fastReflection_MsgFundCommunityPool)(nil) + +type fastReflection_MsgFundCommunityPool MsgFundCommunityPool + +func (x *MsgFundCommunityPool) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPool)(x) +} + +func (x *MsgFundCommunityPool) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgFundCommunityPool_messageType fastReflection_MsgFundCommunityPool_messageType +var _ protoreflect.MessageType = fastReflection_MsgFundCommunityPool_messageType{} + +type fastReflection_MsgFundCommunityPool_messageType struct{} + +func (x fastReflection_MsgFundCommunityPool_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPool)(nil) +} +func (x fastReflection_MsgFundCommunityPool_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPool) +} +func (x fastReflection_MsgFundCommunityPool_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPool +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFundCommunityPool) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPool +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgFundCommunityPool) Type() protoreflect.MessageType { + return _fastReflection_MsgFundCommunityPool_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFundCommunityPool) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPool) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFundCommunityPool) Interface() protoreflect.ProtoMessage { + return (*MsgFundCommunityPool)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgFundCommunityPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{list: &x.Amount}) + if !f(fd_MsgFundCommunityPool_amount, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_MsgFundCommunityPool_depositor, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgFundCommunityPool) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgFundCommunityPool.amount": + return len(x.Amount) != 0 + case "manifest.distribution.v1beta1.MsgFundCommunityPool.depositor": + return x.Depositor != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPool does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPool) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgFundCommunityPool.amount": + x.Amount = nil + case "manifest.distribution.v1beta1.MsgFundCommunityPool.depositor": + x.Depositor = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPool does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgFundCommunityPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgFundCommunityPool.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{}) + } + listValue := &_MsgFundCommunityPool_1_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + case "manifest.distribution.v1beta1.MsgFundCommunityPool.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPool does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgFundCommunityPool.amount": + lv := value.List() + clv := lv.(*_MsgFundCommunityPool_1_list) + x.Amount = *clv.list + case "manifest.distribution.v1beta1.MsgFundCommunityPool.depositor": + x.Depositor = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPool does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgFundCommunityPool.amount": + if x.Amount == nil { + x.Amount = []*types.Coin{} + } + value := &_MsgFundCommunityPool_1_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.MsgFundCommunityPool.depositor": + panic(fmt.Errorf("field depositor of message manifest.distribution.v1beta1.MsgFundCommunityPool is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPool does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgFundCommunityPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgFundCommunityPool.amount": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_MsgFundCommunityPool_1_list{list: &list}) + case "manifest.distribution.v1beta1.MsgFundCommunityPool.depositor": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPool does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgFundCommunityPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgFundCommunityPool", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgFundCommunityPool) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPool) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgFundCommunityPool) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgFundCommunityPool) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFundCommunityPool) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Depositor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgFundCommunityPool) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0x12 + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgFundCommunityPool) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgFundCommunityPoolResponse protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgFundCommunityPoolResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgFundCommunityPoolResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgFundCommunityPoolResponse)(nil) + +type fastReflection_MsgFundCommunityPoolResponse MsgFundCommunityPoolResponse + +func (x *MsgFundCommunityPoolResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPoolResponse)(x) +} + +func (x *MsgFundCommunityPoolResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgFundCommunityPoolResponse_messageType fastReflection_MsgFundCommunityPoolResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgFundCommunityPoolResponse_messageType{} + +type fastReflection_MsgFundCommunityPoolResponse_messageType struct{} + +func (x fastReflection_MsgFundCommunityPoolResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgFundCommunityPoolResponse)(nil) +} +func (x fastReflection_MsgFundCommunityPoolResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPoolResponse) +} +func (x fastReflection_MsgFundCommunityPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPoolResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgFundCommunityPoolResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgFundCommunityPoolResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgFundCommunityPoolResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgFundCommunityPoolResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgFundCommunityPoolResponse) New() protoreflect.Message { + return new(fastReflection_MsgFundCommunityPoolResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgFundCommunityPoolResponse) Interface() protoreflect.ProtoMessage { + return (*MsgFundCommunityPoolResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgFundCommunityPoolResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgFundCommunityPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPoolResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgFundCommunityPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPoolResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPoolResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgFundCommunityPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgFundCommunityPoolResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgFundCommunityPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgFundCommunityPoolResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgFundCommunityPoolResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgFundCommunityPoolResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgFundCommunityPoolResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgFundCommunityPoolResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgFundCommunityPoolResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgFundCommunityPoolResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgFundCommunityPoolResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgFundCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgUpdateParams = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgUpdateParams.authority": + return x.Authority != "" + case "manifest.distribution.v1beta1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgUpdateParams.authority": + x.Authority = "" + case "manifest.distribution.v1beta1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "manifest.distribution.v1beta1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message manifest.distribution.v1beta1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgUpdateParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgUpdateParamsResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgUpdateParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgCommunityPoolSpend_3_list)(nil) + +type _MsgCommunityPoolSpend_3_list struct { + list *[]*types.Coin +} + +func (x *_MsgCommunityPoolSpend_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCommunityPoolSpend_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCommunityPoolSpend_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCommunityPoolSpend_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCommunityPoolSpend_3_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCommunityPoolSpend_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCommunityPoolSpend_3_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCommunityPoolSpend_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCommunityPoolSpend protoreflect.MessageDescriptor + fd_MsgCommunityPoolSpend_authority protoreflect.FieldDescriptor + fd_MsgCommunityPoolSpend_recipient protoreflect.FieldDescriptor + fd_MsgCommunityPoolSpend_amount protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgCommunityPoolSpend = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgCommunityPoolSpend") + fd_MsgCommunityPoolSpend_authority = md_MsgCommunityPoolSpend.Fields().ByName("authority") + fd_MsgCommunityPoolSpend_recipient = md_MsgCommunityPoolSpend.Fields().ByName("recipient") + fd_MsgCommunityPoolSpend_amount = md_MsgCommunityPoolSpend.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgCommunityPoolSpend)(nil) + +type fastReflection_MsgCommunityPoolSpend MsgCommunityPoolSpend + +func (x *MsgCommunityPoolSpend) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpend)(x) +} + +func (x *MsgCommunityPoolSpend) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCommunityPoolSpend_messageType fastReflection_MsgCommunityPoolSpend_messageType +var _ protoreflect.MessageType = fastReflection_MsgCommunityPoolSpend_messageType{} + +type fastReflection_MsgCommunityPoolSpend_messageType struct{} + +func (x fastReflection_MsgCommunityPoolSpend_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpend)(nil) +} +func (x fastReflection_MsgCommunityPoolSpend_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpend) +} +func (x fastReflection_MsgCommunityPoolSpend_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpend +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCommunityPoolSpend) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpend +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCommunityPoolSpend) Type() protoreflect.MessageType { + return _fastReflection_MsgCommunityPoolSpend_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCommunityPoolSpend) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpend) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCommunityPoolSpend) Interface() protoreflect.ProtoMessage { + return (*MsgCommunityPoolSpend)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCommunityPoolSpend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCommunityPoolSpend_authority, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_MsgCommunityPoolSpend_recipient, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgCommunityPoolSpend_3_list{list: &x.Amount}) + if !f(fd_MsgCommunityPoolSpend_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCommunityPoolSpend) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.authority": + return x.Authority != "" + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.recipient": + return x.Recipient != "" + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpend does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpend) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.authority": + x.Authority = "" + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.recipient": + x.Recipient = "" + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpend does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCommunityPoolSpend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgCommunityPoolSpend_3_list{}) + } + listValue := &_MsgCommunityPoolSpend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpend does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.authority": + x.Authority = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.recipient": + x.Recipient = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount": + lv := value.List() + clv := lv.(*_MsgCommunityPoolSpend_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpend does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount": + if x.Amount == nil { + x.Amount = []*types.Coin{} + } + value := &_MsgCommunityPoolSpend_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.authority": + panic(fmt.Errorf("field authority of message manifest.distribution.v1beta1.MsgCommunityPoolSpend is not mutable")) + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.recipient": + panic(fmt.Errorf("field recipient of message manifest.distribution.v1beta1.MsgCommunityPoolSpend is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpend does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCommunityPoolSpend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.authority": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.recipient": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_MsgCommunityPoolSpend_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpend")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpend does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCommunityPoolSpend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgCommunityPoolSpend", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCommunityPoolSpend) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpend) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCommunityPoolSpend) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCommunityPoolSpend) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCommunityPoolSpend) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCommunityPoolSpend) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCommunityPoolSpend) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCommunityPoolSpend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCommunityPoolSpend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCommunityPoolSpendResponse protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgCommunityPoolSpendResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgCommunityPoolSpendResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCommunityPoolSpendResponse)(nil) + +type fastReflection_MsgCommunityPoolSpendResponse MsgCommunityPoolSpendResponse + +func (x *MsgCommunityPoolSpendResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpendResponse)(x) +} + +func (x *MsgCommunityPoolSpendResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCommunityPoolSpendResponse_messageType fastReflection_MsgCommunityPoolSpendResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCommunityPoolSpendResponse_messageType{} + +type fastReflection_MsgCommunityPoolSpendResponse_messageType struct{} + +func (x fastReflection_MsgCommunityPoolSpendResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCommunityPoolSpendResponse)(nil) +} +func (x fastReflection_MsgCommunityPoolSpendResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpendResponse) +} +func (x fastReflection_MsgCommunityPoolSpendResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpendResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCommunityPoolSpendResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCommunityPoolSpendResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCommunityPoolSpendResponse) New() protoreflect.Message { + return new(fastReflection_MsgCommunityPoolSpendResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCommunityPoolSpendResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpendResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCommunityPoolSpendResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCommunityPoolSpendResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCommunityPoolSpendResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCommunityPoolSpendResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCommunityPoolSpendResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCommunityPoolSpendResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCommunityPoolSpendResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCommunityPoolSpendResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCommunityPoolSpendResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCommunityPoolSpendResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCommunityPoolSpendResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgDepositValidatorRewardsPool_3_list)(nil) + +type _MsgDepositValidatorRewardsPool_3_list struct { + list *[]*types.Coin +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgDepositValidatorRewardsPool_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgDepositValidatorRewardsPool protoreflect.MessageDescriptor + fd_MsgDepositValidatorRewardsPool_depositor protoreflect.FieldDescriptor + fd_MsgDepositValidatorRewardsPool_validator_address protoreflect.FieldDescriptor + fd_MsgDepositValidatorRewardsPool_amount protoreflect.FieldDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgDepositValidatorRewardsPool = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgDepositValidatorRewardsPool") + fd_MsgDepositValidatorRewardsPool_depositor = md_MsgDepositValidatorRewardsPool.Fields().ByName("depositor") + fd_MsgDepositValidatorRewardsPool_validator_address = md_MsgDepositValidatorRewardsPool.Fields().ByName("validator_address") + fd_MsgDepositValidatorRewardsPool_amount = md_MsgDepositValidatorRewardsPool.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_MsgDepositValidatorRewardsPool)(nil) + +type fastReflection_MsgDepositValidatorRewardsPool MsgDepositValidatorRewardsPool + +func (x *MsgDepositValidatorRewardsPool) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositValidatorRewardsPool)(x) +} + +func (x *MsgDepositValidatorRewardsPool) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDepositValidatorRewardsPool_messageType fastReflection_MsgDepositValidatorRewardsPool_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositValidatorRewardsPool_messageType{} + +type fastReflection_MsgDepositValidatorRewardsPool_messageType struct{} + +func (x fastReflection_MsgDepositValidatorRewardsPool_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositValidatorRewardsPool)(nil) +} +func (x fastReflection_MsgDepositValidatorRewardsPool_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositValidatorRewardsPool) +} +func (x fastReflection_MsgDepositValidatorRewardsPool_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositValidatorRewardsPool +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositValidatorRewardsPool +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositValidatorRewardsPool_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDepositValidatorRewardsPool) New() protoreflect.Message { + return new(fastReflection_MsgDepositValidatorRewardsPool) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Interface() protoreflect.ProtoMessage { + return (*MsgDepositValidatorRewardsPool)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_MsgDepositValidatorRewardsPool_depositor, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_MsgDepositValidatorRewardsPool_validator_address, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgDepositValidatorRewardsPool_3_list{list: &x.Amount}) + if !f(fd_MsgDepositValidatorRewardsPool_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.depositor": + return x.Depositor != "" + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.validator_address": + return x.ValidatorAddress != "" + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.depositor": + x.Depositor = "" + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.validator_address": + x.ValidatorAddress = "" + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgDepositValidatorRewardsPool_3_list{}) + } + listValue := &_MsgDepositValidatorRewardsPool_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.depositor": + x.Depositor = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.validator_address": + x.ValidatorAddress = value.Interface().(string) + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount": + lv := value.List() + clv := lv.(*_MsgDepositValidatorRewardsPool_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount": + if x.Amount == nil { + x.Amount = []*types.Coin{} + } + value := &_MsgDepositValidatorRewardsPool_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.depositor": + panic(fmt.Errorf("field depositor of message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool is not mutable")) + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.validator_address": + panic(fmt.Errorf("field validator_address of message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDepositValidatorRewardsPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.depositor": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.validator_address": + return protoreflect.ValueOfString("") + case "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_MsgDepositValidatorRewardsPool_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDepositValidatorRewardsPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDepositValidatorRewardsPool) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPool) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDepositValidatorRewardsPool) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDepositValidatorRewardsPool) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDepositValidatorRewardsPool) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Depositor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDepositValidatorRewardsPool) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDepositValidatorRewardsPool) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositValidatorRewardsPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositValidatorRewardsPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = append(x.Amount, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDepositValidatorRewardsPoolResponse protoreflect.MessageDescriptor +) + +func init() { + file_manifest_distribution_v1beta1_tx_proto_init() + md_MsgDepositValidatorRewardsPoolResponse = File_manifest_distribution_v1beta1_tx_proto.Messages().ByName("MsgDepositValidatorRewardsPoolResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgDepositValidatorRewardsPoolResponse)(nil) + +type fastReflection_MsgDepositValidatorRewardsPoolResponse MsgDepositValidatorRewardsPoolResponse + +func (x *MsgDepositValidatorRewardsPoolResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositValidatorRewardsPoolResponse)(x) +} + +func (x *MsgDepositValidatorRewardsPoolResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType{} + +type fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType struct{} + +func (x fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositValidatorRewardsPoolResponse)(nil) +} +func (x fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositValidatorRewardsPoolResponse) +} +func (x fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositValidatorRewardsPoolResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositValidatorRewardsPoolResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositValidatorRewardsPoolResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) New() protoreflect.Message { + return new(fastReflection_MsgDepositValidatorRewardsPoolResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDepositValidatorRewardsPoolResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")) + } + panic(fmt.Errorf("message manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDepositValidatorRewardsPoolResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDepositValidatorRewardsPoolResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDepositValidatorRewardsPoolResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDepositValidatorRewardsPoolResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositValidatorRewardsPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositValidatorRewardsPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: manifest/distribution/v1beta1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgSetWithdrawAddress sets the withdraw address for +// a delegator (or validator self-delegation). +type MsgSetWithdrawAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (x *MsgSetWithdrawAddress) Reset() { + *x = MsgSetWithdrawAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetWithdrawAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetWithdrawAddress) ProtoMessage() {} + +// Deprecated: Use MsgSetWithdrawAddress.ProtoReflect.Descriptor instead. +func (*MsgSetWithdrawAddress) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgSetWithdrawAddress) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *MsgSetWithdrawAddress) GetWithdrawAddress() string { + if x != nil { + return x.WithdrawAddress + } + return "" +} + +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response +// type. +type MsgSetWithdrawAddressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSetWithdrawAddressResponse) Reset() { + *x = MsgSetWithdrawAddressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetWithdrawAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetWithdrawAddressResponse) ProtoMessage() {} + +// Deprecated: Use MsgSetWithdrawAddressResponse.ProtoReflect.Descriptor instead. +func (*MsgSetWithdrawAddressResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +// from a single validator. +type MsgWithdrawDelegatorReward struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *MsgWithdrawDelegatorReward) Reset() { + *x = MsgWithdrawDelegatorReward{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawDelegatorReward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawDelegatorReward) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawDelegatorReward.ProtoReflect.Descriptor instead. +func (*MsgWithdrawDelegatorReward) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgWithdrawDelegatorReward) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *MsgWithdrawDelegatorReward) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward +// response type. +type MsgWithdrawDelegatorRewardResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Since: cosmos-sdk 0.46 + Amount []*types.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgWithdrawDelegatorRewardResponse) Reset() { + *x = MsgWithdrawDelegatorRewardResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawDelegatorRewardResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawDelegatorRewardResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawDelegatorRewardResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawDelegatorRewardResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgWithdrawDelegatorRewardResponse) GetAmount() []*types.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. +type MsgWithdrawValidatorCommission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *MsgWithdrawValidatorCommission) Reset() { + *x = MsgWithdrawValidatorCommission{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawValidatorCommission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawValidatorCommission) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawValidatorCommission.ProtoReflect.Descriptor instead. +func (*MsgWithdrawValidatorCommission) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgWithdrawValidatorCommission) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// MsgWithdrawValidatorCommissionResponse defines the +// Msg/WithdrawValidatorCommission response type. +type MsgWithdrawValidatorCommissionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Since: cosmos-sdk 0.46 + Amount []*types.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgWithdrawValidatorCommissionResponse) Reset() { + *x = MsgWithdrawValidatorCommissionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawValidatorCommissionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawValidatorCommissionResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawValidatorCommissionResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawValidatorCommissionResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *MsgWithdrawValidatorCommissionResponse) GetAmount() []*types.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgFundCommunityPool allows an account to directly +// fund the community pool. +type MsgFundCommunityPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount []*types.Coin `protobuf:"bytes,1,rep,name=amount,proto3" json:"amount,omitempty"` + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` +} + +func (x *MsgFundCommunityPool) Reset() { + *x = MsgFundCommunityPool{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFundCommunityPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFundCommunityPool) ProtoMessage() {} + +// Deprecated: Use MsgFundCommunityPool.ProtoReflect.Descriptor instead. +func (*MsgFundCommunityPool) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgFundCommunityPool) GetAmount() []*types.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgFundCommunityPool) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +type MsgFundCommunityPoolResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgFundCommunityPoolResponse) Reset() { + *x = MsgFundCommunityPoolResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgFundCommunityPoolResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgFundCommunityPoolResponse) ProtoMessage() {} + +// Deprecated: Use MsgFundCommunityPoolResponse.ProtoReflect.Descriptor instead. +func (*MsgFundCommunityPoolResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{7} +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/distribution parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{9} +} + +// MsgCommunityPoolSpend defines a message for sending tokens from the community +// pool to another account. This message is typically executed via a governance +// proposal with the governance module being the executing authority. +// +// Since: cosmos-sdk 0.47 +type MsgCommunityPoolSpend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount []*types.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgCommunityPoolSpend) Reset() { + *x = MsgCommunityPoolSpend{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCommunityPoolSpend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCommunityPoolSpend) ProtoMessage() {} + +// Deprecated: Use MsgCommunityPoolSpend.ProtoReflect.Descriptor instead. +func (*MsgCommunityPoolSpend) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgCommunityPoolSpend) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgCommunityPoolSpend) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *MsgCommunityPoolSpend) GetAmount() []*types.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgCommunityPoolSpendResponse defines the response to executing a +// MsgCommunityPoolSpend message. +// +// Since: cosmos-sdk 0.47 +type MsgCommunityPoolSpendResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCommunityPoolSpendResponse) Reset() { + *x = MsgCommunityPoolSpendResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCommunityPoolSpendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCommunityPoolSpendResponse) ProtoMessage() {} + +// Deprecated: Use MsgCommunityPoolSpendResponse.ProtoReflect.Descriptor instead. +func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{11} +} + +// DepositValidatorRewardsPool defines the request structure to provide +// additional rewards to delegators from a specific validator. +// +// Since: cosmos-sdk 0.50 +type MsgDepositValidatorRewardsPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Depositor string `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount []*types.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *MsgDepositValidatorRewardsPool) Reset() { + *x = MsgDepositValidatorRewardsPool{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDepositValidatorRewardsPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDepositValidatorRewardsPool) ProtoMessage() {} + +// Deprecated: Use MsgDepositValidatorRewardsPool.ProtoReflect.Descriptor instead. +func (*MsgDepositValidatorRewardsPool) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgDepositValidatorRewardsPool) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +func (x *MsgDepositValidatorRewardsPool) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *MsgDepositValidatorRewardsPool) GetAmount() []*types.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// MsgDepositValidatorRewardsPoolResponse defines the response to executing a +// MsgDepositValidatorRewardsPool message. +// +// Since: cosmos-sdk 0.50 +type MsgDepositValidatorRewardsPoolResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgDepositValidatorRewardsPoolResponse) Reset() { + *x = MsgDepositValidatorRewardsPoolResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_distribution_v1beta1_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDepositValidatorRewardsPoolResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDepositValidatorRewardsPoolResponse) ProtoMessage() {} + +// Deprecated: Use MsgDepositValidatorRewardsPoolResponse.ProtoReflect.Descriptor instead. +func (*MsgDepositValidatorRewardsPoolResponse) Descriptor() ([]byte, []int) { + return file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP(), []int{13} +} + +var File_manifest_distribution_v1beta1_tx_proto protoreflect.FileDescriptor + +var file_manifest_distribution_v1beta1_tx_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x65, + 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x77, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x46, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, + 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x49, 0x88, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x1e, 0x4d, 0x73, 0x67, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x11, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x46, 0x88, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, + 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x85, 0x02, 0x0a, 0x14, 0x4d, 0x73, + 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, + 0x6f, 0x6c, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, + 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, + 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, + 0x2a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, + 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, + 0x6c, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x48, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x3a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x27, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, + 0x02, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, + 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, + 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x2f, 0x4d, + 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, + 0x70, 0x65, 0x6e, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, + 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, + 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x40, 0x88, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x28, 0x0a, + 0x26, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x88, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x88, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x3c, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x17, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x39, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x1a, 0x41, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x1b, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x1a, 0x45, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x11, 0x46, + 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, + 0x12, 0x33, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x3b, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x76, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x36, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, + 0x64, 0x12, 0x34, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, + 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x1a, 0x3c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x1b, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x3d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x45, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, + 0x2a, 0x01, 0x42, 0xa3, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x44, 0x58, 0xaa, 0x02, 0x1d, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1d, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x29, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x5c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x1f, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x44, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_manifest_distribution_v1beta1_tx_proto_rawDescOnce sync.Once + file_manifest_distribution_v1beta1_tx_proto_rawDescData = file_manifest_distribution_v1beta1_tx_proto_rawDesc +) + +func file_manifest_distribution_v1beta1_tx_proto_rawDescGZIP() []byte { + file_manifest_distribution_v1beta1_tx_proto_rawDescOnce.Do(func() { + file_manifest_distribution_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_distribution_v1beta1_tx_proto_rawDescData) + }) + return file_manifest_distribution_v1beta1_tx_proto_rawDescData +} + +var file_manifest_distribution_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_manifest_distribution_v1beta1_tx_proto_goTypes = []interface{}{ + (*MsgSetWithdrawAddress)(nil), // 0: manifest.distribution.v1beta1.MsgSetWithdrawAddress + (*MsgSetWithdrawAddressResponse)(nil), // 1: manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse + (*MsgWithdrawDelegatorReward)(nil), // 2: manifest.distribution.v1beta1.MsgWithdrawDelegatorReward + (*MsgWithdrawDelegatorRewardResponse)(nil), // 3: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + (*MsgWithdrawValidatorCommission)(nil), // 4: manifest.distribution.v1beta1.MsgWithdrawValidatorCommission + (*MsgWithdrawValidatorCommissionResponse)(nil), // 5: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + (*MsgFundCommunityPool)(nil), // 6: manifest.distribution.v1beta1.MsgFundCommunityPool + (*MsgFundCommunityPoolResponse)(nil), // 7: manifest.distribution.v1beta1.MsgFundCommunityPoolResponse + (*MsgUpdateParams)(nil), // 8: manifest.distribution.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 9: manifest.distribution.v1beta1.MsgUpdateParamsResponse + (*MsgCommunityPoolSpend)(nil), // 10: manifest.distribution.v1beta1.MsgCommunityPoolSpend + (*MsgCommunityPoolSpendResponse)(nil), // 11: manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse + (*MsgDepositValidatorRewardsPool)(nil), // 12: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool + (*MsgDepositValidatorRewardsPoolResponse)(nil), // 13: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse + (*types.Coin)(nil), // 14: cosmos.base.v1beta1.Coin + (*Params)(nil), // 15: manifest.distribution.v1beta1.Params +} +var file_manifest_distribution_v1beta1_tx_proto_depIdxs = []int32{ + 14, // 0: manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 14, // 1: manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.amount:type_name -> cosmos.base.v1beta1.Coin + 14, // 2: manifest.distribution.v1beta1.MsgFundCommunityPool.amount:type_name -> cosmos.base.v1beta1.Coin + 15, // 3: manifest.distribution.v1beta1.MsgUpdateParams.params:type_name -> manifest.distribution.v1beta1.Params + 14, // 4: manifest.distribution.v1beta1.MsgCommunityPoolSpend.amount:type_name -> cosmos.base.v1beta1.Coin + 14, // 5: manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool.amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 6: manifest.distribution.v1beta1.Msg.SetWithdrawAddress:input_type -> manifest.distribution.v1beta1.MsgSetWithdrawAddress + 2, // 7: manifest.distribution.v1beta1.Msg.WithdrawDelegatorReward:input_type -> manifest.distribution.v1beta1.MsgWithdrawDelegatorReward + 4, // 8: manifest.distribution.v1beta1.Msg.WithdrawValidatorCommission:input_type -> manifest.distribution.v1beta1.MsgWithdrawValidatorCommission + 6, // 9: manifest.distribution.v1beta1.Msg.FundCommunityPool:input_type -> manifest.distribution.v1beta1.MsgFundCommunityPool + 8, // 10: manifest.distribution.v1beta1.Msg.UpdateParams:input_type -> manifest.distribution.v1beta1.MsgUpdateParams + 10, // 11: manifest.distribution.v1beta1.Msg.CommunityPoolSpend:input_type -> manifest.distribution.v1beta1.MsgCommunityPoolSpend + 12, // 12: manifest.distribution.v1beta1.Msg.DepositValidatorRewardsPool:input_type -> manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool + 1, // 13: manifest.distribution.v1beta1.Msg.SetWithdrawAddress:output_type -> manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse + 3, // 14: manifest.distribution.v1beta1.Msg.WithdrawDelegatorReward:output_type -> manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + 5, // 15: manifest.distribution.v1beta1.Msg.WithdrawValidatorCommission:output_type -> manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + 7, // 16: manifest.distribution.v1beta1.Msg.FundCommunityPool:output_type -> manifest.distribution.v1beta1.MsgFundCommunityPoolResponse + 9, // 17: manifest.distribution.v1beta1.Msg.UpdateParams:output_type -> manifest.distribution.v1beta1.MsgUpdateParamsResponse + 11, // 18: manifest.distribution.v1beta1.Msg.CommunityPoolSpend:output_type -> manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse + 13, // 19: manifest.distribution.v1beta1.Msg.DepositValidatorRewardsPool:output_type -> manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse + 13, // [13:20] is the sub-list for method output_type + 6, // [6:13] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_manifest_distribution_v1beta1_tx_proto_init() } +func file_manifest_distribution_v1beta1_tx_proto_init() { + if File_manifest_distribution_v1beta1_tx_proto != nil { + return + } + file_manifest_distribution_v1beta1_distribution_proto_init() + if !protoimpl.UnsafeEnabled { + file_manifest_distribution_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetWithdrawAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetWithdrawAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawDelegatorReward); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawDelegatorRewardResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawValidatorCommission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawValidatorCommissionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFundCommunityPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgFundCommunityPoolResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCommunityPoolSpend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCommunityPoolSpendResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDepositValidatorRewardsPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_distribution_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDepositValidatorRewardsPoolResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_manifest_distribution_v1beta1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_manifest_distribution_v1beta1_tx_proto_goTypes, + DependencyIndexes: file_manifest_distribution_v1beta1_tx_proto_depIdxs, + MessageInfos: file_manifest_distribution_v1beta1_tx_proto_msgTypes, + }.Build() + File_manifest_distribution_v1beta1_tx_proto = out.File + file_manifest_distribution_v1beta1_tx_proto_rawDesc = nil + file_manifest_distribution_v1beta1_tx_proto_goTypes = nil + file_manifest_distribution_v1beta1_tx_proto_depIdxs = nil +} diff --git a/api/distribution/v1beta1/tx_grpc.pb.go b/api/distribution/v1beta1/tx_grpc.pb.go new file mode 100644 index 0000000..c5b37d6 --- /dev/null +++ b/api/distribution/v1beta1/tx_grpc.pb.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: manifest/distribution/v1beta1/tx.proto + +package distributionv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_SetWithdrawAddress_FullMethodName = "/manifest.distribution.v1beta1.Msg/SetWithdrawAddress" + Msg_WithdrawDelegatorReward_FullMethodName = "/manifest.distribution.v1beta1.Msg/WithdrawDelegatorReward" + Msg_WithdrawValidatorCommission_FullMethodName = "/manifest.distribution.v1beta1.Msg/WithdrawValidatorCommission" + Msg_FundCommunityPool_FullMethodName = "/manifest.distribution.v1beta1.Msg/FundCommunityPool" + Msg_UpdateParams_FullMethodName = "/manifest.distribution.v1beta1.Msg/UpdateParams" + Msg_CommunityPoolSpend_FullMethodName = "/manifest.distribution.v1beta1.Msg/CommunityPoolSpend" + Msg_DepositValidatorRewardsPool_FullMethodName = "/manifest.distribution.v1beta1.Msg/DepositValidatorRewardsPool" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) + // UpdateParams defines a governance operation for updating the x/distribution + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/distribution module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + // + // Since: cosmos-sdk 0.47 + CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) + // DepositValidatorRewardsPool defines a method to provide additional rewards + // to delegators to a specific validator. + // + // Since: cosmos-sdk 0.50 + DepositValidatorRewardsPool(ctx context.Context, in *MsgDepositValidatorRewardsPool, opts ...grpc.CallOption) (*MsgDepositValidatorRewardsPoolResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) { + out := new(MsgSetWithdrawAddressResponse) + err := c.cc.Invoke(ctx, Msg_SetWithdrawAddress_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) { + out := new(MsgWithdrawDelegatorRewardResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawDelegatorReward_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) { + out := new(MsgWithdrawValidatorCommissionResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawValidatorCommission_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) { + out := new(MsgFundCommunityPoolResponse) + err := c.cc.Invoke(ctx, Msg_FundCommunityPool_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) { + out := new(MsgCommunityPoolSpendResponse) + err := c.cc.Invoke(ctx, Msg_CommunityPoolSpend_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositValidatorRewardsPool(ctx context.Context, in *MsgDepositValidatorRewardsPool, opts ...grpc.CallOption) (*MsgDepositValidatorRewardsPoolResponse, error) { + out := new(MsgDepositValidatorRewardsPoolResponse) + err := c.cc.Invoke(ctx, Msg_DepositValidatorRewardsPool_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + SetWithdrawAddress(context.Context, *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error) + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + WithdrawDelegatorReward(context.Context, *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error) + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + WithdrawValidatorCommission(context.Context, *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) + // UpdateParams defines a governance operation for updating the x/distribution + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/distribution module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + // + // Since: cosmos-sdk 0.47 + CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) + // DepositValidatorRewardsPool defines a method to provide additional rewards + // to delegators to a specific validator. + // + // Since: cosmos-sdk 0.50 + DepositValidatorRewardsPool(context.Context, *MsgDepositValidatorRewardsPool) (*MsgDepositValidatorRewardsPoolResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) SetWithdrawAddress(context.Context, *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetWithdrawAddress not implemented") +} +func (UnimplementedMsgServer) WithdrawDelegatorReward(context.Context, *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawDelegatorReward not implemented") +} +func (UnimplementedMsgServer) WithdrawValidatorCommission(context.Context, *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawValidatorCommission not implemented") +} +func (UnimplementedMsgServer) FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FundCommunityPool not implemented") +} +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) CommunityPoolSpend(context.Context, *MsgCommunityPoolSpend) (*MsgCommunityPoolSpendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommunityPoolSpend not implemented") +} +func (UnimplementedMsgServer) DepositValidatorRewardsPool(context.Context, *MsgDepositValidatorRewardsPool) (*MsgDepositValidatorRewardsPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositValidatorRewardsPool not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_SetWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetWithdrawAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetWithdrawAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SetWithdrawAddress_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetWithdrawAddress(ctx, req.(*MsgSetWithdrawAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawDelegatorReward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawDelegatorReward) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawDelegatorReward(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_WithdrawDelegatorReward_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawDelegatorReward(ctx, req.(*MsgWithdrawDelegatorReward)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawValidatorCommission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawValidatorCommission) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawValidatorCommission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_WithdrawValidatorCommission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawValidatorCommission(ctx, req.(*MsgWithdrawValidatorCommission)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_FundCommunityPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgFundCommunityPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).FundCommunityPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_FundCommunityPool_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).FundCommunityPool(ctx, req.(*MsgFundCommunityPool)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCommunityPoolSpend) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CommunityPoolSpend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CommunityPoolSpend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CommunityPoolSpend(ctx, req.(*MsgCommunityPoolSpend)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositValidatorRewardsPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositValidatorRewardsPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositValidatorRewardsPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DepositValidatorRewardsPool_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositValidatorRewardsPool(ctx, req.(*MsgDepositValidatorRewardsPool)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "manifest.distribution.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetWithdrawAddress", + Handler: _Msg_SetWithdrawAddress_Handler, + }, + { + MethodName: "WithdrawDelegatorReward", + Handler: _Msg_WithdrawDelegatorReward_Handler, + }, + { + MethodName: "WithdrawValidatorCommission", + Handler: _Msg_WithdrawValidatorCommission_Handler, + }, + { + MethodName: "FundCommunityPool", + Handler: _Msg_FundCommunityPool_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "CommunityPoolSpend", + Handler: _Msg_CommunityPoolSpend_Handler, + }, + { + MethodName: "DepositValidatorRewardsPool", + Handler: _Msg_DepositValidatorRewardsPool_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "manifest/distribution/v1beta1/tx.proto", +} diff --git a/api/manifest/module/v1/module.pulsar.go b/api/manifest/module/v1/module.pulsar.go index 3a6e809..bdd23a8 100644 --- a/api/manifest/module/v1/module.pulsar.go +++ b/api/manifest/module/v1/module.pulsar.go @@ -18,8 +18,8 @@ var ( ) func init() { - file_manifest_module_v1_module_proto_init() - md_Module = File_manifest_module_v1_module_proto.Messages().ByName("Module") + file_manifest_manifest_module_v1_module_proto_init() + md_Module = File_manifest_manifest_module_v1_module_proto.Messages().ByName("Module") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -31,7 +31,7 @@ func (x *Module) ProtoReflect() protoreflect.Message { } func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_module_v1_module_proto_msgTypes[0] + mi := &file_manifest_manifest_module_v1_module_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.module.v1.Module")) } - panic(fmt.Errorf("message manifest.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.module.v1.Module")) } - panic(fmt.Errorf("message manifest.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.module.v1.Module")) } - panic(fmt.Errorf("message manifest.module.v1.Module does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.module.v1.Module does not contain field %s", descriptor.FullName())) } } @@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.module.v1.Module")) } - panic(fmt.Errorf("message manifest.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.module.v1.Module")) } - panic(fmt.Errorf("message manifest.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.module.v1.Module")) } - panic(fmt.Errorf("message manifest.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.module.v1.Module", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.module.v1.Module", d.FullName())) } panic("unreachable") } @@ -373,7 +373,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: manifest/module/v1/module.proto +// source: manifest/manifest/module/v1/module.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -393,7 +393,7 @@ type Module struct { func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_module_v1_module_proto_msgTypes[0] + mi := &file_manifest_manifest_module_v1_module_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -407,55 +407,60 @@ func (*Module) ProtoMessage() {} // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { - return file_manifest_module_v1_module_proto_rawDescGZIP(), []int{0} + return file_manifest_manifest_module_v1_module_proto_rawDescGZIP(), []int{0} } -var File_manifest_module_v1_module_proto protoreflect.FileDescriptor - -var file_manifest_module_v1_module_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, - 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x3a, 0x2d, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x27, 0x0a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, - 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, - 0x42, 0xd6, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, - 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, - 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x14, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, +var File_manifest_manifest_module_v1_module_proto protoreflect.FileDescriptor + +var file_manifest_manifest_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x06, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x3a, 0x38, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x32, 0x0a, 0x30, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, + 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x2f, 0x78, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x42, 0x8d, 0x02, + 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, + 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, + 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x4d, 0xaa, 0x02, 0x1b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x27, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_manifest_module_v1_module_proto_rawDescOnce sync.Once - file_manifest_module_v1_module_proto_rawDescData = file_manifest_module_v1_module_proto_rawDesc + file_manifest_manifest_module_v1_module_proto_rawDescOnce sync.Once + file_manifest_manifest_module_v1_module_proto_rawDescData = file_manifest_manifest_module_v1_module_proto_rawDesc ) -func file_manifest_module_v1_module_proto_rawDescGZIP() []byte { - file_manifest_module_v1_module_proto_rawDescOnce.Do(func() { - file_manifest_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_module_v1_module_proto_rawDescData) +func file_manifest_manifest_module_v1_module_proto_rawDescGZIP() []byte { + file_manifest_manifest_module_v1_module_proto_rawDescOnce.Do(func() { + file_manifest_manifest_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_manifest_module_v1_module_proto_rawDescData) }) - return file_manifest_module_v1_module_proto_rawDescData + return file_manifest_manifest_module_v1_module_proto_rawDescData } -var file_manifest_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_manifest_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: manifest.module.v1.Module +var file_manifest_manifest_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_manifest_manifest_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: manifest.manifest.module.v1.Module } -var file_manifest_module_v1_module_proto_depIdxs = []int32{ +var file_manifest_manifest_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -463,13 +468,13 @@ var file_manifest_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_manifest_module_v1_module_proto_init() } -func file_manifest_module_v1_module_proto_init() { - if File_manifest_module_v1_module_proto != nil { +func init() { file_manifest_manifest_module_v1_module_proto_init() } +func file_manifest_manifest_module_v1_module_proto_init() { + if File_manifest_manifest_module_v1_module_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_manifest_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state @@ -486,18 +491,18 @@ func file_manifest_module_v1_module_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_manifest_module_v1_module_proto_rawDesc, + RawDescriptor: file_manifest_manifest_module_v1_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_manifest_module_v1_module_proto_goTypes, - DependencyIndexes: file_manifest_module_v1_module_proto_depIdxs, - MessageInfos: file_manifest_module_v1_module_proto_msgTypes, + GoTypes: file_manifest_manifest_module_v1_module_proto_goTypes, + DependencyIndexes: file_manifest_manifest_module_v1_module_proto_depIdxs, + MessageInfos: file_manifest_manifest_module_v1_module_proto_msgTypes, }.Build() - File_manifest_module_v1_module_proto = out.File - file_manifest_module_v1_module_proto_rawDesc = nil - file_manifest_module_v1_module_proto_goTypes = nil - file_manifest_module_v1_module_proto_depIdxs = nil + File_manifest_manifest_module_v1_module_proto = out.File + file_manifest_manifest_module_v1_module_proto_rawDesc = nil + file_manifest_manifest_module_v1_module_proto_goTypes = nil + file_manifest_manifest_module_v1_module_proto_depIdxs = nil } diff --git a/api/manifest/v1/genesis.pulsar.go b/api/manifest/v1/genesis.pulsar.go index e476e5e..1bf63ec 100644 --- a/api/manifest/v1/genesis.pulsar.go +++ b/api/manifest/v1/genesis.pulsar.go @@ -20,8 +20,8 @@ var ( ) func init() { - file_manifest_v1_genesis_proto_init() - md_GenesisState = File_manifest_v1_genesis_proto.Messages().ByName("GenesisState") + file_manifest_manifest_v1_genesis_proto_init() + md_GenesisState = File_manifest_manifest_v1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") } @@ -34,7 +34,7 @@ func (x *GenesisState) ProtoReflect() protoreflect.Message { } func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_genesis_proto_msgTypes[0] + mi := &file_manifest_manifest_v1_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111,13 +111,13 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "manifest.v1.GenesisState.params": + case "manifest.manifest.v1.GenesisState.params": return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.GenesisState")) } - panic(fmt.Errorf("message manifest.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.GenesisState does not contain field %s", fd.FullName())) } } @@ -129,13 +129,13 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "manifest.v1.GenesisState.params": + case "manifest.manifest.v1.GenesisState.params": x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.GenesisState")) } - panic(fmt.Errorf("message manifest.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.GenesisState does not contain field %s", fd.FullName())) } } @@ -147,14 +147,14 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "manifest.v1.GenesisState.params": + case "manifest.manifest.v1.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.GenesisState")) } - panic(fmt.Errorf("message manifest.v1.GenesisState does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.GenesisState does not contain field %s", descriptor.FullName())) } } @@ -170,13 +170,13 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "manifest.v1.GenesisState.params": + case "manifest.manifest.v1.GenesisState.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.GenesisState")) } - panic(fmt.Errorf("message manifest.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.GenesisState does not contain field %s", fd.FullName())) } } @@ -192,16 +192,16 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.GenesisState.params": + case "manifest.manifest.v1.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.GenesisState")) } - panic(fmt.Errorf("message manifest.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.GenesisState does not contain field %s", fd.FullName())) } } @@ -210,14 +210,14 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.GenesisState.params": + case "manifest.manifest.v1.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.GenesisState")) } - panic(fmt.Errorf("message manifest.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.GenesisState does not contain field %s", fd.FullName())) } } @@ -227,7 +227,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.GenesisState", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.GenesisState", d.FullName())) } panic("unreachable") } @@ -506,8 +506,8 @@ var ( ) func init() { - file_manifest_v1_genesis_proto_init() - md_Params = File_manifest_v1_genesis_proto.Messages().ByName("Params") + file_manifest_manifest_v1_genesis_proto_init() + md_Params = File_manifest_manifest_v1_genesis_proto.Messages().ByName("Params") fd_Params_stake_holders = md_Params.Fields().ByName("stake_holders") } @@ -520,7 +520,7 @@ func (x *Params) ProtoReflect() protoreflect.Message { } func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_genesis_proto_msgTypes[1] + mi := &file_manifest_manifest_v1_genesis_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -597,13 +597,13 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "manifest.v1.Params.stake_holders": + case "manifest.manifest.v1.Params.stake_holders": return len(x.StakeHolders) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.Params")) } - panic(fmt.Errorf("message manifest.v1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.Params does not contain field %s", fd.FullName())) } } @@ -615,13 +615,13 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "manifest.v1.Params.stake_holders": + case "manifest.manifest.v1.Params.stake_holders": x.StakeHolders = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.Params")) } - panic(fmt.Errorf("message manifest.v1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.Params does not contain field %s", fd.FullName())) } } @@ -633,7 +633,7 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "manifest.v1.Params.stake_holders": + case "manifest.manifest.v1.Params.stake_holders": if len(x.StakeHolders) == 0 { return protoreflect.ValueOfList(&_Params_1_list{}) } @@ -641,9 +641,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.Params")) } - panic(fmt.Errorf("message manifest.v1.Params does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.Params does not contain field %s", descriptor.FullName())) } } @@ -659,15 +659,15 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "manifest.v1.Params.stake_holders": + case "manifest.manifest.v1.Params.stake_holders": lv := value.List() clv := lv.(*_Params_1_list) x.StakeHolders = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.Params")) } - panic(fmt.Errorf("message manifest.v1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.Params does not contain field %s", fd.FullName())) } } @@ -683,7 +683,7 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.Params.stake_holders": + case "manifest.manifest.v1.Params.stake_holders": if x.StakeHolders == nil { x.StakeHolders = []*StakeHolders{} } @@ -691,9 +691,9 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.Params")) } - panic(fmt.Errorf("message manifest.v1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.Params does not contain field %s", fd.FullName())) } } @@ -702,14 +702,14 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.Params.stake_holders": + case "manifest.manifest.v1.Params.stake_holders": list := []*StakeHolders{} return protoreflect.ValueOfList(&_Params_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.Params")) } - panic(fmt.Errorf("message manifest.v1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.Params does not contain field %s", fd.FullName())) } } @@ -719,7 +719,7 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.Params", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.Params", d.FullName())) } panic("unreachable") } @@ -950,8 +950,8 @@ var ( ) func init() { - file_manifest_v1_genesis_proto_init() - md_StakeHolders = File_manifest_v1_genesis_proto.Messages().ByName("StakeHolders") + file_manifest_manifest_v1_genesis_proto_init() + md_StakeHolders = File_manifest_manifest_v1_genesis_proto.Messages().ByName("StakeHolders") fd_StakeHolders_address = md_StakeHolders.Fields().ByName("address") fd_StakeHolders_percentage = md_StakeHolders.Fields().ByName("percentage") } @@ -965,7 +965,7 @@ func (x *StakeHolders) ProtoReflect() protoreflect.Message { } func (x *StakeHolders) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_genesis_proto_msgTypes[2] + mi := &file_manifest_manifest_v1_genesis_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1048,15 +1048,15 @@ func (x *fastReflection_StakeHolders) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_StakeHolders) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "manifest.v1.StakeHolders.address": + case "manifest.manifest.v1.StakeHolders.address": return x.Address != "" - case "manifest.v1.StakeHolders.percentage": + case "manifest.manifest.v1.StakeHolders.percentage": return x.Percentage != int32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.StakeHolders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.StakeHolders")) } - panic(fmt.Errorf("message manifest.v1.StakeHolders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.StakeHolders does not contain field %s", fd.FullName())) } } @@ -1068,15 +1068,15 @@ func (x *fastReflection_StakeHolders) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_StakeHolders) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "manifest.v1.StakeHolders.address": + case "manifest.manifest.v1.StakeHolders.address": x.Address = "" - case "manifest.v1.StakeHolders.percentage": + case "manifest.manifest.v1.StakeHolders.percentage": x.Percentage = int32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.StakeHolders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.StakeHolders")) } - panic(fmt.Errorf("message manifest.v1.StakeHolders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.StakeHolders does not contain field %s", fd.FullName())) } } @@ -1088,17 +1088,17 @@ func (x *fastReflection_StakeHolders) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_StakeHolders) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "manifest.v1.StakeHolders.address": + case "manifest.manifest.v1.StakeHolders.address": value := x.Address return protoreflect.ValueOfString(value) - case "manifest.v1.StakeHolders.percentage": + case "manifest.manifest.v1.StakeHolders.percentage": value := x.Percentage return protoreflect.ValueOfInt32(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.StakeHolders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.StakeHolders")) } - panic(fmt.Errorf("message manifest.v1.StakeHolders does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.StakeHolders does not contain field %s", descriptor.FullName())) } } @@ -1114,15 +1114,15 @@ func (x *fastReflection_StakeHolders) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_StakeHolders) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "manifest.v1.StakeHolders.address": + case "manifest.manifest.v1.StakeHolders.address": x.Address = value.Interface().(string) - case "manifest.v1.StakeHolders.percentage": + case "manifest.manifest.v1.StakeHolders.percentage": x.Percentage = int32(value.Int()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.StakeHolders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.StakeHolders")) } - panic(fmt.Errorf("message manifest.v1.StakeHolders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.StakeHolders does not contain field %s", fd.FullName())) } } @@ -1138,15 +1138,15 @@ func (x *fastReflection_StakeHolders) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_StakeHolders) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.StakeHolders.address": - panic(fmt.Errorf("field address of message manifest.v1.StakeHolders is not mutable")) - case "manifest.v1.StakeHolders.percentage": - panic(fmt.Errorf("field percentage of message manifest.v1.StakeHolders is not mutable")) + case "manifest.manifest.v1.StakeHolders.address": + panic(fmt.Errorf("field address of message manifest.manifest.v1.StakeHolders is not mutable")) + case "manifest.manifest.v1.StakeHolders.percentage": + panic(fmt.Errorf("field percentage of message manifest.manifest.v1.StakeHolders is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.StakeHolders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.StakeHolders")) } - panic(fmt.Errorf("message manifest.v1.StakeHolders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.StakeHolders does not contain field %s", fd.FullName())) } } @@ -1155,15 +1155,15 @@ func (x *fastReflection_StakeHolders) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_StakeHolders) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.StakeHolders.address": + case "manifest.manifest.v1.StakeHolders.address": return protoreflect.ValueOfString("") - case "manifest.v1.StakeHolders.percentage": + case "manifest.manifest.v1.StakeHolders.percentage": return protoreflect.ValueOfInt32(int32(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.StakeHolders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.StakeHolders")) } - panic(fmt.Errorf("message manifest.v1.StakeHolders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.StakeHolders does not contain field %s", fd.FullName())) } } @@ -1173,7 +1173,7 @@ func (x *fastReflection_StakeHolders) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_StakeHolders) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.StakeHolders", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.StakeHolders", d.FullName())) } panic("unreachable") } @@ -1415,7 +1415,7 @@ func (x *fastReflection_StakeHolders) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: manifest/v1/genesis.proto +// source: manifest/manifest/v1/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -1437,7 +1437,7 @@ type GenesisState struct { func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_genesis_proto_msgTypes[0] + mi := &file_manifest_manifest_v1_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1451,7 +1451,7 @@ func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { - return file_manifest_v1_genesis_proto_rawDescGZIP(), []int{0} + return file_manifest_manifest_v1_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { @@ -1473,7 +1473,7 @@ type Params struct { func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_genesis_proto_msgTypes[1] + mi := &file_manifest_manifest_v1_genesis_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1487,7 +1487,7 @@ func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { - return file_manifest_v1_genesis_proto_rawDescGZIP(), []int{1} + return file_manifest_manifest_v1_genesis_proto_rawDescGZIP(), []int{1} } func (x *Params) GetStakeHolders() []*StakeHolders { @@ -1512,7 +1512,7 @@ type StakeHolders struct { func (x *StakeHolders) Reset() { *x = StakeHolders{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_genesis_proto_msgTypes[2] + mi := &file_manifest_manifest_v1_genesis_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1526,7 +1526,7 @@ func (*StakeHolders) ProtoMessage() {} // Deprecated: Use StakeHolders.ProtoReflect.Descriptor instead. func (*StakeHolders) Descriptor() ([]byte, []int) { - return file_manifest_v1_genesis_proto_rawDescGZIP(), []int{2} + return file_manifest_manifest_v1_genesis_proto_rawDescGZIP(), []int{2} } func (x *StakeHolders) GetAddress() string { @@ -1543,65 +1543,70 @@ func (x *StakeHolders) GetPercentage() int32 { return 0 } -var File_manifest_v1_genesis_proto protoreflect.FileDescriptor - -var file_manifest_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x66, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3e, - 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, - 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x1c, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x4e, 0x0a, 0x0c, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xae, 0x01, 0x0a, - 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, - 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_manifest_manifest_v1_genesis_proto protoreflect.FileDescriptor + +var file_manifest_manifest_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x6f, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x47, 0x0a, 0x0d, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x48, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x73, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, + 0x72, 0x73, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x0f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x22, 0x4e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, + 0x42, 0xe5, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, + 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x58, 0xaa, 0x02, + 0x14, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x5c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_manifest_v1_genesis_proto_rawDescOnce sync.Once - file_manifest_v1_genesis_proto_rawDescData = file_manifest_v1_genesis_proto_rawDesc + file_manifest_manifest_v1_genesis_proto_rawDescOnce sync.Once + file_manifest_manifest_v1_genesis_proto_rawDescData = file_manifest_manifest_v1_genesis_proto_rawDesc ) -func file_manifest_v1_genesis_proto_rawDescGZIP() []byte { - file_manifest_v1_genesis_proto_rawDescOnce.Do(func() { - file_manifest_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_v1_genesis_proto_rawDescData) +func file_manifest_manifest_v1_genesis_proto_rawDescGZIP() []byte { + file_manifest_manifest_v1_genesis_proto_rawDescOnce.Do(func() { + file_manifest_manifest_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_manifest_v1_genesis_proto_rawDescData) }) - return file_manifest_v1_genesis_proto_rawDescData + return file_manifest_manifest_v1_genesis_proto_rawDescData } -var file_manifest_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_manifest_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: manifest.v1.GenesisState - (*Params)(nil), // 1: manifest.v1.Params - (*StakeHolders)(nil), // 2: manifest.v1.StakeHolders +var file_manifest_manifest_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_manifest_manifest_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: manifest.manifest.v1.GenesisState + (*Params)(nil), // 1: manifest.manifest.v1.Params + (*StakeHolders)(nil), // 2: manifest.manifest.v1.StakeHolders } -var file_manifest_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: manifest.v1.GenesisState.params:type_name -> manifest.v1.Params - 2, // 1: manifest.v1.Params.stake_holders:type_name -> manifest.v1.StakeHolders +var file_manifest_manifest_v1_genesis_proto_depIdxs = []int32{ + 1, // 0: manifest.manifest.v1.GenesisState.params:type_name -> manifest.manifest.v1.Params + 2, // 1: manifest.manifest.v1.Params.stake_holders:type_name -> manifest.manifest.v1.StakeHolders 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -1609,13 +1614,13 @@ var file_manifest_v1_genesis_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_manifest_v1_genesis_proto_init() } -func file_manifest_v1_genesis_proto_init() { - if File_manifest_v1_genesis_proto != nil { +func init() { file_manifest_manifest_v1_genesis_proto_init() } +func file_manifest_manifest_v1_genesis_proto_init() { + if File_manifest_manifest_v1_genesis_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_manifest_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state @@ -1627,7 +1632,7 @@ func file_manifest_v1_genesis_proto_init() { return nil } } - file_manifest_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state @@ -1639,7 +1644,7 @@ func file_manifest_v1_genesis_proto_init() { return nil } } - file_manifest_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StakeHolders); i { case 0: return &v.state @@ -1656,18 +1661,18 @@ func file_manifest_v1_genesis_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_manifest_v1_genesis_proto_rawDesc, + RawDescriptor: file_manifest_manifest_v1_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_manifest_v1_genesis_proto_goTypes, - DependencyIndexes: file_manifest_v1_genesis_proto_depIdxs, - MessageInfos: file_manifest_v1_genesis_proto_msgTypes, + GoTypes: file_manifest_manifest_v1_genesis_proto_goTypes, + DependencyIndexes: file_manifest_manifest_v1_genesis_proto_depIdxs, + MessageInfos: file_manifest_manifest_v1_genesis_proto_msgTypes, }.Build() - File_manifest_v1_genesis_proto = out.File - file_manifest_v1_genesis_proto_rawDesc = nil - file_manifest_v1_genesis_proto_goTypes = nil - file_manifest_v1_genesis_proto_depIdxs = nil + File_manifest_manifest_v1_genesis_proto = out.File + file_manifest_manifest_v1_genesis_proto_rawDesc = nil + file_manifest_manifest_v1_genesis_proto_goTypes = nil + file_manifest_manifest_v1_genesis_proto_depIdxs = nil } diff --git a/api/manifest/v1/query.pulsar.go b/api/manifest/v1/query.pulsar.go index d27d583..201be8b 100644 --- a/api/manifest/v1/query.pulsar.go +++ b/api/manifest/v1/query.pulsar.go @@ -18,8 +18,8 @@ var ( ) func init() { - file_manifest_v1_query_proto_init() - md_QueryParamsRequest = File_manifest_v1_query_proto.Messages().ByName("QueryParamsRequest") + file_manifest_manifest_v1_query_proto_init() + md_QueryParamsRequest = File_manifest_manifest_v1_query_proto.Messages().ByName("QueryParamsRequest") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) @@ -31,7 +31,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_query_proto_msgTypes[0] + mi := &file_manifest_manifest_v1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104,9 +104,9 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsRequest")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -120,9 +120,9 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsRequest")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -136,9 +136,9 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsRequest")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } @@ -156,9 +156,9 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsRequest")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -176,9 +176,9 @@ func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescrip switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsRequest")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -189,9 +189,9 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsRequest")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -201,7 +201,7 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.QueryParamsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.QueryParamsRequest", d.FullName())) } panic("unreachable") } @@ -375,8 +375,8 @@ var ( ) func init() { - file_manifest_v1_query_proto_init() - md_QueryParamsResponse = File_manifest_v1_query_proto.Messages().ByName("QueryParamsResponse") + file_manifest_manifest_v1_query_proto_init() + md_QueryParamsResponse = File_manifest_manifest_v1_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } @@ -389,7 +389,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_query_proto_msgTypes[1] + mi := &file_manifest_manifest_v1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,13 +466,13 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "manifest.v1.QueryParamsResponse.params": + case "manifest.manifest.v1.QueryParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -484,13 +484,13 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "manifest.v1.QueryParamsResponse.params": + case "manifest.manifest.v1.QueryParamsResponse.params": x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -502,14 +502,14 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "manifest.v1.QueryParamsResponse.params": + case "manifest.manifest.v1.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -525,13 +525,13 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "manifest.v1.QueryParamsResponse.params": + case "manifest.manifest.v1.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -547,16 +547,16 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.QueryParamsResponse.params": + case "manifest.manifest.v1.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -565,14 +565,14 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.QueryParamsResponse.params": + case "manifest.manifest.v1.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.QueryParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -582,7 +582,7 @@ func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.QueryParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.QueryParamsResponse", d.FullName())) } panic("unreachable") } @@ -808,7 +808,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: manifest/v1/query.proto +// source: manifest/manifest/v1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -827,7 +827,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_query_proto_msgTypes[0] + mi := &file_manifest_manifest_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -841,7 +841,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_manifest_v1_query_proto_rawDescGZIP(), []int{0} + return file_manifest_manifest_v1_query_proto_rawDescGZIP(), []int{0} } // QueryParamsResponse is the response type for the Query/Params RPC method. @@ -857,7 +857,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_query_proto_msgTypes[1] + mi := &file_manifest_manifest_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -871,7 +871,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_manifest_v1_query_proto_rawDescGZIP(), []int{1} + return file_manifest_manifest_v1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryParamsResponse) GetParams() *Params { @@ -881,64 +881,71 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } -var File_manifest_v1_query_proto protoreflect.FileDescriptor - -var file_manifest_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x71, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x68, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x6d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xac, 0x01, 0x0a, - 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, +var File_manifest_manifest_v1_query_proto protoreflect.FileDescriptor + +var file_manifest_manifest_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x14, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x83, 0x01, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, + 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0xe3, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x58, 0xaa, + 0x02, 0x14, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x5c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x4d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_manifest_v1_query_proto_rawDescOnce sync.Once - file_manifest_v1_query_proto_rawDescData = file_manifest_v1_query_proto_rawDesc + file_manifest_manifest_v1_query_proto_rawDescOnce sync.Once + file_manifest_manifest_v1_query_proto_rawDescData = file_manifest_manifest_v1_query_proto_rawDesc ) -func file_manifest_v1_query_proto_rawDescGZIP() []byte { - file_manifest_v1_query_proto_rawDescOnce.Do(func() { - file_manifest_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_v1_query_proto_rawDescData) +func file_manifest_manifest_v1_query_proto_rawDescGZIP() []byte { + file_manifest_manifest_v1_query_proto_rawDescOnce.Do(func() { + file_manifest_manifest_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_manifest_v1_query_proto_rawDescData) }) - return file_manifest_v1_query_proto_rawDescData + return file_manifest_manifest_v1_query_proto_rawDescData } -var file_manifest_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_manifest_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: manifest.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: manifest.v1.QueryParamsResponse - (*Params)(nil), // 2: manifest.v1.Params +var file_manifest_manifest_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_manifest_manifest_v1_query_proto_goTypes = []interface{}{ + (*QueryParamsRequest)(nil), // 0: manifest.manifest.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: manifest.manifest.v1.QueryParamsResponse + (*Params)(nil), // 2: manifest.manifest.v1.Params } -var file_manifest_v1_query_proto_depIdxs = []int32{ - 2, // 0: manifest.v1.QueryParamsResponse.params:type_name -> manifest.v1.Params - 0, // 1: manifest.v1.Query.Params:input_type -> manifest.v1.QueryParamsRequest - 1, // 2: manifest.v1.Query.Params:output_type -> manifest.v1.QueryParamsResponse +var file_manifest_manifest_v1_query_proto_depIdxs = []int32{ + 2, // 0: manifest.manifest.v1.QueryParamsResponse.params:type_name -> manifest.manifest.v1.Params + 0, // 1: manifest.manifest.v1.Query.Params:input_type -> manifest.manifest.v1.QueryParamsRequest + 1, // 2: manifest.manifest.v1.Query.Params:output_type -> manifest.manifest.v1.QueryParamsResponse 2, // [2:3] is the sub-list for method output_type 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -946,14 +953,14 @@ var file_manifest_v1_query_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_manifest_v1_query_proto_init() } -func file_manifest_v1_query_proto_init() { - if File_manifest_v1_query_proto != nil { +func init() { file_manifest_manifest_v1_query_proto_init() } +func file_manifest_manifest_v1_query_proto_init() { + if File_manifest_manifest_v1_query_proto != nil { return } - file_manifest_v1_genesis_proto_init() + file_manifest_manifest_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { - file_manifest_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state @@ -965,7 +972,7 @@ func file_manifest_v1_query_proto_init() { return nil } } - file_manifest_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -982,18 +989,18 @@ func file_manifest_v1_query_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_manifest_v1_query_proto_rawDesc, + RawDescriptor: file_manifest_manifest_v1_query_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_manifest_v1_query_proto_goTypes, - DependencyIndexes: file_manifest_v1_query_proto_depIdxs, - MessageInfos: file_manifest_v1_query_proto_msgTypes, + GoTypes: file_manifest_manifest_v1_query_proto_goTypes, + DependencyIndexes: file_manifest_manifest_v1_query_proto_depIdxs, + MessageInfos: file_manifest_manifest_v1_query_proto_msgTypes, }.Build() - File_manifest_v1_query_proto = out.File - file_manifest_v1_query_proto_rawDesc = nil - file_manifest_v1_query_proto_goTypes = nil - file_manifest_v1_query_proto_depIdxs = nil + File_manifest_manifest_v1_query_proto = out.File + file_manifest_manifest_v1_query_proto_rawDesc = nil + file_manifest_manifest_v1_query_proto_goTypes = nil + file_manifest_manifest_v1_query_proto_depIdxs = nil } diff --git a/api/manifest/v1/query_grpc.pb.go b/api/manifest/v1/query_grpc.pb.go index 4f657ee..bae4b5d 100644 --- a/api/manifest/v1/query_grpc.pb.go +++ b/api/manifest/v1/query_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: manifest/v1/query.proto +// source: manifest/manifest/v1/query.proto package manifestv1 @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/manifest.v1.Query/Params" + Query_Params_FullMethodName = "/manifest.manifest.v1.Query/Params" ) // QueryClient is the client API for Query service. @@ -98,7 +98,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "manifest.v1.Query", + ServiceName: "manifest.manifest.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -107,5 +107,5 @@ var Query_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "manifest/v1/query.proto", + Metadata: "manifest/manifest/v1/query.proto", } diff --git a/api/manifest/v1/tx.pulsar.go b/api/manifest/v1/tx.pulsar.go index 8eca91c..7227838 100644 --- a/api/manifest/v1/tx.pulsar.go +++ b/api/manifest/v1/tx.pulsar.go @@ -24,8 +24,8 @@ var ( ) func init() { - file_manifest_v1_tx_proto_init() - md_MsgUpdateParams = File_manifest_v1_tx_proto.Messages().ByName("MsgUpdateParams") + file_manifest_manifest_v1_tx_proto_init() + md_MsgUpdateParams = File_manifest_manifest_v1_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } @@ -39,7 +39,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_tx_proto_msgTypes[0] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -122,15 +122,15 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "manifest.v1.MsgUpdateParams.authority": + case "manifest.manifest.v1.MsgUpdateParams.authority": return x.Authority != "" - case "manifest.v1.MsgUpdateParams.params": + case "manifest.manifest.v1.MsgUpdateParams.params": return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -142,15 +142,15 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "manifest.v1.MsgUpdateParams.authority": + case "manifest.manifest.v1.MsgUpdateParams.authority": x.Authority = "" - case "manifest.v1.MsgUpdateParams.params": + case "manifest.manifest.v1.MsgUpdateParams.params": x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -162,17 +162,17 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "manifest.v1.MsgUpdateParams.authority": + case "manifest.manifest.v1.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "manifest.v1.MsgUpdateParams.params": + case "manifest.manifest.v1.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } @@ -188,15 +188,15 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "manifest.v1.MsgUpdateParams.authority": + case "manifest.manifest.v1.MsgUpdateParams.authority": x.Authority = value.Interface().(string) - case "manifest.v1.MsgUpdateParams.params": + case "manifest.manifest.v1.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -212,18 +212,18 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.MsgUpdateParams.params": + case "manifest.manifest.v1.MsgUpdateParams.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "manifest.v1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message manifest.v1.MsgUpdateParams is not mutable")) + case "manifest.manifest.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message manifest.manifest.v1.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -232,16 +232,16 @@ func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.MsgUpdateParams.authority": + case "manifest.manifest.v1.MsgUpdateParams.authority": return protoreflect.ValueOfString("") - case "manifest.v1.MsgUpdateParams.params": + case "manifest.manifest.v1.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -251,7 +251,7 @@ func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescripto func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.MsgUpdateParams", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.MsgUpdateParams", d.FullName())) } panic("unreachable") } @@ -521,8 +521,8 @@ var ( ) func init() { - file_manifest_v1_tx_proto_init() - md_MsgUpdateParamsResponse = File_manifest_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") + file_manifest_manifest_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_manifest_manifest_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) @@ -534,7 +534,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_tx_proto_msgTypes[1] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -607,9 +607,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -623,9 +623,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -639,9 +639,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.Fie switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -659,9 +659,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -679,9 +679,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDe switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -692,9 +692,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -704,7 +704,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.MsgUpdateParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } @@ -879,8 +879,8 @@ var ( ) func init() { - file_manifest_v1_tx_proto_init() - md_MsgPayoutStakeholders = File_manifest_v1_tx_proto.Messages().ByName("MsgPayoutStakeholders") + file_manifest_manifest_v1_tx_proto_init() + md_MsgPayoutStakeholders = File_manifest_manifest_v1_tx_proto.Messages().ByName("MsgPayoutStakeholders") fd_MsgPayoutStakeholders_authority = md_MsgPayoutStakeholders.Fields().ByName("authority") fd_MsgPayoutStakeholders_payout = md_MsgPayoutStakeholders.Fields().ByName("payout") } @@ -894,7 +894,7 @@ func (x *MsgPayoutStakeholders) ProtoReflect() protoreflect.Message { } func (x *MsgPayoutStakeholders) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_tx_proto_msgTypes[2] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -977,15 +977,15 @@ func (x *fastReflection_MsgPayoutStakeholders) Range(f func(protoreflect.FieldDe // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgPayoutStakeholders) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "manifest.v1.MsgPayoutStakeholders.authority": + case "manifest.manifest.v1.MsgPayoutStakeholders.authority": return x.Authority != "" - case "manifest.v1.MsgPayoutStakeholders.payout": + case "manifest.manifest.v1.MsgPayoutStakeholders.payout": return x.Payout != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholders")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) } } @@ -997,15 +997,15 @@ func (x *fastReflection_MsgPayoutStakeholders) Has(fd protoreflect.FieldDescript // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPayoutStakeholders) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "manifest.v1.MsgPayoutStakeholders.authority": + case "manifest.manifest.v1.MsgPayoutStakeholders.authority": x.Authority = "" - case "manifest.v1.MsgPayoutStakeholders.payout": + case "manifest.manifest.v1.MsgPayoutStakeholders.payout": x.Payout = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholders")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) } } @@ -1017,17 +1017,17 @@ func (x *fastReflection_MsgPayoutStakeholders) Clear(fd protoreflect.FieldDescri // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgPayoutStakeholders) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "manifest.v1.MsgPayoutStakeholders.authority": + case "manifest.manifest.v1.MsgPayoutStakeholders.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "manifest.v1.MsgPayoutStakeholders.payout": + case "manifest.manifest.v1.MsgPayoutStakeholders.payout": value := x.Payout return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholders")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholders does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholders does not contain field %s", descriptor.FullName())) } } @@ -1043,15 +1043,15 @@ func (x *fastReflection_MsgPayoutStakeholders) Get(descriptor protoreflect.Field // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPayoutStakeholders) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "manifest.v1.MsgPayoutStakeholders.authority": + case "manifest.manifest.v1.MsgPayoutStakeholders.authority": x.Authority = value.Interface().(string) - case "manifest.v1.MsgPayoutStakeholders.payout": + case "manifest.manifest.v1.MsgPayoutStakeholders.payout": x.Payout = value.Message().Interface().(*types.Coin) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholders")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) } } @@ -1067,18 +1067,18 @@ func (x *fastReflection_MsgPayoutStakeholders) Set(fd protoreflect.FieldDescript // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgPayoutStakeholders) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.MsgPayoutStakeholders.payout": + case "manifest.manifest.v1.MsgPayoutStakeholders.payout": if x.Payout == nil { x.Payout = new(types.Coin) } return protoreflect.ValueOfMessage(x.Payout.ProtoReflect()) - case "manifest.v1.MsgPayoutStakeholders.authority": - panic(fmt.Errorf("field authority of message manifest.v1.MsgPayoutStakeholders is not mutable")) + case "manifest.manifest.v1.MsgPayoutStakeholders.authority": + panic(fmt.Errorf("field authority of message manifest.manifest.v1.MsgPayoutStakeholders is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholders")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) } } @@ -1087,16 +1087,16 @@ func (x *fastReflection_MsgPayoutStakeholders) Mutable(fd protoreflect.FieldDesc // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgPayoutStakeholders) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "manifest.v1.MsgPayoutStakeholders.authority": + case "manifest.manifest.v1.MsgPayoutStakeholders.authority": return protoreflect.ValueOfString("") - case "manifest.v1.MsgPayoutStakeholders.payout": + case "manifest.manifest.v1.MsgPayoutStakeholders.payout": m := new(types.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholders")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholders")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholders does not contain field %s", fd.FullName())) } } @@ -1106,7 +1106,7 @@ func (x *fastReflection_MsgPayoutStakeholders) NewField(fd protoreflect.FieldDes func (x *fastReflection_MsgPayoutStakeholders) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.MsgPayoutStakeholders", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.MsgPayoutStakeholders", d.FullName())) } panic("unreachable") } @@ -1376,8 +1376,8 @@ var ( ) func init() { - file_manifest_v1_tx_proto_init() - md_MsgPayoutStakeholdersResponse = File_manifest_v1_tx_proto.Messages().ByName("MsgPayoutStakeholdersResponse") + file_manifest_manifest_v1_tx_proto_init() + md_MsgPayoutStakeholdersResponse = File_manifest_manifest_v1_tx_proto.Messages().ByName("MsgPayoutStakeholdersResponse") } var _ protoreflect.Message = (*fastReflection_MsgPayoutStakeholdersResponse)(nil) @@ -1389,7 +1389,7 @@ func (x *MsgPayoutStakeholdersResponse) ProtoReflect() protoreflect.Message { } func (x *MsgPayoutStakeholdersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_manifest_v1_tx_proto_msgTypes[3] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1462,9 +1462,9 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) Has(fd protoreflect.Field switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholdersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholdersResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) } } @@ -1478,9 +1478,9 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) Clear(fd protoreflect.Fie switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholdersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholdersResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) } } @@ -1494,9 +1494,9 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) Get(descriptor protorefle switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholdersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholdersResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", descriptor.FullName())) } } @@ -1514,9 +1514,9 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) Set(fd protoreflect.Field switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholdersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholdersResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) } } @@ -1534,9 +1534,9 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) Mutable(fd protoreflect.F switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholdersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholdersResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) } } @@ -1547,9 +1547,9 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) NewField(fd protoreflect. switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgPayoutStakeholdersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.manifest.v1.MsgPayoutStakeholdersResponse")) } - panic(fmt.Errorf("message manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message manifest.manifest.v1.MsgPayoutStakeholdersResponse does not contain field %s", fd.FullName())) } } @@ -1559,7 +1559,7 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) NewField(fd protoreflect. func (x *fastReflection_MsgPayoutStakeholdersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in manifest.v1.MsgPayoutStakeholdersResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in manifest.manifest.v1.MsgPayoutStakeholdersResponse", d.FullName())) } panic("unreachable") } @@ -1731,7 +1731,7 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) ProtoMethods() *protoifac // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: manifest/v1/tx.proto +// source: manifest/manifest/v1/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -1759,7 +1759,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_tx_proto_msgTypes[0] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1773,7 +1773,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_manifest_v1_tx_proto_rawDescGZIP(), []int{0} + return file_manifest_manifest_v1_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgUpdateParams) GetAuthority() string { @@ -1803,7 +1803,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_tx_proto_msgTypes[1] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1817,7 +1817,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_manifest_v1_tx_proto_rawDescGZIP(), []int{1} + return file_manifest_manifest_v1_tx_proto_rawDescGZIP(), []int{1} } type MsgPayoutStakeholders struct { @@ -1833,7 +1833,7 @@ type MsgPayoutStakeholders struct { func (x *MsgPayoutStakeholders) Reset() { *x = MsgPayoutStakeholders{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_tx_proto_msgTypes[2] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1847,7 +1847,7 @@ func (*MsgPayoutStakeholders) ProtoMessage() {} // Deprecated: Use MsgPayoutStakeholders.ProtoReflect.Descriptor instead. func (*MsgPayoutStakeholders) Descriptor() ([]byte, []int) { - return file_manifest_v1_tx_proto_rawDescGZIP(), []int{2} + return file_manifest_manifest_v1_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgPayoutStakeholders) GetAuthority() string { @@ -1873,7 +1873,7 @@ type MsgPayoutStakeholdersResponse struct { func (x *MsgPayoutStakeholdersResponse) Reset() { *x = MsgPayoutStakeholdersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_manifest_v1_tx_proto_msgTypes[3] + mi := &file_manifest_manifest_v1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1887,105 +1887,113 @@ func (*MsgPayoutStakeholdersResponse) ProtoMessage() {} // Deprecated: Use MsgPayoutStakeholdersResponse.ProtoReflect.Descriptor instead. func (*MsgPayoutStakeholdersResponse) Descriptor() ([]byte, []int) { - return file_manifest_v1_tx_proto_rawDescGZIP(), []int{3} -} - -var File_manifest_v1_tx_proto protoreflect.FileDescriptor - -var file_manifest_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, - 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x0f, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x7b, 0x0a, 0x06, 0x70, 0x61, 0x79, 0x6f, 0x75, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x48, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, - 0x79, 0x6f, 0x75, 0x74, 0x3a, 0x12, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, - 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc6, 0x01, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x1a, - 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + return file_manifest_manifest_v1_tx_proto_rawDescGZIP(), []int{3} +} + +var File_manifest_manifest_v1_tx_proto protoreflect.FileDescriptor + +var file_manifest_manifest_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x14, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, + 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, + 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, - 0x2a, 0x01, 0x42, 0xa9, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, - 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x7b, 0x0a, 0x06, 0x70, + 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x48, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x2a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x3a, 0x12, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, + 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, + 0x6c, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xea, 0x01, + 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x64, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x50, + 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, + 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x33, + 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, + 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, + 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, + 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x4d, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x4d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x20, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x4d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, + 0x3a, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_manifest_v1_tx_proto_rawDescOnce sync.Once - file_manifest_v1_tx_proto_rawDescData = file_manifest_v1_tx_proto_rawDesc + file_manifest_manifest_v1_tx_proto_rawDescOnce sync.Once + file_manifest_manifest_v1_tx_proto_rawDescData = file_manifest_manifest_v1_tx_proto_rawDesc ) -func file_manifest_v1_tx_proto_rawDescGZIP() []byte { - file_manifest_v1_tx_proto_rawDescOnce.Do(func() { - file_manifest_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_v1_tx_proto_rawDescData) +func file_manifest_manifest_v1_tx_proto_rawDescGZIP() []byte { + file_manifest_manifest_v1_tx_proto_rawDescOnce.Do(func() { + file_manifest_manifest_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_manifest_manifest_v1_tx_proto_rawDescData) }) - return file_manifest_v1_tx_proto_rawDescData + return file_manifest_manifest_v1_tx_proto_rawDescData } -var file_manifest_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_manifest_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: manifest.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: manifest.v1.MsgUpdateParamsResponse - (*MsgPayoutStakeholders)(nil), // 2: manifest.v1.MsgPayoutStakeholders - (*MsgPayoutStakeholdersResponse)(nil), // 3: manifest.v1.MsgPayoutStakeholdersResponse - (*Params)(nil), // 4: manifest.v1.Params +var file_manifest_manifest_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_manifest_manifest_v1_tx_proto_goTypes = []interface{}{ + (*MsgUpdateParams)(nil), // 0: manifest.manifest.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: manifest.manifest.v1.MsgUpdateParamsResponse + (*MsgPayoutStakeholders)(nil), // 2: manifest.manifest.v1.MsgPayoutStakeholders + (*MsgPayoutStakeholdersResponse)(nil), // 3: manifest.manifest.v1.MsgPayoutStakeholdersResponse + (*Params)(nil), // 4: manifest.manifest.v1.Params (*types.Coin)(nil), // 5: cosmos.base.v1beta1.Coin } -var file_manifest_v1_tx_proto_depIdxs = []int32{ - 4, // 0: manifest.v1.MsgUpdateParams.params:type_name -> manifest.v1.Params - 5, // 1: manifest.v1.MsgPayoutStakeholders.payout:type_name -> cosmos.base.v1beta1.Coin - 0, // 2: manifest.v1.Msg.UpdateParams:input_type -> manifest.v1.MsgUpdateParams - 2, // 3: manifest.v1.Msg.PayoutStakeholders:input_type -> manifest.v1.MsgPayoutStakeholders - 1, // 4: manifest.v1.Msg.UpdateParams:output_type -> manifest.v1.MsgUpdateParamsResponse - 3, // 5: manifest.v1.Msg.PayoutStakeholders:output_type -> manifest.v1.MsgPayoutStakeholdersResponse +var file_manifest_manifest_v1_tx_proto_depIdxs = []int32{ + 4, // 0: manifest.manifest.v1.MsgUpdateParams.params:type_name -> manifest.manifest.v1.Params + 5, // 1: manifest.manifest.v1.MsgPayoutStakeholders.payout:type_name -> cosmos.base.v1beta1.Coin + 0, // 2: manifest.manifest.v1.Msg.UpdateParams:input_type -> manifest.manifest.v1.MsgUpdateParams + 2, // 3: manifest.manifest.v1.Msg.PayoutStakeholders:input_type -> manifest.manifest.v1.MsgPayoutStakeholders + 1, // 4: manifest.manifest.v1.Msg.UpdateParams:output_type -> manifest.manifest.v1.MsgUpdateParamsResponse + 3, // 5: manifest.manifest.v1.Msg.PayoutStakeholders:output_type -> manifest.manifest.v1.MsgPayoutStakeholdersResponse 4, // [4:6] is the sub-list for method output_type 2, // [2:4] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -1993,14 +2001,14 @@ var file_manifest_v1_tx_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_manifest_v1_tx_proto_init() } -func file_manifest_v1_tx_proto_init() { - if File_manifest_v1_tx_proto != nil { +func init() { file_manifest_manifest_v1_tx_proto_init() } +func file_manifest_manifest_v1_tx_proto_init() { + if File_manifest_manifest_v1_tx_proto != nil { return } - file_manifest_v1_genesis_proto_init() + file_manifest_manifest_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { - file_manifest_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state @@ -2012,7 +2020,7 @@ func file_manifest_v1_tx_proto_init() { return nil } } - file_manifest_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state @@ -2024,7 +2032,7 @@ func file_manifest_v1_tx_proto_init() { return nil } } - file_manifest_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPayoutStakeholders); i { case 0: return &v.state @@ -2036,7 +2044,7 @@ func file_manifest_v1_tx_proto_init() { return nil } } - file_manifest_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_manifest_manifest_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgPayoutStakeholdersResponse); i { case 0: return &v.state @@ -2053,18 +2061,18 @@ func file_manifest_v1_tx_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_manifest_v1_tx_proto_rawDesc, + RawDescriptor: file_manifest_manifest_v1_tx_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_manifest_v1_tx_proto_goTypes, - DependencyIndexes: file_manifest_v1_tx_proto_depIdxs, - MessageInfos: file_manifest_v1_tx_proto_msgTypes, + GoTypes: file_manifest_manifest_v1_tx_proto_goTypes, + DependencyIndexes: file_manifest_manifest_v1_tx_proto_depIdxs, + MessageInfos: file_manifest_manifest_v1_tx_proto_msgTypes, }.Build() - File_manifest_v1_tx_proto = out.File - file_manifest_v1_tx_proto_rawDesc = nil - file_manifest_v1_tx_proto_goTypes = nil - file_manifest_v1_tx_proto_depIdxs = nil + File_manifest_manifest_v1_tx_proto = out.File + file_manifest_manifest_v1_tx_proto_rawDesc = nil + file_manifest_manifest_v1_tx_proto_goTypes = nil + file_manifest_manifest_v1_tx_proto_depIdxs = nil } diff --git a/api/manifest/v1/tx_grpc.pb.go b/api/manifest/v1/tx_grpc.pb.go index 3e56e41..fbb50f3 100644 --- a/api/manifest/v1/tx_grpc.pb.go +++ b/api/manifest/v1/tx_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: manifest/v1/tx.proto +// source: manifest/manifest/v1/tx.proto package manifestv1 @@ -19,8 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_UpdateParams_FullMethodName = "/manifest.v1.Msg/UpdateParams" - Msg_PayoutStakeholders_FullMethodName = "/manifest.v1.Msg/PayoutStakeholders" + Msg_UpdateParams_FullMethodName = "/manifest.manifest.v1.Msg/UpdateParams" + Msg_PayoutStakeholders_FullMethodName = "/manifest.manifest.v1.Msg/PayoutStakeholders" ) // MsgClient is the client API for Msg service. @@ -135,7 +135,7 @@ func _Msg_PayoutStakeholders_Handler(srv interface{}, ctx context.Context, dec f // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "manifest.v1.Msg", + ServiceName: "manifest.manifest.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -148,5 +148,5 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "manifest/v1/tx.proto", + Metadata: "manifest/manifest/v1/tx.proto", } diff --git a/app/app.go b/app/app.go index 0e3d201..9bed8f8 100644 --- a/app/app.go +++ b/app/app.go @@ -110,9 +110,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/liftedinit/manifest-ledger/x/distribution" - distrkeeper "github.com/liftedinit/manifest-ledger/x/distribution/keeper" - distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" @@ -137,6 +134,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + distr "github.com/liftedinit/manifest-ledger/x/distribution" + distrkeeper "github.com/liftedinit/manifest-ledger/x/distribution/keeper" + distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" ) // !IMPORTANT: testnet only (reece's addr) diff --git a/proto/manifest/distribution/module/v1/module.proto b/proto/manifest/distribution/module/v1/module.proto new file mode 100644 index 0000000..8494965 --- /dev/null +++ b/proto/manifest/distribution/module/v1/module.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package manifest.distribution.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object of the distribution module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/liftedinit/manifest-ledger/x/distribution" + }; + + string fee_collector_name = 1; + + // authority defines the custom module authority. If not set, defaults to the governance module. + string authority = 2; +} \ No newline at end of file diff --git a/proto/manifest/distribution/v1beta1/distribution.proto b/proto/manifest/distribution/v1beta1/distribution.proto new file mode 100644 index 0000000..95d00de --- /dev/null +++ b/proto/manifest/distribution/v1beta1/distribution.proto @@ -0,0 +1,194 @@ +syntax = "proto3"; +package manifest.distribution.v1beta1; + +option go_package = "github.com/liftedinit/manifest-ledger/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; + +// Params defines the set of params for the distribution module. +message Params { + option (amino.name) = "cosmos-sdk/x/distribution/Params"; + + string community_tax = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (amino.dont_omitempty) = true, + (gogoproto.nullable) = false + ]; + + // Deprecated: The base_proposer_reward field is deprecated and is no longer used + // in the x/distribution module's reward mechanism. + string base_proposer_reward = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + deprecated = true + ]; + + // Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + // in the x/distribution module's reward mechanism. + string bonus_proposer_reward = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + deprecated = true + ]; + + bool withdraw_addr_enabled = 4; +} + +// ValidatorHistoricalRewards represents historical rewards for a validator. +// Height is implicit within the store key. +// Cumulative reward ratio is the sum from the zeroeth period +// until this period of rewards / tokens, per the spec. +// The reference count indicates the number of objects +// which might need to reference this historical entry at any point. +// ReferenceCount = +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization +message ValidatorHistoricalRewards { + repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + uint32 reference_count = 2; +} + +// ValidatorCurrentRewards represents current rewards and current +// period for a validator kept as a running counter and incremented +// each block as long as the validator's tokens remain constant. +message ValidatorCurrentRewards { + repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + uint64 period = 2; +} + +// ValidatorAccumulatedCommission represents accumulated commission +// for a validator kept as a running counter, can be withdrawn at any time. +message ValidatorAccumulatedCommission { + repeated cosmos.base.v1beta1.DecCoin commission = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +// for a validator inexpensive to track, allows simple sanity checks. +message ValidatorOutstandingRewards { + repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// ValidatorSlashEvent represents a validator slash event. +// Height is implicit within the store key. +// This is needed to calculate appropriate amount of staking tokens +// for delegations which are withdrawn after a slash has occurred. +message ValidatorSlashEvent { + uint64 validator_period = 1; + string fraction = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} + +// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +message ValidatorSlashEvents { + repeated ValidatorSlashEvent validator_slash_events = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// FeePool is the global fee pool for distribution. +message FeePool { + repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// CommunityPoolSpendProposal details a proposal for use of community funds, +// together with how many coins are proposed to be spent, and to which +// recipient account. +// +// Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no +// longer a need for an explicit CommunityPoolSpendProposal. To spend community +// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov +// module via a v1 governance proposal. +message CommunityPoolSpendProposal { + option deprecated = true; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1; + string description = 2; + string recipient = 3; + repeated cosmos.base.v1beta1.Coin amount = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, +// thus sdk.Dec is used. +message DelegatorStartingInfo { + uint64 previous_period = 1; + string stake = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + uint64 height = 3 + [(gogoproto.jsontag) = "creation_height", (amino.field_name) = "creation_height", (amino.dont_omitempty) = true]; +} + +// DelegationDelegatorReward represents the properties +// of a delegator's delegation reward. +message DelegationDelegatorReward { + option (gogoproto.goproto_getters) = false; + + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + repeated cosmos.base.v1beta1.DecCoin reward = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit +message CommunityPoolSpendProposalWithDeposit { + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + string title = 1; + string description = 2; + string recipient = 3; + string amount = 4; + string deposit = 5; +} diff --git a/proto/manifest/distribution/v1beta1/genesis.proto b/proto/manifest/distribution/v1beta1/genesis.proto new file mode 100644 index 0000000..e9bed75 --- /dev/null +++ b/proto/manifest/distribution/v1beta1/genesis.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; +package manifest.distribution.v1beta1; + +option go_package = "github.com/liftedinit/manifest-ledger/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "manifest/distribution/v1beta1/distribution.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; + +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. +message DelegatorWithdrawInfo { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address is the address of the delegator. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // withdraw_address is the address to withdraw the delegation rewards to. + string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +message ValidatorOutstandingRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // outstanding_rewards represents the outstanding rewards of a validator. + repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. +message ValidatorAccumulatedCommissionRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // accumulated is the accumulated commission of a validator. + ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. +message ValidatorHistoricalRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // period defines the period the historical rewards apply to. + uint64 period = 2; + + // rewards defines the historical rewards of a validator. + ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +message ValidatorCurrentRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // rewards defines the current rewards of a validator. + ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// DelegatorStartingInfoRecord used for import / export via genesis json. +message DelegatorStartingInfoRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address is the address of the delegator. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // validator_address is the address of the validator. + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // starting_info defines the starting info of a delegator. + DelegatorStartingInfo starting_info = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// ValidatorSlashEventRecord is used for import / export via genesis json. +message ValidatorSlashEventRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + // height defines the block height at which the slash event occurred. + uint64 height = 2; + // period is the period of the slash event. + uint64 period = 3; + // validator_slash_event describes the slash event. + ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// GenesisState defines the distribution module's genesis state. +message GenesisState { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // params defines all the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the fee pool at genesis. + FeePool fee_pool = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the delegator withdraw infos at genesis. + repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the previous proposer at genesis. + string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // fee_pool defines the outstanding rewards of all validators at genesis. + repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the accumulated commissions of all validators at genesis. + repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the historical rewards of all validators at genesis. + repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the current rewards of all validators at genesis. + repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the delegator starting infos at genesis. + repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // fee_pool defines the validator slash events at genesis. + repeated ValidatorSlashEventRecord validator_slash_events = 10 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} diff --git a/proto/manifest/distribution/v1beta1/query.proto b/proto/manifest/distribution/v1beta1/query.proto new file mode 100644 index 0000000..9e66389 --- /dev/null +++ b/proto/manifest/distribution/v1beta1/query.proto @@ -0,0 +1,255 @@ +syntax = "proto3"; +package manifest.distribution.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "manifest/distribution/v1beta1/distribution.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/liftedinit/manifest-ledger/x/distribution/types"; + +// Query defines the gRPC querier service for distribution module. +service Query { + // Params queries params of the distribution module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; + } + + // ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + rpc ValidatorDistributionInfo(QueryValidatorDistributionInfoRequest) + returns (QueryValidatorDistributionInfoResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}"; + } + + // ValidatorOutstandingRewards queries rewards of a validator address. + rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) + returns (QueryValidatorOutstandingRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/outstanding_rewards"; + } + + // ValidatorCommission queries accumulated commission for a validator. + rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/commission"; + } + + // ValidatorSlashes queries slash events of a validator. + rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; + } + + // DelegationRewards queries the total rewards accrued by a delegation. + rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" + "{validator_address}"; + } + + // DelegationTotalRewards queries the total rewards accrued by each + // validator. + rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; + } + + // DelegatorValidators queries the validators of a delegator. + rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/validators"; + } + + // DelegatorWithdrawAddress queries withdraw address of a delegator. + rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/withdraw_address"; + } + + // CommunityPool queries the community pool coins. + rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method. +message QueryValidatorDistributionInfoRequest { + // validator_address defines the validator address to query for. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. +message QueryValidatorDistributionInfoResponse { + // operator_address defines the validator operator address. + string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + // self_bond_rewards defines the self delegations rewards. + repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; + // commission defines the commission the validator received. + repeated cosmos.base.v1beta1.DecCoin commission = 3 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsRequest { + // validator_address defines the validator address to query for. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsResponse { + ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionRequest { + // validator_address defines the validator address to query for. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionResponse { + // commission defines the commission the validator received. + ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method +message QueryValidatorSlashesRequest { + option (gogoproto.goproto_getters) = false; + + // validator_address defines the validator address to query for. + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + // starting_height defines the optional starting height to query the slashes. + uint64 starting_height = 2; + // starting_height defines the optional ending height to query the slashes. + uint64 ending_height = 3; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +message QueryValidatorSlashesResponse { + // slashes defines the slashes the validator received. + repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // validator_address defines the validator address to query for. + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsResponse { + // rewards defines the rewards accrued by a delegation. + repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address defines the delegator address to query for. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsResponse { + // rewards defines all the rewards accrued by a delegator. + repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // total defines the sum of all the rewards. + repeated cosmos.base.v1beta1.DecCoin total = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validators defines the validators a delegator is delegating for. + repeated string validators = 1; +} + +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // withdraw_address defines the delegator address to query for. + string withdraw_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. +message QueryCommunityPoolRequest {} + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +message QueryCommunityPoolResponse { + // pool defines community pool's coins. + repeated cosmos.base.v1beta1.DecCoin pool = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} diff --git a/proto/manifest/distribution/v1beta1/tx.proto b/proto/manifest/distribution/v1beta1/tx.proto new file mode 100644 index 0000000..83b9745 --- /dev/null +++ b/proto/manifest/distribution/v1beta1/tx.proto @@ -0,0 +1,215 @@ +syntax = "proto3"; +package manifest.distribution.v1beta1; + +option go_package = "github.com/liftedinit/manifest-ledger/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "amino/amino.proto"; +import "manifest/distribution/v1beta1/distribution.proto"; + +// Msg defines the distribution Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); + + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); + + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); + + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); + + // UpdateParams defines a governance operation for updating the x/distribution + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // CommunityPoolSpend defines a governance operation for sending tokens from + // the community pool in the x/distribution module to another account, which + // could be the governance module itself. The authority is defined in the + // keeper. + // + // Since: cosmos-sdk 0.47 + rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); + + // DepositValidatorRewardsPool defines a method to provide additional rewards + // to delegators to a specific validator. + // + // Since: cosmos-sdk 0.50 + rpc DepositValidatorRewardsPool(MsgDepositValidatorRewardsPool) returns (MsgDepositValidatorRewardsPoolResponse); +} + +// MsgSetWithdrawAddress sets the withdraw address for +// a delegator (or validator self-delegation). +message MsgSetWithdrawAddress { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (amino.name) = "cosmos-sdk/MsgModifyWithdrawAddress"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response +// type. +message MsgSetWithdrawAddressResponse {} + +// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +// from a single validator. +message MsgWithdrawDelegatorReward { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (amino.name) = "cosmos-sdk/MsgWithdrawDelegationReward"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward +// response type. +message MsgWithdrawDelegatorRewardResponse { + // Since: cosmos-sdk 0.46 + repeated cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. +message MsgWithdrawValidatorCommission { + option (cosmos.msg.v1.signer) = "validator_address"; + option (amino.name) = "cosmos-sdk/MsgWithdrawValCommission"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// MsgWithdrawValidatorCommissionResponse defines the +// Msg/WithdrawValidatorCommission response type. +message MsgWithdrawValidatorCommissionResponse { + // Since: cosmos-sdk 0.46 + repeated cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgFundCommunityPool allows an account to directly +// fund the community pool. +message MsgFundCommunityPool { + option (cosmos.msg.v1.signer) = "depositor"; + option (amino.name) = "cosmos-sdk/MsgFundCommunityPool"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + repeated cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +message MsgFundCommunityPoolResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "cosmos-sdk/distribution/MsgUpdateParams"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/distribution parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} + +// MsgCommunityPoolSpend defines a message for sending tokens from the community +// pool to another account. This message is typically executed via a governance +// proposal with the governance module being the executing authority. +// +// Since: cosmos-sdk 0.47 +message MsgCommunityPoolSpend { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "cosmos-sdk/distr/MsgCommunityPoolSpend"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient = 2; + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgCommunityPoolSpendResponse defines the response to executing a +// MsgCommunityPoolSpend message. +// +// Since: cosmos-sdk 0.47 +message MsgCommunityPoolSpendResponse {} + +// DepositValidatorRewardsPool defines the request structure to provide +// additional rewards to delegators from a specific validator. +// +// Since: cosmos-sdk 0.50 +message MsgDepositValidatorRewardsPool { + option (amino.name) = "cosmos-sdk/distr/MsgDepositValRewards"; + option (cosmos.msg.v1.signer) = "depositor"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string depositor = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (amino.encoding) = "legacy_coins", + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgDepositValidatorRewardsPoolResponse defines the response to executing a +// MsgDepositValidatorRewardsPool message. +// +// Since: cosmos-sdk 0.50 +message MsgDepositValidatorRewardsPoolResponse {} diff --git a/proto/manifest/module/v1/module.proto b/proto/manifest/manifest/module/v1/module.proto similarity index 71% rename from proto/manifest/module/v1/module.proto rename to proto/manifest/manifest/module/v1/module.proto index 8de32cc..ffa277c 100644 --- a/proto/manifest/module/v1/module.proto +++ b/proto/manifest/manifest/module/v1/module.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package manifest.module.v1; +package manifest.manifest.module.v1; import "cosmos/app/v1alpha1/module.proto"; @@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import : "github.com/liftedinit/manifest-ledger" + go_import : "github.com/liftedinit/manifest-ledger/x/manifest" }; } \ No newline at end of file diff --git a/proto/manifest/v1/genesis.proto b/proto/manifest/manifest/v1/genesis.proto similarity index 96% rename from proto/manifest/v1/genesis.proto rename to proto/manifest/manifest/v1/genesis.proto index 54c36f1..a36eda4 100644 --- a/proto/manifest/v1/genesis.proto +++ b/proto/manifest/manifest/v1/genesis.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package manifest.v1; +package manifest.manifest.v1; import "gogoproto/gogo.proto"; import "amino/amino.proto"; diff --git a/proto/manifest/v1/query.proto b/proto/manifest/manifest/v1/query.proto similarity index 89% rename from proto/manifest/v1/query.proto rename to proto/manifest/manifest/v1/query.proto index eeae4d0..3d5d5d7 100644 --- a/proto/manifest/v1/query.proto +++ b/proto/manifest/manifest/v1/query.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package manifest.v1; +package manifest.manifest.v1; import "google/api/annotations.proto"; -import "manifest/v1/genesis.proto"; +import "manifest/manifest/v1/genesis.proto"; option go_package = "github.com/liftedinit/manifest-ledger/x/manifest/types"; diff --git a/proto/manifest/v1/tx.proto b/proto/manifest/manifest/v1/tx.proto similarity index 96% rename from proto/manifest/v1/tx.proto rename to proto/manifest/manifest/v1/tx.proto index 84a1143..ce7989c 100644 --- a/proto/manifest/v1/tx.proto +++ b/proto/manifest/manifest/v1/tx.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package manifest.v1; +package manifest.manifest.v1; import "cosmos/msg/v1/msg.proto"; -import "manifest/v1/genesis.proto"; +import "manifest/manifest/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 2445372..10ac2b2 100644 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -31,6 +31,6 @@ for module in $custom_modules; do dirPath=`basename $(dirname $module)` mkdir -p api/$dirPath - mv $dirPath/* ./api/$dirPath/ + cp -r $dirPath/* ./api/$dirPath/ rm -rf $dirPath done \ No newline at end of file diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go index 8b8aca0..a4af760 100644 --- a/x/distribution/keeper/delegation.go +++ b/x/distribution/keeper/delegation.go @@ -7,6 +7,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/liftedinit/manifest-ledger/x/distribution/types" ) @@ -210,7 +211,7 @@ func (k Keeper) withdrawDelegationRewards(ctx context.Context, val stakingtypes. } if !hasInfo { - return nil, types.ErrEmptyDelegationDistInfo + return nil, distrtypes.ErrEmptyDelegationDistInfo } // end current period and calculate rewards diff --git a/x/distribution/keeper/fee_pool.go b/x/distribution/keeper/fee_pool.go index 525659a..606475d 100644 --- a/x/distribution/keeper/fee_pool.go +++ b/x/distribution/keeper/fee_pool.go @@ -4,6 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/liftedinit/manifest-ledger/x/distribution/types" ) @@ -20,7 +21,7 @@ func (k Keeper) DistributeFromFeePool(ctx context.Context, amount sdk.Coins, rec // must be reduced separately from the SendCoinsFromModuleToAccount call newPool, negative := feePool.CommunityPool.SafeSub(sdk.NewDecCoinsFromCoins(amount...)) if negative { - return types.ErrBadDistribution + return distrtypes.ErrBadDistribution } feePool.CommunityPool = newPool diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index 93b8d8b..0d6f9a3 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -12,6 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/liftedinit/manifest-ledger/x/distribution/types" ) @@ -58,7 +59,7 @@ func (k Querier) ValidatorDistributionInfo(ctx context.Context, req *types.Query } if val == nil { - return nil, errors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) + return nil, errors.Wrap(distrtypes.ErrNoValidatorExists, req.ValidatorAddress) } delAdr := sdk.AccAddress(valAdr) @@ -69,7 +70,7 @@ func (k Querier) ValidatorDistributionInfo(ctx context.Context, req *types.Query } if del == nil { - return nil, types.ErrNoDelegationExists + return nil, distrtypes.ErrNoDelegationExists } endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) @@ -116,7 +117,7 @@ func (k Querier) ValidatorOutstandingRewards(ctx context.Context, req *types.Que } if validator == nil { - return nil, errors.Wrapf(types.ErrNoValidatorExists, req.ValidatorAddress) + return nil, errors.Wrapf(distrtypes.ErrNoValidatorExists, req.ValidatorAddress) } rewards, err := k.GetValidatorOutstandingRewards(ctx, valAdr) @@ -148,7 +149,7 @@ func (k Querier) ValidatorCommission(ctx context.Context, req *types.QueryValida } if validator == nil { - return nil, errors.Wrapf(types.ErrNoValidatorExists, req.ValidatorAddress) + return nil, errors.Wrapf(distrtypes.ErrNoValidatorExists, req.ValidatorAddress) } commission, err := k.GetValidatorAccumulatedCommission(ctx, valAdr) if err != nil { @@ -226,7 +227,7 @@ func (k Querier) DelegationRewards(ctx context.Context, req *types.QueryDelegati } if val == nil { - return nil, errors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress) + return nil, errors.Wrap(distrtypes.ErrNoValidatorExists, req.ValidatorAddress) } delAdr, err := k.authKeeper.AddressCodec().StringToBytes(req.DelegatorAddress) @@ -239,7 +240,7 @@ func (k Querier) DelegationRewards(ctx context.Context, req *types.QueryDelegati } if del == nil { - return nil, types.ErrNoDelegationExists + return nil, distrtypes.ErrNoDelegationExists } endingPeriod, err := k.IncrementValidatorPeriod(ctx, val) diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 7a03426..bbb9e0c 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -12,6 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/liftedinit/manifest-ledger/x/distribution/types" ) @@ -88,7 +89,7 @@ func (k Keeper) SetWithdrawAddr(ctx context.Context, delegatorAddr, withdrawAddr } if !withdrawAddrEnabled { - return types.ErrSetWithdrawAddrDisabled + return distrtypes.ErrSetWithdrawAddrDisabled } sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -111,7 +112,7 @@ func (k Keeper) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAd } if val == nil { - return nil, types.ErrNoValidatorDistInfo + return nil, distrtypes.ErrNoValidatorDistInfo } del, err := k.stakingKeeper.Delegation(ctx, delAddr, valAddr) @@ -120,7 +121,7 @@ func (k Keeper) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAd } if del == nil { - return nil, types.ErrEmptyDelegationDistInfo + return nil, distrtypes.ErrEmptyDelegationDistInfo } // withdraw rewards @@ -146,7 +147,7 @@ func (k Keeper) WithdrawValidatorCommission(ctx context.Context, valAddr sdk.Val } if accumCommission.Commission.IsZero() { - return nil, types.ErrNoValidatorCommission + return nil, distrtypes.ErrNoValidatorCommission } commission, remainder := accumCommission.Commission.TruncateDecimal() diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index 7b84245..b895014 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/liftedinit/manifest-ledger/x/distribution/types" ) @@ -190,7 +191,7 @@ func (k msgServer) DepositValidatorRewardsPool(ctx context.Context, msg *types.M } if validator == nil { - return nil, errors.Wrapf(types.ErrNoValidatorExists, msg.ValidatorAddress) + return nil, errors.Wrapf(distrtypes.ErrNoValidatorExists, msg.ValidatorAddress) } // Allocate tokens from the distribution module to the validator, which are diff --git a/x/distribution/types/codec.go b/x/distribution/types/codec.go index 3cf2c73..8b05bd4 100644 --- a/x/distribution/types/codec.go +++ b/x/distribution/types/codec.go @@ -13,15 +13,15 @@ import ( // and concrete types on the provided LegacyAmino codec. These types are used // for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgWithdrawDelegatorReward{}, "cosmos-sdk/MsgWithdrawDelegationReward") - legacy.RegisterAminoMsg(cdc, &MsgWithdrawValidatorCommission{}, "cosmos-sdk/MsgWithdrawValCommission") - legacy.RegisterAminoMsg(cdc, &MsgSetWithdrawAddress{}, "cosmos-sdk/MsgModifyWithdrawAddress") - legacy.RegisterAminoMsg(cdc, &MsgFundCommunityPool{}, "cosmos-sdk/MsgFundCommunityPool") - legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/distribution/MsgUpdateParams") - legacy.RegisterAminoMsg(cdc, &MsgCommunityPoolSpend{}, "cosmos-sdk/distr/MsgCommunityPoolSpend") - legacy.RegisterAminoMsg(cdc, &MsgDepositValidatorRewardsPool{}, "cosmos-sdk/distr/MsgDepositValRewards") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawDelegatorReward{}, "manifest/MsgWithdrawDelegationReward") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawValidatorCommission{}, "manifest/MsgWithdrawValCommission") + legacy.RegisterAminoMsg(cdc, &MsgSetWithdrawAddress{}, "manifest/MsgModifyWithdrawAddress") + legacy.RegisterAminoMsg(cdc, &MsgFundCommunityPool{}, "manifest/MsgFundCommunityPool") + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "manifest/distribution/MsgUpdateParams") + legacy.RegisterAminoMsg(cdc, &MsgCommunityPoolSpend{}, "manifest/distr/MsgCommunityPoolSpend") + legacy.RegisterAminoMsg(cdc, &MsgDepositValidatorRewardsPool{}, "manifest/distr/MsgDepositValRewards") - cdc.RegisterConcrete(Params{}, "cosmos-sdk/x/distribution/Params", nil) + cdc.RegisterConcrete(Params{}, "manifest/x/distribution/Params", nil) } func RegisterInterfaces(registry types.InterfaceRegistry) { diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index bd9f9d1..af8b736 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/distribution/v1beta1/distribution.proto +// source: manifest/distribution/v1beta1/distribution.proto package types @@ -44,7 +44,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{0} + return fileDescriptor_08ac0e9378c9f2e5, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ func (m *ValidatorHistoricalRewards) Reset() { *m = ValidatorHistoricalR func (m *ValidatorHistoricalRewards) String() string { return proto.CompactTextString(m) } func (*ValidatorHistoricalRewards) ProtoMessage() {} func (*ValidatorHistoricalRewards) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{1} + return fileDescriptor_08ac0e9378c9f2e5, []int{1} } func (m *ValidatorHistoricalRewards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -157,7 +157,7 @@ func (m *ValidatorCurrentRewards) Reset() { *m = ValidatorCurrentRewards func (m *ValidatorCurrentRewards) String() string { return proto.CompactTextString(m) } func (*ValidatorCurrentRewards) ProtoMessage() {} func (*ValidatorCurrentRewards) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{2} + return fileDescriptor_08ac0e9378c9f2e5, []int{2} } func (m *ValidatorCurrentRewards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -210,7 +210,7 @@ func (m *ValidatorAccumulatedCommission) Reset() { *m = ValidatorAccumul func (m *ValidatorAccumulatedCommission) String() string { return proto.CompactTextString(m) } func (*ValidatorAccumulatedCommission) ProtoMessage() {} func (*ValidatorAccumulatedCommission) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{3} + return fileDescriptor_08ac0e9378c9f2e5, []int{3} } func (m *ValidatorAccumulatedCommission) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -256,7 +256,7 @@ func (m *ValidatorOutstandingRewards) Reset() { *m = ValidatorOutstandin func (m *ValidatorOutstandingRewards) String() string { return proto.CompactTextString(m) } func (*ValidatorOutstandingRewards) ProtoMessage() {} func (*ValidatorOutstandingRewards) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{4} + return fileDescriptor_08ac0e9378c9f2e5, []int{4} } func (m *ValidatorOutstandingRewards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,7 +305,7 @@ func (m *ValidatorSlashEvent) Reset() { *m = ValidatorSlashEvent{} } func (m *ValidatorSlashEvent) String() string { return proto.CompactTextString(m) } func (*ValidatorSlashEvent) ProtoMessage() {} func (*ValidatorSlashEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{5} + return fileDescriptor_08ac0e9378c9f2e5, []int{5} } func (m *ValidatorSlashEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -350,7 +350,7 @@ func (m *ValidatorSlashEvents) Reset() { *m = ValidatorSlashEvents{} } func (m *ValidatorSlashEvents) String() string { return proto.CompactTextString(m) } func (*ValidatorSlashEvents) ProtoMessage() {} func (*ValidatorSlashEvents) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{6} + return fileDescriptor_08ac0e9378c9f2e5, []int{6} } func (m *ValidatorSlashEvents) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -395,7 +395,7 @@ func (m *FeePool) Reset() { *m = FeePool{} } func (m *FeePool) String() string { return proto.CompactTextString(m) } func (*FeePool) ProtoMessage() {} func (*FeePool) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{7} + return fileDescriptor_08ac0e9378c9f2e5, []int{7} } func (m *FeePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,7 +452,7 @@ func (m *CommunityPoolSpendProposal) Reset() { *m = CommunityPoolSpendPr func (m *CommunityPoolSpendProposal) String() string { return proto.CompactTextString(m) } func (*CommunityPoolSpendProposal) ProtoMessage() {} func (*CommunityPoolSpendProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{8} + return fileDescriptor_08ac0e9378c9f2e5, []int{8} } func (m *CommunityPoolSpendProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +497,7 @@ func (m *DelegatorStartingInfo) Reset() { *m = DelegatorStartingInfo{} } func (m *DelegatorStartingInfo) String() string { return proto.CompactTextString(m) } func (*DelegatorStartingInfo) ProtoMessage() {} func (*DelegatorStartingInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{9} + return fileDescriptor_08ac0e9378c9f2e5, []int{9} } func (m *DelegatorStartingInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,7 +551,7 @@ func (m *DelegationDelegatorReward) Reset() { *m = DelegationDelegatorRe func (m *DelegationDelegatorReward) String() string { return proto.CompactTextString(m) } func (*DelegationDelegatorReward) ProtoMessage() {} func (*DelegationDelegatorReward) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{10} + return fileDescriptor_08ac0e9378c9f2e5, []int{10} } func (m *DelegationDelegatorReward) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -594,7 +594,7 @@ func (m *CommunityPoolSpendProposalWithDeposit) Reset() { *m = Community func (m *CommunityPoolSpendProposalWithDeposit) String() string { return proto.CompactTextString(m) } func (*CommunityPoolSpendProposalWithDeposit) ProtoMessage() {} func (*CommunityPoolSpendProposalWithDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_cd78a31ea281a992, []int{11} + return fileDescriptor_08ac0e9378c9f2e5, []int{11} } func (m *CommunityPoolSpendProposalWithDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -624,90 +624,91 @@ func (m *CommunityPoolSpendProposalWithDeposit) XXX_DiscardUnknown() { var xxx_messageInfo_CommunityPoolSpendProposalWithDeposit proto.InternalMessageInfo func init() { - proto.RegisterType((*Params)(nil), "cosmos.distribution.v1beta1.Params") - proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos.distribution.v1beta1.ValidatorHistoricalRewards") - proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos.distribution.v1beta1.ValidatorCurrentRewards") - proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission") - proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos.distribution.v1beta1.ValidatorOutstandingRewards") - proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEvent") - proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEvents") - proto.RegisterType((*FeePool)(nil), "cosmos.distribution.v1beta1.FeePool") - proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposal") - proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos.distribution.v1beta1.DelegatorStartingInfo") - proto.RegisterType((*DelegationDelegatorReward)(nil), "cosmos.distribution.v1beta1.DelegationDelegatorReward") - proto.RegisterType((*CommunityPoolSpendProposalWithDeposit)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit") + proto.RegisterType((*Params)(nil), "manifest.distribution.v1beta1.Params") + proto.RegisterType((*ValidatorHistoricalRewards)(nil), "manifest.distribution.v1beta1.ValidatorHistoricalRewards") + proto.RegisterType((*ValidatorCurrentRewards)(nil), "manifest.distribution.v1beta1.ValidatorCurrentRewards") + proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "manifest.distribution.v1beta1.ValidatorAccumulatedCommission") + proto.RegisterType((*ValidatorOutstandingRewards)(nil), "manifest.distribution.v1beta1.ValidatorOutstandingRewards") + proto.RegisterType((*ValidatorSlashEvent)(nil), "manifest.distribution.v1beta1.ValidatorSlashEvent") + proto.RegisterType((*ValidatorSlashEvents)(nil), "manifest.distribution.v1beta1.ValidatorSlashEvents") + proto.RegisterType((*FeePool)(nil), "manifest.distribution.v1beta1.FeePool") + proto.RegisterType((*CommunityPoolSpendProposal)(nil), "manifest.distribution.v1beta1.CommunityPoolSpendProposal") + proto.RegisterType((*DelegatorStartingInfo)(nil), "manifest.distribution.v1beta1.DelegatorStartingInfo") + proto.RegisterType((*DelegationDelegatorReward)(nil), "manifest.distribution.v1beta1.DelegationDelegatorReward") + proto.RegisterType((*CommunityPoolSpendProposalWithDeposit)(nil), "manifest.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit") } func init() { - proto.RegisterFile("cosmos/distribution/v1beta1/distribution.proto", fileDescriptor_cd78a31ea281a992) -} - -var fileDescriptor_cd78a31ea281a992 = []byte{ - // 1012 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x34, 0x89, 0xd3, 0x4c, 0xdb, 0x84, 0x4e, 0x9c, 0xd4, 0x71, 0x8b, 0x6d, 0x56, 0xaa, - 0x30, 0x81, 0xd8, 0xa4, 0x48, 0x08, 0xe5, 0xd6, 0xd8, 0xad, 0x40, 0x2a, 0x34, 0xda, 0x20, 0x90, - 0xe0, 0xb0, 0x1a, 0xef, 0x4e, 0xec, 0x21, 0xbb, 0x33, 0xcb, 0xcc, 0xd8, 0x49, 0x0e, 0xdc, 0x03, - 0x07, 0xe0, 0x06, 0xea, 0xa9, 0x82, 0x4b, 0xc5, 0x29, 0x87, 0xfc, 0x88, 0x8a, 0x53, 0x55, 0x10, - 0x42, 0x1c, 0x02, 0x24, 0x87, 0x20, 0x7e, 0x05, 0x9a, 0x9d, 0xf1, 0xae, 0x13, 0x42, 0x81, 0x22, - 0x8b, 0x4b, 0x94, 0x79, 0x6f, 0xf6, 0x7d, 0xdf, 0xf7, 0xe6, 0x9b, 0x37, 0x86, 0x75, 0x9f, 0xcb, - 0x88, 0xcb, 0x46, 0x40, 0xa5, 0x12, 0xb4, 0xdd, 0x53, 0x94, 0xb3, 0x46, 0x7f, 0xb9, 0x4d, 0x14, - 0x5e, 0x3e, 0x11, 0xac, 0xc7, 0x82, 0x2b, 0x8e, 0xae, 0x9a, 0xfd, 0xf5, 0x13, 0x29, 0xbb, 0xbf, - 0x54, 0xe8, 0xf0, 0x0e, 0x4f, 0xf6, 0x35, 0xf4, 0x7f, 0xe6, 0x93, 0x52, 0xd9, 0x42, 0xb4, 0xb1, - 0x24, 0x69, 0x69, 0x9f, 0x53, 0x5b, 0xb2, 0xb4, 0x60, 0xf2, 0x9e, 0xf9, 0xd0, 0xd6, 0x37, 0xa9, - 0xcb, 0x38, 0xa2, 0x8c, 0x37, 0x92, 0xbf, 0x26, 0xe4, 0xdc, 0x1b, 0x83, 0xf9, 0x35, 0x2c, 0x70, - 0x24, 0xd1, 0xfb, 0xf0, 0x92, 0xcf, 0xa3, 0xa8, 0xc7, 0xa8, 0xda, 0xf1, 0x14, 0xde, 0x2e, 0x82, - 0x2a, 0xa8, 0x4d, 0xad, 0xbe, 0xfa, 0xf0, 0xa0, 0x92, 0xfb, 0xe9, 0xa0, 0x62, 0xa9, 0xca, 0x60, - 0xb3, 0x4e, 0x79, 0x23, 0xc2, 0xaa, 0x5b, 0xbf, 0x43, 0x3a, 0xd8, 0xdf, 0x69, 0x11, 0xff, 0xf1, - 0xfe, 0x12, 0xb4, 0x48, 0x2d, 0xe2, 0x3f, 0x38, 0xde, 0x5b, 0x04, 0xee, 0xc5, 0xb4, 0xd8, 0xdb, - 0x78, 0x1b, 0x7d, 0x00, 0x0b, 0x9a, 0xb0, 0x66, 0x15, 0x73, 0x49, 0x84, 0x27, 0xc8, 0x16, 0x16, - 0x41, 0xf1, 0x5c, 0x82, 0xf1, 0xda, 0xd3, 0x61, 0x14, 0x81, 0x8b, 0x74, 0xd5, 0x35, 0x5b, 0xd4, - 0x4d, 0x6a, 0xa2, 0x10, 0xce, 0xb5, 0x39, 0xeb, 0xc9, 0x3f, 0x81, 0x8d, 0xfd, 0x47, 0xb0, 0xd9, - 0xa4, 0xec, 0x29, 0xb4, 0x1b, 0x70, 0x6e, 0x8b, 0xaa, 0x6e, 0x20, 0xf0, 0x96, 0x87, 0x83, 0x40, - 0x78, 0x84, 0xe1, 0x76, 0x48, 0x82, 0xe2, 0x78, 0x15, 0xd4, 0xce, 0xbb, 0xb3, 0x83, 0xe4, 0xcd, - 0x20, 0x10, 0xb7, 0x4c, 0x6a, 0xe5, 0xfa, 0x27, 0xc7, 0x7b, 0x8b, 0x55, 0x03, 0xb0, 0x24, 0x83, - 0xcd, 0xc6, 0xf6, 0x49, 0xc7, 0x98, 0x13, 0x71, 0x7e, 0x00, 0xb0, 0xf4, 0x0e, 0x0e, 0x69, 0x80, - 0x15, 0x17, 0xaf, 0x53, 0xa9, 0xb8, 0xa0, 0x3e, 0x0e, 0x0d, 0xb0, 0x44, 0x9f, 0x02, 0x78, 0xc5, - 0xef, 0x45, 0xbd, 0x10, 0x2b, 0xda, 0x27, 0x56, 0xa4, 0x27, 0xb0, 0xa2, 0xbc, 0x08, 0xaa, 0x63, - 0xb5, 0x0b, 0x37, 0xae, 0x59, 0x3f, 0xd6, 0x75, 0x97, 0x06, 0xbe, 0xd2, 0x8a, 0x9a, 0x9c, 0x32, - 0xd3, 0x88, 0x6f, 0x7e, 0xae, 0xbc, 0xd8, 0xa1, 0xaa, 0xdb, 0x6b, 0xd7, 0x7d, 0x1e, 0x59, 0xbf, - 0x34, 0x86, 0xa8, 0xa9, 0x9d, 0x98, 0xc8, 0xc1, 0x37, 0xd2, 0x9c, 0xed, 0x5c, 0x06, 0x6b, 0xc8, - 0xb8, 0x1a, 0x14, 0x3d, 0x0f, 0x67, 0x04, 0xd9, 0x20, 0x82, 0x30, 0x9f, 0x78, 0x3e, 0xef, 0x31, - 0x95, 0x9c, 0xef, 0x25, 0x77, 0x3a, 0x0d, 0x37, 0x75, 0xd4, 0xf9, 0x1a, 0xc0, 0x2b, 0xa9, 0xb0, - 0x66, 0x4f, 0x08, 0xc2, 0xd4, 0x40, 0x55, 0x0c, 0x27, 0x8d, 0x12, 0x39, 0x62, 0x11, 0x03, 0x18, - 0x34, 0x0f, 0xf3, 0x31, 0x11, 0x94, 0x1b, 0x37, 0x8e, 0xbb, 0x76, 0xe5, 0x7c, 0x09, 0x60, 0x39, - 0x65, 0x79, 0xd3, 0xb7, 0x9a, 0x49, 0xd0, 0xe4, 0x51, 0x44, 0xa5, 0xa4, 0x9c, 0xa1, 0x3e, 0x84, - 0x7e, 0xba, 0x1a, 0x31, 0xdf, 0x21, 0x24, 0xe7, 0x33, 0x00, 0xaf, 0xa6, 0xd4, 0xee, 0xf6, 0x94, - 0x54, 0x98, 0x05, 0x94, 0x75, 0xfe, 0xb7, 0x26, 0x6a, 0x46, 0xb3, 0x29, 0xa3, 0xf5, 0x10, 0xcb, - 0xee, 0xad, 0x3e, 0x61, 0x0a, 0xbd, 0x00, 0x9f, 0xe9, 0x0f, 0xc2, 0x9e, 0x6d, 0x33, 0x48, 0xda, - 0x3c, 0x93, 0xc6, 0xd7, 0x92, 0x30, 0x7a, 0x13, 0x9e, 0xdf, 0x10, 0xd8, 0xd7, 0x37, 0xc0, 0xce, - 0x85, 0xe5, 0x7f, 0x7d, 0x55, 0xdd, 0xb4, 0x84, 0xf3, 0x31, 0x80, 0x85, 0x33, 0x18, 0x49, 0xf4, - 0x21, 0x9c, 0xcf, 0x28, 0x49, 0x9d, 0xf0, 0x48, 0x92, 0xb1, 0xbd, 0x7a, 0xb9, 0xfe, 0x84, 0xa9, - 0x5c, 0x3f, 0xa3, 0xe4, 0xea, 0x94, 0xe6, 0x69, 0x1a, 0x52, 0xe8, 0x9f, 0x01, 0xe9, 0xec, 0x02, - 0x38, 0x79, 0x9b, 0x90, 0x35, 0xce, 0x43, 0xf4, 0x11, 0x9c, 0xce, 0xe6, 0x6c, 0xcc, 0x79, 0x38, - 0xe2, 0x23, 0xca, 0xa6, 0xba, 0x86, 0x77, 0xbe, 0x38, 0x07, 0x4b, 0xcd, 0xe1, 0xc8, 0x7a, 0x4c, - 0x58, 0x60, 0x86, 0x1a, 0x0e, 0x51, 0x01, 0x4e, 0x28, 0xaa, 0x42, 0x62, 0xa6, 0xbf, 0x6b, 0x16, - 0xa8, 0x0a, 0x2f, 0x04, 0x44, 0xfa, 0x82, 0xc6, 0xd9, 0xe9, 0xb8, 0xc3, 0x21, 0x74, 0x0d, 0x4e, - 0x09, 0xe2, 0xd3, 0x98, 0x12, 0xa6, 0xcc, 0xa0, 0x75, 0xb3, 0x00, 0xda, 0x81, 0x79, 0x1c, 0x25, - 0x03, 0x61, 0x3c, 0xd1, 0xba, 0x70, 0xa6, 0xd6, 0x44, 0xe8, 0x6d, 0x2b, 0xb4, 0xf6, 0x0f, 0x84, - 0x26, 0x2a, 0xef, 0x1d, 0xef, 0x2d, 0x5e, 0x0c, 0x13, 0x3b, 0x78, 0x7e, 0x26, 0xdb, 0x02, 0xae, - 0xd4, 0x76, 0xef, 0x57, 0x72, 0xbf, 0xdd, 0xaf, 0xe4, 0xbe, 0xdd, 0x5f, 0x2a, 0x59, 0xd4, 0x0e, - 0xef, 0x0f, 0x81, 0x32, 0xa5, 0x39, 0x03, 0xe7, 0x7b, 0x00, 0xe7, 0x5a, 0x44, 0x57, 0xd2, 0xa7, - 0xa7, 0xb0, 0x50, 0x94, 0x75, 0xde, 0x60, 0x1b, 0xc9, 0x60, 0x8b, 0x05, 0xe9, 0x53, 0xae, 0x1f, - 0x95, 0x61, 0x0f, 0x4f, 0x0f, 0xc2, 0xd6, 0xc2, 0x77, 0xe0, 0x84, 0x54, 0x78, 0x93, 0x58, 0xff, - 0x3e, 0xed, 0xdb, 0x69, 0x8a, 0xa0, 0x16, 0xcc, 0x77, 0x09, 0xed, 0x74, 0x4d, 0x43, 0xc7, 0x57, - 0x5f, 0xfa, 0xfd, 0xa0, 0x32, 0xe3, 0x0b, 0xa2, 0x87, 0x2d, 0xf3, 0x4c, 0xea, 0xab, 0xe3, 0xbd, - 0xc5, 0xd3, 0x31, 0xdb, 0x00, 0xb3, 0x70, 0x7e, 0x05, 0x70, 0xc1, 0xca, 0xa2, 0x9c, 0xa5, 0x02, - 0xed, 0xf3, 0xf5, 0x16, 0xbc, 0x9c, 0x5d, 0x06, 0xfd, 0x7e, 0x11, 0x29, 0xed, 0xcb, 0xff, 0xdc, - 0xe3, 0xfd, 0xa5, 0x67, 0x2d, 0xb5, 0x6c, 0x0e, 0x9a, 0x2d, 0xeb, 0x4a, 0xe8, 0x71, 0x93, 0xdd, - 0x6d, 0x1b, 0x47, 0x0c, 0xe6, 0xd3, 0xa7, 0x7d, 0x94, 0xae, 0xb6, 0x28, 0x2b, 0xe3, 0xfa, 0x78, - 0x9d, 0xef, 0x00, 0xbc, 0xfe, 0xd7, 0xa6, 0x7e, 0x97, 0xaa, 0x6e, 0x8b, 0xc4, 0x5c, 0x52, 0x35, - 0x22, 0x7f, 0xcf, 0x0f, 0xf9, 0x5b, 0xa7, 0xec, 0x0a, 0x15, 0xe1, 0x64, 0x60, 0x80, 0x8b, 0x13, - 0x49, 0x62, 0xb0, 0x5c, 0x71, 0x76, 0xff, 0xd6, 0x92, 0xab, 0x77, 0x1f, 0x1c, 0x96, 0xc1, 0xc3, - 0xc3, 0x32, 0x78, 0x74, 0x58, 0x06, 0xbf, 0x1c, 0x96, 0xc1, 0xe7, 0x47, 0xe5, 0xdc, 0xa3, 0xa3, - 0x72, 0xee, 0xc7, 0xa3, 0x72, 0xee, 0xbd, 0xe5, 0x27, 0xf6, 0xec, 0xd4, 0x2f, 0x8a, 0xa4, 0x85, - 0xed, 0x7c, 0xf2, 0xa3, 0xef, 0x95, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0xae, 0xbc, 0xbc, - 0xa7, 0x0a, 0x00, 0x00, + proto.RegisterFile("manifest/distribution/v1beta1/distribution.proto", fileDescriptor_08ac0e9378c9f2e5) +} + +var fileDescriptor_08ac0e9378c9f2e5 = []byte{ + // 1035 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0x34, 0x89, 0xd3, 0x4c, 0xdb, 0xe4, 0xdb, 0xc9, 0x8f, 0x3a, 0x6e, 0x6b, 0xe7, 0xbb, + 0x52, 0x45, 0x08, 0xc4, 0x26, 0x41, 0x42, 0x28, 0xb7, 0xc6, 0x6e, 0x05, 0x52, 0x81, 0x68, 0x83, + 0x00, 0xc1, 0x61, 0x35, 0xde, 0x1d, 0xdb, 0x43, 0x76, 0x67, 0x56, 0x33, 0x63, 0x27, 0x39, 0x70, + 0x8f, 0x40, 0x02, 0x6e, 0xa0, 0x9e, 0x2a, 0xb8, 0x54, 0x9c, 0x72, 0xc8, 0x1f, 0x51, 0x71, 0xaa, + 0x0a, 0x42, 0x88, 0x43, 0x80, 0xe4, 0x10, 0xc4, 0x5f, 0x81, 0x66, 0x67, 0x76, 0xd7, 0x09, 0xe1, + 0x57, 0x91, 0xc5, 0x25, 0xca, 0x7b, 0xcf, 0xf3, 0x3e, 0x9f, 0xcf, 0x7b, 0x6f, 0xde, 0x2c, 0x7c, + 0x21, 0xc2, 0x8c, 0xb6, 0x89, 0x54, 0xf5, 0x80, 0x4a, 0x25, 0x68, 0xab, 0xa7, 0x28, 0x67, 0xf5, + 0xfe, 0x4a, 0x8b, 0x28, 0xbc, 0x72, 0xca, 0x59, 0x8b, 0x05, 0x57, 0x1c, 0xdd, 0x4c, 0x4f, 0xd4, + 0x4e, 0x05, 0xed, 0x89, 0xf2, 0x4c, 0x87, 0x77, 0x78, 0xf2, 0xcb, 0xba, 0xfe, 0xcf, 0x1c, 0x2a, + 0x57, 0x7c, 0x2e, 0x23, 0x2e, 0xeb, 0x2d, 0x2c, 0x49, 0x96, 0xdc, 0xe7, 0xd4, 0x26, 0x2d, 0xcf, + 0x9b, 0xb8, 0x67, 0x0e, 0x1a, 0xc3, 0x86, 0xae, 0xe2, 0x88, 0x32, 0x5e, 0x4f, 0xfe, 0x1a, 0x97, + 0x73, 0x7f, 0x04, 0x16, 0x37, 0xb0, 0xc0, 0x91, 0x44, 0xef, 0xc1, 0x2b, 0x3e, 0x8f, 0xa2, 0x1e, + 0xa3, 0x6a, 0xd7, 0x53, 0x78, 0xa7, 0x04, 0x16, 0xc0, 0xe2, 0xc4, 0xfa, 0x4b, 0x8f, 0x0e, 0xab, + 0x85, 0x1f, 0x0e, 0xab, 0xd7, 0x4d, 0x2a, 0x19, 0x6c, 0xd5, 0x28, 0xaf, 0x47, 0x58, 0x75, 0x6b, + 0xf7, 0x48, 0x07, 0xfb, 0xbb, 0x4d, 0xe2, 0x3f, 0x39, 0x58, 0x86, 0x16, 0xa9, 0x49, 0xfc, 0x87, + 0x27, 0xfb, 0x4b, 0xc0, 0xbd, 0x9c, 0x25, 0x7b, 0x13, 0xef, 0xa0, 0xf7, 0xe1, 0x8c, 0x26, 0xac, + 0x59, 0xc5, 0x5c, 0x12, 0xe1, 0x09, 0xb2, 0x8d, 0x45, 0x50, 0xba, 0x90, 0x60, 0xbc, 0xfc, 0x74, + 0x18, 0x25, 0xe0, 0x22, 0x9d, 0x75, 0xc3, 0x26, 0x75, 0x93, 0x9c, 0x28, 0x84, 0xb3, 0x2d, 0xce, + 0x7a, 0xf2, 0x77, 0x60, 0x23, 0xff, 0x12, 0x6c, 0x3a, 0x49, 0x7b, 0x06, 0x6d, 0x15, 0xce, 0x6e, + 0x53, 0xd5, 0x0d, 0x04, 0xde, 0xf6, 0x70, 0x10, 0x08, 0x8f, 0x30, 0xdc, 0x0a, 0x49, 0x50, 0x1a, + 0x5d, 0x00, 0x8b, 0x17, 0xdd, 0xe9, 0x34, 0x78, 0x3b, 0x08, 0xc4, 0x1d, 0x13, 0x5a, 0xbb, 0xf5, + 0xe1, 0xc9, 0xfe, 0xd2, 0x82, 0x01, 0x58, 0x96, 0xc1, 0x56, 0x7d, 0xe7, 0xf4, 0xcc, 0x98, 0x8e, + 0x38, 0xdf, 0x01, 0x58, 0x7e, 0x0b, 0x87, 0x34, 0xc0, 0x8a, 0x8b, 0x57, 0xa8, 0x54, 0x5c, 0x50, + 0x1f, 0x87, 0x06, 0x58, 0xa2, 0x8f, 0x01, 0xbc, 0xe6, 0xf7, 0xa2, 0x5e, 0x88, 0x15, 0xed, 0x13, + 0x2b, 0xd2, 0x13, 0x58, 0x51, 0x5e, 0x02, 0x0b, 0x23, 0x8b, 0x97, 0x56, 0x6f, 0xd4, 0xac, 0x08, + 0x5d, 0xa5, 0x74, 0xae, 0xb4, 0xa2, 0x06, 0xa7, 0xcc, 0x14, 0xe2, 0xab, 0x1f, 0xab, 0xcf, 0x75, + 0xa8, 0xea, 0xf6, 0x5a, 0x35, 0x9f, 0x47, 0x76, 0x5e, 0xea, 0x03, 0xd4, 0xd4, 0x6e, 0x4c, 0x64, + 0x7a, 0x46, 0x9a, 0xde, 0xce, 0xe6, 0xb0, 0x86, 0x8c, 0xab, 0x41, 0xd1, 0x33, 0x70, 0x4a, 0x90, + 0x36, 0x11, 0x84, 0xf9, 0xc4, 0xf3, 0x79, 0x8f, 0xa9, 0xa4, 0xbf, 0x57, 0xdc, 0xc9, 0xcc, 0xdd, + 0xd0, 0x5e, 0xe7, 0x4b, 0x00, 0xaf, 0x65, 0xc2, 0x1a, 0x3d, 0x21, 0x08, 0x53, 0xa9, 0xaa, 0x18, + 0x8e, 0x1b, 0x25, 0x72, 0xc8, 0x22, 0x52, 0x18, 0x34, 0x07, 0x8b, 0x31, 0x11, 0x94, 0x9b, 0x69, + 0x1c, 0x75, 0xad, 0xe5, 0x7c, 0x0e, 0x60, 0x25, 0x63, 0x79, 0xdb, 0xb7, 0x9a, 0x49, 0xd0, 0xe0, + 0x51, 0x44, 0xa5, 0xa4, 0x9c, 0xa1, 0x3e, 0x84, 0x7e, 0x66, 0x0d, 0x99, 0xef, 0x00, 0x92, 0xf3, + 0x09, 0x80, 0xd7, 0x33, 0x6a, 0x6f, 0xf4, 0x94, 0x54, 0x98, 0x05, 0x94, 0x75, 0xfe, 0xb3, 0x22, + 0x6a, 0x46, 0xd3, 0x19, 0xa3, 0xcd, 0x10, 0xcb, 0xee, 0x9d, 0x3e, 0x61, 0x0a, 0x3d, 0x0b, 0xff, + 0xd7, 0x4f, 0xdd, 0x9e, 0x2d, 0x33, 0x48, 0xca, 0x3c, 0x95, 0xf9, 0x37, 0x12, 0x37, 0x7a, 0x0d, + 0x5e, 0x6c, 0x0b, 0xec, 0xeb, 0x1b, 0x60, 0xf7, 0xc2, 0xca, 0x3f, 0xbe, 0xaa, 0x6e, 0x96, 0xc2, + 0xf9, 0x08, 0xc0, 0x99, 0x73, 0x18, 0x49, 0x24, 0xe1, 0x5c, 0x4e, 0x49, 0xea, 0x80, 0x47, 0x92, + 0x88, 0xad, 0xd5, 0x6a, 0xed, 0x4f, 0xf7, 0x72, 0xed, 0x9c, 0xa4, 0xeb, 0x13, 0x9a, 0xa9, 0x29, + 0xc9, 0x4c, 0xff, 0x1c, 0x50, 0x67, 0x0f, 0xc0, 0xf1, 0xbb, 0x84, 0x6c, 0x70, 0x1e, 0xa2, 0x0f, + 0xe0, 0x64, 0xbe, 0x69, 0x63, 0xce, 0xc3, 0x21, 0x37, 0x29, 0xdf, 0xeb, 0x1a, 0xde, 0xf9, 0xec, + 0x02, 0x2c, 0x37, 0x06, 0x3d, 0x9b, 0x31, 0x61, 0x81, 0x59, 0x6b, 0x38, 0x44, 0x33, 0x70, 0x4c, + 0x51, 0x15, 0x12, 0xb3, 0xff, 0x5d, 0x63, 0xa0, 0x05, 0x78, 0x29, 0x20, 0xd2, 0x17, 0x34, 0xce, + 0xfb, 0xe3, 0x0e, 0xba, 0xd0, 0x0d, 0x38, 0x21, 0x88, 0x4f, 0x63, 0x4a, 0x98, 0x32, 0xab, 0xd6, + 0xcd, 0x1d, 0x68, 0x17, 0x16, 0x71, 0x94, 0xac, 0x84, 0xd1, 0x44, 0xeb, 0xfc, 0xb9, 0x5a, 0x13, + 0xa1, 0x77, 0xad, 0xd0, 0xc5, 0xbf, 0x21, 0x34, 0x51, 0x79, 0xff, 0x64, 0x7f, 0xe9, 0x72, 0x98, + 0x0c, 0x84, 0xe7, 0xe7, 0xb2, 0x2d, 0xe0, 0xda, 0xe2, 0xde, 0x83, 0x6a, 0xe1, 0x97, 0x07, 0xd5, + 0xc2, 0xd7, 0x07, 0xcb, 0x65, 0x8b, 0xda, 0xe1, 0xfd, 0x01, 0x50, 0xa6, 0x34, 0x67, 0xe0, 0x7c, + 0x0b, 0xe0, 0x6c, 0x93, 0xe8, 0x4c, 0xba, 0x7b, 0x0a, 0x0b, 0x45, 0x59, 0xe7, 0x55, 0xd6, 0x4e, + 0x56, 0x5b, 0x2c, 0x48, 0x9f, 0x72, 0xfd, 0xac, 0x0c, 0x4e, 0xf1, 0x64, 0xea, 0xb6, 0x43, 0x7c, + 0x0f, 0x8e, 0x49, 0x85, 0xb7, 0x88, 0x9d, 0xe0, 0xa7, 0x7d, 0x3d, 0x4d, 0x12, 0xd4, 0x84, 0xc5, + 0x2e, 0xa1, 0x9d, 0xae, 0x29, 0xe8, 0xe8, 0xfa, 0xf3, 0xbf, 0x1e, 0x56, 0xa7, 0x7c, 0x41, 0xf4, + 0xba, 0x65, 0x9e, 0x09, 0x7d, 0x71, 0xb2, 0xbf, 0x74, 0xd6, 0x67, 0x0b, 0x60, 0x0c, 0xe7, 0x67, + 0x00, 0xe7, 0xad, 0x2c, 0xca, 0x59, 0x26, 0xd0, 0x3e, 0x60, 0xaf, 0xc3, 0xab, 0xf9, 0x75, 0xd0, + 0x2f, 0x18, 0x91, 0xd2, 0xbe, 0xfd, 0xff, 0x7f, 0x72, 0xb0, 0x7c, 0xd3, 0x52, 0xcb, 0x37, 0xa1, + 0xf9, 0xc9, 0xa6, 0x12, 0x7a, 0xe1, 0xe4, 0xb7, 0xdb, 0xfa, 0x11, 0x83, 0xc5, 0xec, 0x71, 0x1f, + 0xe6, 0x54, 0x5b, 0x94, 0xb5, 0x51, 0xdd, 0x5e, 0xe7, 0x1b, 0x00, 0x6f, 0xfd, 0xf1, 0x50, 0xbf, + 0x4d, 0x55, 0xb7, 0x49, 0x62, 0x2e, 0xa9, 0x1a, 0xd2, 0x7c, 0xcf, 0x0d, 0xcc, 0xb7, 0x0e, 0x59, + 0x0b, 0x95, 0xe0, 0x78, 0x60, 0x80, 0x4b, 0x63, 0x49, 0x20, 0x35, 0xd7, 0x9c, 0xbd, 0xbf, 0x1c, + 0xc9, 0xf5, 0x77, 0x1e, 0x1e, 0x55, 0xc0, 0xa3, 0xa3, 0x0a, 0x78, 0x7c, 0x54, 0x01, 0x3f, 0x1d, + 0x55, 0xc0, 0xa7, 0xc7, 0x95, 0xc2, 0xe3, 0xe3, 0x4a, 0xe1, 0xfb, 0xe3, 0x4a, 0xe1, 0xdd, 0xb5, + 0x81, 0x9a, 0x85, 0xb4, 0xad, 0x48, 0x40, 0x19, 0x55, 0xf5, 0x74, 0x7b, 0x2d, 0x87, 0x24, 0xe8, + 0x10, 0x71, 0xf6, 0xe3, 0x22, 0xa9, 0x65, 0xab, 0x98, 0x7c, 0xff, 0xbd, 0xf8, 0x5b, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x1d, 0x01, 0x9e, 0x69, 0xb6, 0x0a, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/distribution/types/errors.go b/x/distribution/types/errors.go deleted file mode 100644 index 808d3f8..0000000 --- a/x/distribution/types/errors.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -import "cosmossdk.io/errors" - -// x/distribution module sentinel errors -var ( - ErrEmptyDelegatorAddr = errors.Register(ModuleName, 2, "delegator address is empty") - ErrEmptyWithdrawAddr = errors.Register(ModuleName, 3, "withdraw address is empty") - ErrEmptyValidatorAddr = errors.Register(ModuleName, 4, "validator address is empty") - ErrEmptyDelegationDistInfo = errors.Register(ModuleName, 5, "no delegation distribution info") - ErrNoValidatorDistInfo = errors.Register(ModuleName, 6, "no validator distribution info") - ErrNoValidatorCommission = errors.Register(ModuleName, 7, "no validator commission to withdraw") - ErrSetWithdrawAddrDisabled = errors.Register(ModuleName, 8, "set withdraw address disabled") - ErrBadDistribution = errors.Register(ModuleName, 9, "community pool does not have sufficient coins to distribute") - ErrInvalidProposalAmount = errors.Register(ModuleName, 10, "invalid community pool spend proposal amount") - ErrEmptyProposalRecipient = errors.Register(ModuleName, 11, "invalid community pool spend proposal recipient") - ErrNoValidatorExists = errors.Register(ModuleName, 12, "validator does not exist") - ErrNoDelegationExists = errors.Register(ModuleName, 13, "delegation does not exist") -) diff --git a/x/distribution/types/genesis.pb.go b/x/distribution/types/genesis.pb.go index 10d09ba..f6a7a40 100644 --- a/x/distribution/types/genesis.pb.go +++ b/x/distribution/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/distribution/v1beta1/genesis.proto +// source: manifest/distribution/v1beta1/genesis.proto package types @@ -41,7 +41,7 @@ func (m *DelegatorWithdrawInfo) Reset() { *m = DelegatorWithdrawInfo{} } func (m *DelegatorWithdrawInfo) String() string { return proto.CompactTextString(m) } func (*DelegatorWithdrawInfo) ProtoMessage() {} func (*DelegatorWithdrawInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{0} + return fileDescriptor_81ff1c57b292ecbf, []int{0} } func (m *DelegatorWithdrawInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -82,7 +82,7 @@ func (m *ValidatorOutstandingRewardsRecord) Reset() { *m = ValidatorOuts func (m *ValidatorOutstandingRewardsRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorOutstandingRewardsRecord) ProtoMessage() {} func (*ValidatorOutstandingRewardsRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{1} + return fileDescriptor_81ff1c57b292ecbf, []int{1} } func (m *ValidatorOutstandingRewardsRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -124,7 +124,7 @@ func (m *ValidatorAccumulatedCommissionRecord) Reset() { *m = ValidatorA func (m *ValidatorAccumulatedCommissionRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorAccumulatedCommissionRecord) ProtoMessage() {} func (*ValidatorAccumulatedCommissionRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{2} + return fileDescriptor_81ff1c57b292ecbf, []int{2} } func (m *ValidatorAccumulatedCommissionRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -168,7 +168,7 @@ func (m *ValidatorHistoricalRewardsRecord) Reset() { *m = ValidatorHisto func (m *ValidatorHistoricalRewardsRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorHistoricalRewardsRecord) ProtoMessage() {} func (*ValidatorHistoricalRewardsRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{3} + return fileDescriptor_81ff1c57b292ecbf, []int{3} } func (m *ValidatorHistoricalRewardsRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -209,7 +209,7 @@ func (m *ValidatorCurrentRewardsRecord) Reset() { *m = ValidatorCurrentR func (m *ValidatorCurrentRewardsRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorCurrentRewardsRecord) ProtoMessage() {} func (*ValidatorCurrentRewardsRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{4} + return fileDescriptor_81ff1c57b292ecbf, []int{4} } func (m *ValidatorCurrentRewardsRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -252,7 +252,7 @@ func (m *DelegatorStartingInfoRecord) Reset() { *m = DelegatorStartingIn func (m *DelegatorStartingInfoRecord) String() string { return proto.CompactTextString(m) } func (*DelegatorStartingInfoRecord) ProtoMessage() {} func (*DelegatorStartingInfoRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{5} + return fileDescriptor_81ff1c57b292ecbf, []int{5} } func (m *DelegatorStartingInfoRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -297,7 +297,7 @@ func (m *ValidatorSlashEventRecord) Reset() { *m = ValidatorSlashEventRe func (m *ValidatorSlashEventRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorSlashEventRecord) ProtoMessage() {} func (*ValidatorSlashEventRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{6} + return fileDescriptor_81ff1c57b292ecbf, []int{6} } func (m *ValidatorSlashEventRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_76eed0f9489db580, []int{7} + return fileDescriptor_81ff1c57b292ecbf, []int{7} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,81 +384,83 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo func init() { - proto.RegisterType((*DelegatorWithdrawInfo)(nil), "cosmos.distribution.v1beta1.DelegatorWithdrawInfo") - proto.RegisterType((*ValidatorOutstandingRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord") - proto.RegisterType((*ValidatorAccumulatedCommissionRecord)(nil), "cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord") - proto.RegisterType((*ValidatorHistoricalRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord") - proto.RegisterType((*ValidatorCurrentRewardsRecord)(nil), "cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord") - proto.RegisterType((*DelegatorStartingInfoRecord)(nil), "cosmos.distribution.v1beta1.DelegatorStartingInfoRecord") - proto.RegisterType((*ValidatorSlashEventRecord)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEventRecord") - proto.RegisterType((*GenesisState)(nil), "cosmos.distribution.v1beta1.GenesisState") + proto.RegisterType((*DelegatorWithdrawInfo)(nil), "manifest.distribution.v1beta1.DelegatorWithdrawInfo") + proto.RegisterType((*ValidatorOutstandingRewardsRecord)(nil), "manifest.distribution.v1beta1.ValidatorOutstandingRewardsRecord") + proto.RegisterType((*ValidatorAccumulatedCommissionRecord)(nil), "manifest.distribution.v1beta1.ValidatorAccumulatedCommissionRecord") + proto.RegisterType((*ValidatorHistoricalRewardsRecord)(nil), "manifest.distribution.v1beta1.ValidatorHistoricalRewardsRecord") + proto.RegisterType((*ValidatorCurrentRewardsRecord)(nil), "manifest.distribution.v1beta1.ValidatorCurrentRewardsRecord") + proto.RegisterType((*DelegatorStartingInfoRecord)(nil), "manifest.distribution.v1beta1.DelegatorStartingInfoRecord") + proto.RegisterType((*ValidatorSlashEventRecord)(nil), "manifest.distribution.v1beta1.ValidatorSlashEventRecord") + proto.RegisterType((*GenesisState)(nil), "manifest.distribution.v1beta1.GenesisState") } func init() { - proto.RegisterFile("cosmos/distribution/v1beta1/genesis.proto", fileDescriptor_76eed0f9489db580) -} - -var fileDescriptor_76eed0f9489db580 = []byte{ - // 938 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x3a, 0x25, 0x4d, 0x26, 0x45, 0x34, 0xd3, 0x34, 0x6c, 0xd2, 0x76, 0x9d, 0x94, 0x1e, - 0x0a, 0x28, 0x6b, 0x12, 0x10, 0x54, 0x45, 0x20, 0x35, 0x6e, 0xcb, 0x8f, 0x03, 0x8d, 0x6c, 0x09, - 0x04, 0x42, 0xb2, 0xc6, 0xbb, 0xe3, 0xf5, 0x08, 0x7b, 0xc7, 0x9a, 0x19, 0xaf, 0x01, 0x89, 0x03, - 0xa7, 0x22, 0xc4, 0x81, 0x13, 0xe2, 0x58, 0x71, 0xaa, 0x90, 0x90, 0x38, 0xf4, 0x8f, 0xe8, 0xb1, - 0xaa, 0x38, 0x70, 0x02, 0xe4, 0x1c, 0x40, 0x1c, 0xf9, 0x0b, 0xd0, 0xce, 0xcc, 0xee, 0x8e, 0xb3, - 0xdb, 0xad, 0x1b, 0xf0, 0xa5, 0x8d, 0x67, 0xde, 0x7b, 0xdf, 0xf7, 0xbd, 0xf7, 0xf6, 0xbd, 0x01, - 0xcf, 0x7b, 0x94, 0x0f, 0x28, 0xaf, 0xfb, 0x84, 0x0b, 0x46, 0x3a, 0x23, 0x41, 0x68, 0x58, 0x8f, - 0x76, 0x3b, 0x58, 0xa0, 0xdd, 0x7a, 0x80, 0x43, 0xcc, 0x09, 0x77, 0x87, 0x8c, 0x0a, 0x0a, 0xcf, - 0x29, 0x53, 0xd7, 0x34, 0x75, 0xb5, 0xe9, 0xe6, 0x5a, 0x40, 0x03, 0x2a, 0xed, 0xea, 0xf1, 0x5f, - 0xca, 0x65, 0xd3, 0xd1, 0xd1, 0x3b, 0x88, 0xe3, 0x34, 0xaa, 0x47, 0x49, 0xa8, 0xef, 0xdd, 0x32, - 0xf4, 0x29, 0x1c, 0x65, 0xbf, 0xa1, 0xec, 0xdb, 0x0a, 0x48, 0xf3, 0x51, 0x57, 0xab, 0x68, 0x40, - 0x42, 0x5a, 0x97, 0xff, 0xaa, 0xa3, 0x8b, 0x3f, 0x59, 0xe0, 0xec, 0x75, 0xdc, 0xc7, 0x01, 0x12, - 0x94, 0x7d, 0x40, 0x44, 0xcf, 0x67, 0x68, 0xfc, 0x4e, 0xd8, 0xa5, 0xf0, 0x06, 0x58, 0xf5, 0x93, - 0x8b, 0x36, 0xf2, 0x7d, 0x86, 0x39, 0xb7, 0xad, 0x2d, 0xeb, 0xf2, 0xf2, 0xbe, 0xfd, 0xf0, 0xde, - 0xce, 0x9a, 0x8e, 0x7c, 0x4d, 0xdd, 0xb4, 0x04, 0x23, 0x61, 0xd0, 0x3c, 0x9d, 0xba, 0xe8, 0x73, - 0xd8, 0x00, 0xa7, 0xc7, 0x3a, 0x6c, 0x1a, 0xa5, 0xfa, 0x98, 0x28, 0xcf, 0x24, 0x1e, 0xfa, 0xf8, - 0xea, 0xd2, 0x57, 0x77, 0x6a, 0x95, 0xbf, 0xee, 0xd4, 0x2a, 0x17, 0x6f, 0x57, 0xc1, 0xf6, 0xfb, - 0xa8, 0x4f, 0xfc, 0x18, 0xe3, 0xd6, 0x48, 0x70, 0x81, 0x42, 0x3f, 0xf6, 0xc1, 0x63, 0xc4, 0x7c, - 0xde, 0xc4, 0x1e, 0x65, 0x3e, 0x7c, 0x0f, 0xac, 0x46, 0x89, 0xd1, 0x11, 0xee, 0xdb, 0x0f, 0xef, - 0xed, 0x5c, 0xd0, 0xa8, 0x69, 0xa0, 0x23, 0x22, 0xa2, 0x23, 0xe7, 0xf0, 0xb6, 0x05, 0xce, 0xd0, - 0x0c, 0xac, 0xcd, 0x14, 0x9a, 0x5d, 0xdd, 0x5a, 0xb8, 0xbc, 0xb2, 0x77, 0x5e, 0x97, 0xc8, 0x8d, - 0x4b, 0x98, 0x54, 0xdb, 0xbd, 0x8e, 0xbd, 0x06, 0x25, 0xe1, 0xfe, 0x95, 0xfb, 0xbf, 0xd5, 0x2a, - 0x3f, 0xfe, 0x5e, 0x7b, 0x31, 0x20, 0xa2, 0x37, 0xea, 0xb8, 0x1e, 0x1d, 0xe8, 0xaa, 0xe8, 0xff, - 0x76, 0xb8, 0xff, 0x49, 0x5d, 0x7c, 0x36, 0xc4, 0x3c, 0xf1, 0xe1, 0x77, 0xff, 0xfc, 0xf9, 0x05, - 0xab, 0x09, 0x69, 0x4e, 0x9f, 0x91, 0x89, 0xbf, 0x2d, 0x70, 0x29, 0x13, 0xe0, 0x79, 0xa3, 0xc1, - 0xa8, 0x8f, 0x04, 0xf6, 0x1b, 0x74, 0x30, 0x20, 0x9c, 0x13, 0x1a, 0xce, 0x29, 0x19, 0x3d, 0xb0, - 0x82, 0x32, 0x38, 0x59, 0xcc, 0x95, 0xbd, 0xd7, 0xdd, 0x92, 0xce, 0x77, 0xcb, 0x79, 0xee, 0x2f, - 0xc7, 0x29, 0x52, 0x9a, 0xcd, 0xd0, 0x86, 0xd8, 0x7f, 0x2c, 0xb0, 0x95, 0x06, 0x79, 0x9b, 0x70, - 0x41, 0x19, 0xf1, 0x50, 0x7f, 0xbe, 0x55, 0x5f, 0x07, 0x8b, 0x43, 0xcc, 0x08, 0x55, 0x1a, 0x4f, - 0x34, 0xf5, 0x2f, 0xf8, 0x31, 0x38, 0x99, 0x34, 0xc0, 0x82, 0x14, 0xff, 0xda, 0x6c, 0xe2, 0x73, - 0xbc, 0x4d, 0xe1, 0x49, 0x48, 0x43, 0xf4, 0x2f, 0x16, 0xb8, 0x90, 0x3a, 0x37, 0x46, 0x8c, 0xe1, - 0x50, 0xcc, 0x57, 0xf1, 0x87, 0x99, 0x32, 0x55, 0xd6, 0x57, 0x66, 0x53, 0x36, 0x4d, 0xee, 0x31, - 0xb2, 0x7e, 0xa8, 0x82, 0x73, 0xe9, 0xc8, 0x69, 0x09, 0xc4, 0x04, 0x09, 0x83, 0x78, 0xe4, 0x68, - 0x51, 0xff, 0xd3, 0xe0, 0x29, 0xcc, 0x4d, 0xf5, 0xf8, 0xb9, 0xe9, 0x80, 0xa7, 0xb9, 0x26, 0xdb, - 0x26, 0x61, 0x97, 0xea, 0xda, 0xef, 0x95, 0x66, 0xa8, 0x50, 0xa7, 0x99, 0x9f, 0x53, 0xdc, 0xb8, - 0x30, 0x92, 0xf4, 0x5d, 0x15, 0x6c, 0xa4, 0xd4, 0x5a, 0x7d, 0xc4, 0x7b, 0x37, 0x22, 0x99, 0xe1, - 0x79, 0x75, 0x7a, 0x0f, 0x93, 0xa0, 0x27, 0x92, 0x4e, 0x57, 0xbf, 0x8c, 0x2f, 0x60, 0x61, 0xea, - 0x0b, 0xa0, 0xe0, 0x6c, 0x86, 0xcf, 0x63, 0x76, 0x6d, 0x1c, 0xd3, 0xb3, 0x4f, 0xc8, 0x9c, 0xbc, - 0x34, 0x5b, 0xd7, 0x64, 0xb2, 0xcc, 0x8c, 0x9c, 0x89, 0xf2, 0xf7, 0x46, 0x62, 0xbe, 0x59, 0x06, - 0xa7, 0xde, 0x52, 0x3b, 0xb7, 0x25, 0x90, 0xc0, 0xf0, 0x26, 0x58, 0x1c, 0x22, 0x86, 0x06, 0x2a, - 0x01, 0x2b, 0x7b, 0xcf, 0x95, 0x82, 0x1f, 0x48, 0x53, 0x13, 0x4f, 0x7b, 0xc3, 0x77, 0xc1, 0x52, - 0x17, 0xe3, 0xf6, 0x90, 0xd2, 0xbe, 0x6e, 0xfe, 0x4b, 0xa5, 0x91, 0x6e, 0x62, 0x7c, 0x40, 0x69, - 0x7f, 0xaa, 0xd9, 0xbb, 0xea, 0x0c, 0x8e, 0x81, 0x9d, 0xb5, 0x70, 0xba, 0xfe, 0xe2, 0xae, 0x89, - 0x47, 0xc6, 0xc2, 0xec, 0x6d, 0x63, 0x6e, 0x64, 0x13, 0x69, 0xdd, 0x2f, 0xb2, 0xe0, 0xf1, 0xb7, - 0x33, 0x64, 0x38, 0x22, 0x74, 0x24, 0x1f, 0x00, 0x43, 0xca, 0x31, 0x93, 0x45, 0x29, 0xfd, 0x76, - 0x12, 0x97, 0x03, 0xed, 0x01, 0x3f, 0x2f, 0x5e, 0x77, 0x4f, 0x49, 0xea, 0x6f, 0xce, 0x56, 0xdd, - 0x47, 0x2d, 0x67, 0x53, 0x46, 0xc1, 0x86, 0x83, 0xdf, 0x5b, 0x60, 0xdb, 0x68, 0xee, 0x6c, 0x1d, - 0xb4, 0xbd, 0x74, 0x63, 0x70, 0x7b, 0x51, 0x52, 0xb9, 0xf6, 0x1f, 0xb6, 0x4e, 0x9e, 0x4d, 0x2d, - 0x2a, 0x75, 0xe0, 0xf0, 0x6b, 0x0b, 0x9c, 0xcf, 0xa8, 0xf5, 0xd2, 0x71, 0x9e, 0x26, 0xe8, 0xa4, - 0x64, 0xf5, 0xc6, 0x31, 0xd7, 0x41, 0x9e, 0xd1, 0x66, 0xf4, 0x48, 0x63, 0xf8, 0xa5, 0x05, 0x36, - 0x32, 0x32, 0x9e, 0x9a, 0xc0, 0x29, 0x93, 0x25, 0xc9, 0xe4, 0xea, 0x71, 0xc6, 0x77, 0x9e, 0xc6, - 0xb3, 0x51, 0xb1, 0x25, 0xfc, 0xc2, 0xec, 0xf3, 0xa9, 0xe9, 0xc8, 0xed, 0x65, 0xc9, 0xe0, 0xca, - 0x93, 0x8f, 0xc7, 0x3c, 0x7e, 0xd6, 0xed, 0xa6, 0x1d, 0x87, 0x63, 0xb0, 0x5e, 0x38, 0x86, 0xb8, - 0x0d, 0x24, 0xf8, 0xab, 0x4f, 0x3a, 0x87, 0xf2, 0xd0, 0x6b, 0x05, 0xd3, 0xc8, 0x58, 0x66, 0xfb, - 0xb7, 0xee, 0x4e, 0x1c, 0xeb, 0xfe, 0xc4, 0xb1, 0x1e, 0x4c, 0x1c, 0xeb, 0x8f, 0x89, 0x63, 0x7d, - 0x7b, 0xe8, 0x54, 0x1e, 0x1c, 0x3a, 0x95, 0x5f, 0x0f, 0x9d, 0xca, 0x47, 0xbb, 0xa5, 0x6f, 0xbe, - 0x4f, 0xa7, 0xdf, 0xf4, 0xf2, 0x09, 0xd8, 0x59, 0x94, 0xef, 0xf2, 0x97, 0xff, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0xbe, 0x75, 0xf7, 0x68, 0x75, 0x0c, 0x00, 0x00, + proto.RegisterFile("manifest/distribution/v1beta1/genesis.proto", fileDescriptor_81ff1c57b292ecbf) +} + +var fileDescriptor_81ff1c57b292ecbf = []byte{ + // 961 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0x6f, 0x4a, 0x9a, 0x4c, 0x8a, 0x68, 0xa6, 0x69, 0xd8, 0x84, 0xc6, 0x9b, 0x54, 0x80, + 0x2a, 0xaa, 0xd8, 0x34, 0x20, 0x54, 0x22, 0x10, 0x90, 0x6d, 0xa1, 0x48, 0x08, 0xa2, 0x44, 0x02, + 0x04, 0x12, 0xab, 0x59, 0x7b, 0xd6, 0x3b, 0x60, 0x7b, 0x96, 0x99, 0x59, 0x87, 0x48, 0x48, 0x1c, + 0x38, 0x94, 0x03, 0x07, 0x8e, 0x88, 0x03, 0xea, 0x81, 0x43, 0x85, 0x84, 0xc4, 0xa1, 0x1f, 0xa2, + 0xc7, 0xaa, 0x07, 0xc4, 0x09, 0x50, 0x72, 0x80, 0x03, 0x47, 0x3e, 0x00, 0xf2, 0xcc, 0xd8, 0x9e, + 0x8d, 0xdd, 0xdd, 0x34, 0xb0, 0x97, 0x64, 0x3d, 0xef, 0xdf, 0xef, 0xf7, 0xde, 0x9b, 0xf7, 0x06, + 0x5c, 0x8e, 0x50, 0x4c, 0xba, 0x98, 0x0b, 0xd7, 0x27, 0x5c, 0x30, 0xd2, 0x19, 0x08, 0x42, 0x63, + 0x37, 0xb9, 0xd2, 0xc1, 0x02, 0x5d, 0x71, 0x03, 0x1c, 0x63, 0x4e, 0xb8, 0xd3, 0x67, 0x54, 0x50, + 0xb8, 0x92, 0x29, 0x3b, 0xa6, 0xb2, 0xa3, 0x95, 0x97, 0x17, 0x02, 0x1a, 0x50, 0xa9, 0xe9, 0xa6, + 0xbf, 0x94, 0xd1, 0xb2, 0xed, 0x51, 0x1e, 0x51, 0xee, 0x76, 0x10, 0xc7, 0xb9, 0x5f, 0x8f, 0x92, + 0x58, 0xcb, 0x9f, 0x1d, 0x8d, 0x60, 0x28, 0x92, 0xb2, 0x58, 0x52, 0x1e, 0xdb, 0x2a, 0x94, 0xfa, + 0xd0, 0xa2, 0x79, 0x14, 0x91, 0x98, 0xba, 0xf2, 0xaf, 0x3a, 0xba, 0xf8, 0x93, 0x05, 0xce, 0x5f, + 0xc3, 0x21, 0x0e, 0x90, 0xa0, 0xec, 0x3d, 0x22, 0x7a, 0x3e, 0x43, 0x7b, 0x6f, 0xc6, 0x5d, 0x0a, + 0xaf, 0x83, 0x79, 0x3f, 0x13, 0xb4, 0x91, 0xef, 0x33, 0xcc, 0x79, 0xc3, 0x5a, 0xb5, 0x2e, 0xcd, + 0x6e, 0x35, 0xee, 0xdf, 0x59, 0x5f, 0xd0, 0x9e, 0x5f, 0x53, 0x92, 0x5d, 0xc1, 0x48, 0x1c, 0xec, + 0x9c, 0xcd, 0x4d, 0xf4, 0x39, 0x6c, 0x81, 0xb3, 0x7b, 0xda, 0x6d, 0xee, 0xa5, 0x3e, 0xc6, 0xcb, + 0x63, 0x99, 0x85, 0x3e, 0xde, 0x9c, 0xf9, 0xea, 0x56, 0xb3, 0xf6, 0xd7, 0xad, 0x66, 0xed, 0xe2, + 0xcd, 0x3a, 0x58, 0x7b, 0x17, 0x85, 0xc4, 0x4f, 0x63, 0xbc, 0x33, 0x10, 0x5c, 0xa0, 0xd8, 0x4f, + 0x6d, 0xf0, 0x1e, 0x62, 0x3e, 0xdf, 0xc1, 0x1e, 0x65, 0x3e, 0x7c, 0x1b, 0xcc, 0x27, 0x99, 0xd2, + 0x11, 0xec, 0x6b, 0xf7, 0xef, 0xac, 0xaf, 0xe8, 0xa8, 0xb9, 0xa3, 0x23, 0x24, 0x92, 0x23, 0xe7, + 0xf0, 0xa6, 0x05, 0xce, 0xd1, 0x22, 0x58, 0x9b, 0xa9, 0x68, 0x8d, 0xfa, 0xea, 0xd4, 0xa5, 0xb9, + 0x8d, 0x0b, 0x8e, 0xf6, 0x97, 0x16, 0x31, 0xab, 0xb7, 0x73, 0x0d, 0x7b, 0x2d, 0x4a, 0xe2, 0xad, + 0xab, 0x77, 0x7f, 0x6b, 0xd6, 0x7e, 0xfc, 0xbd, 0x79, 0x39, 0x20, 0xa2, 0x37, 0xe8, 0x38, 0x1e, + 0x8d, 0x74, 0x55, 0xf4, 0xbf, 0x75, 0xee, 0x7f, 0xe2, 0x8a, 0xfd, 0x3e, 0xe6, 0x99, 0x0d, 0xbf, + 0xfd, 0xe7, 0xcf, 0xcf, 0x58, 0x3b, 0x90, 0x96, 0xf8, 0x19, 0x99, 0xf8, 0xdb, 0x02, 0x4f, 0x16, + 0x04, 0x3c, 0x6f, 0x10, 0x0d, 0x42, 0x24, 0xb0, 0xdf, 0xa2, 0x51, 0x44, 0x38, 0x27, 0x34, 0x9e, + 0x50, 0x32, 0x3e, 0x06, 0x73, 0xa8, 0x08, 0x27, 0x8b, 0x39, 0xb7, 0xf1, 0xb2, 0x33, 0xb2, 0xfb, + 0x9d, 0xd1, 0x48, 0xb7, 0x66, 0xd3, 0x24, 0x29, 0xd6, 0xa6, 0x73, 0x83, 0xee, 0x3f, 0x16, 0x58, + 0xcd, 0x9d, 0xdc, 0x20, 0x5c, 0x50, 0x46, 0x3c, 0x14, 0x4e, 0xb6, 0xee, 0x8b, 0x60, 0xba, 0x8f, + 0x19, 0xa1, 0x8a, 0xe5, 0xa9, 0x1d, 0xfd, 0x05, 0x3f, 0x02, 0xa7, 0xb3, 0x16, 0x98, 0x92, 0xf4, + 0x5f, 0x3c, 0x2e, 0xfd, 0x12, 0x72, 0x93, 0x7a, 0xe6, 0xd4, 0xa0, 0xfd, 0x8b, 0x05, 0x56, 0x72, + 0xe3, 0xd6, 0x80, 0x31, 0x1c, 0x8b, 0xc9, 0x72, 0xfe, 0xb0, 0xe0, 0xa6, 0x4a, 0xfb, 0xc2, 0x71, + 0xb9, 0x0d, 0xc3, 0x1b, 0x43, 0xec, 0x87, 0x3a, 0x78, 0x22, 0x1f, 0x3c, 0xbb, 0x02, 0x31, 0x41, + 0xe2, 0x20, 0x1d, 0x3c, 0x9a, 0xd6, 0xff, 0x34, 0x7e, 0x2a, 0xb3, 0x53, 0x3f, 0x79, 0x76, 0x7c, + 0xf0, 0x28, 0xd7, 0x60, 0xdb, 0x24, 0xee, 0x52, 0x5d, 0xff, 0xe7, 0xc7, 0xe4, 0xa8, 0x92, 0xa9, + 0x99, 0xa1, 0x33, 0xdc, 0x10, 0x18, 0x69, 0xfa, 0xb6, 0x0e, 0x96, 0x72, 0x70, 0xbb, 0x21, 0xe2, + 0xbd, 0xeb, 0x89, 0xcc, 0xf1, 0xa4, 0xfa, 0xbd, 0x87, 0x49, 0xd0, 0x13, 0x59, 0xbf, 0xab, 0x2f, + 0xe3, 0x1e, 0x4c, 0x0d, 0xdd, 0x83, 0x4f, 0xc1, 0xf9, 0x22, 0x3e, 0x4f, 0xd1, 0xb5, 0x71, 0x0a, + 0xaf, 0x71, 0x4a, 0x66, 0x65, 0xe3, 0xb8, 0x9d, 0x53, 0x10, 0x33, 0x73, 0x72, 0x2e, 0x29, 0xcb, + 0x8d, 0xd4, 0x7c, 0x3f, 0x0b, 0xce, 0xbc, 0xa1, 0x36, 0xf0, 0xae, 0x40, 0x02, 0xc3, 0x1b, 0x60, + 0xba, 0x8f, 0x18, 0x8a, 0x54, 0x0a, 0xe6, 0x36, 0x9e, 0x1a, 0x13, 0x7e, 0x5b, 0x2a, 0x9b, 0x11, + 0xb5, 0x3d, 0x7c, 0x0b, 0xcc, 0x74, 0x31, 0x6e, 0xf7, 0x29, 0x0d, 0xf5, 0x25, 0x78, 0x7a, 0x8c, + 0xaf, 0xd7, 0x31, 0xde, 0xa6, 0x34, 0x1c, 0x6a, 0xfa, 0xae, 0x3a, 0x83, 0xfb, 0xa0, 0x51, 0xb4, + 0x72, 0xbe, 0x0c, 0xd3, 0xee, 0x49, 0xc7, 0xc7, 0xd4, 0xc3, 0xb4, 0x8f, 0xb9, 0xa1, 0xcd, 0x58, + 0x8b, 0x7e, 0x95, 0x06, 0x4f, 0x6f, 0x51, 0x9f, 0xe1, 0x84, 0xd0, 0x81, 0x7c, 0x10, 0xf4, 0x29, + 0xc7, 0x4c, 0x16, 0x67, 0xe4, 0x2d, 0xca, 0x4c, 0xb6, 0xb5, 0x05, 0xfc, 0xbc, 0x7a, 0xfd, 0x3d, + 0x22, 0xc1, 0xbf, 0x7a, 0xdc, 0x2a, 0x3f, 0x68, 0x5d, 0x9b, 0x44, 0x2a, 0x76, 0x1e, 0xfc, 0xce, + 0x02, 0x6b, 0x46, 0x9b, 0x17, 0xeb, 0xa1, 0xed, 0xe5, 0x1b, 0x84, 0x37, 0xa6, 0x25, 0x98, 0xd6, + 0x7f, 0xda, 0x43, 0x65, 0x3c, 0xcd, 0x64, 0xa4, 0x01, 0x87, 0x5f, 0x5b, 0xe0, 0x42, 0x01, 0xae, + 0x97, 0x8f, 0xf7, 0x3c, 0x49, 0xa7, 0x25, 0xae, 0x57, 0x4e, 0xbc, 0x20, 0xca, 0x98, 0x96, 0x93, + 0x07, 0x2a, 0xc3, 0x2f, 0x2d, 0xb0, 0x54, 0xc0, 0xf1, 0xd4, 0x44, 0xce, 0xb1, 0xcc, 0x48, 0x2c, + 0x2f, 0x9d, 0x6c, 0xa0, 0x97, 0x81, 0x3c, 0x9e, 0x54, 0x6b, 0xc2, 0x2f, 0xcc, 0x8e, 0x1f, 0x9a, + 0x97, 0xbc, 0x31, 0x2b, 0x31, 0x6c, 0x9e, 0x64, 0x60, 0x96, 0x11, 0x14, 0x7d, 0x6f, 0xea, 0x71, + 0xb8, 0x0f, 0x16, 0x2b, 0x07, 0x13, 0x6f, 0x00, 0x19, 0xfe, 0xea, 0xc3, 0x4f, 0xa6, 0x72, 0xf0, + 0x85, 0x8a, 0xf9, 0x64, 0xac, 0xb8, 0xad, 0xf7, 0x6f, 0x1f, 0xd8, 0xd6, 0xdd, 0x03, 0xdb, 0xba, + 0x77, 0x60, 0x5b, 0x7f, 0x1c, 0xd8, 0xd6, 0x37, 0x87, 0x76, 0xed, 0xde, 0xa1, 0x5d, 0xfb, 0xf5, + 0xd0, 0xae, 0x7d, 0xb0, 0x69, 0xbc, 0x07, 0x43, 0xd2, 0x15, 0xd8, 0x27, 0x31, 0x11, 0x6e, 0x86, + 0x6b, 0x3d, 0xc4, 0x7e, 0x80, 0x99, 0xfb, 0xd9, 0xf0, 0xc3, 0x5f, 0xbe, 0x13, 0x3b, 0xd3, 0xf2, + 0xf1, 0xfe, 0xdc, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xae, 0x89, 0xe1, 0xac, 0xa0, 0x0c, 0x00, + 0x00, } func (m *DelegatorWithdrawInfo) Marshal() (dAtA []byte, err error) { diff --git a/x/distribution/types/proposal.go b/x/distribution/types/proposal.go index 847bdd3..d5d0e7b 100644 --- a/x/distribution/types/proposal.go +++ b/x/distribution/types/proposal.go @@ -1,6 +1,7 @@ package types import ( + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -23,10 +24,10 @@ func (csp *CommunityPoolSpendProposal) ValidateBasic() error { return err } if !csp.Amount.IsValid() { - return ErrInvalidProposalAmount + return distrtypes.ErrInvalidProposalAmount } if csp.Recipient == "" { - return ErrEmptyProposalRecipient + return distrtypes.ErrEmptyProposalRecipient } return nil diff --git a/x/distribution/types/query.pb.go b/x/distribution/types/query.pb.go index e9e8838..80ea1dd 100644 --- a/x/distribution/types/query.pb.go +++ b/x/distribution/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/distribution/v1beta1/query.proto +// source: manifest/distribution/v1beta1/query.proto package types @@ -42,7 +42,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{0} + return fileDescriptor_326769e41f941f15, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -81,7 +81,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{1} + return fileDescriptor_326769e41f941f15, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -127,7 +127,7 @@ func (m *QueryValidatorDistributionInfoRequest) Reset() { *m = QueryVali func (m *QueryValidatorDistributionInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatorDistributionInfoRequest) ProtoMessage() {} func (*QueryValidatorDistributionInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{2} + return fileDescriptor_326769e41f941f15, []int{2} } func (m *QueryValidatorDistributionInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -179,7 +179,7 @@ func (m *QueryValidatorDistributionInfoResponse) Reset() { func (m *QueryValidatorDistributionInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatorDistributionInfoResponse) ProtoMessage() {} func (*QueryValidatorDistributionInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{3} + return fileDescriptor_326769e41f941f15, []int{3} } func (m *QueryValidatorDistributionInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ func (m *QueryValidatorOutstandingRewardsRequest) Reset() { func (m *QueryValidatorOutstandingRewardsRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatorOutstandingRewardsRequest) ProtoMessage() {} func (*QueryValidatorOutstandingRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{4} + return fileDescriptor_326769e41f941f15, []int{4} } func (m *QueryValidatorOutstandingRewardsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -290,7 +290,7 @@ func (m *QueryValidatorOutstandingRewardsResponse) Reset() { func (m *QueryValidatorOutstandingRewardsResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {} func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{5} + return fileDescriptor_326769e41f941f15, []int{5} } func (m *QueryValidatorOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -337,7 +337,7 @@ func (m *QueryValidatorCommissionRequest) Reset() { *m = QueryValidatorC func (m *QueryValidatorCommissionRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatorCommissionRequest) ProtoMessage() {} func (*QueryValidatorCommissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{6} + return fileDescriptor_326769e41f941f15, []int{6} } func (m *QueryValidatorCommissionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ func (m *QueryValidatorCommissionResponse) Reset() { *m = QueryValidator func (m *QueryValidatorCommissionResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatorCommissionResponse) ProtoMessage() {} func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{7} + return fileDescriptor_326769e41f941f15, []int{7} } func (m *QueryValidatorCommissionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,7 +437,7 @@ func (m *QueryValidatorSlashesRequest) Reset() { *m = QueryValidatorSlas func (m *QueryValidatorSlashesRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatorSlashesRequest) ProtoMessage() {} func (*QueryValidatorSlashesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{8} + return fileDescriptor_326769e41f941f15, []int{8} } func (m *QueryValidatorSlashesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -479,7 +479,7 @@ func (m *QueryValidatorSlashesResponse) Reset() { *m = QueryValidatorSla func (m *QueryValidatorSlashesResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatorSlashesResponse) ProtoMessage() {} func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{9} + return fileDescriptor_326769e41f941f15, []int{9} } func (m *QueryValidatorSlashesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -535,7 +535,7 @@ func (m *QueryDelegationRewardsRequest) Reset() { *m = QueryDelegationRe func (m *QueryDelegationRewardsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDelegationRewardsRequest) ProtoMessage() {} func (*QueryDelegationRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{10} + return fileDescriptor_326769e41f941f15, []int{10} } func (m *QueryDelegationRewardsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -575,7 +575,7 @@ func (m *QueryDelegationRewardsResponse) Reset() { *m = QueryDelegationR func (m *QueryDelegationRewardsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDelegationRewardsResponse) ProtoMessage() {} func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{11} + return fileDescriptor_326769e41f941f15, []int{11} } func (m *QueryDelegationRewardsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -622,7 +622,7 @@ func (m *QueryDelegationTotalRewardsRequest) Reset() { *m = QueryDelegat func (m *QueryDelegationTotalRewardsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDelegationTotalRewardsRequest) ProtoMessage() {} func (*QueryDelegationTotalRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{12} + return fileDescriptor_326769e41f941f15, []int{12} } func (m *QueryDelegationTotalRewardsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,7 +664,7 @@ func (m *QueryDelegationTotalRewardsResponse) Reset() { *m = QueryDelega func (m *QueryDelegationTotalRewardsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {} func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{13} + return fileDescriptor_326769e41f941f15, []int{13} } func (m *QueryDelegationTotalRewardsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -718,7 +718,7 @@ func (m *QueryDelegatorValidatorsRequest) Reset() { *m = QueryDelegatorV func (m *QueryDelegatorValidatorsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDelegatorValidatorsRequest) ProtoMessage() {} func (*QueryDelegatorValidatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{14} + return fileDescriptor_326769e41f941f15, []int{14} } func (m *QueryDelegatorValidatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -758,7 +758,7 @@ func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegator func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{15} + return fileDescriptor_326769e41f941f15, []int{15} } func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -798,7 +798,7 @@ func (m *QueryDelegatorWithdrawAddressRequest) Reset() { *m = QueryDeleg func (m *QueryDelegatorWithdrawAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage() {} func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{16} + return fileDescriptor_326769e41f941f15, []int{16} } func (m *QueryDelegatorWithdrawAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -838,7 +838,7 @@ func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDele func (m *QueryDelegatorWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{17} + return fileDescriptor_326769e41f941f15, []int{17} } func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -876,7 +876,7 @@ func (m *QueryCommunityPoolRequest) Reset() { *m = QueryCommunityPoolReq func (m *QueryCommunityPoolRequest) String() string { return proto.CompactTextString(m) } func (*QueryCommunityPoolRequest) ProtoMessage() {} func (*QueryCommunityPoolRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{18} + return fileDescriptor_326769e41f941f15, []int{18} } func (m *QueryCommunityPoolRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -916,7 +916,7 @@ func (m *QueryCommunityPoolResponse) Reset() { *m = QueryCommunityPoolRe func (m *QueryCommunityPoolResponse) String() string { return proto.CompactTextString(m) } func (*QueryCommunityPoolResponse) ProtoMessage() {} func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5efd02cbc06efdc9, []int{19} + return fileDescriptor_326769e41f941f15, []int{19} } func (m *QueryCommunityPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -953,114 +953,115 @@ func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_type } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.distribution.v1beta1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.distribution.v1beta1.QueryParamsResponse") - proto.RegisterType((*QueryValidatorDistributionInfoRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest") - proto.RegisterType((*QueryValidatorDistributionInfoResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse") - proto.RegisterType((*QueryValidatorOutstandingRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest") - proto.RegisterType((*QueryValidatorOutstandingRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse") - proto.RegisterType((*QueryValidatorCommissionRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest") - proto.RegisterType((*QueryValidatorCommissionResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorCommissionResponse") - proto.RegisterType((*QueryValidatorSlashesRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorSlashesRequest") - proto.RegisterType((*QueryValidatorSlashesResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorSlashesResponse") - proto.RegisterType((*QueryDelegationRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegationRewardsRequest") - proto.RegisterType((*QueryDelegationRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegationRewardsResponse") - proto.RegisterType((*QueryDelegationTotalRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest") - proto.RegisterType((*QueryDelegationTotalRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse") - proto.RegisterType((*QueryDelegatorValidatorsRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest") - proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse") - proto.RegisterType((*QueryDelegatorWithdrawAddressRequest)(nil), "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest") - proto.RegisterType((*QueryDelegatorWithdrawAddressResponse)(nil), "cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse") - proto.RegisterType((*QueryCommunityPoolRequest)(nil), "cosmos.distribution.v1beta1.QueryCommunityPoolRequest") - proto.RegisterType((*QueryCommunityPoolResponse)(nil), "cosmos.distribution.v1beta1.QueryCommunityPoolResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "manifest.distribution.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "manifest.distribution.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryValidatorDistributionInfoRequest)(nil), "manifest.distribution.v1beta1.QueryValidatorDistributionInfoRequest") + proto.RegisterType((*QueryValidatorDistributionInfoResponse)(nil), "manifest.distribution.v1beta1.QueryValidatorDistributionInfoResponse") + proto.RegisterType((*QueryValidatorOutstandingRewardsRequest)(nil), "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest") + proto.RegisterType((*QueryValidatorOutstandingRewardsResponse)(nil), "manifest.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse") + proto.RegisterType((*QueryValidatorCommissionRequest)(nil), "manifest.distribution.v1beta1.QueryValidatorCommissionRequest") + proto.RegisterType((*QueryValidatorCommissionResponse)(nil), "manifest.distribution.v1beta1.QueryValidatorCommissionResponse") + proto.RegisterType((*QueryValidatorSlashesRequest)(nil), "manifest.distribution.v1beta1.QueryValidatorSlashesRequest") + proto.RegisterType((*QueryValidatorSlashesResponse)(nil), "manifest.distribution.v1beta1.QueryValidatorSlashesResponse") + proto.RegisterType((*QueryDelegationRewardsRequest)(nil), "manifest.distribution.v1beta1.QueryDelegationRewardsRequest") + proto.RegisterType((*QueryDelegationRewardsResponse)(nil), "manifest.distribution.v1beta1.QueryDelegationRewardsResponse") + proto.RegisterType((*QueryDelegationTotalRewardsRequest)(nil), "manifest.distribution.v1beta1.QueryDelegationTotalRewardsRequest") + proto.RegisterType((*QueryDelegationTotalRewardsResponse)(nil), "manifest.distribution.v1beta1.QueryDelegationTotalRewardsResponse") + proto.RegisterType((*QueryDelegatorValidatorsRequest)(nil), "manifest.distribution.v1beta1.QueryDelegatorValidatorsRequest") + proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "manifest.distribution.v1beta1.QueryDelegatorValidatorsResponse") + proto.RegisterType((*QueryDelegatorWithdrawAddressRequest)(nil), "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest") + proto.RegisterType((*QueryDelegatorWithdrawAddressResponse)(nil), "manifest.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse") + proto.RegisterType((*QueryCommunityPoolRequest)(nil), "manifest.distribution.v1beta1.QueryCommunityPoolRequest") + proto.RegisterType((*QueryCommunityPoolResponse)(nil), "manifest.distribution.v1beta1.QueryCommunityPoolResponse") } func init() { - proto.RegisterFile("cosmos/distribution/v1beta1/query.proto", fileDescriptor_5efd02cbc06efdc9) -} - -var fileDescriptor_5efd02cbc06efdc9 = []byte{ - // 1269 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6c, 0x1b, 0xc5, - 0x17, 0xce, 0xb8, 0x69, 0xfa, 0xcb, 0xeb, 0xaf, 0x24, 0x9e, 0x46, 0xc8, 0xd9, 0xa4, 0x4e, 0x70, - 0x68, 0x13, 0x35, 0x8a, 0xb7, 0x49, 0xa4, 0x52, 0x12, 0x2a, 0x88, 0x9d, 0x84, 0xa2, 0x46, 0x69, - 0xeb, 0x16, 0x22, 0x40, 0x95, 0xb5, 0xf6, 0x6e, 0x36, 0x0b, 0xf6, 0x8e, 0xb3, 0xb3, 0x8e, 0x89, - 0xaa, 0x5e, 0xca, 0xa5, 0xf4, 0x84, 0xe0, 0xc2, 0x91, 0x23, 0xe2, 0xc4, 0xa1, 0x9c, 0xe1, 0xc0, - 0xa1, 0xc7, 0xaa, 0x48, 0x88, 0x13, 0xa0, 0x04, 0x89, 0x72, 0x00, 0x71, 0xe3, 0x8a, 0x76, 0x66, - 0xd6, 0xde, 0xb5, 0xd7, 0xeb, 0x7f, 0xf2, 0x25, 0xb1, 0x66, 0xe7, 0x7d, 0xdf, 0xfb, 0xde, 0x7b, - 0x33, 0xfb, 0xd9, 0x30, 0x9b, 0x27, 0xb4, 0x48, 0xa8, 0xac, 0x1a, 0xd4, 0xb6, 0x8c, 0x5c, 0xd9, - 0x36, 0x88, 0x29, 0x1f, 0x2c, 0xe6, 0x34, 0x5b, 0x59, 0x94, 0xf7, 0xcb, 0x9a, 0x75, 0x98, 0x2c, - 0x59, 0xc4, 0x26, 0x78, 0x82, 0x6f, 0x4c, 0x7a, 0x37, 0x26, 0xc5, 0x46, 0xe9, 0xa2, 0x40, 0xc9, - 0x29, 0x54, 0xe3, 0x51, 0x55, 0x8c, 0x92, 0xa2, 0x1b, 0xa6, 0xc2, 0x76, 0x33, 0x20, 0x69, 0x4c, - 0x27, 0x3a, 0x61, 0x1f, 0x65, 0xe7, 0x93, 0x58, 0x9d, 0xd4, 0x09, 0xd1, 0x0b, 0x9a, 0xac, 0x94, - 0x0c, 0x59, 0x31, 0x4d, 0x62, 0xb3, 0x10, 0x2a, 0x9e, 0xc6, 0xbd, 0xf8, 0x2e, 0x72, 0x9e, 0x18, - 0x2e, 0x66, 0x32, 0x4c, 0x85, 0x2f, 0x63, 0xbe, 0x7f, 0x9c, 0xef, 0xcf, 0xf2, 0x34, 0x84, 0x32, - 0xfe, 0x28, 0xaa, 0x14, 0x0d, 0x93, 0xc8, 0xec, 0x2f, 0x5f, 0x4a, 0x8c, 0x01, 0xbe, 0xe5, 0x68, - 0xba, 0xa9, 0x58, 0x4a, 0x91, 0x66, 0xb4, 0xfd, 0xb2, 0x46, 0xed, 0xc4, 0x5d, 0x38, 0xeb, 0x5b, - 0xa5, 0x25, 0x62, 0x52, 0x0d, 0x6f, 0xc2, 0x50, 0x89, 0xad, 0xc4, 0xd0, 0x34, 0x9a, 0x3b, 0xbd, - 0x34, 0x93, 0x0c, 0x29, 0x5c, 0x92, 0x07, 0xa7, 0x86, 0x9f, 0xfc, 0x32, 0x35, 0xf0, 0xd5, 0x1f, - 0xdf, 0x5c, 0x44, 0x19, 0x11, 0x9d, 0xa8, 0xc0, 0x79, 0x06, 0xff, 0x8e, 0x52, 0x30, 0x54, 0xc5, - 0x26, 0xd6, 0xba, 0x27, 0xfe, 0x2d, 0x73, 0x97, 0x88, 0x3c, 0xf0, 0x36, 0x44, 0x0f, 0xdc, 0x3d, - 0x59, 0x45, 0x55, 0x2d, 0x8d, 0x72, 0xee, 0xe1, 0xd4, 0x4b, 0xcf, 0x1e, 0x2f, 0x9c, 0x13, 0xf4, - 0x55, 0x9c, 0x35, 0xbe, 0xe5, 0xb6, 0x6d, 0x19, 0xa6, 0x9e, 0x19, 0x3d, 0xa8, 0x5b, 0x4f, 0xfc, - 0x1d, 0x81, 0x0b, 0xad, 0x98, 0x85, 0xd6, 0x2d, 0x18, 0x25, 0x25, 0xcd, 0xea, 0x8e, 0x79, 0xc4, - 0x0d, 0x15, 0xcb, 0xf8, 0x01, 0x82, 0x28, 0xd5, 0x0a, 0xbb, 0xd9, 0x1c, 0x31, 0xd5, 0xac, 0xa5, - 0x55, 0x14, 0x4b, 0xa5, 0xb1, 0xc8, 0xf4, 0x89, 0xb9, 0xd3, 0x4b, 0x93, 0x6e, 0x15, 0x9d, 0x09, - 0xa8, 0x56, 0x6f, 0x5d, 0xcb, 0xa7, 0x89, 0x61, 0xa6, 0xae, 0x38, 0xe5, 0xfb, 0xfa, 0xd7, 0xa9, - 0x79, 0xdd, 0xb0, 0xf7, 0xca, 0xb9, 0x64, 0x9e, 0x14, 0x45, 0x53, 0xc5, 0xbf, 0x05, 0xaa, 0x7e, - 0x28, 0xdb, 0x87, 0x25, 0x8d, 0xba, 0x31, 0x94, 0x57, 0x7b, 0xc4, 0x21, 0x4c, 0x11, 0x53, 0xcd, - 0x70, 0x3a, 0xbc, 0x0f, 0x90, 0x27, 0xc5, 0xa2, 0x41, 0xa9, 0x41, 0xcc, 0xd8, 0x89, 0x36, 0xc8, - 0x97, 0xbb, 0x20, 0xcf, 0x78, 0x48, 0x12, 0x87, 0x30, 0xeb, 0xaf, 0xf7, 0x8d, 0xb2, 0x4d, 0x6d, - 0xc5, 0x54, 0x9d, 0x2a, 0xf1, 0xb4, 0xfa, 0xd5, 0xeb, 0x4f, 0x10, 0xcc, 0xb5, 0xe6, 0x16, 0xdd, - 0xbe, 0x0b, 0xa7, 0xdc, 0xa6, 0xf0, 0xd1, 0xbe, 0x12, 0x3a, 0xda, 0x21, 0x90, 0xde, 0x79, 0x77, - 0x31, 0x13, 0xfb, 0x30, 0xe5, 0x4f, 0x25, 0x5d, 0x2d, 0x51, 0xbf, 0xe4, 0x3f, 0x42, 0x30, 0xdd, - 0x9c, 0x53, 0xc8, 0xde, 0xf5, 0x4d, 0x04, 0x57, 0xbe, 0xda, 0x9e, 0xf2, 0xb5, 0x7c, 0xbe, 0x5c, - 0x2c, 0x17, 0x14, 0x5b, 0x53, 0x6b, 0xc0, 0x5e, 0xf1, 0xde, 0x31, 0x78, 0x14, 0x81, 0x49, 0x7f, - 0x32, 0xb7, 0x0b, 0x0a, 0xdd, 0xd3, 0xfa, 0xd5, 0x7c, 0x3c, 0x0b, 0x23, 0xd4, 0x56, 0x2c, 0xdb, - 0x30, 0xf5, 0xec, 0x9e, 0x66, 0xe8, 0x7b, 0x76, 0x2c, 0x32, 0x8d, 0xe6, 0x06, 0x33, 0x2f, 0xb8, - 0xcb, 0xd7, 0xd8, 0x2a, 0x9e, 0x81, 0x33, 0x1a, 0x6b, 0x9f, 0xbb, 0xed, 0x04, 0xdb, 0xf6, 0x7f, - 0xbe, 0x28, 0x36, 0x6d, 0x02, 0xd4, 0xae, 0xfa, 0xd8, 0x20, 0x2b, 0xd3, 0x05, 0xdf, 0xc1, 0xe1, - 0x6f, 0x93, 0xda, 0xcd, 0xa7, 0x6b, 0x42, 0x59, 0xc6, 0x13, 0xb9, 0x32, 0xf8, 0xf0, 0xcb, 0xa9, - 0x81, 0xc4, 0x77, 0x08, 0xce, 0x35, 0x29, 0x86, 0x68, 0xcb, 0xdb, 0x70, 0x8a, 0xf2, 0xa5, 0x18, - 0x62, 0xa7, 0xf4, 0x52, 0x7b, 0x3d, 0x61, 0x38, 0x1b, 0x07, 0x9a, 0x69, 0xfb, 0xa6, 0x50, 0x60, - 0xe1, 0x37, 0x7d, 0x32, 0x22, 0x4c, 0xc6, 0x6c, 0x4b, 0x19, 0x3c, 0x27, 0xaf, 0x8e, 0xc4, 0xf7, - 0xae, 0x82, 0x75, 0xad, 0xa0, 0xe9, 0x6c, 0xad, 0xee, 0x30, 0x6f, 0x40, 0x54, 0xe5, 0xcf, 0x1a, - 0xfa, 0x19, 0x7b, 0xf6, 0x78, 0x61, 0x4c, 0x90, 0xd6, 0xb5, 0xb1, 0x1a, 0xe2, 0xb6, 0x31, 0x70, - 0x2c, 0x22, 0x5d, 0x8f, 0xc5, 0xca, 0xff, 0x9c, 0x06, 0x3c, 0x77, 0x9a, 0xf0, 0x19, 0x82, 0x78, - 0x33, 0x09, 0xa2, 0x0b, 0x25, 0xef, 0x9d, 0xd0, 0xcf, 0x8b, 0xba, 0x7a, 0x4d, 0x94, 0x21, 0x51, - 0x97, 0xd3, 0x1d, 0x62, 0x2b, 0x85, 0xbe, 0xd4, 0xd6, 0x53, 0x8b, 0x7f, 0x10, 0xcc, 0x84, 0xf2, - 0x8a, 0x82, 0xbc, 0x5f, 0x5f, 0x90, 0xcb, 0xa1, 0x63, 0x59, 0x43, 0x5b, 0x77, 0xb9, 0x39, 0x62, - 0xd0, 0x15, 0x89, 0x0b, 0x70, 0xd2, 0x76, 0x48, 0xfb, 0xfc, 0x52, 0xe4, 0x24, 0x09, 0x4b, 0x5c, - 0xc8, 0xd5, 0xcc, 0xaa, 0x23, 0xd4, 0xbf, 0x32, 0x6f, 0x89, 0x0b, 0x39, 0x90, 0x53, 0x94, 0x38, - 0x0e, 0x50, 0x1d, 0x5a, 0x5e, 0xe5, 0xe1, 0x8c, 0x67, 0xc5, 0x83, 0x56, 0x81, 0x97, 0xfd, 0x68, - 0x3b, 0x86, 0xbd, 0xa7, 0x5a, 0x4a, 0x45, 0x10, 0xf7, 0x4d, 0xc6, 0x81, 0x30, 0x6f, 0xcd, 0x89, - 0x85, 0x96, 0x34, 0x8c, 0x56, 0xc4, 0xa3, 0xb6, 0x89, 0x47, 0x2a, 0x7e, 0x30, 0x0f, 0xef, 0x04, - 0x8c, 0x33, 0x5e, 0xe7, 0x6d, 0x53, 0x36, 0x0d, 0xfb, 0xf0, 0x26, 0x21, 0x05, 0xd7, 0xb0, 0x3e, - 0x44, 0x20, 0x05, 0x3d, 0x15, 0xa9, 0x7c, 0x00, 0x83, 0x25, 0x42, 0x0a, 0x7d, 0x3e, 0xc7, 0x8c, - 0x63, 0xe9, 0x87, 0x28, 0x9c, 0x64, 0xa9, 0xe0, 0x2f, 0x10, 0x0c, 0x71, 0x13, 0x8c, 0xe5, 0xd0, - 0x93, 0xd2, 0xe8, 0xc0, 0xa5, 0x4b, 0xed, 0x07, 0x70, 0x8d, 0x89, 0xf9, 0x07, 0x3f, 0xfe, 0xfe, - 0x79, 0xe4, 0x3c, 0x9e, 0x91, 0xc3, 0xbe, 0x30, 0x70, 0x07, 0x8e, 0xff, 0x44, 0x30, 0xde, 0xd4, - 0x03, 0xe3, 0x54, 0x6b, 0xf2, 0x56, 0xd6, 0x5d, 0x4a, 0xf7, 0x84, 0x21, 0x34, 0xa5, 0x99, 0xa6, - 0xab, 0x78, 0x35, 0x54, 0x53, 0xed, 0x7c, 0xc8, 0xf7, 0x1a, 0x5e, 0x17, 0xf7, 0xf1, 0xc7, 0x11, - 0x98, 0x08, 0x31, 0x6c, 0x78, 0xbd, 0x83, 0x4c, 0x9b, 0xda, 0x57, 0x69, 0xa3, 0x47, 0x14, 0xa1, - 0x78, 0x87, 0x29, 0xbe, 0x85, 0x6f, 0xf4, 0xa0, 0x58, 0x26, 0x35, 0x7c, 0xf7, 0xbb, 0x06, 0x3e, - 0x42, 0x70, 0x36, 0xc0, 0x0a, 0xe2, 0xd7, 0x3a, 0xc8, 0xbb, 0xc1, 0xb5, 0x4a, 0x57, 0xbb, 0x8c, - 0x16, 0x6a, 0xb7, 0x99, 0xda, 0x6b, 0x78, 0xb3, 0x17, 0xb5, 0x35, 0x9f, 0x89, 0x7f, 0x42, 0x30, - 0x5a, 0xef, 0xaa, 0xf0, 0xab, 0x1d, 0xe4, 0xe8, 0xb7, 0xa5, 0xd2, 0x4a, 0x37, 0xa1, 0x42, 0xdb, - 0x75, 0xa6, 0x6d, 0x03, 0xa7, 0x7b, 0xd1, 0xe6, 0x5a, 0xb7, 0xbf, 0x10, 0x44, 0x1b, 0x9c, 0x0a, - 0x6e, 0x23, 0xbd, 0x66, 0x0e, 0x4d, 0x5a, 0xed, 0x2a, 0x56, 0x68, 0xcb, 0x32, 0x6d, 0xef, 0xe2, - 0x9d, 0x50, 0x6d, 0xd5, 0x97, 0x08, 0x95, 0xef, 0x35, 0xbc, 0x83, 0xee, 0xcb, 0x62, 0x32, 0x03, - 0xcf, 0xec, 0x73, 0x04, 0x2f, 0x06, 0xbb, 0x11, 0xfc, 0x7a, 0x27, 0x89, 0x07, 0xf8, 0x27, 0xe9, - 0x8d, 0xee, 0x01, 0x3a, 0x6a, 0x6d, 0x7b, 0xf2, 0xd9, 0xc1, 0x0c, 0xb0, 0x04, 0xed, 0x1c, 0xcc, - 0xe6, 0xee, 0xa5, 0x9d, 0x83, 0x19, 0xe2, 0x43, 0xda, 0x3c, 0x98, 0x2d, 0x14, 0xd6, 0x66, 0x1b, - 0xff, 0x8b, 0x20, 0xd6, 0xcc, 0x30, 0xe0, 0xb5, 0x0e, 0x72, 0x0d, 0x76, 0x39, 0x52, 0xaa, 0x17, - 0x08, 0xa1, 0xf9, 0x0e, 0xd3, 0xbc, 0x8d, 0xb7, 0x7a, 0xd1, 0x5c, 0xef, 0x78, 0xf0, 0xb7, 0x08, - 0xce, 0xf8, 0x4c, 0x09, 0xbe, 0xdc, 0x3a, 0xd7, 0x20, 0x8f, 0x23, 0xbd, 0xd2, 0x71, 0x9c, 0x10, - 0xb6, 0xcc, 0x84, 0x2d, 0xe0, 0xf9, 0x50, 0x61, 0x79, 0x37, 0x36, 0xeb, 0xd8, 0x98, 0xd4, 0xf5, - 0x27, 0x47, 0x71, 0xf4, 0xf4, 0x28, 0x8e, 0x7e, 0x3b, 0x8a, 0xa3, 0x4f, 0x8f, 0xe3, 0x03, 0x4f, - 0x8f, 0xe3, 0x03, 0x3f, 0x1f, 0xc7, 0x07, 0xde, 0x5b, 0x0c, 0x35, 0x46, 0x1f, 0xf9, 0xd1, 0x99, - 0x4f, 0xca, 0x0d, 0xb1, 0x1f, 0x1b, 0x97, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x2b, 0x1c, - 0xf2, 0x92, 0x15, 0x00, 0x00, + proto.RegisterFile("manifest/distribution/v1beta1/query.proto", fileDescriptor_326769e41f941f15) +} + +var fileDescriptor_326769e41f941f15 = []byte{ + // 1291 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4d, 0x6c, 0x1b, 0x45, + 0x14, 0xce, 0xb8, 0x69, 0x4b, 0xa7, 0x94, 0xc4, 0xd3, 0x08, 0x39, 0xdb, 0xc4, 0x09, 0x0e, 0x69, + 0x42, 0xa3, 0x78, 0x49, 0x72, 0x09, 0x29, 0x01, 0xc5, 0x76, 0xd2, 0x20, 0xa2, 0xb4, 0x75, 0x23, + 0x22, 0x90, 0x90, 0xb5, 0xf6, 0x4e, 0xd6, 0x0b, 0xeb, 0x1d, 0x67, 0x67, 0x1c, 0x13, 0x55, 0xbd, + 0xf4, 0x42, 0x05, 0x1c, 0x10, 0x5c, 0x39, 0x70, 0x44, 0x9c, 0x38, 0xf4, 0xc2, 0x0d, 0x6e, 0x3d, + 0x56, 0xe5, 0x82, 0x38, 0x00, 0x4a, 0x10, 0x70, 0x28, 0x48, 0x70, 0xe5, 0x82, 0x3c, 0x33, 0x6b, + 0xef, 0xda, 0xeb, 0x7f, 0xf9, 0x92, 0x38, 0xb3, 0xf3, 0xbe, 0xef, 0x7d, 0xef, 0xbd, 0x99, 0xfd, + 0x1c, 0xf8, 0x52, 0x41, 0xb3, 0xcd, 0x03, 0x4c, 0x99, 0xaa, 0x9b, 0x94, 0x39, 0x66, 0xb6, 0xc4, + 0x4c, 0x62, 0xab, 0x47, 0x4b, 0x59, 0xcc, 0xb4, 0x25, 0xf5, 0xb0, 0x84, 0x9d, 0xe3, 0x78, 0xd1, + 0x21, 0x8c, 0xa0, 0x49, 0x77, 0x6b, 0xdc, 0xbb, 0x35, 0x2e, 0xb7, 0x2a, 0xd7, 0x72, 0x84, 0x16, + 0x08, 0x55, 0xb3, 0x1a, 0xc5, 0x22, 0xae, 0x8a, 0x52, 0xd4, 0x0c, 0xd3, 0xd6, 0xf8, 0x6e, 0x0e, + 0xa5, 0x8c, 0x19, 0xc4, 0x20, 0xfc, 0xa3, 0x5a, 0xf9, 0x24, 0x57, 0x27, 0x0c, 0x42, 0x0c, 0x0b, + 0xab, 0x5a, 0xd1, 0x54, 0x35, 0xdb, 0x26, 0x8c, 0x87, 0x50, 0xf9, 0x34, 0xea, 0xc5, 0x77, 0x91, + 0x73, 0xc4, 0x74, 0x31, 0x5f, 0x6e, 0xad, 0xc4, 0x97, 0xb3, 0x88, 0x18, 0x17, 0x88, 0x19, 0x91, + 0x88, 0xf8, 0x43, 0x3e, 0x0a, 0x6b, 0x05, 0xd3, 0x26, 0x2a, 0xff, 0x29, 0x96, 0x62, 0x63, 0x10, + 0xdd, 0xae, 0xa8, 0xba, 0xa5, 0x39, 0x5a, 0x81, 0xa6, 0xf1, 0x61, 0x09, 0x53, 0x16, 0xcb, 0xc0, + 0xcb, 0xbe, 0x55, 0x5a, 0x24, 0x36, 0xc5, 0x68, 0x1b, 0x9e, 0x2b, 0xf2, 0x95, 0x08, 0x98, 0x06, + 0xf3, 0x17, 0x97, 0x67, 0xe3, 0x2d, 0x8b, 0x17, 0x17, 0xe1, 0x89, 0x0b, 0x8f, 0x7e, 0x9e, 0x1a, + 0xfa, 0xea, 0x8f, 0x6f, 0xae, 0x81, 0xb4, 0x8c, 0x8f, 0x95, 0xe1, 0x2c, 0x27, 0x78, 0x4b, 0xb3, + 0x4c, 0x5d, 0x63, 0xc4, 0x49, 0x79, 0xe2, 0xdf, 0xb0, 0x0f, 0x88, 0xcc, 0x04, 0xed, 0xc2, 0xf0, + 0x91, 0xbb, 0x27, 0xa3, 0xe9, 0xba, 0x83, 0xa9, 0x60, 0xbf, 0x90, 0x78, 0xe1, 0xc9, 0xc3, 0xc5, + 0x49, 0xa9, 0xaf, 0x8a, 0xb3, 0x21, 0xb6, 0xdc, 0x61, 0x8e, 0x69, 0x1b, 0xe9, 0xd1, 0xa3, 0xba, + 0xf5, 0xd8, 0xdf, 0x21, 0x78, 0xb5, 0x1d, 0xb3, 0x54, 0xbb, 0x03, 0x47, 0x49, 0x11, 0x3b, 0xbd, + 0x31, 0x8f, 0xb8, 0xa1, 0x72, 0x19, 0xdd, 0x07, 0x30, 0x4c, 0xb1, 0x75, 0x90, 0xc9, 0x12, 0x5b, + 0xcf, 0x38, 0xb8, 0xac, 0x39, 0x3a, 0x8d, 0x84, 0xa6, 0xcf, 0xcc, 0x5f, 0x5c, 0x9e, 0x88, 0x4b, + 0xb0, 0xca, 0x14, 0x54, 0xab, 0x97, 0xc2, 0xb9, 0x24, 0x31, 0xed, 0xc4, 0x6a, 0xa5, 0x7c, 0x5f, + 0xff, 0x32, 0xb5, 0x60, 0x98, 0x2c, 0x5f, 0xca, 0xc6, 0x73, 0xa4, 0x20, 0xdb, 0x2a, 0x7f, 0x2d, + 0x52, 0xfd, 0x7d, 0x95, 0x1d, 0x17, 0x31, 0x75, 0x63, 0xa8, 0xa8, 0xf6, 0x48, 0x85, 0x30, 0x41, + 0x6c, 0x3d, 0x2d, 0xe8, 0xd0, 0x21, 0x84, 0x39, 0x52, 0x28, 0x98, 0x94, 0x9a, 0xc4, 0x8e, 0x9c, + 0xe9, 0x80, 0x7c, 0xa5, 0x07, 0xf2, 0xb4, 0x87, 0x24, 0x76, 0x0c, 0xe7, 0xfc, 0xf5, 0xbe, 0x59, + 0x62, 0x94, 0x69, 0xb6, 0x5e, 0xa9, 0x92, 0x48, 0x6b, 0x50, 0xbd, 0xfe, 0x18, 0xc0, 0xf9, 0xf6, + 0xdc, 0xb2, 0xdb, 0x19, 0x78, 0xde, 0x6d, 0x8a, 0x18, 0xee, 0xb5, 0x36, 0xc3, 0xdd, 0x02, 0xd4, + 0x3b, 0xf1, 0x2e, 0x6a, 0xec, 0x10, 0x4e, 0xf9, 0x93, 0x49, 0x56, 0x8b, 0x34, 0xa8, 0x02, 0x7c, + 0x02, 0xe0, 0x74, 0x73, 0x4e, 0x29, 0x3c, 0xef, 0x9b, 0x09, 0xa1, 0x7d, 0xbd, 0x53, 0xed, 0x1b, + 0xb9, 0x5c, 0xa9, 0x50, 0xb2, 0x34, 0x86, 0xf5, 0x1a, 0xb4, 0x57, 0xbe, 0x77, 0x14, 0x3e, 0x0a, + 0xc1, 0x09, 0x7f, 0x3a, 0x77, 0x2c, 0x8d, 0xe6, 0xf1, 0xa0, 0x06, 0x00, 0xcd, 0xc1, 0x11, 0xca, + 0x34, 0x87, 0x99, 0xb6, 0x91, 0xc9, 0x63, 0xd3, 0xc8, 0xb3, 0x48, 0x68, 0x1a, 0xcc, 0x0f, 0xa7, + 0x9f, 0x73, 0x97, 0xb7, 0xf9, 0x2a, 0x9a, 0x81, 0x97, 0x30, 0x6f, 0xa0, 0xbb, 0xed, 0x0c, 0xdf, + 0xf6, 0xac, 0x58, 0x94, 0x9b, 0xb6, 0x20, 0xac, 0x5d, 0xf9, 0x91, 0x61, 0x5e, 0xa8, 0xab, 0xbe, + 0xc3, 0x23, 0xde, 0x2b, 0xb5, 0xdb, 0xcf, 0xc0, 0x52, 0x59, 0xda, 0x13, 0xb9, 0x36, 0xfc, 0xe0, + 0xcb, 0xa9, 0xa1, 0xd8, 0xf7, 0x00, 0x4e, 0x36, 0x29, 0x86, 0x6c, 0xcc, 0x3e, 0x3c, 0x4f, 0xc5, + 0x52, 0x04, 0xf0, 0x93, 0xba, 0xdc, 0x69, 0x57, 0x38, 0xd2, 0xe6, 0x11, 0xb6, 0x99, 0x6f, 0x12, + 0x25, 0x1a, 0xba, 0xe1, 0x13, 0x12, 0xe2, 0x42, 0xe6, 0xda, 0x0a, 0x11, 0x59, 0x79, 0x95, 0xc4, + 0xbe, 0x73, 0x35, 0xa4, 0xb0, 0x85, 0x0d, 0xbe, 0x56, 0x77, 0xa4, 0x37, 0x61, 0x58, 0x17, 0xcf, + 0x1a, 0x3a, 0x1a, 0x79, 0xf2, 0x70, 0x71, 0x4c, 0x92, 0xd6, 0x35, 0xb2, 0x1a, 0xe2, 0x36, 0x32, + 0x70, 0x30, 0x42, 0x3d, 0x0f, 0xc6, 0xda, 0x33, 0x95, 0x16, 0xfc, 0x59, 0x69, 0xc3, 0x67, 0x00, + 0x46, 0x9b, 0x49, 0x90, 0x7d, 0x28, 0x7a, 0x6f, 0x86, 0x41, 0x5e, 0xd7, 0xd5, 0xab, 0xa2, 0x04, + 0x63, 0x75, 0x39, 0xed, 0x11, 0xa6, 0x59, 0x03, 0xa9, 0xad, 0xa7, 0x16, 0xff, 0x02, 0x38, 0xd3, + 0x92, 0x57, 0x16, 0xe4, 0xdd, 0xfa, 0x82, 0xac, 0xb6, 0x19, 0xcc, 0x1a, 0x5e, 0xca, 0x65, 0x17, + 0x98, 0x41, 0x17, 0x25, 0xb2, 0xe0, 0x59, 0x56, 0xa1, 0x1d, 0xf0, 0xcb, 0x51, 0x90, 0xc4, 0x1c, + 0x79, 0x2d, 0x57, 0x33, 0xab, 0x0e, 0xd1, 0xe0, 0x0a, 0xbd, 0x23, 0xaf, 0xe5, 0x40, 0x4e, 0x59, + 0xe4, 0x28, 0x84, 0xd5, 0xb1, 0x15, 0x75, 0xbe, 0x90, 0xf6, 0xac, 0x78, 0xd0, 0xca, 0xf0, 0x45, + 0x3f, 0xda, 0xbe, 0xc9, 0xf2, 0xba, 0xa3, 0x95, 0x25, 0xf1, 0xc0, 0x64, 0x1c, 0x49, 0x13, 0xd7, + 0x9c, 0x58, 0x6a, 0x49, 0xc2, 0xd1, 0xb2, 0x7c, 0xd4, 0x31, 0xf1, 0x48, 0xd9, 0x0f, 0xe6, 0xe1, + 0xbd, 0x02, 0xc7, 0x39, 0x6f, 0xe5, 0x8d, 0x53, 0xb2, 0x4d, 0x76, 0x7c, 0x8b, 0x10, 0xcb, 0xb5, + 0xae, 0x0f, 0x00, 0x54, 0x82, 0x9e, 0xca, 0x54, 0xde, 0x83, 0xc3, 0x45, 0x42, 0xac, 0x01, 0x9f, + 0x64, 0xce, 0xb1, 0xfc, 0x34, 0x0c, 0xcf, 0xf2, 0x54, 0xd0, 0x17, 0x00, 0x9e, 0x13, 0x66, 0x18, + 0x2d, 0xb5, 0x39, 0x2b, 0x8d, 0x6e, 0x5c, 0x59, 0xee, 0x26, 0x44, 0xe8, 0x8c, 0x2d, 0xdc, 0xff, + 0xe1, 0xb7, 0xcf, 0x43, 0xb3, 0x68, 0xc6, 0xcd, 0x38, 0xf0, 0xeb, 0x83, 0x70, 0xe3, 0xe8, 0x2f, + 0x00, 0xc7, 0x9b, 0xfa, 0x61, 0x94, 0xea, 0x84, 0xbe, 0x9d, 0x91, 0x57, 0x36, 0xfb, 0x44, 0x91, + 0xba, 0x92, 0x5c, 0xd7, 0x3a, 0xba, 0xde, 0x52, 0x57, 0xed, 0x9c, 0xa8, 0x77, 0x1b, 0x5e, 0x1c, + 0xf7, 0xd0, 0x87, 0x21, 0x78, 0xa5, 0x85, 0x7d, 0x43, 0x5b, 0x5d, 0xe5, 0xda, 0xd4, 0xd0, 0x2a, + 0x37, 0xfa, 0xc6, 0x91, 0xaa, 0xf7, 0xb9, 0xea, 0xdb, 0xe8, 0x66, 0x1f, 0xaa, 0x55, 0x52, 0xc3, + 0x77, 0xbf, 0x7f, 0xa0, 0xdf, 0x01, 0xbc, 0x1c, 0x60, 0x0e, 0xd1, 0x6b, 0x5d, 0x65, 0xde, 0xe0, + 0x64, 0x95, 0xd7, 0x7b, 0x8e, 0x97, 0x8a, 0x77, 0xb9, 0xe2, 0x6d, 0xb4, 0xd5, 0x8f, 0xe2, 0x9a, + 0xf7, 0x44, 0x3f, 0x01, 0x38, 0x5a, 0xef, 0xb4, 0xd0, 0xf5, 0xae, 0xb2, 0xf4, 0x9b, 0x55, 0xe5, + 0xd5, 0xde, 0x82, 0xa5, 0xbe, 0x37, 0xb9, 0xbe, 0x4d, 0x94, 0xec, 0x47, 0x9f, 0x6b, 0xe8, 0xfe, + 0x01, 0x30, 0xdc, 0xe0, 0x5f, 0x50, 0x47, 0x09, 0x36, 0x73, 0x6e, 0xca, 0x7a, 0x8f, 0xd1, 0x52, + 0x5f, 0x86, 0xeb, 0x7b, 0x1b, 0xed, 0xb7, 0xd4, 0x57, 0x7d, 0xb9, 0x50, 0xf5, 0x6e, 0xc3, 0xbb, + 0xe9, 0x9e, 0x2a, 0xa7, 0x34, 0xf0, 0x0c, 0x3f, 0x05, 0xf0, 0xf9, 0x60, 0x9f, 0x82, 0x36, 0xba, + 0x4b, 0x3d, 0xc0, 0x5b, 0x29, 0x89, 0x7e, 0x20, 0xba, 0x6a, 0x71, 0x67, 0x25, 0xe0, 0x07, 0x35, + 0xc0, 0x2e, 0x74, 0x76, 0x50, 0x9b, 0x7b, 0x9b, 0xce, 0x0e, 0x6a, 0x0b, 0x9f, 0xd2, 0xe1, 0x41, + 0x6d, 0xa3, 0xb2, 0x36, 0xe7, 0xe8, 0x3f, 0x00, 0x23, 0xcd, 0x0c, 0x05, 0x4a, 0x76, 0x95, 0x6d, + 0xb0, 0x0f, 0x52, 0x52, 0xfd, 0x81, 0x48, 0xdd, 0x7b, 0x5c, 0xf7, 0x2e, 0xda, 0xe9, 0x47, 0x77, + 0xbd, 0x2b, 0x42, 0xdf, 0x02, 0x78, 0xc9, 0x67, 0x5c, 0xd0, 0x6a, 0x27, 0xd9, 0x06, 0x39, 0x21, + 0xe5, 0x95, 0x1e, 0x22, 0xa5, 0xb8, 0x15, 0x2e, 0x6e, 0x11, 0x2d, 0xb4, 0x14, 0x97, 0x73, 0x63, + 0x33, 0x15, 0xbb, 0x93, 0xd8, 0x7b, 0x74, 0x12, 0x05, 0x8f, 0x4f, 0xa2, 0xe0, 0xd7, 0x93, 0x28, + 0xf8, 0xf4, 0x34, 0x3a, 0xf4, 0xf8, 0x34, 0x3a, 0xf4, 0xe3, 0x69, 0x74, 0xe8, 0x9d, 0x35, 0x8f, + 0x81, 0xb2, 0xcc, 0x03, 0x86, 0x75, 0xd3, 0x36, 0x99, 0xea, 0xa6, 0xb7, 0x68, 0x61, 0xdd, 0xc0, + 0x8e, 0xfa, 0x81, 0x9f, 0x86, 0x1b, 0xab, 0xec, 0x39, 0xfe, 0x7f, 0xca, 0x95, 0xff, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x9a, 0xea, 0x07, 0x0b, 0xd3, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1108,7 +1109,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -1117,7 +1118,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) { out := new(QueryValidatorDistributionInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/ValidatorDistributionInfo", in, out, opts...) if err != nil { return nil, err } @@ -1126,7 +1127,7 @@ func (c *queryClient) ValidatorDistributionInfo(ctx context.Context, in *QueryVa func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) { out := new(QueryValidatorOutstandingRewardsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/ValidatorOutstandingRewards", in, out, opts...) if err != nil { return nil, err } @@ -1135,7 +1136,7 @@ func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *Query func (c *queryClient) ValidatorCommission(ctx context.Context, in *QueryValidatorCommissionRequest, opts ...grpc.CallOption) (*QueryValidatorCommissionResponse, error) { out := new(QueryValidatorCommissionResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorCommission", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/ValidatorCommission", in, out, opts...) if err != nil { return nil, err } @@ -1144,7 +1145,7 @@ func (c *queryClient) ValidatorCommission(ctx context.Context, in *QueryValidato func (c *queryClient) ValidatorSlashes(ctx context.Context, in *QueryValidatorSlashesRequest, opts ...grpc.CallOption) (*QueryValidatorSlashesResponse, error) { out := new(QueryValidatorSlashesResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/ValidatorSlashes", in, out, opts...) if err != nil { return nil, err } @@ -1153,7 +1154,7 @@ func (c *queryClient) ValidatorSlashes(ctx context.Context, in *QueryValidatorSl func (c *queryClient) DelegationRewards(ctx context.Context, in *QueryDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationRewardsResponse, error) { out := new(QueryDelegationRewardsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegationRewards", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/DelegationRewards", in, out, opts...) if err != nil { return nil, err } @@ -1162,7 +1163,7 @@ func (c *queryClient) DelegationRewards(ctx context.Context, in *QueryDelegation func (c *queryClient) DelegationTotalRewards(ctx context.Context, in *QueryDelegationTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegationTotalRewardsResponse, error) { out := new(QueryDelegationTotalRewardsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/DelegationTotalRewards", in, out, opts...) if err != nil { return nil, err } @@ -1171,7 +1172,7 @@ func (c *queryClient) DelegationTotalRewards(ctx context.Context, in *QueryDeleg func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { out := new(QueryDelegatorValidatorsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegatorValidators", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/DelegatorValidators", in, out, opts...) if err != nil { return nil, err } @@ -1180,7 +1181,7 @@ func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegato func (c *queryClient) DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) { out := new(QueryDelegatorWithdrawAddressResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/DelegatorWithdrawAddress", in, out, opts...) if err != nil { return nil, err } @@ -1189,7 +1190,7 @@ func (c *queryClient) DelegatorWithdrawAddress(ctx context.Context, in *QueryDel func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolRequest, opts ...grpc.CallOption) (*QueryCommunityPoolResponse, error) { out := new(QueryCommunityPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/CommunityPool", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Query/CommunityPool", in, out, opts...) if err != nil { return nil, err } @@ -1270,7 +1271,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/Params", + FullMethod: "/manifest.distribution.v1beta1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -1288,7 +1289,7 @@ func _Query_ValidatorDistributionInfo_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + FullMethod: "/manifest.distribution.v1beta1.Query/ValidatorDistributionInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValidatorDistributionInfo(ctx, req.(*QueryValidatorDistributionInfoRequest)) @@ -1306,7 +1307,7 @@ func _Query_ValidatorOutstandingRewards_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + FullMethod: "/manifest.distribution.v1beta1.Query/ValidatorOutstandingRewards", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValidatorOutstandingRewards(ctx, req.(*QueryValidatorOutstandingRewardsRequest)) @@ -1324,7 +1325,7 @@ func _Query_ValidatorCommission_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorCommission", + FullMethod: "/manifest.distribution.v1beta1.Query/ValidatorCommission", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValidatorCommission(ctx, req.(*QueryValidatorCommissionRequest)) @@ -1342,7 +1343,7 @@ func _Query_ValidatorSlashes_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", + FullMethod: "/manifest.distribution.v1beta1.Query/ValidatorSlashes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ValidatorSlashes(ctx, req.(*QueryValidatorSlashesRequest)) @@ -1360,7 +1361,7 @@ func _Query_DelegationRewards_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegationRewards", + FullMethod: "/manifest.distribution.v1beta1.Query/DelegationRewards", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DelegationRewards(ctx, req.(*QueryDelegationRewardsRequest)) @@ -1378,7 +1379,7 @@ func _Query_DelegationTotalRewards_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + FullMethod: "/manifest.distribution.v1beta1.Query/DelegationTotalRewards", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DelegationTotalRewards(ctx, req.(*QueryDelegationTotalRewardsRequest)) @@ -1396,7 +1397,7 @@ func _Query_DelegatorValidators_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegatorValidators", + FullMethod: "/manifest.distribution.v1beta1.Query/DelegatorValidators", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DelegatorValidators(ctx, req.(*QueryDelegatorValidatorsRequest)) @@ -1414,7 +1415,7 @@ func _Query_DelegatorWithdrawAddress_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + FullMethod: "/manifest.distribution.v1beta1.Query/DelegatorWithdrawAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DelegatorWithdrawAddress(ctx, req.(*QueryDelegatorWithdrawAddressRequest)) @@ -1432,7 +1433,7 @@ func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Query/CommunityPool", + FullMethod: "/manifest.distribution.v1beta1.Query/CommunityPool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).CommunityPool(ctx, req.(*QueryCommunityPoolRequest)) @@ -1441,7 +1442,7 @@ func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.distribution.v1beta1.Query", + ServiceName: "manifest.distribution.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1486,7 +1487,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/distribution/v1beta1/query.proto", + Metadata: "manifest/distribution/v1beta1/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/distribution/types/query.pb.gw.go b/x/distribution/types/query.pb.gw.go index 9cf7f68..459ce1c 100644 --- a/x/distribution/types/query.pb.gw.go +++ b/x/distribution/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cosmos/distribution/v1beta1/query.proto +// source: manifest/distribution/v1beta1/query.proto /* Package types is a reverse proxy. diff --git a/x/distribution/types/tx.pb.go b/x/distribution/types/tx.pb.go index b38aa0c..e10837a 100644 --- a/x/distribution/types/tx.pb.go +++ b/x/distribution/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/distribution/v1beta1/tx.proto +// source: manifest/distribution/v1beta1/tx.proto package types @@ -44,7 +44,7 @@ func (m *MsgSetWithdrawAddress) Reset() { *m = MsgSetWithdrawAddress{} } func (m *MsgSetWithdrawAddress) String() string { return proto.CompactTextString(m) } func (*MsgSetWithdrawAddress) ProtoMessage() {} func (*MsgSetWithdrawAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{0} + return fileDescriptor_ea5763498c3dfe16, []int{0} } func (m *MsgSetWithdrawAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -82,7 +82,7 @@ func (m *MsgSetWithdrawAddressResponse) Reset() { *m = MsgSetWithdrawAdd func (m *MsgSetWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } func (*MsgSetWithdrawAddressResponse) ProtoMessage() {} func (*MsgSetWithdrawAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{1} + return fileDescriptor_ea5763498c3dfe16, []int{1} } func (m *MsgSetWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -122,7 +122,7 @@ func (m *MsgWithdrawDelegatorReward) Reset() { *m = MsgWithdrawDelegator func (m *MsgWithdrawDelegatorReward) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawDelegatorReward) ProtoMessage() {} func (*MsgWithdrawDelegatorReward) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{2} + return fileDescriptor_ea5763498c3dfe16, []int{2} } func (m *MsgWithdrawDelegatorReward) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ func (m *MsgWithdrawDelegatorRewardResponse) Reset() { *m = MsgWithdrawD func (m *MsgWithdrawDelegatorRewardResponse) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawDelegatorRewardResponse) ProtoMessage() {} func (*MsgWithdrawDelegatorRewardResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{3} + return fileDescriptor_ea5763498c3dfe16, []int{3} } func (m *MsgWithdrawDelegatorRewardResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -208,7 +208,7 @@ func (m *MsgWithdrawValidatorCommission) Reset() { *m = MsgWithdrawValid func (m *MsgWithdrawValidatorCommission) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawValidatorCommission) ProtoMessage() {} func (*MsgWithdrawValidatorCommission) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{4} + return fileDescriptor_ea5763498c3dfe16, []int{4} } func (m *MsgWithdrawValidatorCommission) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -250,7 +250,7 @@ func (m *MsgWithdrawValidatorCommissionResponse) Reset() { func (m *MsgWithdrawValidatorCommissionResponse) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawValidatorCommissionResponse) ProtoMessage() {} func (*MsgWithdrawValidatorCommissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{5} + return fileDescriptor_ea5763498c3dfe16, []int{5} } func (m *MsgWithdrawValidatorCommissionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -297,7 +297,7 @@ func (m *MsgFundCommunityPool) Reset() { *m = MsgFundCommunityPool{} } func (m *MsgFundCommunityPool) String() string { return proto.CompactTextString(m) } func (*MsgFundCommunityPool) ProtoMessage() {} func (*MsgFundCommunityPool) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{6} + return fileDescriptor_ea5763498c3dfe16, []int{6} } func (m *MsgFundCommunityPool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -334,7 +334,7 @@ func (m *MsgFundCommunityPoolResponse) Reset() { *m = MsgFundCommunityPo func (m *MsgFundCommunityPoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgFundCommunityPoolResponse) ProtoMessage() {} func (*MsgFundCommunityPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{7} + return fileDescriptor_ea5763498c3dfe16, []int{7} } func (m *MsgFundCommunityPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -379,7 +379,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{8} + return fileDescriptor_ea5763498c3dfe16, []int{8} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -433,7 +433,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{9} + return fileDescriptor_ea5763498c3dfe16, []int{9} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -478,7 +478,7 @@ func (m *MsgCommunityPoolSpend) Reset() { *m = MsgCommunityPoolSpend{} } func (m *MsgCommunityPoolSpend) String() string { return proto.CompactTextString(m) } func (*MsgCommunityPoolSpend) ProtoMessage() {} func (*MsgCommunityPoolSpend) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{10} + return fileDescriptor_ea5763498c3dfe16, []int{10} } func (m *MsgCommunityPoolSpend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -539,7 +539,7 @@ func (m *MsgCommunityPoolSpendResponse) Reset() { *m = MsgCommunityPoolS func (m *MsgCommunityPoolSpendResponse) String() string { return proto.CompactTextString(m) } func (*MsgCommunityPoolSpendResponse) ProtoMessage() {} func (*MsgCommunityPoolSpendResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{11} + return fileDescriptor_ea5763498c3dfe16, []int{11} } func (m *MsgCommunityPoolSpendResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ func (m *MsgDepositValidatorRewardsPool) Reset() { *m = MsgDepositValida func (m *MsgDepositValidatorRewardsPool) String() string { return proto.CompactTextString(m) } func (*MsgDepositValidatorRewardsPool) ProtoMessage() {} func (*MsgDepositValidatorRewardsPool) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{12} + return fileDescriptor_ea5763498c3dfe16, []int{12} } func (m *MsgDepositValidatorRewardsPool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -624,7 +624,7 @@ func (m *MsgDepositValidatorRewardsPoolResponse) Reset() { func (m *MsgDepositValidatorRewardsPoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgDepositValidatorRewardsPoolResponse) ProtoMessage() {} func (*MsgDepositValidatorRewardsPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed4f433d965e58ca, []int{13} + return fileDescriptor_ea5763498c3dfe16, []int{13} } func (m *MsgDepositValidatorRewardsPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -654,86 +654,88 @@ func (m *MsgDepositValidatorRewardsPoolResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDepositValidatorRewardsPoolResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos.distribution.v1beta1.MsgSetWithdrawAddress") - proto.RegisterType((*MsgSetWithdrawAddressResponse)(nil), "cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse") - proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward") - proto.RegisterType((*MsgWithdrawDelegatorRewardResponse)(nil), "cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse") - proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission") - proto.RegisterType((*MsgWithdrawValidatorCommissionResponse)(nil), "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse") - proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.distribution.v1beta1.MsgFundCommunityPool") - proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.distribution.v1beta1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.distribution.v1beta1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgCommunityPoolSpend)(nil), "cosmos.distribution.v1beta1.MsgCommunityPoolSpend") - proto.RegisterType((*MsgCommunityPoolSpendResponse)(nil), "cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse") - proto.RegisterType((*MsgDepositValidatorRewardsPool)(nil), "cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool") - proto.RegisterType((*MsgDepositValidatorRewardsPoolResponse)(nil), "cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse") + proto.RegisterType((*MsgSetWithdrawAddress)(nil), "manifest.distribution.v1beta1.MsgSetWithdrawAddress") + proto.RegisterType((*MsgSetWithdrawAddressResponse)(nil), "manifest.distribution.v1beta1.MsgSetWithdrawAddressResponse") + proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "manifest.distribution.v1beta1.MsgWithdrawDelegatorReward") + proto.RegisterType((*MsgWithdrawDelegatorRewardResponse)(nil), "manifest.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse") + proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "manifest.distribution.v1beta1.MsgWithdrawValidatorCommission") + proto.RegisterType((*MsgWithdrawValidatorCommissionResponse)(nil), "manifest.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse") + proto.RegisterType((*MsgFundCommunityPool)(nil), "manifest.distribution.v1beta1.MsgFundCommunityPool") + proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "manifest.distribution.v1beta1.MsgFundCommunityPoolResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "manifest.distribution.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "manifest.distribution.v1beta1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgCommunityPoolSpend)(nil), "manifest.distribution.v1beta1.MsgCommunityPoolSpend") + proto.RegisterType((*MsgCommunityPoolSpendResponse)(nil), "manifest.distribution.v1beta1.MsgCommunityPoolSpendResponse") + proto.RegisterType((*MsgDepositValidatorRewardsPool)(nil), "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPool") + proto.RegisterType((*MsgDepositValidatorRewardsPoolResponse)(nil), "manifest.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse") } func init() { - proto.RegisterFile("cosmos/distribution/v1beta1/tx.proto", fileDescriptor_ed4f433d965e58ca) -} - -var fileDescriptor_ed4f433d965e58ca = []byte{ - // 925 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xce, 0xa4, 0xa2, 0x28, 0xb3, 0x2b, 0xed, 0x26, 0x2a, 0x6a, 0xeb, 0xdd, 0x75, 0x16, 0x17, - 0x4a, 0x14, 0x51, 0x5b, 0x09, 0x08, 0x54, 0x73, 0x00, 0x92, 0x12, 0x89, 0x43, 0xa0, 0x4a, 0x05, - 0x48, 0x5c, 0x2a, 0x27, 0x36, 0xee, 0x88, 0xda, 0x63, 0x79, 0x26, 0x49, 0x73, 0x03, 0x04, 0x12, - 0xe2, 0x84, 0xc4, 0x8d, 0x4b, 0x2b, 0xf5, 0x52, 0x71, 0xca, 0xa1, 0x07, 0x7e, 0x42, 0x2f, 0x48, - 0x55, 0x4f, 0x9c, 0x00, 0xa5, 0x42, 0x41, 0x82, 0xdf, 0x80, 0x90, 0xed, 0x89, 0x63, 0xc7, 0x8e, - 0xdd, 0x96, 0x8a, 0x72, 0x69, 0xab, 0x99, 0xf7, 0xbe, 0xf9, 0xde, 0x37, 0xdf, 0xbc, 0xe7, 0xc2, - 0x17, 0x3a, 0x98, 0x18, 0x98, 0x48, 0x2a, 0x22, 0xd4, 0x46, 0xed, 0x2e, 0x45, 0xd8, 0x94, 0x7a, - 0x95, 0xb6, 0x46, 0x95, 0x8a, 0x44, 0x0f, 0x44, 0xcb, 0xc6, 0x14, 0x17, 0x1e, 0x79, 0x51, 0x62, - 0x30, 0x4a, 0x64, 0x51, 0xdc, 0x92, 0x8e, 0x75, 0xec, 0xc6, 0x49, 0xce, 0x5f, 0x5e, 0x0a, 0xc7, - 0x33, 0xe0, 0xb6, 0x42, 0x34, 0x1f, 0xb0, 0x83, 0x91, 0xc9, 0xf6, 0x57, 0xbd, 0xfd, 0x5d, 0x2f, - 0x91, 0xe1, 0x7b, 0x5b, 0xcb, 0x2c, 0xd5, 0x20, 0xba, 0xd4, 0xab, 0x38, 0xbf, 0xd8, 0x46, 0x5e, - 0x31, 0x90, 0x89, 0x25, 0xf7, 0x27, 0x5b, 0x12, 0x93, 0xf8, 0x87, 0xe8, 0xba, 0xf1, 0xc2, 0x9f, - 0x00, 0x3e, 0xd7, 0x24, 0xfa, 0x8e, 0x46, 0x3f, 0x42, 0x74, 0x4f, 0xb5, 0x95, 0xfe, 0xdb, 0xaa, - 0x6a, 0x6b, 0x84, 0x14, 0xde, 0x81, 0x79, 0x55, 0xdb, 0xd7, 0x74, 0x85, 0x62, 0x7b, 0x57, 0xf1, - 0x16, 0x57, 0xc0, 0x53, 0x50, 0xca, 0xd5, 0x56, 0x2e, 0x4e, 0x37, 0x96, 0x18, 0x45, 0x16, 0xbe, - 0x43, 0x6d, 0x64, 0xea, 0xad, 0x87, 0x7e, 0xca, 0x04, 0xa6, 0x0e, 0x1f, 0xf6, 0x19, 0xb2, 0x8f, - 0x92, 0x4d, 0x41, 0x79, 0xd0, 0x0f, 0x73, 0x91, 0x1b, 0x5f, 0x1f, 0x15, 0x33, 0x7f, 0x1c, 0x15, - 0x33, 0x5f, 0x8c, 0x87, 0xe5, 0x28, 0xad, 0x6f, 0xc6, 0xc3, 0xf2, 0x9a, 0x87, 0xb4, 0x41, 0xd4, - 0x4f, 0xa5, 0x26, 0xd1, 0x9b, 0x58, 0x45, 0x9f, 0x0c, 0x66, 0x6a, 0x12, 0x8a, 0xf0, 0x49, 0x6c, - 0xb1, 0x2d, 0x8d, 0x58, 0xd8, 0x24, 0x9a, 0xf0, 0x37, 0x80, 0x5c, 0x93, 0xe8, 0x93, 0xed, 0xad, - 0xc9, 0x49, 0x2d, 0xad, 0xaf, 0xd8, 0xea, 0x6d, 0x69, 0xf2, 0x1e, 0xcc, 0xf7, 0x94, 0x7d, 0xa4, - 0x86, 0x60, 0x3c, 0x51, 0x9e, 0xbf, 0x38, 0xdd, 0x78, 0xc2, 0x60, 0x3e, 0x9c, 0xc4, 0xcc, 0xe0, - 0xf5, 0x66, 0xd6, 0xe5, 0x77, 0xd3, 0xe5, 0x59, 0x0f, 0xcb, 0x33, 0x53, 0x20, 0xc2, 0xa6, 0x57, - 0xa1, 0x70, 0x08, 0xa0, 0x30, 0x5f, 0x80, 0x89, 0x4e, 0x85, 0x01, 0x5c, 0x54, 0x0c, 0xdc, 0x35, - 0xe9, 0x0a, 0x78, 0xba, 0x50, 0xba, 0x57, 0x5d, 0x65, 0xbe, 0x13, 0x1d, 0x7b, 0x4f, 0x5e, 0x82, - 0x58, 0xc7, 0xc8, 0xac, 0x35, 0xce, 0x7e, 0x29, 0x66, 0x7e, 0xf8, 0xb5, 0x58, 0xd2, 0x11, 0xdd, - 0xeb, 0xb6, 0xc5, 0x0e, 0x36, 0x98, 0xbd, 0xa5, 0x00, 0x27, 0x3a, 0xb0, 0x34, 0xe2, 0x26, 0x90, - 0xef, 0xc7, 0xc3, 0xf2, 0x7d, 0xe7, 0xd8, 0xce, 0x60, 0xd7, 0x79, 0x20, 0xe4, 0x64, 0x3c, 0x2c, - 0x83, 0x16, 0x3b, 0x50, 0xf8, 0x11, 0x40, 0x3e, 0xc0, 0xd0, 0x17, 0xa9, 0x8e, 0x0d, 0x03, 0x11, - 0x82, 0xb0, 0x19, 0xaf, 0x2f, 0xb8, 0xb9, 0xbe, 0x61, 0xfb, 0x45, 0xa0, 0x63, 0xec, 0x17, 0x60, - 0x37, 0xe5, 0x25, 0x1c, 0x03, 0xb8, 0x9e, 0x4c, 0xfd, 0xff, 0x20, 0xf0, 0x57, 0x59, 0xb8, 0xd4, - 0x24, 0x7a, 0xa3, 0x6b, 0xaa, 0x0e, 0xb1, 0xae, 0x89, 0xe8, 0x60, 0x1b, 0xe3, 0xfd, 0x3b, 0xe4, - 0x54, 0x78, 0x0d, 0xe6, 0x54, 0xcd, 0xc2, 0x04, 0x51, 0x6c, 0xa7, 0xb6, 0x8f, 0x69, 0xa8, 0x2c, - 0x07, 0x6f, 0x6e, 0xba, 0xee, 0xdc, 0x58, 0x31, 0x7c, 0x63, 0x91, 0x72, 0x05, 0x1e, 0x3e, 0x8e, - 0x5b, 0xf7, 0x7b, 0xc5, 0x4f, 0x00, 0x3e, 0x68, 0x12, 0xfd, 0x03, 0x4b, 0x55, 0xa8, 0xb6, 0xad, - 0xd8, 0x8a, 0x41, 0x1c, 0x9e, 0x4a, 0x97, 0xee, 0x61, 0x1b, 0xd1, 0x41, 0x6a, 0x63, 0x98, 0x86, - 0x16, 0x1a, 0x70, 0xd1, 0x72, 0x11, 0xdc, 0xe2, 0xee, 0x55, 0xd7, 0xc4, 0x84, 0x09, 0x23, 0x7a, - 0x87, 0xd5, 0x72, 0x8e, 0xc8, 0x4c, 0x27, 0x2f, 0x5b, 0x96, 0xdd, 0x3a, 0x7d, 0x5c, 0xa7, 0xce, - 0x97, 0x02, 0x75, 0x86, 0xa6, 0xc2, 0x0c, 0x77, 0x61, 0x15, 0x2e, 0xcf, 0x2c, 0xf9, 0xa5, 0x1e, - 0x67, 0xdd, 0x29, 0x11, 0xd2, 0x61, 0xc7, 0xd2, 0x4c, 0xf5, 0xc6, 0x05, 0x3f, 0x86, 0x39, 0x5b, - 0xeb, 0x20, 0x0b, 0x69, 0x26, 0xf5, 0x2e, 0xb4, 0x35, 0x5d, 0x08, 0x38, 0x6d, 0xe1, 0x3f, 0x76, - 0x9a, 0xbc, 0x19, 0x55, 0x70, 0x7d, 0x56, 0x41, 0x29, 0x56, 0x0b, 0x36, 0x5d, 0xa2, 0x1b, 0xbe, - 0x8c, 0xbf, 0x67, 0xdd, 0xd6, 0xb5, 0xe5, 0xd9, 0xd0, 0x7f, 0xfe, 0x5e, 0x6f, 0x25, 0xee, 0x1b, - 0x0b, 0x19, 0x1d, 0x5c, 0xd9, 0xe8, 0xb7, 0x3d, 0x52, 0xee, 0xf2, 0x06, 0xde, 0x9a, 0xff, 0x66, - 0x5f, 0x8c, 0xbb, 0x89, 0xa9, 0x9c, 0x4c, 0x48, 0xa1, 0xe4, 0xb6, 0xd9, 0x04, 0x99, 0x27, 0x37, - 0x52, 0xfd, 0xeb, 0x59, 0xb8, 0xd0, 0x24, 0x7a, 0xe1, 0x4b, 0x00, 0x0b, 0x31, 0xdf, 0x40, 0xd5, - 0xc4, 0x67, 0x18, 0xfb, 0x29, 0xc1, 0xc9, 0xd7, 0xcf, 0xf1, 0xbb, 0xfe, 0x77, 0x00, 0x2e, 0xcf, - 0xfb, 0xf6, 0x78, 0x3d, 0x0d, 0x77, 0x4e, 0x22, 0xf7, 0xe6, 0x0d, 0x13, 0x7d, 0x56, 0x87, 0x00, - 0x3e, 0x4a, 0x1a, 0xb7, 0x6f, 0x5c, 0xf5, 0x80, 0x98, 0x64, 0xae, 0xfe, 0x2f, 0x92, 0x7d, 0x86, - 0x9f, 0x03, 0x98, 0x8f, 0xce, 0xab, 0x4a, 0x1a, 0x74, 0x24, 0x85, 0xdb, 0xbc, 0x76, 0x8a, 0xcf, - 0xc1, 0x86, 0xf7, 0x43, 0xa3, 0xe0, 0xe5, 0x34, 0xa8, 0x60, 0x34, 0xf7, 0xea, 0x75, 0xa2, 0xfd, - 0x33, 0x1d, 0xdb, 0xc6, 0x34, 0xe5, 0x54, 0xdb, 0x46, 0x73, 0xd2, 0x6d, 0x3b, 0xbf, 0xaf, 0xb9, - 0x06, 0x49, 0x6a, 0x6a, 0xa9, 0x06, 0x49, 0x48, 0x4e, 0x37, 0xc8, 0x15, 0xde, 0x39, 0xf7, 0xcc, - 0x67, 0x4e, 0x8b, 0xa9, 0xbd, 0x7f, 0x32, 0xe2, 0xc1, 0xd9, 0x88, 0x07, 0xe7, 0x23, 0x1e, 0xfc, - 0x36, 0xe2, 0xc1, 0xb7, 0x97, 0x7c, 0xe6, 0xfc, 0x92, 0xcf, 0xfc, 0x7c, 0xc9, 0x67, 0x3e, 0xae, - 0x24, 0x36, 0xb0, 0x83, 0xf0, 0xf4, 0x74, 0xfb, 0x59, 0x7b, 0xd1, 0xfd, 0x2f, 0xea, 0x95, 0x7f, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x97, 0xa4, 0x34, 0x89, 0x37, 0x0e, 0x00, 0x00, + proto.RegisterFile("manifest/distribution/v1beta1/tx.proto", fileDescriptor_ea5763498c3dfe16) +} + +var fileDescriptor_ea5763498c3dfe16 = []byte{ + // 949 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x8b, 0xdb, 0x46, + 0x14, 0xf6, 0x78, 0xe9, 0x52, 0x4f, 0x02, 0x89, 0xcd, 0x96, 0xdd, 0x55, 0xb3, 0x72, 0xaa, 0x12, + 0xd7, 0x18, 0x2c, 0x75, 0x37, 0x25, 0x10, 0xb5, 0x85, 0xc6, 0x9b, 0x2c, 0xed, 0xc1, 0x25, 0x78, + 0xe9, 0x0f, 0x7a, 0x59, 0x64, 0x6b, 0x56, 0x3b, 0xd4, 0xd2, 0x08, 0xcd, 0xd8, 0x8e, 0x6f, 0xa5, + 0x10, 0x58, 0x7a, 0xea, 0xad, 0xd0, 0x4b, 0x03, 0x7b, 0x09, 0x3d, 0xf9, 0x90, 0x43, 0xff, 0x84, + 0xdc, 0x1a, 0x72, 0xea, 0xa9, 0x2d, 0x5e, 0x8a, 0x0b, 0xfd, 0x1f, 0x4a, 0x91, 0x34, 0x92, 0x25, + 0x4b, 0xb6, 0x5c, 0x37, 0x74, 0x73, 0x49, 0x76, 0x67, 0xde, 0xf7, 0xe6, 0x7b, 0xdf, 0xbc, 0xf9, + 0x9e, 0x16, 0x56, 0x4c, 0xcd, 0xc2, 0xc7, 0x88, 0x32, 0x45, 0xc7, 0x94, 0x39, 0xb8, 0xdd, 0x63, + 0x98, 0x58, 0x4a, 0x7f, 0xb7, 0x8d, 0x98, 0xb6, 0xab, 0xb0, 0x07, 0xb2, 0xed, 0x10, 0x46, 0x4a, + 0x3b, 0x41, 0x9c, 0x1c, 0x8d, 0x93, 0x79, 0x9c, 0xb0, 0x61, 0x10, 0x83, 0x78, 0x91, 0x8a, 0xfb, + 0x93, 0x0f, 0x12, 0xc4, 0x0e, 0xa1, 0x26, 0xa1, 0x4a, 0x5b, 0xa3, 0x28, 0x4c, 0xd9, 0x21, 0xd8, + 0xe2, 0xfb, 0xdb, 0xfe, 0xfe, 0x91, 0x0f, 0xf4, 0x7f, 0xe1, 0x5b, 0x9b, 0x1c, 0x6a, 0x52, 0x43, + 0xe9, 0xef, 0xba, 0xff, 0xf1, 0x8d, 0xa2, 0x66, 0x62, 0x8b, 0x28, 0xde, 0xbf, 0x7c, 0xe9, 0xed, + 0xc5, 0x35, 0xc4, 0x08, 0x7b, 0x08, 0xe9, 0x2f, 0x00, 0x5f, 0x6b, 0x52, 0xe3, 0x10, 0xb1, 0xcf, + 0x30, 0x3b, 0xd1, 0x1d, 0x6d, 0x70, 0x47, 0xd7, 0x1d, 0x44, 0x69, 0xe9, 0x1e, 0x2c, 0xea, 0xa8, + 0x8b, 0x0c, 0x8d, 0x11, 0xe7, 0x48, 0xf3, 0x17, 0xb7, 0xc0, 0x75, 0x50, 0x2d, 0x34, 0xb6, 0x9e, + 0x3f, 0xa9, 0x6f, 0x70, 0x92, 0x3c, 0xfc, 0x90, 0x39, 0xd8, 0x32, 0x5a, 0x57, 0x43, 0x48, 0x90, + 0x66, 0x1f, 0x5e, 0x1d, 0xf0, 0xcc, 0x61, 0x96, 0x7c, 0x46, 0x96, 0x2b, 0x83, 0x38, 0x17, 0xf5, + 0xe0, 0xf4, 0x51, 0x39, 0xf7, 0xe7, 0xa3, 0x72, 0xee, 0xeb, 0xc9, 0xa8, 0x96, 0xa4, 0xf5, 0xcd, + 0x64, 0x54, 0x7b, 0xd3, 0xcf, 0x54, 0xa7, 0xfa, 0x97, 0x4a, 0x93, 0x1a, 0x4d, 0xa2, 0xe3, 0xe3, + 0xe1, 0x4c, 0x4d, 0x52, 0x19, 0xee, 0xa4, 0x16, 0xdb, 0x42, 0xd4, 0x26, 0x16, 0x45, 0xd2, 0xdf, + 0x00, 0x0a, 0x4d, 0x6a, 0x04, 0xdb, 0x77, 0x83, 0x93, 0x5a, 0x68, 0xa0, 0x39, 0xfa, 0x8b, 0xd2, + 0xe4, 0x63, 0x58, 0xec, 0x6b, 0x5d, 0xac, 0xc7, 0xd2, 0xf8, 0xa2, 0xbc, 0xf1, 0xfc, 0x49, 0x7d, + 0x87, 0xa7, 0xf9, 0x34, 0x88, 0x99, 0xc9, 0xd7, 0x9f, 0x59, 0x57, 0x3f, 0xca, 0x96, 0xa7, 0x12, + 0x97, 0x67, 0xa6, 0x40, 0x4c, 0x2c, 0xbf, 0x42, 0xe9, 0x07, 0x00, 0xa5, 0xf9, 0x02, 0x04, 0x3a, + 0x95, 0x86, 0x70, 0x5d, 0x33, 0x49, 0xcf, 0x62, 0x5b, 0xe0, 0xfa, 0x5a, 0xf5, 0xd2, 0xde, 0xb6, + 0xcc, 0x39, 0xbb, 0x0d, 0x1e, 0xbc, 0x05, 0x79, 0x9f, 0x60, 0xab, 0x71, 0xf0, 0xf4, 0xd7, 0x72, + 0xee, 0xc7, 0xdf, 0xca, 0x55, 0x03, 0xb3, 0x93, 0x5e, 0x5b, 0xee, 0x10, 0x93, 0x37, 0xb8, 0x12, + 0xe1, 0xc4, 0x86, 0x36, 0xa2, 0x1e, 0x80, 0x7e, 0x3f, 0x19, 0xd5, 0x2e, 0xbb, 0xc7, 0x76, 0x86, + 0x47, 0xee, 0x13, 0xa1, 0x8f, 0x27, 0xa3, 0x1a, 0x68, 0xf1, 0x03, 0xa5, 0x9f, 0x00, 0x14, 0x23, + 0x0c, 0x43, 0x91, 0xf6, 0x89, 0x69, 0x62, 0x4a, 0x31, 0xb1, 0xd2, 0xf5, 0x05, 0xab, 0xeb, 0x1b, + 0x6f, 0xbf, 0x44, 0xea, 0x94, 0xf6, 0x8b, 0xb0, 0x9b, 0xf2, 0x92, 0xce, 0x00, 0xac, 0x2c, 0xa6, + 0xfe, 0x32, 0x08, 0xfc, 0x30, 0x0f, 0x37, 0x9a, 0xd4, 0x38, 0xe8, 0x59, 0xba, 0x4b, 0xac, 0x67, + 0x61, 0x36, 0xbc, 0x4f, 0x48, 0xf7, 0x02, 0x39, 0x95, 0x6e, 0xc1, 0x82, 0x8e, 0x6c, 0x42, 0x31, + 0x23, 0x4e, 0xa6, 0x7d, 0x4c, 0x43, 0x55, 0x35, 0x7a, 0x73, 0xd3, 0x75, 0xf7, 0xc6, 0xca, 0xf1, + 0x1b, 0x4b, 0x94, 0x2b, 0x89, 0xf0, 0x5a, 0xda, 0x7a, 0xe8, 0x15, 0x3f, 0x03, 0x78, 0xa5, 0x49, + 0x8d, 0x4f, 0x6c, 0x5d, 0x63, 0xe8, 0xbe, 0xe6, 0x68, 0x26, 0x75, 0x79, 0x6a, 0x3d, 0x76, 0x42, + 0x1c, 0xcc, 0x86, 0x99, 0xc6, 0x30, 0x0d, 0x2d, 0x7d, 0x08, 0xd7, 0x6d, 0x2f, 0x83, 0x57, 0xdc, + 0xa5, 0xbd, 0x1b, 0xf2, 0xc2, 0x29, 0x23, 0xfb, 0xc7, 0x35, 0x0a, 0xae, 0xcc, 0x5c, 0x29, 0x1f, + 0xaf, 0xaa, 0x5e, 0xa5, 0x61, 0x66, 0xb7, 0xd2, 0xb7, 0x22, 0x95, 0xc6, 0xe6, 0xc2, 0x0c, 0x7b, + 0x69, 0x1b, 0x6e, 0xce, 0x2c, 0x85, 0xc5, 0x9e, 0xe5, 0xbd, 0x39, 0x11, 0x53, 0xe2, 0xd0, 0x46, + 0x96, 0xbe, 0x72, 0xc9, 0xd7, 0x60, 0xc1, 0x41, 0x1d, 0x6c, 0x63, 0x64, 0x31, 0xff, 0x4a, 0x5b, + 0xd3, 0x85, 0x48, 0xaf, 0xad, 0xfd, 0xcf, 0xbd, 0xa6, 0xde, 0x4e, 0x2a, 0x58, 0x99, 0x55, 0x50, + 0x49, 0xd5, 0x82, 0xcf, 0x97, 0xe4, 0x46, 0x28, 0xe3, 0x1f, 0x79, 0xcf, 0xbc, 0xee, 0xfa, 0x8d, + 0x18, 0x1a, 0x80, 0xef, 0xae, 0xd4, 0x7b, 0x65, 0xb1, 0x56, 0x07, 0x4b, 0xb7, 0xfa, 0x8b, 0x1e, + 0x2a, 0x17, 0x79, 0x03, 0x1f, 0xcc, 0x7f, 0xb5, 0x37, 0xd2, 0x6e, 0x62, 0x2a, 0x27, 0x17, 0x52, + 0xaa, 0x7a, 0x46, 0xbb, 0x40, 0xe6, 0xe0, 0x46, 0xf6, 0x4e, 0x5f, 0x85, 0x6b, 0x4d, 0x6a, 0x94, + 0x4e, 0x01, 0x2c, 0xa5, 0x7c, 0x05, 0xbd, 0x93, 0xf1, 0x10, 0x53, 0x3f, 0x27, 0x84, 0xf7, 0x56, + 0x41, 0x85, 0xde, 0xff, 0x1d, 0x80, 0x9b, 0xf3, 0xbe, 0x40, 0x6e, 0x67, 0x67, 0x9e, 0x03, 0x15, + 0xee, 0xac, 0x0c, 0x0d, 0x99, 0x9d, 0x01, 0xf8, 0xfa, 0xa2, 0xc1, 0xfb, 0xfe, 0xf2, 0x47, 0xa4, + 0xc0, 0x85, 0x7b, 0xff, 0x09, 0x1e, 0xb2, 0x7c, 0x08, 0x60, 0x31, 0x39, 0xbd, 0x6e, 0x66, 0x27, + 0x4f, 0x80, 0x84, 0x77, 0x57, 0x00, 0x85, 0x3c, 0xfa, 0xf0, 0x72, 0x6c, 0x38, 0xc8, 0xd9, 0xc9, + 0xa2, 0xf1, 0xc2, 0xad, 0x7f, 0x17, 0x1f, 0x9e, 0xeb, 0xb6, 0x72, 0x8a, 0x51, 0x2f, 0xd1, 0xca, + 0x49, 0xd4, 0x32, 0xad, 0x3c, 0xdf, 0xef, 0xbc, 0x86, 0x59, 0x64, 0x76, 0x4b, 0x34, 0xcc, 0x02, + 0xf8, 0x32, 0x0d, 0xb3, 0x84, 0x07, 0x08, 0xaf, 0x7c, 0xe5, 0xda, 0x4f, 0xe3, 0xf3, 0xc7, 0x63, + 0x11, 0x3c, 0x1d, 0x8b, 0xe0, 0xd9, 0x58, 0x04, 0xbf, 0x8f, 0x45, 0xf0, 0xed, 0xb9, 0x98, 0x7b, + 0x76, 0x2e, 0xe6, 0x7e, 0x39, 0x17, 0x73, 0x5f, 0xa8, 0x11, 0x73, 0xeb, 0xe2, 0x63, 0x86, 0x74, + 0x6c, 0x61, 0xa6, 0x04, 0x04, 0xea, 0x5d, 0xa4, 0x1b, 0xc8, 0x51, 0x1e, 0xc4, 0x47, 0xac, 0x67, + 0x7a, 0xed, 0x75, 0xef, 0x8f, 0xad, 0x9b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xdb, 0x40, + 0x19, 0x64, 0x0e, 0x00, 0x00, } func (this *MsgSetWithdrawAddressResponse) Equal(that interface{}) bool { @@ -1015,7 +1017,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error) { out := new(MsgSetWithdrawAddressResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/SetWithdrawAddress", in, out, opts...) if err != nil { return nil, err } @@ -1024,7 +1026,7 @@ func (c *msgClient) SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAd func (c *msgClient) WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error) { out := new(MsgWithdrawDelegatorRewardResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/WithdrawDelegatorReward", in, out, opts...) if err != nil { return nil, err } @@ -1033,7 +1035,7 @@ func (c *msgClient) WithdrawDelegatorReward(ctx context.Context, in *MsgWithdraw func (c *msgClient) WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) { out := new(MsgWithdrawValidatorCommissionResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/WithdrawValidatorCommission", in, out, opts...) if err != nil { return nil, err } @@ -1042,7 +1044,7 @@ func (c *msgClient) WithdrawValidatorCommission(ctx context.Context, in *MsgWith func (c *msgClient) FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error) { out := new(MsgFundCommunityPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/FundCommunityPool", in, out, opts...) if err != nil { return nil, err } @@ -1051,7 +1053,7 @@ func (c *msgClient) FundCommunityPool(ctx context.Context, in *MsgFundCommunityP func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/UpdateParams", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } @@ -1060,7 +1062,7 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPoolSpend, opts ...grpc.CallOption) (*MsgCommunityPoolSpendResponse, error) { out := new(MsgCommunityPoolSpendResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/CommunityPoolSpend", in, out, opts...) if err != nil { return nil, err } @@ -1069,7 +1071,7 @@ func (c *msgClient) CommunityPoolSpend(ctx context.Context, in *MsgCommunityPool func (c *msgClient) DepositValidatorRewardsPool(ctx context.Context, in *MsgDepositValidatorRewardsPool, opts ...grpc.CallOption) (*MsgDepositValidatorRewardsPoolResponse, error) { out := new(MsgDepositValidatorRewardsPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.distribution.v1beta1.Msg/DepositValidatorRewardsPool", in, out, opts...) if err != nil { return nil, err } @@ -1149,7 +1151,7 @@ func _Msg_SetWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress", + FullMethod: "/manifest.distribution.v1beta1.Msg/SetWithdrawAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SetWithdrawAddress(ctx, req.(*MsgSetWithdrawAddress)) @@ -1167,7 +1169,7 @@ func _Msg_WithdrawDelegatorReward_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward", + FullMethod: "/manifest.distribution.v1beta1.Msg/WithdrawDelegatorReward", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).WithdrawDelegatorReward(ctx, req.(*MsgWithdrawDelegatorReward)) @@ -1185,7 +1187,7 @@ func _Msg_WithdrawValidatorCommission_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission", + FullMethod: "/manifest.distribution.v1beta1.Msg/WithdrawValidatorCommission", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).WithdrawValidatorCommission(ctx, req.(*MsgWithdrawValidatorCommission)) @@ -1203,7 +1205,7 @@ func _Msg_FundCommunityPool_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/FundCommunityPool", + FullMethod: "/manifest.distribution.v1beta1.Msg/FundCommunityPool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).FundCommunityPool(ctx, req.(*MsgFundCommunityPool)) @@ -1221,7 +1223,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/UpdateParams", + FullMethod: "/manifest.distribution.v1beta1.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) @@ -1239,7 +1241,7 @@ func _Msg_CommunityPoolSpend_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/CommunityPoolSpend", + FullMethod: "/manifest.distribution.v1beta1.Msg/CommunityPoolSpend", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CommunityPoolSpend(ctx, req.(*MsgCommunityPoolSpend)) @@ -1257,7 +1259,7 @@ func _Msg_DepositValidatorRewardsPool_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool", + FullMethod: "/manifest.distribution.v1beta1.Msg/DepositValidatorRewardsPool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).DepositValidatorRewardsPool(ctx, req.(*MsgDepositValidatorRewardsPool)) @@ -1266,7 +1268,7 @@ func _Msg_DepositValidatorRewardsPool_Handler(srv interface{}, ctx context.Conte } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.distribution.v1beta1.Msg", + ServiceName: "manifest.distribution.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1299,7 +1301,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/distribution/v1beta1/tx.proto", + Metadata: "manifest/distribution/v1beta1/tx.proto", } func (m *MsgSetWithdrawAddress) Marshal() (dAtA []byte, err error) { diff --git a/x/manifest/types/genesis.pb.go b/x/manifest/types/genesis.pb.go index 8d0e75c..ee71a58 100644 --- a/x/manifest/types/genesis.pb.go +++ b/x/manifest/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: manifest/v1/genesis.proto +// source: manifest/manifest/v1/genesis.proto package types @@ -34,7 +34,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_039781d4f82022f2, []int{0} + return fileDescriptor_970f7d3fb6cac8e1, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ type Params struct { func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_039781d4f82022f2, []int{1} + return fileDescriptor_970f7d3fb6cac8e1, []int{1} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -126,7 +126,7 @@ func (m *StakeHolders) Reset() { *m = StakeHolders{} } func (m *StakeHolders) String() string { return proto.CompactTextString(m) } func (*StakeHolders) ProtoMessage() {} func (*StakeHolders) Descriptor() ([]byte, []int) { - return fileDescriptor_039781d4f82022f2, []int{2} + return fileDescriptor_970f7d3fb6cac8e1, []int{2} } func (m *StakeHolders) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,35 +170,37 @@ func (m *StakeHolders) GetPercentage() int32 { } func init() { - proto.RegisterType((*GenesisState)(nil), "manifest.v1.GenesisState") - proto.RegisterType((*Params)(nil), "manifest.v1.Params") - proto.RegisterType((*StakeHolders)(nil), "manifest.v1.StakeHolders") -} - -func init() { proto.RegisterFile("manifest/v1/genesis.proto", fileDescriptor_039781d4f82022f2) } - -var fileDescriptor_039781d4f82022f2 = []byte{ - // 315 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x4d, 0xcc, 0xcb, - 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x49, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, - 0xa7, 0xe7, 0x83, 0xc5, 0xf5, 0x41, 0x2c, 0x88, 0x12, 0x29, 0xc1, 0xc4, 0xdc, 0xcc, 0xbc, 0x7c, - 0x7d, 0x30, 0x09, 0x11, 0x52, 0x72, 0xe4, 0xe2, 0x71, 0x87, 0x18, 0x13, 0x5c, 0x92, 0x58, 0x92, - 0x2a, 0x64, 0xc8, 0xc5, 0x56, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, - 0x6d, 0x24, 0xac, 0x87, 0x64, 0xac, 0x5e, 0x00, 0x58, 0xca, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, - 0x20, 0xa8, 0x42, 0xa5, 0x34, 0x2e, 0x36, 0x88, 0xb8, 0x90, 0x1d, 0x17, 0x6f, 0x71, 0x49, 0x62, - 0x76, 0x6a, 0x7c, 0x46, 0x7e, 0x4e, 0x4a, 0x6a, 0x11, 0xc8, 0x0c, 0x66, 0x0d, 0x6e, 0x23, 0x49, - 0x14, 0x33, 0x82, 0x41, 0x2a, 0x3c, 0x20, 0x0a, 0x82, 0x78, 0x8a, 0x91, 0x78, 0x56, 0x32, 0x33, - 0x16, 0xc8, 0x33, 0xbc, 0x58, 0x20, 0xcf, 0xd8, 0xf5, 0x7c, 0x83, 0x16, 0x3f, 0xdc, 0xab, 0x50, - 0x7b, 0xfc, 0xb8, 0x78, 0x90, 0xf5, 0x0a, 0x49, 0x70, 0xb1, 0x27, 0xa6, 0xa4, 0x14, 0xa5, 0x16, - 0x43, 0xdc, 0xca, 0x19, 0x04, 0xe3, 0x0a, 0xc9, 0x71, 0x71, 0x15, 0xa4, 0x16, 0x25, 0xa7, 0xe6, - 0x95, 0x24, 0xa6, 0xa7, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0xb0, 0x06, 0x21, 0x89, 0x58, 0xb1, 0x80, - 0xec, 0x70, 0x0a, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, - 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xb3, 0xf4, - 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x9c, 0xcc, 0xb4, 0x92, 0xd4, 0x94, - 0xcc, 0xbc, 0xcc, 0x12, 0x7d, 0x98, 0x83, 0x74, 0x73, 0x52, 0x53, 0xd2, 0x53, 0x8b, 0xf4, 0x2b, - 0xe0, 0x22, 0xfa, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0x30, 0x35, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x9f, 0x78, 0x64, 0xae, 0xa6, 0x01, 0x00, 0x00, + proto.RegisterType((*GenesisState)(nil), "manifest.manifest.v1.GenesisState") + proto.RegisterType((*Params)(nil), "manifest.manifest.v1.Params") + proto.RegisterType((*StakeHolders)(nil), "manifest.manifest.v1.StakeHolders") +} + +func init() { + proto.RegisterFile("manifest/manifest/v1/genesis.proto", fileDescriptor_970f7d3fb6cac8e1) +} + +var fileDescriptor_970f7d3fb6cac8e1 = []byte{ + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x4d, 0xcc, 0xcb, + 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x87, 0x33, 0xca, 0x0c, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, 0x33, + 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0x60, 0x52, 0x7a, 0x70, 0x46, 0x99, 0xa1, + 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x81, 0x3e, 0x88, 0x05, 0x51, 0x2b, 0x25, 0x98, 0x98, + 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x5e, 0x5c, 0x3c, 0xee, 0x10, 0xf3, 0x82, + 0x4b, 0x12, 0x4b, 0x52, 0x85, 0xac, 0xb8, 0xd8, 0x0a, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0x25, 0x18, + 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x64, 0xf4, 0xb0, 0x99, 0xaf, 0x17, 0x00, 0x56, 0xe3, 0xc4, 0x72, + 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x54, 0x87, 0x52, 0x3e, 0x17, 0x1b, 0x44, 0x5c, 0xc8, 0x9d, 0x8b, + 0xb7, 0xb8, 0x24, 0x31, 0x3b, 0x35, 0x3e, 0x23, 0x3f, 0x27, 0x25, 0xb5, 0x08, 0x64, 0x18, 0xb3, + 0x06, 0xb7, 0x91, 0x12, 0x76, 0xc3, 0x82, 0x41, 0x4a, 0x3d, 0x20, 0x2a, 0x83, 0x78, 0x8a, 0x91, + 0x78, 0x56, 0x32, 0x33, 0x16, 0xc8, 0x33, 0xbc, 0x58, 0x20, 0xcf, 0xd8, 0xf5, 0x7c, 0x83, 0x16, + 0x3f, 0x3c, 0x14, 0xa0, 0x16, 0xfa, 0x71, 0xf1, 0x20, 0xeb, 0x15, 0x92, 0xe0, 0x62, 0x4f, 0x4c, + 0x49, 0x29, 0x4a, 0x2d, 0x86, 0xb8, 0x9e, 0x33, 0x08, 0xc6, 0x15, 0x92, 0xe3, 0xe2, 0x2a, 0x48, + 0x2d, 0x4a, 0x4e, 0xcd, 0x2b, 0x49, 0x4c, 0x4f, 0x95, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0d, 0x42, + 0x12, 0xb1, 0x62, 0x01, 0xd9, 0xe1, 0x14, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, + 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, + 0x0c, 0x51, 0x66, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x39, 0x99, + 0x69, 0x25, 0xa9, 0x29, 0x99, 0x79, 0x99, 0x88, 0x68, 0xd1, 0xcd, 0x49, 0x4d, 0x49, 0x4f, 0x2d, + 0xd2, 0xaf, 0x40, 0x44, 0x54, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x94, 0x8d, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xf4, 0x50, 0x4f, 0xca, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/manifest/types/query.pb.go b/x/manifest/types/query.pb.go index 6ebcbe6..384be66 100644 --- a/x/manifest/types/query.pb.go +++ b/x/manifest/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: manifest/v1/query.proto +// source: manifest/manifest/v1/query.proto package types @@ -36,7 +36,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_faf9b165de0b720f, []int{0} + return fileDescriptor_90610ab6113215e1, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_faf9b165de0b720f, []int{1} + return fileDescriptor_90610ab6113215e1, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -112,31 +112,31 @@ func (m *QueryParamsResponse) GetParams() *Params { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "manifest.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "manifest.v1.QueryParamsResponse") -} - -func init() { proto.RegisterFile("manifest/v1/query.proto", fileDescriptor_faf9b165de0b720f) } - -var fileDescriptor_faf9b165de0b720f = []byte{ - // 264 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x4d, 0xcc, 0xcb, - 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x49, 0xe8, 0x95, 0x19, 0x4a, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, - 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, - 0xe7, 0x15, 0x43, 0x94, 0x4a, 0x49, 0x22, 0x9b, 0x91, 0x9e, 0x9a, 0x97, 0x5a, 0x9c, 0x09, 0x95, - 0x52, 0x12, 0xe1, 0x12, 0x0a, 0x04, 0x19, 0x1a, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x1c, 0x94, 0x5a, - 0x58, 0x9a, 0x5a, 0x5c, 0xa2, 0xe4, 0xc4, 0x25, 0x8c, 0x22, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, - 0x2a, 0xa4, 0xcd, 0xc5, 0x56, 0x00, 0x16, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd6, - 0x43, 0x72, 0x83, 0x1e, 0x54, 0x31, 0x54, 0x89, 0x51, 0x21, 0x17, 0x2b, 0xd8, 0x0c, 0xa1, 0x0c, - 0x2e, 0x36, 0x88, 0x94, 0x90, 0x3c, 0x8a, 0x7a, 0x4c, 0x7b, 0xa5, 0x14, 0x70, 0x2b, 0x80, 0x38, - 0x41, 0x49, 0xba, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0xa2, 0x42, 0xc2, 0xfa, 0xc8, 0x7e, 0x82, 0x58, - 0xe9, 0x14, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, - 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x66, 0xe9, 0x99, - 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x39, 0x99, 0x69, 0x25, 0xa9, 0x29, 0x99, - 0x79, 0x99, 0x25, 0x70, 0x33, 0x74, 0x73, 0x52, 0x53, 0xd2, 0x53, 0x8b, 0xf4, 0x2b, 0x10, 0xa6, - 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x43, 0xc9, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, - 0xb0, 0x93, 0xfb, 0xea, 0x86, 0x01, 0x00, 0x00, + proto.RegisterType((*QueryParamsRequest)(nil), "manifest.manifest.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "manifest.manifest.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("manifest/manifest/v1/query.proto", fileDescriptor_90610ab6113215e1) } + +var fileDescriptor_90610ab6113215e1 = []byte{ + // 268 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc8, 0x4d, 0xcc, 0xcb, + 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x87, 0x33, 0xca, 0x0c, 0xf5, 0x0b, 0x4b, 0x53, 0x8b, 0x2a, 0xf5, + 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0x60, 0x12, 0x7a, 0x70, 0x46, 0x99, 0xa1, 0x94, 0x4c, + 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x7e, 0x62, 0x41, 0xa6, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, + 0x62, 0x49, 0x66, 0x7e, 0x5e, 0x31, 0x44, 0x8f, 0x94, 0x12, 0x56, 0x53, 0xd3, 0x53, 0xf3, 0x52, + 0x8b, 0x33, 0xa1, 0x6a, 0x94, 0x44, 0xb8, 0x84, 0x02, 0x41, 0xd6, 0x04, 0x24, 0x16, 0x25, 0xe6, + 0x16, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x28, 0x79, 0x73, 0x09, 0xa3, 0x88, 0x16, 0x17, + 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0x99, 0x70, 0xb1, 0x15, 0x80, 0x45, 0x24, 0x18, 0x15, 0x18, 0x35, + 0xb8, 0x8d, 0x64, 0xf4, 0xb0, 0xb9, 0x4a, 0x0f, 0xaa, 0x0b, 0xaa, 0xd6, 0xa8, 0x99, 0x91, 0x8b, + 0x15, 0x6c, 0x9a, 0x50, 0x15, 0x17, 0x1b, 0x44, 0x4e, 0x48, 0x03, 0xbb, 0x4e, 0x4c, 0xa7, 0x48, + 0x69, 0x12, 0xa1, 0x12, 0xe2, 0x3c, 0x25, 0xe9, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0x89, 0x0a, 0x09, + 0xa3, 0xf8, 0x17, 0xe2, 0x0a, 0xa7, 0x80, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, + 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, + 0x88, 0x32, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xc9, 0x4c, + 0x2b, 0x49, 0x4d, 0xc9, 0xcc, 0xcb, 0x44, 0x84, 0x99, 0x6e, 0x4e, 0x6a, 0x4a, 0x7a, 0x6a, 0x91, + 0x7e, 0x05, 0xc2, 0xd4, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0x08, 0x1a, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x65, 0xe6, 0xfc, 0xa1, 0xbd, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -165,7 +165,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/manifest.v1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.manifest.v1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -200,7 +200,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/manifest.v1.Query/Params", + FullMethod: "/manifest.manifest.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -209,7 +209,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "manifest.v1.Query", + ServiceName: "manifest.manifest.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -218,7 +218,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "manifest/v1/query.proto", + Metadata: "manifest/manifest/v1/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/manifest/types/query.pb.gw.go b/x/manifest/types/query.pb.gw.go index f9ca226..4b2c33f 100644 --- a/x/manifest/types/query.pb.gw.go +++ b/x/manifest/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: manifest/v1/query.proto +// source: manifest/manifest/v1/query.proto /* Package types is a reverse proxy. diff --git a/x/manifest/types/tx.pb.go b/x/manifest/types/tx.pb.go index 76594eb..3f5494b 100644 --- a/x/manifest/types/tx.pb.go +++ b/x/manifest/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: manifest/v1/tx.proto +// source: manifest/manifest/v1/tx.proto package types @@ -48,7 +48,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_7e3feee7606c5280, []int{0} + return fileDescriptor_2f4496f9d4502444, []int{0} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7e3feee7606c5280, []int{1} + return fileDescriptor_2f4496f9d4502444, []int{1} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -141,7 +141,7 @@ func (m *MsgPayoutStakeholders) Reset() { *m = MsgPayoutStakeholders{} } func (m *MsgPayoutStakeholders) String() string { return proto.CompactTextString(m) } func (*MsgPayoutStakeholders) ProtoMessage() {} func (*MsgPayoutStakeholders) Descriptor() ([]byte, []int) { - return fileDescriptor_7e3feee7606c5280, []int{2} + return fileDescriptor_2f4496f9d4502444, []int{2} } func (m *MsgPayoutStakeholders) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ func (m *MsgPayoutStakeholdersResponse) Reset() { *m = MsgPayoutStakehol func (m *MsgPayoutStakeholdersResponse) String() string { return proto.CompactTextString(m) } func (*MsgPayoutStakeholdersResponse) ProtoMessage() {} func (*MsgPayoutStakeholdersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7e3feee7606c5280, []int{3} + return fileDescriptor_2f4496f9d4502444, []int{3} } func (m *MsgPayoutStakeholdersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -221,47 +221,47 @@ func (m *MsgPayoutStakeholdersResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPayoutStakeholdersResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgUpdateParams)(nil), "manifest.v1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "manifest.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgPayoutStakeholders)(nil), "manifest.v1.MsgPayoutStakeholders") - proto.RegisterType((*MsgPayoutStakeholdersResponse)(nil), "manifest.v1.MsgPayoutStakeholdersResponse") -} - -func init() { proto.RegisterFile("manifest/v1/tx.proto", fileDescriptor_7e3feee7606c5280) } - -var fileDescriptor_7e3feee7606c5280 = []byte{ - // 485 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xf6, 0xf1, 0x51, 0xa9, 0xd7, 0x0a, 0x84, 0x09, 0x6a, 0x62, 0x81, 0x53, 0x45, 0x0c, 0x95, - 0xa5, 0xde, 0xc9, 0x45, 0xea, 0xd0, 0x8d, 0xb0, 0xb0, 0x44, 0x8a, 0x5c, 0xb1, 0xb0, 0x54, 0x97, - 0xf8, 0x7a, 0x39, 0x35, 0xf6, 0x59, 0x7e, 0x2f, 0x51, 0x23, 0x16, 0xc4, 0xcc, 0xc0, 0xcc, 0xc4, - 0x88, 0x98, 0x32, 0xf0, 0x1b, 0x50, 0xc7, 0x8a, 0x89, 0x09, 0xaa, 0x64, 0x08, 0x3f, 0x03, 0x9d, - 0x7d, 0xa6, 0x6d, 0x88, 0x40, 0x62, 0x89, 0x2e, 0xef, 0xfb, 0x7c, 0xdd, 0x73, 0xc6, 0xb5, 0x84, - 0xa5, 0xf2, 0x98, 0x83, 0xa6, 0xe3, 0x90, 0xea, 0x53, 0x92, 0xe5, 0x4a, 0x2b, 0x77, 0xa3, 0x9a, - 0x92, 0x71, 0xe8, 0x6d, 0xf5, 0x15, 0x24, 0x0a, 0x68, 0x02, 0xc2, 0x80, 0x12, 0x10, 0x25, 0xca, - 0x6b, 0x5c, 0xe5, 0x0a, 0x9e, 0x72, 0x90, 0x60, 0x57, 0x35, 0xa1, 0x84, 0x2a, 0x8e, 0xd4, 0x9c, - 0x2a, 0x42, 0xa9, 0x74, 0x54, 0x2e, 0xca, 0x3f, 0x76, 0xe5, 0x5b, 0x93, 0x1e, 0x03, 0x4e, 0xc7, - 0x61, 0x8f, 0x6b, 0x16, 0xd2, 0xbe, 0x92, 0xa9, 0xdd, 0xdf, 0x63, 0x89, 0x4c, 0x15, 0x2d, 0x7e, - 0xcb, 0x51, 0xeb, 0x2d, 0xc2, 0x77, 0x3b, 0x20, 0x5e, 0x64, 0x31, 0xd3, 0xbc, 0xcb, 0x72, 0x96, - 0x80, 0xbb, 0x8f, 0xd7, 0xd9, 0x48, 0x0f, 0x54, 0x2e, 0xf5, 0xa4, 0x8e, 0xb6, 0xd1, 0xce, 0x7a, - 0xbb, 0xfe, 0xf5, 0xf3, 0x6e, 0xcd, 0x7a, 0x3d, 0x8d, 0xe3, 0x9c, 0x03, 0x1c, 0xea, 0x5c, 0xa6, - 0x22, 0xba, 0x84, 0xba, 0x21, 0x5e, 0xcb, 0x0a, 0x85, 0xfa, 0x8d, 0x6d, 0xb4, 0xb3, 0xb1, 0x77, - 0x9f, 0x5c, 0x69, 0x80, 0x94, 0xe2, 0xed, 0x5b, 0x67, 0xdf, 0x9b, 0x4e, 0x64, 0x81, 0x07, 0x77, - 0xde, 0x2c, 0xa6, 0xc1, 0xa5, 0x44, 0xab, 0x81, 0xb7, 0x96, 0xd2, 0x44, 0x1c, 0x32, 0x95, 0x02, - 0x6f, 0x5d, 0x20, 0xfc, 0xa0, 0x03, 0xa2, 0xcb, 0x26, 0x6a, 0xa4, 0x0f, 0x35, 0x3b, 0xe1, 0x03, - 0x35, 0x8c, 0x79, 0xfe, 0xff, 0x79, 0x5f, 0x99, 0xbc, 0x46, 0xcd, 0xe6, 0x6d, 0x10, 0xcb, 0x30, - 0xfd, 0x11, 0xdb, 0x1f, 0x79, 0xa6, 0x64, 0xda, 0x7e, 0x6e, 0x52, 0x7f, 0xfa, 0xd1, 0x0c, 0x4a, - 0x04, 0xc4, 0x27, 0x44, 0x2a, 0xca, 0x32, 0x49, 0x57, 0x54, 0x5e, 0x50, 0xe0, 0xfd, 0x62, 0x1a, - 0x6c, 0x0e, 0xb9, 0x60, 0xfd, 0xc9, 0x91, 0x79, 0x03, 0xf8, 0xb8, 0x98, 0x06, 0x28, 0xb2, 0x96, - 0x07, 0xee, 0xcf, 0x0f, 0x4d, 0x67, 0xe9, 0xf6, 0x4d, 0xfc, 0x68, 0xe5, 0x0d, 0xab, 0x0e, 0xf6, - 0xbe, 0x20, 0x7c, 0xb3, 0x03, 0xc2, 0x8d, 0xf0, 0xe6, 0xb5, 0x17, 0x7b, 0x78, 0xad, 0xe9, 0xa5, - 0x06, 0xbd, 0xc7, 0x7f, 0xdb, 0x56, 0xda, 0x6e, 0x8c, 0xdd, 0x15, 0xdd, 0xb6, 0x96, 0xb9, 0x7f, - 0x62, 0xbc, 0xe0, 0xdf, 0x98, 0xca, 0xc5, 0xbb, 0xfd, 0xda, 0xb4, 0xd0, 0xee, 0x9e, 0xcd, 0x7c, - 0x74, 0x3e, 0xf3, 0xd1, 0xc5, 0xcc, 0x47, 0xef, 0xe6, 0xbe, 0x73, 0x3e, 0xf7, 0x9d, 0x6f, 0x73, - 0xdf, 0x79, 0xb9, 0x2f, 0xa4, 0x1e, 0x8c, 0x7a, 0xa4, 0xaf, 0x12, 0x3a, 0x94, 0xc7, 0x9a, 0xc7, - 0x32, 0x95, 0x9a, 0x56, 0x0e, 0xbb, 0x43, 0x1e, 0x0b, 0x9e, 0xd3, 0xd3, 0xdf, 0x13, 0xaa, 0x27, - 0x19, 0x87, 0xde, 0x5a, 0xf1, 0x3d, 0x3f, 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x16, 0x90, - 0x1e, 0x8c, 0x03, 0x00, 0x00, + proto.RegisterType((*MsgUpdateParams)(nil), "manifest.manifest.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "manifest.manifest.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgPayoutStakeholders)(nil), "manifest.manifest.v1.MsgPayoutStakeholders") + proto.RegisterType((*MsgPayoutStakeholdersResponse)(nil), "manifest.manifest.v1.MsgPayoutStakeholdersResponse") +} + +func init() { proto.RegisterFile("manifest/manifest/v1/tx.proto", fileDescriptor_2f4496f9d4502444) } + +var fileDescriptor_2f4496f9d4502444 = []byte{ + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xbf, 0x8b, 0x13, 0x41, + 0x14, 0xde, 0xf1, 0xc7, 0xc1, 0x8d, 0x87, 0xe2, 0x12, 0xb9, 0x64, 0xf1, 0x36, 0x47, 0x40, 0x38, + 0x22, 0x99, 0x21, 0x77, 0x70, 0x45, 0x3a, 0x63, 0x63, 0x13, 0x08, 0x39, 0x6c, 0x6c, 0x8e, 0x49, + 0x76, 0x6e, 0x32, 0x5c, 0x76, 0x67, 0xd9, 0x37, 0x09, 0x17, 0x6c, 0xc4, 0xbf, 0xc0, 0xc6, 0xc6, + 0xca, 0x52, 0xac, 0x52, 0xf8, 0x47, 0x5c, 0x79, 0x58, 0x59, 0xe9, 0x91, 0x14, 0x11, 0xff, 0x0a, + 0x99, 0xdd, 0x49, 0x16, 0xe3, 0x0a, 0x6a, 0x13, 0x5e, 0xde, 0xfb, 0xde, 0xf7, 0x7d, 0xf3, 0xcd, + 0x0e, 0xde, 0x0b, 0x59, 0x24, 0xcf, 0x38, 0x68, 0xba, 0x2e, 0x26, 0x4d, 0xaa, 0x2f, 0x48, 0x9c, + 0x28, 0xad, 0xdc, 0xd2, 0xaa, 0x4b, 0xd6, 0xc5, 0xa4, 0xe9, 0xed, 0x0e, 0x14, 0x84, 0x0a, 0x68, + 0x08, 0xc2, 0xa0, 0x43, 0x10, 0x19, 0xdc, 0xab, 0x15, 0xb2, 0x09, 0x1e, 0x71, 0x90, 0x60, 0x31, + 0x25, 0xa1, 0x84, 0x4a, 0x4b, 0x6a, 0x2a, 0xdb, 0xad, 0x64, 0x94, 0xa7, 0xd9, 0x20, 0xfb, 0x63, + 0x47, 0xbe, 0x55, 0xeb, 0x33, 0xe0, 0x74, 0xd2, 0xec, 0x73, 0xcd, 0x9a, 0x74, 0xa0, 0x64, 0x64, + 0xe7, 0xf7, 0x59, 0x28, 0x23, 0x45, 0xd3, 0xdf, 0xac, 0x55, 0x7b, 0x8b, 0xf0, 0xbd, 0x0e, 0x88, + 0xe7, 0x71, 0xc0, 0x34, 0xef, 0xb2, 0x84, 0x85, 0xe0, 0x1e, 0xe3, 0x6d, 0x36, 0xd6, 0x43, 0x95, + 0x48, 0x3d, 0x2d, 0xa3, 0x7d, 0x74, 0xb0, 0xdd, 0x2e, 0x7f, 0xfe, 0xd4, 0x28, 0x59, 0xad, 0x27, + 0x41, 0x90, 0x70, 0x80, 0x13, 0x9d, 0xc8, 0x48, 0xf4, 0x72, 0xa8, 0xdb, 0xc2, 0x5b, 0x71, 0xca, + 0x50, 0xbe, 0xb1, 0x8f, 0x0e, 0xee, 0x1c, 0x3e, 0x24, 0x45, 0x99, 0x90, 0x4c, 0xa5, 0x7d, 0xeb, + 0xf2, 0x6b, 0xd5, 0xe9, 0xd9, 0x8d, 0xd6, 0xdd, 0xd7, 0xcb, 0x59, 0x3d, 0xe7, 0xaa, 0x55, 0xf0, + 0xee, 0x86, 0xad, 0x1e, 0x87, 0x58, 0x45, 0xc0, 0x6b, 0xd7, 0x08, 0x3f, 0xe8, 0x80, 0xe8, 0xb2, + 0xa9, 0x1a, 0xeb, 0x13, 0xcd, 0xce, 0xf9, 0x50, 0x8d, 0x02, 0x9e, 0xfc, 0xbf, 0xf1, 0x97, 0xc6, + 0xb8, 0x61, 0xb3, 0xc6, 0x2b, 0xc4, 0x6e, 0x98, 0x20, 0x89, 0x0d, 0x92, 0x3c, 0x55, 0x32, 0x6a, + 0x3f, 0x33, 0xae, 0x3f, 0x7e, 0xab, 0xd6, 0x33, 0x04, 0x04, 0xe7, 0x44, 0x2a, 0xca, 0x62, 0x49, + 0x0b, 0xb2, 0x4f, 0x57, 0xe0, 0xdd, 0x72, 0x56, 0xdf, 0x19, 0x71, 0xc1, 0x06, 0xd3, 0x53, 0x73, + 0x19, 0xf0, 0x61, 0x39, 0xab, 0xa3, 0x9e, 0x95, 0x6c, 0xb9, 0xdf, 0xdf, 0x57, 0x9d, 0x8d, 0xd3, + 0x57, 0xf1, 0x5e, 0xe1, 0x09, 0x57, 0x19, 0x1c, 0xfe, 0x40, 0xf8, 0x66, 0x07, 0x84, 0x1b, 0xe0, + 0x9d, 0x5f, 0xae, 0xee, 0x51, 0x71, 0xe4, 0x1b, 0x51, 0x7a, 0x8d, 0xbf, 0x82, 0xad, 0xd4, 0xdc, + 0x09, 0x76, 0x0b, 0xd2, 0x7e, 0xfc, 0x47, 0x92, 0xdf, 0xc1, 0xde, 0xd1, 0x3f, 0x80, 0x57, 0xba, + 0xde, 0xed, 0x57, 0x26, 0xa9, 0x76, 0xf7, 0x72, 0xee, 0xa3, 0xab, 0xb9, 0x8f, 0xae, 0xe7, 0x3e, + 0x7a, 0xb3, 0xf0, 0x9d, 0xab, 0x85, 0xef, 0x7c, 0x59, 0xf8, 0xce, 0x8b, 0x63, 0x21, 0xf5, 0x70, + 0xdc, 0x27, 0x03, 0x15, 0xd2, 0x91, 0x3c, 0xd3, 0x3c, 0x90, 0x91, 0xcc, 0x9f, 0x54, 0x63, 0xc4, + 0x03, 0xc1, 0x13, 0x7a, 0x91, 0x3f, 0x32, 0x3d, 0x8d, 0x39, 0xf4, 0xb7, 0xd2, 0x8f, 0xff, 0xe8, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x1c, 0xe5, 0xd9, 0xd4, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -293,7 +293,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/manifest.v1.Msg/UpdateParams", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.manifest.v1.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } @@ -302,7 +302,7 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts func (c *msgClient) PayoutStakeholders(ctx context.Context, in *MsgPayoutStakeholders, opts ...grpc.CallOption) (*MsgPayoutStakeholdersResponse, error) { out := new(MsgPayoutStakeholdersResponse) - err := c.cc.Invoke(ctx, "/manifest.v1.Msg/PayoutStakeholders", in, out, opts...) + err := c.cc.Invoke(ctx, "/manifest.manifest.v1.Msg/PayoutStakeholders", in, out, opts...) if err != nil { return nil, err } @@ -343,7 +343,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/manifest.v1.Msg/UpdateParams", + FullMethod: "/manifest.manifest.v1.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) @@ -361,7 +361,7 @@ func _Msg_PayoutStakeholders_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/manifest.v1.Msg/PayoutStakeholders", + FullMethod: "/manifest.manifest.v1.Msg/PayoutStakeholders", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).PayoutStakeholders(ctx, req.(*MsgPayoutStakeholders)) @@ -370,7 +370,7 @@ func _Msg_PayoutStakeholders_Handler(srv interface{}, ctx context.Context, dec f } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "manifest.v1.Msg", + ServiceName: "manifest.manifest.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -383,7 +383,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "manifest/v1/tx.proto", + Metadata: "manifest/manifest/v1/tx.proto", } func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { From 0891583d0b6c5a56fde3716554494f6e004a846b Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 21 Feb 2024 17:57:09 -0600 Subject: [PATCH 4/5] mod tidy --- go.mod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9d03b0c..37bf1cb 100644 --- a/go.mod +++ b/go.mod @@ -111,7 +111,6 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -128,7 +127,6 @@ require ( github.com/hashicorp/go-getter v1.7.3 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.2 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -201,13 +199,15 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) require ( + github.com/golang/mock v1.6.0 github.com/gorilla/mux v1.8.1 + github.com/hashicorp/go-metrics v0.5.2 github.com/strangelove-ventures/poa v0.0.1-alpha.2 + gotest.tools/v3 v3.5.1 ) From c1c3fb482d357de047fe3e0cc6ac5bd0b4a88913 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 21 Feb 2024 18:13:13 -0600 Subject: [PATCH 5/5] add in mint --- Makefile | 5 + app/app.go | 6 +- app/apptesting/test_suite.go | 2 +- app/decorators/inflation_disable_test.go | 4 +- app/test_helpers.go | 2 +- scripts/mockgen.sh | 6 + x/distribution/autocli.go | 2 +- x/distribution/client/cli/tx_test.go | 2 +- x/distribution/module.go | 2 +- x/distribution/testutil/app_config.go | 2 +- x/manifest/depinject.go | 2 +- x/manifest/keeper/keeper.go | 2 +- x/mint/README.md | 383 +++++++ x/mint/abci.go | 76 ++ x/mint/autocli.go | 40 + x/mint/exported/exported.go | 18 + x/mint/keeper/genesis.go | 34 + x/mint/keeper/genesis_test.go | 90 ++ x/mint/keeper/grpc_query.go | 47 + x/mint/keeper/grpc_query_test.go | 88 ++ x/mint/keeper/keeper.go | 113 ++ x/mint/keeper/keeper_test.go | 95 ++ x/mint/keeper/migrator.go | 29 + x/mint/keeper/msg_server.go | 41 + x/mint/keeper/msg_server_test.go | 73 ++ x/mint/migrations/v2/migrate.go | 37 + x/mint/migrations/v2/migrator_test.go | 50 + x/mint/module.go | 247 +++++ x/mint/module_test.go | 31 + x/mint/simulation/genesis.go | 79 ++ x/mint/simulation/genesis_test.go | 85 ++ x/mint/simulation/proposals.go | 50 + x/mint/simulation/proposals_test.go | 48 + x/mint/testutil/app_config.go | 24 + x/mint/testutil/expected_keepers_mocks.go | 209 ++++ x/mint/types/codec.go | 25 + x/mint/types/events.go | 10 + x/mint/types/expected_keepers.go | 33 + x/mint/types/genesis.go | 45 + x/mint/types/genesis.pb.go | 379 +++++++ x/mint/types/keys.go | 17 + x/mint/types/mint.pb.go | 782 +++++++++++++ x/mint/types/minter.go | 82 ++ x/mint/types/minter_test.go | 138 +++ x/mint/types/params.go | 170 +++ x/mint/types/params_legacy.go | 39 + x/mint/types/query.pb.go | 1204 +++++++++++++++++++++ x/mint/types/query.pb.gw.go | 283 +++++ x/mint/types/tx.pb.go | 606 +++++++++++ 49 files changed, 5824 insertions(+), 13 deletions(-) create mode 100644 scripts/mockgen.sh create mode 100644 x/mint/README.md create mode 100644 x/mint/abci.go create mode 100644 x/mint/autocli.go create mode 100644 x/mint/exported/exported.go create mode 100644 x/mint/keeper/genesis.go create mode 100644 x/mint/keeper/genesis_test.go create mode 100644 x/mint/keeper/grpc_query.go create mode 100644 x/mint/keeper/grpc_query_test.go create mode 100644 x/mint/keeper/keeper.go create mode 100644 x/mint/keeper/keeper_test.go create mode 100644 x/mint/keeper/migrator.go create mode 100644 x/mint/keeper/msg_server.go create mode 100644 x/mint/keeper/msg_server_test.go create mode 100644 x/mint/migrations/v2/migrate.go create mode 100644 x/mint/migrations/v2/migrator_test.go create mode 100644 x/mint/module.go create mode 100644 x/mint/module_test.go create mode 100644 x/mint/simulation/genesis.go create mode 100644 x/mint/simulation/genesis_test.go create mode 100644 x/mint/simulation/proposals.go create mode 100644 x/mint/simulation/proposals_test.go create mode 100644 x/mint/testutil/app_config.go create mode 100644 x/mint/testutil/expected_keepers_mocks.go create mode 100644 x/mint/types/codec.go create mode 100644 x/mint/types/events.go create mode 100644 x/mint/types/expected_keepers.go create mode 100644 x/mint/types/genesis.go create mode 100644 x/mint/types/genesis.pb.go create mode 100644 x/mint/types/keys.go create mode 100644 x/mint/types/mint.pb.go create mode 100644 x/mint/types/minter.go create mode 100644 x/mint/types/minter_test.go create mode 100644 x/mint/types/params.go create mode 100644 x/mint/types/params_legacy.go create mode 100644 x/mint/types/query.pb.go create mode 100644 x/mint/types/query.pb.gw.go create mode 100644 x/mint/types/tx.pb.go diff --git a/Makefile b/Makefile index d53433a..493c40e 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,11 @@ test-integration: .PHONY: test test-integration +mocks: + @go install github.com/golang/mock/mockgen@v1.6.0 + sh ./scripts/mockgen.sh +.PHONY: mocks + ################## ### Protobuf ### ################## diff --git a/app/app.go b/app/app.go index 9bed8f8..8cbffe6 100644 --- a/app/app.go +++ b/app/app.go @@ -120,9 +120,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/group" groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" - "github.com/cosmos/cosmos-sdk/x/mint" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" @@ -137,6 +134,9 @@ import ( distr "github.com/liftedinit/manifest-ledger/x/distribution" distrkeeper "github.com/liftedinit/manifest-ledger/x/distribution/keeper" distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" + "github.com/liftedinit/manifest-ledger/x/mint" + mintkeeper "github.com/liftedinit/manifest-ledger/x/mint/keeper" + minttypes "github.com/liftedinit/manifest-ledger/x/mint/types" ) // !IMPORTANT: testnet only (reece's addr) diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index c740e55..e824fa6 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -27,11 +27,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakinghelper "github.com/cosmos/cosmos-sdk/x/staking/testutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" + minttypes "github.com/liftedinit/manifest-ledger/x/mint/types" ) type KeeperTestHelper struct { diff --git a/app/decorators/inflation_disable_test.go b/app/decorators/inflation_disable_test.go index a03382c..2f21112 100644 --- a/app/decorators/inflation_disable_test.go +++ b/app/decorators/inflation_disable_test.go @@ -17,8 +17,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + mintkeeper "github.com/liftedinit/manifest-ledger/x/mint/keeper" + minttypes "github.com/liftedinit/manifest-ledger/x/mint/types" ) // Define an empty ante handle diff --git a/app/test_helpers.go b/app/test_helpers.go index 6e3f587..7e27282 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -45,9 +45,9 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" distrtypes "github.com/liftedinit/manifest-ledger/x/distribution/types" + minttypes "github.com/liftedinit/manifest-ledger/x/mint/types" ) // SimAppChainID hardcoded chainID for simulation diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh new file mode 100644 index 0000000..3895e63 --- /dev/null +++ b/scripts/mockgen.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +mockgen_cmd="mockgen" + +$mockgen_cmd -source=x/distribution/types/expected_keepers.go -package testutil -destination x/distribution/testutil/expected_keepers_mocks.go +$mockgen_cmd -source=x/mint/types/expected_keepers.go -package testutil -destination x/mint/testutil/expected_keepers_mocks.go \ No newline at end of file diff --git a/x/distribution/autocli.go b/x/distribution/autocli.go index 36908ea..d7d1429 100644 --- a/x/distribution/autocli.go +++ b/x/distribution/autocli.go @@ -4,7 +4,7 @@ import ( "fmt" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - distirbuitonv1beta1 "cosmossdk.io/api/cosmos/distribution/v1beta1" + distirbuitonv1beta1 "github.com/liftedinit/manifest-ledger/api/distribution/v1beta1" "github.com/cosmos/cosmos-sdk/version" ) diff --git a/x/distribution/client/cli/tx_test.go b/x/distribution/client/cli/tx_test.go index fb5c646..a4b3d0a 100644 --- a/x/distribution/client/cli/tx_test.go +++ b/x/distribution/client/cli/tx_test.go @@ -25,9 +25,9 @@ import ( testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/gov" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/liftedinit/manifest-ledger/x/distribution/client/cli" distrtestutil "github.com/liftedinit/manifest-ledger/x/distribution/testutil" + minttypes "github.com/liftedinit/manifest-ledger/x/mint/types" ) type CLITestSuite struct { diff --git a/x/distribution/module.go b/x/distribution/module.go index af28132..7c12b6a 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -8,11 +8,11 @@ import ( gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - modulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/store" "cosmossdk.io/depinject" + modulev1 "github.com/liftedinit/manifest-ledger/api/distribution/module/v1" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/distribution/testutil/app_config.go b/x/distribution/testutil/app_config.go index e2f5d8d..79a2413 100644 --- a/x/distribution/testutil/app_config.go +++ b/x/distribution/testutil/app_config.go @@ -7,10 +7,10 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring - _ "github.com/cosmos/cosmos-sdk/x/mint" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/params" // import as blank for app wiring _ "github.com/cosmos/cosmos-sdk/x/staking" // import as blank for app wiring _ "github.com/liftedinit/manifest-ledger/x/distribution" // import as blank for app wiring + _ "github.com/liftedinit/manifest-ledger/x/mint" // import as blank for app wiring ) var AppConfig = configurator.NewAppConfig( diff --git a/x/manifest/depinject.go b/x/manifest/depinject.go index 0efb94b..def6667 100644 --- a/x/manifest/depinject.go +++ b/x/manifest/depinject.go @@ -16,7 +16,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + mintkeeper "github.com/liftedinit/manifest-ledger/x/mint/keeper" ) var _ appmodule.AppModule = AppModule{} diff --git a/x/manifest/keeper/keeper.go b/x/manifest/keeper/keeper.go index a4dfe56..97bfbf3 100644 --- a/x/manifest/keeper/keeper.go +++ b/x/manifest/keeper/keeper.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + mintkeeper "github.com/liftedinit/manifest-ledger/x/mint/keeper" ) type Keeper struct { diff --git a/x/mint/README.md b/x/mint/README.md new file mode 100644 index 0000000..900615b --- /dev/null +++ b/x/mint/README.md @@ -0,0 +1,383 @@ +--- +sidebar_position: 1 +--- + +# `x/mint` + +## Contents + +* [State](#state) + * [Minter](#minter) + * [Params](#params) +* [Begin-Block](#begin-block) + * [NextInflationRate](#nextinflationrate) + * [NextAnnualProvisions](#nextannualprovisions) + * [BlockProvision](#blockprovision) +* [Parameters](#parameters) +* [Events](#events) + * [BeginBlocker](#beginblocker) +* [Client](#client) + * [CLI](#cli) + * [gRPC](#grpc) + * [REST](#rest) + +## Concepts + +### The Minting Mechanism + +The minting mechanism was designed to: + +* allow for a flexible inflation rate determined by market demand targeting a particular bonded-stake ratio +* effect a balance between market liquidity and staked supply + +In order to best determine the appropriate market rate for inflation rewards, a +moving change rate is used. The moving change rate mechanism ensures that if +the % bonded is either over or under the goal %-bonded, the inflation rate will +adjust to further incentivize or disincentivize being bonded, respectively. Setting the goal +%-bonded at less than 100% encourages the network to maintain some non-staked tokens +which should help provide some liquidity. + +It can be broken down in the following way: + +* If the inflation rate is below the goal %-bonded the inflation rate will + increase until a maximum value is reached +* If the goal % bonded (67% in Cosmos-Hub) is maintained, then the inflation + rate will stay constant +* If the inflation rate is above the goal %-bonded the inflation rate will + decrease until a minimum value is reached + + +## State + +### Minter + +The minter is a space for holding current inflation information. + +* Minter: `0x00 -> ProtocolBuffer(minter)` + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/mint/v1beta1/mint.proto#L10-L24 +``` + +### Params + +The mint module stores it's params in state with the prefix of `0x01`, +it can be updated with governance or the address with authority. + +* Params: `mint/params -> legacy_amino(params)` + +```protobuf reference +https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/mint/v1beta1/mint.proto#L26-L59 +``` + +## Begin-Block + +Minting parameters are recalculated and inflation paid at the beginning of each block. + +### Inflation rate calculation + +Inflation rate is calculated using an "inflation calculation function" that's +passed to the `NewAppModule` function. If no function is passed, then the SDK's +default inflation function will be used (`NextInflationRate`). In case a custom +inflation calculation logic is needed, this can be achieved by defining and +passing a function that matches `InflationCalculationFn`'s signature. + +```go +type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec +``` + +#### NextInflationRate + +The target annual inflation rate is recalculated each block. +The inflation is also subject to a rate change (positive or negative) +depending on the distance from the desired ratio (67%). The maximum rate change +possible is defined to be 13% per year, however the annual inflation is capped +as between 7% and 20%. + +```go +NextInflationRate(params Params, bondedRatio math.LegacyDec) (inflation math.LegacyDec) { + inflationRateChangePerYear = (1 - bondedRatio/params.GoalBonded) * params.InflationRateChange + inflationRateChange = inflationRateChangePerYear/blocksPerYr + + // increase the new annual inflation for this next block + inflation += inflationRateChange + if inflation > params.InflationMax { + inflation = params.InflationMax + } + if inflation < params.InflationMin { + inflation = params.InflationMin + } + + return inflation +} +``` + +### NextAnnualProvisions + +Calculate the annual provisions based on current total supply and inflation +rate. This parameter is calculated once per block. + +```go +NextAnnualProvisions(params Params, totalSupply math.LegacyDec) (provisions math.LegacyDec) { + return Inflation * totalSupply +``` + +### BlockProvision + +Calculate the provisions generated for each block based on current annual provisions. The provisions are then minted by the `mint` module's `ModuleMinterAccount` and then transferred to the `auth`'s `FeeCollector` `ModuleAccount`. + +```go +BlockProvision(params Params) sdk.Coin { + provisionAmt = AnnualProvisions/ params.BlocksPerYear + return sdk.NewCoin(params.MintDenom, provisionAmt.Truncate()) +``` + + +## Parameters + +The minting module contains the following parameters: + +| Key | Type | Example | +|---------------------|-----------------|------------------------| +| MintDenom | string | "uatom" | +| InflationRateChange | string (dec) | "0.130000000000000000" | +| InflationMax | string (dec) | "0.200000000000000000" | +| InflationMin | string (dec) | "0.070000000000000000" | +| GoalBonded | string (dec) | "0.670000000000000000" | +| BlocksPerYear | string (uint64) | "6311520" | + + +## Events + +The minting module emits the following events: + +### BeginBlocker + +| Type | Attribute Key | Attribute Value | +|------|-------------------|--------------------| +| mint | bonded_ratio | {bondedRatio} | +| mint | inflation | {inflation} | +| mint | annual_provisions | {annualProvisions} | +| mint | amount | {amount} | + + +## Client + +### CLI + +A user can query and interact with the `mint` module using the CLI. + +#### Query + +The `query` commands allow users to query `mint` state. + +```shell +simd query mint --help +``` + +##### annual-provisions + +The `annual-provisions` command allow users to query the current minting annual provisions value + +```shell +simd query mint annual-provisions [flags] +``` + +Example: + +```shell +simd query mint annual-provisions +``` + +Example Output: + +```shell +22268504368893.612100895088410693 +``` + +##### inflation + +The `inflation` command allow users to query the current minting inflation value + +```shell +simd query mint inflation [flags] +``` + +Example: + +```shell +simd query mint inflation +``` + +Example Output: + +```shell +0.199200302563256955 +``` + +##### params + +The `params` command allow users to query the current minting parameters + +```shell +simd query mint params [flags] +``` + +Example: + +```yml +blocks_per_year: "4360000" +goal_bonded: "0.670000000000000000" +inflation_max: "0.200000000000000000" +inflation_min: "0.070000000000000000" +inflation_rate_change: "0.130000000000000000" +mint_denom: stake +``` + +### gRPC + +A user can query the `mint` module using gRPC endpoints. + +#### AnnualProvisions + +The `AnnualProvisions` endpoint allow users to query the current minting annual provisions value + +```shell +/cosmos.mint.v1beta1.Query/AnnualProvisions +``` + +Example: + +```shell +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/AnnualProvisions +``` + +Example Output: + +```json +{ + "annualProvisions": "1432452520532626265712995618" +} +``` + +#### Inflation + +The `Inflation` endpoint allow users to query the current minting inflation value + +```shell +/cosmos.mint.v1beta1.Query/Inflation +``` + +Example: + +```shell +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Inflation +``` + +Example Output: + +```json +{ + "inflation": "130197115720711261" +} +``` + +#### Params + +The `Params` endpoint allow users to query the current minting parameters + +```shell +/cosmos.mint.v1beta1.Query/Params +``` + +Example: + +```shell +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Params +``` + +Example Output: + +```json +{ + "params": { + "mintDenom": "stake", + "inflationRateChange": "130000000000000000", + "inflationMax": "200000000000000000", + "inflationMin": "70000000000000000", + "goalBonded": "670000000000000000", + "blocksPerYear": "6311520" + } +} +``` + +### REST + +A user can query the `mint` module using REST endpoints. + +#### annual-provisions + +```shell +/cosmos/mint/v1beta1/annual_provisions +``` + +Example: + +```shell +curl "localhost:1317/cosmos/mint/v1beta1/annual_provisions" +``` + +Example Output: + +```json +{ + "annualProvisions": "1432452520532626265712995618" +} +``` + +#### inflation + +```shell +/cosmos/mint/v1beta1/inflation +``` + +Example: + +```shell +curl "localhost:1317/cosmos/mint/v1beta1/inflation" +``` + +Example Output: + +```json +{ + "inflation": "130197115720711261" +} +``` + +#### params + +```shell +/cosmos/mint/v1beta1/params +``` + +Example: + +```shell +curl "localhost:1317/cosmos/mint/v1beta1/params" +``` + +Example Output: + +```json +{ + "params": { + "mintDenom": "stake", + "inflationRateChange": "130000000000000000", + "inflationMax": "200000000000000000", + "inflationMin": "70000000000000000", + "goalBonded": "670000000000000000", + "blocksPerYear": "6311520" + } +} +``` diff --git a/x/mint/abci.go b/x/mint/abci.go new file mode 100644 index 0000000..7457ef1 --- /dev/null +++ b/x/mint/abci.go @@ -0,0 +1,76 @@ +package mint + +import ( + "context" + "time" + + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/liftedinit/manifest-ledger/x/mint/keeper" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// BeginBlocker mints new tokens for the previous block. +func BeginBlocker(ctx context.Context, k keeper.Keeper, ic types.InflationCalculationFn) error { + defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + + // fetch stored minter & params + minter, err := k.Minter.Get(ctx) + if err != nil { + return err + } + + params, err := k.Params.Get(ctx) + if err != nil { + return err + } + + // recalculate inflation rate + totalSupply := k.BankTokenSupply(ctx, "umfx") + + // bondedRatio, err := k.BondedRatio(ctx) + // if err != nil { + // return err + // } + // always setting bondedRatio to 0 for max inflation allowed + bondedRatio := sdkmath.LegacyZeroDec() + + minter.Inflation = ic(ctx, minter, params, bondedRatio) + minter.AnnualProvisions = minter.NextAnnualProvisions(params, totalSupply) + if err = k.Minter.Set(ctx, minter); err != nil { + return err + } + + // mint coins, update supply + mintedCoin := minter.BlockProvision(params) + mintedCoins := sdk.NewCoins(mintedCoin) + + err = k.MintCoins(ctx, mintedCoins) + if err != nil { + return err + } + + // send the minted coins to the fee collector account + err = k.AddCollectedFees(ctx, mintedCoins) + if err != nil { + return err + } + + if mintedCoin.Amount.IsInt64() { + defer telemetry.ModuleSetGauge(types.ModuleName, float32(mintedCoin.Amount.Int64()), "minted_tokens") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeMint, + sdk.NewAttribute(types.AttributeKeyBondedRatio, bondedRatio.String()), + sdk.NewAttribute(types.AttributeKeyInflation, minter.Inflation.String()), + sdk.NewAttribute(types.AttributeKeyAnnualProvisions, minter.AnnualProvisions.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, mintedCoin.Amount.String()), + ), + ) + + return nil +} diff --git a/x/mint/autocli.go b/x/mint/autocli.go new file mode 100644 index 0000000..8ac35d0 --- /dev/null +++ b/x/mint/autocli.go @@ -0,0 +1,40 @@ +package mint + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + mintv1beta1 "cosmossdk.io/api/cosmos/mint/v1beta1" +) + +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: mintv1beta1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current minting parameters", + }, + { + RpcMethod: "Inflation", + Use: "inflation", + Short: "Query the current minting inflation value", + }, + { + RpcMethod: "AnnualProvisions", + Use: "annual-provisions", + Short: "Query the current minting annual provisions value", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: mintv1beta1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + }, + } +} diff --git a/x/mint/exported/exported.go b/x/mint/exported/exported.go new file mode 100644 index 0000000..000114e --- /dev/null +++ b/x/mint/exported/exported.go @@ -0,0 +1,18 @@ +package exported + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type ( + ParamSet = paramtypes.ParamSet + + // Subspace defines an interface that implements the legacy x/params Subspace + // type. + // + // NOTE: This is used solely for migration of x/params managed parameters. + Subspace interface { + GetParamSet(ctx sdk.Context, ps ParamSet) + } +) diff --git a/x/mint/keeper/genesis.go b/x/mint/keeper/genesis.go new file mode 100644 index 0000000..3f56281 --- /dev/null +++ b/x/mint/keeper/genesis.go @@ -0,0 +1,34 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// InitGenesis new mint genesis +func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) { + if err := keeper.Minter.Set(ctx, data.Minter); err != nil { + panic(err) + } + + if err := keeper.Params.Set(ctx, data.Params); err != nil { + panic(err) + } + + ak.GetModuleAccount(ctx, types.ModuleName) +} + +// ExportGenesis returns a GenesisState for a given context and keeper. +func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + minter, err := keeper.Minter.Get(ctx) + if err != nil { + panic(err) + } + + params, err := keeper.Params.Get(ctx) + if err != nil { + panic(err) + } + + return types.NewGenesisState(minter, params) +} diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go new file mode 100644 index 0000000..0fdc859 --- /dev/null +++ b/x/mint/keeper/genesis_test.go @@ -0,0 +1,90 @@ +package keeper_test + +import ( + "testing" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + + "cosmossdk.io/collections" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/liftedinit/manifest-ledger/x/mint" + "github.com/liftedinit/manifest-ledger/x/mint/keeper" + minttestutil "github.com/liftedinit/manifest-ledger/x/mint/testutil" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +var minterAcc = authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter) + +type GenesisTestSuite struct { + suite.Suite + + sdkCtx sdk.Context + keeper keeper.Keeper + cdc codec.BinaryCodec + accountKeeper types.AccountKeeper + key *storetypes.KVStoreKey +} + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} + +func (s *GenesisTestSuite) SetupTest() { + key := storetypes.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModuleBasic{}) + + // gomock initializations + ctrl := gomock.NewController(s.T()) + s.cdc = codec.NewProtoCodec(encCfg.InterfaceRegistry) + s.sdkCtx = testCtx.Ctx + s.key = key + + stakingKeeper := minttestutil.NewMockStakingKeeper(ctrl) + accountKeeper := minttestutil.NewMockAccountKeeper(ctrl) + bankKeeper := minttestutil.NewMockBankKeeper(ctrl) + s.accountKeeper = accountKeeper + accountKeeper.EXPECT().GetModuleAddress(minterAcc.Name).Return(minterAcc.GetAddress()) + accountKeeper.EXPECT().GetModuleAccount(s.sdkCtx, minterAcc.Name).Return(minterAcc) + + s.keeper = keeper.NewKeeper(s.cdc, runtime.NewKVStoreService(key), stakingKeeper, accountKeeper, bankKeeper, "", "") +} + +func (s *GenesisTestSuite) TestImportExportGenesis() { + genesisState := types.DefaultGenesisState() + genesisState.Minter = types.NewMinter(math.LegacyNewDecWithPrec(20, 2), math.LegacyNewDec(1)) + genesisState.Params = types.NewParams( + "testDenom", + math.LegacyNewDecWithPrec(15, 2), + math.LegacyNewDecWithPrec(22, 2), + math.LegacyNewDecWithPrec(9, 2), + math.LegacyNewDecWithPrec(69, 2), + uint64(60*60*8766/5), + ) + + s.keeper.InitGenesis(s.sdkCtx, s.accountKeeper, genesisState) + + minter, err := s.keeper.Minter.Get(s.sdkCtx) + s.Require().Equal(genesisState.Minter, minter) + s.Require().NoError(err) + + invalidCtx := testutil.DefaultContextWithDB(s.T(), s.key, storetypes.NewTransientStoreKey("transient_test")) + _, err = s.keeper.Minter.Get(invalidCtx.Ctx) + s.Require().ErrorIs(err, collections.ErrNotFound) + + params, err := s.keeper.Params.Get(s.sdkCtx) + s.Require().Equal(genesisState.Params, params) + s.Require().NoError(err) + + genesisState2 := s.keeper.ExportGenesis(s.sdkCtx) + s.Require().Equal(genesisState, genesisState2) +} diff --git a/x/mint/keeper/grpc_query.go b/x/mint/keeper/grpc_query.go new file mode 100644 index 0000000..a7e25dd --- /dev/null +++ b/x/mint/keeper/grpc_query.go @@ -0,0 +1,47 @@ +package keeper + +import ( + "context" + + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +var _ types.QueryServer = queryServer{} + +func NewQueryServerImpl(k Keeper) types.QueryServer { + return queryServer{k} +} + +type queryServer struct { + k Keeper +} + +// Params returns params of the mint module. +func (q queryServer) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + params, err := q.k.Params.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryParamsResponse{Params: params}, nil +} + +// Inflation returns minter.Inflation of the mint module. +func (q queryServer) Inflation(ctx context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error) { + minter, err := q.k.Minter.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryInflationResponse{Inflation: minter.Inflation}, nil +} + +// AnnualProvisions returns minter.AnnualProvisions of the mint module. +func (q queryServer) AnnualProvisions(ctx context.Context, _ *types.QueryAnnualProvisionsRequest) (*types.QueryAnnualProvisionsResponse, error) { + minter, err := q.k.Minter.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryAnnualProvisionsResponse{AnnualProvisions: minter.AnnualProvisions}, nil +} diff --git a/x/mint/keeper/grpc_query_test.go b/x/mint/keeper/grpc_query_test.go new file mode 100644 index 0000000..c6a46fe --- /dev/null +++ b/x/mint/keeper/grpc_query_test.go @@ -0,0 +1,88 @@ +package keeper_test + +import ( + gocontext "context" + "testing" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/liftedinit/manifest-ledger/x/mint" + "github.com/liftedinit/manifest-ledger/x/mint/keeper" + minttestutil "github.com/liftedinit/manifest-ledger/x/mint/testutil" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +type MintTestSuite struct { + suite.Suite + + ctx sdk.Context + queryClient types.QueryClient + mintKeeper keeper.Keeper +} + +func (suite *MintTestSuite) SetupTest() { + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModuleBasic{}) + key := storetypes.NewKVStoreKey(types.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) + suite.ctx = testCtx.Ctx + + // gomock initializations + ctrl := gomock.NewController(suite.T()) + accountKeeper := minttestutil.NewMockAccountKeeper(ctrl) + bankKeeper := minttestutil.NewMockBankKeeper(ctrl) + stakingKeeper := minttestutil.NewMockStakingKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress("mint").Return(sdk.AccAddress{}) + + suite.mintKeeper = keeper.NewKeeper( + encCfg.Codec, + storeService, + stakingKeeper, + accountKeeper, + bankKeeper, + authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + err := suite.mintKeeper.Params.Set(suite.ctx, types.DefaultParams()) + suite.Require().NoError(err) + suite.Require().NoError(suite.mintKeeper.Minter.Set(suite.ctx, types.DefaultInitialMinter())) + + queryHelper := baseapp.NewQueryServerTestHelper(testCtx.Ctx, encCfg.InterfaceRegistry) + types.RegisterQueryServer(queryHelper, keeper.NewQueryServerImpl(suite.mintKeeper)) + + suite.queryClient = types.NewQueryClient(queryHelper) +} + +func (suite *MintTestSuite) TestGRPCParams() { + params, err := suite.queryClient.Params(gocontext.Background(), &types.QueryParamsRequest{}) + suite.Require().NoError(err) + kparams, err := suite.mintKeeper.Params.Get(suite.ctx) + suite.Require().NoError(err) + suite.Require().Equal(params.Params, kparams) + + inflation, err := suite.queryClient.Inflation(gocontext.Background(), &types.QueryInflationRequest{}) + suite.Require().NoError(err) + minter, err := suite.mintKeeper.Minter.Get(suite.ctx) + suite.Require().NoError(err) + suite.Require().Equal(inflation.Inflation, minter.Inflation) + + annualProvisions, err := suite.queryClient.AnnualProvisions(gocontext.Background(), &types.QueryAnnualProvisionsRequest{}) + suite.Require().NoError(err) + suite.Require().Equal(annualProvisions.AnnualProvisions, minter.AnnualProvisions) +} + +func TestMintTestSuite(t *testing.T) { + suite.Run(t, new(MintTestSuite)) +} diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go new file mode 100644 index 0000000..2d25a91 --- /dev/null +++ b/x/mint/keeper/keeper.go @@ -0,0 +1,113 @@ +package keeper + +import ( + "context" + "fmt" + + "cosmossdk.io/collections" + storetypes "cosmossdk.io/core/store" + "cosmossdk.io/log" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// Keeper of the mint store +type Keeper struct { + cdc codec.BinaryCodec + storeService storetypes.KVStoreService + stakingKeeper types.StakingKeeper + bankKeeper types.BankKeeper + feeCollectorName string + + // the address capable of executing a MsgUpdateParams message. Typically, this + // should be the x/gov module account. + authority string + + Schema collections.Schema + Params collections.Item[types.Params] + Minter collections.Item[types.Minter] +} + +// NewKeeper creates a new mint Keeper instance +func NewKeeper( + cdc codec.BinaryCodec, + storeService storetypes.KVStoreService, + sk types.StakingKeeper, + ak types.AccountKeeper, + bk types.BankKeeper, + feeCollectorName string, + authority string, +) Keeper { + // ensure mint module account is set + if addr := ak.GetModuleAddress(types.ModuleName); addr == nil { + panic(fmt.Sprintf("the x/%s module account has not been set", types.ModuleName)) + } + + sb := collections.NewSchemaBuilder(storeService) + k := Keeper{ + cdc: cdc, + storeService: storeService, + stakingKeeper: sk, + bankKeeper: bk, + feeCollectorName: feeCollectorName, + authority: authority, + Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), + Minter: collections.NewItem(sb, types.MinterKey, "minter", codec.CollValue[types.Minter](cdc)), + } + + schema, err := sb.Build() + if err != nil { + panic(err) + } + k.Schema = schema + return k +} + +// GetAuthority returns the x/mint module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", "x/"+types.ModuleName) +} + +// // StakingTokenSupply implements an alias call to the underlying staking keeper's +// // StakingTokenSupply to be used in BeginBlocker. +// +// func (k Keeper) StakingTokenSupply(ctx context.Context) (math.Int, error) { +// return k.stakingKeeper.StakingTokenSupply(ctx) +// } + +// BankTokenSupply +func (k Keeper) BankTokenSupply(ctx context.Context, denom string) math.Int { + return k.bankKeeper.SupplyOf(ctx, denom).Amount +} + +// BondedRatio implements an alias call to the underlying staking keeper's +// BondedRatio to be used in BeginBlocker. +func (k Keeper) BondedRatio(ctx context.Context) (math.LegacyDec, error) { + return k.stakingKeeper.BondedRatio(ctx) +} + +// MintCoins implements an alias call to the underlying supply keeper's +// MintCoins to be used in BeginBlocker. +func (k Keeper) MintCoins(ctx context.Context, newCoins sdk.Coins) error { + if newCoins.Empty() { + // skip as no coins need to be minted + return nil + } + + return k.bankKeeper.MintCoins(ctx, types.ModuleName, newCoins) +} + +// AddCollectedFees implements an alias call to the underlying supply keeper's +// AddCollectedFees to be used in BeginBlocker. +func (k Keeper) AddCollectedFees(ctx context.Context, fees sdk.Coins) error { + return k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, k.feeCollectorName, fees) +} diff --git a/x/mint/keeper/keeper_test.go b/x/mint/keeper/keeper_test.go new file mode 100644 index 0000000..a8fc9d2 --- /dev/null +++ b/x/mint/keeper/keeper_test.go @@ -0,0 +1,95 @@ +package keeper_test + +import ( + "testing" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/liftedinit/manifest-ledger/x/mint" + "github.com/liftedinit/manifest-ledger/x/mint/keeper" + minttestutil "github.com/liftedinit/manifest-ledger/x/mint/testutil" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +type IntegrationTestSuite struct { + suite.Suite + + mintKeeper keeper.Keeper + ctx sdk.Context + msgServer types.MsgServer + stakingKeeper *minttestutil.MockStakingKeeper + bankKeeper *minttestutil.MockBankKeeper +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} + +func (s *IntegrationTestSuite) SetupTest() { + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModuleBasic{}) + key := storetypes.NewKVStoreKey(types.StoreKey) + storeService := runtime.NewKVStoreService(key) + testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + s.ctx = testCtx.Ctx + + // gomock initializations + ctrl := gomock.NewController(s.T()) + accountKeeper := minttestutil.NewMockAccountKeeper(ctrl) + bankKeeper := minttestutil.NewMockBankKeeper(ctrl) + stakingKeeper := minttestutil.NewMockStakingKeeper(ctrl) + + accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{}) + + s.mintKeeper = keeper.NewKeeper( + encCfg.Codec, + storeService, + stakingKeeper, + accountKeeper, + bankKeeper, + authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + s.stakingKeeper = stakingKeeper + s.bankKeeper = bankKeeper + + s.Require().Equal(testCtx.Ctx.Logger().With("module", "x/"+types.ModuleName), + s.mintKeeper.Logger(testCtx.Ctx)) + + err := s.mintKeeper.Params.Set(s.ctx, types.DefaultParams()) + s.Require().NoError(err) + s.Require().NoError(s.mintKeeper.Minter.Set(s.ctx, types.DefaultInitialMinter())) + + s.msgServer = keeper.NewMsgServerImpl(s.mintKeeper) +} + +func (s *IntegrationTestSuite) TestAliasFunctions() { + stakingTokenSupply := math.NewIntFromUint64(100000000000) + s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(stakingTokenSupply, nil) + tokenSupply := s.mintKeeper.BankTokenSupply(s.ctx, "umfx") // TODO: + s.Require().Equal(tokenSupply, stakingTokenSupply) + + bondedRatio := math.LegacyNewDecWithPrec(15, 2) + s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio, nil) + ratio, err := s.mintKeeper.BondedRatio(s.ctx) + s.Require().NoError(err) + s.Require().Equal(ratio, bondedRatio) + + coins := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000000))) + s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, coins).Return(nil) + s.Require().Equal(s.mintKeeper.MintCoins(s.ctx, sdk.NewCoins()), nil) + s.Require().Nil(s.mintKeeper.MintCoins(s.ctx, coins)) + + fees := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000))) + s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, types.ModuleName, authtypes.FeeCollectorName, fees).Return(nil) + s.Require().Nil(s.mintKeeper.AddCollectedFees(s.ctx, fees)) +} diff --git a/x/mint/keeper/migrator.go b/x/mint/keeper/migrator.go new file mode 100644 index 0000000..324797a --- /dev/null +++ b/x/mint/keeper/migrator.go @@ -0,0 +1,29 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/liftedinit/manifest-ledger/x/mint/exported" + v2 "github.com/liftedinit/manifest-ledger/x/mint/migrations/v2" +) + +// Migrator is a struct for handling in-place state migrations. +type Migrator struct { + keeper Keeper + legacySubspace exported.Subspace +} + +// NewMigrator returns Migrator instance for the state migration. +func NewMigrator(k Keeper, ss exported.Subspace) Migrator { + return Migrator{ + keeper: k, + legacySubspace: ss, + } +} + +// Migrate1to2 migrates the x/mint module state from the consensus version 1 to +// version 2. Specifically, it takes the parameters that are currently stored +// and managed by the x/params modules and stores them directly into the x/mint +// module state. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + return v2.Migrate(ctx, m.keeper.storeService.OpenKVStore(ctx), m.legacySubspace, m.keeper.cdc) +} diff --git a/x/mint/keeper/msg_server.go b/x/mint/keeper/msg_server.go new file mode 100644 index 0000000..6241b4b --- /dev/null +++ b/x/mint/keeper/msg_server.go @@ -0,0 +1,41 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/errors" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +var _ types.MsgServer = msgServer{} + +// msgServer is a wrapper of Keeper. +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the x/mint MsgServer interface. +func NewMsgServerImpl(k Keeper) types.MsgServer { + return &msgServer{ + Keeper: k, + } +} + +// UpdateParams updates the params. +func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if ms.authority != msg.Authority { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority) + } + + if err := msg.Params.Validate(); err != nil { + return nil, err + } + + if err := ms.Params.Set(ctx, msg.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/mint/keeper/msg_server_test.go b/x/mint/keeper/msg_server_test.go new file mode 100644 index 0000000..0057581 --- /dev/null +++ b/x/mint/keeper/msg_server_test.go @@ -0,0 +1,73 @@ +package keeper_test + +import ( + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +func (s *IntegrationTestSuite) TestUpdateParams() { + testCases := []struct { + name string + request *types.MsgUpdateParams + expectErr bool + }{ + { + name: "set invalid authority (not an address)", + request: &types.MsgUpdateParams{ + Authority: "foo", + }, + expectErr: true, + }, + { + name: "set invalid authority (not defined authority)", + request: &types.MsgUpdateParams{ + Authority: "cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5", + }, + expectErr: true, + }, + { + name: "set invalid params", + request: &types.MsgUpdateParams{ + Authority: s.mintKeeper.GetAuthority(), + Params: types.Params{ + MintDenom: sdk.DefaultBondDenom, + InflationRateChange: sdkmath.LegacyNewDecWithPrec(-13, 2), + InflationMax: sdkmath.LegacyNewDecWithPrec(20, 2), + InflationMin: sdkmath.LegacyNewDecWithPrec(7, 2), + GoalBonded: sdkmath.LegacyNewDecWithPrec(67, 2), + BlocksPerYear: uint64(60 * 60 * 8766 / 5), + }, + }, + expectErr: true, + }, + { + name: "set full valid params", + request: &types.MsgUpdateParams{ + Authority: s.mintKeeper.GetAuthority(), + Params: types.Params{ + MintDenom: sdk.DefaultBondDenom, + InflationRateChange: sdkmath.LegacyNewDecWithPrec(8, 2), + InflationMax: sdkmath.LegacyNewDecWithPrec(20, 2), + InflationMin: sdkmath.LegacyNewDecWithPrec(2, 2), + GoalBonded: sdkmath.LegacyNewDecWithPrec(37, 2), + BlocksPerYear: uint64(60 * 60 * 8766 / 5), + }, + }, + expectErr: false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + _, err := s.msgServer.UpdateParams(s.ctx, tc.request) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + } + }) + } +} diff --git a/x/mint/migrations/v2/migrate.go b/x/mint/migrations/v2/migrate.go new file mode 100644 index 0000000..a1a665c --- /dev/null +++ b/x/mint/migrations/v2/migrate.go @@ -0,0 +1,37 @@ +package v2 + +import ( + storetypes "cosmossdk.io/core/store" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/liftedinit/manifest-ledger/x/mint/exported" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +const ( + ModuleName = "mint" +) + +var ParamsKey = []byte{0x01} + +// Migrate migrates the x/mint module state from the consensus version 1 to +// version 2. Specifically, it takes the parameters that are currently stored +// and managed by the x/params modules and stores them directly into the x/mint +// module state. +func Migrate( + ctx sdk.Context, + store storetypes.KVStore, + legacySubspace exported.Subspace, + cdc codec.BinaryCodec, +) error { + var currParams types.Params + legacySubspace.GetParamSet(ctx, &currParams) + + if err := currParams.Validate(); err != nil { + return err + } + + bz := cdc.MustMarshal(&currParams) + return store.Set(ParamsKey, bz) +} diff --git a/x/mint/migrations/v2/migrator_test.go b/x/mint/migrations/v2/migrator_test.go new file mode 100644 index 0000000..5c74292 --- /dev/null +++ b/x/mint/migrations/v2/migrator_test.go @@ -0,0 +1,50 @@ +package v2_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + storetypes "cosmossdk.io/store/types" + + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/liftedinit/manifest-ledger/x/mint" + "github.com/liftedinit/manifest-ledger/x/mint/exported" + v2 "github.com/liftedinit/manifest-ledger/x/mint/migrations/v2" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +type mockSubspace struct { + ps types.Params +} + +func newMockSubspace(ps types.Params) mockSubspace { + return mockSubspace{ps: ps} +} + +func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { + *ps.(*types.Params) = ms.ps +} + +func TestMigrate(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModuleBasic{}) + cdc := encCfg.Codec + + storeKey := storetypes.NewKVStoreKey(v2.ModuleName) + tKey := storetypes.NewTransientStoreKey("transient_test") + ctx := testutil.DefaultContext(storeKey, tKey) + kvStoreService := runtime.NewKVStoreService(storeKey) + store := kvStoreService.OpenKVStore(ctx) + + legacySubspace := newMockSubspace(types.DefaultParams()) + require.NoError(t, v2.Migrate(ctx, store, legacySubspace, cdc)) + + var res types.Params + bz, err := store.Get(v2.ParamsKey) + require.NoError(t, err) + require.NoError(t, cdc.Unmarshal(bz, &res)) + require.Equal(t, legacySubspace.ps, res) +} diff --git a/x/mint/module.go b/x/mint/module.go new file mode 100644 index 0000000..d009330 --- /dev/null +++ b/x/mint/module.go @@ -0,0 +1,247 @@ +package mint + +import ( + "context" + "encoding/json" + "fmt" + + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + + modulev1 "cosmossdk.io/api/cosmos/mint/module/v1" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/liftedinit/manifest-ledger/x/mint/exported" + "github.com/liftedinit/manifest-ledger/x/mint/keeper" + "github.com/liftedinit/manifest-ledger/x/mint/simulation" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// ConsensusVersion defines the current x/mint module consensus version. +const ConsensusVersion = 2 + +var ( + _ module.AppModuleBasic = AppModule{} + _ module.AppModuleSimulation = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + + _ appmodule.AppModule = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the mint module. +type AppModuleBasic struct { + cdc codec.Codec +} + +// Name returns the mint module's name. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec registers the mint module's types on the given LegacyAmino codec. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +// RegisterInterfaces registers the module's interface types +func (b AppModuleBasic) RegisterInterfaces(r cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(r) +} + +// DefaultGenesis returns default genesis state as raw bytes for the mint +// module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesisState()) +} + +// ValidateGenesis performs genesis state validation for the mint module. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var data types.GenesisState + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return types.ValidateGenesis(data) +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// AppModule implements an application module for the mint module. +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + authKeeper types.AccountKeeper + + // legacySubspace is used solely for migration of x/params managed parameters + legacySubspace exported.Subspace + + // inflationCalculator is used to calculate the inflation rate during BeginBlock. + // If inflationCalculator is nil, the default inflation calculation logic is used. + inflationCalculator types.InflationCalculationFn +} + +// NewAppModule creates a new AppModule object. If the InflationCalculationFn +// argument is nil, then the SDK's default inflation function will be used. +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + ak types.AccountKeeper, + ic types.InflationCalculationFn, + ss exported.Subspace, +) AppModule { + if ic == nil { + ic = types.DefaultInflationCalculationFn + } + + return AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + authKeeper: ak, + inflationCalculator: ic, + legacySubspace: ss, + } +} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// RegisterServices registers a gRPC query service to respond to the +// module-specific gRPC queries. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServerImpl(am.keeper)) + + m := keeper.NewMigrator(am.keeper, am.legacySubspace) + + if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", types.ModuleName, err)) + } +} + +// InitGenesis performs genesis initialization for the mint module. It returns +// no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { + var genesisState types.GenesisState + cdc.MustUnmarshalJSON(data, &genesisState) + + am.keeper.InitGenesis(ctx, am.authKeeper, &genesisState) +} + +// ExportGenesis returns the exported genesis state as raw bytes for the mint +// module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + gs := am.keeper.ExportGenesis(ctx) + return cdc.MustMarshalJSON(gs) +} + +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } + +// BeginBlock returns the begin blocker for the mint module. +func (am AppModule) BeginBlock(ctx context.Context) error { + return BeginBlocker(ctx, am.keeper, am.inflationCalculator) +} + +// AppModuleSimulation functions + +// GenerateGenesisState creates a randomized GenState of the mint module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + simulation.RandomizedGenState(simState) +} + +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { + return simulation.ProposalMsgs() +} + +// RegisterStoreDecoder registers a decoder for mint module's types. +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { + sdr[types.StoreKey] = simtypes.NewStoreDecoderFuncFromCollectionsSchema(am.keeper.Schema) +} + +// WeightedOperations doesn't return any mint module operation. +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { + return nil +} + +// +// App Wiring Setup +// + +func init() { + appmodule.Register(&modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + ModuleKey depinject.OwnModuleKey + Config *modulev1.Module + StoreService store.KVStoreService + Cdc codec.Codec + InflationCalculationFn types.InflationCalculationFn `optional:"true"` + + // LegacySubspace is used solely for migration of x/params managed parameters + LegacySubspace exported.Subspace `optional:"true"` + + AccountKeeper types.AccountKeeper + BankKeeper types.BankKeeper + StakingKeeper types.StakingKeeper +} + +type ModuleOutputs struct { + depinject.Out + + MintKeeper keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + feeCollectorName := in.Config.FeeCollectorName + if feeCollectorName == "" { + feeCollectorName = authtypes.FeeCollectorName + } + + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + + k := keeper.NewKeeper( + in.Cdc, + in.StoreService, + in.StakingKeeper, + in.AccountKeeper, + in.BankKeeper, + feeCollectorName, + authority.String(), + ) + + // when no inflation calculation function is provided it will use the default types.DefaultInflationCalculationFn + m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.InflationCalculationFn, in.LegacySubspace) + + return ModuleOutputs{MintKeeper: k, Module: m} +} diff --git a/x/mint/module_test.go b/x/mint/module_test.go new file mode 100644 index 0000000..4de723b --- /dev/null +++ b/x/mint/module_test.go @@ -0,0 +1,31 @@ +package mint_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/depinject" + "cosmossdk.io/log" + + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/liftedinit/manifest-ledger/x/mint/testutil" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { + var accountKeeper authkeeper.AccountKeeper + + app, err := simtestutil.SetupAtGenesis( + depinject.Configs( + testutil.AppConfig, + depinject.Supply(log.NewNopLogger()), + ), &accountKeeper) + require.NoError(t, err) + + ctx := app.BaseApp.NewContext(false) + acc := accountKeeper.GetAccount(ctx, authtypes.NewModuleAddress(types.ModuleName)) + require.NotNil(t, acc) +} diff --git a/x/mint/simulation/genesis.go b/x/mint/simulation/genesis.go new file mode 100644 index 0000000..e6feac7 --- /dev/null +++ b/x/mint/simulation/genesis.go @@ -0,0 +1,79 @@ +package simulation + +import ( + "encoding/json" + "fmt" + "math/rand" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// Simulation parameter constants +const ( + Inflation = "inflation" + InflationRateChange = "inflation_rate_change" + InflationMax = "inflation_max" + InflationMin = "inflation_min" + GoalBonded = "goal_bonded" +) + +// GenInflation randomized Inflation +func GenInflation(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(int64(r.Intn(99)), 2) +} + +// GenInflationRateChange randomized InflationRateChange +func GenInflationRateChange(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(int64(r.Intn(99)), 2) +} + +// GenInflationMax randomized InflationMax +func GenInflationMax(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(20, 2) +} + +// GenInflationMin randomized InflationMin +func GenInflationMin(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(7, 2) +} + +// GenGoalBonded randomized GoalBonded +func GenGoalBonded(r *rand.Rand) math.LegacyDec { + return math.LegacyNewDecWithPrec(67, 2) +} + +// RandomizedGenState generates a random GenesisState for mint +func RandomizedGenState(simState *module.SimulationState) { + // minter + var inflation math.LegacyDec + simState.AppParams.GetOrGenerate(Inflation, &inflation, simState.Rand, func(r *rand.Rand) { inflation = GenInflation(r) }) + + // params + var inflationRateChange math.LegacyDec + simState.AppParams.GetOrGenerate(InflationRateChange, &inflationRateChange, simState.Rand, func(r *rand.Rand) { inflationRateChange = GenInflationRateChange(r) }) + + var inflationMax math.LegacyDec + simState.AppParams.GetOrGenerate(InflationMax, &inflationMax, simState.Rand, func(r *rand.Rand) { inflationMax = GenInflationMax(r) }) + + var inflationMin math.LegacyDec + simState.AppParams.GetOrGenerate(InflationMin, &inflationMin, simState.Rand, func(r *rand.Rand) { inflationMin = GenInflationMin(r) }) + + var goalBonded math.LegacyDec + simState.AppParams.GetOrGenerate(GoalBonded, &goalBonded, simState.Rand, func(r *rand.Rand) { goalBonded = GenGoalBonded(r) }) + + mintDenom := simState.BondDenom + blocksPerYear := uint64(60 * 60 * 8766 / 5) + params := types.NewParams(mintDenom, inflationRateChange, inflationMax, inflationMin, goalBonded, blocksPerYear) + + mintGenesis := types.NewGenesisState(types.InitialMinter(inflation), params) + + bz, err := json.MarshalIndent(&mintGenesis, "", " ") + if err != nil { + panic(err) + } + fmt.Printf("Selected randomly generated minting parameters:\n%s\n", bz) + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(mintGenesis) +} diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go new file mode 100644 index 0000000..5576cbd --- /dev/null +++ b/x/mint/simulation/genesis_test.go @@ -0,0 +1,85 @@ +package simulation_test + +import ( + "encoding/json" + "math/rand" + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/liftedinit/manifest-ledger/x/mint" + "github.com/liftedinit/manifest-ledger/x/mint/simulation" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. +// Abonormal scenarios are not tested here. +func TestRandomizedGenState(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModuleBasic{}) + + s := rand.NewSource(1) + r := rand.New(s) + + simState := module.SimulationState{ + AppParams: make(simtypes.AppParams), + Cdc: encCfg.Codec, + Rand: r, + NumBonded: 3, + BondDenom: sdk.DefaultBondDenom, + Accounts: simtypes.RandomAccounts(r, 3), + InitialStake: math.NewInt(1000), + GenState: make(map[string]json.RawMessage), + } + + simulation.RandomizedGenState(&simState) + + var mintGenesis types.GenesisState + simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &mintGenesis) + + dec1, _ := math.LegacyNewDecFromStr("0.670000000000000000") + dec2, _ := math.LegacyNewDecFromStr("0.200000000000000000") + dec3, _ := math.LegacyNewDecFromStr("0.070000000000000000") + + require.Equal(t, uint64(6311520), mintGenesis.Params.BlocksPerYear) + require.Equal(t, dec1, mintGenesis.Params.GoalBonded) + require.Equal(t, dec2, mintGenesis.Params.InflationMax) + require.Equal(t, dec3, mintGenesis.Params.InflationMin) + require.Equal(t, "stake", mintGenesis.Params.MintDenom) + require.Equal(t, "0stake", mintGenesis.Minter.BlockProvision(mintGenesis.Params).String()) + require.Equal(t, "0.170000000000000000", mintGenesis.Minter.NextAnnualProvisions(mintGenesis.Params, math.OneInt()).String()) + require.Equal(t, "0.169999926644441493", mintGenesis.Minter.NextInflationRate(mintGenesis.Params, math.LegacyOneDec()).String()) + require.Equal(t, "0.170000000000000000", mintGenesis.Minter.Inflation.String()) + require.Equal(t, "0.000000000000000000", mintGenesis.Minter.AnnualProvisions.String()) +} + +// TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. +func TestRandomizedGenState1(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModuleBasic{}) + + s := rand.NewSource(1) + r := rand.New(s) + // all these tests will panic + tests := []struct { + simState module.SimulationState + panicMsg string + }{ + { // panic => reason: incomplete initialization of the simState + module.SimulationState{}, "invalid memory address or nil pointer dereference"}, + { // panic => reason: incomplete initialization of the simState + module.SimulationState{ + AppParams: make(simtypes.AppParams), + Cdc: encCfg.Codec, + Rand: r, + }, "assignment to entry in nil map"}, + } + + for _, tt := range tests { + require.Panicsf(t, func() { simulation.RandomizedGenState(&tt.simState) }, tt.panicMsg) + } +} diff --git a/x/mint/simulation/proposals.go b/x/mint/simulation/proposals.go new file mode 100644 index 0000000..310dcc8 --- /dev/null +++ b/x/mint/simulation/proposals.go @@ -0,0 +1,50 @@ +package simulation + +import ( + "math/rand" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +// Simulation operation weights constants +const ( + DefaultWeightMsgUpdateParams int = 100 + + OpWeightMsgUpdateParams = "op_weight_msg_update_params" +) + +// ProposalMsgs defines the module weighted proposals' contents +func ProposalMsgs() []simtypes.WeightedProposalMsg { + return []simtypes.WeightedProposalMsg{ + simulation.NewWeightedProposalMsg( + OpWeightMsgUpdateParams, + DefaultWeightMsgUpdateParams, + SimulateMsgUpdateParams, + ), + } +} + +// SimulateMsgUpdateParams returns a random MsgUpdateParams +func SimulateMsgUpdateParams(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg { + // use the default gov module account address as authority + var authority sdk.AccAddress = address.Module("gov") + + params := types.DefaultParams() + params.BlocksPerYear = uint64(simtypes.RandIntBetween(r, 1, 1000000)) + params.GoalBonded = sdkmath.LegacyNewDecWithPrec(int64(simtypes.RandIntBetween(r, 1, 100)), 2) + params.InflationMin = sdkmath.LegacyNewDecWithPrec(int64(simtypes.RandIntBetween(r, 1, 50)), 2) + params.InflationMax = sdkmath.LegacyNewDecWithPrec(int64(simtypes.RandIntBetween(r, 50, 100)), 2) + params.InflationRateChange = sdkmath.LegacyNewDecWithPrec(int64(simtypes.RandIntBetween(r, 1, 100)), 2) + params.MintDenom = simtypes.RandStringOfLength(r, 10) + + return &types.MsgUpdateParams{ + Authority: authority.String(), + Params: params, + } +} diff --git a/x/mint/simulation/proposals_test.go b/x/mint/simulation/proposals_test.go new file mode 100644 index 0000000..a3a3d98 --- /dev/null +++ b/x/mint/simulation/proposals_test.go @@ -0,0 +1,48 @@ +package simulation_test + +import ( + "math/rand" + "testing" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "gotest.tools/v3/assert" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/liftedinit/manifest-ledger/x/mint/simulation" + "github.com/liftedinit/manifest-ledger/x/mint/types" +) + +func TestProposalMsgs(t *testing.T) { + // initialize parameters + s := rand.NewSource(1) + r := rand.New(s) + + ctx := sdk.NewContext(nil, cmtproto.Header{}, true, nil) + accounts := simtypes.RandomAccounts(r, 3) + + // execute ProposalMsgs function + weightedProposalMsgs := simulation.ProposalMsgs() + assert.Assert(t, len(weightedProposalMsgs) == 1) + + w0 := weightedProposalMsgs[0] + + // tests w0 interface: + assert.Equal(t, simulation.OpWeightMsgUpdateParams, w0.AppParamsKey()) + assert.Equal(t, simulation.DefaultWeightMsgUpdateParams, w0.DefaultWeight()) + + msg := w0.MsgSimulatorFn()(r, ctx, accounts) + msgUpdateParams, ok := msg.(*types.MsgUpdateParams) + assert.Assert(t, ok) + + assert.Equal(t, sdk.AccAddress(address.Module("gov")).String(), msgUpdateParams.Authority) + assert.Equal(t, uint64(122877), msgUpdateParams.Params.BlocksPerYear) + assert.DeepEqual(t, sdkmath.LegacyNewDecWithPrec(95, 2), msgUpdateParams.Params.GoalBonded) + assert.DeepEqual(t, sdkmath.LegacyNewDecWithPrec(94, 2), msgUpdateParams.Params.InflationMax) + assert.DeepEqual(t, sdkmath.LegacyNewDecWithPrec(23, 2), msgUpdateParams.Params.InflationMin) + assert.DeepEqual(t, sdkmath.LegacyNewDecWithPrec(89, 2), msgUpdateParams.Params.InflationRateChange) + assert.Equal(t, "XhhuTSkuxK", msgUpdateParams.Params.MintDenom) +} diff --git a/x/mint/testutil/app_config.go b/x/mint/testutil/app_config.go new file mode 100644 index 0000000..61efa64 --- /dev/null +++ b/x/mint/testutil/app_config.go @@ -0,0 +1,24 @@ +package testutil + +import ( + "github.com/cosmos/cosmos-sdk/testutil/configurator" + _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/bank" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/params" // import as blank for app wiring + _ "github.com/cosmos/cosmos-sdk/x/staking" // import as blank for app wiring + _ "github.com/liftedinit/manifest-ledger/x/mint" // import as blank for app wiring +) + +var AppConfig = configurator.NewAppConfig( + configurator.AuthModule(), + configurator.BankModule(), + configurator.StakingModule(), + configurator.TxModule(), + configurator.ConsensusModule(), + configurator.ParamsModule(), + configurator.GenutilModule(), + configurator.MintModule(), +) diff --git a/x/mint/testutil/expected_keepers_mocks.go b/x/mint/testutil/expected_keepers_mocks.go new file mode 100644 index 0000000..68082e6 --- /dev/null +++ b/x/mint/testutil/expected_keepers_mocks.go @@ -0,0 +1,209 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/mint/types/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + context "context" + reflect "reflect" + + math "cosmossdk.io/math" + types "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" +) + +// MockStakingKeeper is a mock of StakingKeeper interface. +type MockStakingKeeper struct { + ctrl *gomock.Controller + recorder *MockStakingKeeperMockRecorder +} + +// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. +type MockStakingKeeperMockRecorder struct { + mock *MockStakingKeeper +} + +// NewMockStakingKeeper creates a new mock instance. +func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { + mock := &MockStakingKeeper{ctrl: ctrl} + mock.recorder = &MockStakingKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { + return m.recorder +} + +// BondedRatio mocks base method. +func (m *MockStakingKeeper) BondedRatio(ctx context.Context) (math.LegacyDec, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BondedRatio", ctx) + ret0, _ := ret[0].(math.LegacyDec) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BondedRatio indicates an expected call of BondedRatio. +func (mr *MockStakingKeeperMockRecorder) BondedRatio(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondedRatio", reflect.TypeOf((*MockStakingKeeper)(nil).BondedRatio), ctx) +} + +// StakingTokenSupply mocks base method. +func (m *MockStakingKeeper) StakingTokenSupply(ctx context.Context) (math.Int, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StakingTokenSupply", ctx) + ret0, _ := ret[0].(math.Int) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StakingTokenSupply indicates an expected call of StakingTokenSupply. +func (mr *MockStakingKeeperMockRecorder) StakingTokenSupply(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StakingTokenSupply", reflect.TypeOf((*MockStakingKeeper)(nil).StakingTokenSupply), ctx) +} + +// MockAccountKeeper is a mock of AccountKeeper interface. +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +// NewMockAccountKeeper creates a new mock instance. +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +// GetModuleAccount mocks base method. +func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) + ret0, _ := ret[0].(types.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", name) + ret0, _ := ret[0].(types.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) +} + +// SetModuleAccount mocks base method. +func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types.ModuleAccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) +} + +// SetModuleAccount indicates an expected call of SetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) +} + +// MockBankKeeper is a mock of BankKeeper interface. +type MockBankKeeper struct { + ctrl *gomock.Controller + recorder *MockBankKeeperMockRecorder +} + +// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. +type MockBankKeeperMockRecorder struct { + mock *MockBankKeeper +} + +// NewMockBankKeeper creates a new mock instance. +func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { + mock := &MockBankKeeper{ctrl: ctrl} + mock.recorder = &MockBankKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { + return m.recorder +} + +// MintCoins mocks base method. +func (m *MockBankKeeper) MintCoins(ctx context.Context, name string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "MintCoins", ctx, name, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// MintCoins indicates an expected call of MintCoins. +func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, name, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, name, amt) +} + +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) +} + +// SendCoinsFromModuleToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) +} + +// SupplyOf mocks base method. +func (m *MockBankKeeper) SupplyOf(ctx context.Context, denom string) types.Coin { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SupplyOf", ctx, denom) + ret0, _ := ret[0].(types.Coin) + return ret0 +} + +// SupplyOf indicates an expected call of SupplyOf. +func (mr *MockBankKeeperMockRecorder) SupplyOf(ctx, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupplyOf", reflect.TypeOf((*MockBankKeeper)(nil).SupplyOf), ctx, denom) +} diff --git a/x/mint/types/codec.go b/x/mint/types/codec.go new file mode 100644 index 0000000..bdbe4b9 --- /dev/null +++ b/x/mint/types/codec.go @@ -0,0 +1,25 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(Params{}, "cosmos-sdk/x/mint/Params", nil) + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/x/mint/MsgUpdateParams") +} + +// RegisterInterfaces registers the interfaces types with the interface registry. +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/mint/types/events.go b/x/mint/types/events.go new file mode 100644 index 0000000..dce85bd --- /dev/null +++ b/x/mint/types/events.go @@ -0,0 +1,10 @@ +package types + +// Minting module event types +const ( + EventTypeMint = ModuleName + + AttributeKeyBondedRatio = "bonded_ratio" + AttributeKeyInflation = "inflation" + AttributeKeyAnnualProvisions = "annual_provisions" +) diff --git a/x/mint/types/expected_keepers.go b/x/mint/types/expected_keepers.go new file mode 100644 index 0000000..1848728 --- /dev/null +++ b/x/mint/types/expected_keepers.go @@ -0,0 +1,33 @@ +package types // noalias + +import ( + context "context" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// StakingKeeper defines the expected staking keeper +type StakingKeeper interface { + StakingTokenSupply(ctx context.Context) (math.Int, error) + BondedRatio(ctx context.Context) (math.LegacyDec, error) +} + +// AccountKeeper defines the contract required for account APIs. +type AccountKeeper interface { + GetModuleAddress(name string) sdk.AccAddress + + // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 + SetModuleAccount(context.Context, sdk.ModuleAccountI) + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI +} + +// BankKeeper defines the contract needed to be fulfilled for banking and supply +// dependencies. +type BankKeeper interface { + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error + MintCoins(ctx context.Context, name string, amt sdk.Coins) error + SupplyOf(ctx context.Context, denom string) sdk.Coin +} diff --git a/x/mint/types/genesis.go b/x/mint/types/genesis.go new file mode 100644 index 0000000..696177f --- /dev/null +++ b/x/mint/types/genesis.go @@ -0,0 +1,45 @@ +package types + +import ( + context "context" + + "cosmossdk.io/math" +) + +// InflationCalculationFn defines the function required to calculate inflation rate during +// BeginBlock. It receives the minter and params stored in the keeper, along with the current +// bondedRatio and returns the newly calculated inflation rate. +// It can be used to specify a custom inflation calculation logic, instead of relying on the +// default logic provided by the sdk. +type InflationCalculationFn func(ctx context.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec + +// DefaultInflationCalculationFn is the default function used to calculate inflation. +func DefaultInflationCalculationFn(_ context.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec { + return minter.NextInflationRate(params, bondedRatio) +} + +// NewGenesisState creates a new GenesisState object +func NewGenesisState(minter Minter, params Params) *GenesisState { + return &GenesisState{ + Minter: minter, + Params: params, + } +} + +// DefaultGenesisState creates a default GenesisState object +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + Minter: DefaultInitialMinter(), + Params: DefaultParams(), + } +} + +// ValidateGenesis validates the provided genesis state to ensure the +// expected invariants holds. +func ValidateGenesis(data GenesisState) error { + if err := data.Params.Validate(); err != nil { + return err + } + + return ValidateMinter(data.Minter) +} diff --git a/x/mint/types/genesis.pb.go b/x/mint/types/genesis.pb.go new file mode 100644 index 0000000..7a46bbf --- /dev/null +++ b/x/mint/types/genesis.pb.go @@ -0,0 +1,379 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/mint/v1beta1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the mint module's genesis state. +type GenesisState struct { + // minter is a space for holding current inflation information. + Minter Minter `protobuf:"bytes,1,opt,name=minter,proto3" json:"minter"` + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_0e215eb1d09cd648, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetMinter() Minter { + if m != nil { + return m.Minter + } + return Minter{} +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "cosmos.mint.v1beta1.GenesisState") +} + +func init() { proto.RegisterFile("cosmos/mint/v1beta1/genesis.proto", fileDescriptor_0e215eb1d09cd648) } + +var fileDescriptor_0e215eb1d09cd648 = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, + 0x28, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, + 0x83, 0x58, 0x10, 0xa5, 0x52, 0x72, 0xd8, 0x4c, 0x03, 0xeb, 0x83, 0xc8, 0x0b, 0x26, 0xe6, 0x66, + 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x90, 0x52, 0x1f, 0x23, 0x17, 0x8f, 0x3b, 0xc4, 0xbe, 0xe0, + 0x92, 0xc4, 0x92, 0x54, 0x21, 0x3b, 0x2e, 0x36, 0x90, 0x8e, 0xd4, 0x22, 0x09, 0x46, 0x05, 0x46, + 0x0d, 0x6e, 0x23, 0x69, 0x3d, 0x2c, 0xf6, 0xeb, 0xf9, 0x82, 0x95, 0x38, 0x71, 0x9e, 0xb8, 0x27, + 0xcf, 0xb0, 0xe2, 0xf9, 0x06, 0x2d, 0xc6, 0x20, 0xa8, 0x2e, 0x90, 0xfe, 0x82, 0xc4, 0xa2, 0xc4, + 0xdc, 0x62, 0x09, 0x26, 0x3c, 0xfa, 0x03, 0xc0, 0x4a, 0x50, 0xf4, 0x43, 0x74, 0x39, 0x39, 0x9f, + 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, + 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x66, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd4, 0xa3, 0x10, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x02, + 0xe2, 0xeb, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xe7, 0x8c, 0x01, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xf3, 0xd5, 0x6f, 0x47, 0x5f, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Minter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Minter.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Minter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Minter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/mint/types/keys.go b/x/mint/types/keys.go new file mode 100644 index 0000000..83c365a --- /dev/null +++ b/x/mint/types/keys.go @@ -0,0 +1,17 @@ +package types + +import "cosmossdk.io/collections" + +var ( + // MinterKey is the key to use for the keeper store. + MinterKey = collections.NewPrefix(0) + ParamsKey = collections.NewPrefix(1) +) + +const ( + // module name + ModuleName = "mint" + + // StoreKey is the default store key for mint + StoreKey = ModuleName +) diff --git a/x/mint/types/mint.pb.go b/x/mint/types/mint.pb.go new file mode 100644 index 0000000..7080736 --- /dev/null +++ b/x/mint/types/mint.pb.go @@ -0,0 +1,782 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/mint/v1beta1/mint.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Minter represents the minting state. +type Minter struct { + // current annual inflation rate + Inflation cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation"` + // current annual expected provisions + AnnualProvisions cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"annual_provisions"` +} + +func (m *Minter) Reset() { *m = Minter{} } +func (m *Minter) String() string { return proto.CompactTextString(m) } +func (*Minter) ProtoMessage() {} +func (*Minter) Descriptor() ([]byte, []int) { + return fileDescriptor_2df116d183c1e223, []int{0} +} +func (m *Minter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Minter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Minter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Minter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Minter.Merge(m, src) +} +func (m *Minter) XXX_Size() int { + return m.Size() +} +func (m *Minter) XXX_DiscardUnknown() { + xxx_messageInfo_Minter.DiscardUnknown(m) +} + +var xxx_messageInfo_Minter proto.InternalMessageInfo + +// Params defines the parameters for the x/mint module. +type Params struct { + // type of coin to mint + MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` + // maximum annual change in inflation rate + InflationRateChange cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=inflation_rate_change,json=inflationRateChange,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_rate_change"` + // maximum inflation rate + InflationMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=inflation_max,json=inflationMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_max"` + // minimum inflation rate + InflationMin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=inflation_min,json=inflationMin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_min"` + // goal of percent bonded atoms + GoalBonded cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=goal_bonded,json=goalBonded,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"goal_bonded"` + // expected blocks per year + BlocksPerYear uint64 `protobuf:"varint,6,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_2df116d183c1e223, []int{1} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMintDenom() string { + if m != nil { + return m.MintDenom + } + return "" +} + +func (m *Params) GetBlocksPerYear() uint64 { + if m != nil { + return m.BlocksPerYear + } + return 0 +} + +func init() { + proto.RegisterType((*Minter)(nil), "cosmos.mint.v1beta1.Minter") + proto.RegisterType((*Params)(nil), "cosmos.mint.v1beta1.Params") +} + +func init() { proto.RegisterFile("cosmos/mint/v1beta1/mint.proto", fileDescriptor_2df116d183c1e223) } + +var fileDescriptor_2df116d183c1e223 = []byte{ + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xb1, 0x8e, 0xd3, 0x30, + 0x18, 0xc7, 0x63, 0xee, 0x88, 0x54, 0xc3, 0x09, 0xce, 0x07, 0x52, 0x38, 0x74, 0xb9, 0xd3, 0x0d, + 0xe8, 0x38, 0xe9, 0x12, 0x55, 0x48, 0x0c, 0x8c, 0xbd, 0x8e, 0x9c, 0xa8, 0xb2, 0x20, 0x40, 0x22, + 0xfa, 0x92, 0x98, 0xd4, 0x34, 0xb6, 0x2b, 0xdb, 0x57, 0xb5, 0xaf, 0xc0, 0xc4, 0x63, 0x30, 0x76, + 0x60, 0xe1, 0x0d, 0x3a, 0x56, 0x4c, 0x88, 0xa1, 0x42, 0xed, 0xd0, 0x89, 0x77, 0x40, 0x89, 0xa3, + 0x54, 0x82, 0x09, 0xca, 0x12, 0xc5, 0xff, 0xff, 0xe7, 0xdf, 0xf7, 0x97, 0xfd, 0x19, 0xfb, 0xa9, + 0xd4, 0x5c, 0xea, 0x90, 0x33, 0x61, 0xc2, 0x51, 0x3b, 0xa1, 0x06, 0xda, 0xd5, 0x22, 0x18, 0x2a, + 0x69, 0x24, 0x39, 0xb0, 0x7e, 0x50, 0x49, 0xb5, 0x7f, 0x78, 0x2f, 0x97, 0xb9, 0xac, 0xfc, 0xb0, + 0xfc, 0xb3, 0xa5, 0x87, 0x0f, 0x6c, 0x69, 0x6c, 0x8d, 0x7a, 0x9f, 0xb5, 0xf6, 0x81, 0x33, 0x21, + 0xc3, 0xea, 0x6b, 0xa5, 0xd3, 0x2f, 0x08, 0xbb, 0x57, 0x4c, 0x18, 0xaa, 0xc8, 0x0b, 0xdc, 0x62, + 0xe2, 0x5d, 0x01, 0x86, 0x49, 0xe1, 0xa1, 0x13, 0x74, 0xd6, 0xea, 0xb4, 0x67, 0x8b, 0x63, 0xe7, + 0xfb, 0xe2, 0xf8, 0xa1, 0xc5, 0xe8, 0x6c, 0x10, 0x30, 0x19, 0x72, 0x30, 0xfd, 0xe0, 0x39, 0xcd, + 0x21, 0x9d, 0x74, 0x69, 0xfa, 0xf5, 0xf3, 0x05, 0xae, 0xbb, 0x74, 0x69, 0x1a, 0x6d, 0x18, 0xe4, + 0x2d, 0xde, 0x07, 0x21, 0xae, 0xa1, 0x28, 0xb3, 0x8c, 0x98, 0x66, 0x52, 0x68, 0xef, 0xc6, 0xbf, + 0x82, 0xef, 0x5a, 0x56, 0xaf, 0x41, 0x9d, 0xfe, 0xdc, 0xc1, 0x6e, 0x0f, 0x14, 0x70, 0x4d, 0x8e, + 0x30, 0x2e, 0x8f, 0x26, 0xce, 0xa8, 0x90, 0xdc, 0x86, 0x8f, 0x5a, 0xa5, 0xd2, 0x2d, 0x05, 0xf2, + 0x1e, 0xdf, 0x6f, 0x62, 0xc5, 0x0a, 0x0c, 0x8d, 0xd3, 0x3e, 0x88, 0x9c, 0xd6, 0x69, 0x9e, 0xfe, + 0x75, 0x9a, 0x4f, 0xeb, 0xe9, 0x39, 0x8a, 0x0e, 0x1a, 0x68, 0x04, 0x86, 0x5e, 0x56, 0x48, 0xf2, + 0x06, 0xef, 0x6d, 0x7a, 0x71, 0x18, 0x7b, 0x3b, 0x5b, 0xf5, 0xb8, 0xdd, 0xc0, 0xae, 0x60, 0xfc, + 0x1b, 0x9c, 0x09, 0x6f, 0xf7, 0x7f, 0xc1, 0x99, 0x20, 0x2f, 0xf1, 0xad, 0x5c, 0x42, 0x11, 0x27, + 0x52, 0x64, 0x34, 0xf3, 0x6e, 0x6e, 0x85, 0xc6, 0x25, 0xaa, 0x53, 0x91, 0xc8, 0x23, 0x7c, 0x27, + 0x29, 0x64, 0x3a, 0xd0, 0xf1, 0x90, 0xaa, 0x78, 0x42, 0x41, 0x79, 0xee, 0x09, 0x3a, 0xdb, 0x8d, + 0xf6, 0xac, 0xdc, 0xa3, 0xea, 0x15, 0x05, 0xf5, 0xec, 0xe8, 0xc3, 0x7a, 0x7a, 0xee, 0x59, 0xd2, + 0x85, 0xce, 0x06, 0xe1, 0xd8, 0x3e, 0x08, 0x7b, 0xc9, 0x9d, 0xcb, 0xd9, 0xd2, 0x47, 0xf3, 0xa5, + 0x8f, 0x7e, 0x2c, 0x7d, 0xf4, 0x71, 0xe5, 0x3b, 0xf3, 0x95, 0xef, 0x7c, 0x5b, 0xf9, 0xce, 0xeb, + 0xc7, 0x39, 0x33, 0xfd, 0xeb, 0x24, 0x48, 0x25, 0xaf, 0x27, 0x3e, 0xfc, 0x93, 0x62, 0x26, 0x43, + 0xaa, 0x13, 0xb7, 0x9a, 0xfb, 0x27, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xd0, 0x42, 0xaf, + 0x72, 0x03, 0x00, 0x00, +} + +func (m *Minter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Minter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Minter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.AnnualProvisions.Size() + i -= size + if _, err := m.AnnualProvisions.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Inflation.Size() + i -= size + if _, err := m.Inflation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlocksPerYear != 0 { + i = encodeVarintMint(dAtA, i, uint64(m.BlocksPerYear)) + i-- + dAtA[i] = 0x30 + } + { + size := m.GoalBonded.Size() + i -= size + if _, err := m.GoalBonded.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.InflationMin.Size() + i -= size + if _, err := m.InflationMin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.InflationMax.Size() + i -= size + if _, err := m.InflationMax.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.InflationRateChange.Size() + i -= size + if _, err := m.InflationRateChange.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMint(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MintDenom) > 0 { + i -= len(m.MintDenom) + copy(dAtA[i:], m.MintDenom) + i = encodeVarintMint(dAtA, i, uint64(len(m.MintDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMint(dAtA []byte, offset int, v uint64) int { + offset -= sovMint(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Minter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Inflation.Size() + n += 1 + l + sovMint(uint64(l)) + l = m.AnnualProvisions.Size() + n += 1 + l + sovMint(uint64(l)) + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MintDenom) + if l > 0 { + n += 1 + l + sovMint(uint64(l)) + } + l = m.InflationRateChange.Size() + n += 1 + l + sovMint(uint64(l)) + l = m.InflationMax.Size() + n += 1 + l + sovMint(uint64(l)) + l = m.InflationMin.Size() + n += 1 + l + sovMint(uint64(l)) + l = m.GoalBonded.Size() + n += 1 + l + sovMint(uint64(l)) + if m.BlocksPerYear != 0 { + n += 1 + sovMint(uint64(m.BlocksPerYear)) + } + return n +} + +func sovMint(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMint(x uint64) (n int) { + return sovMint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Minter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Minter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Minter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Inflation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Inflation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnnualProvisions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AnnualProvisions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMint(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MintDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflationRateChange", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflationRateChange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflationMax", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflationMax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflationMin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflationMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GoalBonded", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMint + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMint + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GoalBonded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksPerYear", wireType) + } + m.BlocksPerYear = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlocksPerYear |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMint(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMint(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMint + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMint + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMint + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMint = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMint = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/mint/types/minter.go b/x/mint/types/minter.go new file mode 100644 index 0000000..349198a --- /dev/null +++ b/x/mint/types/minter.go @@ -0,0 +1,82 @@ +package types + +import ( + "fmt" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// NewMinter returns a new Minter object with the given inflation and annual +// provisions values. +func NewMinter(inflation, annualProvisions math.LegacyDec) Minter { + return Minter{ + Inflation: inflation, + AnnualProvisions: annualProvisions, + } +} + +// InitialMinter returns an initial Minter object with a given inflation value. +func InitialMinter(inflation math.LegacyDec) Minter { + return NewMinter( + inflation, + math.LegacyNewDec(0), + ) +} + +// DefaultInitialMinter returns a default initial Minter object for a new chain +// which uses an inflation rate of 13%. +func DefaultInitialMinter() Minter { + return InitialMinter( + math.LegacyNewDecWithPrec(13, 2), + ) +} + +// ValidateMinter does a basic validation on minter. +func ValidateMinter(minter Minter) error { + if minter.Inflation.IsNegative() { + return fmt.Errorf("mint parameter Inflation should be positive, is %s", + minter.Inflation.String()) + } + return nil +} + +// NextInflationRate returns the new inflation rate for the next block. +func (m Minter) NextInflationRate(params Params, bondedRatio math.LegacyDec) math.LegacyDec { + // The target annual inflation rate is recalculated for each block. The inflation + // is also subject to a rate change (positive or negative) depending on the + // distance from the desired ratio (67%). The maximum rate change possible is + // defined to be 13% per year, however the annual inflation is capped as between + // 7% and 20%. + + // (1 - bondedRatio/GoalBonded) * InflationRateChange + inflationRateChangePerYear := math.LegacyOneDec(). + Sub(bondedRatio.Quo(params.GoalBonded)). + Mul(params.InflationRateChange) + inflationRateChange := inflationRateChangePerYear.Quo(math.LegacyNewDec(int64(params.BlocksPerYear))) + + // adjust the new annual inflation for this next block + inflation := m.Inflation.Add(inflationRateChange) // note inflationRateChange may be negative + if inflation.GT(params.InflationMax) { + inflation = params.InflationMax + } + if inflation.LT(params.InflationMin) { + inflation = params.InflationMin + } + + return inflation +} + +// NextAnnualProvisions returns the annual provisions based on current total +// supply and inflation rate. +func (m Minter) NextAnnualProvisions(_ Params, totalSupply math.Int) math.LegacyDec { + return m.Inflation.MulInt(totalSupply) +} + +// BlockProvision returns the provisions for a block based on the annual +// provisions rate. +func (m Minter) BlockProvision(params Params) sdk.Coin { + provisionAmt := m.AnnualProvisions.QuoInt(math.NewInt(int64(params.BlocksPerYear))) + return sdk.NewCoin(params.MintDenom, provisionAmt.TruncateInt()) +} diff --git a/x/mint/types/minter_test.go b/x/mint/types/minter_test.go new file mode 100644 index 0000000..dbfdf4c --- /dev/null +++ b/x/mint/types/minter_test.go @@ -0,0 +1,138 @@ +package types + +import ( + "math/rand" + "testing" + + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func TestNextInflation(t *testing.T) { + minter := DefaultInitialMinter() + params := DefaultParams() + blocksPerYr := math.LegacyNewDec(int64(params.BlocksPerYear)) + + // Governing Mechanism: + // inflationRateChangePerYear = (1- BondedRatio/ GoalBonded) * MaxInflationRateChange + + tests := []struct { + bondedRatio, setInflation, expChange math.LegacyDec + }{ + // with 0% bonded atom supply the inflation should increase by InflationRateChange + {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(7, 2), params.InflationRateChange.Quo(blocksPerYr)}, + + // 100% bonded, starting at 20% inflation and being reduced + // (1 - (1/0.67))*(0.13/8667) + { + math.LegacyOneDec(), math.LegacyNewDecWithPrec(20, 2), + math.LegacyOneDec().Sub(math.LegacyOneDec().Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr), + }, + + // 50% bonded, starting at 10% inflation and being increased + { + math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(10, 2), + math.LegacyOneDec().Sub(math.LegacyNewDecWithPrec(5, 1).Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr), + }, + + // test 7% minimum stop (testing with 100% bonded) + {math.LegacyOneDec(), math.LegacyNewDecWithPrec(7, 2), math.LegacyZeroDec()}, + {math.LegacyOneDec(), math.LegacyNewDecWithPrec(700000001, 10), math.LegacyNewDecWithPrec(-1, 10)}, + + // test 20% maximum stop (testing with 0% bonded) + {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(20, 2), math.LegacyZeroDec()}, + {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(1999999999, 10), math.LegacyNewDecWithPrec(1, 10)}, + + // perfect balance shouldn't change inflation + {math.LegacyNewDecWithPrec(67, 2), math.LegacyNewDecWithPrec(15, 2), math.LegacyZeroDec()}, + } + for i, tc := range tests { + minter.Inflation = tc.setInflation + + inflation := minter.NextInflationRate(params, tc.bondedRatio) + diffInflation := inflation.Sub(tc.setInflation) + + require.True(t, diffInflation.Equal(tc.expChange), + "Test Index: %v\nDiff: %v\nExpected: %v\n", i, diffInflation, tc.expChange) + } +} + +func TestBlockProvision(t *testing.T) { + minter := InitialMinter(math.LegacyNewDecWithPrec(1, 1)) + params := DefaultParams() + + secondsPerYear := int64(60 * 60 * 8766) + + tests := []struct { + annualProvisions int64 + expProvisions int64 + }{ + {secondsPerYear / 5, 1}, + {secondsPerYear/5 + 1, 1}, + {(secondsPerYear / 5) * 2, 2}, + {(secondsPerYear / 5) / 2, 0}, + } + for i, tc := range tests { + minter.AnnualProvisions = math.LegacyNewDec(tc.annualProvisions) + provisions := minter.BlockProvision(params) + + expProvisions := sdk.NewCoin(params.MintDenom, + math.NewInt(tc.expProvisions)) + + require.True(t, expProvisions.IsEqual(provisions), + "test: %v\n\tExp: %v\n\tGot: %v\n", + i, tc.expProvisions, provisions) + } +} + +// Benchmarking :) +// previously using math.Int operations: +// BenchmarkBlockProvision-4 5000000 220 ns/op +// +// using math.LegacyDec operations: (current implementation) +// BenchmarkBlockProvision-4 3000000 429 ns/op +func BenchmarkBlockProvision(b *testing.B) { + b.ReportAllocs() + minter := InitialMinter(math.LegacyNewDecWithPrec(1, 1)) + params := DefaultParams() + + s1 := rand.NewSource(100) + r1 := rand.New(s1) + minter.AnnualProvisions = math.LegacyNewDec(r1.Int63n(1000000)) + + // run the BlockProvision function b.N times + for n := 0; n < b.N; n++ { + minter.BlockProvision(params) + } +} + +// Next inflation benchmarking +// BenchmarkNextInflation-4 1000000 1828 ns/op +func BenchmarkNextInflation(b *testing.B) { + b.ReportAllocs() + minter := InitialMinter(math.LegacyNewDecWithPrec(1, 1)) + params := DefaultParams() + bondedRatio := math.LegacyNewDecWithPrec(1, 1) + + // run the NextInflationRate function b.N times + for n := 0; n < b.N; n++ { + minter.NextInflationRate(params, bondedRatio) + } +} + +// Next annual provisions benchmarking +// BenchmarkNextAnnualProvisions-4 5000000 251 ns/op +func BenchmarkNextAnnualProvisions(b *testing.B) { + b.ReportAllocs() + minter := InitialMinter(math.LegacyNewDecWithPrec(1, 1)) + params := DefaultParams() + totalSupply := math.NewInt(100000000000000) + + // run the NextAnnualProvisions function b.N times + for n := 0; n < b.N; n++ { + minter.NextAnnualProvisions(params, totalSupply) + } +} diff --git a/x/mint/types/params.go b/x/mint/types/params.go new file mode 100644 index 0000000..4c31610 --- /dev/null +++ b/x/mint/types/params.go @@ -0,0 +1,170 @@ +package types + +import ( + "errors" + "fmt" + "strings" + + "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// NewParams returns Params instance with the given values. +func NewParams(mintDenom string, inflationRateChange, inflationMax, inflationMin, goalBonded math.LegacyDec, blocksPerYear uint64) Params { + return Params{ + MintDenom: mintDenom, + InflationRateChange: inflationRateChange, + InflationMax: inflationMax, + InflationMin: inflationMin, + GoalBonded: goalBonded, + BlocksPerYear: blocksPerYear, + } +} + +// DefaultParams returns default x/mint module parameters. +func DefaultParams() Params { + return Params{ + MintDenom: sdk.DefaultBondDenom, + InflationRateChange: math.LegacyNewDecWithPrec(13, 2), + InflationMax: math.LegacyNewDecWithPrec(20, 2), + InflationMin: math.LegacyNewDecWithPrec(7, 2), + GoalBonded: math.LegacyNewDecWithPrec(67, 2), + BlocksPerYear: uint64(60 * 60 * 8766 / 5), // assuming 5 second block times + } +} + +// Validate does the sanity check on the params. +func (p Params) Validate() error { + if err := validateMintDenom(p.MintDenom); err != nil { + return err + } + if err := validateInflationRateChange(p.InflationRateChange); err != nil { + return err + } + if err := validateInflationMax(p.InflationMax); err != nil { + return err + } + if err := validateInflationMin(p.InflationMin); err != nil { + return err + } + if err := validateGoalBonded(p.GoalBonded); err != nil { + return err + } + if err := validateBlocksPerYear(p.BlocksPerYear); err != nil { + return err + } + if p.InflationMax.LT(p.InflationMin) { + return fmt.Errorf( + "max inflation (%s) must be greater than or equal to min inflation (%s)", + p.InflationMax, p.InflationMin, + ) + } + + return nil +} + +func validateMintDenom(i interface{}) error { + v, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if strings.TrimSpace(v) == "" { + return errors.New("mint denom cannot be blank") + } + if err := sdk.ValidateDenom(v); err != nil { + return err + } + + return nil +} + +func validateInflationRateChange(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNil() { + return fmt.Errorf("inflation rate change cannot be nil: %s", v) + } + if v.IsNegative() { + return fmt.Errorf("inflation rate change cannot be negative: %s", v) + } + if v.GT(math.LegacyOneDec()) { + return fmt.Errorf("inflation rate change too large: %s", v) + } + + return nil +} + +func validateInflationMax(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNil() { + return fmt.Errorf("max inflation cannot be nil: %s", v) + } + if v.IsNegative() { + return fmt.Errorf("max inflation cannot be negative: %s", v) + } + if v.GT(math.LegacyOneDec()) { + return fmt.Errorf("max inflation too large: %s", v) + } + + return nil +} + +func validateInflationMin(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNil() { + return fmt.Errorf("min inflation cannot be nil: %s", v) + } + if v.IsNegative() { + return fmt.Errorf("min inflation cannot be negative: %s", v) + } + if v.GT(math.LegacyOneDec()) { + return fmt.Errorf("min inflation too large: %s", v) + } + + return nil +} + +func validateGoalBonded(i interface{}) error { + v, ok := i.(math.LegacyDec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNil() { + return fmt.Errorf("goal bonded cannot be nil: %s", v) + } + if v.IsNegative() || v.IsZero() { + return fmt.Errorf("goal bonded must be positive: %s", v) + } + if v.GT(math.LegacyOneDec()) { + return fmt.Errorf("goal bonded too large: %s", v) + } + + return nil +} + +func validateBlocksPerYear(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v == 0 { + return fmt.Errorf("blocks per year must be positive: %d", v) + } + + return nil +} diff --git a/x/mint/types/params_legacy.go b/x/mint/types/params_legacy.go new file mode 100644 index 0000000..23354e2 --- /dev/null +++ b/x/mint/types/params_legacy.go @@ -0,0 +1,39 @@ +/* +NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov +controlled execution of MsgUpdateParams messages. These types remains solely +for migration purposes and will be removed in a future release. +*/ +package types + +import ( + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// Parameter store keys +var ( + KeyMintDenom = []byte("MintDenom") + KeyInflationRateChange = []byte("InflationRateChange") + KeyInflationMax = []byte("InflationMax") + KeyInflationMin = []byte("InflationMin") + KeyGoalBonded = []byte("GoalBonded") + KeyBlocksPerYear = []byte("BlocksPerYear") +) + +// Deprecated: ParamTable for minting module. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// Implements params.ParamSet +// +// Deprecated. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyMintDenom, &p.MintDenom, validateMintDenom), + paramtypes.NewParamSetPair(KeyInflationRateChange, &p.InflationRateChange, validateInflationRateChange), + paramtypes.NewParamSetPair(KeyInflationMax, &p.InflationMax, validateInflationMax), + paramtypes.NewParamSetPair(KeyInflationMin, &p.InflationMin, validateInflationMin), + paramtypes.NewParamSetPair(KeyGoalBonded, &p.GoalBonded, validateGoalBonded), + paramtypes.NewParamSetPair(KeyBlocksPerYear, &p.BlocksPerYear, validateBlocksPerYear), + } +} diff --git a/x/mint/types/query.pb.go b/x/mint/types/query.pb.go new file mode 100644 index 0000000..838e86a --- /dev/null +++ b/x/mint/types/query.pb.go @@ -0,0 +1,1204 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/mint/v1beta1/query.proto + +package types + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a1e393be338aea, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a1e393be338aea, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// QueryInflationRequest is the request type for the Query/Inflation RPC method. +type QueryInflationRequest struct { +} + +func (m *QueryInflationRequest) Reset() { *m = QueryInflationRequest{} } +func (m *QueryInflationRequest) String() string { return proto.CompactTextString(m) } +func (*QueryInflationRequest) ProtoMessage() {} +func (*QueryInflationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a1e393be338aea, []int{2} +} +func (m *QueryInflationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInflationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInflationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryInflationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInflationRequest.Merge(m, src) +} +func (m *QueryInflationRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryInflationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInflationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInflationRequest proto.InternalMessageInfo + +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. +type QueryInflationResponse struct { + // inflation is the current minting inflation value. + Inflation cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation"` +} + +func (m *QueryInflationResponse) Reset() { *m = QueryInflationResponse{} } +func (m *QueryInflationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryInflationResponse) ProtoMessage() {} +func (*QueryInflationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a1e393be338aea, []int{3} +} +func (m *QueryInflationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInflationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInflationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryInflationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInflationResponse.Merge(m, src) +} +func (m *QueryInflationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryInflationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInflationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInflationResponse proto.InternalMessageInfo + +// QueryAnnualProvisionsRequest is the request type for the +// Query/AnnualProvisions RPC method. +type QueryAnnualProvisionsRequest struct { +} + +func (m *QueryAnnualProvisionsRequest) Reset() { *m = QueryAnnualProvisionsRequest{} } +func (m *QueryAnnualProvisionsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAnnualProvisionsRequest) ProtoMessage() {} +func (*QueryAnnualProvisionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a1e393be338aea, []int{4} +} +func (m *QueryAnnualProvisionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAnnualProvisionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAnnualProvisionsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAnnualProvisionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAnnualProvisionsRequest.Merge(m, src) +} +func (m *QueryAnnualProvisionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAnnualProvisionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAnnualProvisionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAnnualProvisionsRequest proto.InternalMessageInfo + +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. +type QueryAnnualProvisionsResponse struct { + // annual_provisions is the current minting annual provisions value. + AnnualProvisions cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"annual_provisions"` +} + +func (m *QueryAnnualProvisionsResponse) Reset() { *m = QueryAnnualProvisionsResponse{} } +func (m *QueryAnnualProvisionsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAnnualProvisionsResponse) ProtoMessage() {} +func (*QueryAnnualProvisionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a1e393be338aea, []int{5} +} +func (m *QueryAnnualProvisionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAnnualProvisionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAnnualProvisionsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAnnualProvisionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAnnualProvisionsResponse.Merge(m, src) +} +func (m *QueryAnnualProvisionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAnnualProvisionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAnnualProvisionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAnnualProvisionsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.mint.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.mint.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryInflationRequest)(nil), "cosmos.mint.v1beta1.QueryInflationRequest") + proto.RegisterType((*QueryInflationResponse)(nil), "cosmos.mint.v1beta1.QueryInflationResponse") + proto.RegisterType((*QueryAnnualProvisionsRequest)(nil), "cosmos.mint.v1beta1.QueryAnnualProvisionsRequest") + proto.RegisterType((*QueryAnnualProvisionsResponse)(nil), "cosmos.mint.v1beta1.QueryAnnualProvisionsResponse") +} + +func init() { proto.RegisterFile("cosmos/mint/v1beta1/query.proto", fileDescriptor_d0a1e393be338aea) } + +var fileDescriptor_d0a1e393be338aea = []byte{ + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4d, 0x6b, 0x14, 0x31, + 0x18, 0xc7, 0x37, 0x8a, 0x0b, 0x1b, 0x3d, 0xb4, 0x69, 0x7d, 0x9b, 0x6d, 0xb3, 0x65, 0x84, 0xba, + 0x56, 0x9a, 0xb0, 0x2b, 0x78, 0x14, 0x5c, 0x7b, 0x11, 0x3c, 0xd4, 0xa2, 0x17, 0x2f, 0x92, 0x9d, + 0xc6, 0x69, 0xe8, 0x4e, 0x32, 0xdd, 0x64, 0x8a, 0x7b, 0x13, 0xf1, 0xe8, 0x41, 0xf0, 0x4b, 0xe8, + 0xcd, 0x83, 0x5f, 0x41, 0xe8, 0xb1, 0xe8, 0x45, 0x3c, 0x14, 0xd9, 0x15, 0xfc, 0x1a, 0x32, 0x49, + 0xa6, 0xe2, 0x74, 0x06, 0x95, 0x5e, 0x76, 0x67, 0x9e, 0xb7, 0xff, 0x2f, 0xcf, 0x3f, 0x03, 0x3b, + 0x91, 0xd2, 0x89, 0xd2, 0x34, 0x11, 0xd2, 0xd0, 0xfd, 0xde, 0x90, 0x1b, 0xd6, 0xa3, 0x7b, 0x19, + 0x1f, 0x4f, 0x48, 0x3a, 0x56, 0x46, 0xa1, 0x05, 0x57, 0x40, 0xf2, 0x02, 0xe2, 0x0b, 0x82, 0xc5, + 0x58, 0xc5, 0xca, 0xe6, 0x69, 0xfe, 0xe4, 0x4a, 0x83, 0xa5, 0x58, 0xa9, 0x78, 0xc4, 0x29, 0x4b, + 0x05, 0x65, 0x52, 0x2a, 0xc3, 0x8c, 0x50, 0x52, 0xfb, 0x2c, 0xae, 0x52, 0xb2, 0x53, 0x5d, 0x7e, + 0x9e, 0x25, 0x42, 0x2a, 0x6a, 0x7f, 0x7d, 0xe8, 0xaa, 0x6b, 0x79, 0xea, 0x94, 0x3c, 0x88, 0x7d, + 0x09, 0x17, 0x21, 0x7a, 0x98, 0x53, 0x6e, 0xb2, 0x31, 0x4b, 0xf4, 0x16, 0xdf, 0xcb, 0xb8, 0x36, + 0xe1, 0x63, 0xb8, 0xf0, 0x47, 0x54, 0xa7, 0x4a, 0x6a, 0x8e, 0xee, 0xc0, 0x66, 0x6a, 0x23, 0x57, + 0xc0, 0x0a, 0xe8, 0x9e, 0xef, 0xb7, 0x49, 0xc5, 0xa1, 0x88, 0x6b, 0x1a, 0xb4, 0x0e, 0x8e, 0x3a, + 0x8d, 0x77, 0x3f, 0x3f, 0xac, 0x81, 0x2d, 0xdf, 0x15, 0x5e, 0x86, 0x17, 0xed, 0xd8, 0xfb, 0xf2, + 0xd9, 0xc8, 0x9e, 0xa9, 0xd0, 0x93, 0xf0, 0x52, 0x39, 0xe1, 0x25, 0x1f, 0xc1, 0x96, 0x28, 0x82, + 0x56, 0xf5, 0xc2, 0xe0, 0x76, 0x3e, 0xf8, 0xdb, 0x51, 0xa7, 0xed, 0xc4, 0xf5, 0xf6, 0x2e, 0x11, + 0x8a, 0x26, 0xcc, 0xec, 0x90, 0x07, 0x3c, 0x66, 0xd1, 0x64, 0x83, 0x47, 0x9f, 0x3f, 0xae, 0x43, + 0xcf, 0xb6, 0xc1, 0x23, 0x47, 0xf1, 0x7b, 0x50, 0x88, 0xe1, 0x92, 0xd5, 0xbb, 0x2b, 0x65, 0xc6, + 0x46, 0x9b, 0x63, 0xb5, 0x2f, 0x74, 0xbe, 0xe2, 0x82, 0xe7, 0x15, 0x80, 0xcb, 0x35, 0x05, 0x9e, + 0x2b, 0x82, 0xf3, 0xcc, 0xe6, 0xf2, 0xa5, 0xfa, 0xe4, 0x29, 0xf9, 0xe6, 0x58, 0x49, 0xac, 0xff, + 0xe9, 0x2c, 0x3c, 0x67, 0x31, 0xd0, 0x0b, 0x00, 0x9b, 0x6e, 0xaf, 0xe8, 0x7a, 0xe5, 0xd2, 0x4f, + 0x9a, 0x18, 0x74, 0xff, 0x5e, 0xe8, 0x0e, 0x13, 0x5e, 0x7b, 0xf9, 0xe5, 0xc7, 0xdb, 0x33, 0xcb, + 0xa8, 0x4d, 0xab, 0xee, 0x96, 0x33, 0x0f, 0xbd, 0x06, 0xb0, 0x75, 0xec, 0x0f, 0x5a, 0xab, 0x1f, + 0x5e, 0x76, 0x37, 0xb8, 0xf9, 0x4f, 0xb5, 0x9e, 0x65, 0xd5, 0xb2, 0xac, 0x20, 0x5c, 0xc9, 0x72, + 0x6c, 0x21, 0x7a, 0x0f, 0xe0, 0x5c, 0xd9, 0x1d, 0xd4, 0xab, 0x57, 0xaa, 0xb1, 0x3a, 0xe8, 0xff, + 0x4f, 0x8b, 0x67, 0x24, 0x96, 0xb1, 0x8b, 0x56, 0x2b, 0x19, 0x4f, 0xdc, 0x8b, 0xc1, 0xbd, 0x83, + 0x29, 0x06, 0x87, 0x53, 0x0c, 0xbe, 0x4f, 0x31, 0x78, 0x33, 0xc3, 0x8d, 0xc3, 0x19, 0x6e, 0x7c, + 0x9d, 0xe1, 0xc6, 0x93, 0x1b, 0xb1, 0x30, 0x3b, 0xd9, 0x90, 0x44, 0x2a, 0x29, 0x66, 0xb9, 0xbf, + 0x75, 0xbd, 0xbd, 0x4b, 0x9f, 0xbb, 0xc1, 0x66, 0x92, 0x72, 0x3d, 0x6c, 0xda, 0x0f, 0xf6, 0xd6, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x1a, 0x74, 0xc5, 0x6a, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params returns the total set of minting parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Inflation returns the current minting inflation value. + Inflation(ctx context.Context, in *QueryInflationRequest, opts ...grpc.CallOption) (*QueryInflationResponse, error) + // AnnualProvisions current minting annual provisions value. + AnnualProvisions(ctx context.Context, in *QueryAnnualProvisionsRequest, opts ...grpc.CallOption) (*QueryAnnualProvisionsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Inflation(ctx context.Context, in *QueryInflationRequest, opts ...grpc.CallOption) (*QueryInflationResponse, error) { + out := new(QueryInflationResponse) + err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Query/Inflation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AnnualProvisions(ctx context.Context, in *QueryAnnualProvisionsRequest, opts ...grpc.CallOption) (*QueryAnnualProvisionsResponse, error) { + out := new(QueryAnnualProvisionsResponse) + err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Query/AnnualProvisions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params returns the total set of minting parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Inflation returns the current minting inflation value. + Inflation(context.Context, *QueryInflationRequest) (*QueryInflationResponse, error) + // AnnualProvisions current minting annual provisions value. + AnnualProvisions(context.Context, *QueryAnnualProvisionsRequest) (*QueryAnnualProvisionsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Inflation(ctx context.Context, req *QueryInflationRequest) (*QueryInflationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Inflation not implemented") +} +func (*UnimplementedQueryServer) AnnualProvisions(ctx context.Context, req *QueryAnnualProvisionsRequest) (*QueryAnnualProvisionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnnualProvisions not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.mint.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Inflation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryInflationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Inflation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.mint.v1beta1.Query/Inflation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Inflation(ctx, req.(*QueryInflationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AnnualProvisions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAnnualProvisionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AnnualProvisions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.mint.v1beta1.Query/AnnualProvisions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AnnualProvisions(ctx, req.(*QueryAnnualProvisionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.mint.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Inflation", + Handler: _Query_Inflation_Handler, + }, + { + MethodName: "AnnualProvisions", + Handler: _Query_AnnualProvisions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/mint/v1beta1/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryInflationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryInflationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInflationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryInflationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryInflationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInflationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Inflation.Size() + i -= size + if _, err := m.Inflation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAnnualProvisionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAnnualProvisionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAnnualProvisionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAnnualProvisionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAnnualProvisionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAnnualProvisionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.AnnualProvisions.Size() + i -= size + if _, err := m.AnnualProvisions.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryInflationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryInflationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Inflation.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAnnualProvisionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAnnualProvisionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AnnualProvisions.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryInflationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryInflationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInflationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryInflationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryInflationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInflationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Inflation", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Inflation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAnnualProvisionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAnnualProvisionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAnnualProvisionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAnnualProvisionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAnnualProvisionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAnnualProvisionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnnualProvisions", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AnnualProvisions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/mint/types/query.pb.gw.go b/x/mint/types/query.pb.gw.go new file mode 100644 index 0000000..7ed551a --- /dev/null +++ b/x/mint/types/query.pb.gw.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cosmos/mint/v1beta1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Inflation_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInflationRequest + var metadata runtime.ServerMetadata + + msg, err := client.Inflation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Inflation_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInflationRequest + var metadata runtime.ServerMetadata + + msg, err := server.Inflation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AnnualProvisions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAnnualProvisionsRequest + var metadata runtime.ServerMetadata + + msg, err := client.AnnualProvisions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AnnualProvisions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAnnualProvisionsRequest + var metadata runtime.ServerMetadata + + msg, err := server.AnnualProvisions(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Inflation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Inflation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Inflation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AnnualProvisions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AnnualProvisions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AnnualProvisions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Inflation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Inflation_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Inflation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AnnualProvisions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AnnualProvisions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AnnualProvisions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "mint", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Inflation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "mint", "v1beta1", "inflation"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AnnualProvisions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "mint", "v1beta1", "annual_provisions"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Inflation_0 = runtime.ForwardResponseMessage + + forward_Query_AnnualProvisions_0 = runtime.ForwardResponseMessage +) diff --git a/x/mint/types/tx.pb.go b/x/mint/types/tx.pb.go new file mode 100644 index 0000000..e4a8f90 --- /dev/null +++ b/x/mint/types/tx.pb.go @@ -0,0 +1,606 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/mint/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/mint parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_a0d933a8bf5e188a, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a0d933a8bf5e188a, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.mint.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.mint.v1beta1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("cosmos/mint/v1beta1/tx.proto", fileDescriptor_a0d933a8bf5e188a) } + +var fileDescriptor_a0d933a8bf5e188a = []byte{ + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, + 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xea, 0x81, 0x64, 0xf5, + 0xa0, 0xb2, 0x52, 0xe2, 0x30, 0x2d, 0xc5, 0xe9, 0xfa, 0x65, 0x86, 0x20, 0x0a, 0xa2, 0x5a, 0x4a, + 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x85, 0xe4, 0xb0, 0x19, 0x0f, 0x36, 0x0d, + 0x22, 0x2f, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x66, 0xea, 0x83, 0x58, 0x50, 0x51, 0x49, 0x88, 0xae, + 0x78, 0x88, 0x04, 0xd4, 0x0d, 0x60, 0x8e, 0xd2, 0x7e, 0x46, 0x2e, 0x7e, 0xdf, 0xe2, 0xf4, 0xd0, + 0x82, 0x94, 0xc4, 0x92, 0xd4, 0x80, 0xc4, 0xa2, 0xc4, 0xdc, 0x62, 0x21, 0x33, 0x2e, 0xce, 0xc4, + 0xd2, 0x92, 0x8c, 0xfc, 0xa2, 0xcc, 0x92, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0x89, + 0x4b, 0x5b, 0x74, 0x45, 0xa0, 0x1a, 0x1d, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x83, 0x4b, 0x8a, + 0x32, 0xf3, 0xd2, 0x83, 0x10, 0x4a, 0x85, 0xec, 0xb8, 0xd8, 0x0a, 0xc0, 0x26, 0x48, 0x30, 0x29, + 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xeb, 0x61, 0xf1, 0xae, 0x1e, 0xc4, 0x12, 0x27, 0xce, 0x13, 0xf7, + 0xe4, 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd5, 0x65, 0x65, 0xd2, 0xf4, 0x7c, 0x83, + 0x16, 0xc2, 0xbc, 0xae, 0xe7, 0x1b, 0xb4, 0x14, 0x21, 0x26, 0xe8, 0x16, 0xa7, 0x64, 0xeb, 0x57, + 0x40, 0x7c, 0x8d, 0xe6, 0x5a, 0x25, 0x49, 0x2e, 0x71, 0x34, 0xa1, 0xa0, 0xd4, 0xe2, 0x82, 0xfc, + 0xbc, 0xe2, 0x54, 0xa3, 0x02, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0xa1, 0x24, 0x2e, 0x1e, 0x14, 0xff, + 0xa9, 0x60, 0x75, 0x17, 0x9a, 0x21, 0x52, 0x3a, 0xc4, 0xa8, 0x82, 0x59, 0x25, 0xc5, 0xda, 0x00, + 0xf2, 0x8a, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, + 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa6, + 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0x63, 0x40, 0x1f, 0xd3, 0x6f, 0x25, + 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0xa8, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x13, + 0x9e, 0x4f, 0xda, 0x4c, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a governance operation for updating the x/mint module + // parameters. The authority is defaults to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.mint.v1beta1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a governance operation for updating the x/mint module + // parameters. The authority is defaults to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.mint.v1beta1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.mint.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/mint/v1beta1/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +)