diff --git a/codec/amino_codec_test.go b/codec/amino_codec_test.go index 90008fd51fb0..0c2be15db106 100644 --- a/codec/amino_codec_test.go +++ b/codec/amino_codec_test.go @@ -120,7 +120,7 @@ func TestAminoCodecUnpackAnyFails(t *testing.T) { func TestAminoCodecFullDecodeAndEncode(t *testing.T) { // This tx comes from https://github.com/cosmos/cosmos-sdk/issues/8117. - txSigned := `{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"cosmos14pt0q5cwf38zt08uu0n6yrstf3rndzr5057jys","validator_address":"cosmosvaloper14pt0q5cwf38zt08uu0n6yrstf3rndzr52q28gr","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}` + txSigned := `{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"0","delegator_address":"cosmos14pt0q5cwf38zt08uu0n6yrstf3rndzr5057jys","validator_address":"cosmosvaloper14pt0q5cwf38zt08uu0n6yrstf3rndzr52q28gr","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}` legacyCdc := simapp.MakeTestEncodingConfig().Amino var tx legacytx.StdTx err := legacyCdc.UnmarshalJSON([]byte(txSigned), &tx) diff --git a/docs/architecture/adr-061-liquid-staking.md b/docs/architecture/adr-061-liquid-staking.md new file mode 100644 index 000000000000..e490d793a799 --- /dev/null +++ b/docs/architecture/adr-061-liquid-staking.md @@ -0,0 +1,409 @@ +# ADR 061: Liquid Staking Module + +## Changelog + +* 2022-09-10: Initial Draft (@zmanian) +* 2023-07-10: (@zmanian, @sampocs, @rileyedmunds, @mpoke) + +## Status + +ACCEPTED + +## Abstract + +Add a semi-fungible liquid staking primitive to the default Cosmos SDK staking module. While implemented as changes to existing modules, these additional features are hereinafter referred to as the liquid staking module (LSM). This upgrades proof of stake to enable safe designs with lower overall monetary issuance and integration with numerous liquid staking protocols like Stride, Persistence, Quicksilver, Lido etc. + +## Context + +The original release of the Cosmos Hub featured the implementation of a ground breaking proof of stake mechanism featuring delegation, slashing, in protocol reward distribution and adaptive issuance. This design was state of the art for 2016 and has been deployed without major changes by many L1 blockchains. + +As both Proof of Stake and blockchain use cases have matured, this design has aged poorly and should no longer be considered a good baseline Proof of Stake issuance. In the world of application specific blockchains, there cannot be a one size fits all blockchain but the Cosmos SDK does endeavour to provide a good baseline implementation and one that is suitable for the Cosmos Hub. + +The most important deficiency of the legacy staking design is that it composes poorly with on chain protocols for trading, lending, derivatives that are referred to collectively as DeFi. The legacy staking implementation starves these applications of liquidity by increasing the risk free rate adaptively. It basically makes DeFi and staking security somewhat incompatible. + +The Osmosis team has adopted the idea of Superfluid and Interfluid staking where assets that are participating in DeFi appliactions can also be used in proof of stake. This requires tight integration with an enshrined set of DeFi applications and thus is unsuitable for the Cosmos SDK. + +It's also important to note that Interchain Accounts are available in the default IBC implementation and can be used to [rehypothecate](https://www.investopedia.com/terms/h/hypothecation.asp#toc-what-is-rehypothecation) delegations. Thus liquid staking is already possible and these changes merely improve the UX of liquid staking. Centralized exchanges also rehypothecate staked assets, posing challenges for decentralization. This ADR takes the position that adoption of in-protocol liquid staking is the preferable outcome and provides new levers to incentivize decentralization of stake. + +These changes to the staking module have been in development for more than a year and have seen substantial industry adoption by protocols who plan to build staking UX. The internal economics team at Informal has also done a review of the impact of these changes and this review led to the development of the validator bond system. This system provides governance with a tuneable parameter for modulating the risks of principal agent problem called the validator bond factor. + +Liquid proof of stake systems exacerbate the risk that a single entity - the liquid staking provider - amasses more than ⅓ the total staked supply on a given chain, giving it the power to halt that chain’s block production or censor transactions and proposals. + +Liquid proof of stake may also exacerbate the principal agent risk that exists at the heart of the delegated proof of stake system. The core of the problem is that validators do not actually own the stake that is delegated to them. This leaves them open to perverse incentives to attack the consensus system. Cosmos introduced the idea of min self bond in the staking. This creates a minimum amount of stake the must be bonded by the validators operator key. This feature has very little effect on the behavior of delegates. + +## Decision + +We implement the semi-fungible liquid staking system and validator bond factor system within the cosmos sdk. Though registered as fungible assets, these tokenized shares have extremely limited fungibility, only among the specific delegation record that was created when shares were tokenized. These assets can be used for OTC trades but composability with DeFi is limited. The primary expected use case is improving the user experience of liquid staking providers. + +The LSM is designed to safely and efficiently facilitate the adoption of liquid staking. + +The LSM mitigates liquid staking risks by limiting the total amount of tokens that can be liquid staked to X% of all staked tokens (in the case of the Cosmos Hub, 25% as decided by Governance). + +As additional risk-mitigation features, the LSM introduces a requirement that validators self-bond tokens to be eligible for delegations from liquid staking providers, and that the portion of their liquid staked shares must not exceed X% of their total shares (50% on the Cosmos Hub). + +A new governance parameter is introduced that defines the ratio of validator bonded tokens to issued tokenized shares. This is called the _validator bond factor_. A larger validator bond factor allows more tokenized shares to be issued for a smaller amount of validator bond. If governance is comfortable with how the liquid staking market is evolving, it makes sense to increase this value. + +Min self delegation is removed from the staking system with the expectation that it will be replaced by the validator bond system. The validator bond system allows multiple accounts to demonstrate economic alignment with the validator operator as team members, partners etc. without co-mingling funds. Validator bonding will likely be required to grow the validators' business under widespread adoption of liquid staking once governance has adjusted the validator bond factor. + +When shares are tokenized, the underlying shares are transferred to a module account and rewards go to the module account for the TokenizedShareRecord. + +There is no longer a mechanism to override the validators vote for TokenizedShares. + +Delegations from 32-length addresses and LSM tokenized shares are tracked against the global liquid staking, validator liquid staking cap, and validator bond caps. This requires changing the standard staking transactions to track these variables and ensure safety limits are enforced. The reason for checking the account type is because ICAs and tokenize share record module accounts have 32-length addresses, so in practice this limits liquid staking. To be clear, any ICA or module account staking is counted against this cap - not just ICA delegations from liquid staking providers. + +### Limiting liquid staking + + +The LSM would limit the percentage of liquid staked tokens by all liquid staking providers to 25% of the total supply of staked tokens. For example, if 100M tokens were currently staked, and if the LSM were installed today then the total liquid staked supply would be limited to a maximum of 25M tokens. + +This is a key safety feature, as it would prevent liquid staking providers from collectively controlling more than ⅓ of the total staked token supply, which is the threshold at which a group of bad actors could halt block production. + +Additionally, a separate cap is enforced on each validator's portion of liquid staked shares. Once X% of shares (on the Cosmoshub, 50% based on the parameter value chosen by governance) are liquid, the validator is unable to accept additional liquid stakes. + +Technically speaking, this cap on liquid staked tokens is enforced by limiting the total number of tokens that can be staked via interchain accounts plus the number of tokens that can be tokenized using LSM. Once this joint cap is reached, the LSM prevents interchain accounts from staking any more tokens and prevents tokenization of delegations using LSM. + +Note that the limit of the percentage of liquid staked tokens will not fully hold if the total stake is dropping. As an example, a 25% cap leaves room for over 33% of the non-LS ATOM to unbond before the share of voting power held by liquid staking providers would reach 33%. For example, say there are 100 ATOM total staked, 25 of which are liquid staked; 25 of the 75 remaining ATOM need to unbond for the liquid staked voting power to rise to 33%. + + +### Validator bond + +As an additional security feature, validators who want to receive delegations from liquid staking providers would be required to self-bond a certain amount of tokens. The validator self-bond, or “validator-bond,” means that validators need to have “skin in the game” in order to be entrusted with delegations from liquid staking providers. This disincentivizes malicious behavior and enables the validator to negotiate its relationship with liquid staking providers. + +Technically speaking, the validator-bond is tracked by the LSM. The maximum number of tokens that can be delegated to a validator by a liquid staking provider is equal to the validator-bond multiplied by the “validator-bond factor.” The initial validator bond factor would be set at 250, but can be configured by governance. + +With a validator-bond factor of 250, for every 1 token a validator self-bonds, that validator is eligible to receive up to two-hundred-and-fifty tokens delegated from liquid staking providers. The validator-bond has no impact on anything other than eligibility for delegations from liquid staking providers. + +Without self-bonding tokens, a validator can’t receive delegations from liquid staking providers. And if a validator’s maximum amount of delegated tokens from liquid staking providers has been met, it would have to self-bond more tokens to become eligible for additional liquid staking provider delegations. + +### Instantly liquid staking tokens that are already staked + +Next, let’s discuss how the LSM makes the adoption of liquid staking more efficient, and can help the blockchain that installs it build strong relationships with liquid staking providers. The LSM enables users to instantly liquid stake their staked tokens, without having to wait the unbonding period. This is important, because a very large portion of the token supply on most Cosmos blockchains is currently staked. Liquid staking tokens that are already staked incur a switching cost in the form of forfeited staking rewards over the chain's unbonding period. The LSM eliminates this switching cost. + + +A user would be able to visit any liquid staking provider that has integrated with the LSM and click a button to convert his staked tokens to liquid staked tokens. It would be as easy as liquid staking unstaked tokens. + +Technically speaking, this is accomplished by using something called an “LSM share.” Using the liquid staking module, a user can tokenize their staked tokens and turn it into LSM shares. LSM shares can be redeemed for underlying staked tokens and are transferable. After staked tokens are tokenized they can be immediately transferred to a liquid staking provider in exchange for liquid staking tokens - without having to wait for the unbonding period. + +### LSM share token + +When tokenizing a delegation, the returned token has a denom of the format `{validatorAddress}/{recordId}`, where `recordId` is a monotonically increasing number that increments every tokenization. As a result, two successive tokenizations to the same validator will yield different denom's. +Additionally, the share tokens returned will map 1:1 with the number of shares of the underlying delegation (e.g. if the delegation of X shares is tokenized, X share tokens be returned). This reduces ambiguity with respect to the value of the token if a slash occurs after tokenization. + +### Toggling the ability to tokenize shares + +Currently LSM facilitates the immediate conversion of staked assets into liquid staked tokens (referred to as "tokenization"). Despite the many benefits that come with this capability, it does inadvertently negate a protective measure available via traditional staking, where an account can stake their tokens to render them illiquid in the event that their wallet is compromised (the attacker would first need to unbond, then transfer out the tokens). + +LSM would obviate this safety measure, as an attacker could tokenize and immediately transfer staked tokens to another wallet. So, as an additional protective measure, this proposal incorporates a feature to permit accounts to selectively disable the tokenization of their stake. + +The LSM grants the ability to enable and disable the ability to tokenizate their stake. When tokenization is disabled, a lock is placed on the account, effectively preventing the conversion of any of their delegations. Re-enabling tokenization would initiate the removal of the lock, but the process is not immediate. The lock removal is queued, with the lock itself persisting throughout the unbonding period. Following the completion of the unbonding period, the lock would be completely removed, restoring the account's ablility to tokenize. For LST protocols that enable the lock, this delay better positions the base layer to coordinate a recovery in the event of an exploit. + +## Economics + +We expect that eventually governance may decide that the principal agent problems between validators and liquid staking are resolved through the existence of mature liquid staking synthetic asset systems and their associate risk framework. Governance can effectively disable the feature by setting the scalar value to -1 and allow unlimited minting and all liquid delegations to be freely undelegated. + +During the transitionary period, this creates a market for liquid shares that may serve to help further decentralize the validator set. + +It also allows multiple participants in a validator business to hold their personal stakes in segregated accounts but all collectively contribute towards demonstrating alignment with the safety of the protocol. + +## Instructions for validators +Once delegated to a validator, a delegator (or validator operator) can convert their delegation to a validator into Validator Bond by signing a ValidatorBond message. + +The ValidatorBond message is exposed by the staking module and can be executed as follows: +``` +gaiad tx staking validator-bond cosmosvaloper13h5xdxhsdaugwdrkusf8lkgu406h8t62jkqv3h --from mykey +``` +There are no partial Validator Bonds: when a delegator or validator converts their shares to a particular validator into Validator Bond, their entire delegation to that validator is converted to Validator Bond. If a validator or delegator wishes to convert only some of their delegation to Validator Bond, they should transfer those funds to a separate address and Validator Bond from that address, or redelegate the funds that they do not wish to validator bond to another validator before converting their delegation to validator bond. + +To convert Validator Bond back into a standard delegation, simply unbond the shares. + +## Technical Spec: + +### Software parameters + +New governance parameters are introduced that define the cap on the percentage of delegated shares than can be liquid, namely the `GlobalLiquidStakingCap` and `ValidatorLiquidStakingCap`. The `ValidatorBondFactor` governance parameter defines the number of tokens that can be liquid staked, relative to a validator's validator bond. + +```proto +// Params defines the parameters for the staking module. +message Params { + // ... existing params... + // validator_bond_factor is required as a safety check for tokenizing shares and + // delegations from liquid staking providers + string validator_bond_factor = 7 [ + (gogoproto.moretags) = "yaml:\"validator_bond_factor\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // global_liquid_staking_cap represents a cap on the portion of stake that + // comes from liquid staking providers + string global_liquid_staking_cap = 8 [ + (gogoproto.moretags) = "yaml:\"global_liquid_staking_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // validator_liquid_staking_cap represents a cap on the portion of stake that + // comes from liquid staking providers for a specific validator + string validator_liquid_staking_cap = 9 [ + (gogoproto.moretags) = "yaml:\"validator_liquid_staking_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +``` + +### Data structures + +#### Validator +The `ValidatorBondShares` and `LiquidShares` attributes were added to the `Validator` struct. + +```proto +message Validator { + // ...existing attributes... + // Number of shares self bonded from the validator + string validator_bond_shares = 11 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // Number of shares either tokenized or owned by a liquid staking provider + string liquid_shares = 12 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +``` + +#### Delegation +The `ValidatorBond` attribute was added to the `Delegation` struct. + +```proto +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +message Delegation { + // ...existing attributes... + // has this delegation been marked as a validator self bond. + bool validator_bond = 4; +} +``` + +#### Toggling the ability to tokenize shares +```proto +// PendingTokenizeShareAuthorizations stores a list of addresses that have their +// tokenize share re-enablement in progress +message PendingTokenizeShareAuthorizations { + repeated string addresses = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +// Prevents an address from tokenizing any of their delegations +message MsgDisableTokenizeShares { + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// EnableTokenizeShares begins the re-allowing of tokenizing shares for an address, +// which will complete after the unbonding period +// The time at which the lock is completely removed is returned in the response +message MsgEnableTokenizeShares { + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + + +### Tracking total liquid stake +To monitor the progress towards the global liquid staking cap, the module needs to know two things: the total amount of staked tokens and the total amount of *liquid staked* tokens. The total staked tokens can be found by checking the balance of the "Bonded" pool. The total *liquid staked* tokens are stored separately and can be found under the `TotalLiquidStakedTokensKey` prefix (`[]byte{0x65}`). The value is managed by the following keeper functions: +```go +func (k Keeper) SetTotalLiquidStakedTokens(ctx sdk.Context, tokens sdk.Dec) +func (k Keeper) GetTotalLiquidStakedTokens(ctx sdk.Context) sdk.Dec +``` + +### Tokenizing shares + +The MsgTokenizeShares message is used to create tokenize delegated tokens. This message can be executed by any delegator who has positive amount of delegation and after execution the specific amount of delegation disappear from the account and share tokens are provided. Share tokens are denominated in the validator and record id of the underlying delegation. + +A user may tokenize some or all of their delegation. + +They will receive shares with the denom of `cosmosvaloper1xxxx/5` where 5 is the record id for the validator operator. + +MsgTokenizeShares fails if the account is a VestingAccount and the user does not have enough free delegation to complete the tokenization. + +The total amount of outstanding tokenized shares for the validator is checked against the sum of validator bond delegations multiplied by the validator bond factor. If the tokenized shares exceeds this limit, execution fails. + +MsgTokenizeSharesResponse provides the number of tokens generated and their denom. + +### Helper functions +In order to identify whether a liquid stake transaction will exceed either the global liquid staking cap or the validator bond cap, the following functions were added: + +```go +// Check if an account is a owned by a liquid staking provider +// Checking for a 32-length address will capture +// ICA accounts, as well as tokenized delegations which are owned by module accounts under the hood +// which will identify the following scenarios: +// - An account has tokenized their shares, and thus the delegation is +// owned by the tokenize share record module account +// - A liquid staking provider is delegating through an ICA account +// +// Both ICA accounts and tokenize share record module accounts have 32-length addresses +func (k Keeper) DelegatorIsLiquidStaker(address sdk.AccAddress) bool + +// SafelyIncreaseTotalLiquidStakedTokens increments the total liquid staked tokens +// if the caps are enabled and the global cap is not surpassed by this delegation +func (k Keeper) SafelyIncreaseTotalLiquidStakedTokens(ctx sdk.Context, amount sdk.Int) error + +// DecreaseTotalLiquidStakedTokens decrements the total liquid staked tokens +// if the caps are enabled +func (k Keeper) DecreaseTotalLiquidStakedTokens(ctx sdk.Context, amount sdk.Int) error + +// SafelyIncreaseValidatorLiquidShares increments the liquid shares on a validator +// if the caps are enabled and the validator bond cap is not surpassed by this delegation +func (k Keeper) SafelyIncreaseValidatorLiquidShares(ctx sdk.Context, validator types.Validator, shares sdk.Dec) error + +// DecreaseValidatorLiquidShares decrements the liquid shares on a validator +// if the caps are enabled +func (k Keeper) DecreaseValidatorLiquidShares(ctx sdk.Context, validator types.Validator, shares sdk.Dec) error + +// SafelyDecreaseValidatorBond decrements the validator's self bond +// so long as it will not cause the current delegations to exceed the threshold +// set by validator bond factor +func (k Keeper) SafelyDecreaseValidatorBond(ctx sdk.Context, validator types.Validator, shares sdk.Dec) error +``` + +### Accounting +Tracking the total liquid stake and total liquid validator shares requires additional accounting changes in the following transactions/events: + +```go +func Delegate() { + ... + // If delegator is a liquid staking provider + // Increment total liquid staked + // Increment validator liquid shares +} + +func Undelegate() { + ... + // If delegator is a liquid staking provider + // Decrement total liquid staked + // Decrement validator liquid shares +} + +func BeginRedelegate() { + ... + // If delegator is a liquid staking provider + // Decrement source validator liquid shares + // Increment destination validator liquid shares +} + +func TokenizeShares() { + ... + // If delegator is a NOT liquid staking provider (otherwise the shares are already included) + // Increment total liquid staked + // Increment validator liquid shares +} + +func RedeemTokens() { + ... + // If delegator is a NOT liquid staking provider + // Decrement total liquid staked + // Decrement validator liquid shares +} + +func Slash() { + ... + // Decrement's the total liquid staked tokens + // The total should be adjusted by slash amount * liquid percentage + // Since a slash only modifies a validator's tokens and not their shares, + // the validator's LiquidShares do not have to be changed during a slash +} +``` + +### Transaction failure cases +With the liquid staking caps in consideration, there are additional scenarios that should cause a transaction to fail: +```go + +func Delegate() { + ... + // If delegator is a liquid staking provider + // Fail transaction if delegation exceeds global liquid staking cap + // Fail transaction if delegation exceeds validator liquid staking cap + // Fail transaction if delegation exceeds validator bond cap +} + +func Undelegate() { + ... + // If the unbonded delegation is a ValidatorBond + // Fail transaction if the reduction in validator bond would cause the + // existing liquid delegation to exceed the cap +} + +func BeginRedelegate() { + ... + // If the delegation is a ValidatorBond + // Fail transaction if the reduction in validator bond would cause the + // existing liquid delegation to exceed the cap + + // If delegator is a liquid staking provider + // Fail transaction if delegation exceeds global liquid staking cap + // Fail transaction if delegation exceeds validator liquid staking cap + // Fail transaction if delegation exceeds validator bond cap +} + +func TokenizeShares() { + ... + // If the delegation is a ValidatorBond + // Fail transaction - ValidatorBond's cannot be tokenized + + // If the sender is NOT a liquid staking provider + // Fail transaction if tokenized shares would exceed the global liquid staking cap + // Fail transaction if tokenized shares would exceed the validator liquid staking cap + // Fail transaction if tokenized shares would exceed the validator bond cap +} +``` + +### Bootstrapping total liquid stake +When upgrading to enable the liquid staking module, the total global liquid stake and total liquid validator shares must be determined. This can be done in the upgrade handler by looping through delegation records and including the delegation in the total if the delegator has a 32-length address. This is implemented by the following function: +```go +func RefreshTotalLiquidStaked() { + // Resets all validator LiquidShares to 0 + // Loops delegation records + // For each delegation, determines if the delegation was from a 32-length address + // If so, increments the global liquid staking cap and validator liquid shares +} +``` + +### Toggling the ability to tokenize shares + +```go +// Adds a lock that prevents tokenizing shares for an account +// The tokenize share lock store is implemented by keying on the account address +// and storing a timestamp as the value. The timestamp is empty when the lock is +// set and gets populated with the unlock completion time once the unlock has started +func AddTokenizeSharesLock(address sdk.AccAddress) + +// Removes the tokenize share lock for an account to enable tokenizing shares +func RemoveTokenizeSharesLock(address sdk.AccAddress) + +// Updates the timestamp associated with a lock to the time at which the lock expires +func SetTokenizeShareUnlockTime(address sdk.AccAddress, completionTime time.Time) + +// Checks if there is currently a tokenize share lock for a given account +// Returns a bool indicating if the account is locked, as well as the unlock time +// which may be empty if an unlock has not been initiated +func IsTokenizeSharesDisabled(address sdk.AccAddress) (disabled bool, unlockTime time.Time) + +// Stores a list of addresses pending tokenize share unlocking at the same time +func SetPendingTokenizeShareAuthorizations(completionTime time.Time, authorizations types.PendingTokenizeShareAuthorizations) + +// Returns a list of addresses pending tokenize share unlocking at the same time +func GetPendingTokenizeShareAuthorizations() PendingTokenizeShareAuthorizations + +// Inserts the address into a queue where it will sit for 1 unbonding period +// before the tokenize share lock is removed +// Returns the completion time +func QueueTokenizeSharesAuthorization(address sdk.AccAddress) time.Time + +// Unlocks all queued tokenize share authorizations that have matured +// (i.e. have waited the full unbonding period) +func RemoveExpiredTokenizeShareLocks(blockTime time.Time) (unlockedAddresses []string) +``` + +## References + +Please see this document for a technical spec for the LSM: https://docs.google.com/document/d/1WYPUHmQii4o-q2225D_XyqE6-1bvM7Q128Y9amqRwqY/edit#heading=h.zcpx47mn67kl diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 535020d37b38..c8e8f7606c9a 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -252,6 +252,7 @@ - [DelegatorStartingInfo](#cosmos.distribution.v1beta1.DelegatorStartingInfo) - [FeePool](#cosmos.distribution.v1beta1.FeePool) - [Params](#cosmos.distribution.v1beta1.Params) + - [TokenizeShareRecordReward](#cosmos.distribution.v1beta1.TokenizeShareRecordReward) - [ValidatorAccumulatedCommission](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) - [ValidatorCurrentRewards](#cosmos.distribution.v1beta1.ValidatorCurrentRewards) - [ValidatorHistoricalRewards](#cosmos.distribution.v1beta1.ValidatorHistoricalRewards) @@ -282,6 +283,8 @@ - [QueryDelegatorWithdrawAddressResponse](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse) - [QueryParamsRequest](#cosmos.distribution.v1beta1.QueryParamsRequest) - [QueryParamsResponse](#cosmos.distribution.v1beta1.QueryParamsResponse) + - [QueryTokenizeShareRecordRewardRequest](#cosmos.distribution.v1beta1.QueryTokenizeShareRecordRewardRequest) + - [QueryTokenizeShareRecordRewardResponse](#cosmos.distribution.v1beta1.QueryTokenizeShareRecordRewardResponse) - [QueryValidatorCommissionRequest](#cosmos.distribution.v1beta1.QueryValidatorCommissionRequest) - [QueryValidatorCommissionResponse](#cosmos.distribution.v1beta1.QueryValidatorCommissionResponse) - [QueryValidatorOutstandingRewardsRequest](#cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest) @@ -296,8 +299,12 @@ - [MsgFundCommunityPoolResponse](#cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) - [MsgSetWithdrawAddress](#cosmos.distribution.v1beta1.MsgSetWithdrawAddress) - [MsgSetWithdrawAddressResponse](#cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) + - [MsgWithdrawAllTokenizeShareRecordReward](#cosmos.distribution.v1beta1.MsgWithdrawAllTokenizeShareRecordReward) + - [MsgWithdrawAllTokenizeShareRecordRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawAllTokenizeShareRecordRewardResponse) - [MsgWithdrawDelegatorReward](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) - [MsgWithdrawDelegatorRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) + - [MsgWithdrawTokenizeShareRecordReward](#cosmos.distribution.v1beta1.MsgWithdrawTokenizeShareRecordReward) + - [MsgWithdrawTokenizeShareRecordRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawTokenizeShareRecordRewardResponse) - [MsgWithdrawValidatorCommission](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) - [MsgWithdrawValidatorCommissionResponse](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) @@ -473,11 +480,13 @@ - [Description](#cosmos.staking.v1beta1.Description) - [HistoricalInfo](#cosmos.staking.v1beta1.HistoricalInfo) - [Params](#cosmos.staking.v1beta1.Params) + - [PendingTokenizeShareAuthorizations](#cosmos.staking.v1beta1.PendingTokenizeShareAuthorizations) - [Pool](#cosmos.staking.v1beta1.Pool) - [Redelegation](#cosmos.staking.v1beta1.Redelegation) - [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) - [RedelegationEntryResponse](#cosmos.staking.v1beta1.RedelegationEntryResponse) - [RedelegationResponse](#cosmos.staking.v1beta1.RedelegationResponse) + - [TokenizeShareRecord](#cosmos.staking.v1beta1.TokenizeShareRecord) - [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) - [UnbondingDelegationEntry](#cosmos.staking.v1beta1.UnbondingDelegationEntry) - [ValAddresses](#cosmos.staking.v1beta1.ValAddresses) @@ -486,12 +495,16 @@ - [BondStatus](#cosmos.staking.v1beta1.BondStatus) - [InfractionType](#cosmos.staking.v1beta1.InfractionType) + - [TokenizeShareLockStatus](#cosmos.staking.v1beta1.TokenizeShareLockStatus) - [cosmos/staking/v1beta1/genesis.proto](#cosmos/staking/v1beta1/genesis.proto) - [GenesisState](#cosmos.staking.v1beta1.GenesisState) - [LastValidatorPower](#cosmos.staking.v1beta1.LastValidatorPower) + - [TokenizeShareLock](#cosmos.staking.v1beta1.TokenizeShareLock) - [cosmos/staking/v1beta1/query.proto](#cosmos/staking/v1beta1/query.proto) + - [QueryAllTokenizeShareRecordsRequest](#cosmos.staking.v1beta1.QueryAllTokenizeShareRecordsRequest) + - [QueryAllTokenizeShareRecordsResponse](#cosmos.staking.v1beta1.QueryAllTokenizeShareRecordsResponse) - [QueryDelegationRequest](#cosmos.staking.v1beta1.QueryDelegationRequest) - [QueryDelegationResponse](#cosmos.staking.v1beta1.QueryDelegationResponse) - [QueryDelegatorDelegationsRequest](#cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest) @@ -504,12 +517,26 @@ - [QueryDelegatorValidatorsResponse](#cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse) - [QueryHistoricalInfoRequest](#cosmos.staking.v1beta1.QueryHistoricalInfoRequest) - [QueryHistoricalInfoResponse](#cosmos.staking.v1beta1.QueryHistoricalInfoResponse) + - [QueryLastTokenizeShareRecordIdRequest](#cosmos.staking.v1beta1.QueryLastTokenizeShareRecordIdRequest) + - [QueryLastTokenizeShareRecordIdResponse](#cosmos.staking.v1beta1.QueryLastTokenizeShareRecordIdResponse) - [QueryParamsRequest](#cosmos.staking.v1beta1.QueryParamsRequest) - [QueryParamsResponse](#cosmos.staking.v1beta1.QueryParamsResponse) - [QueryPoolRequest](#cosmos.staking.v1beta1.QueryPoolRequest) - [QueryPoolResponse](#cosmos.staking.v1beta1.QueryPoolResponse) - [QueryRedelegationsRequest](#cosmos.staking.v1beta1.QueryRedelegationsRequest) - [QueryRedelegationsResponse](#cosmos.staking.v1beta1.QueryRedelegationsResponse) + - [QueryTokenizeShareLockInfo](#cosmos.staking.v1beta1.QueryTokenizeShareLockInfo) + - [QueryTokenizeShareLockInfoResponse](#cosmos.staking.v1beta1.QueryTokenizeShareLockInfoResponse) + - [QueryTokenizeShareRecordByDenomRequest](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByDenomRequest) + - [QueryTokenizeShareRecordByDenomResponse](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByDenomResponse) + - [QueryTokenizeShareRecordByIdRequest](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByIdRequest) + - [QueryTokenizeShareRecordByIdResponse](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByIdResponse) + - [QueryTokenizeShareRecordsOwnedRequest](#cosmos.staking.v1beta1.QueryTokenizeShareRecordsOwnedRequest) + - [QueryTokenizeShareRecordsOwnedResponse](#cosmos.staking.v1beta1.QueryTokenizeShareRecordsOwnedResponse) + - [QueryTotalLiquidStaked](#cosmos.staking.v1beta1.QueryTotalLiquidStaked) + - [QueryTotalLiquidStakedResponse](#cosmos.staking.v1beta1.QueryTotalLiquidStakedResponse) + - [QueryTotalTokenizeSharedAssetsRequest](#cosmos.staking.v1beta1.QueryTotalTokenizeSharedAssetsRequest) + - [QueryTotalTokenizeSharedAssetsResponse](#cosmos.staking.v1beta1.QueryTotalTokenizeSharedAssetsResponse) - [QueryUnbondingDelegationRequest](#cosmos.staking.v1beta1.QueryUnbondingDelegationRequest) - [QueryUnbondingDelegationResponse](#cosmos.staking.v1beta1.QueryUnbondingDelegationResponse) - [QueryValidatorDelegationsRequest](#cosmos.staking.v1beta1.QueryValidatorDelegationsRequest) @@ -526,14 +553,30 @@ - [cosmos/staking/v1beta1/tx.proto](#cosmos/staking/v1beta1/tx.proto) - [MsgBeginRedelegate](#cosmos.staking.v1beta1.MsgBeginRedelegate) - [MsgBeginRedelegateResponse](#cosmos.staking.v1beta1.MsgBeginRedelegateResponse) + - [MsgCancelUnbondingDelegation](#cosmos.staking.v1beta1.MsgCancelUnbondingDelegation) + - [MsgCancelUnbondingDelegationResponse](#cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse) - [MsgCreateValidator](#cosmos.staking.v1beta1.MsgCreateValidator) - [MsgCreateValidatorResponse](#cosmos.staking.v1beta1.MsgCreateValidatorResponse) - [MsgDelegate](#cosmos.staking.v1beta1.MsgDelegate) - [MsgDelegateResponse](#cosmos.staking.v1beta1.MsgDelegateResponse) + - [MsgDisableTokenizeShares](#cosmos.staking.v1beta1.MsgDisableTokenizeShares) + - [MsgDisableTokenizeSharesResponse](#cosmos.staking.v1beta1.MsgDisableTokenizeSharesResponse) - [MsgEditValidator](#cosmos.staking.v1beta1.MsgEditValidator) - [MsgEditValidatorResponse](#cosmos.staking.v1beta1.MsgEditValidatorResponse) + - [MsgEnableTokenizeShares](#cosmos.staking.v1beta1.MsgEnableTokenizeShares) + - [MsgEnableTokenizeSharesResponse](#cosmos.staking.v1beta1.MsgEnableTokenizeSharesResponse) + - [MsgRedeemTokensForShares](#cosmos.staking.v1beta1.MsgRedeemTokensForShares) + - [MsgRedeemTokensForSharesResponse](#cosmos.staking.v1beta1.MsgRedeemTokensForSharesResponse) + - [MsgTokenizeShares](#cosmos.staking.v1beta1.MsgTokenizeShares) + - [MsgTokenizeSharesResponse](#cosmos.staking.v1beta1.MsgTokenizeSharesResponse) + - [MsgTransferTokenizeShareRecord](#cosmos.staking.v1beta1.MsgTransferTokenizeShareRecord) + - [MsgTransferTokenizeShareRecordResponse](#cosmos.staking.v1beta1.MsgTransferTokenizeShareRecordResponse) + - [MsgUnbondValidator](#cosmos.staking.v1beta1.MsgUnbondValidator) + - [MsgUnbondValidatorResponse](#cosmos.staking.v1beta1.MsgUnbondValidatorResponse) - [MsgUndelegate](#cosmos.staking.v1beta1.MsgUndelegate) - [MsgUndelegateResponse](#cosmos.staking.v1beta1.MsgUndelegateResponse) + - [MsgValidatorBond](#cosmos.staking.v1beta1.MsgValidatorBond) + - [MsgValidatorBondResponse](#cosmos.staking.v1beta1.MsgValidatorBondResponse) - [Msg](#cosmos.staking.v1beta1.Msg) @@ -3884,6 +3927,22 @@ Params defines the set of params for the distribution module. + + +### TokenizeShareRecordReward +TokenizeShareRecordReward represents the properties of tokenize share + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `record_id` | [uint64](#uint64) | | | +| `reward` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | + + + + + + ### ValidatorAccumulatedCommission @@ -4353,6 +4412,39 @@ QueryParamsResponse is the response type for the Query/Params RPC method. + + +### QueryTokenizeShareRecordRewardRequest +QueryTokenizeShareRecordRewardRequest is the request type for the Query/TokenizeShareRecordReward RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `owner_address` | [string](#string) | | | + + + + + + + + +### QueryTokenizeShareRecordRewardResponse +QueryTokenizeShareRecordRewardResponse is the response type for the Query/TokenizeShareRecordReward +RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `rewards` | [TokenizeShareRecordReward](#cosmos.distribution.v1beta1.TokenizeShareRecordReward) | repeated | rewards defines all the rewards accrued by a delegator. | +| `total` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | total defines the sum of all the rewards. | + + + + + + ### QueryValidatorCommissionRequest @@ -4475,6 +4567,7 @@ Query defines the gRPC querier service for distribution module. | `DelegatorValidators` | [QueryDelegatorValidatorsRequest](#cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest) | [QueryDelegatorValidatorsResponse](#cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse) | DelegatorValidators queries the validators of a delegator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators| | `DelegatorWithdrawAddress` | [QueryDelegatorWithdrawAddressRequest](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest) | [QueryDelegatorWithdrawAddressResponse](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse) | DelegatorWithdrawAddress queries withdraw address of a delegator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address| | `CommunityPool` | [QueryCommunityPoolRequest](#cosmos.distribution.v1beta1.QueryCommunityPoolRequest) | [QueryCommunityPoolResponse](#cosmos.distribution.v1beta1.QueryCommunityPoolResponse) | CommunityPool queries the community pool coins. | GET|/cosmos/distribution/v1beta1/community_pool| +| `TokenizeShareRecordReward` | [QueryTokenizeShareRecordRewardRequest](#cosmos.distribution.v1beta1.QueryTokenizeShareRecordRewardRequest) | [QueryTokenizeShareRecordRewardResponse](#cosmos.distribution.v1beta1.QueryTokenizeShareRecordRewardResponse) | TokenizeShareRecordReward queries the tokenize share record rewards | GET|/cosmos/distribution/v1beta1/{owner_address}/tokenize_share_record_rewards| @@ -4541,6 +4634,32 @@ MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. + + +### MsgWithdrawAllTokenizeShareRecordReward +MsgWithdrawAllTokenizeShareRecordReward withdraws tokenize share rewards or all +records owned by the designated owner + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `owner_address` | [string](#string) | | | + + + + + + + + +### MsgWithdrawAllTokenizeShareRecordRewardResponse +MsgWithdrawAllTokenizeShareRecordRewardResponse defines the Msg/WithdrawTokenizeShareRecordReward response type. + + + + + + ### MsgWithdrawDelegatorReward @@ -4568,6 +4687,32 @@ MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward respo + + +### MsgWithdrawTokenizeShareRecordReward +MsgWithdrawTokenizeShareRecordReward withdraws tokenize share rewards for a specific record + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `owner_address` | [string](#string) | | | +| `record_id` | [uint64](#uint64) | | | + + + + + + + + +### MsgWithdrawTokenizeShareRecordRewardResponse +MsgWithdrawTokenizeShareRecordReward defines the Msg/WithdrawTokenizeShareRecordReward response type. + + + + + + ### MsgWithdrawValidatorCommission @@ -4610,6 +4755,8 @@ Msg defines the distribution Msg service. | `SetWithdrawAddress` | [MsgSetWithdrawAddress](#cosmos.distribution.v1beta1.MsgSetWithdrawAddress) | [MsgSetWithdrawAddressResponse](#cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) | SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). | | | `WithdrawDelegatorReward` | [MsgWithdrawDelegatorReward](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) | [MsgWithdrawDelegatorRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) | WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. | | | `WithdrawValidatorCommission` | [MsgWithdrawValidatorCommission](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) | [MsgWithdrawValidatorCommissionResponse](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) | WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. | | +| `WithdrawTokenizeShareRecordReward` | [MsgWithdrawTokenizeShareRecordReward](#cosmos.distribution.v1beta1.MsgWithdrawTokenizeShareRecordReward) | [MsgWithdrawTokenizeShareRecordRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawTokenizeShareRecordRewardResponse) | WithdrawTokenizeShareRecordReward defines a method to withdraw reward for an owning TokenizeShareRecord | | +| `WithdrawAllTokenizeShareRecordReward` | [MsgWithdrawAllTokenizeShareRecordReward](#cosmos.distribution.v1beta1.MsgWithdrawAllTokenizeShareRecordReward) | [MsgWithdrawAllTokenizeShareRecordRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawAllTokenizeShareRecordRewardResponse) | WithdrawAllTokenizeShareRecordReward defines a method to withdraw reward for all owning TokenizeShareRecord | | | `FundCommunityPool` | [MsgFundCommunityPool](#cosmos.distribution.v1beta1.MsgFundCommunityPool) | [MsgFundCommunityPoolResponse](#cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) | FundCommunityPool defines a method to allow an account to directly fund the community pool. | | @@ -6656,6 +6803,7 @@ validator. | `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | | `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | | `shares` | [string](#string) | | shares define the delegation shares received. | +| `validator_bond` | [bool](#bool) | | has this delegation been marked as a validator self bond. | @@ -6730,6 +6878,25 @@ Params defines the parameters for the staking module. | `max_entries` | [uint32](#uint32) | | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | | `historical_entries` | [uint32](#uint32) | | historical_entries is the number of historical entries to persist. | | `bond_denom` | [string](#string) | | bond_denom defines the bondable coin denomination. | +| `validator_bond_factor` | [string](#string) | | validator_bond_factor is required as a safety check for tokenizing shares and delegations from liquid staking providers | +| `global_liquid_staking_cap` | [string](#string) | | global_liquid_staking_cap represents a cap on the portion of stake that comes from liquid staking providers | +| `validator_liquid_staking_cap` | [string](#string) | | validator_liquid_staking_cap represents a cap on the portion of stake that comes from liquid staking providers for a specific validator | + + + + + + + + +### PendingTokenizeShareAuthorizations +PendingTokenizeShareAuthorizations stores a list of addresses that have their +tokenize share enablement in progress + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `addresses` | [string](#string) | repeated | | @@ -6830,6 +6997,24 @@ responses. + + +### TokenizeShareRecord +TokenizeShareRecord represents a tokenized delegation + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | +| `owner` | [string](#string) | | | +| `module_account` | [string](#string) | | module account take the role of delegator | +| `validator` | [string](#string) | | validator delegated to for tokenize share record creation | + + + + + + ### UnbondingDelegation @@ -6910,9 +7095,11 @@ multiplied by exchange rate. | `unbonding_height` | [int64](#int64) | | unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. | | `unbonding_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. | | `commission` | [Commission](#cosmos.staking.v1beta1.Commission) | | commission defines the commission parameters. | -| `min_self_delegation` | [string](#string) | | min_self_delegation is the validator's self declared minimum self delegation. | +| `min_self_delegation` | [string](#string) | | **Deprecated.** Deprecated: This field has been deprecated with LSM in favor of the validator bond | | `unbonding_on_hold_ref_count` | [int64](#int64) | | strictly positive if this validator's unbonding has been stopped by external modules | | `unbonding_ids` | [uint64](#uint64) | repeated | list of unbonding ids, each uniquely identifing an unbonding of this validator | +| `validator_bond_shares` | [string](#string) | | Number of shares self bonded from the validator | +| `liquid_shares` | [string](#string) | | Number of shares either tokenized or owned by a liquid staking provider | @@ -6962,6 +7149,20 @@ InfractionType indicates the infraction type a validator commited. | INFRACTION_TYPE_DOWNTIME | 2 | DOWNTIME defines a validator that missed signing too many blocks. | + + + +### TokenizeShareLockStatus +TokenizeShareLockStatus indicates whether the address is able to tokenize shares + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TOKENIZE_SHARE_LOCK_STATUS_UNSPECIFIED | 0 | UNSPECIFIED defines an empty tokenize share lock status | +| TOKENIZE_SHARE_LOCK_STATUS_LOCKED | 1 | LOCKED indicates the account is locked and cannot tokenize shares | +| TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED | 2 | UNLOCKED indicates the account is unlocked and can tokenize shares | +| TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING | 3 | LOCK_EXPIRING indicates the account is unable to tokenize shares, but will be able to tokenize shortly (after 1 unbonding period) | + + @@ -6993,6 +7194,10 @@ GenesisState defines the staking module's genesis state. | `unbonding_delegations` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | unbonding_delegations defines the unbonding delegations active at genesis. | | `redelegations` | [Redelegation](#cosmos.staking.v1beta1.Redelegation) | repeated | redelegations defines the redelegations active at genesis. | | `exported` | [bool](#bool) | | | +| `tokenize_share_records` | [TokenizeShareRecord](#cosmos.staking.v1beta1.TokenizeShareRecord) | repeated | store tokenize share records to provide reward to record owners | +| `last_tokenize_share_record_id` | [uint64](#uint64) | | last tokenize share record id, used for next share record id calculation | +| `total_liquid_staked_tokens` | [bytes](#bytes) | | total number of liquid staked tokens at genesis | +| `tokenize_share_locks` | [TokenizeShareLock](#cosmos.staking.v1beta1.TokenizeShareLock) | repeated | tokenize shares locks at genesis | @@ -7014,6 +7219,23 @@ LastValidatorPower required for validator set update logic. + + + +### TokenizeShareLock +TokenizeSharesLock required for specifying account locks at genesis + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | Address of the account that is locked | +| `status` | [string](#string) | | Status of the lock (LOCKED or LOCK_EXPIRING) | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Completion time if the lock is expiring | + + + + + @@ -7031,6 +7253,39 @@ LastValidatorPower required for validator set update logic. + + +### QueryAllTokenizeShareRecordsRequest +QueryAllTokenizeShareRecordsRequest is request type for the +Query/QueryAllTokenizeShareRecords RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryAllTokenizeShareRecordsResponse +QueryAllTokenizeShareRecordsResponse is response type for the +Query/QueryAllTokenizeShareRecords RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `records` | [TokenizeShareRecord](#cosmos.staking.v1beta1.TokenizeShareRecord) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + ### QueryDelegationRequest @@ -7156,7 +7411,7 @@ Query/DelegatorValidator RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the the validator info. | +| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the validator info. | @@ -7189,7 +7444,7 @@ Query/DelegatorValidators RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | validators defines the the validators' info of a delegator. | +| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | validators defines the validators' info of a delegator. | | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | @@ -7229,6 +7484,33 @@ method. + + +### QueryLastTokenizeShareRecordIdRequest +QueryLastTokenizeShareRecordIdRequest is request type for the +Query/QueryLastTokenizeShareRecordId RPC method. + + + + + + + + +### QueryLastTokenizeShareRecordIdResponse +QueryLastTokenizeShareRecordIdResponse is response type for the +Query/QueryLastTokenizeShareRecordId RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | + + + + + + ### QueryParamsRequest @@ -7315,6 +7597,189 @@ method. + + +### QueryTokenizeShareLockInfo +QueryTokenizeShareLockInfo queries the tokenize share lock information +associated with given account + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | | + + + + + + + + +### QueryTokenizeShareLockInfoResponse +QueryTokenizeShareLockInfoResponse is the response from the +QueryTokenizeShareLockInfo query + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `status` | [string](#string) | | | +| `expiration_time` | [string](#string) | | | + + + + + + + + +### QueryTokenizeShareRecordByDenomRequest +QueryTokenizeShareRecordByDenomRequest is request type for the +Query/QueryTokenizeShareRecordByDenom RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom` | [string](#string) | | | + + + + + + + + +### QueryTokenizeShareRecordByDenomResponse +QueryTokenizeShareRecordByDenomResponse is response type for the +Query/QueryTokenizeShareRecordByDenom RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `record` | [TokenizeShareRecord](#cosmos.staking.v1beta1.TokenizeShareRecord) | | | + + + + + + + + +### QueryTokenizeShareRecordByIdRequest +QueryTokenizeShareRecordByIdRequest is request type for the +Query/QueryTokenizeShareRecordById RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | + + + + + + + + +### QueryTokenizeShareRecordByIdResponse +QueryTokenizeShareRecordByIdRequest is response type for the +Query/QueryTokenizeShareRecordById RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `record` | [TokenizeShareRecord](#cosmos.staking.v1beta1.TokenizeShareRecord) | | | + + + + + + + + +### QueryTokenizeShareRecordsOwnedRequest +QueryTokenizeShareRecordsOwnedRequest is request type for the +Query/QueryTokenizeShareRecordsOwned RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `owner` | [string](#string) | | | + + + + + + + + +### QueryTokenizeShareRecordsOwnedResponse +QueryTokenizeShareRecordsOwnedResponse is response type for the +Query/QueryTokenizeShareRecordsOwned RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `records` | [TokenizeShareRecord](#cosmos.staking.v1beta1.TokenizeShareRecord) | repeated | | + + + + + + + + +### QueryTotalLiquidStaked +QueryTotalLiquidStakedRequest is request type for the +Query/QueryQueryTotalLiquidStaked RPC method. + + + + + + + + +### QueryTotalLiquidStakedResponse +QueryTotalLiquidStakedResponse is response type for the +Query/QueryQueryTotalLiquidStaked RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `tokens` | [string](#string) | | | + + + + + + + + +### QueryTotalTokenizeSharedAssetsRequest +QueryTotalTokenizeSharedAssetsRequest is request type for the +Query/QueryTotalTokenizeSharedAssets RPC method. + + + + + + + + +### QueryTotalTokenizeSharedAssetsResponse +QueryTotalTokenizeSharedAssetsResponse is response type for the +Query/QueryTotalTokenizeSharedAssets RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + ### QueryUnbondingDelegationRequest @@ -7405,7 +7870,7 @@ QueryValidatorResponse is response type for the Query/Validator RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the the validator info. | +| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the validator info. | @@ -7505,6 +7970,14 @@ Query defines the gRPC querier service. | `HistoricalInfo` | [QueryHistoricalInfoRequest](#cosmos.staking.v1beta1.QueryHistoricalInfoRequest) | [QueryHistoricalInfoResponse](#cosmos.staking.v1beta1.QueryHistoricalInfoResponse) | HistoricalInfo queries the historical info for given height. | GET|/cosmos/staking/v1beta1/historical_info/{height}| | `Pool` | [QueryPoolRequest](#cosmos.staking.v1beta1.QueryPoolRequest) | [QueryPoolResponse](#cosmos.staking.v1beta1.QueryPoolResponse) | Pool queries the pool info. | GET|/cosmos/staking/v1beta1/pool| | `Params` | [QueryParamsRequest](#cosmos.staking.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.staking.v1beta1.QueryParamsResponse) | Parameters queries the staking parameters. | GET|/cosmos/staking/v1beta1/params| +| `TokenizeShareRecordById` | [QueryTokenizeShareRecordByIdRequest](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByIdRequest) | [QueryTokenizeShareRecordByIdResponse](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByIdResponse) | Query for individual tokenize share record information by share by id | GET|/cosmos/staking/v1beta1/tokenize_share_record_by_id/{id}| +| `TokenizeShareRecordByDenom` | [QueryTokenizeShareRecordByDenomRequest](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByDenomRequest) | [QueryTokenizeShareRecordByDenomResponse](#cosmos.staking.v1beta1.QueryTokenizeShareRecordByDenomResponse) | Query for individual tokenize share record information by share denom | GET|/cosmos/staking/v1beta1/tokenize_share_record_by_denom/{denom}| +| `TokenizeShareRecordsOwned` | [QueryTokenizeShareRecordsOwnedRequest](#cosmos.staking.v1beta1.QueryTokenizeShareRecordsOwnedRequest) | [QueryTokenizeShareRecordsOwnedResponse](#cosmos.staking.v1beta1.QueryTokenizeShareRecordsOwnedResponse) | Query tokenize share records by address | GET|/cosmos/staking/v1beta1/tokenize_share_record_owned/{owner}| +| `AllTokenizeShareRecords` | [QueryAllTokenizeShareRecordsRequest](#cosmos.staking.v1beta1.QueryAllTokenizeShareRecordsRequest) | [QueryAllTokenizeShareRecordsResponse](#cosmos.staking.v1beta1.QueryAllTokenizeShareRecordsResponse) | Query for all tokenize share records | GET|/cosmos/staking/v1beta1/tokenize_share_records| +| `LastTokenizeShareRecordId` | [QueryLastTokenizeShareRecordIdRequest](#cosmos.staking.v1beta1.QueryLastTokenizeShareRecordIdRequest) | [QueryLastTokenizeShareRecordIdResponse](#cosmos.staking.v1beta1.QueryLastTokenizeShareRecordIdResponse) | Query for last tokenize share record id | GET|/cosmos/staking/v1beta1/last_tokenize_share_record_id| +| `TotalTokenizeSharedAssets` | [QueryTotalTokenizeSharedAssetsRequest](#cosmos.staking.v1beta1.QueryTotalTokenizeSharedAssetsRequest) | [QueryTotalTokenizeSharedAssetsResponse](#cosmos.staking.v1beta1.QueryTotalTokenizeSharedAssetsResponse) | Query for total tokenized staked assets | GET|/cosmos/staking/v1beta1/total_tokenize_shared_assets| +| `TotalLiquidStaked` | [QueryTotalLiquidStaked](#cosmos.staking.v1beta1.QueryTotalLiquidStaked) | [QueryTotalLiquidStakedResponse](#cosmos.staking.v1beta1.QueryTotalLiquidStakedResponse) | Query for total liquid staked (including tokenized shares or owned by an liquid staking provider) | GET|/cosmos/staking/v1beta1/total_liquid_staked| +| `TokenizeShareLockInfo` | [QueryTokenizeShareLockInfo](#cosmos.staking.v1beta1.QueryTokenizeShareLockInfo) | [QueryTokenizeShareLockInfoResponse](#cosmos.staking.v1beta1.QueryTokenizeShareLockInfoResponse) | Query tokenize share locks | GET|/cosmos/staking/v1beta1/tokenize_share_lock_info/{address}| @@ -7551,6 +8024,38 @@ MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. + + +### MsgCancelUnbondingDelegation +MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator + +Since: cosmos-sdk 0.46 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | amount is always less than or equal to unbonding delegation entry balance | +| `creation_height` | [int64](#int64) | | creation_height is the height which the unbonding took place. | + + + + + + + + +### MsgCancelUnbondingDelegationResponse +MsgCancelUnbondingDelegationResponse + +Since: cosmos-sdk 0.46 + + + + + + ### MsgCreateValidator @@ -7561,7 +8066,7 @@ MsgCreateValidator defines a SDK message for creating a new validator. | ----- | ---- | ----- | ----------- | | `description` | [Description](#cosmos.staking.v1beta1.Description) | | | | `commission` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | | -| `min_self_delegation` | [string](#string) | | | +| `min_self_delegation` | [string](#string) | | **Deprecated.** Deprecated: This field has been deprecated with LSM in favor of the validator bond | | `delegator_address` | [string](#string) | | | | `validator_address` | [string](#string) | | | | `pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | | @@ -7610,6 +8115,31 @@ MsgDelegateResponse defines the Msg/Delegate response type. + + +### MsgDisableTokenizeShares +MsgDisableTokenizeShares prevents the tokenization of shares for a given address + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | | + + + + + + + + +### MsgDisableTokenizeSharesResponse +MsgDisableTokenizeSharesResponse defines the Msg/DisableTokenizeShares response type. + + + + + + ### MsgEditValidator @@ -7621,7 +8151,7 @@ MsgEditValidator defines a SDK message for editing an existing validator. | `description` | [Description](#cosmos.staking.v1beta1.Description) | | | | `validator_address` | [string](#string) | | | | `commission_rate` | [string](#string) | | We pass a reference to the new commission rate and min self delegation as it's not mandatory to update. If not updated, the deserialized rate will be zero with no way to distinguish if an update was intended. REF: #2373 | -| `min_self_delegation` | [string](#string) | | | +| `min_self_delegation` | [string](#string) | | **Deprecated.** | @@ -7638,6 +8168,153 @@ MsgEditValidatorResponse defines the Msg/EditValidator response type. + + +### MsgEnableTokenizeShares +MsgEnableTokenizeShares re-enables tokenization of shares for a given address + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | | + + + + + + + + +### MsgEnableTokenizeSharesResponse +MsgEnableTokenizeSharesResponse defines the Msg/EnableTokenizeShares response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + + + + +### MsgRedeemTokensForShares +MsgRedeemTokensForShares redeems a tokenized share back into a native delegation + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + + + +### MsgRedeemTokensForSharesResponse +MsgRedeemTokensForSharesResponse defines the Msg/MsgRedeemTokensForShares response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + + + +### MsgTokenizeShares +MsgTokenizeShares tokenizes a delegation + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `tokenized_share_owner` | [string](#string) | | | + + + + + + + + +### MsgTokenizeSharesResponse +MsgTokenizeSharesResponse defines the Msg/MsgTokenizeShares response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + + + +### MsgTransferTokenizeShareRecord +MsgTransferTokenizeShareRecord transfer a tokenize share record + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `tokenize_share_record_id` | [uint64](#uint64) | | | +| `sender` | [string](#string) | | | +| `new_owner` | [string](#string) | | | + + + + + + + + +### MsgTransferTokenizeShareRecordResponse +MsgTransferTokenizeShareRecordResponse defines the Msg/MsgTransferTokenizeShareRecord response type. + + + + + + + + +### MsgUnbondValidator +MsgUnbondValidator defines a method for performing the status transition for +a validator from bonded to unbonded + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `validator_address` | [string](#string) | | | + + + + + + + + +### MsgUnbondValidatorResponse +MsgUnbondValidatorResponse defines the Msg/UnbondValidator response type. + + + + + + ### MsgUndelegate @@ -7670,6 +8347,33 @@ MsgUndelegateResponse defines the Msg/Undelegate response type. + + + +### MsgValidatorBond +MsgValidatorBond defines a SDK message for performing validator self-bond of delegated coins +from a delegator to a validator. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | + + + + + + + + +### MsgValidatorBondResponse +MsgValidatorBondResponse defines the Msg/ValidatorBond response type. + + + + + @@ -7688,7 +8392,17 @@ Msg defines the staking Msg service. | `EditValidator` | [MsgEditValidator](#cosmos.staking.v1beta1.MsgEditValidator) | [MsgEditValidatorResponse](#cosmos.staking.v1beta1.MsgEditValidatorResponse) | EditValidator defines a method for editing an existing validator. | | | `Delegate` | [MsgDelegate](#cosmos.staking.v1beta1.MsgDelegate) | [MsgDelegateResponse](#cosmos.staking.v1beta1.MsgDelegateResponse) | Delegate defines a method for performing a delegation of coins from a delegator to a validator. | | | `BeginRedelegate` | [MsgBeginRedelegate](#cosmos.staking.v1beta1.MsgBeginRedelegate) | [MsgBeginRedelegateResponse](#cosmos.staking.v1beta1.MsgBeginRedelegateResponse) | BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. | | -| `Undelegate` | [MsgUndelegate](#cosmos.staking.v1beta1.MsgUndelegate) | [MsgUndelegateResponse](#cosmos.staking.v1beta1.MsgUndelegateResponse) | Undelegate defines a method for performing an undelegation from a delegate and a validator. | | +| `Undelegate` | [MsgUndelegate](#cosmos.staking.v1beta1.MsgUndelegate) | [MsgUndelegateResponse](#cosmos.staking.v1beta1.MsgUndelegateResponse) | Undelegate defines a method for performing an undelegation from a delegate and a validator. This allows a validator to stop their services and jail themselves without experiencing a slash | | +| `UnbondValidator` | [MsgUnbondValidator](#cosmos.staking.v1beta1.MsgUnbondValidator) | [MsgUnbondValidatorResponse](#cosmos.staking.v1beta1.MsgUnbondValidatorResponse) | UnbondValidator defines a method for performing the status transition for a validator from bonded to unbonding | | +| `CancelUnbondingDelegation` | [MsgCancelUnbondingDelegation](#cosmos.staking.v1beta1.MsgCancelUnbondingDelegation) | [MsgCancelUnbondingDelegationResponse](#cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse) | CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation and delegate back to previous validator. + +This has been backported from SDK 46 as a desirable safety feature for LSM. If a liquid staking provider is exploited and the exploiter initiates an undelegation, having access to CancelUnbondingDelegation allows the liquid staking provider to cancel the undelegation with a software upgrade and thus avoid loss of user funds | | +| `TokenizeShares` | [MsgTokenizeShares](#cosmos.staking.v1beta1.MsgTokenizeShares) | [MsgTokenizeSharesResponse](#cosmos.staking.v1beta1.MsgTokenizeSharesResponse) | TokenizeShares defines a method for tokenizing shares from a validator. | | +| `RedeemTokensForShares` | [MsgRedeemTokensForShares](#cosmos.staking.v1beta1.MsgRedeemTokensForShares) | [MsgRedeemTokensForSharesResponse](#cosmos.staking.v1beta1.MsgRedeemTokensForSharesResponse) | RedeemTokensForShares defines a method for redeeming tokens from a validator for shares. | | +| `TransferTokenizeShareRecord` | [MsgTransferTokenizeShareRecord](#cosmos.staking.v1beta1.MsgTransferTokenizeShareRecord) | [MsgTransferTokenizeShareRecordResponse](#cosmos.staking.v1beta1.MsgTransferTokenizeShareRecordResponse) | TransferTokenizeShareRecord defines a method to transfer ownership of TokenizeShareRecord | | +| `DisableTokenizeShares` | [MsgDisableTokenizeShares](#cosmos.staking.v1beta1.MsgDisableTokenizeShares) | [MsgDisableTokenizeSharesResponse](#cosmos.staking.v1beta1.MsgDisableTokenizeSharesResponse) | DisableTokenizeShares defines a method to prevent the tokenization of an addresses stake | | +| `EnableTokenizeShares` | [MsgEnableTokenizeShares](#cosmos.staking.v1beta1.MsgEnableTokenizeShares) | [MsgEnableTokenizeSharesResponse](#cosmos.staking.v1beta1.MsgEnableTokenizeSharesResponse) | EnableTokenizeShares defines a method to re-enable the tokenization of an addresseses stake after it has been disabled | | +| `ValidatorBond` | [MsgValidatorBond](#cosmos.staking.v1beta1.MsgValidatorBond) | [MsgValidatorBondResponse](#cosmos.staking.v1beta1.MsgValidatorBondResponse) | ValidatorBond defines a method for performing a validator self-bond | | diff --git a/proto/cosmos/base/store/v1beta1/listening.proto b/proto/cosmos/base/store/v1beta1/listening.proto index 753f7c165512..d6f7128931ea 100644 --- a/proto/cosmos/base/store/v1beta1/listening.proto +++ b/proto/cosmos/base/store/v1beta1/listening.proto @@ -20,15 +20,15 @@ message StoreKVPair { // BlockMetadata contains all the abci event data of a block // the file streamer dump them into files together with the state changes. message BlockMetadata { - // DeliverTx encapulate deliver tx request and response. - message DeliverTx { - tendermint.abci.RequestDeliverTx request = 1; - tendermint.abci.ResponseDeliverTx response = 2; - } - tendermint.abci.RequestBeginBlock request_begin_block = 1; - tendermint.abci.ResponseBeginBlock response_begin_block = 2; - repeated DeliverTx deliver_txs = 3; - tendermint.abci.RequestEndBlock request_end_block = 4; - tendermint.abci.ResponseEndBlock response_end_block = 5; - tendermint.abci.ResponseCommit response_commit = 6; + // DeliverTx encapulate deliver tx request and response. + message DeliverTx { + tendermint.abci.RequestDeliverTx request = 1; + tendermint.abci.ResponseDeliverTx response = 2; + } + tendermint.abci.RequestBeginBlock request_begin_block = 1; + tendermint.abci.ResponseBeginBlock response_begin_block = 2; + repeated DeliverTx deliver_txs = 3; + tendermint.abci.RequestEndBlock request_end_block = 4; + tendermint.abci.ResponseEndBlock response_end_block = 5; + tendermint.abci.ResponseCommit response_commit = 6; } diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto index ae98ec0b98f2..9ed1b79a0922 100644 --- a/proto/cosmos/distribution/v1beta1/distribution.proto +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -143,6 +143,17 @@ message DelegationDelegatorReward { [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } +// TokenizeShareRecordReward represents the properties of tokenize share +message TokenizeShareRecordReward { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + uint64 record_id = 1; + + repeated cosmos.base.v1beta1.DecCoin reward = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + // CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal // with a deposit message CommunityPoolSpendProposalWithDeposit { diff --git a/proto/cosmos/distribution/v1beta1/query.proto b/proto/cosmos/distribution/v1beta1/query.proto index 2991218d8049..9d7abc34eaff 100644 --- a/proto/cosmos/distribution/v1beta1/query.proto +++ b/proto/cosmos/distribution/v1beta1/query.proto @@ -62,6 +62,12 @@ service Query { rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; } + + // TokenizeShareRecordReward queries the tokenize share record rewards + rpc TokenizeShareRecordReward(QueryTokenizeShareRecordRewardRequest) + returns (QueryTokenizeShareRecordRewardResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/{owner_address}/tokenize_share_record_rewards"; + } } // QueryParamsRequest is the request type for the Query/Params RPC method. @@ -216,3 +222,22 @@ message QueryCommunityPoolResponse { repeated cosmos.base.v1beta1.DecCoin pool = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } + +// QueryTokenizeShareRecordRewardRequest is the request type for the Query/TokenizeShareRecordReward RPC +// method. +message QueryTokenizeShareRecordRewardRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner_address = 1 [(gogoproto.moretags) = "yaml:\"owner_address\""]; +} + +// QueryTokenizeShareRecordRewardResponse is the response type for the Query/TokenizeShareRecordReward +// RPC method. +message QueryTokenizeShareRecordRewardResponse { + // rewards defines all the rewards accrued by a delegator. + repeated TokenizeShareRecordReward rewards = 1 [(gogoproto.nullable) = false]; + // total defines the sum of all the rewards. + repeated cosmos.base.v1beta1.DecCoin total = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; +} \ No newline at end of file diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto index e6ce478bcdc4..8f97b7ebe32a 100644 --- a/proto/cosmos/distribution/v1beta1/tx.proto +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -21,6 +21,14 @@ service Msg { // full commission to the validator address. rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); + // WithdrawTokenizeShareRecordReward defines a method to withdraw reward for an owning TokenizeShareRecord + rpc WithdrawTokenizeShareRecordReward(MsgWithdrawTokenizeShareRecordReward) + returns (MsgWithdrawTokenizeShareRecordRewardResponse); + + // WithdrawAllTokenizeShareRecordReward defines a method to withdraw reward for all owning TokenizeShareRecord + rpc WithdrawAllTokenizeShareRecordReward(MsgWithdrawAllTokenizeShareRecordReward) + returns (MsgWithdrawAllTokenizeShareRecordRewardResponse); + // FundCommunityPool defines a method to allow an account to directly // fund the community pool. rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); @@ -64,6 +72,30 @@ message MsgWithdrawValidatorCommission { // MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. message MsgWithdrawValidatorCommissionResponse {} +// MsgWithdrawTokenizeShareRecordReward withdraws tokenize share rewards for a specific record +message MsgWithdrawTokenizeShareRecordReward { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner_address = 1 [(gogoproto.moretags) = "yaml:\"owner_address\""]; + uint64 record_id = 2; +} + +// MsgWithdrawTokenizeShareRecordReward defines the Msg/WithdrawTokenizeShareRecordReward response type. +message MsgWithdrawTokenizeShareRecordRewardResponse {} + +// MsgWithdrawAllTokenizeShareRecordReward withdraws tokenize share rewards or all +// records owned by the designated owner +message MsgWithdrawAllTokenizeShareRecordReward { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner_address = 1 [(gogoproto.moretags) = "yaml:\"owner_address\""]; +} + +// MsgWithdrawAllTokenizeShareRecordRewardResponse defines the Msg/WithdrawTokenizeShareRecordReward response type. +message MsgWithdrawAllTokenizeShareRecordRewardResponse {} + // MsgFundCommunityPool allows an account to directly // fund the community pool. message MsgFundCommunityPool { diff --git a/proto/cosmos/staking/v1beta1/genesis.proto b/proto/cosmos/staking/v1beta1/genesis.proto index d1563dbc5470..482db0ed7765 100644 --- a/proto/cosmos/staking/v1beta1/genesis.proto +++ b/proto/cosmos/staking/v1beta1/genesis.proto @@ -5,6 +5,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; import "gogoproto/gogo.proto"; import "cosmos/staking/v1beta1/staking.proto"; +import "google/protobuf/timestamp.proto"; // GenesisState defines the staking module's genesis state. message GenesisState { @@ -38,6 +39,33 @@ message GenesisState { repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; bool exported = 8; + + // store tokenize share records to provide reward to record owners + repeated TokenizeShareRecord tokenize_share_records = 9 [(gogoproto.nullable) = false]; + + // last tokenize share record id, used for next share record id calculation + uint64 last_tokenize_share_record_id = 10; + + // total number of liquid staked tokens at genesis + bytes total_liquid_staked_tokens = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"total_liquid_staked_tokens\"", + (gogoproto.nullable) = false + ]; + + // tokenize shares locks at genesis + repeated TokenizeShareLock tokenize_share_locks = 12 [(gogoproto.nullable) = false]; +} + +// TokenizeSharesLock required for specifying account locks at genesis +message TokenizeShareLock { + // Address of the account that is locked + string address = 1; + // Status of the lock (LOCKED or LOCK_EXPIRING) + string status = 2; + // Completion time if the lock is expiring + google.protobuf.Timestamp completion_time = 3 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; } // LastValidatorPower required for validator set update logic. diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto index 4852c5353584..b44d5d19142f 100644 --- a/proto/cosmos/staking/v1beta1/query.proto +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -5,6 +5,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/staking/v1beta1/staking.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; @@ -90,6 +91,50 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/staking/v1beta1/params"; } + + // Query for individual tokenize share record information by share by id + rpc TokenizeShareRecordById(QueryTokenizeShareRecordByIdRequest) returns (QueryTokenizeShareRecordByIdResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/tokenize_share_record_by_id/{id}"; + } + + // Query for individual tokenize share record information by share denom + rpc TokenizeShareRecordByDenom(QueryTokenizeShareRecordByDenomRequest) + returns (QueryTokenizeShareRecordByDenomResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/tokenize_share_record_by_denom/{denom}"; + } + + // Query tokenize share records by address + rpc TokenizeShareRecordsOwned(QueryTokenizeShareRecordsOwnedRequest) + returns (QueryTokenizeShareRecordsOwnedResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/tokenize_share_record_owned/{owner}"; + } + + // Query for all tokenize share records + rpc AllTokenizeShareRecords(QueryAllTokenizeShareRecordsRequest) returns (QueryAllTokenizeShareRecordsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/tokenize_share_records"; + } + + // Query for last tokenize share record id + rpc LastTokenizeShareRecordId(QueryLastTokenizeShareRecordIdRequest) + returns (QueryLastTokenizeShareRecordIdResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/last_tokenize_share_record_id"; + } + + // Query for total tokenized staked assets + rpc TotalTokenizeSharedAssets(QueryTotalTokenizeSharedAssetsRequest) + returns (QueryTotalTokenizeSharedAssetsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/total_tokenize_shared_assets"; + } + + // Query for total liquid staked (including tokenized shares or owned by an liquid staking provider) + rpc TotalLiquidStaked(QueryTotalLiquidStaked) returns (QueryTotalLiquidStakedResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/total_liquid_staked"; + } + + // Query tokenize share locks + rpc TokenizeShareLockInfo(QueryTokenizeShareLockInfo) returns (QueryTokenizeShareLockInfoResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/tokenize_share_lock_info/{address}"; + } } // QueryValidatorsRequest is request type for Query/Validators RPC method. @@ -118,7 +163,7 @@ message QueryValidatorRequest { // QueryValidatorResponse is response type for the Query/Validator RPC method message QueryValidatorResponse { - // validator defines the the validator info. + // validator defines the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } @@ -288,7 +333,7 @@ message QueryDelegatorValidatorsRequest { // QueryDelegatorValidatorsResponse is response type for the // Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. + // validators defines the validators' info of a delegator. repeated Validator validators = 1 [(gogoproto.nullable) = false]; // pagination defines the pagination in the response. @@ -311,7 +356,7 @@ message QueryDelegatorValidatorRequest { // QueryDelegatorValidatorResponse response type for the // Query/DelegatorValidator RPC method. message QueryDelegatorValidatorResponse { - // validator defines the the validator info. + // validator defines the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } @@ -346,3 +391,96 @@ message QueryParamsResponse { // params holds all the parameters of this module. Params params = 1 [(gogoproto.nullable) = false]; } + +// QueryTokenizeShareRecordByIdRequest is request type for the +// Query/QueryTokenizeShareRecordById RPC method. +message QueryTokenizeShareRecordByIdRequest { + uint64 id = 1; +} + +// QueryTokenizeShareRecordByIdRequest is response type for the +// Query/QueryTokenizeShareRecordById RPC method. +message QueryTokenizeShareRecordByIdResponse { + TokenizeShareRecord record = 1 [(gogoproto.nullable) = false]; +} + +// QueryTokenizeShareRecordByDenomRequest is request type for the +// Query/QueryTokenizeShareRecordByDenom RPC method. +message QueryTokenizeShareRecordByDenomRequest { + string denom = 1; +} + +// QueryTokenizeShareRecordByDenomResponse is response type for the +// Query/QueryTokenizeShareRecordByDenom RPC method. +message QueryTokenizeShareRecordByDenomResponse { + TokenizeShareRecord record = 1 [(gogoproto.nullable) = false]; +} + +// QueryTokenizeShareRecordsOwnedRequest is request type for the +// Query/QueryTokenizeShareRecordsOwned RPC method. +message QueryTokenizeShareRecordsOwnedRequest { + string owner = 1; +} + +// QueryTokenizeShareRecordsOwnedResponse is response type for the +// Query/QueryTokenizeShareRecordsOwned RPC method. +message QueryTokenizeShareRecordsOwnedResponse { + repeated TokenizeShareRecord records = 1 [(gogoproto.nullable) = false]; +} + +// QueryAllTokenizeShareRecordsRequest is request type for the +// Query/QueryAllTokenizeShareRecords RPC method. +message QueryAllTokenizeShareRecordsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAllTokenizeShareRecordsResponse is response type for the +// Query/QueryAllTokenizeShareRecords RPC method. +message QueryAllTokenizeShareRecordsResponse { + repeated TokenizeShareRecord records = 1 [(gogoproto.nullable) = false]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryLastTokenizeShareRecordIdRequest is request type for the +// Query/QueryLastTokenizeShareRecordId RPC method. +message QueryLastTokenizeShareRecordIdRequest {} + +// QueryLastTokenizeShareRecordIdResponse is response type for the +// Query/QueryLastTokenizeShareRecordId RPC method. +message QueryLastTokenizeShareRecordIdResponse { + uint64 id = 1; +} + +// QueryTotalTokenizeSharedAssetsRequest is request type for the +// Query/QueryTotalTokenizeSharedAssets RPC method. +message QueryTotalTokenizeSharedAssetsRequest {} + +// QueryTotalTokenizeSharedAssetsResponse is response type for the +// Query/QueryTotalTokenizeSharedAssets RPC method. +message QueryTotalTokenizeSharedAssetsResponse { + cosmos.base.v1beta1.Coin value = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalLiquidStakedRequest is request type for the +// Query/QueryQueryTotalLiquidStaked RPC method. +message QueryTotalLiquidStaked {} + +// QueryTotalLiquidStakedResponse is response type for the +// Query/QueryQueryTotalLiquidStaked RPC method. +message QueryTotalLiquidStakedResponse { + string tokens = 1; +} + +// QueryTokenizeShareLockInfo queries the tokenize share lock information +// associated with given account +message QueryTokenizeShareLockInfo { + string address = 1; +} +// QueryTokenizeShareLockInfoResponse is the response from the +// QueryTokenizeShareLockInfo query +message QueryTokenizeShareLockInfoResponse { + string status = 1; + string expiration_time = 2; +} diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index 27581a12cf9a..1b587f2e9638 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -112,18 +112,29 @@ message Validator { [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; // commission defines the commission parameters. Commission commission = 10 [(gogoproto.nullable) = false]; - // min_self_delegation is the validator's self declared minimum self delegation. + // Deprecated: This field has been deprecated with LSM in favor of the validator bond string min_self_delegation = 11 [ + deprecated = true, (gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; - // strictly positive if this validator's unbonding has been stopped by external modules int64 unbonding_on_hold_ref_count = 12; - // list of unbonding ids, each uniquely identifing an unbonding of this validator repeated uint64 unbonding_ids = 13; + // Number of shares self bonded from the validator + string validator_bond_shares = 14 [ + (gogoproto.moretags) = "yaml:\"validator_bond_shares\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // Number of shares either tokenized or owned by a liquid staking provider + string liquid_shares = 15 [ + (gogoproto.moretags) = "yaml:\"liquid_shares\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // BondStatus is the status of a validator. @@ -198,6 +209,8 @@ message Delegation { string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; // shares define the delegation shares received. string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // has this delegation been marked as a validator self bond. + bool validator_bond = 4; } // UnbondingDelegation stores all of a single delegator's unbonding bonds @@ -301,6 +314,28 @@ message Params { uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; // bond_denom defines the bondable coin denomination. string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; + // validator_bond_factor is required as a safety check for tokenizing shares and + // delegations from liquid staking providers + string validator_bond_factor = 7 [ + (gogoproto.moretags) = "yaml:\"validator_bond_factor\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // global_liquid_staking_cap represents a cap on the portion of stake that + // comes from liquid staking providers + string global_liquid_staking_cap = 8 [ + (gogoproto.moretags) = "yaml:\"global_liquid_staking_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // validator_liquid_staking_cap represents a cap on the portion of stake that + // comes from liquid staking providers for a specific validator + string validator_liquid_staking_cap = 9 [ + (gogoproto.moretags) = "yaml:\"validator_liquid_staking_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + reserved 6; } // DelegationResponse is equivalent to Delegation except that it contains a @@ -367,4 +402,35 @@ enum InfractionType { // ValidatorUpdates defines an array of abci.ValidatorUpdate objects. message ValidatorUpdates { repeated tendermint.abci.ValidatorUpdate updates = 1 [(gogoproto.nullable) = false]; +} + +// TokenizeShareRecord represents a tokenized delegation +message TokenizeShareRecord { + option (gogoproto.equal) = true; + + uint64 id = 1; + string owner = 2; + string module_account = 3; // module account take the role of delegator + string validator = 4; // validator delegated to for tokenize share record creation +} + +// PendingTokenizeShareAuthorizations stores a list of addresses that have their +// tokenize share enablement in progress +message PendingTokenizeShareAuthorizations { + repeated string addresses = 1; +} + +// TokenizeShareLockStatus indicates whether the address is able to tokenize shares +enum TokenizeShareLockStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // UNSPECIFIED defines an empty tokenize share lock status + TOKENIZE_SHARE_LOCK_STATUS_UNSPECIFIED = 0; + // LOCKED indicates the account is locked and cannot tokenize shares + TOKENIZE_SHARE_LOCK_STATUS_LOCKED = 1; + // UNLOCKED indicates the account is unlocked and can tokenize shares + TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED = 2; + // LOCK_EXPIRING indicates the account is unable to tokenize shares, but + // will be able to tokenize shortly (after 1 unbonding period) + TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING = 3; } \ No newline at end of file diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index d074fe010e30..18b5075ff58e 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -29,7 +29,43 @@ service Msg { // Undelegate defines a method for performing an undelegation from a // delegate and a validator. + // This allows a validator to stop their services and jail themselves without + // experiencing a slash rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); + + // UnbondValidator defines a method for performing the status transition for a validator + // from bonded to unbonding + rpc UnbondValidator(MsgUnbondValidator) returns (MsgUnbondValidatorResponse); + + // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation + // and delegate back to previous validator. + // + // This has been backported from SDK 46 as a desirable safety feature for LSM. + // If a liquid staking provider is exploited and the exploiter initiates an undelegation, + // having access to CancelUnbondingDelegation allows the liquid staking provider to cancel + // the undelegation with a software upgrade and thus avoid loss of user funds + rpc CancelUnbondingDelegation(MsgCancelUnbondingDelegation) returns (MsgCancelUnbondingDelegationResponse); + + // TokenizeShares defines a method for tokenizing shares from a validator. + rpc TokenizeShares(MsgTokenizeShares) returns (MsgTokenizeSharesResponse); + + // RedeemTokensForShares defines a method for redeeming tokens from a validator for + // shares. + rpc RedeemTokensForShares(MsgRedeemTokensForShares) returns (MsgRedeemTokensForSharesResponse); + + // TransferTokenizeShareRecord defines a method to transfer ownership of + // TokenizeShareRecord + rpc TransferTokenizeShareRecord(MsgTransferTokenizeShareRecord) returns (MsgTransferTokenizeShareRecordResponse); + + // DisableTokenizeShares defines a method to prevent the tokenization of an addresses stake + rpc DisableTokenizeShares(MsgDisableTokenizeShares) returns (MsgDisableTokenizeSharesResponse); + + // EnableTokenizeShares defines a method to re-enable the tokenization of an addresseses stake + // after it has been disabled + rpc EnableTokenizeShares(MsgEnableTokenizeShares) returns (MsgEnableTokenizeSharesResponse); + + // ValidatorBond defines a method for performing a validator self-bond + rpc ValidatorBond(MsgValidatorBond) returns (MsgValidatorBondResponse); } // MsgCreateValidator defines a SDK message for creating a new validator. @@ -37,9 +73,11 @@ message MsgCreateValidator { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - Description description = 1 [(gogoproto.nullable) = false]; - CommissionRates commission = 2 [(gogoproto.nullable) = false]; - string min_self_delegation = 3 [ + Description description = 1 [(gogoproto.nullable) = false]; + CommissionRates commission = 2 [(gogoproto.nullable) = false]; + // Deprecated: This field has been deprecated with LSM in favor of the validator bond + string min_self_delegation = 3 [ + deprecated = true, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.nullable) = false @@ -70,8 +108,10 @@ message MsgEditValidator { (gogoproto.moretags) = "yaml:\"commission_rate\"" ]; string min_self_delegation = 4 [ + deprecated = true, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"" + (gogoproto.moretags) = "yaml:\"min_self_delegation\"", + (gogoproto.nullable) = false ]; } @@ -121,3 +161,108 @@ message MsgUndelegate { message MsgUndelegateResponse { google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } + +// MsgUnbondValidator defines a method for performing the status transition for +// a validator from bonded to unbonded +message MsgUnbondValidator { + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; +} +// MsgUnbondValidatorResponse defines the Msg/UnbondValidator response type. +message MsgUnbondValidatorResponse {} + +// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +// +// Since: cosmos-sdk 0.46 +message MsgCancelUnbondingDelegation { + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // amount is always less than or equal to unbonding delegation entry balance + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; + // creation_height is the height which the unbonding took place. + int64 creation_height = 4; +} + +// MsgCancelUnbondingDelegationResponse +// +// Since: cosmos-sdk 0.46 +message MsgCancelUnbondingDelegationResponse {} + +// MsgTokenizeShares tokenizes a delegation +message MsgTokenizeShares { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; + string tokenized_share_owner = 4; +} + +// MsgTokenizeSharesResponse defines the Msg/MsgTokenizeShares response type. +message MsgTokenizeSharesResponse { + cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; +} + +// MsgRedeemTokensForShares redeems a tokenized share back into a native delegation +message MsgRedeemTokensForShares { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false]; +} + +// MsgRedeemTokensForSharesResponse defines the Msg/MsgRedeemTokensForShares response type. +message MsgRedeemTokensForSharesResponse { + cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; +} + +// MsgTransferTokenizeShareRecord transfer a tokenize share record +message MsgTransferTokenizeShareRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + uint64 tokenize_share_record_id = 1; + string sender = 2; + string new_owner = 3; +} + +// MsgTransferTokenizeShareRecordResponse defines the Msg/MsgTransferTokenizeShareRecord response type. +message MsgTransferTokenizeShareRecordResponse {} + +// MsgDisableTokenizeShares prevents the tokenization of shares for a given address +message MsgDisableTokenizeShares { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; +} + +// MsgDisableTokenizeSharesResponse defines the Msg/DisableTokenizeShares response type. +message MsgDisableTokenizeSharesResponse {} + +// MsgEnableTokenizeShares re-enables tokenization of shares for a given address +message MsgEnableTokenizeShares { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; +} + +// MsgEnableTokenizeSharesResponse defines the Msg/EnableTokenizeShares response type. +message MsgEnableTokenizeSharesResponse { + google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// MsgValidatorBond defines a SDK message for performing validator self-bond of delegated coins +// from a delegator to a validator. +message MsgValidatorBond { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// MsgValidatorBondResponse defines the Msg/ValidatorBond response type. +message MsgValidatorBondResponse {} \ No newline at end of file diff --git a/simapp/params/weights.go b/simapp/params/weights.go index 746e304de2be..e7f4c79ad76f 100644 --- a/simapp/params/weights.go +++ b/simapp/params/weights.go @@ -2,21 +2,29 @@ package params // Default simulation operation weights for messages and gov proposals const ( - DefaultWeightMsgSend int = 100 - DefaultWeightMsgMultiSend int = 10 - DefaultWeightMsgSetWithdrawAddress int = 50 - DefaultWeightMsgWithdrawDelegationReward int = 50 - DefaultWeightMsgWithdrawValidatorCommission int = 50 - DefaultWeightMsgFundCommunityPool int = 50 - DefaultWeightMsgDeposit int = 100 - DefaultWeightMsgVote int = 67 - DefaultWeightMsgVoteWeighted int = 33 - DefaultWeightMsgUnjail int = 100 - DefaultWeightMsgCreateValidator int = 100 - DefaultWeightMsgEditValidator int = 5 - DefaultWeightMsgDelegate int = 100 - DefaultWeightMsgUndelegate int = 100 - DefaultWeightMsgBeginRedelegate int = 100 + DefaultWeightMsgSend int = 100 + DefaultWeightMsgMultiSend int = 10 + DefaultWeightMsgSetWithdrawAddress int = 50 + DefaultWeightMsgWithdrawDelegationReward int = 50 + DefaultWeightMsgWithdrawValidatorCommission int = 50 + DefaultWeightMsgFundCommunityPool int = 50 + DefaultWeightMsgDeposit int = 100 + DefaultWeightMsgVote int = 67 + DefaultWeightMsgVoteWeighted int = 33 + DefaultWeightMsgUnjail int = 100 + DefaultWeightMsgCreateValidator int = 100 + DefaultWeightMsgEditValidator int = 5 + DefaultWeightMsgDelegate int = 100 + DefaultWeightMsgUndelegate int = 100 + DefaultWeightMsgBeginRedelegate int = 100 + DefaultWeightMsgCancelUnbondingDelegation int = 5 + DefaultWeightMsgValidatorBond int = 100 + DefaultWeightMsgTokenizeShares int = 25 + DefaultWeightMsgRedeemTokensforShares int = 25 + DefaultWeightMsgTransferTokenizeShareRecord int = 5 + DefaultWeightMsgEnableTokenizeShares int = 1 + DefaultWeightMsgDisableTokenizeShares int = 1 + DefaultWeightMsgWithdrawAllTokenizeShareRecordReward int = 50 DefaultWeightCommunitySpendProposal int = 5 DefaultWeightTextProposal int = 5 diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 150dd895ca08..ad9b19231807 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -213,7 +213,6 @@ func InitTestnet( sdk.NewCoin(sdk.DefaultBondDenom, valTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()), - sdk.OneInt(), ) if err != nil { return err diff --git a/store/cachekv/benchmark_test.go b/store/cachekv/benchmark_test.go index 2db62ba5d6c6..b899068dec6d 100644 --- a/store/cachekv/benchmark_test.go +++ b/store/cachekv/benchmark_test.go @@ -53,6 +53,7 @@ func BenchmarkDeepContextStack1(b *testing.B) { func BenchmarkDeepContextStack3(b *testing.B) { DoBenchmarkDeepContextStack(b, 3) } + func BenchmarkDeepContextStack10(b *testing.B) { DoBenchmarkDeepContextStack(b, 10) } diff --git a/store/streaming/constructor_test.go b/store/streaming/constructor_test.go index f23fa499e827..d1b9af202e23 100644 --- a/store/streaming/constructor_test.go +++ b/store/streaming/constructor_test.go @@ -23,7 +23,6 @@ type fakeOptions struct{} func (f *fakeOptions) Get(key string) interface{} { if key == "streamers.file.write_dir" { return "data/file_streamer" - } return nil } diff --git a/testutil/network/network.go b/testutil/network/network.go index d4214644c490..6f5891fdc880 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -316,7 +316,6 @@ func New(t *testing.T, cfg Config) *Network { sdk.NewCoin(cfg.BondDenom, cfg.BondedTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), stakingtypes.NewCommissionRates(commission, sdk.OneDec(), sdk.OneDec()), - sdk.OneInt(), ) require.NoError(t, err) diff --git a/types/module/module_test.go b/types/module/module_test.go index 35405601d6c9..c9d3ae7234a3 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -358,6 +358,7 @@ func (MockCoreAppModule) DefaultGenesis(target appmodule.GenesisTarget) error { someFieldWriter.Write([]byte(`"someValue"`)) return someFieldWriter.Close() } + func (MockCoreAppModule) ValidateGenesis(src appmodule.GenesisSource) error { rdr, err := src("someField") if err != nil { diff --git a/types/simulation/account.go b/types/simulation/account.go index 5bc5bfe14dc6..4fc6fd4dfdb2 100644 --- a/types/simulation/account.go +++ b/types/simulation/account.go @@ -3,6 +3,7 @@ package simulation import ( "fmt" "math/rand" + "strings" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -67,14 +68,23 @@ func FindAccount(accs []Account, address sdk.Address) (Account, bool) { // amount from the account's available balance. If the user doesn't have enough // funds for paying fees, it returns empty coins. func RandomFees(r *rand.Rand, ctx sdk.Context, spendableCoins sdk.Coins) (sdk.Coins, error) { - if spendableCoins.Empty() { + spendable := sdk.NewCoins() + // remove liquid staking denoms from spendable coins since fees cannot be paid in those denoms + for _, coin := range spendableCoins { + if strings.Contains(coin.Denom, sdk.Bech32PrefixValAddr) { + continue + } + spendable = append(spendable, coin) + } + + if spendable.Empty() { return nil, nil } - perm := r.Perm(len(spendableCoins)) + perm := r.Perm(len(spendable)) var randCoin sdk.Coin for _, index := range perm { - randCoin = spendableCoins[index] + randCoin = spendable[index] if !randCoin.Amount.IsZero() { break } diff --git a/x/distribution/client/cli/query.go b/x/distribution/client/cli/query.go index aa087f5f8b27..3f7a6f48d66a 100644 --- a/x/distribution/client/cli/query.go +++ b/x/distribution/client/cli/query.go @@ -31,6 +31,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryValidatorSlashes(), GetCmdQueryDelegatorRewards(), GetCmdQueryCommunityPool(), + GetCmdQueryTokenizeShareRecordReward(), ) return distQueryCmd @@ -319,3 +320,48 @@ $ %s query distribution community-pool flags.AddQueryFlagsToCmd(cmd) return cmd } + +// GetCmdQueryTokenizeShareRecordReward implements the query tokenize share record rewards +func GetCmdQueryTokenizeShareRecordReward() *cobra.Command { + bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() + + cmd := &cobra.Command{ + Use: "tokenize-share-record-rewards [owner]", + Args: cobra.ExactArgs(1), + Short: "Query distribution tokenize share record rewards", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the query tokenize share record rewards. + +Example: +$ %s query distribution tokenize-share-record-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj +`, + version.AppName, bech32PrefixAccAddr, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + ownerAddr, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + res, err := queryClient.TokenizeShareRecordReward( + cmd.Context(), + &types.QueryTokenizeShareRecordRewardRequest{OwnerAddress: ownerAddr.String()}, + ) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 94fac5999821..a2bf2e2ae8f2 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -2,6 +2,7 @@ package cli import ( "fmt" + "strconv" "strings" "github.com/spf13/cobra" @@ -41,6 +42,8 @@ func NewTxCmd() *cobra.Command { NewWithdrawAllRewardsCmd(), NewSetWithdrawAddrCmd(), NewFundCommunityPoolCmd(), + NewWithdrawTokenizeShareRecordRewardCmd(), + NewWithdrawAllTokenizeShareRecordRewardCmd(), ) return distTxCmd @@ -331,3 +334,72 @@ Where proposal.json contains: return cmd } + +// WithdrawAllTokenizeShareRecordReward defines a method to withdraw reward for all owning TokenizeShareRecord +func NewWithdrawAllTokenizeShareRecordRewardCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-all-tokenize-share-rewards", + Args: cobra.ExactArgs(0), + Short: "Withdraw reward for all owning TokenizeShareRecord", + Long: strings.TrimSpace( + fmt.Sprintf(`Withdraw reward for all owned TokenizeShareRecord + +Example: +$ %s tx distribution withdraw-tokenize-share-rewards --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgWithdrawAllTokenizeShareRecordReward(clientCtx.GetFromAddress()) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// WithdrawTokenizeShareRecordReward defines a method to withdraw reward for an owning TokenizeShareRecord +func NewWithdrawTokenizeShareRecordRewardCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-tokenize-share-rewards", + Args: cobra.ExactArgs(1), + Short: "Withdraw reward for an owning TokenizeShareRecord", + Long: strings.TrimSpace( + fmt.Sprintf(`Withdraw reward for an owned TokenizeShareRecord + +Example: +$ %s tx distribution withdraw-tokenize-share-rewards 1 --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + recordID, err := strconv.Atoi(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgWithdrawTokenizeShareRecordReward(clientCtx.GetFromAddress(), uint64(recordID)) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/distribution/client/testutil/suite.go b/x/distribution/client/testutil/suite.go index 3dcfca70aa68..f3e709762799 100644 --- a/x/distribution/client/testutil/suite.go +++ b/x/distribution/client/testutil/suite.go @@ -10,12 +10,16 @@ import ( tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" "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" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" "github.com/cosmos/cosmos-sdk/x/distribution/client/cli" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + stakingcli "github.com/cosmos/cosmos-sdk/x/staking/client/cli" ) type IntegrationTestSuite struct { @@ -747,3 +751,94 @@ func (s *IntegrationTestSuite) TestGetCmdSubmitProposal() { }) } } + +func (s *IntegrationTestSuite) TestNewWithdrawAllTokenizeShareRecordRewardCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedCode uint32 + respType proto.Message + }{ + { + "valid transaction of withdraw tokenize share record reward", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + false, 0, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewWithdrawAllTokenizeShareRecordRewardCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err, out.String()) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + +// This test requires multiple validators, if I add this test to `IntegrationTestSuite` by increasing +// `NumValidators` the existing tests are leading to non-determnism so created new suite for this test. +func (s *IntegrationTestSuite) TestNewWithdrawAllRewardsGenerateOnly() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + info, _, err := val.ClientCtx.Keyring.NewMnemonic("newAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + + pubkey := info.GetPubKey() + + newAddr := sdk.AccAddress(pubkey.Address()) + _, err = banktestutil.MsgSendExec( + val.ClientCtx, + val.Address, + newAddr, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(2000))), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + ) + s.Require().NoError(err) + + // delegate 500 tokens to validator1 + args := []string{ + val.ValAddress.String(), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(500)).String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + _, err = clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewDelegateCmd(), args) + s.Require().NoError(err) + + // withdraw rewards + args = []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=true", flags.FlagGenerateOnly), + fmt.Sprintf("--%s=1", cli.FlagMaxMessagesPerTx), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + } + out, err := clitestutil.ExecTestCLICmd(clientCtx, cli.NewWithdrawAllRewardsCmd(), args) + s.Require().NoError(err) + s.Require().Equal(1, len(strings.Split(strings.Trim(out.String(), "\n"), "\n"))) +} diff --git a/x/distribution/handler.go b/x/distribution/handler.go index 279a6bf726de..b03f16029947 100644 --- a/x/distribution/handler.go +++ b/x/distribution/handler.go @@ -31,6 +31,14 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := msgServer.FundCommunityPool(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgWithdrawTokenizeShareRecordReward: + res, err := msgServer.WithdrawTokenizeShareRecordReward(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgWithdrawAllTokenizeShareRecordReward: + res, err := msgServer.WithdrawAllTokenizeShareRecordReward(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + default: return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized distribution message type: %T", msg) } diff --git a/x/distribution/handler_test.go b/x/distribution/handler_test.go new file mode 100644 index 000000000000..d4bb3faaf19c --- /dev/null +++ b/x/distribution/handler_test.go @@ -0,0 +1,27 @@ +package distribution_test + +import ( + "testing" + + simapp "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +// test msg registration +func TestWithdrawTokenizeShareRecordReward(t *testing.T) { + app := simapp.Setup(false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + + h := distribution.NewHandler(app.DistrKeeper) + delAddr1 = sdk.AccAddress(delPk1.Address()) + + res, err := h(ctx, &types.MsgWithdrawAllTokenizeShareRecordReward{ + OwnerAddress: delAddr1.String(), + }) + require.NoError(t, err) + require.NotNil(t, res) +} diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index 4678ecdc503f..5c56aec33c69 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -8,7 +8,10 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/distribution/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/staking" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -67,6 +70,123 @@ func TestCalculateRewardsBasic(t *testing.T) { require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDec(initial / 2)}}, app.DistrKeeper.GetValidatorAccumulatedCommission(ctx, valAddrs[0]).Commission) } +func TestWithdrawTokenizeShareRecordReward(t *testing.T) { + app := simapp.Setup(false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + + addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(100000000)) + valAddrs := simapp.ConvertAddrsToValAddrs(addr) + tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) + + // create validator with 50% commission + tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) + valPower := int64(100) + tstaking.CreateValidatorWithValPower(valAddrs[0], valConsPk1, valPower, true) + + // end block to bond validator + staking.EndBlocker(ctx, app.StakingKeeper) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // fetch validator and delegation + val := app.StakingKeeper.Validator(ctx, valAddrs[0]) + del := app.StakingKeeper.Delegation(ctx, sdk.AccAddress(valAddrs[0]), valAddrs[0]) + + // end period + endingPeriod := app.DistrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + rewards := app.DistrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + + // rewards should be zero + require.True(t, rewards.IsZero()) + + // start out block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // retrieve validator + val = app.StakingKeeper.Validator(ctx, valAddrs[0]) + + // increase block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some rewards + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial)}} + app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) + + // end period + app.DistrKeeper.IncrementValidatorPeriod(ctx, val) + + coins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, initial)} + err := app.MintKeeper.MintCoins(ctx, coins) + require.NoError(t, err) + err = app.BankKeeper.SendCoinsFromModuleToModule(ctx, minttypes.ModuleName, types.ModuleName, coins) + require.NoError(t, err) + + // tokenize share amount + delTokens := sdk.NewInt(1000000) + msgServer := stakingkeeper.NewMsgServerImpl(app.StakingKeeper) + resp, err := msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &stakingtypes.MsgTokenizeShares{ + DelegatorAddress: sdk.AccAddress(valAddrs[0]).String(), + ValidatorAddress: valAddrs[0].String(), + TokenizedShareOwner: sdk.AccAddress(valAddrs[1]).String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, delTokens), + }) + require.NoError(t, err) + + // try withdrawing rewards before no reward is allocated + coins, err = app.DistrKeeper.WithdrawAllTokenizeShareRecordReward(ctx, sdk.AccAddress(valAddrs[1])) + require.Nil(t, err) + require.Equal(t, coins, sdk.Coins{}) + + // assert tokenize share response + require.NoError(t, err) + require.Equal(t, resp.Amount.Amount, delTokens) + + // end block to bond validator + staking.EndBlocker(ctx, app.StakingKeeper) + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + // allocate some rewards + app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) + // end period + app.DistrKeeper.IncrementValidatorPeriod(ctx, val) + + beforeBalance := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(valAddrs[1]), sdk.DefaultBondDenom) + + // withdraw rewards + coins, err = app.DistrKeeper.WithdrawAllTokenizeShareRecordReward(ctx, sdk.AccAddress(valAddrs[1])) + require.Nil(t, err) + + // check return value + require.Equal(t, coins.String(), "50000stake") + // check balance changes + midBalance := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(valAddrs[1]), sdk.DefaultBondDenom) + require.Equal(t, beforeBalance.Amount.Add(coins.AmountOf(sdk.DefaultBondDenom)), midBalance.Amount) + + // allocate more rewards manually on module account and try full redeem + record, err := app.StakingKeeper.GetTokenizeShareRecord(ctx, 1) + require.NoError(t, err) + + err = app.MintKeeper.MintCoins(ctx, coins) + require.NoError(t, err) + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, record.GetModuleAddress(), coins) + require.NoError(t, err) + + shareTokenBalance := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(valAddrs[0]), record.GetShareTokenDenom()) + + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &stakingtypes.MsgRedeemTokensForShares{ + DelegatorAddress: sdk.AccAddress(valAddrs[0]).String(), + Amount: shareTokenBalance, + }) + require.NoError(t, err) + + finalBalance := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(valAddrs[1]), sdk.DefaultBondDenom) + require.Equal(t, midBalance.Amount.Add(coins.AmountOf(sdk.DefaultBondDenom)), finalBalance.Amount) +} + func TestCalculateRewardsAfterSlash(t *testing.T) { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) diff --git a/x/distribution/keeper/grpc_query.go b/x/distribution/keeper/grpc_query.go index 2779822293fe..45a5dc0d5a56 100644 --- a/x/distribution/keeper/grpc_query.go +++ b/x/distribution/keeper/grpc_query.go @@ -246,3 +246,52 @@ func (k Keeper) CommunityPool(c context.Context, req *types.QueryCommunityPoolRe return &types.QueryCommunityPoolResponse{Pool: pool}, nil } + +// TokenizeShareRecordReward returns estimated amount of reward from tokenize share record ownership +func (k Keeper) TokenizeShareRecordReward(c context.Context, req *types.QueryTokenizeShareRecordRewardRequest) (*types.QueryTokenizeShareRecordRewardResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + totalRewards := sdk.DecCoins{} + rewards := []types.TokenizeShareRecordReward{} + + ownerAddr, err := sdk.AccAddressFromBech32(req.OwnerAddress) + if err != nil { + return nil, err + } + records := k.stakingKeeper.GetTokenizeShareRecordsByOwner(ctx, ownerAddr) + for _, record := range records { + valAddr, err := sdk.ValAddressFromBech32(record.Validator) + if err != nil { + return nil, err + } + + moduleAddr := record.GetModuleAddress() + moduleBalance := k.bankKeeper.GetAllBalances(ctx, moduleAddr) + moduleBalanceDecCoins := sdk.NewDecCoinsFromCoins(moduleBalance...) + + val := k.stakingKeeper.Validator(ctx, valAddr) + del := k.stakingKeeper.Delegation(ctx, moduleAddr, valAddr) + if val != nil && del != nil { + // withdraw rewards + endingPeriod := k.IncrementValidatorPeriod(ctx, val) + recordReward := k.CalculateDelegationRewards(ctx, val, del, endingPeriod) + + rewards = append(rewards, types.TokenizeShareRecordReward{ + RecordId: record.Id, + Reward: recordReward.Add(moduleBalanceDecCoins...), + }) + totalRewards = totalRewards.Add(recordReward...) + } else if !moduleBalance.IsZero() { + rewards = append(rewards, types.TokenizeShareRecordReward{ + RecordId: record.Id, + Reward: moduleBalanceDecCoins, + }) + totalRewards = totalRewards.Add(moduleBalanceDecCoins...) + } + } + + return &types.QueryTokenizeShareRecordRewardResponse{ + Rewards: rewards, + Total: totalRewards, + }, nil +} diff --git a/x/distribution/keeper/grpc_query_test.go b/x/distribution/keeper/grpc_query_test.go index b8b716ddbc06..c566fae54ffd 100644 --- a/x/distribution/keeper/grpc_query_test.go +++ b/x/distribution/keeper/grpc_query_test.go @@ -13,7 +13,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/distribution/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/staking" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -652,6 +654,84 @@ func (suite *KeeperTestSuite) TestGRPCCommunityPool() { } } +func (suite *KeeperTestSuite) TestGRPCTokenizeShareRecordReward() { + app, ctx, queryClient, _ := suite.app, suite.ctx, suite.queryClient, suite.addrs + + addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(100000000)) + valAddrs := simapp.ConvertAddrsToValAddrs(addr) + tstaking := teststaking.NewHelper(suite.T(), ctx, app.StakingKeeper) + + // create validator with 50% commission + tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) + valPower := int64(100) + tstaking.CreateValidatorWithValPower(valAddrs[0], valConsPk1, valPower, true) + + // end block to bond validator + staking.EndBlocker(ctx, app.StakingKeeper) + + // next block + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + + // fetch validator and delegation + val := app.StakingKeeper.Validator(ctx, valAddrs[0]) + del := app.StakingKeeper.Delegation(ctx, sdk.AccAddress(valAddrs[0]), valAddrs[0]) + + // end period + endingPeriod := app.DistrKeeper.IncrementValidatorPeriod(ctx, val) + + // calculate delegation rewards + app.DistrKeeper.CalculateDelegationRewards(ctx, val, del, endingPeriod) + + // start out block height + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + val = app.StakingKeeper.Validator(ctx, valAddrs[0]) + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 3) + + // allocate some rewards + initial := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) + tokens := sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: sdk.NewDecFromInt(initial)}} + app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) + + // end period + app.DistrKeeper.IncrementValidatorPeriod(ctx, val) + + coins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, initial)} + err := app.MintKeeper.MintCoins(ctx, coins) + suite.Require().NoError(err) + + err = app.BankKeeper.SendCoinsFromModuleToModule(ctx, minttypes.ModuleName, types.ModuleName, coins) + suite.Require().NoError(err) + // tokenize share amount + delTokens := sdk.NewInt(1000000) + msgServer := stakingkeeper.NewMsgServerImpl(app.StakingKeeper) + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &stakingtypes.MsgTokenizeShares{ + DelegatorAddress: sdk.AccAddress(valAddrs[0]).String(), + ValidatorAddress: valAddrs[0].String(), + TokenizedShareOwner: sdk.AccAddress(valAddrs[0]).String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, delTokens), + }) + suite.Require().NoError(err) + + staking.EndBlocker(ctx, app.StakingKeeper) + ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) + app.DistrKeeper.AllocateTokensToValidator(ctx, val, tokens) + app.DistrKeeper.IncrementValidatorPeriod(ctx, val) + + rewards, err := queryClient.TokenizeShareRecordReward(gocontext.Background(), &types.QueryTokenizeShareRecordRewardRequest{ + OwnerAddress: sdk.AccAddress(valAddrs[0]).String(), + }) + suite.Require().NoError(err) + suite.Require().Equal(&types.QueryTokenizeShareRecordRewardResponse{ + Rewards: []types.TokenizeShareRecordReward{ + { + RecordId: 1, + Reward: sdk.DecCoins{sdk.NewInt64DecCoin("stake", 50000)}, + }, + }, + Total: sdk.DecCoins{sdk.NewInt64DecCoin("stake", 50000)}, + }, rewards) +} + func TestDistributionTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } diff --git a/x/distribution/keeper/hooks.go b/x/distribution/keeper/hooks.go index 4ca75691f511..bc4dde7b3788 100644 --- a/x/distribution/keeper/hooks.go +++ b/x/distribution/keeper/hooks.go @@ -101,6 +101,15 @@ func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, f h.k.updateValidatorSlashFraction(ctx, valAddr, fraction) } +// Withdraw rewards before removing record +func (h Hooks) BeforeTokenizeShareRecordRemoved(ctx sdk.Context, recordID uint64) error { + err := h.k.WithdrawSingleShareRecordReward(ctx, recordID) + if err != nil { + h.k.Logger(ctx).Error(err.Error()) + } + return err +} + func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) {} func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) {} func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) {} diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 22e1a2894402..3c312c390670 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -164,3 +164,156 @@ func (k Keeper) FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk. return nil } + +func (k Keeper) WithdrawSingleShareRecordReward(ctx sdk.Context, recordID uint64) error { + record, err := k.stakingKeeper.GetTokenizeShareRecord(ctx, recordID) + if err != nil { + return err + } + + owner, err := sdk.AccAddressFromBech32(record.Owner) + if err != nil { + return err + } + + valAddr, err := sdk.ValAddressFromBech32(record.Validator) + if err != nil { + return err + } + + val := k.stakingKeeper.Validator(ctx, valAddr) + del := k.stakingKeeper.Delegation(ctx, record.GetModuleAddress(), valAddr) + if val != nil && del != nil { + // withdraw rewards into reward module account and send it to reward owner + cacheCtx, write := ctx.CacheContext() + _, err = k.WithdrawDelegationRewards(cacheCtx, record.GetModuleAddress(), valAddr) + if err != nil { + return err + } + write() + } + + // apply changes when the module account has positive balance + balances := k.bankKeeper.GetAllBalances(ctx, record.GetModuleAddress()) + if !balances.Empty() { + err = k.bankKeeper.SendCoins(ctx, record.GetModuleAddress(), owner, balances) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeWithdrawTokenizeShareReward, + sdk.NewAttribute(types.AttributeKeyWithdrawAddress, owner.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), + ), + ) + } + return nil +} + +// withdraw reward for owning TokenizeShareRecord +func (k Keeper) WithdrawTokenizeShareRecordReward(ctx sdk.Context, ownerAddr sdk.AccAddress, recordID uint64) (sdk.Coins, error) { + record, err := k.stakingKeeper.GetTokenizeShareRecord(ctx, recordID) + if err != nil { + return nil, err + } + + if record.Owner != ownerAddr.String() { + return nil, types.ErrNotTokenizeShareRecordOwner + } + + valAddr, err := sdk.ValAddressFromBech32(record.Validator) + if err != nil { + return nil, err + } + + val := k.stakingKeeper.Validator(ctx, valAddr) + if val == nil { + return nil, err + } + + del := k.stakingKeeper.Delegation(ctx, record.GetModuleAddress(), valAddr) + if del == nil { + return nil, err + } + + // withdraw rewards into reward module account and send it to reward owner + _, err = k.WithdrawDelegationRewards(ctx, record.GetModuleAddress(), valAddr) + if err != nil { + return nil, err + } + + // apply changes when the module account has positive balance + rewards := k.bankKeeper.GetAllBalances(ctx, record.GetModuleAddress()) + if !rewards.Empty() { + err = k.bankKeeper.SendCoins(ctx, record.GetModuleAddress(), ownerAddr, rewards) + if err != nil { + return nil, err + } + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeWithdrawTokenizeShareReward, + sdk.NewAttribute(types.AttributeKeyWithdrawAddress, ownerAddr.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, rewards.String()), + ), + ) + + return rewards, nil +} + +// withdraw reward for all owning TokenizeShareRecord +func (k Keeper) WithdrawAllTokenizeShareRecordReward(ctx sdk.Context, ownerAddr sdk.AccAddress) (sdk.Coins, error) { + totalRewards := sdk.Coins{} + + records := k.stakingKeeper.GetTokenizeShareRecordsByOwner(ctx, ownerAddr) + + for _, record := range records { + valAddr, err := sdk.ValAddressFromBech32(record.Validator) + if err != nil { + return nil, err + } + + val := k.stakingKeeper.Validator(ctx, valAddr) + if val == nil { + continue + } + + del := k.stakingKeeper.Delegation(ctx, record.GetModuleAddress(), valAddr) + if del == nil { + continue + } + + // withdraw rewards into reward module account and send it to reward owner + cacheCtx, write := ctx.CacheContext() + _, err = k.WithdrawDelegationRewards(cacheCtx, record.GetModuleAddress(), valAddr) + if err != nil { + k.Logger(ctx).Error(err.Error()) + continue + } + + // apply changes when the module account has positive balance + balances := k.bankKeeper.GetAllBalances(cacheCtx, record.GetModuleAddress()) + if !balances.Empty() { + err = k.bankKeeper.SendCoins(cacheCtx, record.GetModuleAddress(), ownerAddr, balances) + if err != nil { + k.Logger(ctx).Error(err.Error()) + continue + } + write() + totalRewards = totalRewards.Add(balances...) + } + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeWithdrawTokenizeShareReward, + sdk.NewAttribute(types.AttributeKeyWithdrawAddress, ownerAddr.String()), + sdk.NewAttribute(sdk.AttributeKeyAmount, totalRewards.String()), + ), + ) + + return totalRewards, nil +} diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index bff869ee55d7..cfcd5d4d706e 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -122,14 +122,86 @@ func (k msgServer) WithdrawValidatorCommission(goCtx context.Context, msg *types return &types.MsgWithdrawValidatorCommissionResponse{}, nil } +// WithdrawTokenizeShareRecordReward defines a method to withdraw reward for owning TokenizeShareRecord +func (k msgServer) WithdrawTokenizeShareRecordReward(goCtx context.Context, msg *types.MsgWithdrawTokenizeShareRecordReward) (*types.MsgWithdrawTokenizeShareRecordRewardResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + ownerAddr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + return nil, err + } + amount, err := k.Keeper.WithdrawTokenizeShareRecordReward(ctx, ownerAddr, msg.RecordId) + if err != nil { + return nil, err + } + + defer func() { + for _, a := range amount { + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "withdraw_tokenize_share_reward"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } + } + }() + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), + ), + ) + + return &types.MsgWithdrawTokenizeShareRecordRewardResponse{}, nil +} + +// WithdrawAllTokenizeShareRecordReward defines a method to withdraw reward for owning TokenizeShareRecord +func (k msgServer) WithdrawAllTokenizeShareRecordReward(goCtx context.Context, msg *types.MsgWithdrawAllTokenizeShareRecordReward) (*types.MsgWithdrawAllTokenizeShareRecordRewardResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + ownerAddr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + return nil, err + } + amount, err := k.Keeper.WithdrawAllTokenizeShareRecordReward(ctx, ownerAddr) + if err != nil { + return nil, err + } + + defer func() { + for _, a := range amount { + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "withdraw_all_tokenize_share_reward"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } + } + }() + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), + ), + ) + + return &types.MsgWithdrawAllTokenizeShareRecordRewardResponse{}, nil +} + func (k msgServer) FundCommunityPool(goCtx context.Context, msg *types.MsgFundCommunityPool) (*types.MsgFundCommunityPoolResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - depositer, err := sdk.AccAddressFromBech32(msg.Depositor) + depositor, err := sdk.AccAddressFromBech32(msg.Depositor) if err != nil { return nil, err } - if err := k.Keeper.FundCommunityPool(ctx, msg.Amount, depositer); err != nil { + if err := k.Keeper.FundCommunityPool(ctx, msg.Amount, depositor); err != nil { return nil, err } diff --git a/x/distribution/proposal_handler_test.go b/x/distribution/proposal_handler_test.go index a9b11b321df3..2e5417149d93 100644 --- a/x/distribution/proposal_handler_test.go +++ b/x/distribution/proposal_handler_test.go @@ -32,7 +32,7 @@ func TestProposalHandlerPassed(t *testing.T) { // add coins to the module account macc := app.DistrKeeper.GetDistributionAccount(ctx) - balances := app.BankKeeper.GetAllBalances(ctx, macc.GetAddress()) + _ = app.BankKeeper.GetAllBalances(ctx, macc.GetAddress()) require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, macc.GetName(), amount)) app.AccountKeeper.SetModuleAccount(ctx, macc) @@ -49,7 +49,7 @@ func TestProposalHandlerPassed(t *testing.T) { hdlr := distribution.NewCommunityPoolSpendProposalHandler(app.DistrKeeper) require.NoError(t, hdlr(ctx, tp)) - balances = app.BankKeeper.GetAllBalances(ctx, recipient) + balances := app.BankKeeper.GetAllBalances(ctx, recipient) require.Equal(t, balances, amount) } diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go index 9d898d07f9c1..353cdf4f8495 100644 --- a/x/distribution/simulation/operations.go +++ b/x/distribution/simulation/operations.go @@ -17,10 +17,11 @@ import ( // Simulation operation weights constants const ( - OpWeightMsgSetWithdrawAddress = "op_weight_msg_set_withdraw_address" //nolint:gosec - OpWeightMsgWithdrawDelegationReward = "op_weight_msg_withdraw_delegation_reward" //nolint:gosec - OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission" //nolint:gosec - OpWeightMsgFundCommunityPool = "op_weight_msg_fund_community_pool" //nolint:gosec + 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" + OpWeightMsgWithdrawTokenizeShareRecordReward = "op_weight_msg_withdraw_tokenize_share_record_reward" ) // WeightedOperations returns all the operations from the module with their respective weights @@ -53,6 +54,13 @@ func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak ty }, ) + var weightMsgWithdrawTokenizeShareRecordReward int + appParams.GetOrGenerate(cdc, OpWeightMsgWithdrawTokenizeShareRecordReward, &weightMsgWithdrawTokenizeShareRecordReward, nil, + func(_ *rand.Rand) { + weightMsgWithdrawTokenizeShareRecordReward = simappparams.DefaultWeightMsgWithdrawAllTokenizeShareRecordReward + }, + ) + stakeKeeper := sk.(stakingkeeper.Keeper) return simulation.WeightedOperations{ @@ -72,6 +80,10 @@ func WeightedOperations(appParams simtypes.AppParams, cdc codec.JSONCodec, ak ty weightMsgFundCommunityPool, SimulateMsgFundCommunityPool(ak, bk, k, stakeKeeper), ), + simulation.NewWeightedOperation( + weightMsgWithdrawTokenizeShareRecordReward, + SimulateMsgWithdrawTokenizeShareRecordReward(ak, bk, k, stakeKeeper), + ), } } @@ -244,3 +256,51 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k return simulation.GenAndDeliverTx(txCtx, fees) } } + +// SimulateMsgWithdrawTokenizeShareRecordReward simulates MsgWithdrawTokenizeShareRecordReward execution where +// a random account claim tokenize share record rewards. +func SimulateMsgWithdrawTokenizeShareRecordReward(ak types.AccountKeeper, bk types.BankKeeper, _ keeper.Keeper, sk stakingkeeper.Keeper) simtypes.Operation { + return func( + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + rewardOwner, _ := simtypes.RandomAcc(r, accs) + + records := sk.GetAllTokenizeShareRecords(ctx) + if len(records) > 0 { + record := records[r.Intn(len(records))] + for _, acc := range accs { + if acc.Address.String() == record.Owner { + rewardOwner = acc + break + } + } + } + + // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error + if rewardOwner.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgWithdrawTokenizeShareRecordReward, "account private key is nil"), nil, nil + } + + msg := types.NewMsgWithdrawAllTokenizeShareRecordReward(rewardOwner.Address) + + account := ak.GetAccount(ctx, rewardOwner.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: rewardOwner, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 0e5dfdd4613f..2f5f15822e68 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -41,6 +41,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { {simappparams.DefaultWeightMsgWithdrawDelegationReward, types.ModuleName, types.TypeMsgWithdrawDelegatorReward}, {simappparams.DefaultWeightMsgWithdrawValidatorCommission, types.ModuleName, types.TypeMsgWithdrawValidatorCommission}, {simappparams.DefaultWeightMsgFundCommunityPool, types.ModuleName, types.TypeMsgFundCommunityPool}, + {simappparams.DefaultWeightMsgWithdrawAllTokenizeShareRecordReward, types.ModuleName, types.TypeMsgWithdrawAllTokenizeShareRecordReward}, } for i, w := range weightesOps { @@ -71,7 +72,8 @@ func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { suite.Require().NoError(err) var msg types.MsgSetWithdrawAddress - types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + err = types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + suite.Require().NoError(err) suite.Require().True(operationMsg.OK) suite.Require().Equal("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) @@ -112,7 +114,8 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { suite.Require().NoError(err) var msg types.MsgWithdrawDelegatorReward - types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + err = types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + suite.Require().NoError(err) suite.Require().True(operationMsg.OK) suite.Require().Equal("cosmosvaloper1l4s054098kk9hmr5753c6k3m2kw65h686d3mhr", msg.ValidatorAddress) @@ -168,7 +171,8 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName suite.Require().NoError(err) var msg types.MsgWithdrawValidatorCommission - types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + err = types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + suite.Require().NoError(err) suite.Require().True(operationMsg.OK) suite.Require().Equal("cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) @@ -194,7 +198,8 @@ func (suite *SimTestSuite) TestSimulateMsgFundCommunityPool() { suite.Require().NoError(err) var msg types.MsgFundCommunityPool - types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + err = types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + suite.Require().NoError(err) suite.Require().True(operationMsg.OK) suite.Require().Equal("4896096stake", msg.Amount.String()) diff --git a/x/distribution/types/codec.go b/x/distribution/types/codec.go index 73aca45060e6..af585b96a575 100644 --- a/x/distribution/types/codec.go +++ b/x/distribution/types/codec.go @@ -17,6 +17,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgSetWithdrawAddress{}, "cosmos-sdk/MsgModifyWithdrawAddress", nil) cdc.RegisterConcrete(&MsgFundCommunityPool{}, "cosmos-sdk/MsgFundCommunityPool", nil) cdc.RegisterConcrete(&CommunityPoolSpendProposal{}, "cosmos-sdk/CommunityPoolSpendProposal", nil) + cdc.RegisterConcrete(&MsgWithdrawTokenizeShareRecordReward{}, "cosmos-sdk/MsgWithdrawTokenizeReward", nil) + cdc.RegisterConcrete(&MsgWithdrawAllTokenizeShareRecordReward{}, "cosmos-sdk/MsgWithdrawAllTokenizeReward", nil) } func RegisterInterfaces(registry types.InterfaceRegistry) { @@ -26,6 +28,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgWithdrawValidatorCommission{}, &MsgSetWithdrawAddress{}, &MsgFundCommunityPool{}, + &MsgWithdrawTokenizeShareRecordReward{}, + &MsgWithdrawAllTokenizeShareRecordReward{}, ) registry.RegisterImplementations( (*govtypes.Content)(nil), diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index 2657160a6ea0..3832a692c2bb 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -562,6 +562,45 @@ func (m *DelegationDelegatorReward) XXX_DiscardUnknown() { var xxx_messageInfo_DelegationDelegatorReward proto.InternalMessageInfo +// TokenizeShareRecordReward represents the properties of tokenize share +type TokenizeShareRecordReward struct { + RecordId uint64 `protobuf:"varint,1,opt,name=record_id,json=recordId,proto3" json:"record_id,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 *TokenizeShareRecordReward) Reset() { *m = TokenizeShareRecordReward{} } +func (m *TokenizeShareRecordReward) String() string { return proto.CompactTextString(m) } +func (*TokenizeShareRecordReward) ProtoMessage() {} +func (*TokenizeShareRecordReward) Descriptor() ([]byte, []int) { + return fileDescriptor_cd78a31ea281a992, []int{11} +} +func (m *TokenizeShareRecordReward) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenizeShareRecordReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenizeShareRecordReward.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 *TokenizeShareRecordReward) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenizeShareRecordReward.Merge(m, src) +} +func (m *TokenizeShareRecordReward) XXX_Size() int { + return m.Size() +} +func (m *TokenizeShareRecordReward) XXX_DiscardUnknown() { + xxx_messageInfo_TokenizeShareRecordReward.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenizeShareRecordReward proto.InternalMessageInfo + // CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal // with a deposit type CommunityPoolSpendProposalWithDeposit struct { @@ -576,7 +615,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_cd78a31ea281a992, []int{12} } func (m *CommunityPoolSpendProposalWithDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -617,6 +656,7 @@ func init() { 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((*TokenizeShareRecordReward)(nil), "cosmos.distribution.v1beta1.TokenizeShareRecordReward") proto.RegisterType((*CommunityPoolSpendProposalWithDeposit)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit") } @@ -625,76 +665,79 @@ func init() { } var fileDescriptor_cd78a31ea281a992 = []byte{ - // 1102 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x24, 0x8e, 0x93, 0x4e, 0xf3, 0xab, 0x13, 0x27, 0x71, 0x93, 0xe0, 0x8d, 0x46, 0x6a, - 0x15, 0x04, 0x75, 0x9a, 0xf6, 0x82, 0x72, 0x40, 0x8a, 0x9d, 0x44, 0x14, 0x01, 0x8d, 0xb6, 0x01, - 0x24, 0x2e, 0xd6, 0x78, 0x77, 0x62, 0x8f, 0x62, 0xef, 0x2c, 0x33, 0x63, 0x27, 0x39, 0x20, 0x24, - 0x4e, 0x5c, 0x10, 0x20, 0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0xbc, 0xcb, 0x4b, 0xdd, 0xc0, 0x42, 0xda, 0xba, 0xe7, 0x10, 0xf7, 0xcb, 0xfe, 0xde, - 0x53, 0xb2, 0x2f, 0xe7, 0xbb, 0x81, 0x35, 0x1f, 0xcf, 0x69, 0x73, 0x84, 0x7b, 0x5f, 0x86, 0x97, - 0x7b, 0x5e, 0x86, 0xf0, 0xc2, 0x8d, 0x6e, 0x60, 0xcd, 0xe8, 0x0b, 0x1a, 0xc7, 0xb1, 0xa4, 0xd1, - 0xab, 0x70, 0xd2, 0xd5, 0xb9, 0x14, 0x26, 0x22, 0x5b, 0x94, 0x2e, 0x01, 0x73, 0x80, 0xed, 0xd8, - 0x24, 0x2d, 0x51, 0xf9, 0xe1, 0xf7, 0x17, 0x45, 0xf0, 0xf8, 0xa2, 0x08, 0x9e, 0x5c, 0x14, 0xc1, - 0x9f, 0x17, 0x45, 0xf0, 0xc5, 0x65, 0x31, 0xf3, 0xe4, 0xb2, 0x98, 0xf9, 0xf5, 0xb2, 0x98, 0xf9, - 0x60, 0xeb, 0x99, 0xf5, 0x3f, 0xed, 0xff, 0xb4, 0x8e, 0xda, 0x51, 0xcb, 0x45, 0x5f, 0xbe, 0xf7, - 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x45, 0x1d, 0xb8, 0x42, 0x7e, 0x0b, 0x00, 0x00, + // 1138 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcb, 0x6f, 0x23, 0x35, + 0x18, 0x8f, 0xdb, 0x34, 0xed, 0x7a, 0xfb, 0x5a, 0x37, 0x6d, 0xd3, 0x07, 0x99, 0xca, 0xd2, 0xae, + 0x8a, 0x60, 0xd3, 0xed, 0xee, 0x05, 0xf5, 0x80, 0xd4, 0xa4, 0xad, 0x28, 0x02, 0xb6, 0x9a, 0x16, + 0x90, 0xb8, 0x44, 0xce, 0x8c, 0x9b, 0x58, 0x4d, 0xc6, 0xc1, 0x76, 0xd2, 0x16, 0x09, 0x21, 0x71, + 0xe2, 0x82, 0x00, 0x71, 0xe1, 0x00, 0xa8, 0x47, 0x9e, 0xff, 0xc7, 0x1e, 0xf7, 0x06, 0x02, 0x69, + 0x40, 0xad, 0x90, 0x10, 0xc7, 0xdc, 0xb8, 0xa1, 0x19, 0x7b, 0x66, 0x92, 0x6c, 0x58, 0x35, 0x48, + 0x2b, 0x4e, 0xad, 0x7f, 0xfe, 0xfc, 0x7d, 0xbf, 0xef, 0x3d, 0x81, 0x05, 0x87, 0xcb, 0x06, 0x97, + 0x1b, 0x2e, 0x93, 0x4a, 0xb0, 0x4a, 0x4b, 0x31, 0xee, 0x6d, 0xb4, 0x37, 0x2b, 0x54, 0x91, 0xcd, + 0x1e, 0xb0, 0xd0, 0x14, 0x5c, 0x71, 0xb4, 0xa2, 0xe5, 0x0b, 0x3d, 0x57, 0x46, 0x7e, 0x39, 0x5b, + 0xe5, 0x55, 0x1e, 0xca, 0x6d, 0x04, 0xff, 0xe9, 0x27, 0xcb, 0x79, 0x63, 0xa2, 0x42, 0x24, 0x8d, + 0x55, 0x3b, 0x9c, 0x19, 0x95, 0xf8, 0xa7, 0x51, 0x98, 0x39, 0x20, 0x82, 0x34, 0x24, 0x3a, 0x81, + 0x53, 0x0e, 0x6f, 0x34, 0x5a, 0x1e, 0x53, 0xe7, 0x65, 0x45, 0xce, 0x72, 0x60, 0x0d, 0xac, 0xdf, + 0x28, 0xee, 0x3d, 0xf2, 0xad, 0xd4, 0x2f, 0xbe, 0x75, 0xa7, 0xca, 0x54, 0xad, 0x55, 0x29, 0x38, + 0xbc, 0xb1, 0x61, 0x94, 0xea, 0x3f, 0x77, 0xa5, 0x7b, 0xb2, 0xa1, 0xce, 0x9b, 0x54, 0x16, 0x76, + 0xa8, 0xd3, 0xf1, 0xad, 0xec, 0x39, 0x69, 0xd4, 0xb7, 0x70, 0x8f, 0x32, 0x6c, 0x4f, 0xc6, 0xe7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0xc2, 0x2d, 0x33, 0x93, 0x57, + 0x7b, 0x42, 0x03, 0xfb, 0xee, 0xff, 0xc3, 0xf7, 0x62, 0x04, 0xde, 0xfe, 0xf7, 0x8e, 0x7b, 0x9b, + 0xa9, 0xda, 0x0e, 0x6d, 0x72, 0xc9, 0x14, 0xba, 0xd3, 0xd3, 0x7c, 0xc5, 0xd9, 0xa4, 0x4c, 0x42, + 0x18, 0x47, 0xed, 0xf8, 0xd2, 0x80, 0x76, 0x2c, 0x2e, 0x74, 0x7c, 0x0b, 0x69, 0xe9, 0xae, 0x4b, + 0xdc, 0xdb, 0xa6, 0xf7, 0x9f, 0x68, 0xd3, 0x62, 0xb6, 0xe3, 0x5b, 0xb3, 0xd1, 0x5e, 0x31, 0x57, + 0xb8, 0xbb, 0x79, 0x9f, 0xef, 0x6a, 0xde, 0xe0, 0xc1, 0xad, 0x8e, 0x6f, 0x4d, 0xe9, 0x07, 0x1a, + 0xc7, 0x51, 0x0b, 0xa2, 0x17, 0xe1, 0xb8, 0xab, 0x7d, 0xc9, 0x8d, 0x85, 0xb2, 0x28, 0x59, 0x5a, + 0xe6, 0x02, 0xdb, 0x91, 0x48, 0x12, 0xa2, 0xe2, 0xc3, 0x6f, 0x2e, 0xf3, 0xe0, 0xd1, 0x65, 0x1e, + 0x3c, 0xbe, 0xcc, 0x83, 0xdf, 0x2f, 0xf3, 0xe0, 0xd3, 0xab, 0x7c, 0xea, 0xf1, 0x55, 0x3e, 0xf5, + 0xf3, 0x55, 0x3e, 0xf5, 0xce, 0xe6, 0x53, 0xe3, 0x7f, 0xd6, 0xfb, 0x53, 0x20, 0x4c, 0x47, 0x25, + 0x13, 0x7e, 0xa9, 0x3f, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xd6, 0x39, 0x3f, 0x2e, 0x0c, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -999,6 +1042,38 @@ func (this *DelegationDelegatorReward) Equal(that interface{}) bool { } return true } +func (this *TokenizeShareRecordReward) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TokenizeShareRecordReward) + if !ok { + that2, ok := that.(TokenizeShareRecordReward) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RecordId != that1.RecordId { + 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 @@ -1513,6 +1588,48 @@ func (m *DelegationDelegatorReward) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *TokenizeShareRecordReward) 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 *TokenizeShareRecordReward) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenizeShareRecordReward) 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 m.RecordId != 0 { + i = encodeVarintDistribution(dAtA, i, uint64(m.RecordId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *CommunityPoolSpendProposalWithDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1773,6 +1890,24 @@ func (m *DelegationDelegatorReward) Size() (n int) { return n } +func (m *TokenizeShareRecordReward) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RecordId != 0 { + n += 1 + sovDistribution(uint64(m.RecordId)) + } + 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 @@ -3043,6 +3178,109 @@ func (m *DelegationDelegatorReward) Unmarshal(dAtA []byte) error { } return nil } +func (m *TokenizeShareRecordReward) 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: TokenizeShareRecordReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenizeShareRecordReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) + } + m.RecordId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDistribution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RecordId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 diff --git a/x/distribution/types/errors.go b/x/distribution/types/errors.go index 147cfd320341..83c254b6ef6b 100644 --- a/x/distribution/types/errors.go +++ b/x/distribution/types/errors.go @@ -6,16 +6,17 @@ import ( // x/distribution module sentinel errors var ( - ErrEmptyDelegatorAddr = sdkerrors.Register(ModuleName, 2, "delegator address is empty") - ErrEmptyWithdrawAddr = sdkerrors.Register(ModuleName, 3, "withdraw address is empty") - ErrEmptyValidatorAddr = sdkerrors.Register(ModuleName, 4, "validator address is empty") - ErrEmptyDelegationDistInfo = sdkerrors.Register(ModuleName, 5, "no delegation distribution info") - ErrNoValidatorDistInfo = sdkerrors.Register(ModuleName, 6, "no validator distribution info") - ErrNoValidatorCommission = sdkerrors.Register(ModuleName, 7, "no validator commission to withdraw") - ErrSetWithdrawAddrDisabled = sdkerrors.Register(ModuleName, 8, "set withdraw address disabled") - ErrBadDistribution = sdkerrors.Register(ModuleName, 9, "community pool does not have sufficient coins to distribute") - ErrInvalidProposalAmount = sdkerrors.Register(ModuleName, 10, "invalid community pool spend proposal amount") - ErrEmptyProposalRecipient = sdkerrors.Register(ModuleName, 11, "invalid community pool spend proposal recipient") - ErrNoValidatorExists = sdkerrors.Register(ModuleName, 12, "validator does not exist") - ErrNoDelegationExists = sdkerrors.Register(ModuleName, 13, "delegation does not exist") + ErrEmptyDelegatorAddr = sdkerrors.Register(ModuleName, 2, "delegator address is empty") + ErrEmptyWithdrawAddr = sdkerrors.Register(ModuleName, 3, "withdraw address is empty") + ErrEmptyValidatorAddr = sdkerrors.Register(ModuleName, 4, "validator address is empty") + ErrEmptyDelegationDistInfo = sdkerrors.Register(ModuleName, 5, "no delegation distribution info") + ErrNoValidatorDistInfo = sdkerrors.Register(ModuleName, 6, "no validator distribution info") + ErrNoValidatorCommission = sdkerrors.Register(ModuleName, 7, "no validator commission to withdraw") + ErrSetWithdrawAddrDisabled = sdkerrors.Register(ModuleName, 8, "set withdraw address disabled") + ErrBadDistribution = sdkerrors.Register(ModuleName, 9, "community pool does not have sufficient coins to distribute") + ErrInvalidProposalAmount = sdkerrors.Register(ModuleName, 10, "invalid community pool spend proposal amount") + ErrEmptyProposalRecipient = sdkerrors.Register(ModuleName, 11, "invalid community pool spend proposal recipient") + ErrNoValidatorExists = sdkerrors.Register(ModuleName, 12, "validator does not exist") + ErrNoDelegationExists = sdkerrors.Register(ModuleName, 13, "delegation does not exist") + ErrNotTokenizeShareRecordOwner = sdkerrors.Register(ModuleName, 14, "not tokenize share record owner") ) diff --git a/x/distribution/types/events.go b/x/distribution/types/events.go index ce4c0ef62e3c..a45d931c9b33 100644 --- a/x/distribution/types/events.go +++ b/x/distribution/types/events.go @@ -2,12 +2,13 @@ package types // distribution module event types const ( - EventTypeSetWithdrawAddress = "set_withdraw_address" - EventTypeRewards = "rewards" - EventTypeCommission = "commission" - EventTypeWithdrawRewards = "withdraw_rewards" - EventTypeWithdrawCommission = "withdraw_commission" - EventTypeProposerReward = "proposer_reward" + EventTypeSetWithdrawAddress = "set_withdraw_address" + EventTypeRewards = "rewards" + EventTypeCommission = "commission" + EventTypeWithdrawRewards = "withdraw_rewards" + EventTypeWithdrawCommission = "withdraw_commission" + EventTypeWithdrawTokenizeShareReward = "withdraw_tokenize_share_reward" + EventTypeProposerReward = "proposer_reward" AttributeKeyWithdrawAddress = "withdraw_address" AttributeKeyValidator = "validator" diff --git a/x/distribution/types/expected_keepers.go b/x/distribution/types/expected_keepers.go index 9b869c972735..226a2a79cbf3 100644 --- a/x/distribution/types/expected_keepers.go +++ b/x/distribution/types/expected_keepers.go @@ -27,6 +27,7 @@ type BankKeeper interface { SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error } // StakingKeeper expected staking keeper (noalias) @@ -65,6 +66,9 @@ type StakingKeeper interface { GetLastValidatorPower(ctx sdk.Context, valAddr sdk.ValAddress) int64 GetAllSDKDelegations(ctx sdk.Context) []stakingtypes.Delegation + + GetTokenizeShareRecordsByOwner(ctx sdk.Context, owner sdk.AccAddress) (tokenizeShareRecords []stakingtypes.TokenizeShareRecord) + GetTokenizeShareRecord(ctx sdk.Context, id uint64) (tokenizeShareRecord stakingtypes.TokenizeShareRecord, err error) } // StakingHooks event hooks for staking validator object (noalias) diff --git a/x/distribution/types/msg.go b/x/distribution/types/msg.go index 09e9994c16a9..011395f1d29b 100644 --- a/x/distribution/types/msg.go +++ b/x/distribution/types/msg.go @@ -1,20 +1,29 @@ package types import ( + "github.com/cosmos/cosmos-sdk/codec/legacy" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // distribution message types const ( - TypeMsgSetWithdrawAddress = "set_withdraw_address" - TypeMsgWithdrawDelegatorReward = "withdraw_delegator_reward" - TypeMsgWithdrawValidatorCommission = "withdraw_validator_commission" - TypeMsgFundCommunityPool = "fund_community_pool" + TypeMsgSetWithdrawAddress = "set_withdraw_address" + TypeMsgWithdrawDelegatorReward = "withdraw_delegator_reward" + TypeMsgWithdrawValidatorCommission = "withdraw_validator_commission" + TypeMsgFundCommunityPool = "fund_community_pool" + TypeMsgWithdrawTokenizeShareRecordReward = "withdraw_tokenize_share_record_reward" + TypeMsgWithdrawAllTokenizeShareRecordReward = "withdraw_all_tokenize_share_record_reward" ) // Verify interface at compile time -var _, _, _ sdk.Msg = &MsgSetWithdrawAddress{}, &MsgWithdrawDelegatorReward{}, &MsgWithdrawValidatorCommission{} +var ( + _ sdk.Msg = &MsgSetWithdrawAddress{} + _ sdk.Msg = &MsgWithdrawDelegatorReward{} + _ sdk.Msg = &MsgWithdrawValidatorCommission{} + _ sdk.Msg = &MsgWithdrawTokenizeShareRecordReward{} + _ sdk.Msg = &MsgWithdrawAllTokenizeShareRecordReward{} +) func NewMsgSetWithdrawAddress(delAddr, withdrawAddr sdk.AccAddress) *MsgSetWithdrawAddress { return &MsgSetWithdrawAddress{ @@ -164,3 +173,72 @@ func (msg MsgFundCommunityPool) ValidateBasic() error { return nil } + +func NewMsgWithdrawTokenizeShareRecordReward(ownerAddr sdk.AccAddress, recordID uint64) *MsgWithdrawTokenizeShareRecordReward { + return &MsgWithdrawTokenizeShareRecordReward{ + OwnerAddress: ownerAddr.String(), + RecordId: recordID, + } +} + +func (msg MsgWithdrawTokenizeShareRecordReward) Route() string { return ModuleName } +func (msg MsgWithdrawTokenizeShareRecordReward) Type() string { + return TypeMsgWithdrawTokenizeShareRecordReward +} + +// Return address that must sign over msg.GetSignBytes() +func (msg MsgWithdrawTokenizeShareRecordReward) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{owner} +} + +// get the bytes for the message signer to sign on +func (msg MsgWithdrawTokenizeShareRecordReward) GetSignBytes() []byte { + bz := legacy.Cdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// quick validity check +func (msg MsgWithdrawTokenizeShareRecordReward) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.OwnerAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid owner address: %s", err) + } + return nil +} + +func NewMsgWithdrawAllTokenizeShareRecordReward(ownerAddr sdk.AccAddress) *MsgWithdrawAllTokenizeShareRecordReward { + return &MsgWithdrawAllTokenizeShareRecordReward{ + OwnerAddress: ownerAddr.String(), + } +} + +func (msg MsgWithdrawAllTokenizeShareRecordReward) Route() string { return ModuleName } +func (msg MsgWithdrawAllTokenizeShareRecordReward) Type() string { + return TypeMsgWithdrawAllTokenizeShareRecordReward +} + +// Return address that must sign over msg.GetSignBytes() +func (msg MsgWithdrawAllTokenizeShareRecordReward) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{owner} +} + +// get the bytes for the message signer to sign on +func (msg MsgWithdrawAllTokenizeShareRecordReward) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// quick validity check +func (msg MsgWithdrawAllTokenizeShareRecordReward) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.OwnerAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid owner address: %s", err) + } + return nil +} diff --git a/x/distribution/types/query.pb.go b/x/distribution/types/query.pb.go index 47acd5e73c52..2af13202625e 100644 --- a/x/distribution/types/query.pb.go +++ b/x/distribution/types/query.pb.go @@ -838,6 +838,103 @@ func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_type return nil } +// QueryTokenizeShareRecordRewardRequest is the request type for the Query/TokenizeShareRecordReward RPC +// method. +type QueryTokenizeShareRecordRewardRequest struct { + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" yaml:"owner_address"` +} + +func (m *QueryTokenizeShareRecordRewardRequest) Reset() { *m = QueryTokenizeShareRecordRewardRequest{} } +func (m *QueryTokenizeShareRecordRewardRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordRewardRequest) ProtoMessage() {} +func (*QueryTokenizeShareRecordRewardRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{18} +} +func (m *QueryTokenizeShareRecordRewardRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordRewardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordRewardRequest.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 *QueryTokenizeShareRecordRewardRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordRewardRequest.Merge(m, src) +} +func (m *QueryTokenizeShareRecordRewardRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordRewardRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordRewardRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenizeShareRecordRewardRequest proto.InternalMessageInfo + +// QueryTokenizeShareRecordRewardResponse is the response type for the Query/TokenizeShareRecordReward +// RPC method. +type QueryTokenizeShareRecordRewardResponse struct { + // rewards defines all the rewards accrued by a delegator. + Rewards []TokenizeShareRecordReward `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 *QueryTokenizeShareRecordRewardResponse) Reset() { + *m = QueryTokenizeShareRecordRewardResponse{} +} +func (m *QueryTokenizeShareRecordRewardResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordRewardResponse) ProtoMessage() {} +func (*QueryTokenizeShareRecordRewardResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5efd02cbc06efdc9, []int{19} +} +func (m *QueryTokenizeShareRecordRewardResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordRewardResponse.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 *QueryTokenizeShareRecordRewardResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordRewardResponse.Merge(m, src) +} +func (m *QueryTokenizeShareRecordRewardResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordRewardResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordRewardResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenizeShareRecordRewardResponse proto.InternalMessageInfo + +func (m *QueryTokenizeShareRecordRewardResponse) GetRewards() []TokenizeShareRecordReward { + if m != nil { + return m.Rewards + } + return nil +} + +func (m *QueryTokenizeShareRecordRewardResponse) GetTotal() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Total + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.distribution.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.distribution.v1beta1.QueryParamsResponse") @@ -857,6 +954,8 @@ func init() { 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((*QueryTokenizeShareRecordRewardRequest)(nil), "cosmos.distribution.v1beta1.QueryTokenizeShareRecordRewardRequest") + proto.RegisterType((*QueryTokenizeShareRecordRewardResponse)(nil), "cosmos.distribution.v1beta1.QueryTokenizeShareRecordRewardResponse") } func init() { @@ -864,76 +963,83 @@ func init() { } var fileDescriptor_5efd02cbc06efdc9 = []byte{ - // 1101 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0x3d, 0x6e, 0xda, 0xd2, 0x57, 0x4a, 0xd2, 0x69, 0x85, 0xcc, 0x26, 0xd8, 0xd1, 0x86, - 0x92, 0x40, 0x54, 0x6f, 0x93, 0x48, 0x05, 0x5a, 0x10, 0xe4, 0x57, 0xa9, 0xd4, 0x2a, 0x4d, 0x4d, - 0x95, 0x84, 0x5f, 0x8a, 0x26, 0xde, 0xd1, 0x7a, 0x55, 0x7b, 0xc7, 0xdd, 0x19, 0x27, 0x44, 0x55, - 0x2f, 0x04, 0x24, 0x2e, 0x48, 0x48, 0x5c, 0x7a, 0xcc, 0x99, 0x3b, 0x17, 0xfe, 0x82, 0x1e, 0x2b, - 0x21, 0xa1, 0x9e, 0x00, 0x25, 0x08, 0x55, 0x42, 0x9c, 0xb9, 0x22, 0xcf, 0xcc, 0xda, 0xbb, 0xf6, - 0x7a, 0xfd, 0x4b, 0x3d, 0xc5, 0x7a, 0x3b, 0xef, 0x3b, 0xef, 0xf3, 0x66, 0xde, 0xbc, 0xa7, 0xc0, - 0x74, 0x91, 0xf1, 0x0a, 0xe3, 0x96, 0xed, 0x72, 0xe1, 0xbb, 0x3b, 0x35, 0xe1, 0x32, 0xcf, 0xda, - 0x9d, 0xdb, 0xa1, 0x82, 0xcc, 0x59, 0x0f, 0x6a, 0xd4, 0xdf, 0xcf, 0x57, 0x7d, 0x26, 0x18, 0x1e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 0x4f, 0x8f, 0xb2, 0xe8, 0xcf, - 0xa3, 0x2c, 0xfa, 0xe1, 0x38, 0x9b, 0x7a, 0x7a, 0x9c, 0x4d, 0x3d, 0x3b, 0xce, 0xa6, 0x3e, 0x9b, - 0x4b, 0x9c, 0x13, 0xbe, 0x8a, 0xaa, 0xcb, 0xb1, 0x61, 0xe7, 0x94, 0xfc, 0x27, 0xc3, 0xc2, 0xff, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x68, 0x0b, 0x91, 0xae, 0x5c, 0x11, 0x00, 0x00, + // 1213 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x98, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0x3d, 0x6e, 0xda, 0xd2, 0xd7, 0x86, 0x26, 0xd3, 0x08, 0xb9, 0x9b, 0x60, 0x47, 0x1b, + 0xda, 0x04, 0xa2, 0x7a, 0x9b, 0x44, 0x2a, 0x90, 0x52, 0x41, 0x7e, 0x95, 0x8a, 0x46, 0x69, 0xea, + 0x46, 0x49, 0xf8, 0x25, 0x6b, 0x62, 0x8f, 0xd6, 0xab, 0xd8, 0x3b, 0xee, 0xce, 0x38, 0x21, 0x44, + 0xb9, 0x10, 0x90, 0xb8, 0x20, 0x21, 0x71, 0xe9, 0x31, 0x67, 0xee, 0x5c, 0xf8, 0x0b, 0x7a, 0xac, + 0x54, 0x09, 0x71, 0x2a, 0x28, 0x41, 0xa8, 0x08, 0x71, 0xe1, 0x02, 0x47, 0xe4, 0xd9, 0x59, 0xdb, + 0x6b, 0xaf, 0xd7, 0xbf, 0x54, 0x71, 0xaa, 0xfb, 0x66, 0xde, 0x77, 0xde, 0xe7, 0xed, 0xbc, 0xdd, + 0xaf, 0x02, 0xe3, 0x19, 0xc6, 0x0b, 0x8c, 0x1b, 0x59, 0x8b, 0x0b, 0xc7, 0xda, 0x2a, 0x09, 0x8b, + 0xd9, 0xc6, 0xce, 0xd4, 0x16, 0x15, 0x64, 0xca, 0x78, 0x58, 0xa2, 0xce, 0x5e, 0xb2, 0xe8, 0x30, + 0xc1, 0xf0, 0xb0, 0xbb, 0x31, 0x59, 0xbb, 0x31, 0xa9, 0x36, 0x6a, 0x6f, 0x28, 0x95, 0x2d, 0xc2, + 0xa9, 0x9b, 0x55, 0xd1, 0x28, 0x12, 0xd3, 0xb2, 0x89, 0xdc, 0x2d, 0x85, 0xb4, 0x21, 0x93, 0x99, + 0x4c, 0xfe, 0x34, 0xca, 0xbf, 0x54, 0x74, 0xc4, 0x64, 0xcc, 0xcc, 0x53, 0x83, 0x14, 0x2d, 0x83, + 0xd8, 0x36, 0x13, 0x32, 0x85, 0xab, 0xd5, 0x78, 0xad, 0xbe, 0xa7, 0x9c, 0x61, 0x96, 0xa7, 0x99, + 0x0c, 0xa3, 0xf0, 0x55, 0x2c, 0xf7, 0xeb, 0x43, 0x80, 0xef, 0x97, 0xab, 0x5c, 0x25, 0x0e, 0x29, + 0xf0, 0x14, 0x7d, 0x58, 0xa2, 0x5c, 0xe8, 0x9b, 0x70, 0xc9, 0x17, 0xe5, 0x45, 0x66, 0x73, 0x8a, + 0xe7, 0xe0, 0x4c, 0x51, 0x46, 0x62, 0x68, 0x14, 0x4d, 0x9c, 0x9f, 0x1e, 0x4b, 0x86, 0xb4, 0x22, + 0xe9, 0x26, 0xcf, 0xf7, 0x3d, 0x7e, 0x96, 0x88, 0xa4, 0x54, 0xa2, 0xbe, 0x0e, 0xe3, 0x52, 0x79, + 0x9d, 0xe4, 0xad, 0x2c, 0x11, 0xcc, 0xb9, 0x57, 0x12, 0x5c, 0x10, 0x3b, 0x6b, 0xd9, 0x66, 0x8a, + 0xee, 0x12, 0x27, 0xeb, 0x15, 0x81, 0x27, 0x61, 0x70, 0xc7, 0xdb, 0x95, 0x26, 0xd9, 0xac, 0x43, + 0xb9, 0x7b, 0xf0, 0xb9, 0xd4, 0x40, 0x65, 0x61, 0xce, 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x36, 0x37, 0x37, + 0xed, 0x0c, 0x66, 0x88, 0x81, 0x69, 0x73, 0x30, 0x5b, 0x10, 0x56, 0xef, 0x36, 0xfe, 0x07, 0x41, + 0xac, 0x99, 0x07, 0xc1, 0x73, 0x1d, 0xd4, 0x1a, 0x6c, 0x8f, 0xb4, 0xf9, 0x5e, 0x24, 0x14, 0xf3, + 0x9a, 0x64, 0x5e, 0xc1, 0xcb, 0xbd, 0x30, 0xd7, 0x9b, 0x28, 0xfc, 0x03, 0x82, 0x7e, 0x9f, 0x03, + 0xc2, 0x37, 0x5a, 0xd7, 0x1a, 0x64, 0xa8, 0xb4, 0x37, 0x3b, 0xce, 0x53, 0x60, 0x33, 0x12, 0xec, + 0x1a, 0x9e, 0x0c, 0x05, 0xcb, 0x78, 0xb9, 0xe9, 0xb2, 0x71, 0xc2, 0xff, 0x22, 0xb8, 0xdc, 0xd4, + 0x70, 0xe0, 0x36, 0xfa, 0xdd, 0xca, 0x71, 0x69, 0x0b, 0x3d, 0x69, 0x28, 0xb6, 0x94, 0x64, 0x5b, + 0xc6, 0x1f, 0x84, 0xb2, 0xed, 0xfb, 0xbc, 0xdb, 0x81, 0x21, 0x94, 0x6e, 0x9a, 0x97, 0x85, 0xd3, + 0x8e, 0x54, 0xf6, 0x3e, 0x95, 0xf3, 0x77, 0x1f, 0x1f, 0xc7, 0xd1, 0x93, 0xe3, 0x38, 0xfa, 0xf5, + 0x38, 0x8e, 0xbe, 0x3d, 0x89, 0x47, 0x9e, 0x9c, 0xc4, 0x23, 0x3f, 0x9f, 0xc4, 0x23, 0x1f, 0x4d, + 0x85, 0x7a, 0xa4, 0xcf, 0xfc, 0x87, 0x4b, 0xcb, 0xb4, 0x75, 0x46, 0xfe, 0xf5, 0x6a, 0xe6, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xab, 0xdf, 0xa3, 0xb5, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -967,6 +1073,8 @@ type QueryClient interface { 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) + // TokenizeShareRecordReward queries the tokenize share record rewards + TokenizeShareRecordReward(ctx context.Context, in *QueryTokenizeShareRecordRewardRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordRewardResponse, error) } type queryClient struct { @@ -1058,6 +1166,15 @@ func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolR return out, nil } +func (c *queryClient) TokenizeShareRecordReward(ctx context.Context, in *QueryTokenizeShareRecordRewardRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordRewardResponse, error) { + out := new(QueryTokenizeShareRecordRewardResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/TokenizeShareRecordReward", 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. @@ -1079,6 +1196,8 @@ type QueryServer interface { DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) // CommunityPool queries the community pool coins. CommunityPool(context.Context, *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) + // TokenizeShareRecordReward queries the tokenize share record rewards + TokenizeShareRecordReward(context.Context, *QueryTokenizeShareRecordRewardRequest) (*QueryTokenizeShareRecordRewardResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1112,6 +1231,9 @@ func (*UnimplementedQueryServer) DelegatorWithdrawAddress(ctx context.Context, r func (*UnimplementedQueryServer) CommunityPool(ctx context.Context, req *QueryCommunityPoolRequest) (*QueryCommunityPoolResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CommunityPool not implemented") } +func (*UnimplementedQueryServer) TokenizeShareRecordReward(ctx context.Context, req *QueryTokenizeShareRecordRewardRequest) (*QueryTokenizeShareRecordRewardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenizeShareRecordReward not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1279,6 +1401,24 @@ func _Query_CommunityPool_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_TokenizeShareRecordReward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenizeShareRecordRewardRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenizeShareRecordReward(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Query/TokenizeShareRecordReward", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenizeShareRecordReward(ctx, req.(*QueryTokenizeShareRecordRewardRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.distribution.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -1319,6 +1459,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "CommunityPool", Handler: _Query_CommunityPool_Handler, }, + { + MethodName: "TokenizeShareRecordReward", + Handler: _Query_TokenizeShareRecordReward_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/distribution/v1beta1/query.proto", @@ -1944,6 +2088,87 @@ func (m *QueryCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryTokenizeShareRecordRewardRequest) 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 *QueryTokenizeShareRecordRewardRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordRewardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenizeShareRecordRewardResponse) 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 *QueryTokenizeShareRecordRewardResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordRewardResponse) 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 encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2209,6 +2434,40 @@ func (m *QueryCommunityPoolResponse) Size() (n int) { return n } +func (m *QueryTokenizeShareRecordRewardRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenizeShareRecordRewardResponse) 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 sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3814,6 +4073,206 @@ func (m *QueryCommunityPoolResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTokenizeShareRecordRewardRequest) 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: QueryTokenizeShareRecordRewardRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenizeShareRecordRewardRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = 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 *QueryTokenizeShareRecordRewardResponse) 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: QueryTokenizeShareRecordRewardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenizeShareRecordRewardResponse: 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, TokenizeShareRecordReward{}) + 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/distribution/types/query.pb.gw.go b/x/distribution/types/query.pb.gw.go index 2e8f1cde3ff1..1a825ac47a9b 100644 --- a/x/distribution/types/query.pb.gw.go +++ b/x/distribution/types/query.pb.gw.go @@ -485,6 +485,60 @@ func local_request_Query_CommunityPool_0(ctx context.Context, marshaler runtime. } +func request_Query_TokenizeShareRecordReward_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordRewardRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner_address") + } + + protoReq.OwnerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner_address", err) + } + + msg, err := client.TokenizeShareRecordReward(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenizeShareRecordReward_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordRewardRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner_address") + } + + protoReq.OwnerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner_address", err) + } + + msg, err := server.TokenizeShareRecordReward(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. @@ -671,6 +725,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TokenizeShareRecordReward_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenizeShareRecordReward_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenizeShareRecordReward_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -892,6 +966,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TokenizeShareRecordReward_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_TokenizeShareRecordReward_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_TokenizeShareRecordReward_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -913,6 +1007,8 @@ var ( 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))) + + pattern_Query_TokenizeShareRecordReward_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"cosmos", "distribution", "v1beta1", "owner_address", "tokenize_share_record_rewards"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -933,4 +1029,6 @@ var ( forward_Query_DelegatorWithdrawAddress_0 = runtime.ForwardResponseMessage forward_Query_CommunityPool_0 = runtime.ForwardResponseMessage + + forward_Query_TokenizeShareRecordReward_0 = runtime.ForwardResponseMessage ) diff --git a/x/distribution/types/tx.pb.go b/x/distribution/types/tx.pb.go index 55cfce4e78f4..5c0efc7815fe 100644 --- a/x/distribution/types/tx.pb.go +++ b/x/distribution/types/tx.pb.go @@ -262,6 +262,168 @@ func (m *MsgWithdrawValidatorCommissionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawValidatorCommissionResponse proto.InternalMessageInfo +// MsgWithdrawTokenizeShareRecordReward withdraws tokenize share rewards for a specific record +type MsgWithdrawTokenizeShareRecordReward struct { + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" yaml:"owner_address"` + RecordId uint64 `protobuf:"varint,2,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"` +} + +func (m *MsgWithdrawTokenizeShareRecordReward) Reset() { *m = MsgWithdrawTokenizeShareRecordReward{} } +func (m *MsgWithdrawTokenizeShareRecordReward) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawTokenizeShareRecordReward) ProtoMessage() {} +func (*MsgWithdrawTokenizeShareRecordReward) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{6} +} +func (m *MsgWithdrawTokenizeShareRecordReward) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawTokenizeShareRecordReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawTokenizeShareRecordReward.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 *MsgWithdrawTokenizeShareRecordReward) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawTokenizeShareRecordReward.Merge(m, src) +} +func (m *MsgWithdrawTokenizeShareRecordReward) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawTokenizeShareRecordReward) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawTokenizeShareRecordReward.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawTokenizeShareRecordReward proto.InternalMessageInfo + +// MsgWithdrawTokenizeShareRecordReward defines the Msg/WithdrawTokenizeShareRecordReward response type. +type MsgWithdrawTokenizeShareRecordRewardResponse struct { +} + +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) Reset() { + *m = MsgWithdrawTokenizeShareRecordRewardResponse{} +} +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgWithdrawTokenizeShareRecordRewardResponse) ProtoMessage() {} +func (*MsgWithdrawTokenizeShareRecordRewardResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{7} +} +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawTokenizeShareRecordRewardResponse.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 *MsgWithdrawTokenizeShareRecordRewardResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawTokenizeShareRecordRewardResponse.Merge(m, src) +} +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawTokenizeShareRecordRewardResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawTokenizeShareRecordRewardResponse proto.InternalMessageInfo + +// MsgWithdrawAllTokenizeShareRecordReward withdraws tokenize share rewards or all +// records owned by the designated owner +type MsgWithdrawAllTokenizeShareRecordReward struct { + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" yaml:"owner_address"` +} + +func (m *MsgWithdrawAllTokenizeShareRecordReward) Reset() { + *m = MsgWithdrawAllTokenizeShareRecordReward{} +} +func (m *MsgWithdrawAllTokenizeShareRecordReward) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawAllTokenizeShareRecordReward) ProtoMessage() {} +func (*MsgWithdrawAllTokenizeShareRecordReward) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{8} +} +func (m *MsgWithdrawAllTokenizeShareRecordReward) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawAllTokenizeShareRecordReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordReward.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 *MsgWithdrawAllTokenizeShareRecordReward) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordReward.Merge(m, src) +} +func (m *MsgWithdrawAllTokenizeShareRecordReward) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawAllTokenizeShareRecordReward) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordReward.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordReward proto.InternalMessageInfo + +// MsgWithdrawAllTokenizeShareRecordRewardResponse defines the Msg/WithdrawTokenizeShareRecordReward response type. +type MsgWithdrawAllTokenizeShareRecordRewardResponse struct { +} + +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) Reset() { + *m = MsgWithdrawAllTokenizeShareRecordRewardResponse{} +} +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgWithdrawAllTokenizeShareRecordRewardResponse) ProtoMessage() {} +func (*MsgWithdrawAllTokenizeShareRecordRewardResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ed4f433d965e58ca, []int{9} +} +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordRewardResponse.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 *MsgWithdrawAllTokenizeShareRecordRewardResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordRewardResponse.Merge(m, src) +} +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordRewardResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawAllTokenizeShareRecordRewardResponse proto.InternalMessageInfo + // MsgFundCommunityPool allows an account to directly // fund the community pool. type MsgFundCommunityPool struct { @@ -273,7 +435,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_ed4f433d965e58ca, []int{10} } func (m *MsgFundCommunityPool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -310,7 +472,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_ed4f433d965e58ca, []int{11} } func (m *MsgFundCommunityPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -346,6 +508,10 @@ func init() { 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((*MsgWithdrawTokenizeShareRecordReward)(nil), "cosmos.distribution.v1beta1.MsgWithdrawTokenizeShareRecordReward") + proto.RegisterType((*MsgWithdrawTokenizeShareRecordRewardResponse)(nil), "cosmos.distribution.v1beta1.MsgWithdrawTokenizeShareRecordRewardResponse") + proto.RegisterType((*MsgWithdrawAllTokenizeShareRecordReward)(nil), "cosmos.distribution.v1beta1.MsgWithdrawAllTokenizeShareRecordReward") + proto.RegisterType((*MsgWithdrawAllTokenizeShareRecordRewardResponse)(nil), "cosmos.distribution.v1beta1.MsgWithdrawAllTokenizeShareRecordRewardResponse") proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos.distribution.v1beta1.MsgFundCommunityPool") proto.RegisterType((*MsgFundCommunityPoolResponse)(nil), "cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse") } @@ -355,42 +521,51 @@ func init() { } var fileDescriptor_ed4f433d965e58ca = []byte{ - // 558 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0x7d, 0x2d, 0xaa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x1a, 0x71, 0xa9, 0xa3, 0x8f, 0x3b, 0x1c, 0xbf, 0x31, 0xc4, 0xa0, 0x47, 0x78, 0x68, 0xe0, - 0x66, 0x8c, 0x96, 0x2b, 0x70, 0x13, 0x93, 0x1e, 0xe3, 0x54, 0x30, 0x3f, 0xfa, 0x45, 0xcc, 0xbf, - 0x83, 0x99, 0x7d, 0x10, 0xac, 0xe4, 0x85, 0x4c, 0xb6, 0xa8, 0x0f, 0xaf, 0xc0, 0xf5, 0x36, 0x77, - 0xe4, 0x77, 0x00, 0xca, 0x39, 0x17, 0xa5, 0xae, 0x2f, 0xb9, 0x96, 0x7a, 0x6e, 0x4d, 0x95, 0xc6, - 0xc5, 0x3d, 0x49, 0x1c, 0xf9, 0x23, 0x80, 0xdb, 0x8b, 0x7a, 0x7d, 0xff, 0x3c, 0xee, 0x02, 0xa3, - 0xf2, 0xe8, 0x3f, 0x8d, 0x69, 0xaa, 0x4f, 0x00, 0x96, 0x97, 0x35, 0xf1, 0xe1, 0xbf, 0x3e, 0x20, - 0xc7, 0xac, 0xb4, 0x56, 0x30, 0xa7, 0x09, 0xdf, 0x02, 0x58, 0xcc, 0x36, 0xb1, 0x76, 0x1e, 0x3a, - 0x63, 0x51, 0x1e, 0x5c, 0xd8, 0x92, 0x64, 0x68, 0x3e, 0xfd, 0x32, 0x46, 0x60, 0x38, 0x46, 0xe0, - 0x64, 0x8c, 0xc0, 0xaf, 0x31, 0x02, 0x1f, 0x26, 0x48, 0x3a, 0x99, 0x20, 0xe9, 0xc7, 0x04, 0x49, - 0xaf, 0x6a, 0x4b, 0x2b, 0x7e, 0x34, 0xff, 0x76, 0x08, 0x1b, 0x6f, 0x6f, 0x84, 0x7f, 0xe3, 0xf7, - 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x18, 0x71, 0xb0, 0x41, 0x06, 0x00, 0x00, + // 694 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00,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1e, 0x77, 0x8e, 0xf3, 0xed, + 0x51, 0xa8, 0x3e, 0xf8, 0xc7, 0x42, 0x49, 0xf5, 0x1e, 0x41, 0xaa, 0xdf, 0x7d, 0xbf, 0x37, 0x68, + 0x83, 0x2e, 0xc5, 0xea, 0xf2, 0x10, 0xc5, 0x92, 0xf0, 0x33, 0x82, 0xab, 0xc7, 0xdf, 0xf7, 0xc5, + 0x41, 0x5b, 0xf5, 0xb4, 0x50, 0x73, 0x43, 0x5b, 0x48, 0xe6, 0x6f, 0x08, 0xd2, 0x03, 0xdd, 0xf2, + 0x95, 0x41, 0x7b, 0xf6, 0x73, 0x51, 0x1f, 0x9e, 0x86, 0x8b, 0x84, 0x7f, 0x89, 0x60, 0xaa, 0xf3, + 0xea, 0x67, 0x8f, 0xeb, 0xd1, 0x51, 0xa2, 0xde, 0x3d, 0x71, 0x49, 0xc4, 0xb0, 0xf4, 0xe8, 0x63, + 0x43, 0x43, 0x7b, 0x0d, 0x0d, 0xed, 0x37, 0x34, 0xf4, 0xab, 0xa1, 0xa1, 0xb7, 0x07, 0x5a, 0x62, + 0xff, 0x40, 0x4b, 0xfc, 0x38, 0xd0, 0x12, 0xcf, 0xb3, 0x7d, 0x33, 0x65, 0xbb, 0xfd, 0xa5, 0x27, + 0x88, 0x98, 0xc2, 0x58, 0xf0, 0x76, 0x72, 0xfb, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x39, + 0x88, 0xdc, 0x18, 0x09, 0x00, 0x00, } func (this *MsgSetWithdrawAddressResponse) Equal(that interface{}) bool { @@ -456,6 +631,48 @@ func (this *MsgWithdrawValidatorCommissionResponse) Equal(that interface{}) bool } return true } +func (this *MsgWithdrawTokenizeShareRecordRewardResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgWithdrawTokenizeShareRecordRewardResponse) + if !ok { + that2, ok := that.(MsgWithdrawTokenizeShareRecordRewardResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *MsgWithdrawAllTokenizeShareRecordRewardResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgWithdrawAllTokenizeShareRecordRewardResponse) + if !ok { + that2, ok := that.(MsgWithdrawAllTokenizeShareRecordRewardResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} func (this *MsgFundCommunityPoolResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -499,6 +716,10 @@ type MsgClient interface { // WithdrawValidatorCommission defines a method to withdraw the // full commission to the validator address. WithdrawValidatorCommission(ctx context.Context, in *MsgWithdrawValidatorCommission, opts ...grpc.CallOption) (*MsgWithdrawValidatorCommissionResponse, error) + // WithdrawTokenizeShareRecordReward defines a method to withdraw reward for an owning TokenizeShareRecord + WithdrawTokenizeShareRecordReward(ctx context.Context, in *MsgWithdrawTokenizeShareRecordReward, opts ...grpc.CallOption) (*MsgWithdrawTokenizeShareRecordRewardResponse, error) + // WithdrawAllTokenizeShareRecordReward defines a method to withdraw reward for all owning TokenizeShareRecord + WithdrawAllTokenizeShareRecordReward(ctx context.Context, in *MsgWithdrawAllTokenizeShareRecordReward, opts ...grpc.CallOption) (*MsgWithdrawAllTokenizeShareRecordRewardResponse, 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) @@ -539,6 +760,24 @@ func (c *msgClient) WithdrawValidatorCommission(ctx context.Context, in *MsgWith return out, nil } +func (c *msgClient) WithdrawTokenizeShareRecordReward(ctx context.Context, in *MsgWithdrawTokenizeShareRecordReward, opts ...grpc.CallOption) (*MsgWithdrawTokenizeShareRecordRewardResponse, error) { + out := new(MsgWithdrawTokenizeShareRecordRewardResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawTokenizeShareRecordReward", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawAllTokenizeShareRecordReward(ctx context.Context, in *MsgWithdrawAllTokenizeShareRecordReward, opts ...grpc.CallOption) (*MsgWithdrawAllTokenizeShareRecordRewardResponse, error) { + out := new(MsgWithdrawAllTokenizeShareRecordRewardResponse) + err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Msg/WithdrawAllTokenizeShareRecordReward", 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...) @@ -559,6 +798,10 @@ type MsgServer interface { // WithdrawValidatorCommission defines a method to withdraw the // full commission to the validator address. WithdrawValidatorCommission(context.Context, *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) + // WithdrawTokenizeShareRecordReward defines a method to withdraw reward for an owning TokenizeShareRecord + WithdrawTokenizeShareRecordReward(context.Context, *MsgWithdrawTokenizeShareRecordReward) (*MsgWithdrawTokenizeShareRecordRewardResponse, error) + // WithdrawAllTokenizeShareRecordReward defines a method to withdraw reward for all owning TokenizeShareRecord + WithdrawAllTokenizeShareRecordReward(context.Context, *MsgWithdrawAllTokenizeShareRecordReward) (*MsgWithdrawAllTokenizeShareRecordRewardResponse, error) // FundCommunityPool defines a method to allow an account to directly // fund the community pool. FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) @@ -577,6 +820,12 @@ func (*UnimplementedMsgServer) WithdrawDelegatorReward(ctx context.Context, req func (*UnimplementedMsgServer) WithdrawValidatorCommission(ctx context.Context, req *MsgWithdrawValidatorCommission) (*MsgWithdrawValidatorCommissionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawValidatorCommission not implemented") } +func (*UnimplementedMsgServer) WithdrawTokenizeShareRecordReward(ctx context.Context, req *MsgWithdrawTokenizeShareRecordReward) (*MsgWithdrawTokenizeShareRecordRewardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawTokenizeShareRecordReward not implemented") +} +func (*UnimplementedMsgServer) WithdrawAllTokenizeShareRecordReward(ctx context.Context, req *MsgWithdrawAllTokenizeShareRecordReward) (*MsgWithdrawAllTokenizeShareRecordRewardResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawAllTokenizeShareRecordReward not implemented") +} func (*UnimplementedMsgServer) FundCommunityPool(ctx context.Context, req *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FundCommunityPool not implemented") } @@ -639,6 +888,42 @@ func _Msg_WithdrawValidatorCommission_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _Msg_WithdrawTokenizeShareRecordReward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawTokenizeShareRecordReward) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawTokenizeShareRecordReward(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawTokenizeShareRecordReward", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawTokenizeShareRecordReward(ctx, req.(*MsgWithdrawTokenizeShareRecordReward)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawAllTokenizeShareRecordReward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawAllTokenizeShareRecordReward) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawAllTokenizeShareRecordReward(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.distribution.v1beta1.Msg/WithdrawAllTokenizeShareRecordReward", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawAllTokenizeShareRecordReward(ctx, req.(*MsgWithdrawAllTokenizeShareRecordReward)) + } + 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 { @@ -673,6 +958,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "WithdrawValidatorCommission", Handler: _Msg_WithdrawValidatorCommission_Handler, }, + { + MethodName: "WithdrawTokenizeShareRecordReward", + Handler: _Msg_WithdrawTokenizeShareRecordReward_Handler, + }, + { + MethodName: "WithdrawAllTokenizeShareRecordReward", + Handler: _Msg_WithdrawAllTokenizeShareRecordReward_Handler, + }, { MethodName: "FundCommunityPool", Handler: _Msg_FundCommunityPool_Handler, @@ -855,7 +1148,7 @@ func (m *MsgWithdrawValidatorCommissionResponse) MarshalToSizedBuffer(dAtA []byt return len(dAtA) - i, nil } -func (m *MsgFundCommunityPool) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawTokenizeShareRecordReward) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -865,41 +1158,32 @@ func (m *MsgFundCommunityPool) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgFundCommunityPool) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawTokenizeShareRecordReward) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgFundCommunityPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawTokenizeShareRecordReward) 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))) + if m.RecordId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.RecordId)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - 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 - } + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgFundCommunityPoolResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -909,12 +1193,12 @@ func (m *MsgFundCommunityPoolResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgFundCommunityPoolResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgFundCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -922,44 +1206,164 @@ func (m *MsgFundCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, e 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++ +func (m *MsgWithdrawAllTokenizeShareRecordReward) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgSetWithdrawAddress) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgWithdrawAllTokenizeShareRecordReward) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawAllTokenizeShareRecordReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *MsgSetWithdrawAddressResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) 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 *MsgWithdrawAllTokenizeShareRecordRewardResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgWithdrawDelegatorReward) Size() (n int) { +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 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 } @@ -1007,6 +1411,53 @@ func (m *MsgWithdrawValidatorCommissionResponse) Size() (n int) { return n } +func (m *MsgWithdrawTokenizeShareRecordReward) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.RecordId != 0 { + n += 1 + sovTx(uint64(m.RecordId)) + } + return n +} + +func (m *MsgWithdrawTokenizeShareRecordRewardResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawAllTokenizeShareRecordReward) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgWithdrawAllTokenizeShareRecordRewardResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgFundCommunityPool) Size() (n int) { if m == nil { return 0 @@ -1501,6 +1952,289 @@ func (m *MsgWithdrawValidatorCommissionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgWithdrawTokenizeShareRecordReward) 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: MsgWithdrawTokenizeShareRecordReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawTokenizeShareRecordReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType) + } + m.RecordId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RecordId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgWithdrawTokenizeShareRecordRewardResponse) 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: MsgWithdrawTokenizeShareRecordRewardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawTokenizeShareRecordRewardResponse: 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 *MsgWithdrawAllTokenizeShareRecordReward) 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: MsgWithdrawAllTokenizeShareRecordReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawAllTokenizeShareRecordReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = 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 *MsgWithdrawAllTokenizeShareRecordRewardResponse) 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: MsgWithdrawAllTokenizeShareRecordRewardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawAllTokenizeShareRecordRewardResponse: 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 *MsgFundCommunityPool) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index 1fc964afc36a..1928e0e5dd3f 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -53,12 +53,11 @@ func (suite *GenTxTestSuite) SetupTest() { var err error amount := sdk.NewInt64Coin(sdk.DefaultBondDenom, 50) - one := sdk.OneInt() suite.msg1, err = stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(pk1.Address()), pk1, amount, desc, comm, one) + sdk.ValAddress(pk1.Address()), pk1, amount, desc, comm) suite.NoError(err) suite.msg2, err = stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(pk2.Address()), pk1, amount, desc, comm, one) + sdk.ValAddress(pk2.Address()), pk1, amount, desc, comm) suite.NoError(err) } diff --git a/x/genutil/types/genesis_state_test.go b/x/genutil/types/genesis_state_test.go index 9c225fd3f7c4..dcf8978507f2 100644 --- a/x/genutil/types/genesis_state_test.go +++ b/x/genutil/types/genesis_state_test.go @@ -38,11 +38,11 @@ func TestValidateGenesisMultipleMessages(t *testing.T) { comm := stakingtypes.CommissionRates{} msg1, err := stakingtypes.NewMsgCreateValidator(sdk.ValAddress(pk1.Address()), pk1, - sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm, sdk.OneInt()) + sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm) require.NoError(t, err) msg2, err := stakingtypes.NewMsgCreateValidator(sdk.ValAddress(pk2.Address()), pk2, - sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm, sdk.OneInt()) + sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm) require.NoError(t, err) txGen := simapp.MakeTestEncodingConfig().TxConfig @@ -59,7 +59,7 @@ func TestValidateGenesisMultipleMessages(t *testing.T) { func TestValidateGenesisBadMessage(t *testing.T) { desc := stakingtypes.NewDescription("testname", "", "", "", "") - msg1 := stakingtypes.NewMsgEditValidator(sdk.ValAddress(pk1.Address()), desc, nil, nil) + msg1 := stakingtypes.NewMsgEditValidator(sdk.ValAddress(pk1.Address()), desc, nil) txGen := simapp.MakeTestEncodingConfig().TxConfig txBuilder := txGen.NewTxBuilder() diff --git a/x/gov/common_test.go b/x/gov/common_test.go index cc759d4e961f..b3a4389eb731 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -83,7 +83,7 @@ func createValidators(t *testing.T, stakingHandler sdk.Handler, ctx sdk.Context, valTokens := sdk.TokensFromConsensusPower(powerAmt[i], sdk.DefaultPowerReduction) valCreateMsg, err := stakingtypes.NewMsgCreateValidator( addrs[i], pubkeys[i], sdk.NewCoin(sdk.DefaultBondDenom, valTokens), - TestDescription, TestCommissionRates, sdk.OneInt(), + TestDescription, TestCommissionRates, ) require.NoError(t, err) handleAndCheck(t, stakingHandler, ctx, valCreateMsg) diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index 028d41755607..a3868c66bda6 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -64,7 +64,7 @@ func TestSlashingMsgs(t *testing.T) { commission := stakingtypes.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) createValidatorMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commission, sdk.OneInt(), + sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commission, ) require.NoError(t, err) diff --git a/x/slashing/handler_test.go b/x/slashing/handler_test.go index 25fed487ba79..86fa6db303ba 100644 --- a/x/slashing/handler_test.go +++ b/x/slashing/handler_test.go @@ -47,37 +47,6 @@ func TestCannotUnjailUnlessJailed(t *testing.T) { require.True(t, errors.Is(types.ErrValidatorNotJailed, err)) } -func TestCannotUnjailUnlessMeetMinSelfDelegation(t *testing.T) { - // initial setup - app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - pks := simapp.CreateTestPubKeys(1) - simapp.AddTestAddrsFromPubKeys(app, ctx, pks, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) - - tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) - slh := slashing.NewHandler(app.SlashingKeeper) - addr, val := sdk.ValAddress(pks[0].Address()), pks[0] - amt := app.StakingKeeper.TokensFromConsensusPower(ctx, 100) - msg := tstaking.CreateValidatorMsg(addr, val, amt) - msg.MinSelfDelegation = amt - tstaking.Handle(msg, true) - - staking.EndBlocker(ctx, app.StakingKeeper) - require.Equal( - t, app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)), - sdk.Coins{sdk.NewCoin(app.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))}, - ) - - tstaking.Undelegate(sdk.AccAddress(addr), addr, sdk.OneInt(), true) - require.True(t, app.StakingKeeper.Validator(ctx, addr).IsJailed()) - - // assert non-jailed validator can't be unjailed - res, err := slh(ctx, types.NewMsgUnjail(addr)) - require.Error(t, err) - require.Nil(t, res) - require.True(t, errors.Is(types.ErrSelfDelegationTooLowToUnjail, err)) -} - func TestJailedValidatorDelegations(t *testing.T) { // initial setup app := simapp.Setup(false) @@ -90,7 +59,7 @@ func TestJailedValidatorDelegations(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) stakingParams := app.StakingKeeper.GetParams(ctx) app.StakingKeeper.SetParams(ctx, stakingParams) - valAddr, consAddr := sdk.ValAddress(pks[1].Address()), sdk.ConsAddress(pks[0].Address()) + valAddr, consAddr := sdk.ValAddress(pks[1].Address()), sdk.ConsAddress(pks[1].Address()) amt := tstaking.CreateValidatorWithValPower(valAddr, pks[1], 10, true) staking.EndBlocker(ctx, app.StakingKeeper) @@ -103,12 +72,15 @@ func TestJailedValidatorDelegations(t *testing.T) { delAddr := sdk.AccAddress(pks[2].Address()) tstaking.Delegate(delAddr, valAddr, amt) - // unbond validator total self-delegations (which should jail the validator) + // unbond validator total self-delegations valAcc := sdk.AccAddress(valAddr) tstaking.Undelegate(valAcc, valAddr, amt, true) _, err := app.StakingKeeper.CompleteUnbonding(ctx, sdk.AccAddress(valAddr), valAddr) require.Nil(t, err, "expected complete unbonding validator to be ok, got: %v", err) + // jail the validator + app.StakingKeeper.Jail(ctx, consAddr) + // verify validator still exists and is jailed validator, found := app.StakingKeeper.GetValidator(ctx, valAddr) require.True(t, found) diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index fdcc7814adff..4892541a1527 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -80,3 +80,7 @@ func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec func (h Hooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error { return nil } + +func (h Hooks) BeforeTokenizeShareRecordRemoved(_ sdk.Context, _ uint64) error { + return nil +} diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 2e7e727a2697..27cfcce00f4d 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -15,67 +15,6 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func TestUnJailNotBonded(t *testing.T) { - app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - - p := app.StakingKeeper.GetParams(ctx) - p.MaxValidators = 5 - app.StakingKeeper.SetParams(ctx, p) - - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 6, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) - valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) - pks := simapp.CreateTestPubKeys(6) - tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) - - // create max (5) validators all with the same power - for i := uint32(0); i < p.MaxValidators; i++ { - addr, val := valAddrs[i], pks[i] - tstaking.CreateValidatorWithValPower(addr, val, 100, true) - } - - staking.EndBlocker(ctx, app.StakingKeeper) - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - - // create a 6th validator with less power than the cliff validator (won't be bonded) - addr, val := valAddrs[5], pks[5] - amt := app.StakingKeeper.TokensFromConsensusPower(ctx, 50) - msg := tstaking.CreateValidatorMsg(addr, val, amt) - msg.MinSelfDelegation = amt - tstaking.Handle(msg, true) - - staking.EndBlocker(ctx, app.StakingKeeper) - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - - tstaking.CheckValidator(addr, stakingtypes.Unbonded, false) - - // unbond below minimum self-delegation - require.Equal(t, p.BondDenom, tstaking.Denom) - tstaking.Undelegate(sdk.AccAddress(addr), addr, app.StakingKeeper.TokensFromConsensusPower(ctx, 1), true) - - staking.EndBlocker(ctx, app.StakingKeeper) - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - - // verify that validator is jailed - tstaking.CheckValidator(addr, -1, true) - - // verify we cannot unjail (yet) - require.Error(t, app.SlashingKeeper.Unjail(ctx, addr)) - - staking.EndBlocker(ctx, app.StakingKeeper) - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - // bond to meet minimum self-delegation - tstaking.DelegateWithPower(sdk.AccAddress(addr), addr, 1) - - staking.EndBlocker(ctx, app.StakingKeeper) - ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - - // verify we can immediately unjail - require.NoError(t, app.SlashingKeeper.Unjail(ctx, addr)) - - tstaking.CheckValidator(addr, -1, false) -} - // Test a new validator entering the validator set // Ensure that SigningInfo.StartHeight is set correctly // and that they are not immediately jailed diff --git a/x/slashing/keeper/signing_info_test.go b/x/slashing/keeper/signing_info_test.go index 2748042b3600..6e0405456032 100644 --- a/x/slashing/keeper/signing_info_test.go +++ b/x/slashing/keeper/signing_info_test.go @@ -8,6 +8,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -17,7 +18,7 @@ func TestGetSetValidatorSigningInfo(t *testing.T) { ctx := app.BaseApp.NewContext(false, tmproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, app.StakingKeeper.TokensFromConsensusPower(ctx, 200)) - info, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) + _, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) require.False(t, found) newInfo := types.NewValidatorSigningInfo( sdk.ConsAddress(addrDels[0]), @@ -28,7 +29,7 @@ func TestGetSetValidatorSigningInfo(t *testing.T) { int64(10), ) app.SlashingKeeper.SetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0]), newInfo) - info, found = app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) + info, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(addrDels[0])) require.True(t, found) require.Equal(t, info.StartHeight, int64(4)) require.Equal(t, info.IndexOffset, int64(3)) diff --git a/x/slashing/keeper/unjail.go b/x/slashing/keeper/unjail.go index 23a9121e5472..f417bdc546f4 100644 --- a/x/slashing/keeper/unjail.go +++ b/x/slashing/keeper/unjail.go @@ -2,7 +2,6 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -20,14 +19,6 @@ func (k Keeper) Unjail(ctx sdk.Context, validatorAddr sdk.ValAddress) error { return types.ErrMissingSelfDelegation } - tokens := validator.TokensFromShares(selfDel.GetShares()).TruncateInt() - minSelfBond := validator.GetMinSelfDelegation() - if tokens.LT(minSelfBond) { - return sdkerrors.Wrapf( - types.ErrSelfDelegationTooLowToUnjail, "%s less than %s", tokens, minSelfBond, - ) - } - // cannot be unjailed if not jailed if !validator.IsJailed() { return types.ErrValidatorNotJailed diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index ea58a6e67c86..3454aa8211ee 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -5,10 +5,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/simapp" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,6 +14,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/slashing/simulation" "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) // TestWeightedOperations tests the weights of the operations. @@ -66,7 +65,8 @@ func TestSimulateMsgUnjail(t *testing.T) { validator0 := getTestingValidator0(t, app, ctx, accounts) // setup validator0 by consensus address - app.StakingKeeper.SetValidatorByConsAddr(ctx, validator0) + err := app.StakingKeeper.SetValidatorByConsAddr(ctx, validator0) + require.NoError(t, err) val0ConsAddress, err := validator0.GetConsAddr() require.NoError(t, err) info := types.NewValidatorSigningInfo(val0ConsAddress, int64(4), int64(3), @@ -94,8 +94,8 @@ func TestSimulateMsgUnjail(t *testing.T) { require.NoError(t, err) var msg types.MsgUnjail - types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) - + err = types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) + require.NoError(t, err) require.True(t, operationMsg.OK) require.Equal(t, types.TypeMsgUnjail, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddr) diff --git a/x/slashing/types/events.go b/x/slashing/types/events.go index e9fb254545f5..cf419ab6b999 100644 --- a/x/slashing/types/events.go +++ b/x/slashing/types/events.go @@ -11,6 +11,7 @@ const ( AttributeKeyReason = "reason" AttributeKeyJailed = "jailed" AttributeKeyMissedBlocks = "missed_blocks" + AttributeKeyBurnedCoins = "burned_coins" AttributeValueDoubleSign = "double_sign" AttributeValueMissingSignature = "missing_signature" diff --git a/x/staking/abci.go b/x/staking/abci.go index 28253b5bd3fd..a843fffb01db 100644 --- a/x/staking/abci.go +++ b/x/staking/abci.go @@ -17,6 +17,7 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) k.TrackHistoricalInfo(ctx) + k.RemoveExpiredTokenizeShareLocks(ctx, ctx.BlockTime()) } // Called every block, update validator set diff --git a/x/staking/app_test.go b/x/staking/app_test.go index a011186ca714..a6c2c66a2204 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -3,11 +3,11 @@ package staking_test import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -65,7 +65,7 @@ func TestStakingMsgs(t *testing.T) { // create validator description := types.NewDescription("foo_moniker", "", "", "", "") createValidatorMsg, err := types.NewMsgCreateValidator( - sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commissionRates, sdk.OneInt(), + sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commissionRates, ) require.NoError(t, err) @@ -88,7 +88,7 @@ func TestStakingMsgs(t *testing.T) { // edit the validator description = types.NewDescription("bar_moniker", "", "", "", "") - editValidatorMsg := types.NewMsgEditValidator(sdk.ValAddress(addr1), description, nil, nil) + editValidatorMsg := types.NewMsgEditValidator(sdk.ValAddress(addr1), description, nil) header = tmproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{editValidatorMsg}, "", []uint64{0}, []uint64{1}, true, true, priv1) diff --git a/x/staking/client/cli/flags.go b/x/staking/client/cli/flags.go index 85879567a6af..5b1b49b06dd8 100644 --- a/x/staking/client/cli/flags.go +++ b/x/staking/client/cli/flags.go @@ -26,8 +26,6 @@ const ( FlagCommissionMaxRate = "commission-max-rate" FlagCommissionMaxChangeRate = "commission-max-change-rate" - FlagMinSelfDelegation = "min-self-delegation" - FlagGenesisFormat = "genesis-format" FlagNodeID = "node-id" FlagIP = "ip" @@ -59,13 +57,6 @@ func FlagSetCommissionCreate() *flag.FlagSet { return fs } -// FlagSetMinSelfDelegation Returns the FlagSet used for minimum set delegation. -func FlagSetMinSelfDelegation() *flag.FlagSet { - fs := flag.NewFlagSet("", flag.ContinueOnError) - fs.String(FlagMinSelfDelegation, "", "The minimum self delegation required on the validator") - return fs -} - // FlagSetAmount Returns the FlagSet for amount related operations. func FlagSetAmount() *flag.FlagSet { fs := flag.NewFlagSet("", flag.ContinueOnError) diff --git a/x/staking/client/cli/query.go b/x/staking/client/cli/query.go index 0982296161e4..1de70b7cc8ea 100644 --- a/x/staking/client/cli/query.go +++ b/x/staking/client/cli/query.go @@ -39,6 +39,14 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryHistoricalInfo(), GetCmdQueryParams(), GetCmdQueryPool(), + GetCmdQueryTokenizeShareRecordByID(), + GetCmdQueryTokenizeShareRecordByDenom(), + GetCmdQueryTokenizeShareRecordsOwned(), + GetCmdQueryAllTokenizeShareRecords(), + GetCmdQueryLastTokenizeShareRecordID(), + GetCmdQueryTotalTokenizeSharedAssets(), + GetCmdQueryTokenizeShareLockInfo(), + GetCmdQueryTotalLiquidStaked(), ) return stakingQueryCmd @@ -744,3 +752,326 @@ $ %s query staking params return cmd } + +// GetCmdQueryTokenizeShareRecordById implements the query for individual tokenize share record information by share by id +func GetCmdQueryTokenizeShareRecordByID() *cobra.Command { + cmd := &cobra.Command{ + Use: "tokenize-share-record-by-id [id]", + Args: cobra.ExactArgs(1), + Short: "Query individual tokenize share record information by share by id", + Long: strings.TrimSpace( + fmt.Sprintf(`Query individual tokenize share record information by share by id. + +Example: +$ %s query staking tokenize-share-record-by-id [id] +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + id, err := strconv.Atoi(args[0]) + if err != nil { + return err + } + + res, err := queryClient.TokenizeShareRecordById(cmd.Context(), &types.QueryTokenizeShareRecordByIdRequest{ + Id: uint64(id), + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryTokenizeShareRecordByDenom implements the query for individual tokenize share record information by share denom +func GetCmdQueryTokenizeShareRecordByDenom() *cobra.Command { + cmd := &cobra.Command{ + Use: "tokenize-share-record-by-denom", + Args: cobra.ExactArgs(1), + Short: "Query individual tokenize share record information by share denom", + Long: strings.TrimSpace( + fmt.Sprintf(`Query individual tokenize share record information by share denom. + +Example: +$ %s query staking tokenize-share-record-by-denom +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.TokenizeShareRecordByDenom(cmd.Context(), &types.QueryTokenizeShareRecordByDenomRequest{ + Denom: args[0], + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryTokenizeShareRecordsOwned implements the query tokenize share records by address +func GetCmdQueryTokenizeShareRecordsOwned() *cobra.Command { + cmd := &cobra.Command{ + Use: "tokenize-share-records-owned", + Args: cobra.ExactArgs(1), + Short: "Query tokenize share records by address", + Long: strings.TrimSpace( + fmt.Sprintf(`Query tokenize share records by address. + +Example: +$ %s query staking tokenize-share-records-owned [owner] +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + owner, err := sdk.AccAddressFromBech32(args[0]) + if err != nil { + return err + } + + res, err := queryClient.TokenizeShareRecordsOwned(cmd.Context(), &types.QueryTokenizeShareRecordsOwnedRequest{ + Owner: owner.String(), + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryAllTokenizeShareRecords implements the query for all tokenize share records +func GetCmdQueryAllTokenizeShareRecords() *cobra.Command { + cmd := &cobra.Command{ + Use: "all-tokenize-share-records", + Args: cobra.NoArgs, + Short: "Query for all tokenize share records", + Long: strings.TrimSpace( + fmt.Sprintf(`Query for all tokenize share records. + +Example: +$ %s query staking all-tokenize-share-records +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + params := &types.QueryAllTokenizeShareRecordsRequest{ + Pagination: pageReq, + } + + res, err := queryClient.AllTokenizeShareRecords(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "tokenize share records") + + return cmd +} + +// GetCmdQueryLastTokenizeShareRecordId implements the query for last tokenize share record id +func GetCmdQueryLastTokenizeShareRecordID() *cobra.Command { + cmd := &cobra.Command{ + Use: "last-tokenize-share-record-id", + Args: cobra.NoArgs, + Short: "Query for last tokenize share record id", + Long: strings.TrimSpace( + fmt.Sprintf(`Query for last tokenize share record id. + +Example: +$ %s query staking last-tokenize-share-record-id +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.LastTokenizeShareRecordId(cmd.Context(), &types.QueryLastTokenizeShareRecordIdRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryTotalTokenizeSharedAssets implements the query for total tokenized staked assets +func GetCmdQueryTotalTokenizeSharedAssets() *cobra.Command { + cmd := &cobra.Command{ + Use: "total-tokenize-share-assets", + Args: cobra.NoArgs, + Short: "Query for total tokenized staked assets", + Long: strings.TrimSpace( + fmt.Sprintf(`Query for total tokenized staked assets. + +Example: +$ %s query staking total-tokenize-share-assets +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.TotalTokenizeSharedAssets(cmd.Context(), &types.QueryTotalTokenizeSharedAssetsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryTotalLiquidStaked implements the query for total liquid staked tokens +func GetCmdQueryTotalLiquidStaked() *cobra.Command { + cmd := &cobra.Command{ + Use: "total-liquid-staked", + Args: cobra.NoArgs, + Short: "Query for total liquid staked tokens", + Long: strings.TrimSpace( + fmt.Sprintf(`Query for total number of liquid staked tokens. +Liquid staked tokens are identified as either a tokenized delegation, +or tokens owned by an interchain account. +Example: +$ %s query staking total-liquid-staked +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.TotalLiquidStaked(cmd.Context(), &types.QueryTotalLiquidStaked{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryTokenizeShareLockInfo returns the tokenize share lock status for a user +func GetCmdQueryTokenizeShareLockInfo() *cobra.Command { + bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() + + cmd := &cobra.Command{ + Use: "tokenize-share-lock-info [address]", + Args: cobra.ExactArgs(1), + Short: "Query tokenize share lock information", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the status of a tokenize share lock for a given account +Example: +$ %s query staking tokenize-share-lock-info %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj +`, + version.AppName, bech32PrefixAccAddr, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + address := args[0] + if _, err := sdk.AccAddressFromBech32(address); err != nil { + return err + } + + res, err := queryClient.TokenizeShareLockInfo( + cmd.Context(), + &types.QueryTokenizeShareLockInfo{Address: address}, + ) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 1cd0b70172b0..5fb500290e70 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -3,6 +3,7 @@ package cli import ( "fmt" "os" + "strconv" "strings" "github.com/spf13/cobra" @@ -25,7 +26,6 @@ var ( defaultCommissionRate = "0.1" defaultCommissionMaxRate = "0.2" defaultCommissionMaxChangeRate = "0.01" - defaultMinSelfDelegation = "1" ) // NewTxCmd returns a root CLI command handler for all x/staking transaction commands. @@ -44,6 +44,14 @@ func NewTxCmd() *cobra.Command { NewDelegateCmd(), NewRedelegateCmd(), NewUnbondCmd(), + NewUnbondValidatorCmd(), + NewCancelUnbondingDelegation(), + NewTokenizeSharesCmd(), + NewRedeemTokensCmd(), + NewTransferTokenizeShareRecordCmd(), + NewDisableTokenizeShares(), + NewEnableTokenizeShares(), + NewValidatorBondCmd(), ) return stakingTxCmd @@ -74,7 +82,6 @@ func NewCreateValidatorCmd() *cobra.Command { cmd.Flags().AddFlagSet(FlagSetAmount()) cmd.Flags().AddFlagSet(flagSetDescriptionCreate()) cmd.Flags().AddFlagSet(FlagSetCommissionCreate()) - cmd.Flags().AddFlagSet(FlagSetMinSelfDelegation()) cmd.Flags().String(FlagIP, "", fmt.Sprintf("The node's public IP. It takes effect only when used in combination with --%s", flags.FlagGenerateOnly)) cmd.Flags().String(FlagNodeID, "", "The node's ID") @@ -117,19 +124,7 @@ func NewEditValidatorCmd() *cobra.Command { newRate = &rate } - var newMinSelfDelegation *sdk.Int - - minSelfDelegationString, _ := cmd.Flags().GetString(FlagMinSelfDelegation) - if minSelfDelegationString != "" { - msb, ok := sdk.NewIntFromString(minSelfDelegationString) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "minimum self delegation must be a positive integer") - } - - newMinSelfDelegation = &msb - } - - msg := types.NewMsgEditValidator(sdk.ValAddress(valAddr), description, newRate, newMinSelfDelegation) + msg := types.NewMsgEditValidator(sdk.ValAddress(valAddr), description, newRate) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -137,7 +132,6 @@ func NewEditValidatorCmd() *cobra.Command { cmd.Flags().AddFlagSet(flagSetDescriptionEdit()) cmd.Flags().AddFlagSet(flagSetCommissionUpdate()) - cmd.Flags().AddFlagSet(FlagSetMinSelfDelegation()) flags.AddTxFlagsToCmd(cmd) return cmd @@ -277,6 +271,87 @@ $ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from return cmd } +func NewUnbondValidatorCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "unbond-validator", + Short: "Unbond a validator", + Args: cobra.ExactArgs(0), + Long: strings.TrimSpace( + fmt.Sprintf(`Unbond a validator. + +Example: +$ %s tx staking unbond-validator --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgUnbondValidator(sdk.ValAddress(clientCtx.GetFromAddress())) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func NewCancelUnbondingDelegation() *cobra.Command { + bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() + + cmd := &cobra.Command{ + Use: "cancel-unbond [validator-addr] [amount] [creation-height]", + Short: "Cancel unbonding delegation and delegate back to the validator", + Args: cobra.ExactArgs(3), + Long: strings.TrimSpace( + fmt.Sprintf(`Cancel Unbonding Delegation and delegate back to the validator. + +Example: +$ %s tx staking cancel-unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake 2 --from mykey +`, + version.AppName, bech32PrefixValAddr, + ), + ), + Example: fmt.Sprintf(`$ %s tx staking cancel-unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake 2 --from mykey`, + version.AppName, bech32PrefixValAddr), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + delAddr := clientCtx.GetFromAddress() + valAddr, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinNormalized(args[1]) + if err != nil { + return err + } + + creationHeight, err := strconv.ParseInt(args[2], 10, 64) + if err != nil { + return sdkerrors.Wrap(fmt.Errorf("invalid height: %d", creationHeight), "invalid height") + } + + msg := types.NewMsgCancelUnbondingDelegation(delAddr, valAddr, creationHeight, amount) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func newBuildCreateValidatorMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *types.MsgCreateValidator, error) { fAmount, _ := fs.GetString(FlagAmount) amount, err := sdk.ParseCoinNormalized(fAmount) @@ -318,17 +393,8 @@ func newBuildCreateValidatorMsg(clientCtx client.Context, txf tx.Factory, fs *fl return txf, nil, err } - // get the initial validator min self delegation - msbStr, _ := fs.GetString(FlagMinSelfDelegation) - - minSelfDelegation, ok := sdk.NewIntFromString(msbStr) - if !ok { - return txf, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "minimum self delegation must be a positive integer") - } - msg, err := types.NewMsgCreateValidator( - sdk.ValAddress(valAddr), pk, amount, description, commissionRates, minSelfDelegation, - ) + sdk.ValAddress(valAddr), pk, amount, description, commissionRates) if err != nil { return txf, nil, err } @@ -361,7 +427,6 @@ func CreateValidatorMsgFlagSet(ipDefault string) (fs *flag.FlagSet, defaultsDesc fsCreateValidator.String(FlagDetails, "", "The validator's (optional) details") fsCreateValidator.String(FlagIdentity, "", "The (optional) identity signature (ex. UPort or Keybase)") fsCreateValidator.AddFlagSet(FlagSetCommissionCreate()) - fsCreateValidator.AddFlagSet(FlagSetMinSelfDelegation()) fsCreateValidator.AddFlagSet(FlagSetAmount()) fsCreateValidator.AddFlagSet(FlagSetPublicKey()) @@ -370,10 +435,8 @@ func CreateValidatorMsgFlagSet(ipDefault string) (fs *flag.FlagSet, defaultsDesc commission rate: %s commission max rate: %s commission max change rate: %s - minimum self delegation: %s `, defaultAmount, defaultCommissionRate, - defaultCommissionMaxRate, defaultCommissionMaxChangeRate, - defaultMinSelfDelegation) + defaultCommissionMaxRate, defaultCommissionMaxChangeRate) return fsCreateValidator, defaultsDesc } @@ -388,7 +451,6 @@ type TxCreateValidatorConfig struct { CommissionRate string CommissionMaxRate string CommissionMaxChangeRate string - MinSelfDelegation string PubKey cryptotypes.PubKey @@ -456,11 +518,6 @@ func PrepareConfigForTxCreateValidator(flagSet *flag.FlagSet, moniker, nodeID, c return c, err } - c.MinSelfDelegation, err = flagSet.GetString(FlagMinSelfDelegation) - if err != nil { - return c, err - } - c.NodeID = nodeID c.PubKey = valPubKey c.Website = website @@ -486,10 +543,6 @@ func PrepareConfigForTxCreateValidator(flagSet *flag.FlagSet, moniker, nodeID, c c.CommissionMaxChangeRate = defaultCommissionMaxChangeRate } - if c.MinSelfDelegation == "" { - c.MinSelfDelegation = defaultMinSelfDelegation - } - return c, nil } @@ -519,16 +572,8 @@ func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorC return txBldr, nil, err } - // get the initial validator min self delegation - msbStr := config.MinSelfDelegation - minSelfDelegation, ok := sdk.NewIntFromString(msbStr) - - if !ok { - return txBldr, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "minimum self delegation must be a positive integer") - } - msg, err := types.NewMsgCreateValidator( - sdk.ValAddress(valAddr), config.PubKey, amount, description, commissionRates, minSelfDelegation, + sdk.ValAddress(valAddr), config.PubKey, amount, description, commissionRates, ) if err != nil { return txBldr, msg, err @@ -544,3 +589,251 @@ func BuildCreateValidatorMsg(clientCtx client.Context, config TxCreateValidatorC return txBldr, msg, nil } + +// NewTokenizeSharesCmd defines a command for tokenizing shares from a validator. +func NewTokenizeSharesCmd() *cobra.Command { + bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix() + bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() + + cmd := &cobra.Command{ + Use: "tokenize-share [validator-addr] [amount] [rewardOwner]", + Short: "Tokenize delegation to share tokens", + Args: cobra.ExactArgs(3), + Long: strings.TrimSpace( + fmt.Sprintf(`Tokenize delegation to share tokens. + +Example: +$ %s tx staking tokenize-share %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey +`, + version.AppName, bech32PrefixValAddr, bech32PrefixAccAddr, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + delAddr := clientCtx.GetFromAddress() + valAddr, err := sdk.ValAddressFromBech32(args[0]) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinNormalized(args[1]) + if err != nil { + return err + } + + rewardOwner, err := sdk.AccAddressFromBech32(args[2]) + if err != nil { + return err + } + + msg := &types.MsgTokenizeShares{ + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), + Amount: amount, + TokenizedShareOwner: rewardOwner.String(), + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewRedeemTokensCmd defines a command for redeeming tokens from a validator for shares. +func NewRedeemTokensCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "redeem-tokens [amount]", + Short: "Redeem specified amount of share tokens to delegation", + Args: cobra.ExactArgs(1), + Long: strings.TrimSpace( + fmt.Sprintf(`Redeem specified amount of share tokens to delegation. + +Example: +$ %s tx staking redeem-tokens 100sharetoken --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + delAddr := clientCtx.GetFromAddress() + + amount, err := sdk.ParseCoinNormalized(args[0]) + if err != nil { + return err + } + + msg := &types.MsgRedeemTokensForShares{ + DelegatorAddress: delAddr.String(), + Amount: amount, + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewTransferTokenizeShareRecordCmd defines a command to transfer ownership of TokenizeShareRecord +func NewTransferTokenizeShareRecordCmd() *cobra.Command { + bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix() + + cmd := &cobra.Command{ + Use: "transfer-tokenize-share-record [record-id] [new-owner]", + Short: "Transfer ownership of TokenizeShareRecord", + Args: cobra.ExactArgs(2), + Long: strings.TrimSpace( + fmt.Sprintf(`Transfer ownership of TokenizeShareRecord. + +Example: +$ %s tx staking transfer-tokenize-share-record 1 %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey +`, + version.AppName, bech32PrefixAccAddr, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + recordID, err := strconv.Atoi(args[0]) + if err != nil { + return err + } + + ownerAddr, err := sdk.AccAddressFromBech32(args[1]) + if err != nil { + return err + } + + msg := &types.MsgTransferTokenizeShareRecord{ + Sender: clientCtx.GetFromAddress().String(), + TokenizeShareRecordId: uint64(recordID), + NewOwner: ownerAddr.String(), + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewDisableTokenizeShares defines a command to disable tokenization for an address +func NewDisableTokenizeShares() *cobra.Command { + cmd := &cobra.Command{ + Use: "disable-tokenize-shares", + Short: "Disable tokenization of shares", + Args: cobra.ExactArgs(0), + Long: strings.TrimSpace( + fmt.Sprintf(`Disables the tokenization of shares for an address. The account +must explicitly re-enable if they wish to tokenize again, at which point they must wait +the chain's unbonding period. + +Example: +$ %s tx staking disable-tokenize-shares --from mykey +`, version.AppName), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := &types.MsgDisableTokenizeShares{ + DelegatorAddress: clientCtx.GetFromAddress().String(), + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewEnableTokenizeShares defines a command to re-enable tokenization for an address +func NewEnableTokenizeShares() *cobra.Command { + cmd := &cobra.Command{ + Use: "enable-tokenize-shares", + Short: "Enable tokenization of shares", + Args: cobra.ExactArgs(0), + Long: strings.TrimSpace( + fmt.Sprintf(`Enables the tokenization of shares for an address after +it had been disable. This transaction queues the enablement of tokenization, but +the address must wait 1 unbonding period from the time of this transaction before +tokenization is permitted. + +Example: +$ %s tx staking enable-tokenize-shares --from mykey +`, version.AppName), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := &types.MsgEnableTokenizeShares{ + DelegatorAddress: clientCtx.GetFromAddress().String(), + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewValidatorBondCmd defines a command to mark a delegation as a validator self bond +func NewValidatorBondCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "validator-bond [validator]", + Short: "Mark a delegation as a validator self-bond", + Args: cobra.ExactArgs(1), + Long: strings.TrimSpace( + fmt.Sprintf(`Mark a delegation as a validator self-bond. + +Example: +$ %s tx staking validator-bond cosmosvaloper13h5xdxhsdaugwdrkusf8lkgu406h8t62jkqv3h --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := &types.MsgValidatorBond{ + DelegatorAddress: clientCtx.GetFromAddress().String(), + ValidatorAddress: args[0], + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index 243780bc6e03..4956c067e0d5 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -17,7 +17,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { privKey := ed25519.GenPrivKey() valPubKey := privKey.PubKey() moniker := "DefaultMoniker" - mkTxValCfg := func(amount, commission, commissionMax, commissionMaxChange, minSelfDelegation string) TxCreateValidatorConfig { + mkTxValCfg := func(amount, commission, commissionMax, commissionMaxChange string) TxCreateValidatorConfig { return TxCreateValidatorConfig{ IP: ip, ChainID: chainID, @@ -28,7 +28,6 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { CommissionRate: commission, CommissionMaxRate: commissionMax, CommissionMaxChangeRate: commissionMaxChange, - MinSelfDelegation: minSelfDelegation, } } @@ -42,42 +41,43 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { fsModify: func(fs *pflag.FlagSet) { return }, - expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.2", "0.01", "1"), - }, - { + expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.2", "0.01"), + }, { name: "Custom amount", fsModify: func(fs *pflag.FlagSet) { - fs.Set(FlagAmount, "2000stake") + err := fs.Set(FlagAmount, "2000stake") + if err != nil { + panic(err) + } }, - expectedCfg: mkTxValCfg("2000stake", "0.1", "0.2", "0.01", "1"), - }, - { + expectedCfg: mkTxValCfg("2000stake", "0.1", "0.2", "0.01"), + }, { name: "Custom commission rate", fsModify: func(fs *pflag.FlagSet) { - fs.Set(FlagCommissionRate, "0.54") + err := fs.Set(FlagCommissionRate, "0.54") + if err != nil { + panic(err) + } }, - expectedCfg: mkTxValCfg(defaultAmount, "0.54", "0.2", "0.01", "1"), - }, - { + expectedCfg: mkTxValCfg(defaultAmount, "0.54", "0.2", "0.01"), + }, { name: "Custom commission max rate", fsModify: func(fs *pflag.FlagSet) { - fs.Set(FlagCommissionMaxRate, "0.89") + err := fs.Set(FlagCommissionMaxRate, "0.89") + if err != nil { + panic(err) + } }, - expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.89", "0.01", "1"), - }, - { + expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.89", "0.01"), + }, { name: "Custom commission max change rate", fsModify: func(fs *pflag.FlagSet) { - fs.Set(FlagCommissionMaxChangeRate, "0.55") - }, - expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.2", "0.55", "1"), - }, - { - name: "Custom min self delegations", - fsModify: func(fs *pflag.FlagSet) { - fs.Set(FlagMinSelfDelegation, "0.33") + err := fs.Set(FlagCommissionMaxChangeRate, "0.55") + if err != nil { + panic(err) + } }, - expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.2", "0.01", "0.33"), + expectedCfg: mkTxValCfg(defaultAmount, "0.1", "0.2", "0.55"), }, } diff --git a/x/staking/client/rest/grpc_query_test.go b/x/staking/client/rest/grpc_query_test.go index c53635128ae1..344da4e94053 100644 --- a/x/staking/client/rest/grpc_query_test.go +++ b/x/staking/client/rest/grpc_query_test.go @@ -50,7 +50,8 @@ func (s *IntegrationTestSuite) SetupSuite() { val2 := s.network.Validators[1] // redelegate - _, err = stakingtestutil.MsgRedelegateExec( + stakingtestutil.MsgRedelegateExec( + s.T(), val.ClientCtx, val.Address, val.ValAddress, @@ -64,8 +65,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.Require().NoError(err) // unbonding - _, err = stakingtestutil.MsgUnbondExec(val.ClientCtx, val.Address, val.ValAddress, unbond) - s.Require().NoError(err) + stakingtestutil.MsgUnbondExec(s.T(), val.ClientCtx, val.Address, val.ValAddress, unbond) _, err = s.network.WaitForHeight(1) s.Require().NoError(err) } @@ -207,7 +207,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorDelegationsGRPC() { &types.QueryValidatorDelegationsResponse{}, &types.QueryValidatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), false, sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{Total: 1}, }, @@ -456,7 +456,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorDelegationsGRPC() { &types.QueryDelegatorDelegationsResponse{}, &types.QueryDelegatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), false, sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{Total: 1}, }, diff --git a/x/staking/client/testutil/suite.go b/x/staking/client/testutil/suite.go index a0ef083d47fd..c60e18a8fe63 100644 --- a/x/staking/client/testutil/suite.go +++ b/x/staking/client/testutil/suite.go @@ -48,29 +48,51 @@ func (s *IntegrationTestSuite) SetupSuite() { _, err := s.network.WaitForHeight(1) s.Require().NoError(err) - unbond, err := sdk.ParseCoinNormalized("10stake") + unbondCoin, err := sdk.ParseCoinNormalized("10stake") + s.Require().NoError(err) + + tokenizeCoin, err := sdk.ParseCoinNormalized("1000stake") s.Require().NoError(err) val := s.network.Validators[0] val2 := s.network.Validators[1] // redelegate - _, err = MsgRedelegateExec( + MsgRedelegateExec( + s.T(), val.ClientCtx, val.Address, val.ValAddress, val2.ValAddress, - unbond, + unbondCoin, fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), ) - s.Require().NoError(err) + _, err = s.network.WaitForHeight(1) s.Require().NoError(err) + // unbonding - _, err = MsgUnbondExec(val.ClientCtx, val.Address, val.ValAddress, unbond) + MsgUnbondExec(s.T(), val.ClientCtx, val.Address, val.ValAddress, unbondCoin) s.Require().NoError(err) + _, err = s.network.WaitForHeight(1) s.Require().NoError(err) + + // tokenize shares twice (once for the transfer and one for the redeem) + for i := 1; i <= 2; i++ { + MsgTokenizeSharesExec( + s.T(), + val.ClientCtx, + val.Address, + val.ValAddress, + val.Address, + tokenizeCoin, + fmt.Sprintf("--%s=%d", flags.FlagGas, 1000000), + ) + + _, err = s.network.WaitForHeight(1) + s.Require().NoError(err) + } } func (s *IntegrationTestSuite) TearDownSuite() { @@ -118,7 +140,6 @@ func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=0.5", cli.FlagCommissionRate), fmt.Sprintf("--%s=1.0", cli.FlagCommissionMaxRate), fmt.Sprintf("--%s=0.1", cli.FlagCommissionMaxChangeRate), - fmt.Sprintf("--%s=1", cli.FlagMinSelfDelegation), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -137,7 +158,6 @@ func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=0.5", cli.FlagCommissionRate), fmt.Sprintf("--%s=1.0", cli.FlagCommissionMaxRate), fmt.Sprintf("--%s=0.1", cli.FlagCommissionMaxChangeRate), - fmt.Sprintf("--%s=1", cli.FlagMinSelfDelegation), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -157,7 +177,6 @@ func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=0.5", cli.FlagCommissionRate), fmt.Sprintf("--%s=1.0", cli.FlagCommissionMaxRate), fmt.Sprintf("--%s=0.1", cli.FlagCommissionMaxChangeRate), - fmt.Sprintf("--%s=1", cli.FlagMinSelfDelegation), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -178,7 +197,6 @@ func (s *IntegrationTestSuite) TestNewCreateValidatorCmd() { fmt.Sprintf("--%s=0.5", cli.FlagCommissionRate), fmt.Sprintf("--%s=1.0", cli.FlagCommissionMaxRate), fmt.Sprintf("--%s=0.1", cli.FlagCommissionMaxChangeRate), - fmt.Sprintf("--%s=1", cli.FlagMinSelfDelegation), fmt.Sprintf("--%s=%s", flags.FlagFrom, newAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -399,7 +417,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegations() { &types.QueryDelegatorDelegationsResponse{}, &types.QueryDelegatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), false, sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{}, }, @@ -455,7 +473,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDelegations() { &types.QueryValidatorDelegationsResponse{}, &types.QueryValidatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), false, sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{}, }, @@ -873,15 +891,18 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { "with text output", []string{fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `bond_denom: stake +global_liquid_staking_cap: "1.000000000000000000" historical_entries: 10000 max_entries: 7 max_validators: 100 -unbonding_time: 1814400s`, +unbonding_time: 1814400s +validator_bond_factor: "-1.000000000000000000" +validator_liquid_staking_cap: "1.000000000000000000"`, }, { "with json output", []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake"}`, + `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake","validator_bond_factor":"-1.000000000000000000","global_liquid_staking_cap":"1.000000000000000000","validator_liquid_staking_cap":"1.000000000000000000"}`, }, } for _, tc := range testCases { @@ -1178,7 +1199,7 @@ func (s *IntegrationTestSuite) TestNewRedelegateCmd() { fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), }, - false, 31, &sdk.TxResponse{}, + false, 3, &sdk.TxResponse{}, }, { "valid transaction of delegate", @@ -1187,7 +1208,7 @@ func (s *IntegrationTestSuite) TestNewRedelegateCmd() { val2.ValAddress.String(), // dst-validator-addr sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), // amount fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=%s", flags.FlagGas, "auto"), + fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), @@ -1255,6 +1276,7 @@ func (s *IntegrationTestSuite) TestNewUnbondCmd() { val.ValAddress.String(), sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%d", flags.FlagGas, 300000), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), @@ -1284,6 +1306,254 @@ func (s *IntegrationTestSuite) TestNewUnbondCmd() { } } +func (s *IntegrationTestSuite) TestNewTokenizeSharesCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedCode uint32 + respType proto.Message + }{ + { + "Without reward owner", + []string{ + val.ValAddress.String(), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without tokenize share amount", + []string{ + val.ValAddress.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without tokenize share amount and reward owner", + []string{ + val.ValAddress.String(), + val.Address.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without validator address", + []string{ + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), + val.Address.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without validator address and reward owner", + []string{ + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without validator address, tokenize share amount and reward owner", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "valid transaction of tokenize share", + []string{ + val.ValAddress.String(), + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(150)).String(), + val.Address.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%d", flags.FlagGas, 1000000), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + false, 0, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewTokenizeSharesCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err, out.String()) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestNewRedeemTokensCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedCode uint32 + respType proto.Message + }{ + { + "Without redeem token amount", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "valid transaction of redeem token", + []string{ + sdk.NewCoin(fmt.Sprintf("%s/%d", val.ValAddress.String(), 1), sdk.NewInt(150)).String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%d", flags.FlagGas, 1000000), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + false, 0, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewRedeemTokensCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err, out.String()) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestNewTransferTokenizeShareRecordCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectErr bool + expectedCode uint32 + respType proto.Message + }{ + { + "Without new owner", + []string{ + "123", + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without record id", + []string{ + val.Address.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "Without record id and new owner", + []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + true, 0, nil, + }, + { + "valid transaction of transfer tokenize share record", + []string{ + "2", + val.Address.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%d", flags.FlagGas, 1000000), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + false, 0, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.NewTransferTokenizeShareRecordCmd() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err, out.String()) + s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + s.Require().Equal(tc.expectedCode, txResp.Code, out.String()) + } + }) + } +} + // TestBlockResults tests that the validator updates correctly show when // calling the /block_results RPC endpoint. // ref: https://github.com/cosmos/cosmos-sdk/issues/7401. @@ -1350,7 +1620,8 @@ func (s *IntegrationTestSuite) TestBlockResults() { break } - s.network.WaitForNextBlock() + err = s.network.WaitForNextBlock() + require.NoError(err) } } diff --git a/x/staking/client/testutil/test_helpers.go b/x/staking/client/testutil/test_helpers.go index e54dc82bf39d..45d0a1b1decc 100644 --- a/x/staking/client/testutil/test_helpers.go +++ b/x/staking/client/testutil/test_helpers.go @@ -2,13 +2,15 @@ package testutil import ( "fmt" + "testing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" stakingcli "github.com/cosmos/cosmos-sdk/x/staking/client/cli" + "github.com/spf13/cobra" + "github.com/stretchr/testify/require" ) var commonArgs = []string{ @@ -17,10 +19,21 @@ var commonArgs = []string{ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10))).String()), } +func ExecuteCmdAndCheckSuccess(t *testing.T, clientContext client.Context, cmd *cobra.Command, extraArgs []string) { + out, err := clitestutil.ExecTestCLICmd(clientContext, cmd, extraArgs) + require.NoError(t, err) + + var txRes sdk.TxResponse + clientContext.Codec.UnmarshalJSON(out.Bytes(), &txRes) + require.Equal(t, int64(0), int64(txRes.Code), "Response returned non-zero exit code:\n%+v", txRes) +} + // MsgRedelegateExec creates a redelegate message. -func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stringer, +func MsgRedelegateExec( + t *testing.T, clientCtx client.Context, + from, src, dst, amount fmt.Stringer, extraArgs ...string, -) (testutil.BufferWriter, error) { +) { args := []string{ src.String(), dst.String(), @@ -31,20 +44,40 @@ func MsgRedelegateExec(clientCtx client.Context, from, src, dst, amount fmt.Stri args = append(args, extraArgs...) args = append(args, commonArgs...) - return clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewRedelegateCmd(), args) + ExecuteCmdAndCheckSuccess(t, clientCtx, stakingcli.NewRedelegateCmd(), args) } // MsgUnbondExec creates a unbond message. -func MsgUnbondExec(clientCtx client.Context, from fmt.Stringer, valAddress, - amount fmt.Stringer, extraArgs ...string, -) (testutil.BufferWriter, error) { +func MsgUnbondExec( + t *testing.T, clientCtx client.Context, + from fmt.Stringer, valAddress, amount fmt.Stringer, + extraArgs ...string, +) { + args := []string{ + valAddress.String(), + amount.String(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, from.String()), + } + + args = append(args, commonArgs...) + args = append(args, extraArgs...) + ExecuteCmdAndCheckSuccess(t, clientCtx, stakingcli.NewUnbondCmd(), args) +} + +// MsgTokenizeSharesExec creates a delegation message. +func MsgTokenizeSharesExec( + t *testing.T, clientCtx client.Context, + from fmt.Stringer, valAddress, rewardOwner, amount fmt.Stringer, + extraArgs ...string, +) { args := []string{ valAddress.String(), amount.String(), + rewardOwner.String(), fmt.Sprintf("--%s=%s", flags.FlagFrom, from.String()), } args = append(args, commonArgs...) args = append(args, extraArgs...) - return clitestutil.ExecTestCLICmd(clientCtx, stakingcli.NewUnbondCmd(), args) + ExecuteCmdAndCheckSuccess(t, clientCtx, stakingcli.NewTokenizeSharesCmd(), args) } diff --git a/x/staking/exported/exported.go b/x/staking/exported/exported.go new file mode 100644 index 000000000000..2d0c2fd1c391 --- /dev/null +++ b/x/staking/exported/exported.go @@ -0,0 +1,16 @@ +package exported + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type ( + // 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 paramtypes.ParamSet) + } +) diff --git a/x/staking/genesis.go b/x/staking/genesis.go index 51ae11a25f26..9e5ac84ade39 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -150,6 +150,48 @@ func InitGenesis( } } + // Set the total liquid staked tokens + keeper.SetTotalLiquidStakedTokens(ctx, data.TotalLiquidStakedTokens) + + // Set each tokenize share record, as well as the last tokenize share record ID + latestId := uint64(0) + for _, tokenizeShareRecord := range data.TokenizeShareRecords { + if err := keeper.AddTokenizeShareRecord(ctx, tokenizeShareRecord); err != nil { + panic(err) + } + if tokenizeShareRecord.Id > latestId { + latestId = tokenizeShareRecord.Id + } + } + if data.LastTokenizeShareRecordId < latestId { + panic("Tokenize share record specified with ID greater than the latest ID") + } + keeper.SetLastTokenizeShareRecordID(ctx, data.LastTokenizeShareRecordId) + + // Set the tokenize shares locks for accounts that have disabled tokenizing shares + // The lock can either be in status LOCKED or LOCK_EXPIRING + // If it is in status LOCK_EXPIRING, a the unlocking must also be queued + for _, tokenizeShareLock := range data.TokenizeShareLocks { + address := sdk.MustAccAddressFromBech32(tokenizeShareLock.Address) + + switch tokenizeShareLock.Status { + case types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED.String(): + keeper.AddTokenizeSharesLock(ctx, address) + + case types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING.String(): + completionTime := tokenizeShareLock.CompletionTime + + authorizations := keeper.GetPendingTokenizeShareAuthorizations(ctx, completionTime) + authorizations.Addresses = append(authorizations.Addresses, address.String()) + + keeper.SetPendingTokenizeShareAuthorizations(ctx, completionTime, authorizations) + keeper.SetTokenizeSharesUnlockTime(ctx, address, completionTime) + + default: + panic(fmt.Sprintf("Unsupported tokenize share lock status %s", tokenizeShareLock.Status)) + } + } + return res } @@ -179,14 +221,18 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { }) return &types.GenesisState{ - Params: keeper.GetParams(ctx), - LastTotalPower: keeper.GetLastTotalPower(ctx), - LastValidatorPowers: lastValidatorPowers, - Validators: keeper.GetAllValidators(ctx), - Delegations: keeper.GetAllDelegations(ctx), - UnbondingDelegations: unbondingDelegations, - Redelegations: redelegations, - Exported: true, + Params: keeper.GetParams(ctx), + LastTotalPower: keeper.GetLastTotalPower(ctx), + LastValidatorPowers: lastValidatorPowers, + Validators: keeper.GetAllValidators(ctx), + Delegations: keeper.GetAllDelegations(ctx), + UnbondingDelegations: unbondingDelegations, + Redelegations: redelegations, + Exported: true, + TokenizeShareRecords: keeper.GetAllTokenizeShareRecords(ctx), + LastTokenizeShareRecordId: keeper.GetLastTokenizeShareRecordID(ctx), + TotalLiquidStakedTokens: keeper.GetTotalLiquidStakedTokens(ctx), + TokenizeShareLocks: keeper.GetAllTokenizeSharesLocks(ctx), } } diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 0c686e2d998e..5cd1cb27542b 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -242,3 +243,49 @@ func TestValidateGenesis(t *testing.T) { }) } } + +func TestInitExportLiquidStakingGenesis(t *testing.T) { + app := simapp.Setup(false) + ctx := app.NewContext(false, tmproto.Header{}) + + addresses := simapp.AddTestAddrs(app, ctx, 2, sdk.OneInt()) + address1, address2 := addresses[0], addresses[1] + + // Mock out a genesis state + inGenesisState := types.GenesisState{ + Params: types.DefaultParams(), + TokenizeShareRecords: []types.TokenizeShareRecord{ + {Id: 1, Owner: address1.String(), ModuleAccount: "module1", Validator: "val1"}, + {Id: 2, Owner: address2.String(), ModuleAccount: "module2", Validator: "val2"}, + }, + LastTokenizeShareRecordId: 2, + TotalLiquidStakedTokens: sdk.NewInt(1_000_000), + TokenizeShareLocks: []types.TokenizeShareLock{ + { + Address: address1.String(), + Status: types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED.String(), + }, + { + Address: address2.String(), + Status: types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING.String(), + CompletionTime: time.Date(2023, 1, 1, 1, 0, 0, 0, time.UTC), + }, + }, + } + + // Call init and then export genesis - confirming the same state is returned + staking.InitGenesis(ctx, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, &inGenesisState) + outGenesisState := *staking.ExportGenesis(ctx, app.StakingKeeper) + + require.ElementsMatch(t, inGenesisState.TokenizeShareRecords, outGenesisState.TokenizeShareRecords, + "tokenize share records") + + require.Equal(t, inGenesisState.LastTokenizeShareRecordId, outGenesisState.LastTokenizeShareRecordId, + "last tokenize share record ID") + + require.Equal(t, inGenesisState.TotalLiquidStakedTokens.Int64(), outGenesisState.TotalLiquidStakedTokens.Int64(), + "total liquid staked") + + require.ElementsMatch(t, inGenesisState.TokenizeShareLocks, outGenesisState.TokenizeShareLocks, + "tokenize share locks") +} diff --git a/x/staking/handler.go b/x/staking/handler.go index 6d89c7a29c53..20072d59a63c 100644 --- a/x/staking/handler.go +++ b/x/staking/handler.go @@ -34,6 +34,34 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := msgServer.Undelegate(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgCancelUnbondingDelegation: + res, err := msgServer.CancelUnbondingDelegation(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgUnbondValidator: + res, err := msgServer.UnbondValidator(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgTokenizeShares: + res, err := msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgRedeemTokensForShares: + res, err := msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgTransferTokenizeShareRecord: + res, err := msgServer.TransferTokenizeShareRecord(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgDisableTokenizeShares: + res, err := msgServer.DisableTokenizeShares(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + + case *types.MsgEnableTokenizeShares: + res, err := msgServer.EnableTokenizeShares(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + default: return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) } diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index d23a13f94f0c..f706ac904bad 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -243,7 +243,7 @@ func TestLegacyValidatorDelegations(t *testing.T) { require.Equal(t, bondAmount.MulRaw(2), validator.DelegatorShares.RoundInt()) require.Equal(t, bondAmount.MulRaw(2), validator.BondedTokens()) - // unbond validator total self-delegations (which should jail the validator) + // unbond validator total self-delegations res := tstaking.Undelegate(sdk.AccAddress(valAddr), valAddr, bondAmount, true) var resData types.MsgUndelegateResponse @@ -254,6 +254,9 @@ func TestLegacyValidatorDelegations(t *testing.T) { tstaking.Ctx = ctx staking.EndBlocker(ctx, app.StakingKeeper) + // jail the validator + app.StakingKeeper.Jail(ctx, valConsAddr) + // verify the validator record still exists, is jailed, and has correct tokens validator = tstaking.CheckValidator(valAddr, -1, true) require.Equal(t, bondAmount, validator.Tokens) @@ -351,68 +354,6 @@ func TestIncrementsMsgDelegate(t *testing.T) { } } -func TestEditValidatorDecreaseMinSelfDelegation(t *testing.T) { - initPower := int64(100) - initBond := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) - - validatorAddr := valAddrs[0] - tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) - - // create validator - msgCreateValidator := tstaking.CreateValidatorMsg(validatorAddr, PKs[0], initBond) - msgCreateValidator.MinSelfDelegation = sdk.NewInt(2) - tstaking.Handle(msgCreateValidator, true) - - // must end-block - updates, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - require.NoError(t, err) - require.Equal(t, 1, len(updates)) - - // verify the self-delegation exists - bond, found := app.StakingKeeper.GetDelegation(ctx, sdk.AccAddress(validatorAddr), validatorAddr) - require.True(t, found) - gotBond := bond.Shares.RoundInt() - require.Equal(t, initBond, gotBond, - "initBond: %v\ngotBond: %v\nbond: %v\n", - initBond, gotBond, bond) - - newMinSelfDelegation := sdk.OneInt() - msgEditValidator := types.NewMsgEditValidator(validatorAddr, types.Description{}, nil, &newMinSelfDelegation) - tstaking.Handle(msgEditValidator, false) -} - -func TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond(t *testing.T) { - initPower := int64(100) - initBond := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) - - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) - validatorAddr := valAddrs[0] - tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) - - // create validator - msgCreateValidator := tstaking.CreateValidatorMsg(validatorAddr, PKs[0], initBond) - msgCreateValidator.MinSelfDelegation = sdk.NewInt(2) - tstaking.Handle(msgCreateValidator, true) - - // must end-block - updates, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) - require.NoError(t, err) - require.Equal(t, 1, len(updates)) - - // verify the self-delegation exists - bond, found := app.StakingKeeper.GetDelegation(ctx, sdk.AccAddress(validatorAddr), validatorAddr) - require.True(t, found) - gotBond := bond.Shares.RoundInt() - require.Equal(t, initBond, gotBond, - "initBond: %v\ngotBond: %v\nbond: %v\n", - initBond, gotBond, bond) - - newMinSelfDelegation := initBond.Add(sdk.OneInt()) - msgEditValidator := types.NewMsgEditValidator(validatorAddr, types.Description{}, nil, &newMinSelfDelegation) - tstaking.Handle(msgEditValidator, false) -} - func TestIncrementsMsgUnbond(t *testing.T) { initPower := int64(1000) @@ -629,6 +570,9 @@ func TestJailValidator(t *testing.T) { staking.EndBlocker(ctx, app.StakingKeeper) tstaking.Ctx = ctx + // jail the validator + app.StakingKeeper.Jail(ctx, sdk.GetConsAddress(PKs[0])) + tstaking.CheckValidator(validatorAddr, -1, true) // test that the delegator can still withdraw their bonds @@ -661,8 +605,9 @@ func TestValidatorQueue(t *testing.T) { tstaking.Delegate(delegatorAddr, validatorAddr, amt) staking.EndBlocker(ctx, app.StakingKeeper) - // unbond the all self-delegation to put validator in unbonding state + // unbond the and jail the validator to put it in an unbonding state res := tstaking.Undelegate(sdk.AccAddress(validatorAddr), validatorAddr, amt, true) + app.StakingKeeper.Jail(ctx, sdk.GetConsAddress(PKs[0])) var resData types.MsgUndelegateResponse err := proto.Unmarshal(res.Data, &resData) @@ -958,23 +903,26 @@ func TestMultipleUnbondingDelegationAtSameTime(t *testing.T) { staking.EndBlocker(ctx, app.StakingKeeper) // begin an unbonding delegation + unbondAmount := valTokens.QuoRaw(2) selfDelAddr := sdk.AccAddress(valAddr) // (the validator is it's own delegator) - tstaking.Undelegate(selfDelAddr, valAddr, valTokens.QuoRaw(2), true) + tstaking.Undelegate(selfDelAddr, valAddr, unbondAmount, true) // there should only be one entry in the ubd object ubd, found := app.StakingKeeper.GetUnbondingDelegation(ctx, selfDelAddr, valAddr) require.True(t, found) require.Len(t, ubd.Entries, 1) + require.Equal(t, ubd.Entries[0].Balance, unbondAmount, "unbonding delegation balance") // start a second ubd at this same time as the first - tstaking.Undelegate(selfDelAddr, valAddr, valTokens.QuoRaw(2), true) + tstaking.Undelegate(selfDelAddr, valAddr, unbondAmount, true) - // now there should be two entries + // the second ubd should have modified the first one ubd, found = app.StakingKeeper.GetUnbondingDelegation(ctx, selfDelAddr, valAddr) require.True(t, found) - require.Len(t, ubd.Entries, 2) + require.Len(t, ubd.Entries, 1) + require.Equal(t, ubd.Entries[0].Balance, valTokens, "unbonding delegation balance") - // move forwaubd in time, should complete both ubds + // move forward in time, should complete the ubds ctx = tstaking.TurnBlockTimeDiff(1 * time.Second) ubd, found = app.StakingKeeper.GetUnbondingDelegation(ctx, selfDelAddr, valAddr) require.False(t, found) @@ -1185,15 +1133,15 @@ func TestInvalidCoinDenom(t *testing.T) { oneCoin := sdk.NewCoin(sdk.DefaultBondDenom, sdk.OneInt()) commission := types.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.ZeroDec()) - msgCreate, err := types.NewMsgCreateValidator(valA, PKs[0], invalidCoin, types.Description{}, commission, sdk.OneInt()) + msgCreate, err := types.NewMsgCreateValidator(valA, PKs[0], invalidCoin, types.Description{}, commission) require.NoError(t, err) tstaking.Handle(msgCreate, false) - msgCreate, err = types.NewMsgCreateValidator(valA, PKs[0], validCoin, types.Description{}, commission, sdk.OneInt()) + msgCreate, err = types.NewMsgCreateValidator(valA, PKs[0], validCoin, types.Description{}, commission) require.NoError(t, err) tstaking.Handle(msgCreate, true) - msgCreate, err = types.NewMsgCreateValidator(valB, PKs[1], validCoin, types.Description{}, commission, sdk.OneInt()) + msgCreate, err = types.NewMsgCreateValidator(valB, PKs[1], validCoin, types.Description{}, commission) require.NoError(t, err) tstaking.Handle(msgCreate, true) @@ -1215,3 +1163,218 @@ func TestInvalidCoinDenom(t *testing.T) { msgRedelegate = types.NewMsgBeginRedelegate(delAddr, valA, valB, oneCoin) tstaking.Handle(msgRedelegate, true) } + +func TestTokenizeShares(t *testing.T) { + initPower := int64(1000) + + testCases := []struct { + name string + delIndex int64 + valIndex int64 + amount sdk.Int + isSuccess bool + expStatus types.BondStatus + expJailed bool + }{ + { + "tokenize shares for less than self delegation", + 0, 0, + sdk.NewInt(10000), + true, + types.Bonded, + false, + }, + { + "tokenize shares for more than self delegation", + 0, 0, + sdk.TokensFromConsensusPower(initPower+1, sdk.DefaultPowerReduction), + false, + types.Bonded, + false, + }, + { + "tokenize share for full self delegation", + 0, 0, + sdk.TokensFromConsensusPower(50, sdk.DefaultPowerReduction), + true, + types.Bonded, + false, + }, + { + "tokenize shares for less than delegation", + 1, 0, + sdk.NewInt(1000), + true, + types.Bonded, + false, + }, + { + "tokenize shares for more than delegation", + 1, 0, + sdk.NewInt(20000), + false, + types.Bonded, + false, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(*testing.T) { + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) + val1 := valAddrs[0] + del2 := delAddrs[1] + tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) + + // set staking params + params := app.StakingKeeper.GetParams(ctx) + params.MaxValidators = 2 + app.StakingKeeper.SetParams(ctx, params) + + // add validators + tstaking.CreateValidatorWithValPower(val1, PKs[0], 50, true) + + // call it to update validator status to bonded + _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + + // delegate tokens to the validator + tstaking.Delegate(del2, val1, sdk.NewInt(10000)) + + del := delAddrs[tc.delIndex] + val := valAddrs[tc.valIndex] + + tstaking.TokenizeShares(del, val, sdk.NewCoin(sdk.DefaultBondDenom, tc.amount), del, tc.isSuccess) + + if tc.isSuccess { + // call it to update validator status automatically + _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + + tstaking.CheckValidator(val, tc.expStatus, tc.expJailed) + } + }) + } +} + +func TestRedeemTokensforShares(t *testing.T) { + initPower := int64(1000) + + testCases := []struct { + name string + amount sdk.Int + isSuccess bool + }{ + { + "redeem full shares", + sdk.NewInt(10000), + true, + }, + { + "redeem partial shares", + sdk.NewInt(1000), + true, + }, + { + "redeem zero shares", + sdk.NewInt(0), + false, + }, + { + "redeem more than shares", + sdk.NewInt(20000), + false, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(*testing.T) { + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) + val1 := valAddrs[0] + del2 := delAddrs[1] + tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) + + // set staking params + params := app.StakingKeeper.GetParams(ctx) + params.MaxValidators = 2 + app.StakingKeeper.SetParams(ctx, params) + + // add validators + tstaking.CreateValidatorWithValPower(val1, PKs[0], 50, true) + + // call it to update validator status to bonded + _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + + // delegate tokens to the validator + tstaking.Delegate(del2, val1, sdk.NewInt(10000)) + + // tokenize shares + tstaking.TokenizeShares(del2, val1, sdk.NewInt64Coin(sdk.DefaultBondDenom, 10000), del2, true) + + // get tokenize share record + record, err := app.StakingKeeper.GetTokenizeShareRecord(ctx, 1) + require.NoError(t, err) + + // redeem share + tstaking.RedeemTokensForShares(del2, sdk.NewCoin(record.GetShareTokenDenom(), tc.amount), tc.isSuccess) + }) + } +} + +func TransferTokenizeShareRecord(t *testing.T) { + initPower := int64(1000) + + testCases := []struct { + name string + recordID uint64 + oldOwner int64 + newOwner int64 + isSuccess bool + }{ + { + "transfer to other", + 1, + 2, 1, + true, + }, + { + "self transfer", + 1, + 2, 2, + true, + }, + { + "transfer non-existent", + 2, + 2, 2, + false, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(*testing.T) { + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) + val1 := valAddrs[0] + del2 := delAddrs[1] + tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) + + // set staking params + params := app.StakingKeeper.GetParams(ctx) + params.MaxValidators = 2 + app.StakingKeeper.SetParams(ctx, params) + + // add validators + tstaking.CreateValidatorWithValPower(val1, PKs[0], 50, true) + + // call it to update validator status to bonded + _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + require.NoError(t, err) + + // delegate tokens to the validator + tstaking.Delegate(del2, val1, sdk.NewInt(10000)) + + // tokenize shares + tstaking.TokenizeShares(del2, val1, sdk.NewInt64Coin(sdk.DefaultBondDenom, 10000), del2, true) + + // redeem share + tstaking.TranserTokenizeShareRecord(tc.recordID, delAddrs[tc.oldOwner], delAddrs[tc.newOwner], tc.isSuccess) + }) + } +} diff --git a/x/staking/keeper/common_test.go b/x/staking/keeper/common_test.go index 99c3d2b27a78..4a13c25352a4 100644 --- a/x/staking/keeper/common_test.go +++ b/x/staking/keeper/common_test.go @@ -47,3 +47,9 @@ func generateAddresses(app *simapp.SimApp, ctx sdk.Context, numAddrs int) ([]sdk return addrDels, addrVals } + +func delegateCoinsFromAccount(ctx sdk.Context, app *simapp.SimApp, addr sdk.AccAddress, amount sdk.Int, val types.Validator) error { + _, err := app.StakingKeeper.Delegate(ctx, addr, amount, types.Unbonded, val, true) + + return err +} diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index e204f71c152e..557e342267f3 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -10,10 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// return a specific delegation -func (k Keeper) GetDelegation(ctx sdk.Context, - delAddr sdk.AccAddress, valAddr sdk.ValAddress, -) (delegation types.Delegation, found bool) { +// GetDelegation returns a specific delegation. +func (k Keeper) GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation types.Delegation, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetDelegationKey(delAddr, valAddr) @@ -72,9 +70,7 @@ func (k Keeper) GetValidatorDelegations(ctx sdk.Context, valAddr sdk.ValAddress) // GetDelegatorDelegations returns a given amount of all the delegations from a // delegator. -func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, - maxRetrieve uint16, -) (delegations []types.Delegation) { +func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (delegations []types.Delegation) { delegations = make([]types.Delegation, maxRetrieve) store := ctx.KVStore(k.storeKey) delegatorPrefixKey := types.GetDelegationsKey(delegator) @@ -149,7 +145,8 @@ func (k Keeper) GetUnbondingDelegation( return ubd, true } -// return all unbonding delegations from a particular validator +// GetUnbondingDelegationsFromValidator returns all unbonding delegations from a +// particular validator. func (k Keeper) GetUnbondingDelegationsFromValidator(ctx sdk.Context, valAddr sdk.ValAddress) (ubds []types.UnbondingDelegation) { store := ctx.KVStore(k.storeKey) @@ -261,9 +258,7 @@ func (k Keeper) IterateDelegatorRedelegations(ctx sdk.Context, delegator sdk.Acc } // HasMaxUnbondingDelegationEntries - check if unbonding delegation has maximum number of entries. -func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, - delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, -) bool { +func (k Keeper) HasMaxUnbondingDelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool { ubd, found := k.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) if !found { return false @@ -355,9 +350,7 @@ func (k Keeper) SetUBDQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys // InsertUBDQueue inserts an unbonding delegation to the appropriate timeslice // in the unbonding queue. -func (k Keeper) InsertUBDQueue(ctx sdk.Context, ubd types.UnbondingDelegation, - completionTime time.Time, -) { +func (k Keeper) InsertUBDQueue(ctx sdk.Context, ubd types.UnbondingDelegation, completionTime time.Time) { dvPair := types.DVPair{DelegatorAddress: ubd.DelegatorAddress, ValidatorAddress: ubd.ValidatorAddress} timeSlice := k.GetUBDQueueTimeSlice(ctx, completionTime) @@ -382,7 +375,7 @@ func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (m store := ctx.KVStore(k.storeKey) // gets an iterator for all timeslices from time 0 until the current Blockheader time - unbondingTimesliceIterator := k.UBDQueueIterator(ctx, ctx.BlockHeader().Time) + unbondingTimesliceIterator := k.UBDQueueIterator(ctx, currTime) defer unbondingTimesliceIterator.Close() for ; unbondingTimesliceIterator.Valid(); unbondingTimesliceIterator.Next() { @@ -399,9 +392,7 @@ func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (m } // GetRedelegations returns a given amount of all the delegator redelegations. -func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, - maxRetrieve uint16, -) (redelegations []types.Redelegation) { +func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (redelegations []types.Redelegation) { redelegations = make([]types.Redelegation, maxRetrieve) store := ctx.KVStore(k.storeKey) @@ -421,8 +412,10 @@ func (k Keeper) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, } // GetRedelegation returns a redelegation. -func (k Keeper) GetRedelegation(ctx sdk.Context, - delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, +func (k Keeper) GetRedelegation( + ctx sdk.Context, + delAddr sdk.AccAddress, + valSrcAddr, valDstAddr sdk.ValAddress, ) (red types.Redelegation, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetREDKey(delAddr, valSrcAddr, valDstAddr) @@ -456,9 +449,7 @@ func (k Keeper) GetRedelegationsFromSrcValidator(ctx sdk.Context, valAddr sdk.Va } // HasReceivingRedelegation checks if validator is receiving a redelegation. -func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, - delAddr sdk.AccAddress, valDstAddr sdk.ValAddress, -) bool { +func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool { store := ctx.KVStore(k.storeKey) prefix := types.GetREDsByDelToValDstIndexKey(delAddr, valDstAddr) @@ -469,8 +460,10 @@ func (k Keeper) HasReceivingRedelegation(ctx sdk.Context, } // HasMaxRedelegationEntries checks if redelegation has maximum number of entries. -func (k Keeper) HasMaxRedelegationEntries(ctx sdk.Context, - delegatorAddr sdk.AccAddress, validatorSrcAddr, +func (k Keeper) HasMaxRedelegationEntries( + ctx sdk.Context, + delegatorAddr sdk.AccAddress, + validatorSrcAddr sdk.ValAddress, validatorDstAddr sdk.ValAddress, ) bool { red, found := k.GetRedelegation(ctx, delegatorAddr, validatorSrcAddr, validatorDstAddr) @@ -593,9 +586,7 @@ func (k Keeper) SetRedelegationQueueTimeSlice(ctx sdk.Context, timestamp time.Ti // InsertRedelegationQueue insert an redelegation delegation to the appropriate // timeslice in the redelegation queue. -func (k Keeper) InsertRedelegationQueue(ctx sdk.Context, red types.Redelegation, - completionTime time.Time, -) { +func (k Keeper) InsertRedelegationQueue(ctx sdk.Context, red types.Redelegation, completionTime time.Time) { timeSlice := k.GetRedelegationQueueTimeSlice(ctx, completionTime) dvvTriplet := types.DVVTriplet{ DelegatorAddress: red.DelegatorAddress, @@ -754,16 +745,6 @@ func (k Keeper) Unbond( return amount, err } - isValidatorOperator := delegatorAddress.Equals(validator.GetOperator()) - - // If the delegation is the operator of the validator and undelegating will decrease the validator's - // self-delegation below their minimum, we jail the validator. - if isValidatorOperator && !validator.Jailed && - validator.TokensFromShares(delegation.Shares).TruncateInt().LT(validator.MinSelfDelegation) { - k.jailValidator(ctx, validator) - validator = k.mustGetValidator(ctx, validator.GetOperator()) - } - // remove the delegation if delegation.Shares.IsZero() { k.RemoveDelegation(ctx, delegation) @@ -898,7 +879,8 @@ func (k Keeper) CompleteUnbonding(ctx sdk.Context, delAddr sdk.AccAddress, valAd return balances, nil } -// begin unbonding / redelegation; create a redelegation record +// BeginRedelegation begins unbonding / redelegation and creates a redelegation +// record. func (k Keeper) BeginRedelegation( ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount sdk.Dec, ) (completionTime time.Time, err error) { diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index a3364bae9702..98248dadbb1a 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -206,7 +206,7 @@ func TestUnbondDelegation(t *testing.T) { validator, issuedShares := validator.AddTokensFromDel(startTokens) require.Equal(t, startTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) + _ = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) delegation := types.NewDelegation(delAddrs[0], valAddrs[0], issuedShares) app.StakingKeeper.SetDelegation(ctx, delegation) @@ -260,8 +260,9 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { // should all pass var completionTime time.Time - for i := uint32(0); i < maxEntries; i++ { + for i := int64(0); i < int64(maxEntries); i++ { var err error + ctx = ctx.WithBlockHeight(i) completionTime, err = app.StakingKeeper.Undelegate(ctx, addrDels[0], addrVals[0], sdk.NewDec(1)) require.NoError(t, err) } @@ -306,68 +307,6 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) { require.True(sdk.IntEq(t, newNotBonded, oldNotBonded.AddRaw(1))) } -// test undelegating self delegation from a validator pushing it below MinSelfDelegation -// shift it from the bonded to unbonding state and jailed -func TestUndelegateSelfDelegationBelowMinSelfDelegation(t *testing.T) { - _, app, ctx := createTestInput() - - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000)) - addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - delCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delTokens)) - - // create a validator with a self-delegation - validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - - validator.MinSelfDelegation = delTokens - validator, issuedShares := validator.AddTokensFromDel(delTokens) - require.Equal(t, delTokens, issuedShares.RoundInt()) - - // add bonded tokens to pool for delegations - notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), delCoins)) - app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) - app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - require.True(t, validator.IsBonded()) - - selfDelegation := types.NewDelegation(sdk.AccAddress(addrVals[0].Bytes()), addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, selfDelegation) - - // add bonded tokens to pool for delegations - bondedPool := app.StakingKeeper.GetBondedPool(ctx) - require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, bondedPool.GetName(), delCoins)) - app.AccountKeeper.SetModuleAccount(ctx, bondedPool) - - // create a second delegation to this validator - app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - validator, issuedShares = validator.AddTokensFromDel(delTokens) - require.True(t, validator.IsBonded()) - require.Equal(t, delTokens, issuedShares.RoundInt()) - - // add bonded tokens to pool for delegations - require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, bondedPool.GetName(), delCoins)) - app.AccountKeeper.SetModuleAccount(ctx, bondedPool) - - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) - delegation := types.NewDelegation(addrDels[0], addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, delegation) - - val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], app.StakingKeeper.TokensFromConsensusPower(ctx, 6).ToDec()) - require.NoError(t, err) - - // end block - applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) - - validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) - require.True(t, found) - require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 14), validator.Tokens) - require.Equal(t, types.Unbonding, validator.Status) - require.True(t, validator.Jailed) -} - func TestUndelegateFromUnbondingValidator(t *testing.T) { _, app, ctx := createTestInput() delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) @@ -422,10 +361,11 @@ func TestUndelegateFromUnbondingValidator(t *testing.T) { header.Time = blockTime ctx = ctx.WithBlockHeader(header) - // unbond the all self-delegation to put validator in unbonding state + // unbond the and jail the validator to put it in an unbonding state val0AccAddr := sdk.AccAddress(addrVals[0]) _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], delTokens.ToDec()) require.NoError(t, err) + app.StakingKeeper.Jail(ctx, sdk.GetConsAddress(PKs[0])) // end block applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) @@ -498,9 +438,10 @@ func TestUndelegateFromUnbondedValidator(t *testing.T) { ctx = ctx.WithBlockHeight(10) ctx = ctx.WithBlockTime(time.Unix(333, 0)) - // unbond the all self-delegation to put validator in unbonding state + // unbond the and jail the validator to put it in an unbonding state _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], valTokens.ToDec()) require.NoError(t, err) + app.StakingKeeper.Jail(ctx, sdk.GetConsAddress(PKs[0])) // end block applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) @@ -582,9 +523,10 @@ func TestUnbondingAllDelegationFromValidator(t *testing.T) { ctx = ctx.WithBlockHeight(10) ctx = ctx.WithBlockTime(time.Unix(333, 0)) - // unbond the all self-delegation to put validator in unbonding state + // unbond the and jail the validator to put it in an unbonding state _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], valTokens.ToDec()) require.NoError(t, err) + app.StakingKeeper.Jail(ctx, sdk.GetConsAddress(PKs[0])) // end block applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) @@ -746,7 +688,7 @@ func TestRedelegationMaxEntries(t *testing.T) { valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) validator, issuedShares := validator.AddTokensFromDel(valTokens) require.Equal(t, valTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) + _ = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) selfDelegation := types.NewDelegation(val0AccAddr, addrVals[0], issuedShares) app.StakingKeeper.SetDelegation(ctx, selfDelegation) @@ -783,211 +725,172 @@ func TestRedelegationMaxEntries(t *testing.T) { require.NoError(t, err) } -func TestRedelegateSelfDelegation(t *testing.T) { +func TestValidatorBondUndelegate(t *testing.T) { _, app, ctx := createTestInput() - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) + addrDels := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) - startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - // add bonded tokens to pool for delegations + bondDenom := app.StakingKeeper.BondDenom(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoins)) + + require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens)))) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - // create a validator with a self-delegation + // create a validator and a delegator to that validator validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) + validator.Status = types.Bonded + app.StakingKeeper.SetValidator(ctx, validator) - valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validator, issuedShares := validator.AddTokensFromDel(valTokens) - require.Equal(t, valTokens, issuedShares.RoundInt()) + // set validator bond factor + params := app.StakingKeeper.GetParams(ctx) + params.ValidatorBondFactor = sdk.NewDec(1) + app.StakingKeeper.SetParams(ctx, params) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) + // convert to validator self-bond + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) - val0AccAddr := sdk.AccAddress(addrVals[0]) - selfDelegation := types.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, selfDelegation) - - // create a second validator - validator2 := teststaking.NewValidator(t, addrVals[1], PKs[1]) - validator2, issuedShares = validator2.AddTokensFromDel(valTokens) - require.Equal(t, valTokens, issuedShares.RoundInt()) - validator2 = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator2, true) - require.Equal(t, types.Bonded, validator2.Status) + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + err := delegateCoinsFromAccount(ctx, app, addrDels[0], startTokens, validator) + require.NoError(t, err) + _, err = msgServer.ValidatorBond(sdk.WrapSDKContext(ctx), &types.MsgValidatorBond{ + DelegatorAddress: addrDels[0].String(), + ValidatorAddress: addrVals[0].String(), + }) + require.NoError(t, err) - // create a second delegation to validator 1 - delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validator, issuedShares = validator.AddTokensFromDel(delTokens) - require.Equal(t, delTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) + // tokenize share for 2nd account delegation + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + err = delegateCoinsFromAccount(ctx, app, addrDels[1], startTokens, validator) + require.NoError(t, err) + tokenizeShareResp, err := msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &types.MsgTokenizeShares{ + DelegatorAddress: addrDels[1].String(), + ValidatorAddress: addrVals[0].String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, startTokens), + TokenizedShareOwner: addrDels[0].String(), + }) + require.NoError(t, err) - delegation := types.NewDelegation(addrDels[0], addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, delegation) + // try undelegating + _, err = msgServer.Undelegate(sdk.WrapSDKContext(ctx), &types.MsgUndelegate{ + DelegatorAddress: addrDels[0].String(), + ValidatorAddress: addrVals[0].String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, startTokens), + }) + require.Error(t, err) - _, err := app.StakingKeeper.BeginRedelegation(ctx, val0AccAddr, addrVals[0], addrVals[1], delTokens.ToDec()) + // redeem full amount on 2nd account and try undelegation + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + err = delegateCoinsFromAccount(ctx, app, addrDels[1], startTokens, validator) + require.NoError(t, err) + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &types.MsgRedeemTokensForShares{ + DelegatorAddress: addrDels[1].String(), + Amount: tokenizeShareResp.Amount, + }) require.NoError(t, err) - // end block - applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 2) + // try undelegating + _, err = msgServer.Undelegate(sdk.WrapSDKContext(ctx), &types.MsgUndelegate{ + DelegatorAddress: addrDels[0].String(), + ValidatorAddress: addrVals[0].String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, startTokens), + }) + require.NoError(t, err) - validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) - require.True(t, found) - require.Equal(t, valTokens, validator.Tokens) - require.Equal(t, types.Unbonding, validator.Status) + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + require.Equal(t, validator.ValidatorBondShares, sdk.ZeroDec()) } -func TestRedelegateFromUnbondingValidator(t *testing.T) { +func TestValidatorBondRedelegate(t *testing.T) { _, app, ctx := createTestInput() - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) + addrDels := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) - startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - // add bonded tokens to pool for delegations + bondDenom := app.StakingKeeper.BondDenom(ctx) notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoins)) + + startPoolToken := sdk.NewCoins(sdk.NewCoin(bondDenom, startTokens.Mul(sdk.NewInt(2)))) + require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startPoolToken)) app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - // create a validator with a self-delegation + // create a validator and a delegator to that validator validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - - valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validator, issuedShares := validator.AddTokensFromDel(valTokens) - require.Equal(t, valTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) - val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := types.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, selfDelegation) - - // create a second delegation to this validator - app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validator, issuedShares = validator.AddTokensFromDel(delTokens) - require.Equal(t, delTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) - delegation := types.NewDelegation(addrDels[1], addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, delegation) - - // create a second validator + validator.Status = types.Bonded + app.StakingKeeper.SetValidator(ctx, validator) validator2 := teststaking.NewValidator(t, addrVals[1], PKs[1]) - validator2, issuedShares = validator2.AddTokensFromDel(valTokens) - require.Equal(t, valTokens, issuedShares.RoundInt()) - validator2 = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator2, true) + validator.Status = types.Bonded + app.StakingKeeper.SetValidator(ctx, validator2) - header := ctx.BlockHeader() - blockHeight := int64(10) - header.Height = blockHeight - blockTime := time.Unix(333, 0) - header.Time = blockTime - ctx = ctx.WithBlockHeader(header) - - // unbond the all self-delegation to put validator in unbonding state - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], delTokens.ToDec()) - require.NoError(t, err) - - // end block - applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) - - validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) - require.True(t, found) - require.Equal(t, blockHeight, validator.UnbondingHeight) + // set validator bond factor params := app.StakingKeeper.GetParams(ctx) - require.True(t, blockTime.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) + params.ValidatorBondFactor = sdk.NewDec(1) + app.StakingKeeper.SetParams(ctx, params) - // change the context - header = ctx.BlockHeader() - blockHeight2 := int64(20) - header.Height = blockHeight2 - blockTime2 := time.Unix(444, 0) - header.Time = blockTime2 - ctx = ctx.WithBlockHeader(header) + // set total liquid stake + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, sdk.NewInt(100)) - // unbond some of the other delegation's shares - redelegateTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegateTokens.ToDec()) + // delegate to each validator + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + err := delegateCoinsFromAccount(ctx, app, addrDels[0], startTokens, validator) require.NoError(t, err) - // retrieve the unbonding delegation - ubd, found := app.StakingKeeper.GetRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1]) - require.True(t, found) - require.Len(t, ubd.Entries, 1) - assert.Equal(t, blockHeight, ubd.Entries[0].CreationHeight) - assert.True(t, blockTime.Add(params.UnbondingTime).Equal(ubd.Entries[0].CompletionTime)) -} - -func TestRedelegateFromUnbondedValidator(t *testing.T) { - _, app, ctx := createTestInput() - - addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0)) - addrVals := simapp.ConvertAddrsToValAddrs(addrDels) - - startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 30) - startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) - - // add bonded tokens to pool for delegations - notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) - require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoins)) - app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) - - // create a validator with a self-delegation - validator := teststaking.NewValidator(t, addrVals[0], PKs[0]) - app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) - - valTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validator, issuedShares := validator.AddTokensFromDel(valTokens) - require.Equal(t, valTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) - val0AccAddr := sdk.AccAddress(addrVals[0].Bytes()) - selfDelegation := types.NewDelegation(val0AccAddr, addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, selfDelegation) - - // create a second delegation to this validator - app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, validator) - delTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 10) - validator, issuedShares = validator.AddTokensFromDel(delTokens) - require.Equal(t, delTokens, issuedShares.RoundInt()) - validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) - delegation := types.NewDelegation(addrDels[1], addrVals[0], issuedShares) - app.StakingKeeper.SetDelegation(ctx, delegation) - - // create a second validator - validator2 := teststaking.NewValidator(t, addrVals[1], PKs[1]) - validator2, issuedShares = validator2.AddTokensFromDel(valTokens) - require.Equal(t, valTokens, issuedShares.RoundInt()) - validator2 = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator2, true) - require.Equal(t, types.Bonded, validator2.Status) - - ctx = ctx.WithBlockHeight(10) - ctx = ctx.WithBlockTime(time.Unix(333, 0)) + validator2, _ = app.StakingKeeper.GetValidator(ctx, addrVals[1]) + err = delegateCoinsFromAccount(ctx, app, addrDels[1], startTokens, validator2) + require.NoError(t, err) - // unbond the all self-delegation to put validator in unbonding state - _, err := app.StakingKeeper.Undelegate(ctx, val0AccAddr, addrVals[0], delTokens.ToDec()) + // convert to validator self-bond + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + _, err = msgServer.ValidatorBond(sdk.WrapSDKContext(ctx), &types.MsgValidatorBond{ + DelegatorAddress: addrDels[0].String(), + ValidatorAddress: addrVals[0].String(), + }) require.NoError(t, err) - // end block - applyValidatorSetUpdates(t, ctx, app.StakingKeeper, 1) + // tokenize share for 2nd account delegation + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + err = delegateCoinsFromAccount(ctx, app, addrDels[1], startTokens, validator) + require.NoError(t, err) + tokenizeShareResp, err := msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &types.MsgTokenizeShares{ + DelegatorAddress: addrDels[1].String(), + ValidatorAddress: addrVals[0].String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, startTokens), + TokenizedShareOwner: addrDels[0].String(), + }) + require.NoError(t, err) - validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) - require.True(t, found) - require.Equal(t, ctx.BlockHeight(), validator.UnbondingHeight) - params := app.StakingKeeper.GetParams(ctx) - require.True(t, ctx.BlockHeader().Time.Add(params.UnbondingTime).Equal(validator.UnbondingTime)) + // try undelegating + _, err = msgServer.BeginRedelegate(sdk.WrapSDKContext(ctx), &types.MsgBeginRedelegate{ + DelegatorAddress: addrDels[0].String(), + ValidatorSrcAddress: addrVals[0].String(), + ValidatorDstAddress: addrVals[1].String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, startTokens), + }) + require.Error(t, err) - // unbond the validator - app.StakingKeeper.UnbondingToUnbonded(ctx, validator) + // redeem full amount on 2nd account and try undelegation + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + err = delegateCoinsFromAccount(ctx, app, addrDels[1], startTokens, validator) + require.NoError(t, err) + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &types.MsgRedeemTokensForShares{ + DelegatorAddress: addrDels[1].String(), + Amount: tokenizeShareResp.Amount, + }) + require.NoError(t, err) - // redelegate some of the delegation's shares - redelegationTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) - _, err = app.StakingKeeper.BeginRedelegation(ctx, addrDels[1], addrVals[0], addrVals[1], redelegationTokens.ToDec()) + // try undelegating + _, err = msgServer.BeginRedelegate(sdk.WrapSDKContext(ctx), &types.MsgBeginRedelegate{ + DelegatorAddress: addrDels[0].String(), + ValidatorSrcAddress: addrVals[0].String(), + ValidatorDstAddress: addrVals[1].String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, startTokens), + }) require.NoError(t, err) - // no red should have been found - red, found := app.StakingKeeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) - require.False(t, found, "%v", red) + validator, _ = app.StakingKeeper.GetValidator(ctx, addrVals[0]) + require.Equal(t, validator.ValidatorBondShares, sdk.ZeroDec()) } diff --git a/x/staking/keeper/grpc_query.go b/x/staking/keeper/grpc_query.go index 79f9542adf22..a647cb42ab75 100644 --- a/x/staking/keeper/grpc_query.go +++ b/x/staking/keeper/grpc_query.go @@ -537,3 +537,168 @@ func queryAllRedelegations(store sdk.KVStore, k Querier, req *types.QueryRedeleg return redels, res, err } + +// Query for individual tokenize share record information by share by id +func (k Querier) TokenizeShareRecordById(c context.Context, req *types.QueryTokenizeShareRecordByIdRequest) (*types.QueryTokenizeShareRecordByIdResponse, error) { //nolint:revive // fixing this would require changing the .proto files, so we might as well leave it alone + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + record, err := k.GetTokenizeShareRecord(ctx, req.Id) + if err != nil { + return nil, err + } + + return &types.QueryTokenizeShareRecordByIdResponse{ + Record: record, + }, nil +} + +// Query for individual tokenize share record information by share denom +func (k Querier) TokenizeShareRecordByDenom(c context.Context, req *types.QueryTokenizeShareRecordByDenomRequest) (*types.QueryTokenizeShareRecordByDenomResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + record, err := k.GetTokenizeShareRecordByDenom(ctx, req.Denom) + if err != nil { + return nil, err + } + + return &types.QueryTokenizeShareRecordByDenomResponse{ + Record: record, + }, nil +} + +// Query tokenize share records by address +func (k Querier) TokenizeShareRecordsOwned(c context.Context, req *types.QueryTokenizeShareRecordsOwnedRequest) (*types.QueryTokenizeShareRecordsOwnedResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + owner, err := sdk.AccAddressFromBech32(req.Owner) + if err != nil { + return nil, err + } + records := k.GetTokenizeShareRecordsByOwner(ctx, owner) + + return &types.QueryTokenizeShareRecordsOwnedResponse{ + Records: records, + }, nil +} + +// Query for all tokenize share records +func (k Querier) AllTokenizeShareRecords(c context.Context, req *types.QueryAllTokenizeShareRecordsRequest) (*types.QueryAllTokenizeShareRecordsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(c) + + var records []types.TokenizeShareRecord + + store := ctx.KVStore(k.storeKey) + valStore := prefix.NewStore(store, types.TokenizeShareRecordPrefix) + pageRes, err := query.FilteredPaginate(valStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { + var tokenizeShareRecord types.TokenizeShareRecord + if err := k.cdc.Unmarshal(value, &tokenizeShareRecord); err != nil { + return false, err + } + + if accumulate { + records = append(records, tokenizeShareRecord) + } + return true, nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAllTokenizeShareRecordsResponse{ + Records: records, + Pagination: pageRes, + }, nil +} + +// Query for last tokenize share record id +func (k Querier) LastTokenizeShareRecordId(c context.Context, req *types.QueryLastTokenizeShareRecordIdRequest) (*types.QueryLastTokenizeShareRecordIdResponse, error) { //nolint:revive // fixing this would require changing the .proto files, so we might as well leave it alone + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + return &types.QueryLastTokenizeShareRecordIdResponse{ + Id: k.GetLastTokenizeShareRecordID(ctx), + }, nil +} + +// Query for total tokenized staked assets +func (k Querier) TotalTokenizeSharedAssets(c context.Context, req *types.QueryTotalTokenizeSharedAssetsRequest) (*types.QueryTotalTokenizeSharedAssetsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(c) + records := k.GetAllTokenizeShareRecords(ctx) + totalTokenizeShared := sdk.ZeroInt() + + for _, record := range records { + moduleAcc := record.GetModuleAddress() + valAddr, err := sdk.ValAddressFromBech32(record.Validator) + if err != nil { + return nil, err + } + + validator, found := k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + delegation, found := k.GetDelegation(ctx, moduleAcc, valAddr) + if !found { + return nil, types.ErrNoDelegation + } + + tokens := validator.TokensFromShares(delegation.Shares) + totalTokenizeShared = totalTokenizeShared.Add(tokens.RoundInt()) + } + return &types.QueryTotalTokenizeSharedAssetsResponse{ + Value: sdk.NewCoin(k.BondDenom(ctx), totalTokenizeShared), + }, nil +} + +// Query for total tokenized staked tokens +// Liquid staked tokens are either tokenized delegations or delegations +// owned by a module account +func (k Querier) TotalLiquidStaked(c context.Context, req *types.QueryTotalLiquidStaked) (*types.QueryTotalLiquidStakedResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(c) + totalLiquidStaked := k.GetTotalLiquidStakedTokens(ctx).String() + return &types.QueryTotalLiquidStakedResponse{ + Tokens: totalLiquidStaked, + }, nil +} + +// Query status of an account's tokenize share lock +func (k Querier) TokenizeShareLockInfo(c context.Context, req *types.QueryTokenizeShareLockInfo) (*types.QueryTokenizeShareLockInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(c) + + address := sdk.MustAccAddressFromBech32(req.Address) + status, completionTime := k.GetTokenizeSharesLock(ctx, address) + + timeString := "" + if !completionTime.IsZero() { + timeString = completionTime.String() + } + + return &types.QueryTokenizeShareLockInfoResponse{ + Status: status.String(), + ExpirationTime: timeString, + }, nil +} diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index 13155bd660fa..b652851ebaab 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -804,12 +804,14 @@ func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers app.StakingKeeper.SetValidator(ctx, val1) app.StakingKeeper.SetValidator(ctx, val2) - app.StakingKeeper.SetValidatorByConsAddr(ctx, val1) - app.StakingKeeper.SetValidatorByConsAddr(ctx, val2) + err := app.StakingKeeper.SetValidatorByConsAddr(ctx, val1) + require.NoError(t, err) + err = app.StakingKeeper.SetValidatorByConsAddr(ctx, val2) + require.NoError(t, err) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val1) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val2) - _, err := app.StakingKeeper.Delegate(ctx, addrs[0], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[0]), types.Unbonded, val1, true) + _, err = app.StakingKeeper.Delegate(ctx, addrs[0], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[0]), types.Unbonded, val1, true) require.NoError(t, err) _, err = app.StakingKeeper.Delegate(ctx, addrs[1], app.StakingKeeper.TokensFromConsensusPower(ctx, powers[1]), types.Unbonded, val2, true) require.NoError(t, err) diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index db6c6a6b47af..5c7bb15cf2db 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -99,7 +99,7 @@ func TestTrackHistoricalInfo(t *testing.T) { app.StakingKeeper.SetLastValidatorPower(ctx, val2.GetOperator(), 80) vals := []types.Validator{val1, val2} - IsValSetSorted(vals, app.StakingKeeper.PowerReduction(ctx)) + require.True(t, IsValSetSorted(vals, app.StakingKeeper.PowerReduction(ctx))) // Set Header for BeginBlock context header := tmproto.Header{ diff --git a/x/staking/keeper/hooks.go b/x/staking/keeper/hooks.go index 314daaf1bf22..7f4c3e879469 100644 --- a/x/staking/keeper/hooks.go +++ b/x/staking/keeper/hooks.go @@ -85,3 +85,11 @@ func (k Keeper) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error { } return nil } + +// This is called before a TokenizeShareRecord is removed +func (k Keeper) BeforeTokenizeShareRecordRemoved(ctx sdk.Context, recordID uint64) error { + if k.hooks != nil { + return k.hooks.BeforeTokenizeShareRecordRemoved(ctx, recordID) + } + return nil +} diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index 7f120af196f0..ce3f3e6791b0 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -3,13 +3,13 @@ package keeper import ( "fmt" - abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/staking/types" + abci "github.com/tendermint/tendermint/abci/types" ) // Implements ValidatorSet interface diff --git a/x/staking/keeper/liquid_stake.go b/x/staking/keeper/liquid_stake.go new file mode 100644 index 000000000000..a0e9df1c974b --- /dev/null +++ b/x/staking/keeper/liquid_stake.go @@ -0,0 +1,406 @@ +package keeper + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// SetTotalLiquidStakedTokens stores the total outstanding tokens owned by a liquid staking provider +func (k Keeper) SetTotalLiquidStakedTokens(ctx sdk.Context, tokens sdk.Int) { + store := ctx.KVStore(k.storeKey) + + tokensBz, err := tokens.Marshal() + if err != nil { + panic(err) + } + + store.Set(types.TotalLiquidStakedTokensKey, tokensBz) +} + +// GetTotalLiquidStakedTokens returns the total outstanding tokens owned by a liquid staking provider +// Returns zero if the total liquid stake amount has not been initialized +func (k Keeper) GetTotalLiquidStakedTokens(ctx sdk.Context) sdk.Int { + store := ctx.KVStore(k.storeKey) + tokensBz := store.Get(types.TotalLiquidStakedTokensKey) + + if tokensBz == nil { + return sdk.ZeroInt() + } + + var tokens sdk.Int + if err := tokens.Unmarshal(tokensBz); err != nil { + panic(err) + } + + return tokens +} + +// Checks if an account associated with a given delegation is related to liquid staking +// +// This is determined by checking if the account has a 32-length address +// which will identify the following scenarios: +// - An account has tokenized their shares, and thus the delegation is +// owned by the tokenize share record module account +// - A liquid staking provider is delegating through an ICA account +// +// Both ICA accounts and tokenize share record module accounts have 32-length addresses +// NOTE: This will have to be refactored before adapting it to chains beyond gaia +// as other chains may have 32-length addresses that are not related to the above scenarios +func (k Keeper) DelegatorIsLiquidStaker(delegatorAddress sdk.AccAddress) bool { + return len(delegatorAddress) == 32 +} + +// CheckExceedsGlobalLiquidStakingCap checks if a liquid delegation would cause the +// global liquid staking cap to be exceeded +// A liquid delegation is defined as either tokenized shares, or a delegation from an ICA Account +// The total stake is determined by the balance of the bonded pool +// If the delegation's shares are already bonded (e.g. in the event of a tokenized share) +// the tokens are already included in the bonded pool +// If the delegation's shares are not bonded (e.g. normal delegation), +// we need to add the tokens to the current bonded pool balance to get the total staked +func (k Keeper) CheckExceedsGlobalLiquidStakingCap(ctx sdk.Context, tokens sdk.Int, sharesAlreadyBonded bool) bool { + liquidStakingCap := k.GlobalLiquidStakingCap(ctx) + liquidStakedAmount := k.GetTotalLiquidStakedTokens(ctx) + + // Determine the total stake from the balance of the bonded pool + // If this is not a tokenized delegation, we need to add the tokens to the pool balance since + // they would not have been counted yet + // If this is for a tokenized delegation, the tokens are already included in the pool balance + totalStakedAmount := k.TotalBondedTokens(ctx) + if !sharesAlreadyBonded { + totalStakedAmount = totalStakedAmount.Add(tokens) + } + + // Calculate the percentage of stake that is liquid + updatedLiquidStaked := liquidStakedAmount.Add(tokens).ToDec() + liquidStakePercent := updatedLiquidStaked.Quo(totalStakedAmount.ToDec()) + + return liquidStakePercent.GT(liquidStakingCap) +} + +// CheckExceedsValidatorBondCap checks if a liquid delegation to a validator would cause +// the liquid shares to exceed the validator bond factor +// A liquid delegation is defined as either tokenized shares, or a delegation from an ICA Account +// Returns true if the cap is exceeded +func (k Keeper) CheckExceedsValidatorBondCap(ctx sdk.Context, validator types.Validator, shares sdk.Dec) bool { + validatorBondFactor := k.ValidatorBondFactor(ctx) + if validatorBondFactor.Equal(types.ValidatorBondCapDisabled) { + return false + } + maxValLiquidShares := validator.ValidatorBondShares.Mul(validatorBondFactor) + return validator.LiquidShares.Add(shares).GT(maxValLiquidShares) +} + +// CheckExceedsValidatorLiquidStakingCap checks if a liquid delegation could cause the +// total liuquid shares to exceed the liquid staking cap +// A liquid delegation is defined as either tokenized shares, or a delegation from an ICA Account +// Returns true if the cap is exceeded +func (k Keeper) CheckExceedsValidatorLiquidStakingCap(ctx sdk.Context, validator types.Validator, shares sdk.Dec) bool { + updatedLiquidShares := validator.LiquidShares.Add(shares) + updatedTotalShares := validator.DelegatorShares.Add(shares) + + liquidStakePercent := updatedLiquidShares.Quo(updatedTotalShares) + liquidStakingCap := k.ValidatorLiquidStakingCap(ctx) + + return liquidStakePercent.GT(liquidStakingCap) +} + +// SafelyIncreaseTotalLiquidStakedTokens increments the total liquid staked tokens +// if the global cap is not surpassed by this delegation +// +// The percentage of liquid staked tokens must be less than the GlobalLiquidStakingCap: +// (TotalLiquidStakedTokens / TotalStakedTokens) <= GlobalLiquidStakingCap +func (k Keeper) SafelyIncreaseTotalLiquidStakedTokens(ctx sdk.Context, amount sdk.Int, sharesAlreadyBonded bool) error { + if k.CheckExceedsGlobalLiquidStakingCap(ctx, amount, sharesAlreadyBonded) { + return types.ErrGlobalLiquidStakingCapExceeded + } + + k.SetTotalLiquidStakedTokens(ctx, k.GetTotalLiquidStakedTokens(ctx).Add(amount)) + return nil +} + +// DecreaseTotalLiquidStakedTokens decrements the total liquid staked tokens +func (k Keeper) DecreaseTotalLiquidStakedTokens(ctx sdk.Context, amount sdk.Int) error { + totalLiquidStake := k.GetTotalLiquidStakedTokens(ctx) + if amount.GT(totalLiquidStake) { + return types.ErrTotalLiquidStakedUnderflow + } + k.SetTotalLiquidStakedTokens(ctx, totalLiquidStake.Sub(amount)) + return nil +} + +// SafelyIncreaseValidatorLiquidShares increments the liquid shares on a validator, if: +// the validator bond factor and validator liquid staking cap will not be exceeded by this delegation +// +// The percentage of validator liquid shares must be less than the ValidatorLiquidStakingCap, +// and the total liquid staked shares cannot exceed the validator bond cap +// 1) (TotalLiquidStakedTokens / TotalStakedTokens) <= ValidatorLiquidStakingCap +// 2) LiquidShares <= (ValidatorBondShares * ValidatorBondFactor) +func (k Keeper) SafelyIncreaseValidatorLiquidShares(ctx sdk.Context, validator types.Validator, shares sdk.Dec) error { + // Confirm the validator bond factor and validator liquid staking cap will not be exceeded + if k.CheckExceedsValidatorBondCap(ctx, validator, shares) { + return types.ErrInsufficientValidatorBondShares + } + if k.CheckExceedsValidatorLiquidStakingCap(ctx, validator, shares) { + return types.ErrValidatorLiquidStakingCapExceeded + } + + // Increment the validator's liquid shares + validator.LiquidShares = validator.LiquidShares.Add(shares) + k.SetValidator(ctx, validator) + + return nil +} + +// DecreaseValidatorLiquidShares decrements the liquid shares on a validator +func (k Keeper) DecreaseValidatorLiquidShares(ctx sdk.Context, validator types.Validator, shares sdk.Dec) error { + if shares.GT(validator.LiquidShares) { + return types.ErrValidatorLiquidSharesUnderflow + } + validator.LiquidShares = validator.LiquidShares.Sub(shares) + k.SetValidator(ctx, validator) + return nil +} + +// Increase validator bond shares increments the validator's self bond +// in the event that the delegation amount on a validator bond delegation is increased +func (k Keeper) IncreaseValidatorBondShares(ctx sdk.Context, validator types.Validator, shares sdk.Dec) { + validator.ValidatorBondShares = validator.ValidatorBondShares.Add(shares) + k.SetValidator(ctx, validator) +} + +// SafelyDecreaseValidatorBond decrements the validator's self bond +// so long as it will not cause the current delegations to exceed the threshold +// set by validator bond factor +func (k Keeper) SafelyDecreaseValidatorBond(ctx sdk.Context, validator types.Validator, shares sdk.Dec) error { + // Check if the decreased self bond will cause the validator bond threshold to be exceeded + validatorBondFactor := k.ValidatorBondFactor(ctx) + validatorBondEnabled := !validatorBondFactor.Equal(types.ValidatorBondCapDisabled) + maxValTotalShare := validator.ValidatorBondShares.Sub(shares).Mul(validatorBondFactor) + + if validatorBondEnabled && validator.LiquidShares.GT(maxValTotalShare) { + return types.ErrInsufficientValidatorBondShares + } + + // Decrement the validator's self bond + validator.ValidatorBondShares = validator.ValidatorBondShares.Sub(shares) + k.SetValidator(ctx, validator) + + return nil +} + +// Adds a lock that prevents tokenizing shares for an account +// The tokenize share lock store is implemented by keying on the account address +// and storing a timestamp as the value. The timestamp is empty when the lock is +// set and gets populated with the unlock completion time once the unlock has started +func (k Keeper) AddTokenizeSharesLock(ctx sdk.Context, address sdk.AccAddress) { + store := ctx.KVStore(k.storeKey) + key := types.GetTokenizeSharesLockKey(address) + store.Set(key, sdk.FormatTimeBytes(time.Time{})) +} + +// Removes the tokenize share lock for an account to enable tokenizing shares +func (k Keeper) RemoveTokenizeSharesLock(ctx sdk.Context, address sdk.AccAddress) { + store := ctx.KVStore(k.storeKey) + key := types.GetTokenizeSharesLockKey(address) + store.Delete(key) +} + +// Updates the timestamp associated with a lock to the time at which the lock expires +func (k Keeper) SetTokenizeSharesUnlockTime(ctx sdk.Context, address sdk.AccAddress, completionTime time.Time) { + store := ctx.KVStore(k.storeKey) + key := types.GetTokenizeSharesLockKey(address) + store.Set(key, sdk.FormatTimeBytes(completionTime)) +} + +// Checks if there is currently a tokenize share lock for a given account +// Returns the status indicating whether the account is locked, unlocked, +// or as a lock expiring. If the lock is expiring, the expiration time is returned +func (k Keeper) GetTokenizeSharesLock(ctx sdk.Context, address sdk.AccAddress) (status types.TokenizeShareLockStatus, unlockTime time.Time) { + store := ctx.KVStore(k.storeKey) + key := types.GetTokenizeSharesLockKey(address) + bz := store.Get(key) + if len(bz) == 0 { + return types.TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED, time.Time{} + } + unlockTime, err := sdk.ParseTimeBytes(bz) + if err != nil { + panic(err) + } + if unlockTime.IsZero() { + return types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED, time.Time{} + } + return types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING, unlockTime +} + +// Returns all tokenize share locks +func (k Keeper) GetAllTokenizeSharesLocks(ctx sdk.Context) (tokenizeShareLocks []types.TokenizeShareLock) { + store := ctx.KVStore(k.storeKey) + + iterator := sdk.KVStorePrefixIterator(store, types.TokenizeSharesLockPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + addressBz := iterator.Key()[2:] // remove prefix bytes and address length + unlockTime, err := sdk.ParseTimeBytes(iterator.Value()) + if err != nil { + panic(err) + } + + var status types.TokenizeShareLockStatus + if unlockTime.IsZero() { + status = types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED + } else { + status = types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING + } + + bechPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() + lock := types.TokenizeShareLock{ + Address: sdk.MustBech32ifyAddressBytes(bechPrefix, addressBz), + Status: status.String(), + CompletionTime: unlockTime, + } + + tokenizeShareLocks = append(tokenizeShareLocks, lock) + } + + return tokenizeShareLocks +} + +// Stores a list of addresses pending tokenize share unlocking at the same time +func (k Keeper) SetPendingTokenizeShareAuthorizations(ctx sdk.Context, completionTime time.Time, authorizations types.PendingTokenizeShareAuthorizations) { + store := ctx.KVStore(k.storeKey) + timeKey := types.GetTokenizeShareAuthorizationTimeKey(completionTime) + bz := k.cdc.MustMarshal(&authorizations) + store.Set(timeKey, bz) +} + +// Returns a list of addresses pending tokenize share unlocking at the same time +func (k Keeper) GetPendingTokenizeShareAuthorizations(ctx sdk.Context, completionTime time.Time) types.PendingTokenizeShareAuthorizations { + store := ctx.KVStore(k.storeKey) + + timeKey := types.GetTokenizeShareAuthorizationTimeKey(completionTime) + bz := store.Get(timeKey) + + authorizations := types.PendingTokenizeShareAuthorizations{Addresses: []string{}} + if len(bz) == 0 { + return authorizations + } + k.cdc.MustUnmarshal(bz, &authorizations) + + return authorizations +} + +// Inserts the address into a queue where it will sit for 1 unbonding period +// before the tokenize share lock is removed +// Returns the completion time +func (k Keeper) QueueTokenizeSharesAuthorization(ctx sdk.Context, address sdk.AccAddress) time.Time { + params := k.GetParams(ctx) + completionTime := ctx.BlockTime().Add(params.UnbondingTime) + + // Append the address to the list of addresses that also unlock at this time + authorizations := k.GetPendingTokenizeShareAuthorizations(ctx, completionTime) + authorizations.Addresses = append(authorizations.Addresses, address.String()) + + k.SetPendingTokenizeShareAuthorizations(ctx, completionTime, authorizations) + k.SetTokenizeSharesUnlockTime(ctx, address, completionTime) + + return completionTime +} + +// Cancels a pending tokenize share authorization by removing the lock from the queue +func (k Keeper) CancelTokenizeShareLockExpiration(ctx sdk.Context, address sdk.AccAddress, completionTime time.Time) { + authorizations := k.GetPendingTokenizeShareAuthorizations(ctx, completionTime) + + updatedAddresses := []string{} + for _, expiringAddress := range authorizations.Addresses { + if address.String() != expiringAddress { + updatedAddresses = append(updatedAddresses, expiringAddress) + } + } + + authorizations.Addresses = updatedAddresses + k.SetPendingTokenizeShareAuthorizations(ctx, completionTime, authorizations) +} + +// Unlocks all queued tokenize share authorizations that have matured +// (i.e. have waited the full unbonding period) +func (k Keeper) RemoveExpiredTokenizeShareLocks(ctx sdk.Context, blockTime time.Time) (unlockedAddresses []string) { + store := ctx.KVStore(k.storeKey) + + // iterators all time slices from time 0 until the current block time + prefixEnd := sdk.InclusiveEndBytes(types.GetTokenizeShareAuthorizationTimeKey(blockTime)) + iterator := store.Iterator(types.TokenizeSharesUnlockQueuePrefix, prefixEnd) + defer iterator.Close() + + // collect all unlocked addresses + unlockedAddresses = []string{} + for ; iterator.Valid(); iterator.Next() { + authorizations := types.PendingTokenizeShareAuthorizations{} + k.cdc.MustUnmarshal(iterator.Value(), &authorizations) + + for _, addressString := range authorizations.Addresses { + unlockedAddresses = append(unlockedAddresses, addressString) + } + store.Delete(iterator.Key()) + } + + // remove the lock from each unlocked address + for _, unlockedAddress := range unlockedAddresses { + k.RemoveTokenizeSharesLock(ctx, sdk.MustAccAddressFromBech32(unlockedAddress)) + } + + return unlockedAddresses +} + +// Calculates and sets the global liquid staked tokens and liquid shares by validator +// The totals are determined by looping each delegation record and summing the stake +// if the delegator has a 32-length address. Checking for a 32-length address will capture +// ICA accounts, as well as tokenized delegations which are owned by module accounts +// under the hood +// This function must be called in the upgrade handler which onboards LSM +func (k Keeper) RefreshTotalLiquidStaked(ctx sdk.Context) error { + // First reset each validator's liquid shares to 0 + for _, validator := range k.GetAllValidators(ctx) { + validator.LiquidShares = sdk.ZeroDec() + k.SetValidator(ctx, validator) + } + + // Sum up the total liquid tokens and increment each validator's liquid shares + totalLiquidStakedTokens := sdk.ZeroInt() + for _, delegation := range k.GetAllDelegations(ctx) { + delegatorAddress, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + return err + } + + // If the delegator is either an ICA account or a tokenize share module account, + // the delegation should be considered to be associated with liquid staking + // Consequently, the global number of liquid staked tokens, and the total + // liquid shares on the validator should be incremented + if k.DelegatorIsLiquidStaker(delegatorAddress) { + validatorAddress, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) + if err != nil { + return err + } + validator, found := k.GetValidator(ctx, validatorAddress) + if !found { + return types.ErrNoValidatorFound + } + + liquidShares := delegation.Shares + liquidTokens := validator.TokensFromShares(liquidShares).TruncateInt() + + validator.LiquidShares = validator.LiquidShares.Add(liquidShares) + k.SetValidator(ctx, validator) + + totalLiquidStakedTokens = totalLiquidStakedTokens.Add(liquidTokens) + } + } + + k.SetTotalLiquidStakedTokens(ctx, totalLiquidStakedTokens) + + return nil +} diff --git a/x/staking/keeper/liquid_stake_test.go b/x/staking/keeper/liquid_stake_test.go new file mode 100644 index 000000000000..36d0e8c6d10a --- /dev/null +++ b/x/staking/keeper/liquid_stake_test.go @@ -0,0 +1,1190 @@ +package keeper_test + +import ( + "fmt" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" +) + +// Helper function to create a base account from an account name +// Used to differentiate against liquid staking provider module account +func createBaseAccount(app *simapp.SimApp, ctx sdk.Context, accountName string) sdk.AccAddress { + baseAccountAddress := sdk.AccAddress(accountName) + app.AccountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(baseAccountAddress)) + return baseAccountAddress +} + +// Helper function to create 32-length account +// Used to mock an liquid staking provider's ICA account +func createICAAccount(app *simapp.SimApp, ctx sdk.Context) sdk.AccAddress { + icahost := "icahost" + connectionID := "connection-0" + portID := icahost + + moduleAddress := authtypes.NewModuleAddress(icahost) + icaAddress := sdk.AccAddress(address.Derive(moduleAddress, []byte(connectionID+portID))) + + account := authtypes.NewBaseAccountWithAddress(icaAddress) + app.AccountKeeper.SetAccount(ctx, account) + + return icaAddress +} + +// Helper function to create a module account address from a tokenized share +// Used to mock the delegation owner of a tokenized share +func createTokenizeShareModuleAccount(recordID uint64) sdk.AccAddress { + record := types.TokenizeShareRecord{ + Id: recordID, + ModuleAccount: fmt.Sprintf("%s%d", types.TokenizeShareModuleAccountPrefix, recordID), + } + return record.GetModuleAddress() +} + +// Tests Set/Get TotalLiquidStakedTokens +func TestTotalLiquidStakedTokens(t *testing.T) { + _, app, ctx := createTestInput() + + // Update the total liquid staked + total := sdk.NewInt(100) + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, total) + + // Confirm it was updated + require.Equal(t, total, app.StakingKeeper.GetTotalLiquidStakedTokens(ctx), "initial") +} + +// Tests Increase/Decrease TotalValidatorLiquidShares +func TestValidatorLiquidShares(t *testing.T) { + _, app, ctx := createTestInput() + + // Create a validator address + privKey := secp256k1.GenPrivKey() + pubKey := privKey.PubKey() + valAddress := sdk.ValAddress(pubKey.Address()) + + // Set an initial total + initial := sdk.NewDec(100) + validator := types.Validator{ + OperatorAddress: valAddress.String(), + LiquidShares: initial, + } + app.StakingKeeper.SetValidator(ctx, validator) +} + +// Tests DelegatorIsLiquidStaker +func TestDelegatorIsLiquidStaker(t *testing.T) { + _, app, ctx := createTestInput() + + // Create base and ICA accounts + baseAccountAddress := createBaseAccount(app, ctx, "base-account") + icaAccountAddress := createICAAccount(app, ctx) + + // Only the ICA module account should be considered a liquid staking provider + require.False(t, app.StakingKeeper.DelegatorIsLiquidStaker(baseAccountAddress), "base account") + require.True(t, app.StakingKeeper.DelegatorIsLiquidStaker(icaAccountAddress), "ICA module account") +} + +// Helper function to clear the Bonded pool balances before a unit test +func clearPoolBalance(t *testing.T, app *simapp.SimApp, ctx sdk.Context) { + bondDenom := app.StakingKeeper.BondDenom(ctx) + initialBondedBalance := app.BankKeeper.GetBalance(ctx, app.AccountKeeper.GetModuleAddress(types.BondedPoolName), bondDenom) + + err := app.BankKeeper.SendCoinsFromModuleToModule(ctx, types.BondedPoolName, minttypes.ModuleName, sdk.NewCoins(initialBondedBalance)) + require.NoError(t, err, "no error expected when clearing bonded pool balance") +} + +// Helper function to fund the Bonded pool balances before a unit test +func fundPoolBalance(t *testing.T, app *simapp.SimApp, ctx sdk.Context, amount sdk.Int) { + bondDenom := app.StakingKeeper.BondDenom(ctx) + bondedPoolCoin := sdk.NewCoin(bondDenom, amount) + + err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, sdk.NewCoins(bondedPoolCoin)) + require.NoError(t, err, "no error expected when minting") + + err = app.BankKeeper.SendCoinsFromModuleToModule(ctx, minttypes.ModuleName, types.BondedPoolName, sdk.NewCoins(bondedPoolCoin)) + require.NoError(t, err, "no error expected when sending tokens to bonded pool") +} + +// Tests CheckExceedsGlobalLiquidStakingCap +func TestCheckExceedsGlobalLiquidStakingCap(t *testing.T) { + _, app, ctx := createTestInput() + + testCases := []struct { + name string + globalLiquidCap sdk.Dec + totalLiquidStake sdk.Int + totalStake sdk.Int + newLiquidStake sdk.Int + tokenizingShares bool + expectedExceeds bool + }{ + { + // Cap: 10% - Native Delegation - Delegation Below Threshold + // Total Liquid Stake: 5, Total Stake: 95, New Liquid Stake: 1 + // => Total Liquid Stake: 5+1=6, Total Stake: 95+1=96 => 6/96 = 6% < 10% cap + name: "10 percent cap _ native delegation _ delegation below cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.1"), + totalLiquidStake: sdk.NewInt(5), + totalStake: sdk.NewInt(95), + newLiquidStake: sdk.NewInt(1), + tokenizingShares: false, + expectedExceeds: false, + }, + { + // Cap: 10% - Native Delegation - Delegation At Threshold + // Total Liquid Stake: 5, Total Stake: 95, New Liquid Stake: 5 + // => Total Liquid Stake: 5+5=10, Total Stake: 95+5=100 => 10/100 = 10% == 10% cap + name: "10 percent cap _ native delegation _ delegation equals cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.1"), + totalLiquidStake: sdk.NewInt(5), + totalStake: sdk.NewInt(95), + newLiquidStake: sdk.NewInt(5), + tokenizingShares: false, + expectedExceeds: false, + }, + { + // Cap: 10% - Native Delegation - Delegation Exceeds Threshold + // Total Liquid Stake: 5, Total Stake: 95, New Liquid Stake: 6 + // => Total Liquid Stake: 5+6=11, Total Stake: 95+6=101 => 11/101 = 11% > 10% cap + name: "10 percent cap _ native delegation _ delegation exceeds cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.1"), + totalLiquidStake: sdk.NewInt(5), + totalStake: sdk.NewInt(95), + newLiquidStake: sdk.NewInt(6), + tokenizingShares: false, + expectedExceeds: true, + }, + { + // Cap: 20% - Native Delegation - Delegation Below Threshold + // Total Liquid Stake: 20, Total Stake: 220, New Liquid Stake: 29 + // => Total Liquid Stake: 20+29=49, Total Stake: 220+29=249 => 49/249 = 19% < 20% cap + name: "20 percent cap _ native delegation _ delegation below cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.20"), + totalLiquidStake: sdk.NewInt(20), + totalStake: sdk.NewInt(220), + newLiquidStake: sdk.NewInt(29), + tokenizingShares: false, + expectedExceeds: false, + }, + { + // Cap: 20% - Native Delegation - Delegation At Threshold + // Total Liquid Stake: 20, Total Stake: 220, New Liquid Stake: 30 + // => Total Liquid Stake: 20+30=50, Total Stake: 220+30=250 => 50/250 = 20% == 20% cap + name: "20 percent cap _ native delegation _ delegation equals cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.20"), + totalLiquidStake: sdk.NewInt(20), + totalStake: sdk.NewInt(220), + newLiquidStake: sdk.NewInt(30), + tokenizingShares: false, + expectedExceeds: false, + }, + { + // Cap: 20% - Native Delegation - Delegation Exceeds Threshold + // Total Liquid Stake: 20, Total Stake: 220, New Liquid Stake: 31 + // => Total Liquid Stake: 20+31=51, Total Stake: 220+31=251 => 51/251 = 21% > 20% cap + name: "20 percent cap _ native delegation _ delegation exceeds cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.20"), + totalLiquidStake: sdk.NewInt(20), + totalStake: sdk.NewInt(220), + newLiquidStake: sdk.NewInt(31), + tokenizingShares: false, + expectedExceeds: true, + }, + { + // Cap: 50% - Native Delegation - Delegation Below Threshold + // Total Liquid Stake: 0, Total Stake: 100, New Liquid Stake: 50 + // => Total Liquid Stake: 0+50=50, Total Stake: 100+50=150 => 50/150 = 33% < 50% cap + name: "50 percent cap _ native delegation _ delegation below cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.5"), + totalLiquidStake: sdk.NewInt(0), + totalStake: sdk.NewInt(100), + newLiquidStake: sdk.NewInt(50), + tokenizingShares: false, + expectedExceeds: false, + }, + { + // Cap: 50% - Tokenized Delegation - Delegation At Threshold + // Total Liquid Stake: 0, Total Stake: 100, New Liquid Stake: 50 + // => 50 / 100 = 50% == 50% cap + name: "50 percent cap _ tokenized delegation _ delegation equals cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.5"), + totalLiquidStake: sdk.NewInt(0), + totalStake: sdk.NewInt(100), + newLiquidStake: sdk.NewInt(50), + tokenizingShares: true, + expectedExceeds: false, + }, + { + // Cap: 50% - Native Delegation - Delegation Below Threshold + // Total Liquid Stake: 0, Total Stake: 100, New Liquid Stake: 51 + // => Total Liquid Stake: 0+51=51, Total Stake: 100+51=151 => 51/151 = 33% < 50% cap + name: "50 percent cap _ native delegation _ delegation below cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.5"), + totalLiquidStake: sdk.NewInt(0), + totalStake: sdk.NewInt(100), + newLiquidStake: sdk.NewInt(51), + tokenizingShares: false, + expectedExceeds: false, + }, + { + // Cap: 50% - Tokenized Delegation - Delegation Exceeds Threshold + // Total Liquid Stake: 0, Total Stake: 100, New Liquid Stake: 51 + // => 51 / 100 = 51% > 50% cap + name: "50 percent cap _ tokenized delegation _delegation exceeds cap", + globalLiquidCap: sdk.MustNewDecFromStr("0.5"), + totalLiquidStake: sdk.NewInt(0), + totalStake: sdk.NewInt(100), + newLiquidStake: sdk.NewInt(51), + tokenizingShares: true, + expectedExceeds: true, + }, + { + // Cap of 0% - everything should exceed + name: "0 percent cap", + globalLiquidCap: sdk.ZeroDec(), + totalLiquidStake: sdk.NewInt(0), + totalStake: sdk.NewInt(1_000_000), + newLiquidStake: sdk.NewInt(1), + tokenizingShares: false, + expectedExceeds: true, + }, + { + // Cap of 100% - nothing should exceed + name: "100 percent cap", + globalLiquidCap: sdk.OneDec(), + totalLiquidStake: sdk.NewInt(1), + totalStake: sdk.NewInt(1), + newLiquidStake: sdk.NewInt(1_000_000), + tokenizingShares: false, + expectedExceeds: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // Update the global liquid staking cap + params := app.StakingKeeper.GetParams(ctx) + params.GlobalLiquidStakingCap = tc.globalLiquidCap + app.StakingKeeper.SetParams(ctx, params) + + // Update the total liquid tokens + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, tc.totalLiquidStake) + + // Fund each pool for the given test case + clearPoolBalance(t, app, ctx) + fundPoolBalance(t, app, ctx, tc.totalStake) + + // Check if the new tokens would exceed the global cap + actualExceeds := app.StakingKeeper.CheckExceedsGlobalLiquidStakingCap(ctx, tc.newLiquidStake, tc.tokenizingShares) + require.Equal(t, tc.expectedExceeds, actualExceeds, tc.name) + }) + } +} + +// Tests SafelyIncreaseTotalLiquidStakedTokens +func TestSafelyIncreaseTotalLiquidStakedTokens(t *testing.T) { + _, app, ctx := createTestInput() + + intitialTotalLiquidStaked := sdk.NewInt(100) + increaseAmount := sdk.NewInt(10) + poolBalance := sdk.NewInt(200) + + // Set the total staked and total liquid staked amounts + // which are required components when checking the global cap + // Total stake is calculated from the pool balance + clearPoolBalance(t, app, ctx) + fundPoolBalance(t, app, ctx, poolBalance) + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, intitialTotalLiquidStaked) + + // Set the global cap such that a small delegation would exceed the cap + params := app.StakingKeeper.GetParams(ctx) + params.GlobalLiquidStakingCap = sdk.MustNewDecFromStr("0.0001") + app.StakingKeeper.SetParams(ctx, params) + + // Attempt to increase the total liquid stake again, it should error since + // the cap was exceeded + err := app.StakingKeeper.SafelyIncreaseTotalLiquidStakedTokens(ctx, increaseAmount, true) + require.ErrorIs(t, err, types.ErrGlobalLiquidStakingCapExceeded) + require.Equal(t, intitialTotalLiquidStaked, app.StakingKeeper.GetTotalLiquidStakedTokens(ctx)) + + // Now relax the cap so that the increase succeeds + params.GlobalLiquidStakingCap = sdk.MustNewDecFromStr("0.99") + app.StakingKeeper.SetParams(ctx, params) + + // Confirm the total increased + err = app.StakingKeeper.SafelyIncreaseTotalLiquidStakedTokens(ctx, increaseAmount, true) + require.NoError(t, err) + require.Equal(t, intitialTotalLiquidStaked.Add(increaseAmount), app.StakingKeeper.GetTotalLiquidStakedTokens(ctx)) +} + +// Tests DecreaseTotalLiquidStakedTokens +func TestDecreaseTotalLiquidStakedTokens(t *testing.T) { + _, app, ctx := createTestInput() + + intitialTotalLiquidStaked := sdk.NewInt(100) + decreaseAmount := sdk.NewInt(10) + + // Set the total liquid staked to an arbitrary value + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, intitialTotalLiquidStaked) + + // Decrease the total liquid stake and confirm the total was updated + err := app.StakingKeeper.DecreaseTotalLiquidStakedTokens(ctx, decreaseAmount) + require.NoError(t, err, "no error expected when decreasing total liquid staked tokens") + require.Equal(t, intitialTotalLiquidStaked.Sub(decreaseAmount), app.StakingKeeper.GetTotalLiquidStakedTokens(ctx)) + + // Attempt to decrease by an excessive amount, it should error + err = app.StakingKeeper.DecreaseTotalLiquidStakedTokens(ctx, intitialTotalLiquidStaked) + require.ErrorIs(t, err, types.ErrTotalLiquidStakedUnderflow) +} + +// Tests CheckExceedsValidatorBondCap +func TestCheckExceedsValidatorBondCap(t *testing.T) { + _, app, ctx := createTestInput() + + testCases := []struct { + name string + validatorShares sdk.Dec + validatorBondFactor sdk.Dec + currentLiquidShares sdk.Dec + newShares sdk.Dec + expectedExceeds bool + }{ + { + // Validator Shares: 100, Factor: 1, Current Shares: 90 => 100 Max Shares, Capacity: 10 + // New Shares: 5 - below cap + name: "factor 1 - below cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(1), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(5), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 1, Current Shares: 90 => 100 Max Shares, Capacity: 10 + // New Shares: 10 - at cap + name: "factor 1 - at cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(1), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(10), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 1, Current Shares: 90 => 100 Max Shares, Capacity: 10 + // New Shares: 15 - above cap + name: "factor 1 - above cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(1), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(15), + expectedExceeds: true, + }, + { + // Validator Shares: 100, Factor: 2, Current Shares: 90 => 200 Max Shares, Capacity: 110 + // New Shares: 5 - below cap + name: "factor 2 - well below cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(2), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(5), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 2, Current Shares: 90 => 200 Max Shares, Capacity: 110 + // New Shares: 100 - below cap + name: "factor 2 - below cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(2), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(100), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 2, Current Shares: 90 => 200 Max Shares, Capacity: 110 + // New Shares: 110 - below cap + name: "factor 2 - at cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(2), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(110), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 2, Current Shares: 90 => 200 Max Shares, Capacity: 110 + // New Shares: 111 - above cap + name: "factor 2 - above cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(2), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(111), + expectedExceeds: true, + }, + { + // Validator Shares: 100, Factor: 100, Current Shares: 90 => 10000 Max Shares, Capacity: 9910 + // New Shares: 100 - below cap + name: "factor 100 - below cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(100), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(100), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 100, Current Shares: 90 => 10000 Max Shares, Capacity: 9910 + // New Shares: 9910 - at cap + name: "factor 100 - at cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(100), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(9910), + expectedExceeds: false, + }, + { + // Validator Shares: 100, Factor: 100, Current Shares: 90 => 10000 Max Shares, Capacity: 9910 + // New Shares: 9911 - above cap + name: "factor 100 - above cap", + validatorShares: sdk.NewDec(100), + validatorBondFactor: sdk.NewDec(100), + currentLiquidShares: sdk.NewDec(90), + newShares: sdk.NewDec(9911), + expectedExceeds: true, + }, + { + // Factor of -1 (disabled): Should always return false + name: "factor disabled", + validatorShares: sdk.NewDec(1), + validatorBondFactor: sdk.NewDec(-1), + currentLiquidShares: sdk.NewDec(1), + newShares: sdk.NewDec(1_000_000), + expectedExceeds: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // Update the validator bond factor + params := app.StakingKeeper.GetParams(ctx) + params.ValidatorBondFactor = tc.validatorBondFactor + app.StakingKeeper.SetParams(ctx, params) + + // Create a validator with designated self-bond shares + validator := types.Validator{ + LiquidShares: tc.currentLiquidShares, + ValidatorBondShares: tc.validatorShares, + } + + // Check whether the cap is exceeded + actualExceeds := app.StakingKeeper.CheckExceedsValidatorBondCap(ctx, validator, tc.newShares) + require.Equal(t, tc.expectedExceeds, actualExceeds, tc.name) + }) + } +} + +// Tests TestCheckExceedsValidatorLiquidStakingCap +func TestCheckExceedsValidatorLiquidStakingCap(t *testing.T) { + _, app, ctx := createTestInput() + + testCases := []struct { + name string + validatorLiquidCap sdk.Dec + validatorLiquidShares sdk.Dec + validatorTotalShares sdk.Dec + newLiquidShares sdk.Dec + expectedExceeds bool + }{ + { + // Cap: 10% - Delegation Below Threshold + // Liquid Shares: 5, Total Shares: 95, New Liquid Shares: 1 + // => Liquid Shares: 5+1=6, Total Shares: 95+1=96 => 6/96 = 6% < 10% cap + name: "10 percent cap _ delegation below cap", + validatorLiquidCap: sdk.MustNewDecFromStr("0.1"), + validatorLiquidShares: sdk.NewDec(5), + validatorTotalShares: sdk.NewDec(95), + newLiquidShares: sdk.NewDec(1), + expectedExceeds: false, + }, + { + // Cap: 10% - Delegation At Threshold + // Liquid Shares: 5, Total Shares: 95, New Liquid Shares: 5 + // => Liquid Shares: 5+5=10, Total Shares: 95+5=100 => 10/100 = 10% == 10% cap + name: "10 percent cap _ delegation equals cap", + validatorLiquidCap: sdk.MustNewDecFromStr("0.1"), + validatorLiquidShares: sdk.NewDec(5), + validatorTotalShares: sdk.NewDec(95), + newLiquidShares: sdk.NewDec(4), + expectedExceeds: false, + }, + { + // Cap: 10% - Delegation Exceeds Threshold + // Liquid Shares: 5, Total Shares: 95, New Liquid Shares: 6 + // => Liquid Shares: 5+6=11, Total Shares: 95+6=101 => 11/101 = 11% > 10% cap + name: "10 percent cap _ delegation exceeds cap", + validatorLiquidCap: sdk.MustNewDecFromStr("0.1"), + validatorLiquidShares: sdk.NewDec(5), + validatorTotalShares: sdk.NewDec(95), + newLiquidShares: sdk.NewDec(6), + expectedExceeds: true, + }, + { + // Cap: 20% - Delegation Below Threshold + // Liquid Shares: 20, Total Shares: 220, New Liquid Shares: 29 + // => Liquid Shares: 20+29=49, Total Shares: 220+29=249 => 49/249 = 19% < 20% cap + name: "20 percent cap _ delegation below cap", + validatorLiquidCap: sdk.MustNewDecFromStr("0.2"), + validatorLiquidShares: sdk.NewDec(20), + validatorTotalShares: sdk.NewDec(220), + newLiquidShares: sdk.NewDec(29), + expectedExceeds: false, + }, + { + // Cap: 20% - Delegation At Threshold + // Liquid Shares: 20, Total Shares: 220, New Liquid Shares: 30 + // => Liquid Shares: 20+30=50, Total Shares: 220+30=250 => 50/250 = 20% == 20% cap + name: "20 percent cap _ delegation equals cap", + validatorLiquidCap: sdk.MustNewDecFromStr("0.2"), + validatorLiquidShares: sdk.NewDec(20), + validatorTotalShares: sdk.NewDec(220), + newLiquidShares: sdk.NewDec(30), + expectedExceeds: false, + }, + { + // Cap: 20% - Delegation Exceeds Threshold + // Liquid Shares: 20, Total Shares: 220, New Liquid Shares: 31 + // => Liquid Shares: 20+31=51, Total Shares: 220+31=251 => 51/251 = 21% > 20% cap + name: "20 percent cap _ delegation exceeds cap", + validatorLiquidCap: sdk.MustNewDecFromStr("0.2"), + validatorLiquidShares: sdk.NewDec(20), + validatorTotalShares: sdk.NewDec(220), + newLiquidShares: sdk.NewDec(31), + expectedExceeds: true, + }, + { + // Cap of 0% - everything should exceed + name: "0 percent cap", + validatorLiquidCap: sdk.ZeroDec(), + validatorLiquidShares: sdk.NewDec(0), + validatorTotalShares: sdk.NewDec(1_000_000), + newLiquidShares: sdk.NewDec(1), + expectedExceeds: true, + }, + { + // Cap of 100% - nothing should exceed + name: "100 percent cap", + validatorLiquidCap: sdk.OneDec(), + validatorLiquidShares: sdk.NewDec(1), + validatorTotalShares: sdk.NewDec(1_000_000), + newLiquidShares: sdk.NewDec(1), + expectedExceeds: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // Update the validator liquid staking cap + params := app.StakingKeeper.GetParams(ctx) + params.ValidatorLiquidStakingCap = tc.validatorLiquidCap + app.StakingKeeper.SetParams(ctx, params) + + // Create a validator with designated self-bond shares + validator := types.Validator{ + LiquidShares: tc.validatorLiquidShares, + DelegatorShares: tc.validatorTotalShares, + } + + // Check whether the cap is exceeded + actualExceeds := app.StakingKeeper.CheckExceedsValidatorLiquidStakingCap(ctx, validator, tc.newLiquidShares) + require.Equal(t, tc.expectedExceeds, actualExceeds, tc.name) + }) + } +} + +// Tests SafelyIncreaseValidatorLiquidShares +func TestSafelyIncreaseValidatorLiquidShares(t *testing.T) { + _, app, ctx := createTestInput() + + // Generate a test validator address + privKey := secp256k1.GenPrivKey() + pubKey := privKey.PubKey() + valAddress := sdk.ValAddress(pubKey.Address()) + + // Helper function to check the validator's liquid shares + checkValidatorLiquidShares := func(expected sdk.Dec, description string) { + actualValidator, found := app.StakingKeeper.GetValidator(ctx, valAddress) + require.True(t, found) + require.Equal(t, expected.TruncateInt64(), actualValidator.LiquidShares.TruncateInt64(), description) + } + + // Start with the following: + // Initial Liquid Shares: 0 + // Validator Bond Shares: 10 + // Validator TotalShares: 75 + // + // Initial Caps: + // ValidatorBondFactor: 1 (Cap applied at 10 shares) + // ValidatorLiquidStakingCap: 25% (Cap applied at 25 shares) + // + // Cap Increases: + // ValidatorBondFactor: 10 (Cap applied at 100 shares) + // ValidatorLiquidStakingCap: 40% (Cap applied at 50 shares) + initialLiquidShares := sdk.NewDec(0) + validatorBondShares := sdk.NewDec(10) + validatorTotalShares := sdk.NewDec(75) + + firstIncreaseAmount := sdk.NewDec(20) + secondIncreaseAmount := sdk.NewDec(40) + + initialBondFactor := sdk.NewDec(1) + finalBondFactor := sdk.NewDec(10) + initialLiquidStakingCap := sdk.MustNewDecFromStr("0.25") + finalLiquidStakingCap := sdk.MustNewDecFromStr("0.4") + + // Create a validator with designated self-bond shares + initialValidator := types.Validator{ + OperatorAddress: valAddress.String(), + LiquidShares: initialLiquidShares, + ValidatorBondShares: validatorBondShares, + DelegatorShares: validatorTotalShares, + } + app.StakingKeeper.SetValidator(ctx, initialValidator) + + // Set validator bond factor to a small number such that any delegation would fail, + // and set the liquid staking cap such that the first stake would succeed, but the second + // would fail + params := app.StakingKeeper.GetParams(ctx) + params.ValidatorBondFactor = initialBondFactor + params.ValidatorLiquidStakingCap = initialLiquidStakingCap + app.StakingKeeper.SetParams(ctx, params) + + // Attempt to increase the validator liquid shares, it should throw an + // error that the validator bond cap was exceeded + err := app.StakingKeeper.SafelyIncreaseValidatorLiquidShares(ctx, initialValidator, firstIncreaseAmount) + require.ErrorIs(t, err, types.ErrInsufficientValidatorBondShares) + checkValidatorLiquidShares(initialLiquidShares, "shares after low bond factor") + + // Change validator bond factor to a more conservative number, so that the increase succeeds + params.ValidatorBondFactor = finalBondFactor + app.StakingKeeper.SetParams(ctx, params) + + // Try the increase again and check that it succeeded + expectedLiquidSharesAfterFirstStake := initialLiquidShares.Add(firstIncreaseAmount) + err = app.StakingKeeper.SafelyIncreaseValidatorLiquidShares(ctx, initialValidator, firstIncreaseAmount) + require.NoError(t, err) + checkValidatorLiquidShares(expectedLiquidSharesAfterFirstStake, "shares with cap loose bond cap") + + // Attempt another increase, it should fail from the liquid staking cap + err = app.StakingKeeper.SafelyIncreaseValidatorLiquidShares(ctx, initialValidator, secondIncreaseAmount) + require.ErrorIs(t, err, types.ErrValidatorLiquidStakingCapExceeded) + checkValidatorLiquidShares(expectedLiquidSharesAfterFirstStake, "shares after liquid staking cap hit") + + // Raise the liquid staking cap so the new increment succeeds + params.ValidatorLiquidStakingCap = finalLiquidStakingCap + app.StakingKeeper.SetParams(ctx, params) + + // Finally confirm that the increase succeeded this time + expectedLiquidSharesAfterSecondStake := initialLiquidShares.Add(secondIncreaseAmount) + err = app.StakingKeeper.SafelyIncreaseValidatorLiquidShares(ctx, initialValidator, secondIncreaseAmount) + require.NoError(t, err, "no error expected after increasing liquid staking cap") + checkValidatorLiquidShares(expectedLiquidSharesAfterSecondStake, "shares after loose liquid stake cap") +} + +// Tests DecreaseValidatorLiquidShares +func TestDecreaseValidatorLiquidShares(t *testing.T) { + _, app, ctx := createTestInput() + + initialLiquidShares := sdk.NewDec(100) + decreaseAmount := sdk.NewDec(10) + + // Create a validator with designated self-bond shares + privKey := secp256k1.GenPrivKey() + pubKey := privKey.PubKey() + valAddress := sdk.ValAddress(pubKey.Address()) + + initialValidator := types.Validator{ + OperatorAddress: valAddress.String(), + LiquidShares: initialLiquidShares, + } + app.StakingKeeper.SetValidator(ctx, initialValidator) + + // Decrease the validator liquid shares, and confirm the new share amount has been updated + err := app.StakingKeeper.DecreaseValidatorLiquidShares(ctx, initialValidator, decreaseAmount) + require.NoError(t, err, "no error expected when decreasing validator liquid shares") + + actualValidator, found := app.StakingKeeper.GetValidator(ctx, valAddress) + require.True(t, found) + require.Equal(t, initialLiquidShares.Sub(decreaseAmount), actualValidator.LiquidShares, "liquid shares") + + // Attempt to decrease by a larger amount than it has, it should fail + err = app.StakingKeeper.DecreaseValidatorLiquidShares(ctx, actualValidator, initialLiquidShares) + require.ErrorIs(t, err, types.ErrValidatorLiquidSharesUnderflow) +} + +// Tests SafelyDecreaseValidatorBond +func TestSafelyDecreaseValidatorBond(t *testing.T) { + _, app, ctx := createTestInput() + + // Initial Bond Factor: 100, Initial Validator Bond: 10 + // => Max Liquid Shares 1000 (Initial Liquid Shares: 200) + initialBondFactor := sdk.NewDec(100) + initialValidatorBondShares := sdk.NewDec(10) + initialLiquidShares := sdk.NewDec(200) + + // Create a validator with designated self-bond shares + privKey := secp256k1.GenPrivKey() + pubKey := privKey.PubKey() + valAddress := sdk.ValAddress(pubKey.Address()) + + initialValidator := types.Validator{ + OperatorAddress: valAddress.String(), + ValidatorBondShares: initialValidatorBondShares, + LiquidShares: initialLiquidShares, + } + app.StakingKeeper.SetValidator(ctx, initialValidator) + + // Set the bond factor + params := app.StakingKeeper.GetParams(ctx) + params.ValidatorBondFactor = initialBondFactor + app.StakingKeeper.SetParams(ctx, params) + + // Decrease the validator bond from 10 to 5 (minus 5) + // This will adjust the cap (factor * shares) + // from (100 * 10 = 1000) to (100 * 5 = 500) + // Since this is still above the initial liquid shares of 200, this will succeed + decreaseAmount, expectedBondShares := sdk.NewDec(5), sdk.NewDec(5) + err := app.StakingKeeper.SafelyDecreaseValidatorBond(ctx, initialValidator, decreaseAmount) + require.NoError(t, err) + + actualValidator, found := app.StakingKeeper.GetValidator(ctx, valAddress) + require.True(t, found) + require.Equal(t, expectedBondShares, actualValidator.ValidatorBondShares, "validator bond shares shares") + + // Now attempt to decrease the validator bond again from 5 to 1 (minus 4) + // This time, the cap will be reduced to (factor * shares) = (100 * 1) = 100 + // However, the liquid shares are currently 200, so this should fail + decreaseAmount, expectedBondShares = sdk.NewDec(4), sdk.NewDec(1) + err = app.StakingKeeper.SafelyDecreaseValidatorBond(ctx, actualValidator, decreaseAmount) + require.ErrorIs(t, err, types.ErrInsufficientValidatorBondShares) + + // Finally, disable the cap and attempt to decrease again + // This time it should succeed + params.ValidatorBondFactor = types.ValidatorBondCapDisabled + app.StakingKeeper.SetParams(ctx, params) + + err = app.StakingKeeper.SafelyDecreaseValidatorBond(ctx, actualValidator, decreaseAmount) + require.NoError(t, err) + + actualValidator, found = app.StakingKeeper.GetValidator(ctx, valAddress) + require.True(t, found) + require.Equal(t, expectedBondShares, actualValidator.ValidatorBondShares, "validator bond shares shares") +} + +// Tests Add/Remove/Get/SetTokenizeSharesLock +func TestTokenizeSharesLock(t *testing.T) { + _, app, ctx := createTestInput() + + addresses := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1)) + addressA, addressB := addresses[0], addresses[1] + + unlocked := types.TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED.String() + locked := types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED.String() + lockExpiring := types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING.String() + + // Confirm both accounts start unlocked + status, _ := app.StakingKeeper.GetTokenizeSharesLock(ctx, addressA) + require.Equal(t, unlocked, status.String(), "addressA unlocked at start") + + status, _ = app.StakingKeeper.GetTokenizeSharesLock(ctx, addressB) + require.Equal(t, unlocked, status.String(), "addressB unlocked at start") + + // Lock the first account + app.StakingKeeper.AddTokenizeSharesLock(ctx, addressA) + + // The first account should now have tokenize shares disabled + // and the unlock time should be the zero time + status, _ = app.StakingKeeper.GetTokenizeSharesLock(ctx, addressA) + require.Equal(t, locked, status.String(), "addressA locked") + + status, _ = app.StakingKeeper.GetTokenizeSharesLock(ctx, addressB) + require.Equal(t, unlocked, status.String(), "addressB still unlocked") + + // Update the lock time and confirm it was set + expectedUnlockTime := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) + app.StakingKeeper.SetTokenizeSharesUnlockTime(ctx, addressA, expectedUnlockTime) + + status, actualUnlockTime := app.StakingKeeper.GetTokenizeSharesLock(ctx, addressA) + require.Equal(t, lockExpiring, status.String(), "addressA lock expiring") + require.Equal(t, expectedUnlockTime, actualUnlockTime, "addressA unlock time") + + // Confirm B is still unlocked + status, _ = app.StakingKeeper.GetTokenizeSharesLock(ctx, addressB) + require.Equal(t, unlocked, status.String(), "addressB still unlocked") + + // Remove the lock + app.StakingKeeper.RemoveTokenizeSharesLock(ctx, addressA) + status, _ = app.StakingKeeper.GetTokenizeSharesLock(ctx, addressA) + require.Equal(t, unlocked, status.String(), "addressA unlocked at end") + + status, _ = app.StakingKeeper.GetTokenizeSharesLock(ctx, addressB) + require.Equal(t, unlocked, status.String(), "addressB unlocked at end") +} + +// Tests GetAllTokenizeSharesLocks +func TestGetAllTokenizeSharesLocks(t *testing.T) { + _, app, ctx := createTestInput() + + addresses := simapp.AddTestAddrs(app, ctx, 4, sdk.NewInt(1)) + + // Set 2 locked accounts, and two accounts with a lock expiring + app.StakingKeeper.AddTokenizeSharesLock(ctx, addresses[0]) + app.StakingKeeper.AddTokenizeSharesLock(ctx, addresses[1]) + + unlockTime1 := time.Date(2023, 1, 1, 1, 0, 0, 0, time.UTC) + unlockTime2 := time.Date(2023, 1, 2, 1, 0, 0, 0, time.UTC) + app.StakingKeeper.SetTokenizeSharesUnlockTime(ctx, addresses[2], unlockTime1) + app.StakingKeeper.SetTokenizeSharesUnlockTime(ctx, addresses[3], unlockTime2) + + // Defined expected locks after GetAll + expectedLocks := map[string]types.TokenizeShareLock{ + addresses[0].String(): { + Status: types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED.String(), + }, + addresses[1].String(): { + Status: types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED.String(), + }, + addresses[2].String(): { + Status: types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING.String(), + CompletionTime: unlockTime1, + }, + addresses[3].String(): { + Status: types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING.String(), + CompletionTime: unlockTime2, + }, + } + + // Check output from GetAll + actualLocks := app.StakingKeeper.GetAllTokenizeSharesLocks(ctx) + require.Len(t, actualLocks, len(expectedLocks), "number of locks") + + for i, actual := range actualLocks { + expected, ok := expectedLocks[actual.Address] + require.True(t, ok, "address %s not expected", actual.Address) + require.Equal(t, expected.Status, actual.Status, "tokenize share lock #%d status", i) + require.Equal(t, expected.CompletionTime, actual.CompletionTime, "tokenize share lock #%d completion time", i) + } +} + +// Test Get/SetPendingTokenizeShareAuthorizations +func TestPendingTokenizeShareAuthorizations(t *testing.T) { + _, app, ctx := createTestInput() + + // Create dummy accounts and completion times + addresses := simapp.AddTestAddrs(app, ctx, 3, sdk.NewInt(1)) + addressStrings := []string{} + for _, address := range addresses { + addressStrings = append(addressStrings, address.String()) + } + + timeA := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) + timeB := timeA.Add(time.Hour) + + // There should be no addresses returned originally + authorizationsA := app.StakingKeeper.GetPendingTokenizeShareAuthorizations(ctx, timeA) + require.Empty(t, authorizationsA.Addresses, "no addresses at timeA expected") + + authorizationsB := app.StakingKeeper.GetPendingTokenizeShareAuthorizations(ctx, timeB) + require.Empty(t, authorizationsB.Addresses, "no addresses at timeB expected") + + // Store addresses for timeB + app.StakingKeeper.SetPendingTokenizeShareAuthorizations(ctx, timeB, types.PendingTokenizeShareAuthorizations{ + Addresses: addressStrings, + }) + + // Check addresses + authorizationsA = app.StakingKeeper.GetPendingTokenizeShareAuthorizations(ctx, timeA) + require.Empty(t, authorizationsA.Addresses, "no addresses at timeA expected at end") + + authorizationsB = app.StakingKeeper.GetPendingTokenizeShareAuthorizations(ctx, timeB) + require.Equal(t, addressStrings, authorizationsB.Addresses, "address length") +} + +// Test QueueTokenizeSharesAuthorization and RemoveExpiredTokenizeShareLocks +func TestTokenizeShareAuthorizationQueue(t *testing.T) { + _, app, ctx := createTestInput() + + // We'll start by adding the following addresses to the queue + // Time 0: [address0] + // Time 1: [] + // Time 2: [address1, address2, address3] + // Time 3: [address4, address5] + // Time 4: [address6] + addresses := simapp.AddTestAddrs(app, ctx, 7, sdk.NewInt(1)) + addressesByTime := map[int][]sdk.AccAddress{ + 0: {addresses[0]}, + 1: {}, + 2: {addresses[1], addresses[2], addresses[3]}, + 3: {addresses[4], addresses[5]}, + 4: {addresses[6]}, + } + + // Set the unbonding time to 1 day + unbondingPeriod := time.Hour * 24 + params := app.StakingKeeper.GetParams(ctx) + params.UnbondingTime = unbondingPeriod + app.StakingKeeper.SetParams(ctx, params) + + // Add each address to the queue and then increment the block time + // such that the times line up as follows + // Time 0: 2023-01-01 00:00:00 + // Time 1: 2023-01-01 00:01:00 + // Time 2: 2023-01-01 00:02:00 + // Time 3: 2023-01-01 00:03:00 + startTime := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) + ctx = ctx.WithBlockTime(startTime) + blockTimeIncrement := time.Hour + + for timeIndex := 0; timeIndex <= 4; timeIndex++ { + for _, address := range addressesByTime[timeIndex] { + app.StakingKeeper.QueueTokenizeSharesAuthorization(ctx, address) + } + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(blockTimeIncrement)) + } + + // We'll unlock the tokens using the following progression + // The "alias'"/keys for these times assume a starting point of the Time 0 + // from above, plus the Unbonding Time + // Time -1 (2023-01-01 23:59:99): [] + // Time 0 (2023-01-02 00:00:00): [address0] + // Time 1 (2023-01-02 00:01:00): [] + // Time 2.5 (2023-01-02 00:02:30): [address1, address2, address3] + // Time 10 (2023-01-02 00:10:00): [address4, address5, address6] + unlockBlockTimes := map[string]time.Time{ + "-1": startTime.Add(unbondingPeriod).Add(-time.Second), + "0": startTime.Add(unbondingPeriod), + "1": startTime.Add(unbondingPeriod).Add(blockTimeIncrement), + "2.5": startTime.Add(unbondingPeriod).Add(2 * blockTimeIncrement).Add(blockTimeIncrement / 2), + "10": startTime.Add(unbondingPeriod).Add(10 * blockTimeIncrement), + } + expectedUnlockedAddresses := map[string][]string{ + "-1": {}, + "0": {addresses[0].String()}, + "1": {}, + "2.5": {addresses[1].String(), addresses[2].String(), addresses[3].String()}, + "10": {addresses[4].String(), addresses[5].String(), addresses[6].String()}, + } + + // Now we'll remove items from the queue sequentially + // First check with a block time before the first expiration - it should remove no addresses + actualAddresses := app.StakingKeeper.RemoveExpiredTokenizeShareLocks(ctx, unlockBlockTimes["-1"]) + require.Equal(t, expectedUnlockedAddresses["-1"], actualAddresses, "no addresses unlocked from time -1") + + // Then pass in (time 0 + unbonding time) - it should remove the first address + actualAddresses = app.StakingKeeper.RemoveExpiredTokenizeShareLocks(ctx, unlockBlockTimes["0"]) + require.Equal(t, expectedUnlockedAddresses["0"], actualAddresses, "one address unlocked from time 0") + + // Now pass in (time 1 + unbonding time) - it should remove no addresses since + // the address at time 0 was already removed + actualAddresses = app.StakingKeeper.RemoveExpiredTokenizeShareLocks(ctx, unlockBlockTimes["1"]) + require.Equal(t, expectedUnlockedAddresses["1"], actualAddresses, "no addresses unlocked from time 1") + + // Now pass in (time 2.5 + unbonding time) - it should remove the three addresses from time 2 + actualAddresses = app.StakingKeeper.RemoveExpiredTokenizeShareLocks(ctx, unlockBlockTimes["2.5"]) + require.Equal(t, expectedUnlockedAddresses["2.5"], actualAddresses, "addresses unlocked from time 2.5") + + // Finally pass in a block time far in the future, which should remove all the remaining locks + actualAddresses = app.StakingKeeper.RemoveExpiredTokenizeShareLocks(ctx, unlockBlockTimes["10"]) + require.Equal(t, expectedUnlockedAddresses["10"], actualAddresses, "addresses unlocked from time 10") +} + +// Test RefreshTotalLiquidStaked +func TestRefreshTotalLiquidStaked(t *testing.T) { + _, app, ctx := createTestInput() + + // Set an arbitrary total liquid staked tokens amount that will get overwritten by the refresh + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, sdk.NewInt(999)) + + // Add validator's with various exchange rates + validators := []types.Validator{ + { + // Exchange rate of 1 + OperatorAddress: "valA", + Tokens: sdk.NewInt(100), + DelegatorShares: sdk.NewDec(100), + LiquidShares: sdk.NewDec(100), // should be overwritten + }, + { + // Exchange rate of 0.9 + OperatorAddress: "valB", + Tokens: sdk.NewInt(90), + DelegatorShares: sdk.NewDec(100), + LiquidShares: sdk.NewDec(200), // should be overwritten + }, + { + // Exchange rate of 0.75 + OperatorAddress: "valC", + Tokens: sdk.NewInt(75), + DelegatorShares: sdk.NewDec(100), + LiquidShares: sdk.NewDec(300), // should be overwritten + }, + } + + // Add various delegations across the above validator's + // Total Liquid Staked: 1,849 + 922 = 2,771 + // Liquid Shares: + // ValA: 400 + 325 = 725 + // ValB: 860 + 580 = 1,440 + // ValC: 900 + 100 = 1,000 + expectedTotalLiquidStaked := int64(2771) + expectedValidatorLiquidShares := map[string]sdk.Dec{ + "valA": sdk.NewDec(725), + "valB": sdk.NewDec(1440), + "valC": sdk.NewDec(1000), + } + + delegations := []struct { + delegation types.Delegation + isLSTP bool + isTokenized bool + }{ + // Delegator A - Not a liquid staking provider + // Number of tokens/shares is irrelevant for this test + { + isLSTP: false, + delegation: types.Delegation{ + DelegatorAddress: "delA", + ValidatorAddress: "valA", + Shares: sdk.NewDec(100), + }, + }, + { + isLSTP: false, + delegation: types.Delegation{ + DelegatorAddress: "delA", + ValidatorAddress: "valB", + Shares: sdk.NewDec(860), + }, + }, + { + isLSTP: false, + delegation: types.Delegation{ + DelegatorAddress: "delA", + ValidatorAddress: "valC", + Shares: sdk.NewDec(750), + }, + }, + // Delegator B - Liquid staking provider, tokens included in total + // Total liquid staked: 400 + 774 + 675 = 1,849 + { + // Shares: 400 shares, Exchange Rate: 1.0, Tokens: 400 + isLSTP: true, + delegation: types.Delegation{ + DelegatorAddress: "delB-LSTP", + ValidatorAddress: "valA", + Shares: sdk.NewDec(400), + }, + }, + { + // Shares: 860 shares, Exchange Rate: 0.9, Tokens: 774 + isLSTP: true, + delegation: types.Delegation{ + DelegatorAddress: "delB-LSTP", + ValidatorAddress: "valB", + Shares: sdk.NewDec(860), + }, + }, + { + // Shares: 900 shares, Exchange Rate: 0.75, Tokens: 675 + isLSTP: true, + delegation: types.Delegation{ + DelegatorAddress: "delB-LSTP", + ValidatorAddress: "valC", + Shares: sdk.NewDec(900), + }, + }, + // Delegator C - Tokenized shares, tokens included in total + // Total liquid staked: 325 + 522 + 75 = 922 + { + // Shares: 325 shares, Exchange Rate: 1.0, Tokens: 325 + isTokenized: true, + delegation: types.Delegation{ + DelegatorAddress: "delC-LSTP", + ValidatorAddress: "valA", + Shares: sdk.NewDec(325), + }, + }, + { + // Shares: 580 shares, Exchange Rate: 0.9, Tokens: 522 + isTokenized: true, + delegation: types.Delegation{ + DelegatorAddress: "delC-LSTP", + ValidatorAddress: "valB", + Shares: sdk.NewDec(580), + }, + }, + { + // Shares: 100 shares, Exchange Rate: 0.75, Tokens: 75 + isTokenized: true, + delegation: types.Delegation{ + DelegatorAddress: "delC-LSTP", + ValidatorAddress: "valC", + Shares: sdk.NewDec(100), + }, + }, + } + + // Create validators based on the above (must use an actual validator address) + addresses := simapp.AddTestAddrsIncremental(app, ctx, 5, app.StakingKeeper.TokensFromConsensusPower(ctx, 300)) + validatorAddresses := map[string]sdk.ValAddress{ + "valA": sdk.ValAddress(addresses[0]), + "valB": sdk.ValAddress(addresses[1]), + "valC": sdk.ValAddress(addresses[2]), + } + for _, validator := range validators { + validator.OperatorAddress = validatorAddresses[validator.OperatorAddress].String() + app.StakingKeeper.SetValidator(ctx, validator) + } + + // Create the delegations based on the above (must use actual delegator addresses) + for _, delegationCase := range delegations { + var delegatorAddress sdk.AccAddress + switch { + case delegationCase.isLSTP: + delegatorAddress = createICAAccount(app, ctx) + case delegationCase.isTokenized: + delegatorAddress = createTokenizeShareModuleAccount(1) + default: + delegatorAddress = createBaseAccount(app, ctx, delegationCase.delegation.DelegatorAddress) + } + + delegation := delegationCase.delegation + delegation.DelegatorAddress = delegatorAddress.String() + delegation.ValidatorAddress = validatorAddresses[delegation.ValidatorAddress].String() + app.StakingKeeper.SetDelegation(ctx, delegation) + } + + // Refresh the total liquid staked and validator liquid shares + err := app.StakingKeeper.RefreshTotalLiquidStaked(ctx) + require.NoError(t, err, "no error expected when refreshing total liquid staked") + + // Check the total liquid staked and liquid shares by validator + actualTotalLiquidStaked := app.StakingKeeper.GetTotalLiquidStakedTokens(ctx) + require.Equal(t, expectedTotalLiquidStaked, actualTotalLiquidStaked.Int64(), "total liquid staked tokens") + + for _, moniker := range []string{"valA", "valB", "valC"} { + address := validatorAddresses[moniker] + expectedLiquidShares := expectedValidatorLiquidShares[moniker] + + actualValidator, found := app.StakingKeeper.GetValidator(ctx, address) + require.True(t, found, "validator %s should have been found after refresh", moniker) + + actualLiquidShares := actualValidator.LiquidShares + require.Equal(t, expectedLiquidShares.TruncateInt64(), actualLiquidShares.TruncateInt64(), + "liquid staked shares for validator %s", moniker) + } +} diff --git a/x/staking/keeper/migrations.go b/x/staking/keeper/migrations.go index 101ca195b390..996b43373d50 100644 --- a/x/staking/keeper/migrations.go +++ b/x/staking/keeper/migrations.go @@ -3,6 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" v043 "github.com/cosmos/cosmos-sdk/x/staking/legacy/v043" + v3 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v3" ) // Migrator is a struct for handling in-place store migrations. @@ -19,3 +20,8 @@ func NewMigrator(keeper Keeper) Migrator { func (m Migrator) Migrate1to2(ctx sdk.Context) error { return v043.MigrateStore(ctx, m.keeper.storeKey) } + +// Migrate2to3 migrates from version 2 to 3. +func (m Migrator) Migrate2to3(ctx sdk.Context) error { + return v3.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc, m.keeper, m.keeper.paramstore) +} diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 3642cef1e5a4..01272557be20 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -2,16 +2,21 @@ package keeper import ( "context" + "fmt" + "strconv" "time" metrics "github.com/armon/go-metrics" - tmstrings "github.com/tendermint/tendermint/libs/strings" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/staking/types" + tmstrings "github.com/tendermint/tendermint/libs/strings" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type msgServer struct { @@ -89,10 +94,11 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa return nil, err } - validator.MinSelfDelegation = msg.MinSelfDelegation - k.SetValidator(ctx, validator) - k.SetValidatorByConsAddr(ctx, validator) + err = k.SetValidatorByConsAddr(ctx, validator) + if err != nil { + return nil, err + } k.SetNewValidatorByPowerIndex(ctx, validator) // call the after-creation hook @@ -155,25 +161,12 @@ func (k msgServer) EditValidator(goCtx context.Context, msg *types.MsgEditValida validator.Commission = commission } - if msg.MinSelfDelegation != nil { - if !msg.MinSelfDelegation.GT(validator.MinSelfDelegation) { - return nil, types.ErrMinSelfDelegationDecreased - } - - if msg.MinSelfDelegation.GT(validator.Tokens) { - return nil, types.ErrSelfDelegationBelowMinimum - } - - validator.MinSelfDelegation = (*msg.MinSelfDelegation) - } - k.SetValidator(ctx, validator) ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeEditValidator, sdk.NewAttribute(types.AttributeKeyCommissionRate, validator.Commission.String()), - sdk.NewAttribute(types.AttributeKeyMinSelfDelegation, validator.MinSelfDelegation.String()), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -210,18 +203,50 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ ) } + tokens := msg.Amount.Amount + + // if this delegation is from a liquid staking provider (identified if the delegator + // is an ICA account), it cannot exceed the global or validator bond cap + if k.DelegatorIsLiquidStaker(delegatorAddress) { + shares, err := validator.SharesFromTokens(tokens) + if err != nil { + return nil, err + } + if err := k.SafelyIncreaseTotalLiquidStakedTokens(ctx, tokens, false); err != nil { + return nil, err + } + if err := k.SafelyIncreaseValidatorLiquidShares(ctx, validator, shares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the validator variable + // since the validator's liquid shares were updated above + validator, found = k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + // NOTE: source funds are always unbonded - newShares, err := k.Keeper.Delegate(ctx, delegatorAddress, msg.Amount.Amount, types.Unbonded, validator, true) + newShares, err := k.Keeper.Delegate(ctx, delegatorAddress, tokens, types.Unbonded, validator, true) if err != nil { return nil, err } - if msg.Amount.Amount.IsInt64() { + // If the delegation is a validator bond, increment the validator bond shares + delegation, found := k.Keeper.GetDelegation(ctx, delegatorAddress, valAddr) + if !found { + return nil, types.ErrNoDelegation + } + if delegation.ValidatorBond { + k.IncreaseValidatorBondShares(ctx, validator, newShares) + } + + if tokens.IsInt64() { defer func() { telemetry.IncrCounter(1, types.ModuleName, "delegate") telemetry.SetGaugeWithLabels( []string{"tx", "msg", msg.Type()}, - float32(msg.Amount.Amount.Int64()), + float32(tokens.Int64()), []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, ) }() @@ -247,21 +272,80 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ // BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRedelegate) (*types.MsgBeginRedelegateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) + valSrcAddr, err := sdk.ValAddressFromBech32(msg.ValidatorSrcAddress) if err != nil { return nil, err } + valDstAddr, err := sdk.ValAddressFromBech32(msg.ValidatorDstAddress) + if err != nil { + return nil, err + } + + srcValidator, found := k.GetValidator(ctx, valSrcAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + dstValidator, found := k.GetValidator(ctx, valDstAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) if err != nil { return nil, err } - shares, err := k.ValidateUnbondAmount( - ctx, delegatorAddress, valSrcAddr, msg.Amount.Amount, - ) + + srcDelegation, found := k.GetDelegation(ctx, delegatorAddress, valSrcAddr) + if !found { + return nil, status.Errorf( + codes.NotFound, + "delegation with delegator %s not found for validator %s", + msg.DelegatorAddress, msg.ValidatorSrcAddress, + ) + } + + srcShares, err := k.ValidateUnbondAmount(ctx, delegatorAddress, valSrcAddr, msg.Amount.Amount) if err != nil { return nil, err } + // If this is a validator self-bond, the new liquid delegation cannot fall below the self-bond * bond factor + // The delegation on the new validator will not a validator bond + if srcDelegation.ValidatorBond { + if err := k.SafelyDecreaseValidatorBond(ctx, srcValidator, srcShares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the srcValidator variable + // since the validator bond shares were updated above + srcValidator, found = k.GetValidator(ctx, valSrcAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + + // If this delegation from a liquid staker, the delegation on the new validator + // cannot exceed that validator's self-bond cap + // The liquid shares from the source validator should get moved to the destination validator + if k.DelegatorIsLiquidStaker(delegatorAddress) { + dstShares, err := dstValidator.SharesFromTokensTruncated(msg.Amount.Amount) + if err != nil { + return nil, err + } + if err := k.SafelyIncreaseValidatorLiquidShares(ctx, dstValidator, dstShares); err != nil { + return nil, err + } + if err := k.DecreaseValidatorLiquidShares(ctx, srcValidator, srcShares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of each validator variable + // since the liquid shares were updated above + srcValidator, found = k.GetValidator(ctx, valSrcAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + bondDenom := k.BondDenom(ctx) if msg.Amount.Denom != bondDenom { return nil, sdkerrors.Wrapf( @@ -269,18 +353,26 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed ) } - valDstAddr, err := sdk.ValAddressFromBech32(msg.ValidatorDstAddress) - if err != nil { - return nil, err - } - completionTime, err := k.BeginRedelegation( - ctx, delegatorAddress, valSrcAddr, valDstAddr, shares, + ctx, delegatorAddress, valSrcAddr, valDstAddr, srcShares, ) if err != nil { return nil, err } + // If the redelegation adds to a validator bond delegation, update the validator's bond shares + dstDelegation, found := k.GetDelegation(ctx, delegatorAddress, valDstAddr) + if !found { + return nil, types.ErrNoDelegation + } + if dstDelegation.ValidatorBond { + dstShares, err := dstValidator.SharesFromTokensTruncated(msg.Amount.Amount) + if err != nil { + return nil, err + } + k.IncreaseValidatorBondShares(ctx, dstValidator, dstShares) + } + if msg.Amount.Amount.IsInt64() { defer func() { telemetry.IncrCounter(1, types.ModuleName, "redelegate") @@ -324,13 +416,59 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( if err != nil { return nil, err } + + tokens := msg.Amount.Amount shares, err := k.ValidateUnbondAmount( - ctx, delegatorAddress, addr, msg.Amount.Amount, + ctx, delegatorAddress, addr, tokens, ) if err != nil { return nil, err } + validator, found := k.GetValidator(ctx, addr) + if !found { + return nil, types.ErrNoValidatorFound + } + + delegation, found := k.GetDelegation(ctx, delegatorAddress, addr) + if !found { + return nil, status.Errorf( + codes.NotFound, + "delegation with delegator %s not found for validator %s", + msg.DelegatorAddress, msg.ValidatorAddress, + ) + } + + // if this is a validator self-bond, the new liquid delegation cannot fall below the self-bond * bond factor + if delegation.ValidatorBond { + if err := k.SafelyDecreaseValidatorBond(ctx, validator, shares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the validator variable + // since the validator bond shares was updated above + validator, found = k.GetValidator(ctx, addr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + + // if this delegation is from a liquid staking provider (identified if the delegator + // is an ICA account), the global and validator liquid totals should be decremented + if k.DelegatorIsLiquidStaker(delegatorAddress) { + if err := k.DecreaseTotalLiquidStakedTokens(ctx, tokens); err != nil { + return nil, err + } + if err := k.DecreaseValidatorLiquidShares(ctx, validator, shares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the validator variable + // since the liquid shares were updated above + validator, found = k.GetValidator(ctx, addr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + bondDenom := k.BondDenom(ctx) if msg.Amount.Denom != bondDenom { return nil, sdkerrors.Wrapf( @@ -343,12 +481,12 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( return nil, err } - if msg.Amount.Amount.IsInt64() { + if tokens.IsInt64() { defer func() { telemetry.IncrCounter(1, types.ModuleName, "undelegate") telemetry.SetGaugeWithLabels( []string{"tx", "msg", msg.Type()}, - float32(msg.Amount.Amount.Int64()), + float32(tokens.Int64()), []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, ) }() @@ -372,3 +510,601 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( CompletionTime: completionTime, }, nil } + +// CancelUnbondingDelegation defines a method for canceling the unbonding delegation +// and delegate back to the validator. +// +// This has been backported from SDK 46 as a desirable safety feature for LSM. +// If a liquid staking provider is exploited and the exploiter initiates an undelegation, +// having access to CancelUnbondingDelegation allows the liquid staking provider to cancel +// the undelegation with a software upgrade and thus avoid loss of user funds +func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *types.MsgCancelUnbondingDelegation) (*types.MsgCancelUnbondingDelegationResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } + + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + + bondDenom := k.BondDenom(ctx) + if msg.Amount.Denom != bondDenom { + return nil, sdkerrors.Wrapf( + sdkerrors.ErrInvalidRequest, "invalid coin denomination: got %s, expected %s", msg.Amount.Denom, bondDenom, + ) + } + + validator, found := k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + // In some situations, the exchange rate becomes invalid, e.g. if + // Validator loses all tokens due to slashing. In this case, + // make all future delegations invalid. + if validator.InvalidExRate() { + return nil, types.ErrDelegatorShareExRateInvalid + } + + if validator.IsJailed() { + return nil, types.ErrValidatorJailed + } + + ubd, found := k.GetUnbondingDelegation(ctx, delegatorAddress, valAddr) + if !found { + return nil, status.Errorf( + codes.NotFound, + "unbonding delegation with delegator %s not found for validator %s", + msg.DelegatorAddress, msg.ValidatorAddress, + ) + } + + // if this undelegation was from a liquid staking provider (identified if the delegator + // is an ICA account), the global and validator liquid totals should be incremented + tokens := msg.Amount.Amount + if k.DelegatorIsLiquidStaker(delegatorAddress) { + shares, err := validator.SharesFromTokens(tokens) + if err != nil { + return nil, err + } + if err := k.SafelyIncreaseTotalLiquidStakedTokens(ctx, tokens, false); err != nil { + return nil, err + } + if err := k.SafelyIncreaseValidatorLiquidShares(ctx, validator, shares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the validator variable + // since the validator's liquid shares were updated above + validator, found = k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + + var ( + unbondEntry types.UnbondingDelegationEntry + unbondEntryIndex int64 = -1 + ) + + for i, entry := range ubd.Entries { + if entry.CreationHeight == msg.CreationHeight { + unbondEntry = entry + unbondEntryIndex = int64(i) + break + } + } + if unbondEntryIndex == -1 { + return nil, sdkerrors.ErrNotFound.Wrapf("unbonding delegation entry is not found at block height %d", msg.CreationHeight) + } + + if unbondEntry.Balance.LT(msg.Amount.Amount) { + return nil, sdkerrors.ErrInvalidRequest.Wrap("amount is greater than the unbonding delegation entry balance") + } + + if unbondEntry.CompletionTime.Before(ctx.BlockTime()) { + return nil, sdkerrors.ErrInvalidRequest.Wrap("unbonding delegation is already processed") + } + + // delegate back the unbonding delegation amount to the validator + newShares, err := k.Keeper.Delegate(ctx, delegatorAddress, msg.Amount.Amount, types.Unbonding, validator, false) + if err != nil { + return nil, err + } + + // If the delegation is a validator bond, increment the validator bond shares + delegation, found := k.Keeper.GetDelegation(ctx, delegatorAddress, valAddr) + if !found { + return nil, types.ErrNoDelegation + } + if delegation.ValidatorBond { + k.IncreaseValidatorBondShares(ctx, validator, newShares) + } + + amount := unbondEntry.Balance.Sub(msg.Amount.Amount) + if amount.IsZero() { + ubd.RemoveEntry(unbondEntryIndex) + } else { + // update the unbondingDelegationEntryBalance and InitialBalance for ubd entry + unbondEntry.Balance = amount + unbondEntry.InitialBalance = unbondEntry.InitialBalance.Sub(msg.Amount.Amount) + ubd.Entries[unbondEntryIndex] = unbondEntry + } + + // set the unbonding delegation or remove it if there are no more entries + if len(ubd.Entries) == 0 { + k.RemoveUnbondingDelegation(ctx, ubd) + } else { + k.SetUnbondingDelegation(ctx, ubd) + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + "cancel_unbonding_delegation", + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Amount.String()), + sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), + sdk.NewAttribute("creation_height", strconv.FormatInt(msg.CreationHeight, 10)), + ), + ) + + return &types.MsgCancelUnbondingDelegationResponse{}, nil +} + +// UnbondValidator defines a method for performing the status transition for +// a validator from bonded to unbonding +// This allows a validator to stop their services and jail themselves without +// experiencing a slash +func (k msgServer) UnbondValidator(goCtx context.Context, msg *types.MsgUnbondValidator) (*types.MsgUnbondValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + return nil, err + } + // validator must already be registered + validator, found := k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + // jail the validator. + k.jailValidator(ctx, validator) + return &types.MsgUnbondValidatorResponse{}, nil +} + +// Tokenizes shares associated with a delegation by creating a tokenize share record +// and returning tokens with a denom of the format {validatorAddress}/{recordId} +func (k msgServer) TokenizeShares(goCtx context.Context, msg *types.MsgTokenizeShares) (*types.MsgTokenizeSharesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + valAddr, valErr := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if valErr != nil { + return nil, valErr + } + validator, found := k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + + // Check if the delegator has disabled tokenization + lockStatus, unlockTime := k.GetTokenizeSharesLock(ctx, delegatorAddress) + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED { + return nil, types.ErrTokenizeSharesDisabledForAccount + } + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING { + return nil, types.ErrTokenizeSharesDisabledForAccount.Wrapf("tokenization will be allowed at %s", unlockTime) + } + + delegation, found := k.GetDelegation(ctx, delegatorAddress, valAddr) + if !found { + return nil, types.ErrNoDelegatorForAddress + } + + if delegation.ValidatorBond { + return nil, types.ErrValidatorBondNotAllowedForTokenizeShare + } + + if msg.Amount.Denom != k.BondDenom(ctx) { + return nil, types.ErrOnlyBondDenomAllowdForTokenize + } + + acc := k.authKeeper.GetAccount(ctx, delegatorAddress) + if acc != nil { + acc, ok := acc.(vesting.VestingAccount) + if ok { + // if account is a vesting account, it checks if free delegation (non-vesting delegation) is not exceeding + // the tokenize share amount and execute further tokenize share process + // tokenize share is reducing unlocked tokens delegation from the vesting account and further process + // is not causing issues + delFree := acc.GetDelegatedFree().AmountOf(msg.Amount.Denom) + if delFree.LT(msg.Amount.Amount) { + return nil, types.ErrExceedingFreeVestingDelegations + } + } + } + + shares, err := k.ValidateUnbondAmount( + ctx, delegatorAddress, valAddr, msg.Amount.Amount, + ) + if err != nil { + return nil, err + } + + // If this tokenization is NOT from a liquid staking provider, + // confirm it does not exceed the global and validator liquid staking cap + // If the tokenization is from a liquid staking provider, + // the shares are already considered liquid and there's no need to increment the totals + if !k.DelegatorIsLiquidStaker(delegatorAddress) { + if err := k.SafelyIncreaseTotalLiquidStakedTokens(ctx, msg.Amount.Amount, true); err != nil { + return nil, err + } + if err := k.SafelyIncreaseValidatorLiquidShares(ctx, validator, shares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the validator variable + // since the validator's liquid shares were updated above + validator, found = k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + + recordID := k.GetLastTokenizeShareRecordID(ctx) + 1 + k.SetLastTokenizeShareRecordID(ctx, recordID) + + record := types.TokenizeShareRecord{ + Id: recordID, + Owner: msg.TokenizedShareOwner, + ModuleAccount: fmt.Sprintf("%s%d", types.TokenizeShareModuleAccountPrefix, recordID), + Validator: msg.ValidatorAddress, + } + + // note: this returnAmount can be slightly off from the original delegation amount if there + // is a decimal to int precision error + returnAmount, err := k.Unbond(ctx, delegatorAddress, valAddr, shares) + if err != nil { + return nil, err + } + + if validator.IsBonded() { + k.bondedTokensToNotBonded(ctx, returnAmount) + } + + // Note: UndelegateCoinsFromModuleToAccount is internally calling TrackUndelegation for vesting account + returnCoin := sdk.NewCoin(k.BondDenom(ctx), returnAmount) + err = k.bankKeeper.UndelegateCoinsFromModuleToAccount(ctx, types.NotBondedPoolName, delegatorAddress, sdk.Coins{returnCoin}) + if err != nil { + return nil, err + } + + // Re-calculate the shares in case there was rounding precision during the undelegation + newShares, err := validator.SharesFromTokens(returnAmount) + if err != nil { + return nil, err + } + + // The share tokens returned maps 1:1 with shares + shareToken := sdk.NewCoin(record.GetShareTokenDenom(), newShares.TruncateInt()) + + err = k.bankKeeper.MintCoins(ctx, minttypes.ModuleName, sdk.Coins{shareToken}) + if err != nil { + return nil, err + } + + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, delegatorAddress, sdk.Coins{shareToken}) + if err != nil { + return nil, err + } + + // create reward ownership record + err = k.AddTokenizeShareRecord(ctx, record) + if err != nil { + return nil, err + } + // send coins to module account + err = k.bankKeeper.SendCoins(ctx, delegatorAddress, record.GetModuleAddress(), sdk.Coins{returnCoin}) + if err != nil { + return nil, err + } + + // Note: it is needed to get latest validator object to get Keeper.Delegate function work properly + validator, found = k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + // delegate from module account + _, err = k.Keeper.Delegate(ctx, record.GetModuleAddress(), returnAmount, types.Unbonded, validator, true) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeTokenizeShares, + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), + sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + sdk.NewAttribute(types.AttributeKeyShareOwner, msg.TokenizedShareOwner), + sdk.NewAttribute(types.AttributeKeyShareRecordID, fmt.Sprintf("%d", record.Id)), + sdk.NewAttribute(types.AttributeKeyAmount, msg.Amount.String()), + ), + ) + + return &types.MsgTokenizeSharesResponse{ + Amount: shareToken, + }, nil +} + +// Converts tokenized shares back into a native delegation +func (k msgServer) RedeemTokensForShares(goCtx context.Context, msg *types.MsgRedeemTokensForShares) (*types.MsgRedeemTokensForSharesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + delegatorAddress, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + + shareToken := msg.Amount + balance := k.bankKeeper.GetBalance(ctx, delegatorAddress, shareToken.Denom) + if balance.Amount.LT(shareToken.Amount) { + return nil, types.ErrNotEnoughBalance + } + + record, err := k.GetTokenizeShareRecordByDenom(ctx, shareToken.Denom) + if err != nil { + return nil, err + } + + valAddr, valErr := sdk.ValAddressFromBech32(record.Validator) + if valErr != nil { + return nil, valErr + } + + validator, found := k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + delegation, found := k.GetDelegation(ctx, record.GetModuleAddress(), valAddr) + if !found { + return nil, types.ErrNoUnbondingDelegation + } + + // Similar to undelegations, if the account is attempting to tokenize the full delegation, + // but there's a precision error due to the decimal to int conversion, round up to the + // full decimal amount before modifying the delegation + shares := shareToken.Amount.ToDec() + if shareToken.Amount.Equal(delegation.Shares.TruncateInt()) { + shares = delegation.Shares + } + tokens := validator.TokensFromShares(shares).TruncateInt() + + // If this redemption is NOT from a liquid staking provider, decrement the total liquid staked + // If the redemption was from a liquid staking provider, the shares are still considered + // liquid, even in their non-tokenized form (since they are owned by a liquid staking provider) + if !k.DelegatorIsLiquidStaker(delegatorAddress) { + if err := k.DecreaseTotalLiquidStakedTokens(ctx, tokens); err != nil { + return nil, err + } + if err := k.DecreaseValidatorLiquidShares(ctx, validator, shares); err != nil { + return nil, err + } + // Note: this is required for downstream uses of the validator variable + // since the liquid shares were updated above + validator, found = k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + } + + returnAmount, err := k.Unbond(ctx, record.GetModuleAddress(), valAddr, shares) + if err != nil { + return nil, err + } + + if validator.IsBonded() { + k.bondedTokensToNotBonded(ctx, returnAmount) + } + + // Note: since delegation object has been changed from unbond call, it gets latest delegation + _, found = k.GetDelegation(ctx, record.GetModuleAddress(), valAddr) + if !found { + if k.hooks != nil { + if err := k.hooks.BeforeTokenizeShareRecordRemoved(ctx, record.Id); err != nil { + return nil, err + } + } + err = k.DeleteTokenizeShareRecord(ctx, record.Id) + if err != nil { + return nil, err + } + } + + // send share tokens to NotBondedPool and burn + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, delegatorAddress, types.NotBondedPoolName, sdk.Coins{shareToken}) + if err != nil { + return nil, err + } + err = k.bankKeeper.BurnCoins(ctx, types.NotBondedPoolName, sdk.Coins{shareToken}) + if err != nil { + return nil, err + } + + // send equivalent amount of tokens to the delegator + returnCoin := sdk.NewCoin(k.BondDenom(ctx), returnAmount) + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.NotBondedPoolName, delegatorAddress, sdk.Coins{returnCoin}) + if err != nil { + return nil, err + } + + // Note: it is needed to get latest validator object to get Keeper.Delegate function work properly + validator, found = k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + // convert the share tokens to delegated status + // Note: Delegate(substractAccount => true) -> DelegateCoinsFromAccountToModule -> TrackDelegation for vesting account + _, err = k.Keeper.Delegate(ctx, delegatorAddress, returnAmount, types.Unbonded, validator, true) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeRedeemShares, + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), + sdk.NewAttribute(types.AttributeKeyValidator, validator.OperatorAddress), + sdk.NewAttribute(types.AttributeKeyAmount, shareToken.String()), + ), + ) + + return &types.MsgRedeemTokensForSharesResponse{ + Amount: returnCoin, + }, nil +} + +// Transfers the ownership of rewards associated with a tokenize share record +func (k msgServer) TransferTokenizeShareRecord(goCtx context.Context, msg *types.MsgTransferTokenizeShareRecord) (*types.MsgTransferTokenizeShareRecordResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + record, err := k.GetTokenizeShareRecord(ctx, msg.TokenizeShareRecordId) + if err != nil { + return nil, types.ErrTokenizeShareRecordNotExists + } + + if record.Owner != msg.Sender { + return nil, types.ErrNotTokenizeShareRecordOwner + } + + // Remove old account reference + oldOwner, err := sdk.AccAddressFromBech32(record.Owner) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress + } + k.deleteTokenizeShareRecordWithOwner(ctx, oldOwner, record.Id) + + record.Owner = msg.NewOwner + k.setTokenizeShareRecord(ctx, record) + + // Set new account reference + newOwner, err := sdk.AccAddressFromBech32(record.Owner) + if err != nil { + return nil, sdkerrors.ErrInvalidAddress + } + k.setTokenizeShareRecordWithOwner(ctx, newOwner, record.Id) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeTransferTokenizeShareRecord, + sdk.NewAttribute(types.AttributeKeyShareRecordID, fmt.Sprintf("%d", msg.TokenizeShareRecordId)), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), + sdk.NewAttribute(types.AttributeKeyShareOwner, msg.NewOwner), + ), + ) + + return &types.MsgTransferTokenizeShareRecordResponse{}, nil +} + +// DisableTokenizeShares prevents an address from tokenizing any of their delegations +func (k msgServer) DisableTokenizeShares(goCtx context.Context, msg *types.MsgDisableTokenizeShares) (*types.MsgDisableTokenizeSharesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + delegator := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) + + // If tokenized shares is already disabled, alert the user + lockStatus, completionTime := k.GetTokenizeSharesLock(ctx, delegator) + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED { + return nil, types.ErrTokenizeSharesAlreadyDisabledForAccount + } + + // If the tokenized shares lock is expiring, remove the pending unlock from the queue + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING { + k.CancelTokenizeShareLockExpiration(ctx, delegator, completionTime) + } + + // Create a new tokenization lock for the user + // Note: if there is a lock expiration in progress, this will override the expiration + k.AddTokenizeSharesLock(ctx, delegator) + + return &types.MsgDisableTokenizeSharesResponse{}, nil +} + +// EnableTokenizeShares begins the countdown after which tokenizing shares by the +// sender address is re-allowed, which will complete after the unbonding period +func (k msgServer) EnableTokenizeShares(goCtx context.Context, msg *types.MsgEnableTokenizeShares) (*types.MsgEnableTokenizeSharesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + delegator := sdk.MustAccAddressFromBech32(msg.DelegatorAddress) + + // If tokenized shares aren't current disabled, alert the user + lockStatus, unlockTime := k.GetTokenizeSharesLock(ctx, delegator) + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED { + return nil, types.ErrTokenizeSharesAlreadyEnabledForAccount + } + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING { + return nil, types.ErrTokenizeSharesAlreadyEnabledForAccount.Wrapf( + "tokenize shares re-enablement already in progress, ending at %s", unlockTime) + } + + // Otherwise queue the unlock + completionTime := k.QueueTokenizeSharesAuthorization(ctx, delegator) + + return &types.MsgEnableTokenizeSharesResponse{CompletionTime: completionTime}, nil +} + +// Designates a delegation as a validator bond +// This enables the validator to receive more liquid staking delegations +func (k msgServer) ValidatorBond(goCtx context.Context, msg *types.MsgValidatorBond) (*types.MsgValidatorBondResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + delAddr, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + return nil, err + } + + valAddr, valErr := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if valErr != nil { + return nil, valErr + } + + validator, found := k.GetValidator(ctx, valAddr) + if !found { + return nil, types.ErrNoValidatorFound + } + + delegation, found := k.GetDelegation(ctx, delAddr, valAddr) + if !found { + return nil, types.ErrNoDelegation + } + + // liquid staking providers should not be able to validator bond + if k.DelegatorIsLiquidStaker(delAddr) { + return nil, types.ErrValidatorBondNotAllowedFromModuleAccount + } + + if !delegation.ValidatorBond { + delegation.ValidatorBond = true + k.SetDelegation(ctx, delegation) + validator.ValidatorBondShares = validator.ValidatorBondShares.Add(delegation.Shares) + k.SetValidator(ctx, validator) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeValidatorBondDelegation, + sdk.NewAttribute(types.AttributeKeyDelegator, msg.DelegatorAddress), + sdk.NewAttribute(types.AttributeKeyValidator, msg.ValidatorAddress), + ), + ) + } + + return &types.MsgValidatorBondResponse{}, nil +} diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go new file mode 100644 index 000000000000..0e3e09da19e6 --- /dev/null +++ b/x/staking/keeper/msg_server_test.go @@ -0,0 +1,1508 @@ +package keeper_test + +import ( + "fmt" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + + simapp "github.com/cosmos/cosmos-sdk/simapp" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/staking/teststaking" + "github.com/cosmos/cosmos-sdk/x/staking/types" + sdkstaking "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" +) + +func TestTokenizeSharesAndRedeemTokens(t *testing.T) { + _, app, ctx := createTestInput() + + liquidStakingCapStrict := sdk.ZeroDec() + liquidStakingCapConservative := sdk.MustNewDecFromStr("0.8") + liquidStakingCapDisabled := sdk.OneDec() + + validatorBondStrict := sdk.OneDec() + validatorBondConservative := sdk.NewDec(10) + validatorBondDisabled := sdk.NewDec(-1) + + testCases := []struct { + name string + vestingAmount sdk.Int + delegationAmount sdk.Int + tokenizeShareAmount sdk.Int + redeemAmount sdk.Int + targetVestingDelAfterShare sdk.Int + targetVestingDelAfterRedeem sdk.Int + globalLiquidStakingCap sdk.Dec + slashFactor sdk.Dec + validatorLiquidStakingCap sdk.Dec + validatorBondFactor sdk.Dec + validatorBondDelegation bool + validatorBondDelegatorIndex int + delegatorIsLSTP bool + expTokenizeErr bool + expRedeemErr bool + prevAccountDelegationExists bool + recordAccountDelegationExists bool + }{ + { + name: "full amount tokenize and redeem", + vestingAmount: sdk.NewInt(0), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: false, + recordAccountDelegationExists: false, + }, + { + name: "full amount tokenize and partial redeem", + vestingAmount: sdk.NewInt(0), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: false, + recordAccountDelegationExists: true, + }, + { + name: "partial amount tokenize and full redeem", + vestingAmount: sdk.NewInt(0), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + recordAccountDelegationExists: false, + }, + { + name: "tokenize and redeem with slash", + vestingAmount: sdk.NewInt(0), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.MustNewDecFromStr("0.1"), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: false, + recordAccountDelegationExists: true, + }, + { + name: "over tokenize", + vestingAmount: sdk.NewInt(0), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 30), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: true, + expRedeemErr: false, + }, + { + name: "over redeem", + vestingAmount: sdk.NewInt(0), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 40), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: false, + expRedeemErr: true, + }, + { + name: "vesting account tokenize share failure", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: true, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "vesting account tokenize share success", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: false, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "try tokenize share for a validator-bond delegation", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondConservative, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 1, + expTokenizeErr: true, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "strict validator-bond - tokenization fails", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondStrict, + validatorBondDelegation: false, + expTokenizeErr: true, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "conservative validator-bond - successful tokenization", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondConservative, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "strict global liquid staking cap - tokenization fails", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapStrict, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: true, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "conservative global liquid staking cap - successful tokenization", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapConservative, + validatorLiquidStakingCap: liquidStakingCapDisabled, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "strict validator liquid staking cap - tokenization fails", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapStrict, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: true, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "conservative validator liquid staking cap - successful tokenization", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapDisabled, + validatorLiquidStakingCap: liquidStakingCapConservative, + validatorBondFactor: validatorBondDisabled, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "all caps set conservatively - successful tokenize share", + vestingAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapConservative, + validatorLiquidStakingCap: liquidStakingCapConservative, + validatorBondFactor: validatorBondConservative, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + { + name: "delegator is a liquid staking provider - accounting should not update", + vestingAmount: sdk.ZeroInt(), + delegationAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 20), + tokenizeShareAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + redeemAmount: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterShare: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + targetVestingDelAfterRedeem: app.StakingKeeper.TokensFromConsensusPower(ctx, 10), + slashFactor: sdk.ZeroDec(), + globalLiquidStakingCap: liquidStakingCapConservative, + validatorLiquidStakingCap: liquidStakingCapConservative, + validatorBondFactor: validatorBondConservative, + delegatorIsLSTP: true, + validatorBondDelegation: true, + validatorBondDelegatorIndex: 0, + expTokenizeErr: false, + expRedeemErr: false, + prevAccountDelegationExists: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, app, ctx = createTestInput() + addrs := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) + addrAcc1, addrAcc2 := addrs[0], addrs[1] + addrVal1, addrVal2 := sdk.ValAddress(addrAcc1), sdk.ValAddress(addrAcc2) + + // Create ICA module account + icaAccountAddress := createICAAccount(app, ctx) + + // Fund module account + delegationCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), tc.delegationAmount) + err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, sdk.NewCoins(delegationCoin)) + require.NoError(t, err) + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, icaAccountAddress, sdk.NewCoins(delegationCoin)) + require.NoError(t, err) + + // set the delegator address depending on whether the delegator should be a liquid staking provider + delegatorAccount := addrAcc2 + if tc.delegatorIsLSTP { + delegatorAccount = icaAccountAddress + } + + // set validator bond factor and global liquid staking cap + params := app.StakingKeeper.GetParams(ctx) + params.ValidatorBondFactor = tc.validatorBondFactor + params.GlobalLiquidStakingCap = tc.globalLiquidStakingCap + params.ValidatorLiquidStakingCap = tc.validatorLiquidStakingCap + app.StakingKeeper.SetParams(ctx, params) + + // set the total liquid staked tokens + app.StakingKeeper.SetTotalLiquidStakedTokens(ctx, sdk.ZeroInt()) + + if !tc.vestingAmount.IsZero() { + // create vesting account + pubkey := secp256k1.GenPrivKey().PubKey() + baseAcc := authtypes.NewBaseAccount(addrAcc2, pubkey, 0, 0) + initialVesting := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, tc.vestingAmount)) + baseVestingWithCoins := vestingtypes.NewBaseVestingAccount(baseAcc, initialVesting, ctx.BlockTime().Unix()+86400*365) + delayedVestingAccount := vestingtypes.NewDelayedVestingAccountRaw(baseVestingWithCoins) + app.AccountKeeper.SetAccount(ctx, delayedVestingAccount) + } + + pubKeys := simapp.CreateTestPubKeys(2) + pk1, pk2 := pubKeys[0], pubKeys[1] + + // Create Validators and Delegation + val1 := teststaking.NewValidator(t, addrVal1, pk1) + val1.Status = sdkstaking.Bonded + app.StakingKeeper.SetValidator(ctx, val1) + app.StakingKeeper.SetValidatorByPowerIndex(ctx, val1) + err = app.StakingKeeper.SetValidatorByConsAddr(ctx, val1) + require.NoError(t, err) + + val2 := teststaking.NewValidator(t, addrVal2, pk2) + val2.Status = sdkstaking.Bonded + app.StakingKeeper.SetValidator(ctx, val2) + app.StakingKeeper.SetValidatorByPowerIndex(ctx, val2) + err = app.StakingKeeper.SetValidatorByConsAddr(ctx, val2) + require.NoError(t, err) + + // Delegate from both the main delegator as well as a random account so there is a + // non-zero delegation after redemption + err = delegateCoinsFromAccount(ctx, app, delegatorAccount, tc.delegationAmount, val1) + require.NoError(t, err) + + // apply TM updates + applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) + + _, found := app.StakingKeeper.GetDelegation(ctx, delegatorAccount, addrVal1) + require.True(t, found, "delegation not found after delegate") + + lastRecordID := app.StakingKeeper.GetLastTokenizeShareRecordID(ctx) + oldValidator, found := app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + if tc.validatorBondDelegation { + err := delegateCoinsFromAccount(ctx, app, addrs[tc.validatorBondDelegatorIndex], tc.delegationAmount, val1) + require.NoError(t, err) + _, err = msgServer.ValidatorBond(sdk.WrapSDKContext(ctx), &types.MsgValidatorBond{ + DelegatorAddress: addrs[tc.validatorBondDelegatorIndex].String(), + ValidatorAddress: addrVal1.String(), + }) + require.NoError(t, err) + } + + resp, err := msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &types.MsgTokenizeShares{ + DelegatorAddress: delegatorAccount.String(), + ValidatorAddress: addrVal1.String(), + Amount: sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), tc.tokenizeShareAmount), + TokenizedShareOwner: delegatorAccount.String(), + }) + if tc.expTokenizeErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + // check last record id increase + require.Equal(t, lastRecordID+1, app.StakingKeeper.GetLastTokenizeShareRecordID(ctx)) + + // ensure validator's total tokens is consistent + newValidator, found := app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + require.Equal(t, oldValidator.Tokens, newValidator.Tokens) + + // if the delegator was not a provider, check that the total liquid staked and validator liquid shares increased + totalLiquidTokensAfterTokenization := app.StakingKeeper.GetTotalLiquidStakedTokens(ctx) + validatorLiquidSharesAfterTokenization := newValidator.LiquidShares + if !tc.delegatorIsLSTP { + require.Equal(t, tc.tokenizeShareAmount.String(), totalLiquidTokensAfterTokenization.String(), "total liquid tokens after tokenization") + require.Equal(t, tc.tokenizeShareAmount.String(), validatorLiquidSharesAfterTokenization.TruncateInt().String(), "validator liquid shares after tokenization") + } else { + require.True(t, totalLiquidTokensAfterTokenization.IsZero(), "zero liquid tokens after tokenization") + require.True(t, validatorLiquidSharesAfterTokenization.IsZero(), "zero liquid validator shares after tokenization") + } + + if tc.vestingAmount.IsPositive() { + acc := app.AccountKeeper.GetAccount(ctx, addrAcc2) + vestingAcc := acc.(vesting.VestingAccount) + require.Equal(t, vestingAcc.GetDelegatedVesting().AmountOf(app.StakingKeeper.BondDenom(ctx)).String(), tc.targetVestingDelAfterShare.String()) + } + + if tc.prevAccountDelegationExists { + _, found = app.StakingKeeper.GetDelegation(ctx, delegatorAccount, addrVal1) + require.True(t, found, "delegation found after partial tokenize share") + } else { + _, found = app.StakingKeeper.GetDelegation(ctx, delegatorAccount, addrVal1) + require.False(t, found, "delegation found after full tokenize share") + } + + shareToken := app.BankKeeper.GetBalance(ctx, delegatorAccount, resp.Amount.Denom) + require.Equal(t, resp.Amount, shareToken) + _, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found, true, "validator not found") + + records := app.StakingKeeper.GetAllTokenizeShareRecords(ctx) + require.Len(t, records, 1) + delegation, found := app.StakingKeeper.GetDelegation(ctx, records[0].GetModuleAddress(), addrVal1) + require.True(t, found, "delegation not found from tokenize share module account after tokenize share") + + // slash before redeem + slashedTokens := sdk.ZeroInt() + redeemedShares := tc.redeemAmount + redeemedTokens := tc.redeemAmount + if tc.slashFactor.IsPositive() { + consAddr, err := val1.GetConsAddr() + require.NoError(t, err) + ctx = ctx.WithBlockHeight(100) + val1, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + power := app.StakingKeeper.TokensToConsensusPower(ctx, val1.Tokens) + app.StakingKeeper.Slash(ctx, consAddr, 10, power, tc.slashFactor, 0) + slashedTokens = sdk.NewDecFromInt(val1.Tokens).Mul(tc.slashFactor).TruncateInt() + + val1, _ := app.StakingKeeper.GetValidator(ctx, addrVal1) + redeemedTokens = val1.TokensFromShares(sdk.NewDecFromInt(redeemedShares)).TruncateInt() + } + + // get deletagor balance and delegation + bondDenomAmountBefore := app.BankKeeper.GetBalance(ctx, delegatorAccount, app.StakingKeeper.BondDenom(ctx)) + val1, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + delegation, found = app.StakingKeeper.GetDelegation(ctx, delegatorAccount, addrVal1) + if !found { + delegation = types.Delegation{Shares: sdk.ZeroDec()} + } + delAmountBefore := val1.TokensFromShares(delegation.Shares) + oldValidator, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &types.MsgRedeemTokensForShares{ + DelegatorAddress: delegatorAccount.String(), + Amount: sdk.NewCoin(resp.Amount.Denom, tc.redeemAmount), + }) + if tc.expRedeemErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + // ensure validator's total tokens is consistent + newValidator, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + require.Equal(t, oldValidator.Tokens, newValidator.Tokens) + + // if the delegator was not a liuqid staking provider, check that the total liquid staked + // and liquid shares decreased + totalLiquidTokensAfterRedemption := app.StakingKeeper.GetTotalLiquidStakedTokens(ctx) + validatorLiquidSharesAfterRedemption := newValidator.LiquidShares + expectedLiquidTokens := totalLiquidTokensAfterTokenization.Sub(redeemedTokens).Sub(slashedTokens) + expectedLiquidShares := validatorLiquidSharesAfterTokenization.Sub(sdk.NewDecFromInt(redeemedShares)) + if !tc.delegatorIsLSTP { + require.Equal(t, expectedLiquidTokens.String(), totalLiquidTokensAfterRedemption.String(), "total liquid tokens after redemption") + require.Equal(t, expectedLiquidShares.String(), validatorLiquidSharesAfterRedemption.String(), "validator liquid shares after tokenization") + } else { + require.True(t, totalLiquidTokensAfterRedemption.IsZero(), "zero liquid tokens after redemption") + require.True(t, validatorLiquidSharesAfterRedemption.IsZero(), "zero liquid validator shares after redemption") + } + + if tc.vestingAmount.IsPositive() { + acc := app.AccountKeeper.GetAccount(ctx, addrAcc2) + vestingAcc := acc.(vesting.VestingAccount) + require.Equal(t, vestingAcc.GetDelegatedVesting().AmountOf(app.StakingKeeper.BondDenom(ctx)).String(), tc.targetVestingDelAfterRedeem.String()) + } + + expectedDelegatedShares := sdk.NewDecFromInt(tc.delegationAmount.Sub(tc.tokenizeShareAmount).Add(tc.redeemAmount)) + delegation, found = app.StakingKeeper.GetDelegation(ctx, delegatorAccount, addrVal1) + require.True(t, found, "delegation not found after redeem tokens") + require.Equal(t, delegatorAccount.String(), delegation.DelegatorAddress) + require.Equal(t, addrVal1.String(), delegation.ValidatorAddress) + require.Equal(t, expectedDelegatedShares, delegation.Shares, "delegation shares after redeem") + + // check delegator balance is not changed + bondDenomAmountAfter := app.BankKeeper.GetBalance(ctx, delegatorAccount, app.StakingKeeper.BondDenom(ctx)) + require.Equal(t, bondDenomAmountAfter.Amount.String(), bondDenomAmountBefore.Amount.String()) + + // get delegation amount is changed correctly + val1, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + delegation, found = app.StakingKeeper.GetDelegation(ctx, delegatorAccount, addrVal1) + if !found { + delegation = types.Delegation{Shares: sdk.ZeroDec()} + } + delAmountAfter := val1.TokensFromShares(delegation.Shares) + require.Equal(t, delAmountAfter.String(), delAmountBefore.Add(sdk.NewDecFromInt(tc.redeemAmount).Mul(sdk.OneDec().Sub(tc.slashFactor))).String()) + + shareToken = app.BankKeeper.GetBalance(ctx, delegatorAccount, resp.Amount.Denom) + require.Equal(t, shareToken.Amount.String(), tc.tokenizeShareAmount.Sub(tc.redeemAmount).String()) + _, found = app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found, true, "validator not found") + + if tc.recordAccountDelegationExists { + _, found = app.StakingKeeper.GetDelegation(ctx, records[0].GetModuleAddress(), addrVal1) + require.True(t, found, "delegation not found from tokenize share module account after redeem partial amount") + + records = app.StakingKeeper.GetAllTokenizeShareRecords(ctx) + require.Len(t, records, 1) + } else { + _, found = app.StakingKeeper.GetDelegation(ctx, records[0].GetModuleAddress(), addrVal1) + require.False(t, found, "delegation found from tokenize share module account after redeem full amount") + + records = app.StakingKeeper.GetAllTokenizeShareRecords(ctx) + require.Len(t, records, 0) + } + }) + } +} + +// Helper function to setup a delegator and validator for the Tokenize/Redeem conversion tests +func setupTestTokenizeAndRedeemConversion( + t *testing.T, + app *simapp.SimApp, + ctx sdk.Context, +) (delAddress sdk.AccAddress, valAddress sdk.ValAddress) { + addresses := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1_000_000)) + pubKeys := simapp.CreateTestPubKeys(1) + + delegatorAddress := addresses[0] + validatorAddress := sdk.ValAddress(addresses[1]) + + validator := teststaking.NewValidator(t, validatorAddress, pubKeys[0]) + validator.DelegatorShares = sdk.NewDec(1_000_000) + validator.Tokens = sdk.NewInt(1_000_000) + validator.LiquidShares = sdk.NewDec(0) + validator.Status = types.Bonded + + app.StakingKeeper.SetValidator(ctx, validator) + app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) + + return delegatorAddress, validatorAddress +} + +// Simulate a slash by decrementing the validator's tokens +// We'll do this in a way such that the exchange rate is not an even integer +// and the shares associated with a delegation will have a long decimal +func simulateSlashWithImprecision(t *testing.T, app *simapp.SimApp, ctx sdk.Context, valAddress sdk.ValAddress) { + validator, found := app.StakingKeeper.GetValidator(ctx, valAddress) + require.True(t, found) + + slashMagnitude := sdk.MustNewDecFromStr("0.1111111111") + slashTokens := validator.Tokens.ToDec().Mul(slashMagnitude).TruncateInt() + validator.Tokens = validator.Tokens.Sub(slashTokens) + + app.StakingKeeper.SetValidator(ctx, validator) +} + +// Tests the conversion from tokenization and redemption from the following scenario: +// Slash -> Delegate -> Tokenize -> Redeem +// Note, in this example, there 2 tokens are lost during the decimal to int conversion +// during the unbonding step within tokenization and redemption +func TestTokenizeAndRedeemConversion_SlashBeforeDelegation(t *testing.T) { + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + delegatorAddress, validatorAddress := setupTestTokenizeAndRedeemConversion(t, app, ctx) + + // slash the validator + simulateSlashWithImprecision(t, app, ctx, validatorAddress) + validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found) + + // Delegate and confirm the delegation record was created + delegateAmount := sdk.NewInt(1000) + delegateCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegateAmount) + _, err := msgServer.Delegate(sdk.WrapSDKContext(ctx), &types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + }) + require.NoError(t, err, "no error expected when delegating") + + delegation, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found, "delegation should have been found") + + // Tokenize the full delegation amount + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &types.MsgTokenizeShares{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + TokenizedShareOwner: delegatorAddress.String(), + }) + require.NoError(t, err, "no error expected when tokenizing") + + // Confirm the number of shareTokens equals the number of shares truncated + // Note: 1 token is lost during unbonding due to rounding + shareDenom := validatorAddress.String() + "/1" + shareToken := app.BankKeeper.GetBalance(ctx, delegatorAddress, shareDenom) + expectedShareTokens := delegation.Shares.TruncateInt().Int64() - 1 // 1 token was lost during unbonding + require.Equal(t, expectedShareTokens, shareToken.Amount.Int64(), "share token amount") + + // Redeem the share tokens + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &types.MsgRedeemTokensForShares{ + DelegatorAddress: delegatorAddress.String(), + Amount: shareToken, + }) + require.NoError(t, err, "no error expected when redeeming") + + // Confirm (almost) the full delegation was recovered - minus the 2 tokens from the precision error + // (1 occurs during tokenization, and 1 occurs during redemption) + newDelegation, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found) + + endDelegationTokens := validator.TokensFromShares(newDelegation.Shares).TruncateInt().Int64() + expectedDelegationTokens := delegateAmount.Int64() - 2 + require.Equal(t, expectedDelegationTokens, endDelegationTokens, "final delegation tokens") +} + +// Tests the conversion from tokenization and redemption from the following scenario: +// Delegate -> Slash -> Tokenize -> Redeem +// Note, in this example, there 1 token lost during the decimal to int conversion +// during the unbonding step within tokenization +func TestTokenizeAndRedeemConversion_SlashBeforeTokenization(t *testing.T) { + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + delegatorAddress, validatorAddress := setupTestTokenizeAndRedeemConversion(t, app, ctx) + + // Delegate and confirm the delegation record was created + delegateAmount := sdk.NewInt(1000) + delegateCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegateAmount) + _, err := msgServer.Delegate(sdk.WrapSDKContext(ctx), &types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + }) + require.NoError(t, err, "no error expected when delegating") + + _, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found, "delegation should have been found") + + // slash the validator + simulateSlashWithImprecision(t, app, ctx, validatorAddress) + validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found) + + // Tokenize the new amount after the slash + delegationAmountAfterSlash := validator.TokensFromShares(delegateAmount.ToDec()).TruncateInt() + tokenizationCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegationAmountAfterSlash) + + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &types.MsgTokenizeShares{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: tokenizationCoin, + TokenizedShareOwner: delegatorAddress.String(), + }) + require.NoError(t, err, "no error expected when tokenizing") + + // The number of share tokens should line up with the **new** number of shares associated + // with the original delegated amount + // Note: 1 token is lost during unbonding due to rounding + shareDenom := validatorAddress.String() + "/1" + shareToken := app.BankKeeper.GetBalance(ctx, delegatorAddress, shareDenom) + expectedShareTokens, err := validator.SharesFromTokens(tokenizationCoin.Amount) + require.Equal(t, expectedShareTokens.TruncateInt().Int64()-1, shareToken.Amount.Int64(), "share token amount") + + // // Redeem the share tokens + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &types.MsgRedeemTokensForShares{ + DelegatorAddress: delegatorAddress.String(), + Amount: shareToken, + }) + require.NoError(t, err, "no error expected when redeeming") + + // Confirm the full tokenization amount was recovered - minus the 1 token from the precision error + newDelegation, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found) + + endDelegationTokens := validator.TokensFromShares(newDelegation.Shares).TruncateInt().Int64() + expectedDelegationTokens := delegationAmountAfterSlash.Int64() - 1 + require.Equal(t, expectedDelegationTokens, endDelegationTokens, "final delegation tokens") +} + +// Tests the conversion from tokenization and redemption from the following scenario: +// Delegate -> Tokenize -> Slash -> Redeem +// Note, in this example, there 1 token lost during the decimal to int conversion +// during the unbonding step within redemption +func TestTokenizeAndRedeemConversion_SlashBeforeRedemptino(t *testing.T) { + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + delegatorAddress, validatorAddress := setupTestTokenizeAndRedeemConversion(t, app, ctx) + + // Delegate and confirm the delegation record was created + delegateAmount := sdk.NewInt(1000) + delegateCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegateAmount) + _, err := msgServer.Delegate(sdk.WrapSDKContext(ctx), &types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + }) + require.NoError(t, err, "no error expected when delegating") + + _, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found, "delegation should have been found") + + // Tokenize the full delegation amount + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &types.MsgTokenizeShares{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + TokenizedShareOwner: delegatorAddress.String(), + }) + require.NoError(t, err, "no error expected when tokenizing") + + // The number of share tokens should line up 1:1 with the number of issued shares + // Since the validator has not been slashed, the shares also line up 1;1 + // with the original delegation amount + shareDenom := validatorAddress.String() + "/1" + shareToken := app.BankKeeper.GetBalance(ctx, delegatorAddress, shareDenom) + expectedShareTokens := delegateAmount + require.Equal(t, expectedShareTokens.Int64(), shareToken.Amount.Int64(), "share token amount") + + // slash the validator + simulateSlashWithImprecision(t, app, ctx, validatorAddress) + validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found) + + // Redeem the share tokens + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &types.MsgRedeemTokensForShares{ + DelegatorAddress: delegatorAddress.String(), + Amount: shareToken, + }) + require.NoError(t, err, "no error expected when redeeming") + + // Confirm the original delegation, minus the slash, was recovered + // There's an additional 1 token lost from precision error during unbonding + delegationAmountAfterSlash := validator.TokensFromShares(delegateAmount.ToDec()).TruncateInt().Int64() + newDelegation, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found) + + endDelegationTokens := validator.TokensFromShares(newDelegation.Shares).TruncateInt().Int64() + require.Equal(t, delegationAmountAfterSlash-1, endDelegationTokens, "final delegation tokens") +} + +func TestTransferTokenizeShareRecord(t *testing.T) { + _, app, ctx := createTestInput() + + addrs := simapp.AddTestAddrs(app, ctx, 3, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) + addrAcc1, addrAcc2, valAcc := addrs[0], addrs[1], addrs[2] + addrVal := sdk.ValAddress(valAcc) + + pubKeys := simapp.CreateTestPubKeys(1) + pk := pubKeys[0] + + val := teststaking.NewValidator(t, addrVal, pk) + app.StakingKeeper.SetValidator(ctx, val) + app.StakingKeeper.SetValidatorByPowerIndex(ctx, val) + + // apply TM updates + applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) + + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + err := app.StakingKeeper.AddTokenizeShareRecord(ctx, types.TokenizeShareRecord{ + Id: 1, + Owner: addrAcc1.String(), + ModuleAccount: "module_account", + Validator: val.String(), + }) + require.NoError(t, err) + + _, err = msgServer.TransferTokenizeShareRecord(sdk.WrapSDKContext(ctx), &types.MsgTransferTokenizeShareRecord{ + TokenizeShareRecordId: 1, + Sender: addrAcc1.String(), + NewOwner: addrAcc2.String(), + }) + require.NoError(t, err) + + record, err := app.StakingKeeper.GetTokenizeShareRecord(ctx, 1) + require.NoError(t, err) + require.Equal(t, record.Owner, addrAcc2.String()) + + records := app.StakingKeeper.GetTokenizeShareRecordsByOwner(ctx, addrAcc1) + require.Len(t, records, 0) + records = app.StakingKeeper.GetTokenizeShareRecordsByOwner(ctx, addrAcc2) + require.Len(t, records, 1) +} + +func TestValidatorBond(t *testing.T) { + _, app, ctx := createTestInput() + + testCases := []struct { + name string + createValidator bool + createDelegation bool + alreadyValidatorBond bool + delegatorIsLSTP bool + expectedErr error + }{ + { + name: "successful validator bond", + createValidator: true, + createDelegation: true, + alreadyValidatorBond: false, + delegatorIsLSTP: false, + }, + { + name: "successful with existing validator bond", + createValidator: true, + createDelegation: true, + alreadyValidatorBond: true, + delegatorIsLSTP: false, + }, + { + name: "validator does not not exist", + createValidator: false, + createDelegation: false, + alreadyValidatorBond: false, + delegatorIsLSTP: false, + expectedErr: sdkstaking.ErrNoValidatorFound, + }, + { + name: "delegation not exist case", + createValidator: true, + createDelegation: false, + alreadyValidatorBond: false, + delegatorIsLSTP: false, + expectedErr: sdkstaking.ErrNoDelegation, + }, + { + name: "delegator is a liquid staking provider", + createValidator: true, + createDelegation: true, + alreadyValidatorBond: false, + delegatorIsLSTP: true, + expectedErr: types.ErrValidatorBondNotAllowedFromModuleAccount, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, app, ctx = createTestInput() + + pubKeys := simapp.CreateTestPubKeys(2) + validatorPubKey := pubKeys[0] + delegatorPubKey := pubKeys[1] + + delegatorAddress := sdk.AccAddress(delegatorPubKey.Address()) + validatorAddress := sdk.ValAddress(validatorPubKey.Address()) + icaAccountAddress := createICAAccount(app, ctx) + + // Set the delegator address to either be a user account or an ICA account depending on the test case + if tc.delegatorIsLSTP { + delegatorAddress = icaAccountAddress + } + + // Fund the delegator + delegationAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 20) + coins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegationAmount)) + + err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, coins) + require.NoError(t, err, "no error expected when minting") + + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, delegatorAddress, coins) + require.NoError(t, err, "no error expected when funding account") + + // Create Validator and delegation + if tc.createValidator { + validator := teststaking.NewValidator(t, validatorAddress, validatorPubKey) + validator.Status = sdkstaking.Bonded + app.StakingKeeper.SetValidator(ctx, validator) + app.StakingKeeper.SetValidatorByPowerIndex(ctx, validator) + err = app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(t, err) + + // Optionally create the delegation, depending on the test case + if tc.createDelegation { + _, err = app.StakingKeeper.Delegate(ctx, delegatorAddress, delegationAmount, sdkstaking.Unbonded, validator, true) + require.NoError(t, err, "no error expected when delegating") + + // Optionally, convert the delegation into a validator bond + if tc.alreadyValidatorBond { + delegation, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found, "delegation should have been found") + + delegation.ValidatorBond = true + app.StakingKeeper.SetDelegation(ctx, delegation) + } + } + } + + // Call ValidatorBond + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + _, err = msgServer.ValidatorBond(sdk.WrapSDKContext(ctx), &types.MsgValidatorBond{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + }) + + if tc.expectedErr != nil { + require.ErrorContains(t, err, tc.expectedErr.Error()) + } else { + require.NoError(t, err, "no error expected from validator bond transaction") + + // check validator bond true + delegation, found := app.StakingKeeper.GetDelegation(ctx, delegatorAddress, validatorAddress) + require.True(t, found, "delegation should have been found after validator bond") + require.True(t, delegation.ValidatorBond, "delegation should be marked as a validator bond") + + // check validator bond shares + validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found, "validator should have been found after validator bond") + + if tc.alreadyValidatorBond { + require.True(t, validator.ValidatorBondShares.IsZero(), "validator bond shares should still be zero") + } else { + require.Equal(t, delegation.Shares.String(), validator.ValidatorBondShares.String(), + "validator total shares should have increased") + } + } + }) + } +} + +func TestChangeValidatorBond(t *testing.T) { + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + checkValidatorBondShares := func(validatorAddress sdk.ValAddress, expectedShares sdk.Int) { + validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found, "validator should have been found") + require.Equal(t, expectedShares.Int64(), validator.ValidatorBondShares.TruncateInt64(), "validator bond shares") + } + + // Create a delegator and 3 validators + addresses := simapp.AddTestAddrs(app, ctx, 4, sdk.NewInt(1_000_000)) + pubKeys := simapp.CreateTestPubKeys(4) + + validatorAPubKey := pubKeys[1] + validatorBPubKey := pubKeys[2] + validatorCPubKey := pubKeys[3] + + delegatorAddress := addresses[0] + validatorAAddress := sdk.ValAddress(validatorAPubKey.Address()) + validatorBAddress := sdk.ValAddress(validatorBPubKey.Address()) + validatorCAddress := sdk.ValAddress(validatorCPubKey.Address()) + + validatorA := teststaking.NewValidator(t, validatorAAddress, validatorAPubKey) + validatorB := teststaking.NewValidator(t, validatorBAddress, validatorBPubKey) + validatorC := teststaking.NewValidator(t, validatorCAddress, validatorCPubKey) + + validatorA.Tokens = sdk.NewInt(1_000_000) + validatorB.Tokens = sdk.NewInt(1_000_000) + validatorC.Tokens = sdk.NewInt(1_000_000) + validatorA.DelegatorShares = sdk.NewDec(1_000_000) + validatorB.DelegatorShares = sdk.NewDec(1_000_000) + validatorC.DelegatorShares = sdk.NewDec(1_000_000) + + app.StakingKeeper.SetValidator(ctx, validatorA) + app.StakingKeeper.SetValidator(ctx, validatorB) + app.StakingKeeper.SetValidator(ctx, validatorC) + + // The test will go through Delegate/Redelegate/Undelegate messages with the following + delegation1Amount := sdk.NewInt(1000) + delegation2Amount := sdk.NewInt(1000) + redelegateAmount := sdk.NewInt(500) + undelegateAmount := sdk.NewInt(500) + + delegate1Coin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegation1Amount) + delegate2Coin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegation2Amount) + redelegateCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), redelegateAmount) + undelegateCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), undelegateAmount) + + // Delegate to validator's A and C - validator bond shares should not change + _, err := msgServer.Delegate(sdk.WrapSDKContext(ctx), &types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAAddress.String(), + Amount: delegate1Coin, + }) + require.NoError(t, err, "no error expected during first delegation") + + _, err = msgServer.Delegate(sdk.WrapSDKContext(ctx), &types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorCAddress.String(), + Amount: delegate1Coin, + }) + require.NoError(t, err, "no error expected during first delegation") + + checkValidatorBondShares(validatorAAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, sdk.ZeroInt()) + + // Flag the the delegations to validator A and C validator bond's + // Their bond shares should increase + _, err = msgServer.ValidatorBond(sdk.WrapSDKContext(ctx), &types.MsgValidatorBond{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAAddress.String(), + }) + require.NoError(t, err, "no error expected during validator bond") + + _, err = msgServer.ValidatorBond(sdk.WrapSDKContext(ctx), &types.MsgValidatorBond{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorCAddress.String(), + }) + require.NoError(t, err, "no error expected during validator bond") + + checkValidatorBondShares(validatorAAddress, delegation1Amount) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, delegation1Amount) + + // Delegate more to validator A - it should increase the validator bond shares + _, err = msgServer.Delegate(sdk.WrapSDKContext(ctx), &types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAAddress.String(), + Amount: delegate2Coin, + }) + require.NoError(t, err, "no error expected during second delegation") + + checkValidatorBondShares(validatorAAddress, delegation1Amount.Add(delegation2Amount)) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, delegation1Amount) + + // Redelegate partially from A to B (where A is a validator bond and B is not) + // It should remove the bond shares from A, and B's validator bond shares should not change + _, err = msgServer.BeginRedelegate(sdk.WrapSDKContext(ctx), &types.MsgBeginRedelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorSrcAddress: validatorAAddress.String(), + ValidatorDstAddress: validatorBAddress.String(), + Amount: redelegateCoin, + }) + require.NoError(t, err, "no error expected during redelegation") + + expectedBondSharesA := delegation1Amount.Add(delegation2Amount).Sub(redelegateAmount) + checkValidatorBondShares(validatorAAddress, expectedBondSharesA) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, delegation1Amount) + + // Now redelegate from B to C (where B is not a validator bond, but C is) + // Validator B's bond shares should remain at zero, but C's bond shares should increase + _, err = msgServer.BeginRedelegate(sdk.WrapSDKContext(ctx), &types.MsgBeginRedelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorSrcAddress: validatorBAddress.String(), + ValidatorDstAddress: validatorCAddress.String(), + Amount: redelegateCoin, + }) + require.NoError(t, err, "no error expected during redelegation") + + checkValidatorBondShares(validatorAAddress, expectedBondSharesA) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, delegation1Amount.Add(redelegateAmount)) + + // Redelegate partially from A to C (where C is a validator bond delegation) + // It should remove the bond shares from A, and increase the bond shares on validator C + _, err = msgServer.BeginRedelegate(sdk.WrapSDKContext(ctx), &types.MsgBeginRedelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorSrcAddress: validatorAAddress.String(), + ValidatorDstAddress: validatorCAddress.String(), + Amount: redelegateCoin, + }) + require.NoError(t, err, "no error expected during redelegation") + + expectedBondSharesA = expectedBondSharesA.Sub(redelegateAmount) + expectedBondSharesC := delegation1Amount.Add(redelegateAmount).Add(redelegateAmount) + checkValidatorBondShares(validatorAAddress, expectedBondSharesA) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, expectedBondSharesC) + + // Undelegate from validator A - it should remove shares + _, err = msgServer.Undelegate(sdk.WrapSDKContext(ctx), &types.MsgUndelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAAddress.String(), + Amount: undelegateCoin, + }) + require.NoError(t, err, "no error expected during undelegation") + + expectedBondSharesA = expectedBondSharesA.Sub(undelegateAmount) + checkValidatorBondShares(validatorAAddress, expectedBondSharesA) + checkValidatorBondShares(validatorBAddress, sdk.ZeroInt()) + checkValidatorBondShares(validatorCAddress, expectedBondSharesC) +} + +func TestEnableDisableTokenizeShares(t *testing.T) { + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + // Create a delegator and validator + stakeAmount := sdk.NewInt(1000) + stakeToken := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), stakeAmount) + + addresses := simapp.AddTestAddrs(app, ctx, 2, stakeAmount) + delegatorAddress := addresses[0] + + pubKeys := simapp.CreateTestPubKeys(1) + validatorAddress := sdk.ValAddress(addresses[1]) + validator := teststaking.NewValidator(t, validatorAddress, pubKeys[0]) + + validator.DelegatorShares = sdk.NewDec(1_000_000) + validator.Tokens = sdk.NewInt(1_000_000) + validator.Status = types.Bonded + app.StakingKeeper.SetValidator(ctx, validator) + + // Fix block time and set unbonding period to 1 day + blockTime := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC) + ctx = ctx.WithBlockTime(blockTime) + + unbondingPeriod := time.Hour * 24 + params := app.StakingKeeper.GetParams(ctx) + params.UnbondingTime = unbondingPeriod + app.StakingKeeper.SetParams(ctx, params) + unlockTime := blockTime.Add(unbondingPeriod) + + // Build test messages (some of which will be reused) + delegateMsg := types.MsgDelegate{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: stakeToken, + } + tokenizeMsg := types.MsgTokenizeShares{ + DelegatorAddress: delegatorAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: stakeToken, + TokenizedShareOwner: delegatorAddress.String(), + } + redeemMsg := types.MsgRedeemTokensForShares{ + DelegatorAddress: delegatorAddress.String(), + } + disableMsg := types.MsgDisableTokenizeShares{ + DelegatorAddress: delegatorAddress.String(), + } + enableMsg := types.MsgEnableTokenizeShares{ + DelegatorAddress: delegatorAddress.String(), + } + + // Delegate normally + _, err := msgServer.Delegate(sdk.WrapSDKContext(ctx), &delegateMsg) + require.NoError(t, err, "no error expected when delegating") + + // Tokenize shares - it should succeed + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &tokenizeMsg) + require.NoError(t, err, "no error expected when tokenizing shares for the first time") + + liquidToken := app.BankKeeper.GetBalance(ctx, delegatorAddress, validatorAddress.String()+"/1") + require.Equal(t, stakeAmount.Int64(), liquidToken.Amount.Int64(), "user received token after tokenizing share") + + // Redeem to remove all tokenized shares + redeemMsg.Amount = liquidToken + _, err = msgServer.RedeemTokensForShares(sdk.WrapSDKContext(ctx), &redeemMsg) + require.NoError(t, err, "no error expected when redeeming") + + // Attempt to enable tokenizing shares when there is no lock in place, it should error + _, err = msgServer.EnableTokenizeShares(sdk.WrapSDKContext(ctx), &enableMsg) + require.ErrorIs(t, err, types.ErrTokenizeSharesAlreadyEnabledForAccount) + + // Attempt to disable when no lock is in place, it should succeed + _, err = msgServer.DisableTokenizeShares(sdk.WrapSDKContext(ctx), &disableMsg) + require.NoError(t, err, "no error expected when disabling tokenization") + + // Disabling again while the lock is already in place, should error + _, err = msgServer.DisableTokenizeShares(sdk.WrapSDKContext(ctx), &disableMsg) + require.ErrorIs(t, err, types.ErrTokenizeSharesAlreadyDisabledForAccount) + + // Attempt to tokenize, it should fail since tokenization is disabled + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &tokenizeMsg) + require.ErrorIs(t, err, types.ErrTokenizeSharesDisabledForAccount) + + // Now enable tokenization + _, err = msgServer.EnableTokenizeShares(sdk.WrapSDKContext(ctx), &enableMsg) + require.NoError(t, err, "no error expected when enabling tokenization") + + // Attempt to tokenize again, it should still fail since the unbonding period has + // not passed and the lock is still active + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &tokenizeMsg) + require.ErrorIs(t, err, types.ErrTokenizeSharesDisabledForAccount) + require.ErrorContains(t, err, fmt.Sprintf("tokenization will be allowed at %s", + blockTime.Add(unbondingPeriod))) + + // Confirm the unlock is queued + authorizations := app.StakingKeeper.GetPendingTokenizeShareAuthorizations(ctx, unlockTime) + require.Equal(t, []string{delegatorAddress.String()}, authorizations.Addresses, + "pending tokenize share authorizations") + + // Disable tokenization again - it should remove the pending record from the queue + _, err = msgServer.DisableTokenizeShares(sdk.WrapSDKContext(ctx), &disableMsg) + require.NoError(t, err, "no error expected when re-enabling tokenization") + + authorizations = app.StakingKeeper.GetPendingTokenizeShareAuthorizations(ctx, unlockTime) + require.Empty(t, authorizations.Addresses, "there should be no pending authorizations in the queue") + + // Enable one more time + _, err = msgServer.EnableTokenizeShares(sdk.WrapSDKContext(ctx), &enableMsg) + require.NoError(t, err, "no error expected when enabling tokenization again") + + // Increment the block time by the unbonding period and remove the expired locks + ctx = ctx.WithBlockTime(unlockTime) + app.StakingKeeper.RemoveExpiredTokenizeShareLocks(ctx, ctx.BlockTime()) + + // Attempt to tokenize again, it should succeed this time since the lock has expired + _, err = msgServer.TokenizeShares(sdk.WrapSDKContext(ctx), &tokenizeMsg) + require.NoError(t, err, "no error expected when tokenizing after lock has expired") +} + +func TestUnbondValidator(t *testing.T) { + _, app, ctx := createTestInput() + addrs := simapp.AddTestAddrs(app, ctx, 2, app.StakingKeeper.TokensFromConsensusPower(ctx, 10000)) + addrAcc1 := addrs[0] + addrVal1 := sdk.ValAddress(addrAcc1) + + pubKeys := simapp.CreateTestPubKeys(1) + pk1 := pubKeys[0] + + // Create Validators and Delegation + val1 := teststaking.NewValidator(t, addrVal1, pk1) + val1.Status = sdkstaking.Bonded + app.StakingKeeper.SetValidator(ctx, val1) + app.StakingKeeper.SetValidatorByPowerIndex(ctx, val1) + err := app.StakingKeeper.SetValidatorByConsAddr(ctx, val1) + require.NoError(t, err) + + // try unbonding not available validator + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + _, err = msgServer.UnbondValidator(sdk.WrapSDKContext(ctx), &types.MsgUnbondValidator{ + ValidatorAddress: sdk.ValAddress(addrs[1]).String(), + }) + require.Error(t, err) + + // unbond validator + _, err = msgServer.UnbondValidator(sdk.WrapSDKContext(ctx), &types.MsgUnbondValidator{ + ValidatorAddress: addrVal1.String(), + }) + require.NoError(t, err) + + // check if validator is jailed + validator, found := app.StakingKeeper.GetValidator(ctx, addrVal1) + require.True(t, found) + require.True(t, validator.Jailed) +} + +// TestICADelegateUndelegate tests that an ICA account can undelegate +// sequentially right after delegating. +func TestICADelegateUndelegate(t *testing.T) { + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + + // Create a delegator and validator (the delegator will be an ICA account) + delegateAmount := sdk.NewInt(1000) + delegateCoin := sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), delegateAmount) + icaAccountAddress := createICAAccount(app, ctx) + + // Fund ICA account + err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, sdk.NewCoins(delegateCoin)) + require.NoError(t, err) + err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, icaAccountAddress, sdk.NewCoins(delegateCoin)) + require.NoError(t, err) + + addresses := simapp.AddTestAddrs(app, ctx, 1, sdk.NewInt(0)) + pubKeys := simapp.CreateTestPubKeys(1) + validatorAddress := sdk.ValAddress(addresses[0]) + validator := teststaking.NewValidator(t, validatorAddress, pubKeys[0]) + + validator.DelegatorShares = sdk.NewDec(1_000_000) + validator.Tokens = sdk.NewInt(1_000_000) + validator.LiquidShares = sdk.NewDec(0) + app.StakingKeeper.SetValidator(ctx, validator) + + delegateMsg := types.MsgDelegate{ + DelegatorAddress: icaAccountAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + } + + undelegateMsg := types.MsgUndelegate{ + DelegatorAddress: icaAccountAddress.String(), + ValidatorAddress: validatorAddress.String(), + Amount: delegateCoin, + } + + // Delegate normally + _, err = msgServer.Delegate(sdk.WrapSDKContext(ctx), &delegateMsg) + require.NoError(t, err, "no error expected when delegating") + + // Confirm delegation record + _, found := app.StakingKeeper.GetDelegation(ctx, icaAccountAddress, validatorAddress) + require.True(t, found, "delegation should have been found") + + // Confirm liquid staking totals were incremented + expectedTotalLiquidStaked := delegateAmount.Int64() + actualTotalLiquidStaked := app.StakingKeeper.GetTotalLiquidStakedTokens(ctx).Int64() + require.Equal(t, expectedTotalLiquidStaked, actualTotalLiquidStaked, "total liquid staked tokens after delegation") + + validator, found = app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found, "validator should have been found") + require.Equal(t, delegateAmount.ToDec(), validator.LiquidShares, "validator liquid shares after delegation") + + // Try to undelegate + _, err = msgServer.Undelegate(sdk.WrapSDKContext(ctx), &undelegateMsg) + require.NoError(t, err, "no error expected when sequentially undelegating") + + // Confirm delegation record was removed + _, found = app.StakingKeeper.GetDelegation(ctx, icaAccountAddress, validatorAddress) + require.False(t, found, "delegation not have been found") + + // Confirm liquid staking totals were decremented + actualTotalLiquidStaked = app.StakingKeeper.GetTotalLiquidStakedTokens(ctx).Int64() + require.Zero(t, actualTotalLiquidStaked, "total liquid staked tokens after undelegation") + + validator, found = app.StakingKeeper.GetValidator(ctx, validatorAddress) + require.True(t, found, "validator should have been found") + require.Equal(t, sdk.ZeroDec(), validator.LiquidShares, "validator liquid shares after undelegation") +} + +func TestCancelUnbondingDelegation(t *testing.T) { + // setup the app + _, app, ctx := createTestInput() + msgServer := keeper.NewMsgServerImpl(app.StakingKeeper) + bondDenom := app.StakingKeeper.BondDenom(ctx) + + // set the not bonded pool module account + notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) + startTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 5) + startCoin := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), startTokens)) + + require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, notBondedPool.GetName(), startCoin)) + app.AccountKeeper.SetModuleAccount(ctx, notBondedPool) + + moduleBalance := app.BankKeeper.GetBalance(ctx, notBondedPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)) + require.Equal(t, sdk.NewInt64Coin(bondDenom, startTokens.Int64()), moduleBalance) + + // create a validator + validatorPubKey := simapp.CreateTestPubKeys(1)[0] + validatorAddr := sdk.ValAddress(validatorPubKey.Address()) + + validator := teststaking.NewValidator(t, validatorAddr, validatorPubKey) + validator.Tokens = startTokens + validator.DelegatorShares = sdk.NewDecFromInt(startTokens) + validator.Status = types.Bonded + app.StakingKeeper.SetValidator(ctx, validator) + + // create a delegator + delAddrs := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(10000)) + delegatorAddr := delAddrs[0] + + // setting the ubd entry + unbondingAmount := sdk.NewInt64Coin(app.StakingKeeper.BondDenom(ctx), 5) + ubd := types.NewUnbondingDelegation( + delegatorAddr, validatorAddr, 10, + ctx.BlockTime().Add(time.Minute*10), + unbondingAmount.Amount, + 1, + ) + + // set and retrieve a record + app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + resUnbond, found := app.StakingKeeper.GetUnbondingDelegation(ctx, delegatorAddr, validatorAddr) + require.True(t, found) + require.Equal(t, ubd, resUnbond) + + testCases := []struct { + Name string + ExceptErr bool + req types.MsgCancelUnbondingDelegation + }{ + { + Name: "invalid height", + ExceptErr: true, + req: types.MsgCancelUnbondingDelegation{ + DelegatorAddress: resUnbond.DelegatorAddress, + ValidatorAddress: resUnbond.ValidatorAddress, + Amount: sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), sdk.NewInt(4)), + CreationHeight: 0, + }, + }, + { + Name: "validator not exists", + ExceptErr: true, + req: types.MsgCancelUnbondingDelegation{ + DelegatorAddress: resUnbond.DelegatorAddress, + ValidatorAddress: sdk.ValAddress(sdk.AccAddress("asdsad")).String(), + Amount: unbondingAmount, + CreationHeight: 0, + }, + }, + { + Name: "invalid delegator address", + ExceptErr: true, + req: types.MsgCancelUnbondingDelegation{ + DelegatorAddress: "invalid_delegator_addrtess", + ValidatorAddress: resUnbond.ValidatorAddress, + Amount: unbondingAmount, + CreationHeight: 0, + }, + }, + { + Name: "invalid amount", + ExceptErr: true, + req: types.MsgCancelUnbondingDelegation{ + DelegatorAddress: resUnbond.DelegatorAddress, + ValidatorAddress: resUnbond.ValidatorAddress, + Amount: unbondingAmount.Add(sdk.NewInt64Coin(bondDenom, 10)), + CreationHeight: 10, + }, + }, + { + Name: "success", + ExceptErr: false, + req: types.MsgCancelUnbondingDelegation{ + DelegatorAddress: resUnbond.DelegatorAddress, + ValidatorAddress: resUnbond.ValidatorAddress, + Amount: unbondingAmount.Sub(sdk.NewInt64Coin(bondDenom, 1)), + CreationHeight: 10, + }, + }, + { + Name: "success", + ExceptErr: false, + req: types.MsgCancelUnbondingDelegation{ + DelegatorAddress: resUnbond.DelegatorAddress, + ValidatorAddress: resUnbond.ValidatorAddress, + Amount: unbondingAmount.Sub(unbondingAmount.Sub(sdk.NewInt64Coin(bondDenom, 1))), + CreationHeight: 10, + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + _, err := msgServer.CancelUnbondingDelegation(sdk.WrapSDKContext(ctx), &testCase.req) + if testCase.ExceptErr { + require.Error(t, err) + } else { + require.NoError(t, err) + balanceForNotBondedPool := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(notBondedPool.GetAddress()), bondDenom) + require.Equal(t, balanceForNotBondedPool, moduleBalance.Sub(testCase.req.Amount)) + moduleBalance = moduleBalance.Sub(testCase.req.Amount) + } + }) + } +} diff --git a/x/staking/keeper/params.go b/x/staking/keeper/params.go index 10a8b7e8f03a..3091333fd1b7 100644 --- a/x/staking/keeper/params.go +++ b/x/staking/keeper/params.go @@ -47,7 +47,25 @@ func (k Keeper) PowerReduction(ctx sdk.Context) sdk.Int { return sdk.DefaultPowerReduction } -// Get all parameteras as types.Params +// Validator bond factor for all validators +func (k Keeper) ValidatorBondFactor(ctx sdk.Context) (res sdk.Dec) { + k.paramstore.Get(ctx, types.KeyValidatorBondFactor, &res) + return +} + +// Global liquid staking cap across all liquid staking providers +func (k Keeper) GlobalLiquidStakingCap(ctx sdk.Context) (res sdk.Dec) { + k.paramstore.Get(ctx, types.KeyGlobalLiquidStakingCap, &res) + return +} + +// Liquid staking cap for each validator +func (k Keeper) ValidatorLiquidStakingCap(ctx sdk.Context) (res sdk.Dec) { + k.paramstore.Get(ctx, types.KeyValidatorLiquidStakingCap, &res) + return +} + +// Get all parameters as types.Params func (k Keeper) GetParams(ctx sdk.Context) types.Params { return types.NewParams( k.UnbondingTime(ctx), @@ -55,6 +73,9 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { k.MaxEntries(ctx), k.HistoricalEntries(ctx), k.BondDenom(ctx), + k.ValidatorBondFactor(ctx), + k.GlobalLiquidStakingCap(ctx), + k.ValidatorLiquidStakingCap(ctx), ) } diff --git a/x/staking/keeper/querier.go b/x/staking/keeper/querier.go index 5c276e145aec..3cf28f849c7d 100644 --- a/x/staking/keeper/querier.go +++ b/x/staking/keeper/querier.go @@ -460,6 +460,7 @@ func DelegationToDelegationResponse(ctx sdk.Context, k Keeper, del types.Delegat delegatorAddress, del.GetValidatorAddr(), del.Shares, + del.ValidatorBond, sdk.NewCoin(k.BondDenom(ctx), val.TokensFromShares(del.Shares).TruncateInt()), ), nil } diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index 6abe7d53cddd..1bbf4b1a2064 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -305,6 +305,9 @@ func TestQueryDelegation(t *testing.T) { require.Equal(t, sdk.NewCoin(sdk.DefaultBondDenom, delegation.Shares.TruncateInt()), delegationRes.Balance) // Query Delegator Delegations + bz, errRes = cdc.MarshalJSON(queryParams) + require.NoError(t, errRes) + query = abci.RequestQuery{ Path: "/custom/staking/delegatorDelegations", Data: bz, @@ -483,11 +486,11 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { for _, c := range cases { // Query Delegator bonded validators queryParams := types.NewQueryDelegatorParams(addrs[0]) - bz, errRes := cdc.MarshalJSON(queryParams) + _, errRes := cdc.MarshalJSON(queryParams) require.NoError(t, errRes) // Query valAddress delegations - bz, errRes = cdc.MarshalJSON(types.NewQueryValidatorParams(valAddress, c.page, c.limit)) + bz, errRes := cdc.MarshalJSON(types.NewQueryValidatorParams(valAddress, c.page, c.limit)) require.NoError(t, errRes) query := abci.RequestQuery{ @@ -517,10 +520,10 @@ func TestQueryValidatorDelegations_Pagination(t *testing.T) { for _, c := range cases { // Query Unbonding delegations with pagination. queryParams := types.NewQueryDelegatorParams(addrs[0]) - bz, errRes := cdc.MarshalJSON(queryParams) + _, errRes := cdc.MarshalJSON(queryParams) require.NoError(t, errRes) - bz, errRes = cdc.MarshalJSON(types.NewQueryValidatorParams(valAddress, c.page, c.limit)) + bz, errRes := cdc.MarshalJSON(types.NewQueryValidatorParams(valAddress, c.page, c.limit)) require.NoError(t, errRes) query := abci.RequestQuery{ Data: bz, diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 9d55fefd8d88..6ad9411f2a6b 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -26,9 +26,8 @@ import ( // // CONTRACT: // -// Infraction was committed at the current height or at a past height, -// not at a height in the future -// --- +// Infraction was committed at the current height or at a past height, +// not at a height in the future // // Slash implementation doesn't require the infraction (types.Infraction) to work but the IS one does. It is here to have IS satisfy the Slash signature. func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFactor sdk.Dec, _ types.InfractionType) { @@ -129,8 +128,19 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh // Deduct from validator's bonded tokens and update the validator. // Burn the slashed tokens from the pool account and decrease the total supply. + initialLiquidTokens := validator.TokensFromShares(validator.LiquidShares).TruncateInt() validator = k.RemoveValidatorTokens(ctx, validator, tokensToBurn) + // Proportionally deduct any liquid tokens from the global total + updatedLiquidTokens := validator.TokensFromShares(validator.LiquidShares).TruncateInt() + slashedLiquidTokens := initialLiquidTokens.Sub(updatedLiquidTokens) + if err := k.DecreaseTotalLiquidStakedTokens(ctx, slashedLiquidTokens); err != nil { + // This only error's if the total liquid staked tokens underflows + // which would indicate there's a corrupted state where the validator has + // liquid tokens that are not accounted for in the global total + panic(err) + } + switch validator.GetStatus() { case types.Bonded: if err := k.burnBondedTokens(ctx, tokensToBurn); err != nil { diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 66ee7228c761..52d36b08d7e5 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -123,7 +123,7 @@ func TestSlashRedelegation(t *testing.T) { // add bonded tokens to pool for (re)delegations startCoins := sdk.NewCoins(sdk.NewInt64Coin(app.StakingKeeper.BondDenom(ctx), 15)) bondedPool := app.StakingKeeper.GetBondedPool(ctx) - balances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) + _ = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) require.NoError(t, simapp.FundModuleAccount(app.BankKeeper, ctx, bondedPool.GetName(), startCoins)) app.AccountKeeper.SetModuleAccount(ctx, bondedPool) @@ -153,7 +153,7 @@ func TestSlashRedelegation(t *testing.T) { slashAmount = app.StakingKeeper.SlashRedelegation(ctx, validator, rd, 0, fraction) require.True(t, slashAmount.Equal(sdk.NewInt(0))) - balances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) + balances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) // test valid slash, before expiration timestamp and to which stake contributed ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(0, 0)}) @@ -201,12 +201,12 @@ func TestSlashAtNegativeHeight(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) oldBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + _, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) app.StakingKeeper.Slash(ctx, consAddr, -2, 10, fraction, 0) // read updated state - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // end block @@ -232,12 +232,12 @@ func TestSlashValidatorAtCurrentHeight(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) oldBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + _, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) app.StakingKeeper.Slash(ctx, consAddr, ctx.BlockHeight(), 10, fraction, 0) // read updated state - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // end block @@ -272,7 +272,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { bondedPool := app.StakingKeeper.GetBondedPool(ctx) oldBondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) - validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + _, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) app.StakingKeeper.Slash(ctx, consAddr, 10, 10, fraction, 0) @@ -293,7 +293,7 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { require.Equal(t, app.StakingKeeper.TokensFromConsensusPower(ctx, 3), diffTokens) // read updated validator - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 3 - 6 stake originally bonded at the time of infraction @@ -390,7 +390,7 @@ func TestSlashWithRedelegation(t *testing.T) { // set a redelegation rdTokens := app.StakingKeeper.TokensFromConsensusPower(ctx, 6) rd := types.NewRedelegation(addrDels[0], addrVals[0], addrVals[1], 11, - time.Unix(0, 0), rdTokens, rdTokens.ToDec(), 0) + time.Unix(0, 0), rdTokens, sdk.NewDecFromInt(rdTokens), 0) app.StakingKeeper.SetRedelegation(ctx, rd) // set the associated delegation @@ -411,11 +411,11 @@ func TestSlashWithRedelegation(t *testing.T) { // slash validator ctx = ctx.WithBlockHeight(12) - validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + _, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, fraction, 0) }) - burnAmount := app.StakingKeeper.TokensFromConsensusPower(ctx, 10).ToDec().Mul(fraction).TruncateInt() + burnAmount := sdk.NewDecFromInt(app.StakingKeeper.TokensFromConsensusPower(ctx, 10)).Mul(fraction).TruncateInt() bondedPool = app.StakingKeeper.GetBondedPool(ctx) notBondedPool = app.StakingKeeper.GetNotBondedPool(ctx) @@ -433,7 +433,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.True(t, found) require.Len(t, rd.Entries, 1) // read updated validator - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) // power decreased by 2 - 4 stake originally bonded at the time of infraction // was still bonded at the time of discovery and was slashed by half, 4 stake @@ -442,7 +442,7 @@ func TestSlashWithRedelegation(t *testing.T) { require.Equal(t, int64(8), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) // slash the validator again - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + _, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec(), 0) }) @@ -476,7 +476,7 @@ func TestSlashWithRedelegation(t *testing.T) { // slash the validator again, by 100% ctx = ctx.WithBlockHeight(12) - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + _, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, consAddr) require.True(t, found) require.NotPanics(t, func() { app.StakingKeeper.Slash(ctx, consAddr, 10, 10, sdk.OneDec(), 0) }) @@ -575,7 +575,7 @@ func TestSlashBoth(t *testing.T) { oldNotBonded := app.BankKeeper.GetBalance(ctx, notBondedPool.GetAddress(), bondDenom).Amount // slash validator ctx = ctx.WithBlockHeight(12) - validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) + _, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) require.True(t, found) consAddr0 := sdk.ConsAddress(PKs[0].Address()) app.StakingKeeper.Slash(ctx, consAddr0, 10, 10, fraction, 0) @@ -599,7 +599,7 @@ func TestSlashBoth(t *testing.T) { require.True(t, found) require.Len(t, rdA.Entries, 1) // read updated validator - validator, found = app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) + validator, found := app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(PKs[0])) require.True(t, found) // power not decreased, all stake was bonded since require.Equal(t, int64(10), validator.GetConsensusPower(app.StakingKeeper.PowerReduction(ctx))) diff --git a/x/staking/keeper/tokenize_share_record.go b/x/staking/keeper/tokenize_share_record.go new file mode 100644 index 000000000000..ecde86be0c2f --- /dev/null +++ b/x/staking/keeper/tokenize_share_record.go @@ -0,0 +1,151 @@ +package keeper + +import ( + "fmt" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + gogotypes "github.com/gogo/protobuf/types" + + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func (k Keeper) GetLastTokenizeShareRecordID(ctx sdk.Context) uint64 { + store := ctx.KVStore(k.storeKey) + bytes := store.Get(types.LastTokenizeShareRecordIDKey) + if bytes == nil { + return 0 + } + return sdk.BigEndianToUint64(bytes) +} + +func (k Keeper) SetLastTokenizeShareRecordID(ctx sdk.Context, id uint64) { + store := ctx.KVStore(k.storeKey) + store.Set(types.LastTokenizeShareRecordIDKey, sdk.Uint64ToBigEndian(id)) +} + +func (k Keeper) GetTokenizeShareRecord(ctx sdk.Context, id uint64) (tokenizeShareRecord types.TokenizeShareRecord, err error) { + store := ctx.KVStore(k.storeKey) + + bz := store.Get(types.GetTokenizeShareRecordByIndexKey(id)) + if bz == nil { + return tokenizeShareRecord, sdkerrors.Wrap(types.ErrTokenizeShareRecordNotExists, fmt.Sprintf("tokenizeShareRecord %d does not exist", id)) + } + + k.cdc.MustUnmarshal(bz, &tokenizeShareRecord) + return tokenizeShareRecord, nil +} + +func (k Keeper) GetTokenizeShareRecordsByOwner(ctx sdk.Context, owner sdk.AccAddress) (tokenizeShareRecords []types.TokenizeShareRecord) { + store := ctx.KVStore(k.storeKey) + + it := sdk.KVStorePrefixIterator(store, types.GetTokenizeShareRecordIdsByOwnerPrefix(owner)) + defer it.Close() + + for ; it.Valid(); it.Next() { + var id gogotypes.UInt64Value + k.cdc.MustUnmarshal(it.Value(), &id) + + tokenizeShareRecord, err := k.GetTokenizeShareRecord(ctx, id.Value) + if err != nil { + continue + } + tokenizeShareRecords = append(tokenizeShareRecords, tokenizeShareRecord) + } + return +} + +func (k Keeper) GetTokenizeShareRecordByDenom(ctx sdk.Context, denom string) (types.TokenizeShareRecord, error) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.GetTokenizeShareRecordIDByDenomKey(denom)) + if bz == nil { + return types.TokenizeShareRecord{}, fmt.Errorf("tokenize share record not found from denom: %s", denom) + } + + var id gogotypes.UInt64Value + k.cdc.MustUnmarshal(bz, &id) + + return k.GetTokenizeShareRecord(ctx, id.Value) +} + +func (k Keeper) GetAllTokenizeShareRecords(ctx sdk.Context) (tokenizeShareRecords []types.TokenizeShareRecord) { + store := ctx.KVStore(k.storeKey) + + it := sdk.KVStorePrefixIterator(store, types.TokenizeShareRecordPrefix) + defer it.Close() + + for ; it.Valid(); it.Next() { + var tokenizeShareRecord types.TokenizeShareRecord + k.cdc.MustUnmarshal(it.Value(), &tokenizeShareRecord) + + tokenizeShareRecords = append(tokenizeShareRecords, tokenizeShareRecord) + } + return +} + +func (k Keeper) AddTokenizeShareRecord(ctx sdk.Context, tokenizeShareRecord types.TokenizeShareRecord) error { + if k.hasTokenizeShareRecord(ctx, tokenizeShareRecord.Id) { + return sdkerrors.Wrapf(types.ErrTokenizeShareRecordAlreadyExists, "TokenizeShareRecord already exists: %d", tokenizeShareRecord.Id) + } + + k.setTokenizeShareRecord(ctx, tokenizeShareRecord) + + owner, err := sdk.AccAddressFromBech32(tokenizeShareRecord.Owner) + if err != nil { + return err + } + + k.setTokenizeShareRecordWithOwner(ctx, owner, tokenizeShareRecord.Id) + k.setTokenizeShareRecordWithDenom(ctx, tokenizeShareRecord.GetShareTokenDenom(), tokenizeShareRecord.Id) + + return nil +} + +func (k Keeper) DeleteTokenizeShareRecord(ctx sdk.Context, recordID uint64) error { + record, err := k.GetTokenizeShareRecord(ctx, recordID) + if err != nil { + return err + } + owner, err := sdk.AccAddressFromBech32(record.Owner) + if err != nil { + return err + } + + store := ctx.KVStore(k.storeKey) + store.Delete(types.GetTokenizeShareRecordByIndexKey(recordID)) + store.Delete(types.GetTokenizeShareRecordIDByOwnerAndIDKey(owner, recordID)) + store.Delete(types.GetTokenizeShareRecordIDByDenomKey(record.GetShareTokenDenom())) + return nil +} + +func (k Keeper) hasTokenizeShareRecord(ctx sdk.Context, id uint64) bool { + store := ctx.KVStore(k.storeKey) + return store.Has(types.GetTokenizeShareRecordByIndexKey(id)) +} + +func (k Keeper) setTokenizeShareRecord(ctx sdk.Context, tokenizeShareRecord types.TokenizeShareRecord) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&tokenizeShareRecord) + + store.Set(types.GetTokenizeShareRecordByIndexKey(tokenizeShareRecord.Id), bz) +} + +func (k Keeper) setTokenizeShareRecordWithOwner(ctx sdk.Context, owner sdk.AccAddress, id uint64) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&gogotypes.UInt64Value{Value: id}) + + store.Set(types.GetTokenizeShareRecordIDByOwnerAndIDKey(owner, id), bz) +} + +func (k Keeper) deleteTokenizeShareRecordWithOwner(ctx sdk.Context, owner sdk.AccAddress, id uint64) { + store := ctx.KVStore(k.storeKey) + store.Delete(types.GetTokenizeShareRecordIDByOwnerAndIDKey(owner, id)) +} + +func (k Keeper) setTokenizeShareRecordWithDenom(ctx sdk.Context, denom string, id uint64) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&gogotypes.UInt64Value{Value: id}) + + store.Set(types.GetTokenizeShareRecordIDByDenomKey(denom), bz) +} diff --git a/x/staking/keeper/tokenize_share_record_test.go b/x/staking/keeper/tokenize_share_record_test.go new file mode 100644 index 000000000000..29bbad2c370e --- /dev/null +++ b/x/staking/keeper/tokenize_share_record_test.go @@ -0,0 +1,61 @@ +package keeper_test + +import ( + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func (suite *KeeperTestSuite) TestGetLastTokenizeShareRecordId() { + app, ctx := suite.app, suite.ctx + lastTokenizeShareRecordID := app.StakingKeeper.GetLastTokenizeShareRecordID(ctx) + suite.Equal(lastTokenizeShareRecordID, uint64(0)) + app.StakingKeeper.SetLastTokenizeShareRecordID(ctx, 100) + lastTokenizeShareRecordID = app.StakingKeeper.GetLastTokenizeShareRecordID(ctx) + suite.Equal(lastTokenizeShareRecordID, uint64(100)) +} + +func (suite *KeeperTestSuite) TestGetTokenizeShareRecord() { + app, ctx := suite.app, suite.ctx + owner1, owner2 := suite.addrs[0], suite.addrs[1] + + tokenizeShareRecord1 := types.TokenizeShareRecord{ + Id: 0, + Owner: owner1.String(), + ModuleAccount: "test-module-account-1", + Validator: "test-validator", + } + tokenizeShareRecord2 := types.TokenizeShareRecord{ + Id: 1, + Owner: owner2.String(), + ModuleAccount: "test-module-account-2", + Validator: "test-validator", + } + tokenizeShareRecord3 := types.TokenizeShareRecord{ + Id: 2, + Owner: owner1.String(), + ModuleAccount: "test-module-account-3", + Validator: "test-validator", + } + err := app.StakingKeeper.AddTokenizeShareRecord(ctx, tokenizeShareRecord1) + suite.NoError(err) + err = app.StakingKeeper.AddTokenizeShareRecord(ctx, tokenizeShareRecord2) + suite.NoError(err) + err = app.StakingKeeper.AddTokenizeShareRecord(ctx, tokenizeShareRecord3) + suite.NoError(err) + + tokenizeShareRecord, err := app.StakingKeeper.GetTokenizeShareRecord(ctx, 2) + suite.NoError(err) + suite.Equal(tokenizeShareRecord, tokenizeShareRecord3) + + tokenizeShareRecord, err = app.StakingKeeper.GetTokenizeShareRecordByDenom(ctx, tokenizeShareRecord2.GetShareTokenDenom()) + suite.NoError(err) + suite.Equal(tokenizeShareRecord, tokenizeShareRecord2) + + tokenizeShareRecords := app.StakingKeeper.GetAllTokenizeShareRecords(ctx) + suite.Equal(len(tokenizeShareRecords), 3) + + tokenizeShareRecords = app.StakingKeeper.GetTokenizeShareRecordsByOwner(ctx, owner1) + suite.Equal(len(tokenizeShareRecords), 2) + + tokenizeShareRecords = app.StakingKeeper.GetTokenizeShareRecordsByOwner(ctx, owner2) + suite.Equal(len(tokenizeShareRecords), 1) +} diff --git a/x/staking/keeper/unbonding_type_accessors_test.go b/x/staking/keeper/unbonding_type_accessors_test.go index 6c2d53d25220..83c052c20273 100644 --- a/x/staking/keeper/unbonding_type_accessors_test.go +++ b/x/staking/keeper/unbonding_type_accessors_test.go @@ -217,6 +217,7 @@ func (s *KeeperTestSuite) TestValidatorByUnbondingIDAccessors() { newVal := func(valAddr sdk.ValAddress, pk cryptotypes.PubKey) types.Validator { val, err := types.NewValidator(valAddr, pk, types.Description{}) + val.MinSelfDelegation = sdk.ZeroInt() s.Require().NoError(err) return val } diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 363ae1b5a09b..bd13ccb82124 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -165,7 +165,6 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab if err != nil { return nil, err } - oldPowerBytes, found := last[valAddrStr] newPower := validator.ConsensusPower(powerReduction) newPowerBytes := k.cdc.MustMarshal(&gogotypes.Int64Value{Value: newPower}) @@ -173,7 +172,7 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab // update the validator set if power has changed if !found || !bytes.Equal(oldPowerBytes, newPowerBytes) { updates = append(updates, validator.ABCIValidatorUpdate(powerReduction)) - // set the validator update and power + k.SetLastValidatorPower(ctx, valAddr, newPower) } @@ -194,7 +193,6 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []ab if err != nil { return nil, err } - amtFromBondedToNotBonded = amtFromBondedToNotBonded.Add(validator.GetTokens()) k.DeleteLastValidatorPower(ctx, validator.GetOperator()) update := validator.ABCIValidatorUpdateZero() diff --git a/x/staking/keeper/validator_bench_test.go b/x/staking/keeper/validator_bench_test.go index ea727b72457d..5c8b1b8f9927 100644 --- a/x/staking/keeper/validator_bench_test.go +++ b/x/staking/keeper/validator_bench_test.go @@ -7,14 +7,14 @@ func BenchmarkGetValidator(b *testing.B) { // panic: encoding/hex: odd length hex string powersNumber := 900 - var totalPower int64 = 0 + totalPower := int64(0) powers := make([]int64, powersNumber) for i := range powers { powers[i] = int64(i) totalPower += int64(i) } - app, ctx, _, valAddrs, vals := initValidators(b, totalPower, len(powers), powers) + app, ctx, valAddrs, vals := initValidators(b, totalPower, len(powers), powers) for _, validator := range vals { app.StakingKeeper.SetValidator(ctx, validator) diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index a39d9ca799de..c997df86ffa8 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -41,7 +41,7 @@ func bootstrapValidatorTest(t testing.TB, power int64, numAddrs int) (*simapp.Si return app, ctx, addrDels, addrVals } -func initValidators(t testing.TB, power int64, numAddrs int, powers []int64) (*simapp.SimApp, sdk.Context, []sdk.AccAddress, []sdk.ValAddress, []types.Validator) { +func initValidators(t testing.TB, power int64, numAddrs int, powers []int64) (*simapp.SimApp, sdk.Context, []sdk.ValAddress, []types.Validator) { app, ctx, addrs, valAddrs := bootstrapValidatorTest(t, power, numAddrs) pks := simapp.CreateTestPubKeys(numAddrs) @@ -51,7 +51,7 @@ func initValidators(t testing.TB, power int64, numAddrs int, powers []int64) (*s tokens := app.StakingKeeper.TokensFromConsensusPower(ctx, power) vs[i], _ = vs[i].AddTokensFromDel(tokens) } - return app, ctx, addrs, valAddrs, vs + return app, ctx, valAddrs, vs } func TestSetValidator(t *testing.T) { @@ -186,7 +186,7 @@ func TestUpdateBondedValidatorsDecreaseCliff(t *testing.T) { app.StakingKeeper.DeleteValidatorByPowerIndex(ctx, nextCliffVal) shares := app.StakingKeeper.TokensFromConsensusPower(ctx, 21) nextCliffVal, _ = nextCliffVal.RemoveDelShares(shares.ToDec()) - nextCliffVal = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, nextCliffVal, true) + _ = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, nextCliffVal, true) expectedValStatus := map[int]types.BondStatus{ 9: types.Bonded, 8: types.Bonded, 7: types.Bonded, 5: types.Bonded, 4: types.Bonded, @@ -224,7 +224,8 @@ func TestSlashToZeroPowerRemoved(t *testing.T) { validator, _ = validator.AddTokensFromDel(valTokens) require.Equal(t, types.Unbonded, validator.Status) require.Equal(t, valTokens, validator.Tokens) - app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) + err := app.StakingKeeper.SetValidatorByConsAddr(ctx, validator) + require.NoError(t, err) validator = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validator, true) require.Equal(t, valTokens, validator.Tokens, "\nvalidator %v\npool %v", validator, valTokens) @@ -267,7 +268,8 @@ func TestValidatorBasics(t *testing.T) { // set and retrieve a record validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], true) - app.StakingKeeper.SetValidatorByConsAddr(ctx, validators[0]) + err := app.StakingKeeper.SetValidatorByConsAddr(ctx, validators[0]) + require.NoError(t, err) resVal, found := app.StakingKeeper.GetValidator(ctx, addrVals[0]) require.True(t, found) assert.True(ValEq(t, validators[0], resVal)) @@ -761,7 +763,7 @@ func TestApplyAndReturnValidatorSetUpdatesSingleValueChange(t *testing.T) { func TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) { powers := []int64{10, 20} // TODO: use it in other places - app, ctx, _, _, validators := initValidators(t, 1000, 20, powers) + app, ctx, _, validators := initValidators(t, 1000, 20, powers) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) @@ -783,7 +785,7 @@ func TestApplyAndReturnValidatorSetUpdatesMultipleValueChange(t *testing.T) { func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) { powers := []int64{10, 20, 5, 15, 25} - app, ctx, _, _, validators := initValidators(t, 1000, 20, powers) + app, ctx, _, validators := initValidators(t, 1000, 20, powers) validators[0] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[0], false) validators[1] = keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[1], false) diff --git a/x/staking/migrations/v3/migrations_test.go b/x/staking/migrations/v3/migrations_test.go new file mode 100644 index 000000000000..c7e9dc6dc6f5 --- /dev/null +++ b/x/staking/migrations/v3/migrations_test.go @@ -0,0 +1,308 @@ +package v3_test + +import ( + "fmt" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/simapp" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + v3 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v3" + legacytypes "github.com/cosmos/cosmos-sdk/x/staking/migrations/v3/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +// Helper function to write a validator using the old schema +func setLegacyValidator(store sdk.KVStore, cdc codec.BinaryCodec, validator legacytypes.Validator) { + bz := cdc.MustMarshal(&validator) + store.Set(types.GetValidatorKey(validator.GetOperator()), bz) +} + +// Helper function to write a delegation using the old schema +func setLegacyDelegation(store sdk.KVStore, cdc codec.BinaryCodec, delegation legacytypes.Delegation) { + delegatorAddress := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + + bz := cdc.MustMarshal(&delegation) + store.Set(types.GetDelegationKey(delegatorAddress, delegation.GetValidatorAddr()), bz) +} + +// Helper function to get unbonding delegation records +func getUBD(store storetypes.KVStore, cdc codec.BinaryCodec, accAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubdRes types.UnbondingDelegation) { + ubdbz := store.Get(types.GetUBDKey(accAddr, valAddr)) + cdc.MustUnmarshal(ubdbz, &ubdRes) + return ubdRes +} + +// createOldStateUnbonding will create the ubd entries with duplicate heights +// 10 duplicate heights and 10 unique ubd with creation height +func createOldUnbondingDelegationRecords(t *testing.T, creationHeight int64, valAddr sdk.ValAddress, accAddr sdk.AccAddress, cdc codec.BinaryCodec, store storetypes.KVStore) error { + unbondBalance := sdk.NewInt(100) + completionTime := time.Now() + ubdEntries := make([]types.UnbondingDelegationEntry, 0, 10) + + for i := int64(0); i < 10; i++ { + ubdEntry := types.UnbondingDelegationEntry{ + CreationHeight: creationHeight, + Balance: unbondBalance, + InitialBalance: unbondBalance, + CompletionTime: completionTime, + } + ubdEntries = append(ubdEntries, ubdEntry) + // creating more entries for testing the creation_heights + ubdEntry.CreationHeight = i + 2 + ubdEntry.CompletionTime = completionTime.Add(time.Minute * 10) + ubdEntries = append(ubdEntries, ubdEntry) + } + + ubd := types.UnbondingDelegation{ + ValidatorAddress: valAddr.String(), + DelegatorAddress: accAddr.String(), + Entries: ubdEntries, + } + + // set the unbond delegation with validator and delegator + bz := types.MustMarshalUBD(cdc, ubd) + key := types.GetUBDKey(accAddr, valAddr) + store.Set(key, bz) + return nil +} + +// Test setting params in the staking module +func TestMigrateParamsStore(t *testing.T) { + cdc := simapp.MakeTestEncodingConfig() + stakingKey := storetypes.NewKVStoreKey(types.ModuleName) + tStakingKey := sdk.NewTransientStoreKey("transient_test") + ctx := testutil.DefaultContext(stakingKey, tStakingKey) + paramstore := paramtypes.NewSubspace(cdc.Marshaler, cdc.Amino, stakingKey, tStakingKey, types.ModuleName) + + // Check there are no LSM params + require.False(t, paramstore.Has(ctx, types.KeyValidatorBondFactor)) + require.False(t, paramstore.Has(ctx, types.KeyGlobalLiquidStakingCap)) + require.False(t, paramstore.Has(ctx, types.KeyValidatorLiquidStakingCap)) + + // Run migrations + v3.MigrateParamsStore(ctx, paramstore) + + // Make sure the new params are set + require.True(t, paramstore.Has(ctx, types.KeyValidatorBondFactor)) + require.True(t, paramstore.Has(ctx, types.KeyGlobalLiquidStakingCap)) + require.True(t, paramstore.Has(ctx, types.KeyValidatorLiquidStakingCap)) + + // Confirm default values are set + var validatorBondFactor sdk.Dec + paramstore.Get(ctx, types.KeyValidatorBondFactor, &validatorBondFactor) + require.Equal(t, types.DefaultValidatorBondFactor, validatorBondFactor) + + var globalLiquidStakingCap sdk.Dec + paramstore.Get(ctx, types.KeyGlobalLiquidStakingCap, &globalLiquidStakingCap) + require.Equal(t, types.DefaultGlobalLiquidStakingCap, globalLiquidStakingCap) + + var validatorLiquidStakingCap sdk.Dec + paramstore.Get(ctx, types.KeyValidatorLiquidStakingCap, &validatorLiquidStakingCap) + require.Equal(t, types.DefaultValidatorLiquidStakingCap, validatorLiquidStakingCap) +} + +// Test setting each validator's ValidatorBondShares and LiquidShares to 0 +func TestMigrateValidators(t *testing.T) { + app := simapp.Setup(false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + store := ctx.KVStore(app.GetKey(legacytypes.StoreKey)) + + addresses := simapp.AddTestAddrs(app, ctx, 10, sdk.NewInt(1_000_000)) + pubKeys := simapp.CreateTestPubKeys(10) + + // Write each validator with the old type + oldValidators := []legacytypes.Validator{} + for i := int64(0); i < 10; i++ { + valAddress := sdk.ValAddress(addresses[i]).String() + pkAny, err := codectypes.NewAnyWithValue(pubKeys[i]) + require.NoError(t, err) + + dummyTime := time.Date(2023, 1, 1, 0, 0, int(i), 0, time.UTC) + + description := legacytypes.Description{ + Moniker: fmt.Sprintf("moniker-%d", i), + Identity: fmt.Sprintf("identity-%d", i), + Website: fmt.Sprintf("website-%d", i), + SecurityContact: fmt.Sprintf("security-contact-%d", i), + Details: fmt.Sprintf("details-%d", i), + } + + commission := legacytypes.Commission{ + UpdateTime: dummyTime, + CommissionRates: legacytypes.CommissionRates{ + Rate: sdk.NewDec(i), + MaxRate: sdk.NewDec(i), + MaxChangeRate: sdk.NewDec(i), + }, + } + + validator := legacytypes.Validator{ + OperatorAddress: valAddress, + ConsensusPubkey: pkAny, + Jailed: true, + Status: legacytypes.Bonded, + Tokens: sdk.NewInt(1_000_000), + DelegatorShares: sdk.NewDec(1_000_000), + UnbondingHeight: i, + UnbondingTime: dummyTime, + MinSelfDelegation: sdk.NewInt(1_000), + UnbondingOnHoldRefCount: 1, + UnbondingIds: []uint64{uint64(i)}, + Description: description, + Commission: commission, + } + + oldValidators = append(oldValidators, validator) + setLegacyValidator(store, app.AppCodec(), validator) + } + + // Migrate to the new types which adds ValidatorBondShares and LiquidShares + v3.MigrateValidators(ctx, app.StakingKeeper) + + // check that the validator ValidatorBondShares and LiquidShares were correctly set to 0 + for _, val := range app.StakingKeeper.GetAllValidators(ctx) { + require.Equal(t, sdk.ZeroDec(), val.ValidatorBondShares) + require.Equal(t, sdk.ZeroDec(), val.LiquidShares) + } + + // check that the other validator attributes were unchanged + for _, oldValidator := range oldValidators { + newValidator, found := app.StakingKeeper.GetValidator(ctx, oldValidator.GetOperator()) + require.True(t, found) + + require.Equal(t, oldValidator.ConsensusPubkey, newValidator.ConsensusPubkey, "pub key") + require.Equal(t, oldValidator.Jailed, newValidator.Jailed, "jailed") + require.Equal(t, oldValidator.Status.String(), newValidator.Status.String(), "status") + require.Equal(t, oldValidator.Tokens.Int64(), newValidator.Tokens.Int64(), "tokens") + require.Equal(t, oldValidator.DelegatorShares.TruncateInt64(), newValidator.DelegatorShares.TruncateInt64(), "shares") + + require.Equal(t, oldValidator.UnbondingHeight, newValidator.UnbondingHeight, "unbonding height") + require.Equal(t, oldValidator.UnbondingTime, newValidator.UnbondingTime, "unbonding time") + require.Equal(t, oldValidator.UnbondingOnHoldRefCount, newValidator.UnbondingOnHoldRefCount, "unbonding on hold") + require.Equal(t, oldValidator.UnbondingIds, newValidator.UnbondingIds, "unbonding ids") + require.Equal(t, oldValidator.MinSelfDelegation.String(), newValidator.MinSelfDelegation.String(), "min self delegation") + + oldDescription := oldValidator.Description + newDescription := newValidator.Description + require.Equal(t, oldDescription.Moniker, newDescription.Moniker, "moniker") + require.Equal(t, oldDescription.Identity, newDescription.Identity, "identity") + require.Equal(t, oldDescription.Website, newDescription.Website, "website") + require.Equal(t, oldDescription.SecurityContact, newDescription.SecurityContact, "security contact") + require.Equal(t, oldDescription.Details, newDescription.Details, "details") + + oldCommissionRate := oldValidator.Commission.CommissionRates + newCommissionRate := newValidator.Commission.CommissionRates + require.Equal(t, oldValidator.Commission.UpdateTime, newValidator.Commission.UpdateTime, "commission update time") + require.Equal(t, oldCommissionRate.Rate, newCommissionRate.Rate, "commission rate") + require.Equal(t, oldCommissionRate.MaxRate, newCommissionRate.MaxRate, "commission max rate") + require.Equal(t, oldCommissionRate.MaxChangeRate, newCommissionRate.MaxChangeRate, "commission max rate change") + } +} + +// Test setting each delegation's validator bond to false +func TestMigrateDelegations(t *testing.T) { + app := simapp.Setup(false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + store := ctx.KVStore(app.GetKey(legacytypes.StoreKey)) + + validatorAddresses := simapp.AddTestAddrs(app, ctx, 10, sdk.NewInt(1_000_000)) + delegatorAddresses := simapp.AddTestAddrs(app, ctx, 10, sdk.NewInt(1_000_000)) + + // Write each delegation with the old type + oldDelegations := []legacytypes.Delegation{} + for i := int64(0); i < 10; i++ { + delegation := legacytypes.Delegation{ + DelegatorAddress: delegatorAddresses[i].String(), + ValidatorAddress: sdk.ValAddress(validatorAddresses[i]).String(), + Shares: sdk.NewDec(i * 1000), + } + + oldDelegations = append(oldDelegations, delegation) + setLegacyDelegation(store, app.AppCodec(), delegation) + } + + // Migrate the new delegations which should add the ValidatorBond field + v3.MigrateDelegations(ctx, app.StakingKeeper) + + // check that the delegation is not a validator bond + for _, delegation := range app.StakingKeeper.GetAllDelegations(ctx) { + require.Equal(t, false, delegation.ValidatorBond) + } + + // check that the other delegation attributes were unchanged + for _, oldDelegation := range oldDelegations { + newDelegation, found := app.StakingKeeper.GetDelegation(ctx, oldDelegation.GetDelegatorAddr(), oldDelegation.GetValidatorAddr()) + require.True(t, found) + + require.Equal(t, oldDelegation.DelegatorAddress, newDelegation.DelegatorAddress, "delegator address") + require.Equal(t, oldDelegation.ValidatorAddress, newDelegation.ValidatorAddress, "validator address") + require.Equal(t, oldDelegation.Shares.TruncateInt64(), newDelegation.Shares.TruncateInt64(), "shares") + } +} + +// Tests unbonding delegation records with the same height are removed and combined into a new record +func TestMigrateUBD(t *testing.T) { + cdc := simapp.MakeTestEncodingConfig().Marshaler + + storeKey := sdk.NewKVStoreKey(legacytypes.ModuleName) + tKey := sdk.NewTransientStoreKey("transient_test") + ctx := testutil.DefaultContext(storeKey, tKey) + store := ctx.KVStore(storeKey) + duplicateCreationHeight := int64(1) + + accAddrs := v3.CreateIncrementalAccounts(1) + accAddr := accAddrs[0] + + valAddrs := v3.ConvertAddrsToValAddrs(accAddrs) + valAddr := valAddrs[0] + + // creating 10 ubdEntries with same height and 10 ubdEntries with different creation height + err := createOldUnbondingDelegationRecords(t, duplicateCreationHeight, valAddr, accAddr, cdc, store) + require.NoError(t, err) + + testCases := []struct { + name string + doMigration bool + }{ + { + name: "without state migration", + doMigration: false, + }, + { + name: "with state migration", + doMigration: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + if tc.doMigration { + require.NoError(t, v3.MigrateUBDEntries(ctx, store, cdc)) + } + + ubd := getUBD(store, cdc, accAddr, valAddr) + if tc.doMigration { + // checking the updated balance for duplicateCreationHeight + for _, ubdEntry := range ubd.Entries { + if ubdEntry.CreationHeight == duplicateCreationHeight { + require.Equal(t, sdk.NewInt(100*10), ubdEntry.Balance) + break + } + } + require.Equal(t, 11, len(ubd.Entries)) + } else { + require.Equal(t, true, true) + require.Equal(t, 20, len(ubd.Entries)) + } + }) + } +} diff --git a/x/staking/migrations/v3/store.go b/x/staking/migrations/v3/store.go new file mode 100644 index 000000000000..e8d1776b3121 --- /dev/null +++ b/x/staking/migrations/v3/store.go @@ -0,0 +1,144 @@ +package v3 + +import ( + "sort" + + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// subspace contains the method needed for migrations of the +// legacy Params subspace +type subspace interface { + GetParamSet(ctx sdk.Context, ps paramtypes.ParamSet) + HasKeyTable() bool + WithKeyTable(paramtypes.KeyTable) paramtypes.Subspace + Set(ctx sdk.Context, key []byte, value interface{}) +} + +// keeper contains the staking keeper functions required +// for the migration +type keeper interface { + GetAllDelegations(ctx sdk.Context) []types.Delegation + GetAllValidators(ctx sdk.Context) []types.Validator + SetDelegation(ctx sdk.Context, delegation types.Delegation) + SetValidator(ctx sdk.Context, validator types.Validator) + RefreshTotalLiquidStaked(ctx sdk.Context) error +} + +// Adds the following LSM params: +// - ValidatorBondFactor +// - GlobalLiquidStakingCap +// - ValidatorLiquidStakingCap +func MigrateParamsStore(ctx sdk.Context, paramstore subspace) { + if !paramstore.HasKeyTable() { + paramstore.WithKeyTable(types.ParamKeyTable()) + } + paramstore.Set(ctx, types.KeyValidatorBondFactor, types.DefaultValidatorBondFactor) + paramstore.Set(ctx, types.KeyGlobalLiquidStakingCap, types.DefaultGlobalLiquidStakingCap) + paramstore.Set(ctx, types.KeyValidatorLiquidStakingCap, types.DefaultValidatorLiquidStakingCap) +} + +// Set each validator's ValidatorBondShares and LiquidShares to 0 +func MigrateValidators(ctx sdk.Context, k keeper) { + for _, validator := range k.GetAllValidators(ctx) { + validator.ValidatorBondShares = sdk.ZeroDec() + validator.LiquidShares = sdk.ZeroDec() + k.SetValidator(ctx, validator) + } +} + +// Set each delegation's ValidatorBond field to false +func MigrateDelegations(ctx sdk.Context, k keeper) { + for _, delegation := range k.GetAllDelegations(ctx) { + delegation.ValidatorBond = false + k.SetDelegation(ctx, delegation) + } +} + +// migrateUBDEntries will remove the ubdEntries with same creation_height +// and create a new ubdEntry with updated balance and initial_balance +func MigrateUBDEntries(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec) error { + iterator := sdk.KVStorePrefixIterator(store, types.UnbondingDelegationKey) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + ubd := types.MustUnmarshalUBD(cdc, iterator.Value()) + + entriesAtSameCreationHeight := make(map[int64][]types.UnbondingDelegationEntry) + for _, ubdEntry := range ubd.Entries { + entriesAtSameCreationHeight[ubdEntry.CreationHeight] = append(entriesAtSameCreationHeight[ubdEntry.CreationHeight], ubdEntry) + } + + creationHeights := make([]int64, 0, len(entriesAtSameCreationHeight)) + for k := range entriesAtSameCreationHeight { + creationHeights = append(creationHeights, k) + } + + sort.Slice(creationHeights, func(i, j int) bool { return creationHeights[i] < creationHeights[j] }) + + ubd.Entries = make([]types.UnbondingDelegationEntry, 0, len(creationHeights)) + + for _, h := range creationHeights { + ubdEntry := types.UnbondingDelegationEntry{ + Balance: sdk.ZeroInt(), + InitialBalance: sdk.ZeroInt(), + } + for _, entry := range entriesAtSameCreationHeight[h] { + ubdEntry.Balance = ubdEntry.Balance.Add(entry.Balance) + ubdEntry.InitialBalance = ubdEntry.InitialBalance.Add(entry.InitialBalance) + ubdEntry.CreationHeight = entry.CreationHeight + ubdEntry.CompletionTime = entry.CompletionTime + } + ubd.Entries = append(ubd.Entries, ubdEntry) + } + + // set the new ubd to the store + setUBDToStore(ctx, store, cdc, ubd) + } + return nil +} + +func setUBDToStore(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, ubd types.UnbondingDelegation) { + delegatorAddress := sdk.MustAccAddressFromBech32(ubd.DelegatorAddress) + + bz := types.MustMarshalUBD(cdc, ubd) + + addr, err := sdk.ValAddressFromBech32(ubd.ValidatorAddress) + if err != nil { + panic(err) + } + + key := types.GetUBDKey(delegatorAddress, addr) + + store.Set(key, bz) +} + +// Peforms the in-place store migration for adding LSM support to v0.45.16-ics, including: +// - Adding params ValidatorBondFactor, GlobalLiquidStakingCap, ValidatorLiquidStakingCap +// - Setting each validator's ValidatorBondShares and LiquidShares to 0 +// - Setting each delegation's ValidatorBond field to false +// - Calculating the total liquid staked by summing the delegations from ICA accounts +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, k keeper, paramstore subspace) error { + store := ctx.KVStore(storeKey) + + ctx.Logger().Info("Staking LSM Migration: Migrating param store") + MigrateParamsStore(ctx, paramstore) + + ctx.Logger().Info("Staking LSM Migration: Migrating validators") + MigrateValidators(ctx, k) + + ctx.Logger().Info("Staking LSM Migration: Migrating delegations") + MigrateDelegations(ctx, k) + + ctx.Logger().Info("Staking LSM Migration: Migrating UBD entries") + if err := MigrateUBDEntries(ctx, store, cdc); err != nil { + return err + } + + ctx.Logger().Info("Staking LSM Migration: Calculating total liquid staked") + return k.RefreshTotalLiquidStaked(ctx) +} diff --git a/x/staking/migrations/v3/test_helpers.go b/x/staking/migrations/v3/test_helpers.go new file mode 100644 index 000000000000..4af123038cbc --- /dev/null +++ b/x/staking/migrations/v3/test_helpers.go @@ -0,0 +1,83 @@ +// This file contains utility testing functions from SDK 47 that are required for the UBD migration unit test +package v3 + +import ( + "bytes" + "encoding/hex" + "fmt" + "strconv" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// CreateIncrementalAccounts is a strategy used by addTestAddrs() in order to generated addresses in ascending order. +func CreateIncrementalAccounts(accNum int) []sdk.AccAddress { + var addresses []sdk.AccAddress + var buffer bytes.Buffer + + // start at 100 so we can make up to 999 test addresses with valid test addresses + for i := 100; i < (accNum + 100); i++ { + numString := strconv.Itoa(i) + buffer.WriteString("A58856F0FD53BF058B4909A21AEC019107BA6") // base address string + + buffer.WriteString(numString) // adding on final two digits to make addresses unique + res, _ := AccAddressFromHexUnsafe(buffer.String()) + bech := res.String() + addr, _ := CheckHexConversion(buffer.String(), bech) + + addresses = append(addresses, addr) + buffer.Reset() + } + + return addresses +} + +func CheckHexConversion(addr string, bech string) (sdk.AccAddress, error) { + res, err := AccAddressFromHexUnsafe(addr) + if err != nil { + return nil, err + } + bechexpected := res.String() + if bech != bechexpected { + return nil, fmt.Errorf("bech encoding doesn't match reference") + } + + bechres, err := sdk.AccAddressFromBech32(bech) + if err != nil { + return nil, err + } + if !bytes.Equal(bechres, res) { + return nil, err + } + + return res, nil +} + +// ConvertAddrsToValAddrs converts the provided addresses to ValAddress. +func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress { + valAddrs := make([]sdk.ValAddress, len(addrs)) + + for i, addr := range addrs { + valAddrs[i] = sdk.ValAddress(addr) + } + + return valAddrs +} + +// AccAddressFromHexUnsafe creates an AccAddress from a HEX-encoded string. +// +// Note, this function is considered unsafe as it may produce an AccAddress from +// otherwise invalid input, such as a transaction hash. Please use +// AccAddressFromBech32. +func AccAddressFromHexUnsafe(address string) (addr sdk.AccAddress, err error) { + bz, err := addressBytesFromHexString(address) + return sdk.AccAddress(bz), err +} + +func addressBytesFromHexString(address string) ([]byte, error) { + if len(address) == 0 { + return nil, fmt.Errorf("empty hex address") + } + + return hex.DecodeString(address) +} diff --git a/x/staking/migrations/v3/types/keys.go b/x/staking/migrations/v3/types/keys.go new file mode 100644 index 000000000000..dce3e808629a --- /dev/null +++ b/x/staking/migrations/v3/types/keys.go @@ -0,0 +1,37 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" +) + +const ( + // ModuleName is the name of the staking module + ModuleName = "staking" + + // StoreKey is the string store representation + StoreKey = ModuleName +) + +var ( + ValidatorsKey = []byte{0x21} // prefix for each key to a validator + DelegationKey = []byte{0x31} // key for a delegation + ParamsKey = []byte{0x51} // prefix for parameters for module x/staking +) + +// GetValidatorKey creates the key for the validator with address +// VALUE: staking/Validator +func GetValidatorKey(operatorAddr sdk.ValAddress) []byte { + return append(ValidatorsKey, address.MustLengthPrefix(operatorAddr)...) +} + +// GetDelegationKey creates the key for delegator bond with validator +// VALUE: staking/Delegation +func GetDelegationKey(delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte { + return append(GetDelegationsKey(delAddr), address.MustLengthPrefix(valAddr)...) +} + +// GetDelegationsKey creates the prefix for a delegator for all validators +func GetDelegationsKey(delAddr sdk.AccAddress) []byte { + return append(DelegationKey, address.MustLengthPrefix(delAddr)...) +} diff --git a/x/staking/migrations/v3/types/staking.go b/x/staking/migrations/v3/types/staking.go new file mode 100644 index 000000000000..4461b8187e08 --- /dev/null +++ b/x/staking/migrations/v3/types/staking.go @@ -0,0 +1,88 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "gopkg.in/yaml.v2" +) + +// String implements the Stringer interface for a Commission object. +func (c Commission) String() string { + out, _ := yaml.Marshal(c) + return string(out) +} + +// String implements the Stringer interface for a CommissionRates object. +func (cr CommissionRates) String() string { + out, _ := yaml.Marshal(cr) + return string(out) +} + +// String implements the Stringer interface for a Validator object. +func (v Validator) String() string { + out, _ := yaml.Marshal(v) + return string(out) +} + +// String returns a human readable string representation of a Delegation. +func (d Delegation) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} + +// String implements the Stringer interface for a Description object. +func (d Description) String() string { + out, _ := yaml.Marshal(d) + return string(out) +} + +// String returns a human readable string representation of the parameters. +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + +// unmarshal the current staking params value from store key or panic +func MustUnmarshalParams(cdc *codec.LegacyAmino, value []byte) Params { + params, err := UnmarshalParams(cdc, value) + if err != nil { + panic(err) + } + + return params +} + +// unmarshal the current staking params value from store key +func UnmarshalParams(cdc *codec.LegacyAmino, value []byte) (params Params, err error) { + err = cdc.Unmarshal(value, ¶ms) + if err != nil { + return + } + + return +} + +func (v Validator) GetOperator() sdk.ValAddress { + if v.OperatorAddress == "" { + return nil + } + addr, err := sdk.ValAddressFromBech32(v.OperatorAddress) + if err != nil { + panic(err) + } + return addr +} + +func (d Delegation) GetDelegatorAddr() sdk.AccAddress { + delAddr := sdk.MustAccAddressFromBech32(d.DelegatorAddress) + + return delAddr +} + +func (d Delegation) GetValidatorAddr() sdk.ValAddress { + addr, err := sdk.ValAddressFromBech32(d.ValidatorAddress) + if err != nil { + panic(err) + } + return addr +} diff --git a/x/staking/migrations/v3/types/staking.pb.go b/x/staking/migrations/v3/types/staking.pb.go new file mode 100644 index 000000000000..9ac7274adca2 --- /dev/null +++ b/x/staking/migrations/v3/types/staking.pb.go @@ -0,0 +1,3445 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/staking/v1beta1/staking.proto + +package types + +import ( + bytes "bytes" + compress_gzip "compress/gzip" + fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + io_ioutil "io/ioutil" + math "math" + math_bits "math/bits" + reflect "reflect" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 + +// BondStatus is the status of a validator. +type BondStatus int32 + +const ( + // UNSPECIFIED defines an invalid validator status. + Unspecified BondStatus = 0 + // UNBONDED defines a validator that is not bonded. + Unbonded BondStatus = 1 + // UNBONDING defines a validator that is unbonding. + Unbonding BondStatus = 2 + // BONDED defines a validator that is bonded. + Bonded BondStatus = 3 +) + +var BondStatus_name = map[int32]string{ + 0: "BOND_STATUS_UNSPECIFIED", + 1: "BOND_STATUS_UNBONDED", + 2: "BOND_STATUS_UNBONDING", + 3: "BOND_STATUS_BONDED", +} + +var BondStatus_value = map[string]int32{ + "BOND_STATUS_UNSPECIFIED": 0, + "BOND_STATUS_UNBONDED": 1, + "BOND_STATUS_UNBONDING": 2, + "BOND_STATUS_BONDED": 3, +} + +func (x BondStatus) String() string { + return proto.EnumName(BondStatus_name, int32(x)) +} + +func (BondStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{0} +} + +// CommissionRates defines the initial commission rates to be used for creating +// a validator. +type CommissionRates struct { + // rate is the commission rate charged to delegators, as a fraction. + Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. + MaxRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_rate" yaml:"max_rate"` + // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. + MaxChangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_change_rate" yaml:"max_change_rate"` +} + +func (m *CommissionRates) Reset() { *m = CommissionRates{} } +func (*CommissionRates) ProtoMessage() {} +func (*CommissionRates) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{1} +} +func (m *CommissionRates) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommissionRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommissionRates.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 *CommissionRates) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommissionRates.Merge(m, src) +} +func (m *CommissionRates) XXX_Size() int { + return m.Size() +} +func (m *CommissionRates) XXX_DiscardUnknown() { + xxx_messageInfo_CommissionRates.DiscardUnknown(m) +} + +var xxx_messageInfo_CommissionRates proto.InternalMessageInfo + +// Commission defines commission parameters for a given validator. +type Commission struct { + // commission_rates defines the initial commission rates to be used for creating a validator. + CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` + // update_time is the last time the commission rate was changed. + UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"` +} + +func (m *Commission) Reset() { *m = Commission{} } +func (*Commission) ProtoMessage() {} +func (*Commission) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{2} +} +func (m *Commission) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Commission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Commission.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 *Commission) XXX_Merge(src proto.Message) { + xxx_messageInfo_Commission.Merge(m, src) +} +func (m *Commission) XXX_Size() int { + return m.Size() +} +func (m *Commission) XXX_DiscardUnknown() { + xxx_messageInfo_Commission.DiscardUnknown(m) +} + +var xxx_messageInfo_Commission proto.InternalMessageInfo + +func (m *Commission) GetUpdateTime() time.Time { + if m != nil { + return m.UpdateTime + } + return time.Time{} +} + +// Description defines a validator description. +type Description struct { + // moniker defines a human-readable name for the validator. + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + // identity defines an optional identity signature (ex. UPort or Keybase). + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + // website defines an optional website link. + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + // security_contact defines an optional email for security contact. + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty" yaml:"security_contact"` + // details define other optional details. + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *Description) Reset() { *m = Description{} } +func (*Description) ProtoMessage() {} +func (*Description) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{3} +} +func (m *Description) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Description) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Description.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 *Description) XXX_Merge(src proto.Message) { + xxx_messageInfo_Description.Merge(m, src) +} +func (m *Description) XXX_Size() int { + return m.Size() +} +func (m *Description) XXX_DiscardUnknown() { + xxx_messageInfo_Description.DiscardUnknown(m) +} + +var xxx_messageInfo_Description proto.InternalMessageInfo + +func (m *Description) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *Description) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *Description) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *Description) GetSecurityContact() string { + if m != nil { + return m.SecurityContact + } + return "" +} + +func (m *Description) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +// Validator defines a validator, together with the total amount of the +// Validator's bond shares and their exchange rate to coins. Slashing results in +// a decrease in the exchange rate, allowing correct calculation of future +// undelegations without iterating over delegators. When coins are delegated to +// this validator, the validator is credited with a delegation whose number of +// bond shares is based on the amount of coins delegated divided by the current +// exchange rate. Voting power can be calculated as total bonded shares +// multiplied by exchange rate. +type Validator struct { + // operator_address defines the address of the validator's operator; bech encoded in JSON. + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + ConsensusPubkey *types1.Any `protobuf:"bytes,2,opt,name=consensus_pubkey,json=consensusPubkey,proto3" json:"consensus_pubkey,omitempty" yaml:"consensus_pubkey"` + // jailed defined whether the validator has been jailed from bonded status or not. + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + // status is the validator status (bonded/unbonding/unbonded). + Status BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty"` + // tokens define the delegated tokens (incl. self-delegation). + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens"` + // delegator_shares defines total shares issued to a validator's delegators. + DelegatorShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=delegator_shares,json=delegatorShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"delegator_shares" yaml:"delegator_shares"` + // description defines the description terms for the validator. + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description"` + // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. + UnbondingHeight int64 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty" yaml:"unbonding_height"` + // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. + UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` + // commission defines the commission parameters. + Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` + // min_self_delegation is the validator's self declared minimum self delegation. + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` + // strictly positive if this validator's unbonding has been stopped by external modules + UnbondingOnHoldRefCount int64 `protobuf:"varint,12,opt,name=unbonding_on_hold_ref_count,json=unbondingOnHoldRefCount,proto3" json:"unbonding_on_hold_ref_count,omitempty"` + // list of unbonding ids, each uniquely identifing an unbonding of this validator + UnbondingIds []uint64 `protobuf:"varint,13,rep,packed,name=unbonding_ids,json=unbondingIds,proto3" json:"unbonding_ids,omitempty"` +} + +func (m *Validator) Reset() { *m = Validator{} } +func (*Validator) ProtoMessage() {} +func (*Validator) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{4} +} +func (m *Validator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Validator.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 *Validator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validator.Merge(m, src) +} +func (m *Validator) XXX_Size() int { + return m.Size() +} +func (m *Validator) XXX_DiscardUnknown() { + xxx_messageInfo_Validator.DiscardUnknown(m) +} + +var xxx_messageInfo_Validator proto.InternalMessageInfo + +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +type Delegation struct { + // delegator_address is the bech32-encoded address of the delegator. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + // validator_address is the bech32-encoded address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + // shares define the delegation shares received. + Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` +} + +func (m *Delegation) Reset() { *m = Delegation{} } +func (*Delegation) ProtoMessage() {} +func (*Delegation) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{10} +} +func (m *Delegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Delegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Delegation.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 *Delegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Delegation.Merge(m, src) +} +func (m *Delegation) XXX_Size() int { + return m.Size() +} +func (m *Delegation) XXX_DiscardUnknown() { + xxx_messageInfo_Delegation.DiscardUnknown(m) +} + +var xxx_messageInfo_Delegation proto.InternalMessageInfo + +// Params defines the parameters for the staking module. +type Params struct { + // unbonding_time is the time duration of unbonding. + UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` + // max_validators is the maximum number of validators. + MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty" yaml:"max_validators"` + // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). + MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty" yaml:"max_entries"` + // historical_entries is the number of historical entries to persist. + HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` + // bond_denom defines the bondable coin denomination. + BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{15} +} +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) GetUnbondingTime() time.Duration { + if m != nil { + return m.UnbondingTime + } + return 0 +} + +func (m *Params) GetMaxValidators() uint32 { + if m != nil { + return m.MaxValidators + } + return 0 +} + +func (m *Params) GetMaxEntries() uint32 { + if m != nil { + return m.MaxEntries + } + return 0 +} + +func (m *Params) GetHistoricalEntries() uint32 { + if m != nil { + return m.HistoricalEntries + } + return 0 +} + +func (m *Params) GetBondDenom() string { + if m != nil { + return m.BondDenom + } + return "" +} + +func init() { + proto.RegisterEnum("cosmos.staking.v1beta1.BondStatus.v3", BondStatus_name, BondStatus_value) + proto.RegisterType((*CommissionRates)(nil), "cosmos.staking.v1beta1.CommissionRates.v3") + proto.RegisterType((*Commission)(nil), "cosmos.staking.v1beta1.Commission.v3") + proto.RegisterType((*Description)(nil), "cosmos.staking.v1beta1.Description.v3") + proto.RegisterType((*Validator)(nil), "cosmos.staking.v1beta1.Validator.v3") + proto.RegisterType((*Delegation)(nil), "cosmos.staking.v1beta1.Delegation.v3") + proto.RegisterType((*Params)(nil), "cosmos.staking.v1beta1.Params.v3") +} + +func init() { + proto.RegisterFile("cosmos/staking/v1beta1/staking.proto", fileDescriptor_64c30c6cf92913c9) +} + +var fileDescriptor_64c30c6cf92913c9 = []byte{ + // 2021 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4f, 0x6c, 0x23, 0x57, + 0x19, 0xf7, 0xd8, 0xae, 0xe3, 0x7c, 0x4e, 0xe2, 0xe4, 0x6d, 0x76, 0xd7, 0xf1, 0x2e, 0xb6, 0x77, + 0x5a, 0x95, 0xb0, 0x6a, 0x1d, 0x36, 0xad, 0x8a, 0x88, 0x90, 0x68, 0x1c, 0x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98, 0xfe, 0xf0, 0x93, 0x52, 0xe2, 0xf6, 0x2f, 0x14, 0x98, 0x6b, 0x3a, + 0xfb, 0x9e, 0x61, 0xf2, 0x0b, 0xc6, 0x68, 0x80, 0xd1, 0xeb, 0x70, 0xa3, 0xb9, 0xbd, 0xa9, 0xad, + 0x6f, 0xb4, 0x9b, 0xf7, 0xb6, 0xf5, 0xf6, 0x77, 0x77, 0x1a, 0x31, 0x03, 0xae, 0x1c, 0x9f, 0x54, + 0xf2, 0xa1, 0x50, 0xa3, 0x3f, 0xa0, 0x23, 0xb4, 0x32, 0x29, 0x55, 0xbf, 0xb7, 0x5b, 0xbb, 0xdb, + 0xd0, 0x5b, 0xcd, 0xb7, 0xb6, 0xe7, 0x95, 0xe2, 0xdc, 0xf1, 0x49, 0x05, 0xea, 0xee, 0xb0, 0xd3, + 0xc3, 0x2d, 0xbb, 0xeb, 0xa0, 0xdb, 0x50, 0x98, 0x14, 0x78, 0x77, 0xbb, 0xdd, 0x7c, 0xa7, 0x31, + 0x9f, 0x14, 0x96, 0xd7, 0xdd, 0xf7, 0x1d, 0x36, 0x09, 0xc4, 0x59, 0x6b, 0x9b, 0x9f, 0x3e, 0x2a, + 0x29, 0x0f, 0x1f, 0x95, 0x94, 0xbf, 0x3d, 0x2a, 0x29, 0x1f, 0x3d, 0x2e, 0x25, 0x1e, 0x3e, 0x2e, + 0x25, 0xfe, 0xf4, 0xb8, 0x94, 0xf8, 0xde, 0x2b, 0x4f, 0xcc, 0x9e, 0xa3, 0xe0, 0x0f, 0x23, 0x3c, + 0x8f, 0x3a, 0x19, 0x3e, 0x88, 0x5e, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0xe2, 0xd3, + 0xf7, 0x37, 0x19, 0x00, 0x00, +} + +func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 12543 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x74, 0x1c, 0xd7, + 0x75, 0x18, 0x66, 0x3f, 0x80, 0xdd, 0x8b, 0x05, 0xb0, 0x78, 0x00, 0x49, 0x70, 0x49, 0x01, 0xd0, + 0xe8, 0x8b, 0xa2, 0x24, 0x50, 0xa2, 0x44, 0x4a, 0x04, 0x6d, 0xcb, 0xbb, 0xc0, 0x12, 0x80, 0x84, + 0x2f, 0x0d, 0x40, 0x4a, 0x96, 0x3f, 0x26, 0x83, 0xdd, 0x87, 0xc5, 0x88, 0xbb, 0x33, 0xe3, 0x9d, + 0x59, 0x12, 0x50, 0x92, 0x1e, 0xc5, 0x76, 0x52, 0x9b, 0x39, 0x6d, 0xe2, 0xba, 0xa7, 0x51, 0x9c, + 0xd0, 0x95, 0xe3, 0xb4, 0x4e, 0x9c, 0xb4, 0xf9, 0x72, 0xf3, 0xd1, 0xf6, 0xb4, 0x4e, 0x7b, 0xd2, + 0x24, 0x4e, 0xd3, 0x63, 0xb7, 0x39, 0x6d, 0x9a, 0x93, 0xd2, 0xa9, 0xec, 0xb6, 0xae, 0xeb, 0x26, + 0x8e, 0xea, 0x36, 0xe9, 0xf1, 0x49, 0xd3, 0xf3, 0xbe, 0xe6, 0x6b, 0x77, 0x76, 0x76, 0x21, 0xd2, + 0x4e, 0xea, 0xfe, 0x02, 0xde, 0x9d, 0x7b, 0xef, 0x7b, 0xef, 0xbe, 0xfb, 0xee, 0xbd, 0xef, 0xbe, + 0x8f, 0x85, 0x9f, 0xbb, 0x08, 0xb3, 0x35, 0xd3, 0xac, 0xd5, 0xf1, 0x19, 0xab, 0x69, 0x3a, 0xe6, + 0x4e, 0x6b, 0xf7, 0x4c, 0x15, 0xdb, 0x95, 0xa6, 0x6e, 0x39, 0x66, 0x73, 0x8e, 0xc2, 0xd0, 0x18, + 0xc3, 0x98, 0x13, 0x18, 0xf2, 0x1a, 0x8c, 0x5f, 0xd2, 0xeb, 0x78, 0xd1, 0x45, 0xdc, 0xc2, 0x0e, + 0x7a, 0x0a, 0x52, 0xbb, 0x7a, 0x1d, 0x4f, 0x49, 0xb3, 0xc9, 0x53, 0xc3, 0x67, 0xef, 0x9d, 0x0b, + 0x11, 0xcd, 0x05, 0x29, 0x36, 0x09, 0x58, 0xa1, 0x14, 0xf2, 0x97, 0x52, 0x30, 0xd1, 0xe1, 0x2b, + 0x42, 0x90, 0x32, 0xb4, 0x06, 0xe1, 0x28, 0x9d, 0xca, 0x2a, 0xf4, 0x7f, 0x34, 0x05, 0x43, 0x96, + 0x56, 0xb9, 0xaa, 0xd5, 0xf0, 0x54, 0x82, 0x82, 0x45, 0x11, 0x4d, 0x03, 0x54, 0xb1, 0x85, 0x8d, + 0x2a, 0x36, 0x2a, 0x07, 0x53, 0xc9, 0xd9, 0xe4, 0xa9, 0xac, 0xe2, 0x83, 0xa0, 0x87, 0x60, 0xdc, + 0x6a, 0xed, 0xd4, 0xf5, 0x8a, 0xea, 0x43, 0x83, 0xd9, 0xe4, 0xa9, 0xb4, 0x92, 0x67, 0x1f, 0x16, + 0x3d, 0xe4, 0x07, 0x60, 0xec, 0x3a, 0xd6, 0xae, 0xfa, 0x51, 0x87, 0x29, 0xea, 0x28, 0x01, 0xfb, + 0x10, 0x17, 0x20, 0xd7, 0xc0, 0xb6, 0xad, 0xd5, 0xb0, 0xea, 0x1c, 0x58, 0x78, 0x2a, 0x45, 0x7b, + 0x3f, 0xdb, 0xd6, 0xfb, 0x70, 0xcf, 0x87, 0x39, 0xd5, 0xf6, 0x81, 0x85, 0x51, 0x11, 0xb2, 0xd8, + 0x68, 0x35, 0x18, 0x87, 0x74, 0x84, 0xfc, 0xca, 0x46, 0xab, 0x11, 0xe6, 0x92, 0x21, 0x64, 0x9c, + 0xc5, 0x90, 0x8d, 0x9b, 0xd7, 0xf4, 0x0a, 0x9e, 0x1a, 0xa4, 0x0c, 0x1e, 0x68, 0x63, 0xb0, 0xc5, + 0xbe, 0x87, 0x79, 0x08, 0x3a, 0xb4, 0x00, 0x59, 0xbc, 0xef, 0x60, 0xc3, 0xd6, 0x4d, 0x63, 0x6a, + 0x88, 0x32, 0xb9, 0xaf, 0xc3, 0x28, 0xe2, 0x7a, 0x35, 0xcc, 0xc2, 0xa3, 0x43, 0xe7, 0x61, 0xc8, + 0xb4, 0x1c, 0xdd, 0x34, 0xec, 0xa9, 0xcc, 0xac, 0x74, 0x6a, 0xf8, 0xec, 0xc9, 0x8e, 0x8a, 0xb0, + 0xc1, 0x70, 0x14, 0x81, 0x8c, 0x56, 0x20, 0x6f, 0x9b, 0xad, 0x66, 0x05, 0xab, 0x15, 0xb3, 0x8a, + 0x55, 0xdd, 0xd8, 0x35, 0xa7, 0xb2, 0x94, 0xc1, 0x4c, 0x7b, 0x47, 0x28, 0xe2, 0x82, 0x59, 0xc5, + 0x2b, 0xc6, 0xae, 0xa9, 0x8c, 0xda, 0x81, 0x32, 0x3a, 0x0a, 0x83, 0xf6, 0x81, 0xe1, 0x68, 0xfb, + 0x53, 0x39, 0xaa, 0x21, 0xbc, 0x24, 0xff, 0xca, 0x20, 0x8c, 0xf5, 0xa2, 0x62, 0x17, 0x21, 0xbd, + 0x4b, 0x7a, 0x39, 0x95, 0xe8, 0x47, 0x06, 0x8c, 0x26, 0x28, 0xc4, 0xc1, 0x43, 0x0a, 0xb1, 0x08, + 0xc3, 0x06, 0xb6, 0x1d, 0x5c, 0x65, 0x1a, 0x91, 0xec, 0x51, 0xa7, 0x80, 0x11, 0xb5, 0xab, 0x54, + 0xea, 0x50, 0x2a, 0xf5, 0x02, 0x8c, 0xb9, 0x4d, 0x52, 0x9b, 0x9a, 0x51, 0x13, 0xba, 0x79, 0x26, + 0xae, 0x25, 0x73, 0x65, 0x41, 0xa7, 0x10, 0x32, 0x65, 0x14, 0x07, 0xca, 0x68, 0x11, 0xc0, 0x34, + 0xb0, 0xb9, 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, 0x41, 0xa3, 0xd5, 0xd8, 0xc1, 0x4d, 0x2a, + 0xa4, 0xb4, 0xc2, 0x4b, 0xa8, 0x08, 0xe9, 0xba, 0xb6, 0x83, 0xeb, 0x53, 0xa9, 0x59, 0xe9, 0xd4, + 0xe8, 0xd9, 0x87, 0x7a, 0x9a, 0x95, 0x73, 0xab, 0x84, 0x44, 0x61, 0x94, 0xe8, 0x6d, 0x90, 0xe2, + 0x26, 0x9a, 0x70, 0x38, 0xdd, 0x1b, 0x07, 0x32, 0x97, 0x14, 0x4a, 0x87, 0x4e, 0x40, 0x96, 0xfc, + 0x65, 0xba, 0x31, 0x48, 0xdb, 0x9c, 0x21, 0x00, 0xa2, 0x17, 0xa8, 0x00, 0x19, 0x3a, 0x4d, 0xaa, + 0x58, 0xb8, 0x36, 0xb7, 0x4c, 0x14, 0xab, 0x8a, 0x77, 0xb5, 0x56, 0xdd, 0x51, 0xaf, 0x69, 0xf5, + 0x16, 0xa6, 0x0a, 0x9f, 0x55, 0x72, 0x1c, 0x78, 0x85, 0xc0, 0xd0, 0x0c, 0x0c, 0xb3, 0x59, 0xa5, + 0x1b, 0x55, 0xbc, 0x4f, 0xad, 0x67, 0x5a, 0x61, 0x13, 0x6d, 0x85, 0x40, 0x48, 0xf5, 0x2f, 0xd9, + 0xa6, 0x21, 0x54, 0x93, 0x56, 0x41, 0x00, 0xb4, 0xfa, 0x27, 0xc3, 0x86, 0xfb, 0xae, 0xce, 0xdd, + 0x6b, 0x9b, 0x4b, 0x0f, 0xc0, 0x18, 0xc5, 0x78, 0x9c, 0x0f, 0xbd, 0x56, 0x9f, 0x1a, 0x9f, 0x95, + 0x4e, 0x65, 0x94, 0x51, 0x06, 0xde, 0xe0, 0x50, 0xf9, 0x17, 0x13, 0x90, 0xa2, 0x86, 0x65, 0x0c, + 0x86, 0xb7, 0xdf, 0xb1, 0x59, 0x56, 0x17, 0x37, 0x2e, 0x97, 0x56, 0xcb, 0x79, 0x09, 0x8d, 0x02, + 0x50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, 0x19, 0xce, 0xc4, 0x46, 0x67, 0x21, 0x69, 0x5a, 0x36, + 0x3f, 0x50, 0x52, 0x88, 0xea, 0xca, 0x86, 0x55, 0x4a, 0x91, 0x48, 0x45, 0x21, 0xc8, 0x25, 0x25, + 0xd2, 0xa8, 0x3e, 0xe5, 0x33, 0xaa, 0xbe, 0x21, 0xf7, 0xfd, 0xcb, 0x86, 0xb4, 0x4d, 0x1d, 0x5c, + 0x65, 0xf9, 0x78, 0x02, 0xa6, 0x7d, 0x5f, 0xaf, 0xe1, 0xa6, 0xad, 0x9b, 0x06, 0xf7, 0xe7, 0x4c, + 0x5b, 0x90, 0xaf, 0x91, 0xfc, 0x7b, 0x84, 0xba, 0xbc, 0x15, 0x92, 0x45, 0xcb, 0x42, 0x05, 0xc8, + 0xd0, 0x72, 0xc5, 0x64, 0xfa, 0x92, 0x52, 0xdc, 0x32, 0xf9, 0x66, 0x9b, 0xbb, 0xce, 0x75, 0xad, + 0xe9, 0x5e, 0x21, 0x14, 0x65, 0xf9, 0x02, 0x64, 0x17, 0x4c, 0xc3, 0xc6, 0x86, 0xdd, 0xa2, 0x73, + 0x70, 0xa7, 0x6e, 0x56, 0xae, 0x72, 0x0e, 0xac, 0x40, 0x04, 0xae, 0x59, 0x16, 0xa5, 0x4c, 0x29, + 0xe4, 0x5f, 0x16, 0x1b, 0x96, 0xb6, 0x22, 0x45, 0x74, 0xa1, 0x7f, 0x11, 0xf1, 0x4e, 0xba, 0x32, + 0xfa, 0x33, 0x09, 0x4e, 0xb6, 0x4f, 0xa8, 0xab, 0xf8, 0xc0, 0xee, 0x77, 0x3e, 0xbd, 0x00, 0xd9, + 0x4d, 0x7a, 0x8f, 0xff, 0x59, 0x7c, 0x80, 0x0a, 0x30, 0x84, 0xab, 0x67, 0xcf, 0x9d, 0x7b, 0xec, + 0x02, 0xd3, 0xf6, 0xe5, 0x01, 0x45, 0x00, 0xd0, 0x34, 0x64, 0x6d, 0x5c, 0xb1, 0xce, 0x9e, 0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 0x0d, + 0xaf, 0x61, 0x96, 0x39, 0xa0, 0x69, 0xeb, 0xf9, 0xcc, 0x2f, 0xbf, 0x36, 0x23, 0xd1, 0x0d, 0xde, + 0x79, 0x18, 0x09, 0xc8, 0x9c, 0xde, 0xdb, 0xb6, 0x2c, 0xd5, 0xbf, 0xec, 0x4b, 0x29, 0xa0, 0x59, + 0x16, 0x47, 0xf3, 0xd1, 0xbe, 0x08, 0x39, 0x62, 0x6f, 0x71, 0x95, 0x93, 0xde, 0x0f, 0x63, 0xcc, + 0x1f, 0x84, 0x87, 0x85, 0x05, 0x64, 0x6b, 0x62, 0x6c, 0x64, 0x11, 0xa1, 0x05, 0x47, 0x68, 0x58, + 0x60, 0x2d, 0x69, 0x76, 0xe9, 0xf2, 0x4f, 0xbc, 0x3e, 0x2d, 0xdd, 0xb9, 0xf9, 0x7c, 0x73, 0x19, + 0x4e, 0xf8, 0x3e, 0x6a, 0x3b, 0x15, 0x3d, 0x90, 0xc0, 0x18, 0xf3, 0x69, 0x26, 0xf9, 0x18, 0x97, + 0x88, 0xe8, 0x9a, 0x0e, 0xe9, 0x9e, 0x7f, 0x2b, 0x74, 0x37, 0x2c, 0xf1, 0x39, 0x92, 0xce, 0x69, + 0xcf, 0x0f, 0x67, 0x60, 0x48, 0xc1, 0xef, 0x6d, 0x61, 0xdb, 0x41, 0x67, 0x21, 0x85, 0x2b, 0x7b, + 0x66, 0xa7, 0x0c, 0x13, 0xe9, 0xdc, 0x1c, 0xc7, 0x2b, 0x57, 0xf6, 0xcc, 0xe5, 0x01, 0x85, 0xe2, + 0xa2, 0x73, 0x90, 0xde, 0xad, 0xb7, 0x78, 0xca, 0x23, 0x64, 0x73, 0xfc, 0x44, 0x97, 0x08, 0xd2, + 0xf2, 0x80, 0xc2, 0xb0, 0x49, 0x55, 0xf4, 0x91, 0xce, 0x64, 0xf7, 0xaa, 0x56, 0x8c, 0x5d, 0x5a, + 0x15, 0xc1, 0x45, 0x25, 0x00, 0x1b, 0x3b,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 0x1b, 0x53, 0x11, 0x50, 0x72, 0x76, 0x13, + 0x2e, 0xb1, 0x97, 0xd1, 0x95, 0x15, 0x18, 0x0d, 0x1a, 0x78, 0x34, 0x0a, 0x09, 0x67, 0x9f, 0x0b, + 0x20, 0xe1, 0xec, 0xa3, 0x47, 0x79, 0xf2, 0x27, 0x41, 0x93, 0x3f, 0xed, 0xde, 0x95, 0xd3, 0x79, + 0x99, 0x1f, 0x59, 0x76, 0x67, 0x83, 0x6b, 0xf4, 0xc3, 0x5c, 0xe5, 0x07, 0x61, 0x2c, 0x64, 0xd5, + 0xa3, 0x52, 0x81, 0xf2, 0x18, 0x8c, 0x04, 0x4c, 0xb8, 0x7c, 0x14, 0x26, 0x3b, 0x59, 0x64, 0x79, + 0xcf, 0x85, 0x07, 0x2c, 0x2b, 0x3a, 0x07, 0x19, 0xd7, 0x24, 0x77, 0x48, 0x3d, 0xd0, 0x5e, 0x08, + 0x64, 0xc5, 0x45, 0x0d, 0x64, 0xb0, 0x13, 0x81, 0x0c, 0xb6, 0xfc, 0x1d, 0x30, 0x15, 0x65, 0x6e, + 0x43, 0xdd, 0x48, 0xb9, 0x6a, 0x78, 0x14, 0x06, 0xf9, 0xb3, 0x61, 0x09, 0xba, 0x67, 0xc3, 0x4b, + 0x44, 0x3d, 0x99, 0xe9, 0x4d, 0xb2, 0xad, 0x1c, 0x5a, 0x90, 0x55, 0x38, 0x1e, 0x69, 0x72, 0xa3, + 0x77, 0x7f, 0x18, 0x23, 0xbe, 0xfb, 0x53, 0x11, 0xcd, 0xb1, 0x69, 0x5f, 0xc5, 0x89, 0x07, 0x56, + 0x92, 0xff, 0x53, 0x06, 0x32, 0x0a, 0xb6, 0x2d, 0x62, 0x13, 0x50, 0x09, 0xb2, 0x78, 0xbf, 0x82, + 0x2d, 0xc7, 0xdb, 0x75, 0xe9, 0x14, 0x4c, 0x30, 0xec, 0xb2, 0xc0, 0x24, 0x9e, 0xdc, 0x25, 0x43, + 0x8f, 0xf3, 0x80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78, 0x4d, 0xab, 0xb3, 0x13, 0xce, 0x49, 0xba, 0xc6, 0x88, 0x78, 0xff, 0x21, 0x1c, 0x96, 0x70, + 0x32, 0xf9, 0x67, 0xe8, 0xd1, 0xc9, 0x46, 0x43, 0xb7, 0xd9, 0xef, 0x91, 0x92, 0x35, 0x41, 0x09, + 0x52, 0x4d, 0xcd, 0xe1, 0x21, 0x79, 0x69, 0x8e, 0x3f, 0x45, 0x72, 0x7f, 0x0f, 0x0f, 0x6b, 0x2c, + 0xe2, 0x8a, 0x42, 0x69, 0xd1, 0xbb, 0x80, 0xac, 0x31, 0x54, 0xca, 0x87, 0x5d, 0x63, 0x2a, 0xf6, + 0xc7, 0xe7, 0x8d, 0x5b, 0x33, 0x63, 0x07, 0x5a, 0xa3, 0x3e, 0x2f, 0x0b, 0x3e, 0xb2, 0x42, 0x96, + 0x2a, 0xa4, 0x89, 0xc8, 0x82, 0x31, 0x02, 0xad, 0xec, 0x69, 0x46, 0x0d, 0xb3, 0x4a, 0x68, 0xce, + 0xa9, 0xb4, 0xdc, 0x77, 0x25, 0x47, 0xbd, 0x4a, 0x7c, 0xec, 0x64, 0x65, 0xa4, 0xa1, 0xed, 0x2f, + 0x50, 0x00, 0xa9, 0x71, 0x3e, 0xf3, 0xea, 0x6b, 0x33, 0x03, 0xf4, 0x04, 0xdf, 0xe7, 0x25, 0x00, + 0x4f, 0x62, 0xe8, 0x5d, 0x90, 0xaf, 0xb8, 0x25, 0x4a, 0x2b, 0x32, 0xd3, 0x0f, 0x44, 0x8d, 0x45, + 0x48, 0xde, 0x2c, 0xaa, 0xfb, 0xdc, 0xad, 0x19, 0x49, 0x19, 0xab, 0x84, 0x86, 0xe2, 0x9d, 0x30, + 0xcc, 0x92, 0x41, 0x2a, 0x8d, 0x10, 0x13, 0xb1, 0x11, 0xe2, 0x34, 0xe1, 0xf5, 0xc6, 0xad, 0x19, + 0xc4, 0xba, 0xe5, 0x23, 0x96, 0x69, 0xdc, 0x08, 0x0c, 0x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f7, 0xb3, 0x6f, 0xdc, + 0x9a, 0x39, 0x19, 0xee, 0xbd, 0x0f, 0x4d, 0x56, 0x26, 0xbc, 0xfb, 0x59, 0xcd, 0x4a, 0x47, 0xae, + 0x55, 0xdb, 0x71, 0xb9, 0x26, 0xa3, 0xb9, 0xfa, 0xd0, 0xfc, 0x5c, 0x17, 0x6d, 0xa7, 0xb3, 0x68, + 0xb7, 0x60, 0xd8, 0x13, 0x89, 0x8d, 0x16, 0x21, 0xe3, 0xf0, 0xff, 0xb9, 0x84, 0xe5, 0x68, 0x09, + 0x0b, 0x32, 0x71, 0x45, 0x44, 0x50, 0xca, 0x7f, 0x2a, 0x01, 0xf8, 0xa6, 0xc5, 0x5f, 0x48, 0x15, + 0x23, 0xde, 0x82, 0xdb, 0xf6, 0xe4, 0xa1, 0xa2, 0x41, 0x4e, 0x1d, 0x92, 0xe7, 0xf7, 0x27, 0x60, + 0xe2, 0xb2, 0x98, 0xb0, 0x7f, 0xe1, 0x65, 0xb0, 0x09, 0x43, 0xd8, 0x70, 0x9a, 0x3a, 0x16, 0x1b, + 0x69, 0x8f, 0x46, 0x8d, 0x76, 0x87, 0x3e, 0xd1, 0x1f, 0xad, 0x14, 0xb7, 0x72, 0x38, 0x9b, 0x90, + 0x34, 0xbe, 0x96, 0x84, 0xa9, 0x28, 0x4a, 0xb4, 0x00, 0x63, 0x95, 0x26, 0x66, 0x0f, 0xbd, 0xf9, + 0x13, 0xcb, 0xa5, 0x82, 0x17, 0xbc, 0x86, 0x10, 0x64, 0x65, 0x54, 0x40, 0xb8, 0x83, 0xaa, 0x01, + 0x89, 0x2c, 0x89, 0xda, 0xd1, 0xf7, 0xe2, 0x7a, 0x0b, 0x25, 0x65, 0xee, 0xa1, 0x44, 0x25, 0x41, + 0x06, 0xcc, 0x45, 0x8d, 0x7a, 0x50, 0xea, 0xa3, 0xde, 0x0b, 0x63, 0xe2, 0x88, 0xec, 0x8e, 0x56, + 0xd7, 0x8c, 0xca, 0x61, 0x02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0x2e, 0x6e, + 0x04, 0x89, 0xbf, 0x5d, 0xaf, 0x9d, 0x78, 0x32, 0x4e, 0x1d, 0x46, 0xc6, 0x57, 0xa9, 0x61, 0x08, + 0xc9, 0xd2, 0x4d, 0x78, 0xad, 0xb5, 0xdf, 0xb8, 0xea, 0xe7, 0x47, 0x33, 0x42, 0xf7, 0xaa, 0xe4, + 0x2f, 0x49, 0x30, 0xb2, 0x66, 0xd7, 0x2e, 0x1b, 0xd5, 0xff, 0xa7, 0xf5, 0x76, 0x17, 0x8e, 0x04, + 0x7a, 0x79, 0x87, 0xc4, 0x79, 0xf6, 0xa3, 0x29, 0x48, 0xae, 0xd9, 0x35, 0xf4, 0x5e, 0x18, 0x0b, + 0x07, 0x0a, 0x91, 0xf1, 0x5f, 0xbb, 0x17, 0x88, 0x5e, 0xa3, 0x45, 0x7b, 0x0c, 0x74, 0x15, 0x46, + 0x82, 0xde, 0xe2, 0x54, 0x17, 0x26, 0x01, 0xcc, 0xc2, 0xa3, 0xbd, 0x62, 0xba, 0x95, 0xbd, 0x0b, + 0x32, 0xae, 0xa1, 0xbb, 0xa7, 0x0b, 0xb5, 0x40, 0x8a, 0x8e, 0x68, 0x3b, 0x98, 0x13, 0x22, 0xbd, + 0xb0, 0x29, 0xe9, 0x26, 0xbd, 0x10, 0x6e, 0x57, 0xe9, 0x45, 0x4d, 0xab, 0x1d, 0x00, 0xdf, 0x1c, + 0xb8, 0xaf, 0x0b, 0x07, 0x0f, 0xad, 0xf0, 0x48, 0x4f, 0x68, 0xee, 0x46, 0xd3, 0x6d, 0x0e, 0xc0, + 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x97, 0xcb, 0xb2, 0x05, 0xc2, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *CommissionRates) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CommissionRates) + if !ok { + that2, ok := that.(CommissionRates) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Rate.Equal(that1.Rate) { + return false + } + if !this.MaxRate.Equal(that1.MaxRate) { + return false + } + if !this.MaxChangeRate.Equal(that1.MaxChangeRate) { + return false + } + return true +} +func (this *Commission) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Commission) + if !ok { + that2, ok := that.(Commission) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CommissionRates.Equal(&that1.CommissionRates) { + return false + } + if !this.UpdateTime.Equal(that1.UpdateTime) { + return false + } + return true +} +func (this *Description) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Description) + if !ok { + that2, ok := that.(Description) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Moniker != that1.Moniker { + return false + } + if this.Identity != that1.Identity { + return false + } + if this.Website != that1.Website { + return false + } + if this.SecurityContact != that1.SecurityContact { + return false + } + if this.Details != that1.Details { + return false + } + return true +} +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.UnbondingTime != that1.UnbondingTime { + return false + } + if this.MaxValidators != that1.MaxValidators { + return false + } + if this.MaxEntries != that1.MaxEntries { + return false + } + if this.HistoricalEntries != that1.HistoricalEntries { + return false + } + if this.BondDenom != that1.BondDenom { + return false + } + return true +} + +func (m *CommissionRates) 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 *CommissionRates) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommissionRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MaxChangeRate.Size() + i -= size + if _, err := m.MaxChangeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.MaxRate.Size() + i -= size + if _, err := m.MaxRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Rate.Size() + i -= size + if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Commission) 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 *Commission) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commission) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintStaking(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + { + size, err := m.CommissionRates.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Description) 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 *Description) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.SecurityContact) > 0 { + i -= len(m.SecurityContact) + copy(dAtA[i:], m.SecurityContact) + i = encodeVarintStaking(dAtA, i, uint64(len(m.SecurityContact))) + i-- + dAtA[i] = 0x22 + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1a + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x12 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Validator) 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 *Validator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UnbondingIds) > 0 { + dAtA5 := make([]byte, len(m.UnbondingIds)*10) + var j4 int + for _, num := range m.UnbondingIds { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintStaking(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0x6a + } + if m.UnbondingOnHoldRefCount != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingOnHoldRefCount)) + i-- + dAtA[i] = 0x60 + } + { + size := m.MinSelfDelegation.Size() + i -= size + if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintStaking(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x4a + if m.UnbondingHeight != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.UnbondingHeight)) + i-- + dAtA[i] = 0x40 + } + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.DelegatorShares.Size() + i -= size + if _, err := m.DelegatorShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.Status != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Jailed { + i-- + if m.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ConsensusPubkey != nil { + { + size, err := m.ConsensusPubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintStaking(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Delegation) 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 *Delegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Shares.Size() + i -= size + if _, err := m.Shares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintStaking(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 = encodeVarintStaking(dAtA, i, uint64(len(m.DelegatorAddress))) + 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 len(m.BondDenom) > 0 { + i -= len(m.BondDenom) + copy(dAtA[i:], m.BondDenom) + i = encodeVarintStaking(dAtA, i, uint64(len(m.BondDenom))) + i-- + dAtA[i] = 0x2a + } + if m.HistoricalEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.HistoricalEntries)) + i-- + dAtA[i] = 0x20 + } + if m.MaxEntries != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxEntries)) + i-- + dAtA[i] = 0x18 + } + if m.MaxValidators != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.MaxValidators)) + i-- + dAtA[i] = 0x10 + } + n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime):]) + if err12 != nil { + return 0, err12 + } + i -= n12 + i = encodeVarintStaking(dAtA, i, uint64(n12)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { + offset -= sovStaking(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *CommissionRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Rate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxRate.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MaxChangeRate.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Commission) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CommissionRates.Size() + n += 1 + l + sovStaking(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdateTime) + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Description) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.SecurityContact) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *Validator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + if m.ConsensusPubkey != nil { + l = m.ConsensusPubkey.Size() + n += 1 + l + sovStaking(uint64(l)) + } + if m.Jailed { + n += 2 + } + if m.Status != 0 { + n += 1 + sovStaking(uint64(m.Status)) + } + l = m.Tokens.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.DelegatorShares.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.Description.Size() + n += 1 + l + sovStaking(uint64(l)) + if m.UnbondingHeight != 0 { + n += 1 + sovStaking(uint64(m.UnbondingHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + l = m.Commission.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.MinSelfDelegation.Size() + n += 1 + l + sovStaking(uint64(l)) + if m.UnbondingOnHoldRefCount != 0 { + n += 1 + sovStaking(uint64(m.UnbondingOnHoldRefCount)) + } + if len(m.UnbondingIds) > 0 { + l = 0 + for _, e := range m.UnbondingIds { + l += sovStaking(uint64(e)) + } + n += 1 + sovStaking(uint64(l)) + l + } + return n +} + +func (m *Delegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = m.Shares.Size() + n += 1 + l + sovStaking(uint64(l)) + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingTime) + n += 1 + l + sovStaking(uint64(l)) + if m.MaxValidators != 0 { + n += 1 + sovStaking(uint64(m.MaxValidators)) + } + if m.MaxEntries != 0 { + n += 1 + sovStaking(uint64(m.MaxEntries)) + } + if m.HistoricalEntries != 0 { + n += 1 + sovStaking(uint64(m.HistoricalEntries)) + } + l = len(m.BondDenom) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func sovStaking(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStaking(x uint64) (n int) { + return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func valueToStringStaking(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func (m *CommissionRates) 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 ErrIntOverflowStaking + } + 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: CommissionRates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommissionRates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxChangeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxChangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commission) 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 ErrIntOverflowStaking + } + 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: Commission: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commission: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommissionRates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommissionRates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Description) 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 ErrIntOverflowStaking + } + 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: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecurityContact = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Validator) 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 ErrIntOverflowStaking + } + 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: Validator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Validator: 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 ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + 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 ConsensusPubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusPubkey == nil { + m.ConsensusPubkey = &types1.Any{} + } + if err := m.ConsensusPubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorShares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DelegatorShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingHeight", wireType) + } + m.UnbondingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + 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 ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingOnHoldRefCount", wireType) + } + m.UnbondingOnHoldRefCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingOnHoldRefCount |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UnbondingIds = append(m.UnbondingIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.UnbondingIds) == 0 { + m.UnbondingIds = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UnbondingIds = append(m.UnbondingIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingIds", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Delegation) 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 ErrIntOverflowStaking + } + 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: Delegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delegation: 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 ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + 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 ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + 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 Shares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + 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 ErrIntOverflowStaking + } + 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 UnbondingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStaking + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) + } + m.MaxValidators = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxValidators |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) + } + m.MaxEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + } + m.HistoricalEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricalEntries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BondDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipStaking(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, ErrIntOverflowStaking + } + 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, ErrIntOverflowStaking + } + 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, ErrIntOverflowStaking + } + 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, ErrInvalidLengthStaking + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStaking + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStaking + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStaking = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStaking = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStaking = fmt.Errorf("proto: unexpected end of group") +) \ No newline at end of file diff --git a/x/staking/module.go b/x/staking/module.go index 3892a8aa93ac..80bec1ec3b38 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -141,6 +141,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { m := keeper.NewMigrator(am.keeper) cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) + + 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 staking module. It returns @@ -161,7 +165,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } +func (AppModule) ConsensusVersion() uint64 { return 3 } // BeginBlock returns the begin blocker for the staking module. func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { diff --git a/x/staking/simulation/genesis.go b/x/staking/simulation/genesis.go index cf4e8e50c44d..2e1277ad10fa 100644 --- a/x/staking/simulation/genesis.go +++ b/x/staking/simulation/genesis.go @@ -11,14 +11,18 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/simulation" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/staking/types" ) // Simulation parameter constants const ( - unbondingTime = "unbonding_time" - maxValidators = "max_validators" - historicalEntries = "historical_entries" + UnbondingTime = "unbonding_time" + MaxValidators = "max_validators" + HistoricalEntries = "historical_entries" + ValidatorBondFactor = "validator_bond_factor" + GlobalLiquidStakingCap = "global_liquid_staking_cap" + ValidatorLiquidStakingCap = "validator_liquid_staking_cap" ) // genUnbondingTime returns randomized UnbondingTime @@ -36,34 +40,73 @@ func getHistEntries(r *rand.Rand) uint32 { return uint32(r.Intn(int(types.DefaultHistoricalEntries + 1))) } +// getGlobalLiquidStakingCap returns randomized GlobalLiquidStakingCap between 0-1. +func getGlobalLiquidStakingCap(r *rand.Rand) sdk.Dec { + return simtypes.RandomDecAmount(r, sdk.OneDec()) +} + +// getValidatorLiquidStakingCap returns randomized ValidatorLiquidStakingCap between 0-1. +func getValidatorLiquidStakingCap(r *rand.Rand) sdk.Dec { + return simtypes.RandomDecAmount(r, sdk.OneDec()) +} + +// getValidatorBondFactor returns randomized ValidatorBondCap between -1 and 300. +func getValidatorBondFactor(r *rand.Rand) sdk.Dec { + return sdk.NewDec(int64(simtypes.RandIntBetween(r, -1, 300))) +} + // RandomizedGenState generates a random GenesisState for staking func RandomizedGenState(simState *module.SimulationState) { // params var ( - unbondTime time.Duration - maxVals uint32 - histEntries uint32 + unbondingTime time.Duration + maxValidators uint32 + historicalEntries uint32 + validatorBondFactor sdk.Dec + globalLiquidStakingCap sdk.Dec + validatorLiquidStakingCap sdk.Dec ) simState.AppParams.GetOrGenerate( - simState.Cdc, unbondingTime, &unbondTime, simState.Rand, - func(r *rand.Rand) { unbondTime = genUnbondingTime(r) }, + simState.Cdc, UnbondingTime, &unbondingTime, simState.Rand, + func(r *rand.Rand) { unbondingTime = genUnbondingTime(r) }, ) simState.AppParams.GetOrGenerate( - simState.Cdc, maxValidators, &maxVals, simState.Rand, - func(r *rand.Rand) { maxVals = genMaxValidators(r) }, + simState.Cdc, MaxValidators, &maxValidators, simState.Rand, + func(r *rand.Rand) { maxValidators = genMaxValidators(r) }, ) simState.AppParams.GetOrGenerate( - simState.Cdc, historicalEntries, &histEntries, simState.Rand, - func(r *rand.Rand) { histEntries = getHistEntries(r) }, + simState.Cdc, HistoricalEntries, &historicalEntries, simState.Rand, + func(r *rand.Rand) { historicalEntries = getHistEntries(r) }, + ) + simState.AppParams.GetOrGenerate( + simState.Cdc, ValidatorBondFactor, &validatorBondFactor, simState.Rand, + func(r *rand.Rand) { validatorBondFactor = getValidatorBondFactor(r) }, + ) + simState.AppParams.GetOrGenerate( + simState.Cdc, GlobalLiquidStakingCap, &globalLiquidStakingCap, simState.Rand, + func(r *rand.Rand) { globalLiquidStakingCap = getGlobalLiquidStakingCap(r) }, + ) + simState.AppParams.GetOrGenerate( + simState.Cdc, ValidatorLiquidStakingCap, &validatorLiquidStakingCap, simState.Rand, + func(r *rand.Rand) { validatorLiquidStakingCap = getValidatorLiquidStakingCap(r) }, ) // NOTE: the slashing module need to be defined after the staking module on the // NewSimulationManager constructor for this to work - simState.UnbondTime = unbondTime - params := types.NewParams(simState.UnbondTime, maxVals, 7, histEntries, sdk.DefaultBondDenom) + simState.UnbondTime = unbondingTime + params := types.NewParams( + simState.UnbondTime, + maxValidators, + 7, + historicalEntries, + sdk.DefaultBondDenom, + validatorBondFactor, + globalLiquidStakingCap, + validatorLiquidStakingCap, + ) // validators & delegations var ( @@ -92,7 +135,7 @@ func RandomizedGenState(simState *module.SimulationState) { validator.DelegatorShares = sdk.NewDec(simState.InitialStake) validator.Commission = commission - delegation := types.NewDelegation(simState.Accounts[i].Address, valAddr, sdk.NewDec(simState.InitialStake)) + delegation := types.NewDelegation(simState.Accounts[i].Address, valAddr, sdk.NewDecFromInt(sdk.NewInt((simState.InitialStake)))) validators = append(validators, validator) delegations = append(delegations, delegation) diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index 464e8a404906..b48205227ee9 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -60,10 +60,9 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, "BOND_STATUS_UNBONDED", stakingGenesis.Validators[2].Status.String()) require.Equal(t, "1000", stakingGenesis.Validators[2].Tokens.String()) require.Equal(t, "1000.000000000000000000", stakingGenesis.Validators[2].DelegatorShares.String()) - require.Equal(t, "0.292059246265731326", stakingGenesis.Validators[2].Commission.CommissionRates.Rate.String()) - require.Equal(t, "0.330000000000000000", stakingGenesis.Validators[2].Commission.CommissionRates.MaxRate.String()) - require.Equal(t, "0.038337453731274481", stakingGenesis.Validators[2].Commission.CommissionRates.MaxChangeRate.String()) - require.Equal(t, "1", stakingGenesis.Validators[2].MinSelfDelegation.String()) + require.Equal(t, "0.019527679037870745", stakingGenesis.Validators[2].Commission.CommissionRates.Rate.String()) + require.Equal(t, "0.240000000000000000", stakingGenesis.Validators[2].Commission.CommissionRates.MaxRate.String()) + require.Equal(t, "0.240000000000000000", stakingGenesis.Validators[2].Commission.CommissionRates.MaxChangeRate.String()) } // TestRandomizedGenState1 tests abnormal scenarios of applying RandomizedGenState. diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index 2a1c86d635c7..dfbb3acfc84b 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -9,18 +9,28 @@ import ( simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/types" ) // Simulation operation weights constants +// + const ( - OpWeightMsgCreateValidator = "op_weight_msg_create_validator" //nolint:gosec - OpWeightMsgEditValidator = "op_weight_msg_edit_validator" //nolint:gosec - OpWeightMsgDelegate = "op_weight_msg_delegate" //nolint:gosec - OpWeightMsgUndelegate = "op_weight_msg_undelegate" //nolint:gosec - OpWeightMsgBeginRedelegate = "op_weight_msg_begin_redelegate" //nolint:gosec + OpWeightMsgCreateValidator = "op_weight_msg_create_validator" //nolint:gosec + OpWeightMsgEditValidator = "op_weight_msg_edit_validator" //nolint:gosec + OpWeightMsgDelegate = "op_weight_msg_delegate" //nolint:gosec + OpWeightMsgUndelegate = "op_weight_msg_undelegate" //nolint:gosec + OpWeightMsgBeginRedelegate = "op_weight_msg_begin_redelegate" //nolint:gosec + OpWeightMsgCancelUnbondingDelegation = "op_weight_msg_cancel_unbonding_delegation" //nolint:gosec + OpWeightMsgValidatorBond = "op_weight_msg_validator_bond" //nolint:gosec + OpWeightMsgTokenizeShares = "op_weight_msg_tokenize_shares" //nolint:gosec + OpWeightMsgRedeemTokensforShares = "op_weight_msg_redeem_tokens_for_shares" //nolint:gosec + OpWeightMsgTransferTokenizeShareRecord = "op_weight_msg_transfer_tokenize_share_record" //nolint:gosec + OpWeightMsgDisableTokenizeShares = "op_weight_msg_disable_tokenize_shares" //nolint:gosec + OpWeightMsgEnableTokenizeShares = "op_weight_msg_enable_tokenize_shares" //nolint:gosec ) // WeightedOperations returns all the operations from the module with their respective weights @@ -29,11 +39,18 @@ func WeightedOperations( bk types.BankKeeper, k keeper.Keeper, ) simulation.WeightedOperations { var ( - weightMsgCreateValidator int - weightMsgEditValidator int - weightMsgDelegate int - weightMsgUndelegate int - weightMsgBeginRedelegate int + weightMsgCreateValidator int + weightMsgEditValidator int + weightMsgDelegate int + weightMsgUndelegate int + weightMsgBeginRedelegate int + weightMsgCancelUnbondingDelegation int + weightMsgValidatorBond int + weightMsgTokenizeShares int + weightMsgRedeemTokensforShares int + weightMsgTransferTokenizeShareRecord int + weightMsgDisableTokenizeShares int + weightMsgEnableTokenizeShares int ) appParams.GetOrGenerate(cdc, OpWeightMsgCreateValidator, &weightMsgCreateValidator, nil, @@ -66,6 +83,48 @@ func WeightedOperations( }, ) + appParams.GetOrGenerate(cdc, OpWeightMsgCancelUnbondingDelegation, &weightMsgCancelUnbondingDelegation, nil, + func(_ *rand.Rand) { + weightMsgCancelUnbondingDelegation = simappparams.DefaultWeightMsgCancelUnbondingDelegation + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgValidatorBond, &weightMsgValidatorBond, nil, + func(_ *rand.Rand) { + weightMsgValidatorBond = simappparams.DefaultWeightMsgValidatorBond + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgTokenizeShares, &weightMsgTokenizeShares, nil, + func(_ *rand.Rand) { + weightMsgTokenizeShares = simappparams.DefaultWeightMsgTokenizeShares + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgRedeemTokensforShares, &weightMsgRedeemTokensforShares, nil, + func(_ *rand.Rand) { + weightMsgRedeemTokensforShares = simappparams.DefaultWeightMsgRedeemTokensforShares + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgTransferTokenizeShareRecord, &weightMsgTransferTokenizeShareRecord, nil, + func(_ *rand.Rand) { + weightMsgTransferTokenizeShareRecord = simappparams.DefaultWeightMsgTransferTokenizeShareRecord + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgDisableTokenizeShares, &weightMsgDisableTokenizeShares, nil, + func(_ *rand.Rand) { + weightMsgDisableTokenizeShares = simappparams.DefaultWeightMsgDisableTokenizeShares + }, + ) + + appParams.GetOrGenerate(cdc, OpWeightMsgEnableTokenizeShares, &weightMsgEnableTokenizeShares, nil, + func(_ *rand.Rand) { + weightMsgEnableTokenizeShares = simappparams.DefaultWeightMsgEnableTokenizeShares + }, + ) + return simulation.WeightedOperations{ simulation.NewWeightedOperation( weightMsgCreateValidator, @@ -87,6 +146,34 @@ func WeightedOperations( weightMsgBeginRedelegate, SimulateMsgBeginRedelegate(ak, bk, k), ), + simulation.NewWeightedOperation( + weightMsgCancelUnbondingDelegation, + SimulateMsgCancelUnbondingDelegate(ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgValidatorBond, + SimulateMsgValidatorBond(ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgTokenizeShares, + SimulateMsgTokenizeShares(ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgRedeemTokensforShares, + SimulateMsgRedeemTokensforShares(ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgTransferTokenizeShareRecord, + SimulateMsgTransferTokenizeShareRecord(ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgDisableTokenizeShares, + SimulateMsgDisableTokenizeShares(ak, bk, k), + ), + simulation.NewWeightedOperation( + weightMsgEnableTokenizeShares, + SimulateMsgEnableTokenizeShares(ak, bk, k), + ), } } @@ -101,7 +188,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k // ensure the validator doesn't exist already _, found := k.GetValidator(ctx, address) if found { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCreateValidator, "unable to find validator"), nil, nil + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCreateValidator, "validator already exists"), nil, nil } denom := k.GetParams(ctx).BondDenom @@ -123,7 +210,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k var fees sdk.Coins - coins, hasNeg := spendable.SafeSub(sdk.Coins{selfDelegation}) + coins, hasNeg := spendable.SafeSub(sdk.NewCoins(selfDelegation)) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -146,7 +233,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k simtypes.RandomDecAmount(r, maxCommission), ) - msg, err := types.NewMsgCreateValidator(address, simAccount.ConsKey.PubKey(), selfDelegation, description, commission, sdk.OneInt()) + msg, err := types.NewMsgCreateValidator(address, simAccount.ConsKey.PubKey(), selfDelegation, description, commission) if err != nil { return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to create CreateValidator message"), nil, err } @@ -207,7 +294,7 @@ func SimulateMsgEditValidator(ak types.AccountKeeper, bk types.BankKeeper, k kee simtypes.RandStringOfLength(r, 10), ) - msg := types.NewMsgEditValidator(address, description, &newCommissionRate, nil) + msg := types.NewMsgEditValidator(address, description, &newCommissionRate) txCtx := simulation.OperationInput{ R: r, @@ -266,7 +353,7 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K var fees sdk.Coins - coins, hasNeg := spendable.SafeSub(sdk.Coins{bondAmt}) + coins, hasNeg := spendable.SafeSub(sdk.NewCoins(bondAmt)) if !hasNeg { fees, err = simtypes.RandomFees(r, ctx, coins) if err != nil { @@ -332,6 +419,19 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUndelegate, "unbond amount is zero"), nil, nil } + // if delegation is a validator bond, make sure the decrease wont cause the validator bond cap to be exceeded + if delegation.ValidatorBond { + shares, err := validator.SharesFromTokens(unbondAmt) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUndelegate, "unable to calculate shares from tokens"), nil, nil + } + + maxValTotalShare := validator.ValidatorBondShares.Sub(shares).Mul(k.ValidatorBondFactor(ctx)) + if validator.LiquidShares.GT(maxValTotalShare) { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUndelegate, "unbonding validator bond exceeds cap"), nil, nil + } + } + msg := types.NewMsgUndelegate( delAddr, valAddr, sdk.NewCoin(k.BondDenom(ctx), unbondAmt), ) @@ -347,7 +447,7 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper } // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error if simAccount.PrivKey == nil { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "account private key is nil"), nil, fmt.Errorf("delegation addr: %s does not exist in simulation accounts", delAddr) + return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "account private key is nil"), nil, nil } account := ak.GetAccount(ctx, delAddr) @@ -372,6 +472,74 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper } } +// SimulateMsgCancelUnbondingDelegate generates a MsgCancelUnbondingDelegate with random values +func SimulateMsgCancelUnbondingDelegate(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) { + if len(k.GetAllValidators(ctx)) == 0 { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "number of validators equal zero"), nil, nil + } + // get random account + simAccount, _ := simtypes.RandomAcc(r, accs) + // get random validator + validator, ok := keeper.RandomValidator(r, k, ctx) + if !ok { + return simtypes.NoOpMsg(types.ModuleName, "cancel_unbond", "validator is not ok"), nil, nil + } + + if validator.IsJailed() || validator.InvalidExRate() { + return simtypes.NoOpMsg(types.ModuleName, "cancel_unbond", "validator is jailed"), nil, nil + } + + valAddr := validator.GetOperator() + unbondingDelegation, found := k.GetUnbondingDelegation(ctx, simAccount.Address, valAddr) + if !found { + return simtypes.NoOpMsg(types.ModuleName, "cancel_unbond", "account does have any unbonding delegation"), nil, nil + } + + // get random unbonding delegation entry at block height + unbondingDelegationEntry := unbondingDelegation.Entries[r.Intn(len(unbondingDelegation.Entries))] + + if unbondingDelegationEntry.CompletionTime.Before(ctx.BlockTime()) { + return simtypes.NoOpMsg(types.ModuleName, "cancel_unbond", "unbonding delegation is already processed"), nil, nil + } + + if !unbondingDelegationEntry.Balance.IsPositive() { + return simtypes.NoOpMsg(types.ModuleName, "cancel_unbond", "delegator receiving balance is negative"), nil, nil + } + + cancelBondAmt := simtypes.RandomAmount(r, unbondingDelegationEntry.Balance) + + if cancelBondAmt.IsZero() { + return simtypes.NoOpMsg(types.ModuleName, "cancel_unbond", "cancelBondAmt amount is zero"), nil, nil + } + + msg := types.NewMsgCancelUnbondingDelegation( + simAccount.Address, valAddr, ctx.BlockHeight(), sdk.NewCoin(k.BondDenom(ctx), cancelBondAmt), + ) + + spendable := bk.SpendableCoins(ctx, simAccount.Address) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + // SimulateMsgBeginRedelegate generates a MsgBeginRedelegate with random values func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( @@ -432,6 +600,14 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "shares truncate to zero"), nil, nil // skip } + // if delegation is a validator bond, make sure the decrease wont cause the validator bond cap to be exceeded + if delegation.ValidatorBond { + maxValTotalShare := srcVal.ValidatorBondShares.Sub(shares).Mul(k.ValidatorBondFactor(ctx)) + if srcVal.LiquidShares.GT(maxValTotalShare) { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "source validator bond exceeds cap"), nil, nil + } + } + // need to retrieve the simulation account associated with delegation to retrieve PrivKey var simAccount simtypes.Account @@ -444,7 +620,7 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error if simAccount.PrivKey == nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "account private key is nil"), nil, fmt.Errorf("delegation addr: %s does not exist in simulation accounts", delAddr) + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "account private key is nil"), nil, nil } account := ak.GetAccount(ctx, delAddr) @@ -473,3 +649,425 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k return simulation.GenAndDeliverTxWithRandFees(txCtx) } } + +func SimulateMsgValidatorBond(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) { + // get random validator + validator, ok := keeper.RandomValidator(r, k, ctx) + if !ok { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgValidatorBond, "unable to pick validator"), nil, nil + } + + valAddr := validator.GetOperator() + delegations := k.GetValidatorDelegations(ctx, validator.GetOperator()) + if delegations == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgValidatorBond, "keeper does have any delegation entries"), nil, nil + } + + // get random delegator from validator + delegation := delegations[r.Intn(len(delegations))] + delAddr := delegation.GetDelegatorAddr() + + totalBond := validator.TokensFromShares(delegation.GetShares()).TruncateInt() + if !totalBond.IsPositive() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgValidatorBond, "total bond is negative"), nil, nil + } + + // submit validator bond + msg := &types.MsgValidatorBond{ + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), + } + + // need to retrieve the simulation account associated with delegation to retrieve PrivKey + var simAccount simtypes.Account + + for _, simAcc := range accs { + if simAcc.Address.Equals(delAddr) { + simAccount = simAcc + break + } + } + // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error + if simAccount.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "account private key is nil"), nil, nil + } + + account := ak.GetAccount(ctx, delAddr) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +// SimulateMsgTokenizeShares generates a MsgTokenizeShares with random values +func SimulateMsgTokenizeShares(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) { + // get random source validator + validator, ok := keeper.RandomValidator(r, k, ctx) + if !ok { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "unable to pick validator"), nil, nil + } + + srcAddr := validator.GetOperator() + delegations := k.GetValidatorDelegations(ctx, srcAddr) + if delegations == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "keeper does have any delegation entries"), nil, nil + } + + // get random delegator from src validator + delegation := delegations[r.Intn(len(delegations))] + delAddr := delegation.GetDelegatorAddr() + + // make sure delegation is not a validator bond + if delegation.ValidatorBond { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "can't tokenize a validator bond"), nil, nil + } + + // make sure tokenizations are not disabled + lockStatus, _ := k.GetTokenizeSharesLock(ctx, delAddr) + if lockStatus != types.TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "tokenize shares disabled"), nil, nil + } + + // get random destination validator + totalBond := validator.TokensFromShares(delegation.GetShares()).TruncateInt() + if !totalBond.IsPositive() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "total bond is negative"), nil, nil + } + + tokenizeShareAmt, err := simtypes.RandPositiveInt(r, totalBond) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "unable to generate positive amount"), nil, err + } + + if tokenizeShareAmt.IsZero() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "amount is zero"), nil, nil + } + + account := ak.GetAccount(ctx, delAddr) + if account, ok := account.(vesting.VestingAccount); ok { + if tokenizeShareAmt.GT(account.GetDelegatedFree().AmountOf(k.BondDenom(ctx))) { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "account vests and amount exceeds free portion"), nil, nil + } + } + + // check if the shares truncate to zero + shares, err := validator.SharesFromTokens(tokenizeShareAmt) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "invalid shares"), nil, err + } + + if validator.TokensFromShares(shares).TruncateInt().IsZero() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "shares truncate to zero"), nil, nil // skip + } + + // check that tokenization would not exceed global cap + params := k.GetParams(ctx) + totalStaked := k.TotalBondedTokens(ctx).ToDec() + if totalStaked.IsZero() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "cannot happened - no validators bonded if stake is 0.0"), nil, nil // skip + } + totalLiquidStaked := k.GetTotalLiquidStakedTokens(ctx).Add(tokenizeShareAmt).ToDec() + liquidStakedPercent := totalLiquidStaked.Quo(totalStaked) + if liquidStakedPercent.GT(params.GlobalLiquidStakingCap) { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "global liquid staking cap exceeded"), nil, nil + } + + // check that tokenization would not exceed validator liquid staking cap + validatorTotalShares := validator.DelegatorShares.Add(shares) + validatorLiquidShares := validator.LiquidShares.Add(shares) + validatorLiquidSharesPercent := validatorLiquidShares.Quo(validatorTotalShares) + if validatorLiquidSharesPercent.GT(params.ValidatorLiquidStakingCap) { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "validator liquid staking cap exceeded"), nil, nil + } + + // check that tokenization would not exceed validator bond cap + maxValidatorLiquidShares := validator.ValidatorBondShares.Mul(params.ValidatorBondFactor) + if validator.LiquidShares.Add(shares).GT(maxValidatorLiquidShares) { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "validator bond cap exceeded"), nil, nil + } + + // need to retrieve the simulation account associated with delegation to retrieve PrivKey + var simAccount simtypes.Account + + for _, simAcc := range accs { + if simAcc.Address.Equals(delAddr) { + simAccount = simAcc + break + } + } + + // if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error + if simAccount.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "account private key is nil"), nil, nil + } + + msg := &types.MsgTokenizeShares{ + DelegatorAddress: delAddr.String(), + ValidatorAddress: srcAddr.String(), + Amount: sdk.NewCoin(k.BondDenom(ctx), tokenizeShareAmt), + TokenizedShareOwner: delAddr.String(), + } + + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +// SimulateMsgRedeemTokensforShares generates a MsgRedeemTokensforShares with random values +func SimulateMsgRedeemTokensforShares(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) { + redeemUser := simtypes.Account{} + redeemCoin := sdk.Coin{} + tokenizeShareRecord := types.TokenizeShareRecord{} + + records := k.GetAllTokenizeShareRecords(ctx) + if len(records) > 0 { + record := records[r.Intn(len(records))] + for _, acc := range accs { + balance := bk.GetBalance(ctx, acc.Address, record.GetShareTokenDenom()) + if balance.Amount.IsPositive() { + redeemUser = acc + redeemAmount, err := simtypes.RandPositiveInt(r, balance.Amount) + if err == nil { + redeemCoin = sdk.NewCoin(record.GetShareTokenDenom(), redeemAmount) + tokenizeShareRecord = record + } + break + } + } + } + + // if redeemUser.PrivKey == nil, redeem user does not exist in accs + if redeemUser.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRedeemTokensForShares, "account private key is nil"), nil, nil + } + + if redeemCoin.Amount.IsZero() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRedeemTokensForShares, "empty balance in tokens"), nil, nil + } + + valAddress, err := sdk.ValAddressFromBech32(tokenizeShareRecord.Validator) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRedeemTokensForShares, "invalid validator address"), nil, fmt.Errorf("invalid validator address") + } + validator, found := k.GetValidator(ctx, valAddress) + if !found { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRedeemTokensForShares, "validator not found"), nil, fmt.Errorf("validator not found") + } + delegation, found := k.GetDelegation(ctx, tokenizeShareRecord.GetModuleAddress(), valAddress) + if !found { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRedeemTokensForShares, "delegation not found"), nil, fmt.Errorf("delegation not found") + } + + // prevent redemption that returns a 0 amount + shareDenomSupply := bk.GetSupply(ctx, tokenizeShareRecord.GetShareTokenDenom()) + shares := delegation.Shares.Mul(sdk.NewDecFromInt(redeemCoin.Amount)).QuoInt(shareDenomSupply.Amount) + + if validator.TokensFromShares(shares).TruncateInt().IsZero() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRedeemTokensForShares, "zero tokens returned"), nil, nil + } + + account := ak.GetAccount(ctx, redeemUser.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + msg := &types.MsgRedeemTokensForShares{ + DelegatorAddress: redeemUser.Address.String(), + Amount: redeemCoin, + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: redeemUser, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +// SimulateMsgTransferTokenizeShareRecord generates a MsgTransferTokenizeShareRecord with random values +func SimulateMsgTransferTokenizeShareRecord(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) { + simAccount, _ := simtypes.RandomAcc(r, accs) + destAccount, _ := simtypes.RandomAcc(r, accs) + transferRecord := types.TokenizeShareRecord{} + + records := k.GetAllTokenizeShareRecords(ctx) + if len(records) > 0 { + record := records[r.Intn(len(records))] + for _, acc := range accs { + if record.Owner == acc.Address.String() { + simAccount = acc + transferRecord = record + break + } + } + } + + // if simAccount.PrivKey == nil, record owner does not exist in accs + if simAccount.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTransferTokenizeShareRecord, "account private key is nil"), nil, nil + } + + if transferRecord.Id == 0 { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTransferTokenizeShareRecord, "share record not found"), nil, nil + } + + account := ak.GetAccount(ctx, simAccount.Address) + spendable := bk.SpendableCoins(ctx, account.GetAddress()) + + msg := &types.MsgTransferTokenizeShareRecord{ + TokenizeShareRecordId: transferRecord.Id, + Sender: simAccount.Address.String(), + NewOwner: destAccount.Address.String(), + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + CoinsSpentInMsg: spendable, + } + + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +func SimulateMsgDisableTokenizeShares(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) { + simAccount, _ := simtypes.RandomAcc(r, accs) + + if simAccount.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDisableTokenizeShares, "account private key is nil"), nil, nil + } + + balance := bk.GetBalance(ctx, simAccount.Address, k.GetParams(ctx).BondDenom).Amount + if !balance.IsPositive() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDisableTokenizeShares, "balance is negative"), nil, nil + } + + lockStatus, _ := k.GetTokenizeSharesLock(ctx, simAccount.Address) + if lockStatus == types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDisableTokenizeShares, "account already locked"), nil, nil + } + + msg := &types.MsgDisableTokenizeShares{ + DelegatorAddress: simAccount.Address.String(), + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +func SimulateMsgEnableTokenizeShares(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) { + simAccount, _ := simtypes.RandomAcc(r, accs) + + if simAccount.PrivKey == nil { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEnableTokenizeShares, "account private key is nil"), nil, nil + } + + balance := bk.GetBalance(ctx, simAccount.Address, k.GetParams(ctx).BondDenom).Amount + if !balance.IsPositive() { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEnableTokenizeShares, "balance is negative"), nil, nil + } + + lockStatus, _ := k.GetTokenizeSharesLock(ctx, simAccount.Address) + if lockStatus != types.TOKENIZE_SHARE_LOCK_STATUS_LOCKED { + return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEnableTokenizeShares, "account is not locked"), nil, nil + } + + msg := &types.MsgEnableTokenizeShares{ + DelegatorAddress: simAccount.Address.String(), + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + AccountKeeper: ak, + Bankkeeper: bk, + ModuleName: types.ModuleName, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 37c01d993c46..2c2b1cad2edc 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -47,6 +47,13 @@ func TestWeightedOperations(t *testing.T) { {simappparams.DefaultWeightMsgDelegate, types.ModuleName, types.TypeMsgDelegate}, {simappparams.DefaultWeightMsgUndelegate, types.ModuleName, types.TypeMsgUndelegate}, {simappparams.DefaultWeightMsgBeginRedelegate, types.ModuleName, types.TypeMsgBeginRedelegate}, + {simappparams.DefaultWeightMsgCancelUnbondingDelegation, types.ModuleName, types.TypeMsgCancelUnbondingDelegation}, + {simappparams.DefaultWeightMsgValidatorBond, types.ModuleName, types.TypeMsgValidatorBond}, + {simappparams.DefaultWeightMsgTokenizeShares, types.ModuleName, types.TypeMsgTokenizeShares}, + {simappparams.DefaultWeightMsgRedeemTokensforShares, types.ModuleName, types.TypeMsgRedeemTokensForShares}, + {simappparams.DefaultWeightMsgTransferTokenizeShareRecord, types.ModuleName, types.TypeMsgTransferTokenizeShareRecord}, + {simappparams.DefaultWeightMsgDisableTokenizeShares, types.ModuleName, types.TypeMsgDisableTokenizeShares}, + {simappparams.DefaultWeightMsgEnableTokenizeShares, types.ModuleName, types.TypeMsgEnableTokenizeShares}, } for i, w := range weightesOps { diff --git a/x/staking/spec/07_events.md b/x/staking/spec/07_events.md index f219fa2ca4c1..3f10e53c9139 100644 --- a/x/staking/spec/07_events.md +++ b/x/staking/spec/07_events.md @@ -35,7 +35,6 @@ The staking module emits the following events: | Type | Attribute Key | Attribute Value | | -------------- | ------------------- | ------------------- | | edit_validator | commission_rate | {commissionRate} | -| edit_validator | min_self_delegation | {minSelfDelegation} | | message | module | staking | | message | action | edit_validator | | message | sender | {senderAddress} | diff --git a/x/staking/spec/09_client.md b/x/staking/spec/09_client.md index 608705352cfc..751476fd0a91 100644 --- a/x/staking/spec/09_client.md +++ b/x/staking/spec/09_client.md @@ -753,8 +753,7 @@ Example Output: "maxChangeRate": "10000000000000000" }, "updateTime": "2021-10-01T05:52:50.380144238Z" - }, - "minSelfDelegation": "1" + } } ], "pagination": { diff --git a/x/staking/teststaking/helper.go b/x/staking/teststaking/helper.go index 25b021df07a1..525462024493 100644 --- a/x/staking/teststaking/helper.go +++ b/x/staking/teststaking/helper.go @@ -49,13 +49,13 @@ func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotype // CreateValidatorMsg returns a message used to create validator in this service. func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount sdk.Int) *stakingtypes.MsgCreateValidator { coin := sdk.NewCoin(sh.Denom, stakeAmount) - msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission, sdk.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission) require.NoError(sh.t, err) return msg } func (sh *Helper) createValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, coin sdk.Coin, ok bool) { - msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission, sdk.OneInt()) + msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission) require.NoError(sh.t, err) sh.Handle(msg, ok) } @@ -81,6 +81,21 @@ func (sh *Helper) Undelegate(delegator sdk.AccAddress, val sdk.ValAddress, amoun return sh.Handle(msg, ok) } +func (sh *Helper) TokenizeShares(delegator sdk.AccAddress, val sdk.ValAddress, amount sdk.Coin, shareOwner sdk.AccAddress, ok bool) { + msg := stakingtypes.NewMsgTokenizeShares(delegator, val, amount, shareOwner) + sh.Handle(msg, ok) +} + +func (sh *Helper) RedeemTokensForShares(delegator sdk.AccAddress, amount sdk.Coin, ok bool) { + msg := stakingtypes.NewMsgRedeemTokensForShares(delegator, amount) + sh.Handle(msg, ok) +} + +func (sh *Helper) TranserTokenizeShareRecord(recordID uint64, owner, newOwner sdk.AccAddress, ok bool) { + msg := stakingtypes.NewMsgTransferTokenizeShareRecord(recordID, owner, newOwner) + sh.Handle(msg, ok) +} + // Handle calls staking handler on a given message func (sh *Helper) Handle(msg sdk.Msg, ok bool) *sdk.Result { res, err := sh.h(sh.Ctx, msg) diff --git a/x/staking/teststaking/validator.go b/x/staking/teststaking/validator.go index 71459581f0e6..5d3cdcbe1206 100644 --- a/x/staking/teststaking/validator.go +++ b/x/staking/teststaking/validator.go @@ -14,5 +14,6 @@ import ( func NewValidator(t testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator { v, err := types.NewValidator(operator, pubKey, types.Description{}) require.NoError(t, err) + v.MinSelfDelegation = sdk.ZeroInt() return v } diff --git a/x/staking/types/codec.go b/x/staking/types/codec.go index 485549077bd0..45be49b55f14 100644 --- a/x/staking/types/codec.go +++ b/x/staking/types/codec.go @@ -4,6 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/authz" @@ -17,6 +18,14 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgDelegate{}, "cosmos-sdk/MsgDelegate", nil) cdc.RegisterConcrete(&MsgUndelegate{}, "cosmos-sdk/MsgUndelegate", nil) cdc.RegisterConcrete(&MsgBeginRedelegate{}, "cosmos-sdk/MsgBeginRedelegate", nil) + cdc.RegisterConcrete(&MsgCancelUnbondingDelegation{}, "cosmos-sdk/MsgCancelUnbondingDelegation", nil) + cdc.RegisterConcrete(&MsgValidatorBond{}, "cosmos-sdk/MsgValidatorBond", nil) + cdc.RegisterConcrete(&MsgUnbondValidator{}, "cosmos-sdk/MsgUnbondValidator", nil) + cdc.RegisterConcrete(&MsgTokenizeShares{}, "cosmos-sdk/MsgTokenizeShares", nil) + cdc.RegisterConcrete(&MsgRedeemTokensForShares{}, "cosmos-sdk/MsgRedeemTokensForShares", nil) + cdc.RegisterConcrete(&MsgTransferTokenizeShareRecord{}, "cosmos-sdk/MsgTransferTokenizeRecord", nil) + cdc.RegisterConcrete(&MsgDisableTokenizeShares{}, "cosmos-sdk/MsgDisableTokenizeShares", nil) + cdc.RegisterConcrete(&MsgEnableTokenizeShares{}, "cosmos-sdk/MsgEnableTokenizeShares", nil) } // RegisterInterfaces registers the x/staking interfaces types with the interface registry @@ -27,6 +36,14 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgDelegate{}, &MsgUndelegate{}, &MsgBeginRedelegate{}, + &MsgCancelUnbondingDelegation{}, + &MsgValidatorBond{}, + &MsgUnbondValidator{}, + &MsgTokenizeShares{}, + &MsgRedeemTokensForShares{}, + &MsgTransferTokenizeShareRecord{}, + &MsgDisableTokenizeShares{}, + &MsgEnableTokenizeShares{}, ) registry.RegisterImplementations( (*authz.Authorization)(nil), diff --git a/x/staking/types/delegation.go b/x/staking/types/delegation.go index e1cf042d991e..fc550ebad348 100644 --- a/x/staking/types/delegation.go +++ b/x/staking/types/delegation.go @@ -35,6 +35,7 @@ func NewDelegation(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, s DelegatorAddress: delegatorAddr.String(), ValidatorAddress: validatorAddr.String(), Shares: shares, + ValidatorBond: false, } } @@ -158,8 +159,27 @@ func NewUnbondingDelegation( // AddEntry - append entry to the unbonding delegation func (ubd *UnbondingDelegation) AddEntry(creationHeight int64, minTime time.Time, balance sdk.Int, id uint64) { - entry := NewUnbondingDelegationEntry(creationHeight, minTime, balance, id) - ubd.Entries = append(ubd.Entries, entry) + // Check the entries exists with creation_height and complete_time + entryIndex := -1 + for index, ubdEntry := range ubd.Entries { + if ubdEntry.CreationHeight == creationHeight && ubdEntry.CompletionTime.Equal(minTime) { + entryIndex = index + break + } + } + // entryIndex exists + if entryIndex != -1 { + ubdEntry := ubd.Entries[entryIndex] + ubdEntry.Balance = ubdEntry.Balance.Add(balance) + ubdEntry.InitialBalance = ubdEntry.InitialBalance.Add(balance) + + // update the entry + ubd.Entries[entryIndex] = ubdEntry + } else { + // append the new unbond delegation entry + entry := NewUnbondingDelegationEntry(creationHeight, minTime, balance, id) + ubd.Entries = append(ubd.Entries, entry) + } } // RemoveEntry - remove entry at index i to the unbonding delegation @@ -330,11 +350,16 @@ func (d Redelegations) String() (out string) { // NewDelegationResp creates a new DelegationResponse instance func NewDelegationResp( - delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares sdk.Dec, balance sdk.Coin, + delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, shares sdk.Dec, validatorBond bool, balance sdk.Coin, ) DelegationResponse { return DelegationResponse{ - Delegation: NewDelegation(delegatorAddr, validatorAddr, shares), - Balance: balance, + Delegation: Delegation{ + DelegatorAddress: delegatorAddr.String(), + ValidatorAddress: validatorAddr.String(), + Shares: shares, + ValidatorBond: validatorBond, + }, + Balance: balance, } } @@ -387,7 +412,8 @@ func NewRedelegationResponse( // NewRedelegationEntryResponse creates a new RedelegationEntryResponse instance. func NewRedelegationEntryResponse( - creationHeight int64, completionTime time.Time, sharesDst sdk.Dec, initialBalance, balance sdk.Int, id uint64) RedelegationEntryResponse { + creationHeight int64, completionTime time.Time, sharesDst sdk.Dec, initialBalance, balance sdk.Int, id uint64, +) RedelegationEntryResponse { return RedelegationEntryResponse{ RedelegationEntry: NewRedelegationEntry(creationHeight, completionTime, initialBalance, sharesDst, id), Balance: balance, diff --git a/x/staking/types/delegation_test.go b/x/staking/types/delegation_test.go index ba6fbfe58bfa..ad69802b189d 100644 --- a/x/staking/types/delegation_test.go +++ b/x/staking/types/delegation_test.go @@ -81,9 +81,9 @@ func TestRedelegationString(t *testing.T) { func TestDelegationResponses(t *testing.T) { cdc := codec.NewLegacyAmino() - dr1 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(5), + dr1 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(5), false, sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5))) - dr2 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr3, sdk.NewDec(5), + dr2 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr3, sdk.NewDec(5), false, sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5))) drs := types.DelegationResponses{dr1, dr2} diff --git a/x/staking/types/errors.go b/x/staking/types/errors.go index 10c16276dd98..e2a453fb0cc6 100644 --- a/x/staking/types/errors.go +++ b/x/staking/types/errors.go @@ -11,44 +11,62 @@ import ( // // REF: https://github.com/cosmos/cosmos-sdk/issues/5450 var ( - ErrEmptyValidatorAddr = sdkerrors.Register(ModuleName, 2, "empty validator address") - ErrNoValidatorFound = sdkerrors.Register(ModuleName, 3, "validator does not exist") - ErrValidatorOwnerExists = sdkerrors.Register(ModuleName, 4, "validator already exist for this operator address; must use new validator operator address") - ErrValidatorPubKeyExists = sdkerrors.Register(ModuleName, 5, "validator already exist for this pubkey; must use new validator pubkey") - ErrValidatorPubKeyTypeNotSupported = sdkerrors.Register(ModuleName, 6, "validator pubkey type is not supported") - ErrValidatorJailed = sdkerrors.Register(ModuleName, 7, "validator for this address is currently jailed") - ErrBadRemoveValidator = sdkerrors.Register(ModuleName, 8, "failed to remove validator") - ErrCommissionNegative = sdkerrors.Register(ModuleName, 9, "commission must be positive") - ErrCommissionHuge = sdkerrors.Register(ModuleName, 10, "commission cannot be more than 100%") - ErrCommissionGTMaxRate = sdkerrors.Register(ModuleName, 11, "commission cannot be more than the max rate") - ErrCommissionUpdateTime = sdkerrors.Register(ModuleName, 12, "commission cannot be changed more than once in 24h") - ErrCommissionChangeRateNegative = sdkerrors.Register(ModuleName, 13, "commission change rate must be positive") - ErrCommissionChangeRateGTMaxRate = sdkerrors.Register(ModuleName, 14, "commission change rate cannot be more than the max rate") - ErrCommissionGTMaxChangeRate = sdkerrors.Register(ModuleName, 15, "commission cannot be changed more than max change rate") - ErrSelfDelegationBelowMinimum = sdkerrors.Register(ModuleName, 16, "validator's self delegation must be greater than their minimum self delegation") - ErrMinSelfDelegationDecreased = sdkerrors.Register(ModuleName, 17, "minimum self delegation cannot be decrease") - ErrEmptyDelegatorAddr = sdkerrors.Register(ModuleName, 18, "empty delegator address") - ErrNoDelegation = sdkerrors.Register(ModuleName, 19, "no delegation for (address, validator) tuple") - ErrBadDelegatorAddr = sdkerrors.Register(ModuleName, 20, "delegator does not exist with address") - ErrNoDelegatorForAddress = sdkerrors.Register(ModuleName, 21, "delegator does not contain delegation") - ErrInsufficientShares = sdkerrors.Register(ModuleName, 22, "insufficient delegation shares") - ErrDelegationValidatorEmpty = sdkerrors.Register(ModuleName, 23, "cannot delegate to an empty validator") - ErrNotEnoughDelegationShares = sdkerrors.Register(ModuleName, 24, "not enough delegation shares") - ErrNotMature = sdkerrors.Register(ModuleName, 25, "entry not mature") - ErrNoUnbondingDelegation = sdkerrors.Register(ModuleName, 26, "no unbonding delegation found") - ErrMaxUnbondingDelegationEntries = sdkerrors.Register(ModuleName, 27, "too many unbonding delegation entries for (delegator, validator) tuple") - ErrNoRedelegation = sdkerrors.Register(ModuleName, 28, "no redelegation found") - ErrSelfRedelegation = sdkerrors.Register(ModuleName, 29, "cannot redelegate to the same validator") - ErrTinyRedelegationAmount = sdkerrors.Register(ModuleName, 30, "too few tokens to redelegate (truncates to zero tokens)") - ErrBadRedelegationDst = sdkerrors.Register(ModuleName, 31, "redelegation destination validator not found") - ErrTransitiveRedelegation = sdkerrors.Register(ModuleName, 32, "redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation") - ErrMaxRedelegationEntries = sdkerrors.Register(ModuleName, 33, "too many redelegation entries for (delegator, src-validator, dst-validator) tuple") - ErrDelegatorShareExRateInvalid = sdkerrors.Register(ModuleName, 34, "cannot delegate to validators with invalid (zero) ex-rate") - ErrBothShareMsgsGiven = sdkerrors.Register(ModuleName, 35, "both shares amount and shares percent provided") - ErrNeitherShareMsgsGiven = sdkerrors.Register(ModuleName, 36, "neither shares amount nor shares percent provided") - ErrInvalidHistoricalInfo = sdkerrors.Register(ModuleName, 37, "invalid historical info") - ErrNoHistoricalInfo = sdkerrors.Register(ModuleName, 38, "no historical info found") - ErrEmptyValidatorPubKey = sdkerrors.Register(ModuleName, 39, "empty validator public key") - ErrUnbondingNotFound = sdkerrors.Register(ModuleName, 40, "unbonding operation not found") - ErrUnbondingOnHoldRefCountNegative = sdkerrors.Register(ModuleName, 41, "cannot un-hold unbonding operation that is not on hold") + ErrEmptyValidatorAddr = sdkerrors.Register(ModuleName, 2, "empty validator address") + ErrNoValidatorFound = sdkerrors.Register(ModuleName, 3, "validator does not exist") + ErrValidatorOwnerExists = sdkerrors.Register(ModuleName, 4, "validator already exist for this operator address; must use new validator operator address") + ErrValidatorPubKeyExists = sdkerrors.Register(ModuleName, 5, "validator already exist for this pubkey; must use new validator pubkey") + ErrValidatorPubKeyTypeNotSupported = sdkerrors.Register(ModuleName, 6, "validator pubkey type is not supported") + ErrValidatorJailed = sdkerrors.Register(ModuleName, 7, "validator for this address is currently jailed") + ErrBadRemoveValidator = sdkerrors.Register(ModuleName, 8, "failed to remove validator") + ErrCommissionNegative = sdkerrors.Register(ModuleName, 9, "commission must be positive") + ErrCommissionHuge = sdkerrors.Register(ModuleName, 10, "commission cannot be more than 100%") + ErrCommissionGTMaxRate = sdkerrors.Register(ModuleName, 11, "commission cannot be more than the max rate") + ErrCommissionUpdateTime = sdkerrors.Register(ModuleName, 12, "commission cannot be changed more than once in 24h") + ErrCommissionChangeRateNegative = sdkerrors.Register(ModuleName, 13, "commission change rate must be positive") + ErrCommissionChangeRateGTMaxRate = sdkerrors.Register(ModuleName, 14, "commission change rate cannot be more than the max rate") + ErrCommissionGTMaxChangeRate = sdkerrors.Register(ModuleName, 15, "commission cannot be changed more than max change rate") + ErrSelfDelegationBelowMinimum = sdkerrors.Register(ModuleName, 16, "validator's self delegation must be greater than their minimum self delegation") + ErrMinSelfDelegationDecreased = sdkerrors.Register(ModuleName, 17, "minimum self delegation cannot be decrease") + ErrEmptyDelegatorAddr = sdkerrors.Register(ModuleName, 18, "empty delegator address") + ErrNoDelegation = sdkerrors.Register(ModuleName, 19, "no delegation for (address, validator) tuple") + ErrBadDelegatorAddr = sdkerrors.Register(ModuleName, 20, "delegator does not exist with address") + ErrNoDelegatorForAddress = sdkerrors.Register(ModuleName, 21, "delegator does not contain delegation") + ErrInsufficientShares = sdkerrors.Register(ModuleName, 22, "insufficient delegation shares") + ErrDelegationValidatorEmpty = sdkerrors.Register(ModuleName, 23, "cannot delegate to an empty validator") + ErrNotEnoughDelegationShares = sdkerrors.Register(ModuleName, 24, "not enough delegation shares") + ErrNotMature = sdkerrors.Register(ModuleName, 25, "entry not mature") + ErrNoUnbondingDelegation = sdkerrors.Register(ModuleName, 26, "no unbonding delegation found") + ErrMaxUnbondingDelegationEntries = sdkerrors.Register(ModuleName, 27, "too many unbonding delegation entries for (delegator, validator) tuple") + ErrNoRedelegation = sdkerrors.Register(ModuleName, 28, "no redelegation found") + ErrSelfRedelegation = sdkerrors.Register(ModuleName, 29, "cannot redelegate to the same validator") + ErrTinyRedelegationAmount = sdkerrors.Register(ModuleName, 30, "too few tokens to redelegate (truncates to zero tokens)") + ErrBadRedelegationDst = sdkerrors.Register(ModuleName, 31, "redelegation destination validator not found") + ErrTransitiveRedelegation = sdkerrors.Register(ModuleName, 32, "redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation") + ErrMaxRedelegationEntries = sdkerrors.Register(ModuleName, 33, "too many redelegation entries for (delegator, src-validator, dst-validator) tuple") + ErrDelegatorShareExRateInvalid = sdkerrors.Register(ModuleName, 34, "cannot delegate to validators with invalid (zero) ex-rate") + ErrBothShareMsgsGiven = sdkerrors.Register(ModuleName, 35, "both shares amount and shares percent provided") + ErrNeitherShareMsgsGiven = sdkerrors.Register(ModuleName, 36, "neither shares amount nor shares percent provided") + ErrInvalidHistoricalInfo = sdkerrors.Register(ModuleName, 37, "invalid historical info") + ErrNoHistoricalInfo = sdkerrors.Register(ModuleName, 38, "no historical info found") + ErrEmptyValidatorPubKey = sdkerrors.Register(ModuleName, 39, "empty validator public key") + ErrUnbondingNotFound = sdkerrors.Register(ModuleName, 40, "unbonding operation not found") + ErrUnbondingOnHoldRefCountNegative = sdkerrors.Register(ModuleName, 41, "cannot un-hold unbonding operation that is not on hold") + ErrNotEnoughBalance = sdkerrors.Register(ModuleName, 101, "not enough balance") + ErrTokenizeShareRecordNotExists = sdkerrors.Register(ModuleName, 102, "tokenize share record not exists") + ErrTokenizeShareRecordAlreadyExists = sdkerrors.Register(ModuleName, 103, "tokenize share record already exists") + ErrNotTokenizeShareRecordOwner = sdkerrors.Register(ModuleName, 104, "not tokenize share record owner") + ErrExceedingFreeVestingDelegations = sdkerrors.Register(ModuleName, 105, "trying to exceed vested free delegation for vesting account") + ErrOnlyBondDenomAllowdForTokenize = sdkerrors.Register(ModuleName, 106, "only bond denom is allowed for tokenize") + ErrInsufficientValidatorBondShares = sdkerrors.Register(ModuleName, 107, "insufficient validator bond shares") + ErrRedelegationNotAllowedForValidatorBond = sdkerrors.Register(ModuleName, 108, "redelegation is not allowed for validator bond delegation") + ErrValidatorBondNotAllowedForTokenizeShare = sdkerrors.Register(ModuleName, 109, "validator bond delegation is not allowed to tokenize share") + ErrValidatorBondNotAllowedFromModuleAccount = sdkerrors.Register(ModuleName, 110, "validator bond is not allowed from a module account") + ErrGlobalLiquidStakingCapExceeded = sdkerrors.Register(ModuleName, 111, "delegation or tokenization exceeds the global cap") + ErrValidatorLiquidStakingCapExceeded = sdkerrors.Register(ModuleName, 112, "delegation or tokenization exceeds the validator cap") + ErrTokenizeSharesDisabledForAccount = sdkerrors.Register(ModuleName, 113, "tokenize shares currently disabled for account") + ErrUnableToDisableTokenizeShares = sdkerrors.Register(ModuleName, 114, "unable to disable tokenize shares for account") + ErrTokenizeSharesAlreadyEnabledForAccount = sdkerrors.Register(ModuleName, 115, "tokenize shares is already enabled for this account") + ErrTokenizeSharesAlreadyDisabledForAccount = sdkerrors.Register(ModuleName, 116, "tokenize shares is already disabled for this account") + ErrValidatorLiquidSharesUnderflow = sdkerrors.Register(ModuleName, 117, "validator liquid shares underflow") + ErrTotalLiquidStakedUnderflow = sdkerrors.Register(ModuleName, 118, "total liquid staked underflow") ) diff --git a/x/staking/types/events.go b/x/staking/types/events.go index 99a0be1ad626..8bdb3a05a710 100644 --- a/x/staking/types/events.go +++ b/x/staking/types/events.go @@ -2,21 +2,27 @@ package types // staking module event types const ( - EventTypeCompleteUnbonding = "complete_unbonding" - EventTypeCompleteRedelegation = "complete_redelegation" - EventTypeCreateValidator = "create_validator" - EventTypeEditValidator = "edit_validator" - EventTypeDelegate = "delegate" - EventTypeUnbond = "unbond" - EventTypeRedelegate = "redelegate" + EventTypeCompleteUnbonding = "complete_unbonding" + EventTypeCompleteRedelegation = "complete_redelegation" + EventTypeCreateValidator = "create_validator" + EventTypeEditValidator = "edit_validator" + EventTypeDelegate = "delegate" + EventTypeUnbond = "unbond" + EventTypeRedelegate = "redelegate" + EventTypeTokenizeShares = "tokenize_shares" + EventTypeRedeemShares = "redeem_shares" + EventTypeTransferTokenizeShareRecord = "transfer_tokenize_share_record" + EventTypeValidatorBondDelegation = "validator_bond_delegation" - AttributeKeyValidator = "validator" - AttributeKeyCommissionRate = "commission_rate" - AttributeKeyMinSelfDelegation = "min_self_delegation" - AttributeKeySrcValidator = "source_validator" - AttributeKeyDstValidator = "destination_validator" - AttributeKeyDelegator = "delegator" - AttributeKeyCompletionTime = "completion_time" - AttributeKeyNewShares = "new_shares" - AttributeValueCategory = ModuleName + AttributeKeyValidator = "validator" + AttributeKeyCommissionRate = "commission_rate" + AttributeKeySrcValidator = "source_validator" + AttributeKeyDstValidator = "destination_validator" + AttributeKeyDelegator = "delegator" + AttributeKeyCompletionTime = "completion_time" + AttributeKeyNewShares = "new_shares" + AttributeKeyShareOwner = "share_owner" + AttributeKeyShareRecordID = "share_record_id" + AttributeKeyAmount = "amount" + AttributeValueCategory = ModuleName ) diff --git a/x/staking/types/expected_keepers.go b/x/staking/types/expected_keepers.go index 243dd1349ab3..065e34693175 100644 --- a/x/staking/types/expected_keepers.go +++ b/x/staking/types/expected_keepers.go @@ -32,10 +32,14 @@ type BankKeeper interface { GetSupply(ctx sdk.Context, denom string) sdk.Coin + SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + MintCoins(cts sdk.Context, name string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error } @@ -102,4 +106,6 @@ type StakingHooks interface { AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error + + BeforeTokenizeShareRecordRemoved(ctx sdk.Context, recordID uint64) error // Must be called when tokenize share record is deleted } diff --git a/x/staking/types/exported.go b/x/staking/types/exported.go index 9599da100d20..2fe05a68d2ff 100644 --- a/x/staking/types/exported.go +++ b/x/staking/types/exported.go @@ -32,6 +32,7 @@ type ValidatorI interface { GetCommission() sdk.Dec // validator commission rate GetMinSelfDelegation() sdk.Int // validator minimum self delegation GetDelegatorShares() sdk.Dec // total outstanding delegator shares + GetLiquidShares() sdk.Dec // total shares earmarked from liquid staking TokensFromShares(sdk.Dec) sdk.Dec // token worth of provided delegator shares TokensFromSharesTruncated(sdk.Dec) sdk.Dec // token worth of provided delegator shares, truncated TokensFromSharesRoundUp(sdk.Dec) sdk.Dec // token worth of provided delegator shares, rounded up diff --git a/x/staking/types/genesis.pb.go b/x/staking/types/genesis.pb.go index 2ea6f8bf9964..d19ae2f3401b 100644 --- a/x/staking/types/genesis.pb.go +++ b/x/staking/types/genesis.pb.go @@ -8,15 +8,19 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -43,6 +47,14 @@ type GenesisState struct { // redelegations defines the redelegations active at genesis. Redelegations []Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"` Exported bool `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"` + // store tokenize share records to provide reward to record owners + TokenizeShareRecords []TokenizeShareRecord `protobuf:"bytes,9,rep,name=tokenize_share_records,json=tokenizeShareRecords,proto3" json:"tokenize_share_records"` + // last tokenize share record id, used for next share record id calculation + LastTokenizeShareRecordId uint64 `protobuf:"varint,10,opt,name=last_tokenize_share_record_id,json=lastTokenizeShareRecordId,proto3" json:"last_tokenize_share_record_id,omitempty"` + // total number of liquid staked tokens at genesis + TotalLiquidStakedTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=total_liquid_staked_tokens,json=totalLiquidStakedTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_liquid_staked_tokens" yaml:"total_liquid_staked_tokens"` + // tokenize shares locks at genesis + TokenizeShareLocks []TokenizeShareLock `protobuf:"bytes,12,rep,name=tokenize_share_locks,json=tokenizeShareLocks,proto3" json:"tokenize_share_locks"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -127,6 +139,91 @@ func (m *GenesisState) GetExported() bool { return false } +func (m *GenesisState) GetTokenizeShareRecords() []TokenizeShareRecord { + if m != nil { + return m.TokenizeShareRecords + } + return nil +} + +func (m *GenesisState) GetLastTokenizeShareRecordId() uint64 { + if m != nil { + return m.LastTokenizeShareRecordId + } + return 0 +} + +func (m *GenesisState) GetTokenizeShareLocks() []TokenizeShareLock { + if m != nil { + return m.TokenizeShareLocks + } + return nil +} + +// TokenizeSharesLock required for specifying account locks at genesis +type TokenizeShareLock struct { + // Address of the account that is locked + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Status of the lock (LOCKED or LOCK_EXPIRING) + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + // Completion time if the lock is expiring + CompletionTime time.Time `protobuf:"bytes,3,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time" yaml:"completion_time"` +} + +func (m *TokenizeShareLock) Reset() { *m = TokenizeShareLock{} } +func (m *TokenizeShareLock) String() string { return proto.CompactTextString(m) } +func (*TokenizeShareLock) ProtoMessage() {} +func (*TokenizeShareLock) Descriptor() ([]byte, []int) { + return fileDescriptor_9b3dec8894f2831b, []int{1} +} +func (m *TokenizeShareLock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenizeShareLock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenizeShareLock.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 *TokenizeShareLock) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenizeShareLock.Merge(m, src) +} +func (m *TokenizeShareLock) XXX_Size() int { + return m.Size() +} +func (m *TokenizeShareLock) XXX_DiscardUnknown() { + xxx_messageInfo_TokenizeShareLock.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenizeShareLock proto.InternalMessageInfo + +func (m *TokenizeShareLock) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *TokenizeShareLock) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *TokenizeShareLock) GetCompletionTime() time.Time { + if m != nil { + return m.CompletionTime + } + return time.Time{} +} + // LastValidatorPower required for validator set update logic. type LastValidatorPower struct { // address is the address of the validator. @@ -139,7 +236,7 @@ func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } func (m *LastValidatorPower) String() string { return proto.CompactTextString(m) } func (*LastValidatorPower) ProtoMessage() {} func (*LastValidatorPower) Descriptor() ([]byte, []int) { - return fileDescriptor_9b3dec8894f2831b, []int{1} + return fileDescriptor_9b3dec8894f2831b, []int{2} } func (m *LastValidatorPower) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,6 +267,7 @@ var xxx_messageInfo_LastValidatorPower proto.InternalMessageInfo func init() { proto.RegisterType((*GenesisState)(nil), "cosmos.staking.v1beta1.GenesisState") + proto.RegisterType((*TokenizeShareLock)(nil), "cosmos.staking.v1beta1.TokenizeShareLock") proto.RegisterType((*LastValidatorPower)(nil), "cosmos.staking.v1beta1.LastValidatorPower") } @@ -178,38 +276,52 @@ func init() { } var fileDescriptor_9b3dec8894f2831b = []byte{ - // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0x7d, 0xa4, 0x49, 0xc3, 0xa5, 0x20, 0x74, 0xa4, 0x60, 0x45, 0xc8, 0x0e, 0x56, 0x84, - 0x22, 0x5e, 0x6c, 0xb5, 0x6c, 0x15, 0x53, 0x84, 0xa8, 0x8a, 0x10, 0x8a, 0x8e, 0x97, 0x81, 0x25, - 0xba, 0xd4, 0x27, 0x63, 0xd5, 0xf1, 0x59, 0x7e, 0x2e, 0xa5, 0xdd, 0x11, 0x62, 0xe4, 0x23, 0xf4, - 0xe3, 0x74, 0xec, 0xc0, 0x80, 0x18, 0x2c, 0x94, 0x2c, 0xcc, 0xfd, 0x04, 0xc8, 0xe7, 0x17, 0x4c, - 0x52, 0x33, 0x25, 0x77, 0xfa, 0xfd, 0x7f, 0x7f, 0xfb, 0xfc, 0x1c, 0x1e, 0x1c, 0x0a, 0x98, 0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0, 0x7e, 0x2c, 0x0d, 0xed, - 0xc3, 0xe3, 0xff, 0xce, 0xf3, 0x49, 0x79, 0xfd, 0xd4, 0x64, 0x4f, 0x5b, 0xea, 0xd6, 0x3d, 0xfd, - 0x13, 0x00, 0x00, 0xff, 0xff, 0xff, 0x85, 0xad, 0xc8, 0xf1, 0x03, 0x00, 0x00, + // 716 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x8d, 0x5f, 0xda, 0x34, 0x9d, 0xf4, 0xf5, 0xbd, 0x37, 0x2f, 0x4d, 0x4d, 0x04, 0x71, 0x6a, + 0x55, 0x28, 0x7c, 0xd9, 0x6a, 0xd9, 0x55, 0x2c, 0x50, 0x84, 0xa8, 0x8a, 0x2a, 0x54, 0x39, 0x85, + 0x05, 0x1b, 0x6b, 0x12, 0x0f, 0xae, 0x15, 0xdb, 0x63, 0x7c, 0x27, 0xa5, 0x65, 0x8d, 0x10, 0xcb, + 0xfe, 0x84, 0xfe, 0x02, 0x7e, 0x47, 0x97, 0x5d, 0x22, 0x16, 0x01, 0xb5, 0x1b, 0xd6, 0x95, 0xd8, + 0x23, 0xcf, 0x38, 0xa9, 0x49, 0xea, 0x0a, 0x56, 0xc9, 0xcc, 0x3d, 0xe7, 0xdc, 0x8f, 0xb9, 0x3e, + 0x68, 0xb5, 0xc7, 0x20, 0x60, 0x60, 0x02, 0x27, 0x7d, 0x2f, 0x74, 0xcd, 0xfd, 0xb5, 0x2e, 0xe5, + 0x64, 0xcd, 0x74, 0x69, 0x48, 0xc1, 0x03, 0x23, 0x8a, 0x19, 0x67, 0xb8, 0x26, 0x51, 0x46, 0x8a, + 0x32, 0x52, 0x54, 0xbd, 0xea, 0x32, 0x97, 0x09, 0x88, 0x99, 0xfc, 0x93, 0xe8, 0x7a, 0x9e, 0xe6, + 0x88, 0x2d, 0x51,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 0xe3, 0x8b, 0xd7, 0xee, 0x96, 0x44, 0x7f, 0x0f, 0x7f, 0x06, + 0x00, 0x00, 0xff, 0xff, 0x7b, 0xb6, 0x61, 0xc5, 0x64, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -232,6 +344,49 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TokenizeShareLocks) > 0 { + for iNdEx := len(m.TokenizeShareLocks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenizeShareLocks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } + { + size := m.TotalLiquidStakedTokens.Size() + i -= size + if _, err := m.TotalLiquidStakedTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if m.LastTokenizeShareRecordId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastTokenizeShareRecordId)) + i-- + dAtA[i] = 0x50 + } + if len(m.TokenizeShareRecords) > 0 { + for iNdEx := len(m.TokenizeShareRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenizeShareRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if m.Exported { i-- if m.Exported { @@ -335,6 +490,51 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TokenizeShareLock) 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 *TokenizeShareLock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenizeShareLock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintGenesis(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *LastValidatorPower) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -424,6 +624,42 @@ func (m *GenesisState) Size() (n int) { if m.Exported { n += 2 } + if len(m.TokenizeShareRecords) > 0 { + for _, e := range m.TokenizeShareRecords { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.LastTokenizeShareRecordId != 0 { + n += 1 + sovGenesis(uint64(m.LastTokenizeShareRecordId)) + } + l = m.TotalLiquidStakedTokens.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.TokenizeShareLocks) > 0 { + for _, e := range m.TokenizeShareLocks { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *TokenizeShareLock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Status) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -734,6 +970,273 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } } m.Exported = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenizeShareRecords", 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.TokenizeShareRecords = append(m.TokenizeShareRecords, TokenizeShareRecord{}) + if err := m.TokenizeShareRecords[len(m.TokenizeShareRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTokenizeShareRecordId", wireType) + } + m.LastTokenizeShareRecordId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastTokenizeShareRecordId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalLiquidStakedTokens", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalLiquidStakedTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenizeShareLocks", 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.TokenizeShareLocks = append(m.TokenizeShareLocks, TokenizeShareLock{}) + if err := m.TokenizeShareLocks[len(m.TokenizeShareLocks)-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 *TokenizeShareLock) 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: TokenizeShareLock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenizeShareLock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/staking/types/hooks.go b/x/staking/types/hooks.go index b9da167888bb..dedef7857e4a 100644 --- a/x/staking/types/hooks.go +++ b/x/staking/types/hooks.go @@ -70,6 +70,7 @@ func (h MultiStakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.V h[i].BeforeValidatorSlashed(ctx, valAddr, fraction) } } + func (h MultiStakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error { for i := range h { if err := h[i].AfterUnbondingInitiated(ctx, id); err != nil { @@ -78,3 +79,12 @@ func (h MultiStakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) e } return nil } + +func (h MultiStakingHooks) BeforeTokenizeShareRecordRemoved(ctx sdk.Context, recordID uint64) error { + for i := range h { + if err := h[i].BeforeTokenizeShareRecordRemoved(ctx, recordID); err != nil { + return err + } + } + return nil +} diff --git a/x/staking/types/hooks_template.go b/x/staking/types/hooks_template.go index aafb1a1ae081..2cff3b2cd103 100644 --- a/x/staking/types/hooks_template.go +++ b/x/staking/types/hooks_template.go @@ -10,24 +10,38 @@ var _ StakingHooks = StakingHooksTemplate{} func (h StakingHooksTemplate) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { } + func (h StakingHooksTemplate) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) { } + func (h StakingHooksTemplate) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error { return nil } + +func (h StakingHooksTemplate) BeforeTokenizeShareRecordRemoved(ctx sdk.Context, recordId uint64) error { + return nil +} diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index 63bf7e778f88..ff18a8f07ffb 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -24,6 +24,9 @@ const ( // RouterKey is the msg router key for the staking module RouterKey = ModuleName + + // Prefix for module accounts that custodian tokenized shares + TokenizeShareModuleAccountPrefix = "tokenizeshare_" ) var ( @@ -53,6 +56,14 @@ var ( HistoricalInfoKey = []byte{0x50} // prefix for the historical info ValidatorUpdatesKey = []byte{0x61} // prefix for the end block validator updates key + + TokenizeShareRecordPrefix = []byte{0x81} // key for tokenizeshare record prefix + TokenizeShareRecordIDByOwnerPrefix = []byte{0x82} // key for tokenizeshare record id by owner prefix + TokenizeShareRecordIDByDenomPrefix = []byte{0x83} // key for tokenizeshare record id by denom prefix + LastTokenizeShareRecordIDKey = []byte{0x84} // key for last tokenize share record id + TotalLiquidStakedTokensKey = []byte{0x85} // key for total liquid staked tokens + TokenizeSharesLockPrefix = []byte{0x86} // key for locking tokenize shares + TokenizeSharesUnlockQueuePrefix = []byte{0x87} // key for the queue that unlocks tokenize shares ) type UnbondingType int @@ -375,3 +386,34 @@ func GetREDsByDelToValDstIndexKey(delAddr sdk.AccAddress, valDstAddr sdk.ValAddr func GetHistoricalInfoKey(height int64) []byte { return append(HistoricalInfoKey, []byte(strconv.FormatInt(height, 10))...) } + +// GetTokenizeShareRecordByIndexKey returns the key of the specified id. Intended for querying the tokenizeShareRecord by the id. +func GetTokenizeShareRecordByIndexKey(id uint64) []byte { + return append(TokenizeShareRecordPrefix, sdk.Uint64ToBigEndian(id)...) +} + +// GetTokenizeShareRecordIdsByOwnerPrefix returns the key of the specified owner. Intended for querying all tokenizeShareRecords of an owner +func GetTokenizeShareRecordIdsByOwnerPrefix(owner sdk.AccAddress) []byte { + return append(TokenizeShareRecordIDByOwnerPrefix, address.MustLengthPrefix(owner)...) +} + +// GetTokenizeShareRecordIdByOwnerAndIdKey returns the key of the specified owner and id. Intended for setting tokenizeShareRecord of an owner +func GetTokenizeShareRecordIDByOwnerAndIDKey(owner sdk.AccAddress, id uint64) []byte { + return append(append(TokenizeShareRecordIDByOwnerPrefix, address.MustLengthPrefix(owner)...), sdk.Uint64ToBigEndian(id)...) +} + +func GetTokenizeShareRecordIDByDenomKey(denom string) []byte { + return append(TokenizeShareRecordIDByDenomPrefix, []byte(denom)...) +} + +// GetTokenizeSharesLockKey returns the key for storing a tokenize share lock for a specified account +func GetTokenizeSharesLockKey(owner sdk.AccAddress) []byte { + return append(TokenizeSharesLockPrefix, address.MustLengthPrefix(owner)...) +} + +// GetTokenizeShareAuthorizationTimeKey returns the prefix key used for getting a set of pending +// tokenize share unlocks that complete at the given time +func GetTokenizeShareAuthorizationTimeKey(timestamp time.Time) []byte { + bz := sdk.FormatTimeBytes(timestamp) + return append(TokenizeSharesUnlockQueuePrefix, bz...) +} diff --git a/x/staking/types/msg.go b/x/staking/types/msg.go index 7252761acfb3..497687eb2558 100644 --- a/x/staking/types/msg.go +++ b/x/staking/types/msg.go @@ -10,12 +10,22 @@ import ( ) // staking message types +// +//nolint:gosec // these are not hard coded credentials const ( - TypeMsgUndelegate = "begin_unbonding" - TypeMsgEditValidator = "edit_validator" - TypeMsgCreateValidator = "create_validator" - TypeMsgDelegate = "delegate" - TypeMsgBeginRedelegate = "begin_redelegate" + TypeMsgUndelegate = "begin_unbonding" + TypeMsgUnbondValidator = "unbond_validator" + TypeMsgEditValidator = "edit_validator" + TypeMsgCreateValidator = "create_validator" + TypeMsgDelegate = "delegate" + TypeMsgBeginRedelegate = "begin_redelegate" + TypeMsgCancelUnbondingDelegation = "cancel_unbond" + TypeMsgTokenizeShares = "tokenize_shares" + TypeMsgRedeemTokensForShares = "redeem_tokens_for_shares" + TypeMsgTransferTokenizeShareRecord = "transfer_tokenize_share_record" + TypeMsgDisableTokenizeShares = "disable_tokenize_shares" + TypeMsgEnableTokenizeShares = "enable_tokenize_shares" + TypeMsgValidatorBond = "validator_bond" ) var ( @@ -25,14 +35,22 @@ var ( _ sdk.Msg = &MsgEditValidator{} _ sdk.Msg = &MsgDelegate{} _ sdk.Msg = &MsgUndelegate{} + _ sdk.Msg = &MsgUnbondValidator{} _ sdk.Msg = &MsgBeginRedelegate{} + _ sdk.Msg = &MsgTokenizeShares{} + _ sdk.Msg = &MsgRedeemTokensForShares{} + _ sdk.Msg = &MsgTransferTokenizeShareRecord{} + _ sdk.Msg = &MsgDisableTokenizeShares{} + _ sdk.Msg = &MsgEnableTokenizeShares{} + _ sdk.Msg = &MsgCancelUnbondingDelegation{} + _ sdk.Msg = &MsgValidatorBond{} ) // NewMsgCreateValidator creates a new MsgCreateValidator instance. // Delegator address and validator address are the same. func NewMsgCreateValidator( valAddr sdk.ValAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - selfDelegation sdk.Coin, description Description, commission CommissionRates, minSelfDelegation sdk.Int, + selfDelegation sdk.Coin, description Description, commission CommissionRates, ) (*MsgCreateValidator, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -42,13 +60,12 @@ func NewMsgCreateValidator( } } return &MsgCreateValidator{ - Description: description, - DelegatorAddress: sdk.AccAddress(valAddr).String(), - ValidatorAddress: valAddr.String(), - Pubkey: pkAny, - Value: selfDelegation, - Commission: commission, - MinSelfDelegation: minSelfDelegation, + Description: description, + DelegatorAddress: sdk.AccAddress(valAddr).String(), + ValidatorAddress: valAddr.String(), + Pubkey: pkAny, + Value: selfDelegation, + Commission: commission, }, nil } @@ -129,17 +146,6 @@ func (msg MsgCreateValidator) ValidateBasic() error { return err } - if !msg.MinSelfDelegation.IsPositive() { - return sdkerrors.Wrap( - sdkerrors.ErrInvalidRequest, - "minimum self delegation must be a positive integer", - ) - } - - if msg.Value.Amount.LT(msg.MinSelfDelegation) { - return ErrSelfDelegationBelowMinimum - } - return nil } @@ -152,12 +158,11 @@ func (msg MsgCreateValidator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) // NewMsgEditValidator creates a new MsgEditValidator instance // //nolint:interfacer -func NewMsgEditValidator(valAddr sdk.ValAddress, description Description, newRate *sdk.Dec, newMinSelfDelegation *sdk.Int) *MsgEditValidator { +func NewMsgEditValidator(valAddr sdk.ValAddress, description Description, newRate *sdk.Dec) *MsgEditValidator { return &MsgEditValidator{ - Description: description, - CommissionRate: newRate, - ValidatorAddress: valAddr.String(), - MinSelfDelegation: newMinSelfDelegation, + Description: description, + CommissionRate: newRate, + ValidatorAddress: valAddr.String(), } } @@ -192,13 +197,6 @@ func (msg MsgEditValidator) ValidateBasic() error { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "empty description") } - if msg.MinSelfDelegation != nil && !msg.MinSelfDelegation.IsPositive() { - return sdkerrors.Wrap( - sdkerrors.ErrInvalidRequest, - "minimum self delegation must be a positive integer", - ) - } - if msg.CommissionRate != nil { if msg.CommissionRate.GT(sdk.OneDec()) || msg.CommissionRate.IsNegative() { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "commission rate must be between 0 and 1 (inclusive)") @@ -370,3 +368,364 @@ func (msg MsgUndelegate) ValidateBasic() error { return nil } + +// NewMsgUnbondValidator creates a new MsgUnbondValidator instance. +// +//nolint:interfacer +func NewMsgUnbondValidator(valAddr sdk.ValAddress) *MsgUnbondValidator { + return &MsgUnbondValidator{ + ValidatorAddress: valAddr.String(), + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgUnbondValidator) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgUnbondValidator) Type() string { return TypeMsgUnbondValidator } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgUnbondValidator) GetSigners() []sdk.AccAddress { + valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{valAddr.Bytes()} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgUnbondValidator) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgUnbondValidator) ValidateBasic() error { + if _, err := sdk.ValAddressFromBech32(msg.ValidatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) + } + + return nil +} + +// NewMsgTokenizeShares creates a new MsgTokenizeShares instance. +// +//nolint:interfacer +func NewMsgTokenizeShares(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Coin, owner sdk.AccAddress) *MsgTokenizeShares { + return &MsgTokenizeShares{ + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), + Amount: amount, + TokenizedShareOwner: owner.String(), + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgTokenizeShares) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgTokenizeShares) Type() string { return TypeMsgTokenizeShares } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgTokenizeShares) GetSigners() []sdk.AccAddress { + delegator, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delegator} +} + +// MsgTokenizeShares implements the sdk.Msg interface. +func (msg MsgTokenizeShares) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgTokenizeShares) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) + } + if _, err := sdk.ValAddressFromBech32(msg.ValidatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) + } + if _, err := sdk.AccAddressFromBech32(msg.TokenizedShareOwner); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid tokenize share owner address: %s", err) + } + + if !msg.Amount.IsValid() || !msg.Amount.Amount.IsPositive() { + return sdkerrors.Wrap( + sdkerrors.ErrInvalidRequest, + "invalid shares amount", + ) + } + + return nil +} + +// NewMsgRedeemTokensForShares creates a new MsgRedeemTokensForShares instance. +// +//nolint:interfacer +func NewMsgRedeemTokensForShares(delAddr sdk.AccAddress, amount sdk.Coin) *MsgRedeemTokensForShares { + return &MsgRedeemTokensForShares{ + DelegatorAddress: delAddr.String(), + Amount: amount, + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgRedeemTokensForShares) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgRedeemTokensForShares) Type() string { return TypeMsgRedeemTokensForShares } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgRedeemTokensForShares) GetSigners() []sdk.AccAddress { + delegator, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delegator} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgRedeemTokensForShares) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgRedeemTokensForShares) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) + } + + if !msg.Amount.IsValid() || !msg.Amount.Amount.IsPositive() { + return sdkerrors.Wrap( + sdkerrors.ErrInvalidRequest, + "invalid shares amount", + ) + } + + return nil +} + +// NewMsgTransferTokenizeShareRecord creates a new MsgTransferTokenizeShareRecord instance. +// +//nolint:interfacer +func NewMsgTransferTokenizeShareRecord(recordId uint64, sender, newOwner sdk.AccAddress) *MsgTransferTokenizeShareRecord { + return &MsgTransferTokenizeShareRecord{ + TokenizeShareRecordId: recordId, + Sender: sender.String(), + NewOwner: newOwner.String(), + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgTransferTokenizeShareRecord) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgTransferTokenizeShareRecord) Type() string { return TypeMsgTransferTokenizeShareRecord } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgTransferTokenizeShareRecord) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgTransferTokenizeShareRecord) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgTransferTokenizeShareRecord) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + if _, err := sdk.AccAddressFromBech32(msg.NewOwner); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid new owner address: %s", err) + } + + return nil +} + +// NewMsgDisableTokenizeShares creates a new MsgDisableTokenizeShares instance. +// +//nolint:interfacer +func NewMsgDisableTokenizeShares(delAddr sdk.AccAddress) *MsgDisableTokenizeShares { + return &MsgDisableTokenizeShares{ + DelegatorAddress: delAddr.String(), + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgDisableTokenizeShares) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgDisableTokenizeShares) Type() string { return TypeMsgDisableTokenizeShares } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgDisableTokenizeShares) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgDisableTokenizeShares) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgDisableTokenizeShares) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + return nil +} + +// NewMsgEnableTokenizeShares creates a new MsgEnableTokenizeShares instance. +// +//nolint:interfacer +func NewMsgEnableTokenizeShares(delAddr sdk.AccAddress) *MsgEnableTokenizeShares { + return &MsgEnableTokenizeShares{ + DelegatorAddress: delAddr.String(), + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgEnableTokenizeShares) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgEnableTokenizeShares) Type() string { return TypeMsgEnableTokenizeShares } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgEnableTokenizeShares) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgEnableTokenizeShares) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgEnableTokenizeShares) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + return nil +} + +// NewMsgCancelUnbondingDelegation creates a new MsgCancelUnbondingDelegation instance. +// +//nolint:interfacer +func NewMsgCancelUnbondingDelegation(delAddr sdk.AccAddress, valAddr sdk.ValAddress, creationHeight int64, amount sdk.Coin) *MsgCancelUnbondingDelegation { + return &MsgCancelUnbondingDelegation{ + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), + Amount: amount, + CreationHeight: creationHeight, + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgCancelUnbondingDelegation) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgCancelUnbondingDelegation) Type() string { return TypeMsgCancelUnbondingDelegation } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgCancelUnbondingDelegation) GetSigners() []sdk.AccAddress { + delegator, _ := sdk.AccAddressFromBech32(msg.DelegatorAddress) + return []sdk.AccAddress{delegator} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgCancelUnbondingDelegation) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgCancelUnbondingDelegation) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) + } + if _, err := sdk.ValAddressFromBech32(msg.ValidatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) + } + + if !msg.Amount.IsValid() || !msg.Amount.Amount.IsPositive() { + return sdkerrors.Wrap( + sdkerrors.ErrInvalidRequest, + "invalid amount", + ) + } + + if msg.CreationHeight <= 0 { + return sdkerrors.Wrap( + sdkerrors.ErrInvalidRequest, + "invalid height", + ) + } + + return nil +} + +// NewMsgValidatorBond creates a new MsgValidatorBond instance. +// +//nolint:interfacer +func NewMsgValidatorBond(delAddr sdk.AccAddress, valAddr sdk.ValAddress) *MsgValidatorBond { + return &MsgValidatorBond{ + DelegatorAddress: delAddr.String(), + ValidatorAddress: valAddr.String(), + } +} + +// Route implements the sdk.Msg interface. +func (msg MsgValidatorBond) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. +func (msg MsgValidatorBond) Type() string { return TypeMsgValidatorBond } + +// GetSigners implements the sdk.Msg interface. +func (msg MsgValidatorBond) GetSigners() []sdk.AccAddress { + delegator, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{delegator} +} + +// GetSignBytes implements the sdk.Msg interface. +func (msg MsgValidatorBond) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgValidatorBond) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) + } + if _, err := sdk.ValAddressFromBech32(msg.ValidatorAddress); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) + } + + return nil +} diff --git a/x/staking/types/msg_test.go b/x/staking/types/msg_test.go index f1ba552d9115..bb179725b2c5 100644 --- a/x/staking/types/msg_test.go +++ b/x/staking/types/msg_test.go @@ -37,7 +37,7 @@ func TestMsgDecode(t *testing.T) { // now let's try to serialize the whole message commission1 := types.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) - msg, err := types.NewMsgCreateValidator(valAddr1, pk1, coinPos, types.Description{}, commission1, sdk.OneInt()) + msg, err := types.NewMsgCreateValidator(valAddr1, pk1, coinPos, types.Description{}, commission1) require.NoError(t, err) msgSerialized, err := cdc.MarshalInterface(msg) require.NoError(t, err) @@ -59,27 +59,23 @@ func TestMsgCreateValidator(t *testing.T) { tests := []struct { name, moniker, identity, website, securityContact, details string CommissionRates types.CommissionRates - minSelfDelegation sdk.Int validatorAddr sdk.ValAddress pubkey cryptotypes.PubKey bond sdk.Coin expectPass bool }{ - {"basic good", "a", "b", "c", "d", "e", commission1, sdk.OneInt(), valAddr1, pk1, coinPos, true}, - {"partial description", "", "", "c", "", "", commission1, sdk.OneInt(), valAddr1, pk1, coinPos, true}, - {"empty description", "", "", "", "", "", commission2, sdk.OneInt(), valAddr1, pk1, coinPos, false}, - {"empty address", "a", "b", "c", "d", "e", commission2, sdk.OneInt(), emptyAddr, pk1, coinPos, false}, - {"empty pubkey", "a", "b", "c", "d", "e", commission1, sdk.OneInt(), valAddr1, emptyPubkey, coinPos, false}, - {"empty bond", "a", "b", "c", "d", "e", commission2, sdk.OneInt(), valAddr1, pk1, coinZero, false}, - {"nil bond", "a", "b", "c", "d", "e", commission2, sdk.OneInt(), valAddr1, pk1, sdk.Coin{}, false}, - {"zero min self delegation", "a", "b", "c", "d", "e", commission1, sdk.ZeroInt(), valAddr1, pk1, coinPos, false}, - {"negative min self delegation", "a", "b", "c", "d", "e", commission1, sdk.NewInt(-1), valAddr1, pk1, coinPos, false}, - {"delegation less than min self delegation", "a", "b", "c", "d", "e", commission1, coinPos.Amount.Add(sdk.OneInt()), valAddr1, pk1, coinPos, false}, + {"basic good", "a", "b", "c", "d", "e", commission1, valAddr1, pk1, coinPos, true}, + {"partial description", "", "", "c", "", "", commission1, valAddr1, pk1, coinPos, true}, + {"empty description", "", "", "", "", "", commission2, valAddr1, pk1, coinPos, false}, + {"empty address", "a", "b", "c", "d", "e", commission2, emptyAddr, pk1, coinPos, false}, + {"empty pubkey", "a", "b", "c", "d", "e", commission1, valAddr1, emptyPubkey, coinPos, false}, + {"empty bond", "a", "b", "c", "d", "e", commission2, valAddr1, pk1, coinZero, false}, + {"nil bond", "a", "b", "c", "d", "e", commission2, valAddr1, pk1, sdk.Coin{}, false}, } for _, tc := range tests { description := types.NewDescription(tc.moniker, tc.identity, tc.website, tc.securityContact, tc.details) - msg, err := types.NewMsgCreateValidator(tc.validatorAddr, tc.pubkey, tc.bond, description, tc.CommissionRates, tc.minSelfDelegation) + msg, err := types.NewMsgCreateValidator(tc.validatorAddr, tc.pubkey, tc.bond, description, tc.CommissionRates) require.NoError(t, err) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) @@ -95,20 +91,18 @@ func TestMsgEditValidator(t *testing.T) { name, moniker, identity, website, securityContact, details string validatorAddr sdk.ValAddress expectPass bool - minSelfDelegation sdk.Int }{ - {"basic good", "a", "b", "c", "d", "e", valAddr1, true, sdk.OneInt()}, - {"partial description", "", "", "c", "", "", valAddr1, true, sdk.OneInt()}, - {"empty description", "", "", "", "", "", valAddr1, false, sdk.OneInt()}, - {"empty address", "a", "b", "c", "d", "e", emptyAddr, false, sdk.OneInt()}, - {"nil int", "a", "b", "c", "d", "e", emptyAddr, false, sdk.Int{}}, + {"basic good", "a", "b", "c", "d", "e", valAddr1, true}, + {"partial description", "", "", "c", "", "", valAddr1, true}, + {"empty description", "", "", "", "", "", valAddr1, false}, + {"empty address", "a", "b", "c", "d", "e", emptyAddr, false}, } for _, tc := range tests { description := types.NewDescription(tc.moniker, tc.identity, tc.website, tc.securityContact, tc.details) newRate := sdk.ZeroDec() - msg := types.NewMsgEditValidator(tc.validatorAddr, description, &newRate, &tc.minSelfDelegation) + msg := types.NewMsgEditValidator(tc.validatorAddr, description, &newRate) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) } else { diff --git a/x/staking/types/params.go b/x/staking/types/params.go index 8ccae6b56500..b8069e4740e5 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -33,12 +33,27 @@ const ( ) var ( - KeyUnbondingTime = []byte("UnbondingTime") - KeyMaxValidators = []byte("MaxValidators") - KeyMaxEntries = []byte("MaxEntries") - KeyBondDenom = []byte("BondDenom") - KeyHistoricalEntries = []byte("HistoricalEntries") - KeyPowerReduction = []byte("PowerReduction") + // ValidatorBondFactor of -1 indicates that it's disabled + ValidatorBondCapDisabled = sdk.NewDecFromInt(sdk.NewInt(-1)) + + // DefaultValidatorBondFactor is set to -1 (disabled) + DefaultValidatorBondFactor = ValidatorBondCapDisabled + // DefaultGlobalLiquidStakingCap is set to 100% + DefaultGlobalLiquidStakingCap = sdk.OneDec() + // DefaultValidatorLiquidStakingCap is set to 100% + DefaultValidatorLiquidStakingCap = sdk.OneDec() +) + +var ( + KeyUnbondingTime = []byte("UnbondingTime") + KeyMaxValidators = []byte("MaxValidators") + KeyMaxEntries = []byte("MaxEntries") + KeyBondDenom = []byte("BondDenom") + KeyHistoricalEntries = []byte("HistoricalEntries") + KeyPowerReduction = []byte("PowerReduction") + KeyValidatorBondFactor = []byte("ValidatorBondFactor") + KeyGlobalLiquidStakingCap = []byte("GlobalLiquidStakingCap") + KeyValidatorLiquidStakingCap = []byte("ValidatorLiquidStakingCap") ) var _ paramtypes.ParamSet = (*Params)(nil) @@ -49,13 +64,25 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(unbondingTime time.Duration, maxValidators, maxEntries, historicalEntries uint32, bondDenom string) Params { +func NewParams( + unbondingTime time.Duration, + maxValidators uint32, + maxEntries uint32, + historicalEntries uint32, + bondDenom string, + validatorBondFactor sdk.Dec, + globalLiquidStakingCap sdk.Dec, + validatorLiquidStakingCap sdk.Dec, +) Params { return Params{ - UnbondingTime: unbondingTime, - MaxValidators: maxValidators, - MaxEntries: maxEntries, - HistoricalEntries: historicalEntries, - BondDenom: bondDenom, + UnbondingTime: unbondingTime, + MaxValidators: maxValidators, + MaxEntries: maxEntries, + HistoricalEntries: historicalEntries, + BondDenom: bondDenom, + ValidatorBondFactor: validatorBondFactor, + GlobalLiquidStakingCap: globalLiquidStakingCap, + ValidatorLiquidStakingCap: validatorLiquidStakingCap, } } @@ -67,6 +94,9 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyHistoricalEntries, &p.HistoricalEntries, validateHistoricalEntries), paramtypes.NewParamSetPair(KeyBondDenom, &p.BondDenom, validateBondDenom), + paramtypes.NewParamSetPair(KeyValidatorBondFactor, &p.ValidatorBondFactor, validateValidatorBondFactor), + paramtypes.NewParamSetPair(KeyGlobalLiquidStakingCap, &p.GlobalLiquidStakingCap, validateGlobalLiquidStakingCap), + paramtypes.NewParamSetPair(KeyValidatorLiquidStakingCap, &p.ValidatorLiquidStakingCap, validateValidatorLiquidStakingCap), } } @@ -78,6 +108,9 @@ func DefaultParams() Params { DefaultMaxEntries, DefaultHistoricalEntries, sdk.DefaultBondDenom, + DefaultValidatorBondFactor, + DefaultGlobalLiquidStakingCap, + DefaultValidatorLiquidStakingCap, ) } @@ -125,6 +158,18 @@ func (p Params) Validate() error { return err } + if err := validateValidatorBondFactor(p.ValidatorBondFactor); err != nil { + return err + } + + if err := validateGlobalLiquidStakingCap(p.GlobalLiquidStakingCap); err != nil { + return err + } + + if err := validateValidatorLiquidStakingCap(p.ValidatorLiquidStakingCap); err != nil { + return err + } + return nil } @@ -205,3 +250,48 @@ func ValidatePowerReduction(i interface{}) error { return nil } + +func validateValidatorBondFactor(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNegative() && !v.Equal(sdk.NewDec(-1)) { + return fmt.Errorf("invalid validator bond factor: %s", v) + } + + return nil +} + +func validateGlobalLiquidStakingCap(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNegative() { + return fmt.Errorf("global liquid staking cap cannot be negative: %s", v) + } + if v.GT(sdk.OneDec()) { + return fmt.Errorf("global liquid staking cap cannot be greater than 100%%: %s", v) + } + + return nil +} + +func validateValidatorLiquidStakingCap(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNegative() { + return fmt.Errorf("validator liquid staking cap cannot be negative: %s", v) + } + if v.GT(sdk.OneDec()) { + return fmt.Errorf("validator liquid staking cap cannot be greater than 100%%: %s", v) + } + + return nil +} diff --git a/x/staking/types/params_test.go b/x/staking/types/params_test.go index 6218091e0ff5..852124df9950 100644 --- a/x/staking/types/params_test.go +++ b/x/staking/types/params_test.go @@ -21,3 +21,10 @@ func TestParamsEqual(t *testing.T) { ok = p1.Equal(p2) require.False(t, ok) } + +func Test_validateParams(t *testing.T) { + params := types.DefaultParams() + + // default params have no error + require.NoError(t, params.Validate()) +} diff --git a/x/staking/types/query.pb.go b/x/staking/types/query.pb.go index 29f84adc27ac..4083f07a42a7 100644 --- a/x/staking/types/query.pb.go +++ b/x/staking/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -188,7 +189,7 @@ func (m *QueryValidatorRequest) GetValidatorAddr() string { // QueryValidatorResponse is response type for the Query/Validator RPC method type QueryValidatorResponse struct { - // validator defines the the validator info. + // validator defines the validator info. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` } @@ -987,7 +988,7 @@ var xxx_messageInfo_QueryDelegatorValidatorsRequest proto.InternalMessageInfo // QueryDelegatorValidatorsResponse is response type for the // Query/DelegatorValidators RPC method. type QueryDelegatorValidatorsResponse struct { - // validators defines the the validators' info of a delegator. + // validators defines the validators' info of a delegator. Validators []Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` // pagination defines the pagination in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -1085,7 +1086,7 @@ var xxx_messageInfo_QueryDelegatorValidatorRequest proto.InternalMessageInfo // QueryDelegatorValidatorResponse response type for the // Query/DelegatorValidator RPC method. type QueryDelegatorValidatorResponse struct { - // validator defines the the validator info. + // validator defines the validator info. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` } @@ -1389,1605 +1390,1809 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -func init() { - proto.RegisterType((*QueryValidatorsRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorsRequest") - proto.RegisterType((*QueryValidatorsResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorsResponse") - proto.RegisterType((*QueryValidatorRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorRequest") - proto.RegisterType((*QueryValidatorResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorResponse") - proto.RegisterType((*QueryValidatorDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest") - proto.RegisterType((*QueryValidatorDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse") - proto.RegisterType((*QueryValidatorUnbondingDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest") - proto.RegisterType((*QueryValidatorUnbondingDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse") - proto.RegisterType((*QueryDelegationRequest)(nil), "cosmos.staking.v1beta1.QueryDelegationRequest") - proto.RegisterType((*QueryDelegationResponse)(nil), "cosmos.staking.v1beta1.QueryDelegationResponse") - proto.RegisterType((*QueryUnbondingDelegationRequest)(nil), "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest") - proto.RegisterType((*QueryUnbondingDelegationResponse)(nil), "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse") - proto.RegisterType((*QueryDelegatorDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest") - proto.RegisterType((*QueryDelegatorDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse") - proto.RegisterType((*QueryDelegatorUnbondingDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest") - proto.RegisterType((*QueryDelegatorUnbondingDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse") - proto.RegisterType((*QueryRedelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryRedelegationsRequest") - proto.RegisterType((*QueryRedelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryRedelegationsResponse") - proto.RegisterType((*QueryDelegatorValidatorsRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest") - proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse") - proto.RegisterType((*QueryDelegatorValidatorRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest") - proto.RegisterType((*QueryDelegatorValidatorResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse") - proto.RegisterType((*QueryHistoricalInfoRequest)(nil), "cosmos.staking.v1beta1.QueryHistoricalInfoRequest") - proto.RegisterType((*QueryHistoricalInfoResponse)(nil), "cosmos.staking.v1beta1.QueryHistoricalInfoResponse") - proto.RegisterType((*QueryPoolRequest)(nil), "cosmos.staking.v1beta1.QueryPoolRequest") - proto.RegisterType((*QueryPoolResponse)(nil), "cosmos.staking.v1beta1.QueryPoolResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.staking.v1beta1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.staking.v1beta1.QueryParamsResponse") +// QueryTokenizeShareRecordByIdRequest is request type for the +// Query/QueryTokenizeShareRecordById RPC method. +type QueryTokenizeShareRecordByIdRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } -func init() { - proto.RegisterFile("cosmos/staking/v1beta1/query.proto", fileDescriptor_f270127f442bbcd8) +func (m *QueryTokenizeShareRecordByIdRequest) Reset() { *m = QueryTokenizeShareRecordByIdRequest{} } +func (m *QueryTokenizeShareRecordByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordByIdRequest) ProtoMessage() {} +func (*QueryTokenizeShareRecordByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{28} } - -var fileDescriptor_f270127f442bbcd8 = []byte{ - // 1303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcf, 0x4f, 0x1c, 0x75, - 0x14, 0xdf, 0x2f, 0x20, 0x91, 0xd7, 0xb4, 0xa9, 0xdf, 0x05, 0xc4, 0x29, 0xee, 0xd2, 0x09, 0x22, - 0xa5, 0x74, 0x46, 0xa0, 0x52, 0xac, 0x4d, 0x15, 0xac, 0x54, 0xd2, 0x83, 0xb0, 0x46, 0xfc, 0x75, - 0x20, 0xb3, 0x3b, 0xd3, 0xd9, 0x49, 0x97, 0x99, 0xed, 0xcc, 0x40, 0x40, 0xc2, 0x41, 0x4f, 0x7a, - 0xd3, 0x78, 0x52, 0x2f, 0x3d, 0x98, 0x98, 0xe8, 0x51, 0xff, 0x01, 0x4f, 0xd6, 0x1b, 0x46, 0x0f, - 0x7a, 0xa9, 0x06, 0x3c, 0x34, 0x9e, 0xbc, 0x19, 0x6f, 0x66, 0xbf, 0xf3, 0x66, 0x76, 0x86, 0xf9, - 0xb9, 0xcb, 0x12, 0xd2, 0x13, 0xbb, 0xdf, 0x7d, 0x3f, 0x3e, 0x9f, 0xf7, 0xbe, 0xef, 0x7d, 0xdf, - 0x0b, 0xc0, 0x57, 0x0c, 0x6b, 0xdd, 0xb0, 0x44, 0xcb, 0x96, 0xee, 0x68, 0xba, 0x2a, 0x6e, 0x4e, - 0x95, 0x15, 0x5b, 0x9a, 0x12, 0xef, 0x6e, 0x28, 0xe6, 0xb6, 0x50, 0x37, 0x0d, 0xdb, 0xa0, 0x83, - 0x8e, 0x8c, 0x80, 0x32, 0x02, 0xca, 0x70, 0x13, 0xa8, 0x5b, 0x96, 0x2c, 0xc5, 0x51, 0xf0, 0xd4, - 0xeb, 0x92, 0xaa, 0xe9, 0x92, 0xad, 0x19, 0xba, 0x63, 0x83, 0xeb, 0x57, 0x0d, 0xd5, 0x60, 0x1f, - 0xc5, 0xc6, 0x27, 0x3c, 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0, 0x7f, 0xe9, 0xf6, 0xb2, 0x1b, 0x2e, 0xec, 0xe8, 0x1a, 0xca, 0xc2, 0xb5, 0x43, 0x35, - 0xe4, 0x0b, 0xc6, 0xcf, 0x6e, 0x57, 0x8b, 0x46, 0x87, 0xe1, 0xa8, 0x74, 0xac, 0xab, 0x39, 0xb1, - 0x39, 0xde, 0xf6, 0xf5, 0x95, 0xdb, 0xbe, 0x3c, 0x4e, 0x29, 0xed, 0xeb, 0x64, 0x42, 0xef, 0x35, - 0xb2, 0x14, 0x98, 0x8f, 0x62, 0x23, 0xfb, 0x87, 0xc0, 0x53, 0x8c, 0x5b, 0x49, 0x91, 0xdb, 0x0e, - 0xf9, 0x24, 0x50, 0xcb, 0xac, 0xac, 0x45, 0x56, 0xf7, 0x59, 0xcb, 0xac, 0xac, 0x06, 0xde, 0x97, - 0x49, 0xa0, 0xb2, 0x65, 0x1f, 0x96, 0xee, 0x76, 0xa4, 0x65, 0xcb, 0x5e, 0x4d, 0x78, 0x8d, 0x7a, - 0x3a, 0x90, 0xce, 0x3d, 0x02, 0x5c, 0x14, 0x65, 0x4c, 0x9f, 0x06, 0x83, 0xa6, 0x92, 0x50, 0x44, - 0x93, 0x71, 0x19, 0xf4, 0x9b, 0x3b, 0x54, 0x46, 0x03, 0xa6, 0x72, 0xdc, 0x73, 0x40, 0x31, 0x78, - 0x43, 0xc3, 0x93, 0xf5, 0x89, 0x95, 0xcf, 0xf7, 0xa1, 0xbe, 0xfa, 0x48, 0xcc, 0xde, 0x5b, 0x50, - 0x88, 0x41, 0x7d, 0xdc, 0xef, 0x5e, 0x35, 0x36, 0x99, 0x9d, 0x1e, 0xdf, 0x2f, 0x63, 0x25, 0xbc, - 0xa6, 0x59, 0xb6, 0x61, 0x6a, 0x15, 0xa9, 0xb6, 0xa4, 0xdf, 0x36, 0x7c, 0xbb, 0x58, 0x55, 0xd1, - 0xd4, 0xaa, 0xcd, 0x3c, 0x74, 0x97, 0xf0, 0x1b, 0xff, 0x0e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 0x79, 0x06, 0xed, - 0xed, 0xba, 0x62, 0x95, 0x7b, 0xd9, 0x3f, 0x88, 0x66, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x4b, - 0x6e, 0xeb, 0x7f, 0xe4, 0x1a, 0x00, 0x00, +func (m *QueryTokenizeShareRecordByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordByIdRequest.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 *QueryTokenizeShareRecordByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordByIdRequest.Merge(m, src) +} +func (m *QueryTokenizeShareRecordByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordByIdRequest.DiscardUnknown(m) } -// 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 +var xxx_messageInfo_QueryTokenizeShareRecordByIdRequest proto.InternalMessageInfo -// 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 { - // Validators queries all validators that match the given status. - Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) - // Validator queries validator info for given validator address. - Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) - // ValidatorDelegations queries delegate info for given validator. - ValidatorDelegations(ctx context.Context, in *QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorDelegationsResponse, error) - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) - // Delegation queries delegate info for given validator delegator pair. - Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) - // DelegatorDelegations queries all delegations of a given delegator address. - DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) - // Redelegations queries redelegations of given address. - Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) - // DelegatorValidators queries all validators info for given delegator - // address. - DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) - // DelegatorValidator queries validator info for given delegator validator - // pair. - DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) - // HistoricalInfo queries the historical info for given height. - HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) - // Pool queries the pool info. - Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) - // Parameters queries the staking parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +func (m *QueryTokenizeShareRecordByIdRequest) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 } -type queryClient struct { - cc grpc1.ClientConn +// QueryTokenizeShareRecordByIdRequest is response type for the +// Query/QueryTokenizeShareRecordById RPC method. +type QueryTokenizeShareRecordByIdResponse struct { + Record TokenizeShareRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record"` } -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func (m *QueryTokenizeShareRecordByIdResponse) Reset() { *m = QueryTokenizeShareRecordByIdResponse{} } +func (m *QueryTokenizeShareRecordByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordByIdResponse) ProtoMessage() {} +func (*QueryTokenizeShareRecordByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{29} } - -func (c *queryClient) Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) { - out := new(QueryValidatorsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Validators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *QueryTokenizeShareRecordByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *queryClient) Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) { - out := new(QueryValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Validator", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryTokenizeShareRecordByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordByIdResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTokenizeShareRecordByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordByIdResponse.Merge(m, src) +} +func (m *QueryTokenizeShareRecordByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordByIdResponse.DiscardUnknown(m) } -func (c *queryClient) ValidatorDelegations(ctx context.Context, in *QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorDelegationsResponse, error) { - out := new(QueryValidatorDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/ValidatorDelegations", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryTokenizeShareRecordByIdResponse proto.InternalMessageInfo + +func (m *QueryTokenizeShareRecordByIdResponse) GetRecord() TokenizeShareRecord { + if m != nil { + return m.Record } - return out, nil + return TokenizeShareRecord{} } -func (c *queryClient) ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) { - out := new(QueryValidatorUnbondingDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// QueryTokenizeShareRecordByDenomRequest is request type for the +// Query/QueryTokenizeShareRecordByDenom RPC method. +type QueryTokenizeShareRecordByDenomRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } -func (c *queryClient) Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) { - out := new(QueryDelegationResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Delegation", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryTokenizeShareRecordByDenomRequest) Reset() { + *m = QueryTokenizeShareRecordByDenomRequest{} +} +func (m *QueryTokenizeShareRecordByDenomRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordByDenomRequest) ProtoMessage() {} +func (*QueryTokenizeShareRecordByDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{30} +} +func (m *QueryTokenizeShareRecordByDenomRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordByDenomRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTokenizeShareRecordByDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordByDenomRequest.Merge(m, src) +} +func (m *QueryTokenizeShareRecordByDenomRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordByDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordByDenomRequest.DiscardUnknown(m) } -func (c *queryClient) UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) { - out := new(QueryUnbondingDelegationResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/UnbondingDelegation", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryTokenizeShareRecordByDenomRequest proto.InternalMessageInfo + +func (m *QueryTokenizeShareRecordByDenomRequest) GetDenom() string { + if m != nil { + return m.Denom } - return out, nil + return "" } -func (c *queryClient) DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) { - out := new(QueryDelegatorDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorDelegations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// QueryTokenizeShareRecordByDenomResponse is response type for the +// Query/QueryTokenizeShareRecordByDenom RPC method. +type QueryTokenizeShareRecordByDenomResponse struct { + Record TokenizeShareRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record"` } -func (c *queryClient) DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) { - out := new(QueryDelegatorUnbondingDelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryTokenizeShareRecordByDenomResponse) Reset() { + *m = QueryTokenizeShareRecordByDenomResponse{} +} +func (m *QueryTokenizeShareRecordByDenomResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordByDenomResponse) ProtoMessage() {} +func (*QueryTokenizeShareRecordByDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{31} +} +func (m *QueryTokenizeShareRecordByDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordByDenomResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTokenizeShareRecordByDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordByDenomResponse.Merge(m, src) +} +func (m *QueryTokenizeShareRecordByDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordByDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordByDenomResponse.DiscardUnknown(m) } -func (c *queryClient) Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) { - out := new(QueryRedelegationsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Redelegations", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryTokenizeShareRecordByDenomResponse proto.InternalMessageInfo + +func (m *QueryTokenizeShareRecordByDenomResponse) GetRecord() TokenizeShareRecord { + if m != nil { + return m.Record } - return out, nil + return TokenizeShareRecord{} } -func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { - out := new(QueryDelegatorValidatorsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// QueryTokenizeShareRecordsOwnedRequest is request type for the +// Query/QueryTokenizeShareRecordsOwned RPC method. +type QueryTokenizeShareRecordsOwnedRequest struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` } -func (c *queryClient) DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) { - out := new(QueryDelegatorValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorValidator", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryTokenizeShareRecordsOwnedRequest) Reset() { *m = QueryTokenizeShareRecordsOwnedRequest{} } +func (m *QueryTokenizeShareRecordsOwnedRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordsOwnedRequest) ProtoMessage() {} +func (*QueryTokenizeShareRecordsOwnedRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{32} +} +func (m *QueryTokenizeShareRecordsOwnedRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordsOwnedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordsOwnedRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTokenizeShareRecordsOwnedRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordsOwnedRequest.Merge(m, src) +} +func (m *QueryTokenizeShareRecordsOwnedRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordsOwnedRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordsOwnedRequest.DiscardUnknown(m) } -func (c *queryClient) HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) { - out := new(QueryHistoricalInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/HistoricalInfo", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryTokenizeShareRecordsOwnedRequest proto.InternalMessageInfo + +func (m *QueryTokenizeShareRecordsOwnedRequest) GetOwner() string { + if m != nil { + return m.Owner } - return out, nil + return "" } -func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { - out := new(QueryPoolResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Pool", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// QueryTokenizeShareRecordsOwnedResponse is response type for the +// Query/QueryTokenizeShareRecordsOwned RPC method. +type QueryTokenizeShareRecordsOwnedResponse struct { + Records []TokenizeShareRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records"` } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryTokenizeShareRecordsOwnedResponse) Reset() { + *m = QueryTokenizeShareRecordsOwnedResponse{} +} +func (m *QueryTokenizeShareRecordsOwnedResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareRecordsOwnedResponse) ProtoMessage() {} +func (*QueryTokenizeShareRecordsOwnedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{33} +} +func (m *QueryTokenizeShareRecordsOwnedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareRecordsOwnedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareRecordsOwnedResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTokenizeShareRecordsOwnedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareRecordsOwnedResponse.Merge(m, src) +} +func (m *QueryTokenizeShareRecordsOwnedResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareRecordsOwnedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareRecordsOwnedResponse.DiscardUnknown(m) } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Validators queries all validators that match the given status. - Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) - // Validator queries validator info for given validator address. - Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) - // ValidatorDelegations queries delegate info for given validator. - ValidatorDelegations(context.Context, *QueryValidatorDelegationsRequest) (*QueryValidatorDelegationsResponse, error) - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - ValidatorUnbondingDelegations(context.Context, *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) - // Delegation queries delegate info for given validator delegator pair. - Delegation(context.Context, *QueryDelegationRequest) (*QueryDelegationResponse, error) - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - UnbondingDelegation(context.Context, *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) - // DelegatorDelegations queries all delegations of a given delegator address. - DelegatorDelegations(context.Context, *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - DelegatorUnbondingDelegations(context.Context, *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) - // Redelegations queries redelegations of given address. - Redelegations(context.Context, *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) - // DelegatorValidators queries all validators info for given delegator - // address. - DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) - // DelegatorValidator queries validator info for given delegator validator - // pair. - DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) - // HistoricalInfo queries the historical info for given height. - HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) - // Pool queries the pool info. - Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) - // Parameters queries the staking parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +var xxx_messageInfo_QueryTokenizeShareRecordsOwnedResponse proto.InternalMessageInfo + +func (m *QueryTokenizeShareRecordsOwnedResponse) GetRecords() []TokenizeShareRecord { + if m != nil { + return m.Records + } + return nil } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +// QueryAllTokenizeShareRecordsRequest is request type for the +// Query/QueryAllTokenizeShareRecords RPC method. +type QueryAllTokenizeShareRecordsRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (*UnimplementedQueryServer) Validators(ctx context.Context, req *QueryValidatorsRequest) (*QueryValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validators not implemented") +func (m *QueryAllTokenizeShareRecordsRequest) Reset() { *m = QueryAllTokenizeShareRecordsRequest{} } +func (m *QueryAllTokenizeShareRecordsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllTokenizeShareRecordsRequest) ProtoMessage() {} +func (*QueryAllTokenizeShareRecordsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{34} } -func (*UnimplementedQueryServer) Validator(ctx context.Context, req *QueryValidatorRequest) (*QueryValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validator not implemented") +func (m *QueryAllTokenizeShareRecordsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) ValidatorDelegations(ctx context.Context, req *QueryValidatorDelegationsRequest) (*QueryValidatorDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorDelegations not implemented") +func (m *QueryAllTokenizeShareRecordsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllTokenizeShareRecordsRequest.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 (*UnimplementedQueryServer) ValidatorUnbondingDelegations(ctx context.Context, req *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorUnbondingDelegations not implemented") +func (m *QueryAllTokenizeShareRecordsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllTokenizeShareRecordsRequest.Merge(m, src) } -func (*UnimplementedQueryServer) Delegation(ctx context.Context, req *QueryDelegationRequest) (*QueryDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delegation not implemented") +func (m *QueryAllTokenizeShareRecordsRequest) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) UnbondingDelegation(ctx context.Context, req *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnbondingDelegation not implemented") +func (m *QueryAllTokenizeShareRecordsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllTokenizeShareRecordsRequest.DiscardUnknown(m) } -func (*UnimplementedQueryServer) DelegatorDelegations(ctx context.Context, req *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorDelegations not implemented") + +var xxx_messageInfo_QueryAllTokenizeShareRecordsRequest proto.InternalMessageInfo + +func (m *QueryAllTokenizeShareRecordsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil } -func (*UnimplementedQueryServer) DelegatorUnbondingDelegations(ctx context.Context, req *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorUnbondingDelegations not implemented") + +// QueryAllTokenizeShareRecordsResponse is response type for the +// Query/QueryAllTokenizeShareRecords RPC method. +type QueryAllTokenizeShareRecordsResponse struct { + Records []TokenizeShareRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (*UnimplementedQueryServer) Redelegations(ctx context.Context, req *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Redelegations not implemented") + +func (m *QueryAllTokenizeShareRecordsResponse) Reset() { *m = QueryAllTokenizeShareRecordsResponse{} } +func (m *QueryAllTokenizeShareRecordsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllTokenizeShareRecordsResponse) ProtoMessage() {} +func (*QueryAllTokenizeShareRecordsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{35} } -func (*UnimplementedQueryServer) DelegatorValidators(ctx context.Context, req *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidators not implemented") +func (m *QueryAllTokenizeShareRecordsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) DelegatorValidator(ctx context.Context, req *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidator not implemented") +func (m *QueryAllTokenizeShareRecordsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllTokenizeShareRecordsResponse.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 (*UnimplementedQueryServer) HistoricalInfo(ctx context.Context, req *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HistoricalInfo not implemented") +func (m *QueryAllTokenizeShareRecordsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllTokenizeShareRecordsResponse.Merge(m, src) } -func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") +func (m *QueryAllTokenizeShareRecordsResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +func (m *QueryAllTokenizeShareRecordsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllTokenizeShareRecordsResponse.DiscardUnknown(m) } -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} +var xxx_messageInfo_QueryAllTokenizeShareRecordsResponse proto.InternalMessageInfo -func _Query_Validators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Validators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Validators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Validators(ctx, req.(*QueryValidatorsRequest)) +func (m *QueryAllTokenizeShareRecordsResponse) GetRecords() []TokenizeShareRecord { + if m != nil { + return m.Records } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_Validator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Validator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Validator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Validator(ctx, req.(*QueryValidatorRequest)) +func (m *QueryAllTokenizeShareRecordsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_ValidatorDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/ValidatorDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorDelegations(ctx, req.(*QueryValidatorDelegationsRequest)) - } - return interceptor(ctx, in, info, handler) +// QueryLastTokenizeShareRecordIdRequest is request type for the +// Query/QueryLastTokenizeShareRecordId RPC method. +type QueryLastTokenizeShareRecordIdRequest struct { } -func _Query_ValidatorUnbondingDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryValidatorUnbondingDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ValidatorUnbondingDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ValidatorUnbondingDelegations(ctx, req.(*QueryValidatorUnbondingDelegationsRequest)) +func (m *QueryLastTokenizeShareRecordIdRequest) Reset() { *m = QueryLastTokenizeShareRecordIdRequest{} } +func (m *QueryLastTokenizeShareRecordIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLastTokenizeShareRecordIdRequest) ProtoMessage() {} +func (*QueryLastTokenizeShareRecordIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{36} +} +func (m *QueryLastTokenizeShareRecordIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastTokenizeShareRecordIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastTokenizeShareRecordIdRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryLastTokenizeShareRecordIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastTokenizeShareRecordIdRequest.Merge(m, src) +} +func (m *QueryLastTokenizeShareRecordIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLastTokenizeShareRecordIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastTokenizeShareRecordIdRequest.DiscardUnknown(m) } -func _Query_Delegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Delegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Delegation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Delegation(ctx, req.(*QueryDelegationRequest)) - } - return interceptor(ctx, in, info, handler) +var xxx_messageInfo_QueryLastTokenizeShareRecordIdRequest proto.InternalMessageInfo + +// QueryLastTokenizeShareRecordIdResponse is response type for the +// Query/QueryLastTokenizeShareRecordId RPC method. +type QueryLastTokenizeShareRecordIdResponse struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } -func _Query_UnbondingDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUnbondingDelegationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnbondingDelegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/UnbondingDelegation", +func (m *QueryLastTokenizeShareRecordIdResponse) Reset() { + *m = QueryLastTokenizeShareRecordIdResponse{} +} +func (m *QueryLastTokenizeShareRecordIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLastTokenizeShareRecordIdResponse) ProtoMessage() {} +func (*QueryLastTokenizeShareRecordIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{37} +} +func (m *QueryLastTokenizeShareRecordIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastTokenizeShareRecordIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastTokenizeShareRecordIdResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnbondingDelegation(ctx, req.(*QueryUnbondingDelegationRequest)) +} +func (m *QueryLastTokenizeShareRecordIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastTokenizeShareRecordIdResponse.Merge(m, src) +} +func (m *QueryLastTokenizeShareRecordIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLastTokenizeShareRecordIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastTokenizeShareRecordIdResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastTokenizeShareRecordIdResponse proto.InternalMessageInfo + +func (m *QueryLastTokenizeShareRecordIdResponse) GetId() uint64 { + if m != nil { + return m.Id } - return interceptor(ctx, in, info, handler) + return 0 } -func _Query_DelegatorDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorDelegations(ctx, req.(*QueryDelegatorDelegationsRequest)) - } - return interceptor(ctx, in, info, handler) +// QueryTotalTokenizeSharedAssetsRequest is request type for the +// Query/QueryTotalTokenizeSharedAssets RPC method. +type QueryTotalTokenizeSharedAssetsRequest struct { } -func _Query_DelegatorUnbondingDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorUnbondingDelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorUnbondingDelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorUnbondingDelegations(ctx, req.(*QueryDelegatorUnbondingDelegationsRequest)) +func (m *QueryTotalTokenizeSharedAssetsRequest) Reset() { *m = QueryTotalTokenizeSharedAssetsRequest{} } +func (m *QueryTotalTokenizeSharedAssetsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTotalTokenizeSharedAssetsRequest) ProtoMessage() {} +func (*QueryTotalTokenizeSharedAssetsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{38} +} +func (m *QueryTotalTokenizeSharedAssetsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalTokenizeSharedAssetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalTokenizeSharedAssetsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryTotalTokenizeSharedAssetsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalTokenizeSharedAssetsRequest.Merge(m, src) +} +func (m *QueryTotalTokenizeSharedAssetsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalTokenizeSharedAssetsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalTokenizeSharedAssetsRequest.DiscardUnknown(m) } -func _Query_Redelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRedelegationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Redelegations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Redelegations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Redelegations(ctx, req.(*QueryRedelegationsRequest)) - } - return interceptor(ctx, in, info, handler) +var xxx_messageInfo_QueryTotalTokenizeSharedAssetsRequest proto.InternalMessageInfo + +// QueryTotalTokenizeSharedAssetsResponse is response type for the +// Query/QueryTotalTokenizeSharedAssets RPC method. +type QueryTotalTokenizeSharedAssetsResponse struct { + Value types.Coin `protobuf:"bytes,1,opt,name=value,proto3" json:"value"` } -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.staking.v1beta1.Query/DelegatorValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorValidators(ctx, req.(*QueryDelegatorValidatorsRequest)) +func (m *QueryTotalTokenizeSharedAssetsResponse) Reset() { + *m = QueryTotalTokenizeSharedAssetsResponse{} +} +func (m *QueryTotalTokenizeSharedAssetsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalTokenizeSharedAssetsResponse) ProtoMessage() {} +func (*QueryTotalTokenizeSharedAssetsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{39} +} +func (m *QueryTotalTokenizeSharedAssetsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalTokenizeSharedAssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalTokenizeSharedAssetsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryTotalTokenizeSharedAssetsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalTokenizeSharedAssetsResponse.Merge(m, src) +} +func (m *QueryTotalTokenizeSharedAssetsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalTokenizeSharedAssetsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalTokenizeSharedAssetsResponse.DiscardUnknown(m) } -func _Query_DelegatorValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegatorValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorValidator(ctx, req.(*QueryDelegatorValidatorRequest)) +var xxx_messageInfo_QueryTotalTokenizeSharedAssetsResponse proto.InternalMessageInfo + +func (m *QueryTotalTokenizeSharedAssetsResponse) GetValue() types.Coin { + if m != nil { + return m.Value } - return interceptor(ctx, in, info, handler) + return types.Coin{} } -func _Query_HistoricalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryHistoricalInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HistoricalInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/HistoricalInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HistoricalInfo(ctx, req.(*QueryHistoricalInfoRequest)) - } - return interceptor(ctx, in, info, handler) +// QueryTotalLiquidStakedRequest is request type for the +// Query/QueryQueryTotalLiquidStaked RPC method. +type QueryTotalLiquidStaked struct { } -func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPoolRequest) - if err := dec(in); err != nil { - return nil, err +func (m *QueryTotalLiquidStaked) Reset() { *m = QueryTotalLiquidStaked{} } +func (m *QueryTotalLiquidStaked) String() string { return proto.CompactTextString(m) } +func (*QueryTotalLiquidStaked) ProtoMessage() {} +func (*QueryTotalLiquidStaked) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{40} +} +func (m *QueryTotalLiquidStaked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalLiquidStaked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalLiquidStaked.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if interceptor == nil { - return srv.(QueryServer).Pool(ctx, in) +} +func (m *QueryTotalLiquidStaked) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalLiquidStaked.Merge(m, src) +} +func (m *QueryTotalLiquidStaked) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalLiquidStaked) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalLiquidStaked.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalLiquidStaked proto.InternalMessageInfo + +// QueryTotalLiquidStakedResponse is response type for the +// Query/QueryQueryTotalLiquidStaked RPC method. +type QueryTotalLiquidStakedResponse struct { + Tokens string `protobuf:"bytes,1,opt,name=tokens,proto3" json:"tokens,omitempty"` +} + +func (m *QueryTotalLiquidStakedResponse) Reset() { *m = QueryTotalLiquidStakedResponse{} } +func (m *QueryTotalLiquidStakedResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalLiquidStakedResponse) ProtoMessage() {} +func (*QueryTotalLiquidStakedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{41} +} +func (m *QueryTotalLiquidStakedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalLiquidStakedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalLiquidStakedResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Pool", +} +func (m *QueryTotalLiquidStakedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalLiquidStakedResponse.Merge(m, src) +} +func (m *QueryTotalLiquidStakedResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalLiquidStakedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalLiquidStakedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalLiquidStakedResponse proto.InternalMessageInfo + +func (m *QueryTotalLiquidStakedResponse) GetTokens() string { + if m != nil { + return m.Tokens } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) + return "" +} + +// QueryTokenizeShareLockInfo queries the tokenize share lock information +// associated with given account +type QueryTokenizeShareLockInfo struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryTokenizeShareLockInfo) Reset() { *m = QueryTokenizeShareLockInfo{} } +func (m *QueryTokenizeShareLockInfo) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareLockInfo) ProtoMessage() {} +func (*QueryTokenizeShareLockInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{42} +} +func (m *QueryTokenizeShareLockInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareLockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareLockInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryTokenizeShareLockInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareLockInfo.Merge(m, src) +} +func (m *QueryTokenizeShareLockInfo) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareLockInfo) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareLockInfo.DiscardUnknown(m) } -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 +var xxx_messageInfo_QueryTokenizeShareLockInfo proto.InternalMessageInfo + +func (m *QueryTokenizeShareLockInfo) GetAddress() string { + if m != nil { + return m.Address } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) + return "" +} + +// QueryTokenizeShareLockInfoResponse is the response from the +// QueryTokenizeShareLockInfo query +type QueryTokenizeShareLockInfoResponse struct { + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + ExpirationTime string `protobuf:"bytes,2,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` +} + +func (m *QueryTokenizeShareLockInfoResponse) Reset() { *m = QueryTokenizeShareLockInfoResponse{} } +func (m *QueryTokenizeShareLockInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenizeShareLockInfoResponse) ProtoMessage() {} +func (*QueryTokenizeShareLockInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f270127f442bbcd8, []int{43} +} +func (m *QueryTokenizeShareLockInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenizeShareLockInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenizeShareLockInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Query/Params", +} +func (m *QueryTokenizeShareLockInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenizeShareLockInfoResponse.Merge(m, src) +} +func (m *QueryTokenizeShareLockInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenizeShareLockInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenizeShareLockInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenizeShareLockInfoResponse proto.InternalMessageInfo + +func (m *QueryTokenizeShareLockInfoResponse) GetStatus() string { + if m != nil { + return m.Status } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + return "" +} + +func (m *QueryTokenizeShareLockInfoResponse) GetExpirationTime() string { + if m != nil { + return m.ExpirationTime } - return interceptor(ctx, in, info, handler) + return "" } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.staking.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Validators", - Handler: _Query_Validators_Handler, - }, - { - MethodName: "Validator", - Handler: _Query_Validator_Handler, - }, - { - MethodName: "ValidatorDelegations", - Handler: _Query_ValidatorDelegations_Handler, - }, - { - MethodName: "ValidatorUnbondingDelegations", - Handler: _Query_ValidatorUnbondingDelegations_Handler, - }, - { - MethodName: "Delegation", - Handler: _Query_Delegation_Handler, - }, - { - MethodName: "UnbondingDelegation", - Handler: _Query_UnbondingDelegation_Handler, - }, - { - MethodName: "DelegatorDelegations", - Handler: _Query_DelegatorDelegations_Handler, - }, - { - MethodName: "DelegatorUnbondingDelegations", - Handler: _Query_DelegatorUnbondingDelegations_Handler, - }, - { - MethodName: "Redelegations", - Handler: _Query_Redelegations_Handler, - }, - { - MethodName: "DelegatorValidators", - Handler: _Query_DelegatorValidators_Handler, - }, - { - MethodName: "DelegatorValidator", - Handler: _Query_DelegatorValidator_Handler, - }, - { - MethodName: "HistoricalInfo", - Handler: _Query_HistoricalInfo_Handler, - }, - { - MethodName: "Pool", - Handler: _Query_Pool_Handler, - }, - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/staking/v1beta1/query.proto", +func init() { + proto.RegisterType((*QueryValidatorsRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorsRequest") + proto.RegisterType((*QueryValidatorsResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorsResponse") + proto.RegisterType((*QueryValidatorRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorRequest") + proto.RegisterType((*QueryValidatorResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorResponse") + proto.RegisterType((*QueryValidatorDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorDelegationsRequest") + proto.RegisterType((*QueryValidatorDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorDelegationsResponse") + proto.RegisterType((*QueryValidatorUnbondingDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest") + proto.RegisterType((*QueryValidatorUnbondingDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse") + proto.RegisterType((*QueryDelegationRequest)(nil), "cosmos.staking.v1beta1.QueryDelegationRequest") + proto.RegisterType((*QueryDelegationResponse)(nil), "cosmos.staking.v1beta1.QueryDelegationResponse") + proto.RegisterType((*QueryUnbondingDelegationRequest)(nil), "cosmos.staking.v1beta1.QueryUnbondingDelegationRequest") + proto.RegisterType((*QueryUnbondingDelegationResponse)(nil), "cosmos.staking.v1beta1.QueryUnbondingDelegationResponse") + proto.RegisterType((*QueryDelegatorDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest") + proto.RegisterType((*QueryDelegatorDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse") + proto.RegisterType((*QueryDelegatorUnbondingDelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest") + proto.RegisterType((*QueryDelegatorUnbondingDelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse") + proto.RegisterType((*QueryRedelegationsRequest)(nil), "cosmos.staking.v1beta1.QueryRedelegationsRequest") + proto.RegisterType((*QueryRedelegationsResponse)(nil), "cosmos.staking.v1beta1.QueryRedelegationsResponse") + proto.RegisterType((*QueryDelegatorValidatorsRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest") + proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse") + proto.RegisterType((*QueryDelegatorValidatorRequest)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorRequest") + proto.RegisterType((*QueryDelegatorValidatorResponse)(nil), "cosmos.staking.v1beta1.QueryDelegatorValidatorResponse") + proto.RegisterType((*QueryHistoricalInfoRequest)(nil), "cosmos.staking.v1beta1.QueryHistoricalInfoRequest") + proto.RegisterType((*QueryHistoricalInfoResponse)(nil), "cosmos.staking.v1beta1.QueryHistoricalInfoResponse") + proto.RegisterType((*QueryPoolRequest)(nil), "cosmos.staking.v1beta1.QueryPoolRequest") + proto.RegisterType((*QueryPoolResponse)(nil), "cosmos.staking.v1beta1.QueryPoolResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.staking.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.staking.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryTokenizeShareRecordByIdRequest)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareRecordByIdRequest") + proto.RegisterType((*QueryTokenizeShareRecordByIdResponse)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareRecordByIdResponse") + proto.RegisterType((*QueryTokenizeShareRecordByDenomRequest)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareRecordByDenomRequest") + proto.RegisterType((*QueryTokenizeShareRecordByDenomResponse)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareRecordByDenomResponse") + proto.RegisterType((*QueryTokenizeShareRecordsOwnedRequest)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareRecordsOwnedRequest") + proto.RegisterType((*QueryTokenizeShareRecordsOwnedResponse)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareRecordsOwnedResponse") + proto.RegisterType((*QueryAllTokenizeShareRecordsRequest)(nil), "cosmos.staking.v1beta1.QueryAllTokenizeShareRecordsRequest") + proto.RegisterType((*QueryAllTokenizeShareRecordsResponse)(nil), "cosmos.staking.v1beta1.QueryAllTokenizeShareRecordsResponse") + proto.RegisterType((*QueryLastTokenizeShareRecordIdRequest)(nil), "cosmos.staking.v1beta1.QueryLastTokenizeShareRecordIdRequest") + proto.RegisterType((*QueryLastTokenizeShareRecordIdResponse)(nil), "cosmos.staking.v1beta1.QueryLastTokenizeShareRecordIdResponse") + proto.RegisterType((*QueryTotalTokenizeSharedAssetsRequest)(nil), "cosmos.staking.v1beta1.QueryTotalTokenizeSharedAssetsRequest") + proto.RegisterType((*QueryTotalTokenizeSharedAssetsResponse)(nil), "cosmos.staking.v1beta1.QueryTotalTokenizeSharedAssetsResponse") + proto.RegisterType((*QueryTotalLiquidStaked)(nil), "cosmos.staking.v1beta1.QueryTotalLiquidStaked") + proto.RegisterType((*QueryTotalLiquidStakedResponse)(nil), "cosmos.staking.v1beta1.QueryTotalLiquidStakedResponse") + proto.RegisterType((*QueryTokenizeShareLockInfo)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareLockInfo") + proto.RegisterType((*QueryTokenizeShareLockInfoResponse)(nil), "cosmos.staking.v1beta1.QueryTokenizeShareLockInfoResponse") } -func (m *QueryValidatorsRequest) 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 init() { + proto.RegisterFile("cosmos/staking/v1beta1/query.proto", fileDescriptor_f270127f442bbcd8) } -func (m *QueryValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var fileDescriptor_f270127f442bbcd8 = []byte{ + // 1903 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0x4f, 0x6c, 0xd4, 0xd8, + 0x19, 0xcf, 0x0b, 0x21, 0x94, 0x0f, 0x91, 0xc2, 0x4b, 0x08, 0x89, 0xa1, 0x93, 0x60, 0x42, 0x12, + 0x42, 0x98, 0x81, 0x84, 0x84, 0x34, 0x24, 0x81, 0x04, 0x0a, 0x8d, 0x40, 0x02, 0x06, 0x4a, 0xff, + 0x1d, 0x46, 0xce, 0xd8, 0x4c, 0xac, 0xcc, 0xd8, 0x13, 0xdb, 0x13, 0x12, 0xa2, 0x1c, 0xda, 0x53, + 0x7b, 0x6b, 0xd5, 0x5e, 0xda, 0x5e, 0x38, 0x54, 0xaa, 0xd4, 0x5e, 0x2a, 0xb5, 0xc7, 0xbd, 0xec, + 0x69, 0x59, 0xed, 0x1e, 0xb2, 0xda, 0xd5, 0x0a, 0x2e, 0xb0, 0x82, 0x5d, 0x89, 0xe3, 0xde, 0x56, + 0x7b, 0x5b, 0xf9, 0xf9, 0xb3, 0xc7, 0x8e, 0xfd, 0xec, 0x99, 0x61, 0x22, 0xc4, 0x89, 0xf8, 0xcd, + 0xfb, 0xbe, 0xef, 0xf7, 0xfb, 0xfe,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66, 0x2a, 0xf4, 0x06, + 0xc0, 0x9a, 0xb7, 0xda, 0x43, 0xfa, 0xf7, 0x0c, 0x1f, 0x18, 0x3b, 0x91, 0x8e, 0x76, 0x74, 0xda, + 0x93, 0x5f, 0x68, 0x7b, 0xfa, 0xa2, 0xaf, 0x25, 0xeb, 0x13, 0xb5, 0x15, 0x85, 0xc0, 0x0e, 0x25, + 0x82, 0x75, 0x50, 0x04, 0xd0, 0xce, 0xc1, 0x91, 0x20, 0x58, 0xd7, 0x4d, 0xa7, 0xa0, 0xc3, 0xb3, + 0x97, 0x93, 0x64, 0xd9, 0x40, 0x77, 0x1d, 0xf4, 0x56, 0xe7, 0x65, 0xd9, 0x10, 0x73, 0x3b, 0xfd, + 0xec, 0x71, 0xfd, 0x19, 0xec, 0xf7, 0xb6, 0x32, 0xd9, 0x3a, 0xa8, 0x56, 0x25, 0xc5, 0x3f, 0x13, + 0xe8, 0x0f, 0x5a, 0xb8, 0xa6, 0x14, 0x95, 0x82, 0x93, 0x32, 0xf5, 0x81, 0x6d, 0x5a, 0x88, 0xdf, + 0x10, 0x38, 0x11, 0x83, 0x09, 0x1d, 0xf0, 0x18, 0xba, 0x64, 0x6f, 0x39, 0x67, 0xe0, 0xb2, 0x1b, + 0xf6, 0x11, 0x9e, 0x2f, 0xaa, 0xaa, 0x5c, 0x4d, 0x0b, 0xc7, 0x6c, 0xa7, 0xfc, 0xfb, 0x65, 0x5f, + 0x67, 0xf8, 0x37, 0x33, 0xdb, 0x29, 0x87, 0x17, 0x9b, 0x97, 0x1f, 0x7f, 0x27, 0x70, 0x3a, 0x48, + 0xf5, 0x17, 0xda, 0x92, 0xae, 0xc9, 0xaa, 0x56, 0x78, 0xf7, 0x71, 0x78, 0x4e, 0x60, 0xa4, 0x16, + 0x70, 0x18, 0x90, 0x25, 0xe8, 0xac, 0xb8, 0xbf, 0x87, 0xe2, 0x71, 0x86, 0x17, 0x8f, 0x08, 0x95, + 0x98, 0xa5, 0xd4, 0xd3, 0x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45, + 0x8d, 0xbd, 0xe8, 0x54, 0x6d, 0x28, 0xc2, 0x6d, 0x97, 0xf0, 0xd3, 0x06, 0x24, 0x91, 0xca, 0x0d, + 0x46, 0x65, 0x9e, 0x5e, 0x6e, 0x80, 0x4a, 0xc6, 0xf7, 0x36, 0xa7, 0xdf, 0x13, 0xf8, 0x49, 0xec, + 0x14, 0x89, 0xce, 0xd7, 0x86, 0x32, 0xa6, 0xbf, 0x14, 0x16, 0xde, 0x46, 0x05, 0x32, 0xbe, 0xcb, + 0x18, 0xdf, 0xa4, 0x8b, 0x8d, 0x30, 0xae, 0x76, 0x8d, 0x7e, 0xee, 0x1f, 0x11, 0x80, 0xaa, 0xa9, + 0x84, 0xc2, 0x08, 0x0d, 0x67, 0x12, 0x0a, 0x23, 0xdc, 0xf8, 0x8b, 0xbf, 0x62, 0x14, 0xb2, 0xf4, + 0xce, 0x5b, 0x06, 0x2d, 0xb3, 0x19, 0x7c, 0x1c, 0x6f, 0xd1, 0xef, 0x08, 0x74, 0x46, 0x78, 0x8f, + 0x5e, 0x8c, 0x85, 0xc8, 0x1f, 0x3c, 0x09, 0x53, 0xf5, 0x0b, 0x22, 0xc9, 0x12, 0x23, 0x59, 0xa0, + 0x4a, 0xb3, 0x49, 0x46, 0x06, 0x91, 0x7e, 0x4c, 0xa0, 0x2b, 0x6a, 0x6e, 0x93, 0x50, 0x96, 0x31, + 0x83, 0xa8, 0x84, 0xb2, 0x8c, 0x1b, 0x12, 0x89, 0x33, 0x8c, 0xfc, 0x24, 0xbd, 0xc0, 0x23, 0x1f, + 0x1b, 0x45, 0xbb, 0x16, 0x63, 0x07, 0x21, 0x09, 0xb5, 0x58, 0xcb, 0xac, 0x27, 0xa1, 0x16, 0x6b, + 0x9a, 0xc3, 0x24, 0xd7, 0xa2, 0xc7, 0xac, 0xc6, 0x30, 0x9a, 0xf4, 0x43, 0x02, 0x07, 0x03, 0x53, + 0x03, 0x7a, 0x3e, 0x16, 0x68, 0xd4, 0x50, 0x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 0x5f, + 0x61, 0xf0, 0xa7, 0xe9, 0x14, 0x0f, 0xbe, 0x85, 0x0a, 0x72, 0xa6, 0xad, 0x21, 0xe7, 0x34, 0x79, + 0xb9, 0xa5, 0x8d, 0x9c, 0x2a, 0x67, 0x36, 0x55, 0x79, 0x8b, 0x7e, 0x43, 0x40, 0xe0, 0xf7, 0xfe, + 0x74, 0xae, 0x7e, 0x78, 0xfe, 0xa1, 0x83, 0x70, 0xb9, 0x61, 0xf9, 0x5a, 0xcf, 0x19, 0x2e, 0x43, + 0x36, 0xdf, 0xb0, 0x6b, 0x55, 0xd3, 0x4b, 0x5b, 0xf4, 0x25, 0x81, 0x5e, 0xee, 0xb8, 0x80, 0xce, + 0xd6, 0x0b, 0x33, 0x30, 0xa5, 0x10, 0xe6, 0x1a, 0x15, 0x47, 0x92, 0x57, 0x19, 0xc9, 0x59, 0x7a, + 0xa9, 0x3e, 0x92, 0xba, 0xad, 0x24, 0xb3, 0xc9, 0x66, 0x22, 0x5b, 0xf4, 0x53, 0x02, 0x47, 0x39, + 0x93, 0x82, 0x84, 0x14, 0x8d, 0x9f, 0x67, 0x24, 0xa4, 0x68, 0xc2, 0x70, 0x42, 0x9c, 0x64, 0xdc, + 0xce, 0xd1, 0x74, 0x5d, 0xdc, 0x4c, 0xfa, 0x9c, 0x40, 0x2f, 0x77, 0x22, 0x90, 0x10, 0xb0, 0xa4, + 0x91, 0x43, 0x42, 0xc0, 0x12, 0x07, 0x11, 0xe2, 0x2c, 0x23, 0x75, 0x91, 0x4e, 0xf0, 0x48, 0x15, + 0x25, 0xd3, 0xca, 0x45, 0x47, 0x4d, 0x95, 0xe9, 0x33, 0x96, 0x8c, 0x9c, 0x51, 0x44, 0x62, 0x32, + 0xc6, 0xcf, 0x3a, 0x12, 0x93, 0x31, 0x61, 0x02, 0x92, 0xfc, 0xc4, 0xb4, 0x6c, 0x15, 0x3b, 0xc8, + 0xc9, 0x39, 0xc9, 0x01, 0xff, 0x5f, 0x02, 0x87, 0x43, 0xa3, 0x8e, 0x84, 0xce, 0x27, 0xb4, 0x5f, + 0x98, 0xac, 0x6f, 0xbf, 0x87, 0x7d, 0x9c, 0x61, 0x3f, 0x4b, 0xcf, 0xc4, 0x63, 0x2f, 0x32, 0xd9, + 0x9c, 0xe9, 0x80, 0xfb, 0x84, 0xc0, 0x91, 0xe8, 0x19, 0xcb, 0x58, 0xed, 0x75, 0xed, 0xca, 0x08, + 0xd3, 0xf5, 0xcb, 0x78, 0xf0, 0x17, 0x18, 0xfc, 0x19, 0x3a, 0x5d, 0x63, 0xad, 0x14, 0xf5, 0xfc, + 0x0a, 0x5e, 0xdc, 0x38, 0xfc, 0xd9, 0x5a, 0xb8, 0xfe, 0xf4, 0x55, 0x8a, 0x6c, 0xbf, 0x4a, 0x91, + 0xaf, 0x5e, 0xa5, 0xc8, 0x9f, 0x5e, 0xa7, 0x5a, 0xb6, 0x5f, 0xa7, 0x5a, 0x9e, 0xbd, 0x4e, 0xb5, + 0xfc, 0x66, 0xb4, 0xa0, 0x5a, 0xcb, 0x95, 0xa5, 0x74, 0x5e, 0x2f, 0xb9, 0xfa, 0x9d, 0x7f, 0xce, + 0x9a, 0xf2, 0x4a, 0x66, 0xdd, 0x33, 0x66, 0x6d, 0x94, 0x15, 0x73, 0xa9, 0x9d, 0xfd, 0x77, 0xaf, + 0xf1, 0x1f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x36, 0x23, 0x97, 0xe8, 0xd2, 0x26, 0x00, 0x00, } -func (m *QueryValidatorsRequest) 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.Status) > 0 { - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn -func (m *QueryValidatorsResponse) 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 +// 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 { + // Validators queries all validators that match the given status. + Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) + // Validator queries validator info for given validator address. + Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) + // ValidatorDelegations queries delegate info for given validator. + ValidatorDelegations(ctx context.Context, in *QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorDelegationsResponse, error) + // ValidatorUnbondingDelegations queries unbonding delegations of a validator. + ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) + // Delegation queries delegate info for given validator delegator pair. + Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. + UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) + // DelegatorDelegations queries all delegations of a given delegator address. + DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. + DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) + // Redelegations queries redelegations of given address. + Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) + // DelegatorValidators queries all validators info for given delegator + // address. + DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) + // DelegatorValidator queries validator info for given delegator validator + // pair. + DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) + // HistoricalInfo queries the historical info for given height. + HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) + // Pool queries the pool info. + Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) + // Parameters queries the staking parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Query for individual tokenize share record information by share by id + TokenizeShareRecordById(ctx context.Context, in *QueryTokenizeShareRecordByIdRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordByIdResponse, error) + // Query for individual tokenize share record information by share denom + TokenizeShareRecordByDenom(ctx context.Context, in *QueryTokenizeShareRecordByDenomRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordByDenomResponse, error) + // Query tokenize share records by address + TokenizeShareRecordsOwned(ctx context.Context, in *QueryTokenizeShareRecordsOwnedRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordsOwnedResponse, error) + // Query for all tokenize share records + AllTokenizeShareRecords(ctx context.Context, in *QueryAllTokenizeShareRecordsRequest, opts ...grpc.CallOption) (*QueryAllTokenizeShareRecordsResponse, error) + // Query for last tokenize share record id + LastTokenizeShareRecordId(ctx context.Context, in *QueryLastTokenizeShareRecordIdRequest, opts ...grpc.CallOption) (*QueryLastTokenizeShareRecordIdResponse, error) + // Query for total tokenized staked assets + TotalTokenizeSharedAssets(ctx context.Context, in *QueryTotalTokenizeSharedAssetsRequest, opts ...grpc.CallOption) (*QueryTotalTokenizeSharedAssetsResponse, error) + // Query for total liquid staked (including tokenized shares or owned by an liquid staking provider) + TotalLiquidStaked(ctx context.Context, in *QueryTotalLiquidStaked, opts ...grpc.CallOption) (*QueryTotalLiquidStakedResponse, error) + // Query tokenize share locks + TokenizeShareLockInfo(ctx context.Context, in *QueryTokenizeShareLockInfo, opts ...grpc.CallOption) (*QueryTokenizeShareLockInfoResponse, error) } -func (m *QueryValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type queryClient struct { + cc grpc1.ClientConn } -func (m *QueryValidatorsResponse) 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.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[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 NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} } -func (m *QueryValidatorRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) { + out := new(QueryValidatorsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Validators", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryValidatorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) { + out := new(QueryValidatorResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Validator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0xa +func (c *queryClient) ValidatorDelegations(ctx context.Context, in *QueryValidatorDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorDelegationsResponse, error) { + out := new(QueryValidatorDelegationsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/ValidatorDelegations", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryValidatorResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) ValidatorUnbondingDelegations(ctx context.Context, in *QueryValidatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryValidatorUnbondingDelegationsResponse, error) { + out := new(QueryValidatorUnbondingDelegationsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Delegation(ctx context.Context, in *QueryDelegationRequest, opts ...grpc.CallOption) (*QueryDelegationResponse, error) { + out := new(QueryDelegationResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Delegation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) +func (c *queryClient) UnbondingDelegation(ctx context.Context, in *QueryUnbondingDelegationRequest, opts ...grpc.CallOption) (*QueryUnbondingDelegationResponse, error) { + out := new(QueryUnbondingDelegationResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/UnbondingDelegation", in, out, opts...) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return out, nil } -func (m *QueryValidatorDelegationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegatorDelegations(ctx context.Context, in *QueryDelegatorDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorDelegationsResponse, error) { + out := new(QueryDelegatorDelegationsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorDelegations", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryValidatorDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegatorUnbondingDelegations(ctx context.Context, in *QueryDelegatorUnbondingDelegationsRequest, opts ...grpc.CallOption) (*QueryDelegatorUnbondingDelegationsResponse, error) { + out := new(QueryDelegatorUnbondingDelegationsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryValidatorDelegationsRequest) 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.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0xa +func (c *queryClient) Redelegations(ctx context.Context, in *QueryRedelegationsRequest, opts ...grpc.CallOption) (*QueryRedelegationsResponse, error) { + out := new(QueryRedelegationsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Redelegations", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryValidatorDelegationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegatorValidators(ctx context.Context, in *QueryDelegatorValidatorsRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorsResponse, error) { + out := new(QueryDelegatorValidatorsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorValidators", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryValidatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) DelegatorValidator(ctx context.Context, in *QueryDelegatorValidatorRequest, opts ...grpc.CallOption) (*QueryDelegatorValidatorResponse, error) { + out := new(QueryDelegatorValidatorResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/DelegatorValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryValidatorDelegationsResponse) 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.DelegationResponses) > 0 { - for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func (c *queryClient) HistoricalInfo(ctx context.Context, in *QueryHistoricalInfoRequest, opts ...grpc.CallOption) (*QueryHistoricalInfoResponse, error) { + out := new(QueryHistoricalInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/HistoricalInfo", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryValidatorUnbondingDelegationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { + out := new(QueryPoolResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Pool", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryValidatorUnbondingDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryValidatorUnbondingDelegationsRequest) 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 +func (c *queryClient) TokenizeShareRecordById(ctx context.Context, in *QueryTokenizeShareRecordByIdRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordByIdResponse, error) { + out := new(QueryTokenizeShareRecordByIdResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/TokenizeShareRecordById", in, out, opts...) + if err != nil { + return nil, err } - if len(m.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0xa + return out, nil +} + +func (c *queryClient) TokenizeShareRecordByDenom(ctx context.Context, in *QueryTokenizeShareRecordByDenomRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordByDenomResponse, error) { + out := new(QueryTokenizeShareRecordByDenomResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/TokenizeShareRecordByDenom", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryValidatorUnbondingDelegationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) TokenizeShareRecordsOwned(ctx context.Context, in *QueryTokenizeShareRecordsOwnedRequest, opts ...grpc.CallOption) (*QueryTokenizeShareRecordsOwnedResponse, error) { + out := new(QueryTokenizeShareRecordsOwnedResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/TokenizeShareRecordsOwned", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryValidatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) AllTokenizeShareRecords(ctx context.Context, in *QueryAllTokenizeShareRecordsRequest, opts ...grpc.CallOption) (*QueryAllTokenizeShareRecordsResponse, error) { + out := new(QueryAllTokenizeShareRecordsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/AllTokenizeShareRecords", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryValidatorUnbondingDelegationsResponse) 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 +func (c *queryClient) LastTokenizeShareRecordId(ctx context.Context, in *QueryLastTokenizeShareRecordIdRequest, opts ...grpc.CallOption) (*QueryLastTokenizeShareRecordIdResponse, error) { + out := new(QueryLastTokenizeShareRecordIdResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/LastTokenizeShareRecordId", in, out, opts...) + if err != nil { + return nil, err } - if len(m.UnbondingResponses) > 0 { - for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + return out, nil +} + +func (c *queryClient) TotalTokenizeSharedAssets(ctx context.Context, in *QueryTotalTokenizeSharedAssetsRequest, opts ...grpc.CallOption) (*QueryTotalTokenizeSharedAssetsResponse, error) { + out := new(QueryTotalTokenizeSharedAssetsResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/TotalTokenizeSharedAssets", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryDelegationRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) TotalLiquidStaked(ctx context.Context, in *QueryTotalLiquidStaked, opts ...grpc.CallOption) (*QueryTotalLiquidStakedResponse, error) { + out := new(QueryTotalLiquidStakedResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/TotalLiquidStaked", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryDelegationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) TokenizeShareLockInfo(ctx context.Context, in *QueryTokenizeShareLockInfo, opts ...grpc.CallOption) (*QueryTokenizeShareLockInfoResponse, error) { + out := new(QueryTokenizeShareLockInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Query/TokenizeShareLockInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryDelegationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// QueryServer is the server API for Query service. +type QueryServer interface { + // Validators queries all validators that match the given status. + Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) + // Validator queries validator info for given validator address. + Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) + // ValidatorDelegations queries delegate info for given validator. + ValidatorDelegations(context.Context, *QueryValidatorDelegationsRequest) (*QueryValidatorDelegationsResponse, error) + // ValidatorUnbondingDelegations queries unbonding delegations of a validator. + ValidatorUnbondingDelegations(context.Context, *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) + // Delegation queries delegate info for given validator delegator pair. + Delegation(context.Context, *QueryDelegationRequest) (*QueryDelegationResponse, error) + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. + UnbondingDelegation(context.Context, *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) + // DelegatorDelegations queries all delegations of a given delegator address. + DelegatorDelegations(context.Context, *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. + DelegatorUnbondingDelegations(context.Context, *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) + // Redelegations queries redelegations of given address. + Redelegations(context.Context, *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) + // DelegatorValidators queries all validators info for given delegator + // address. + DelegatorValidators(context.Context, *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) + // DelegatorValidator queries validator info for given delegator validator + // pair. + DelegatorValidator(context.Context, *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) + // HistoricalInfo queries the historical info for given height. + HistoricalInfo(context.Context, *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) + // Pool queries the pool info. + Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) + // Parameters queries the staking parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Query for individual tokenize share record information by share by id + TokenizeShareRecordById(context.Context, *QueryTokenizeShareRecordByIdRequest) (*QueryTokenizeShareRecordByIdResponse, error) + // Query for individual tokenize share record information by share denom + TokenizeShareRecordByDenom(context.Context, *QueryTokenizeShareRecordByDenomRequest) (*QueryTokenizeShareRecordByDenomResponse, error) + // Query tokenize share records by address + TokenizeShareRecordsOwned(context.Context, *QueryTokenizeShareRecordsOwnedRequest) (*QueryTokenizeShareRecordsOwnedResponse, error) + // Query for all tokenize share records + AllTokenizeShareRecords(context.Context, *QueryAllTokenizeShareRecordsRequest) (*QueryAllTokenizeShareRecordsResponse, error) + // Query for last tokenize share record id + LastTokenizeShareRecordId(context.Context, *QueryLastTokenizeShareRecordIdRequest) (*QueryLastTokenizeShareRecordIdResponse, error) + // Query for total tokenized staked assets + TotalTokenizeSharedAssets(context.Context, *QueryTotalTokenizeSharedAssetsRequest) (*QueryTotalTokenizeSharedAssetsResponse, error) + // Query for total liquid staked (including tokenized shares or owned by an liquid staking provider) + TotalLiquidStaked(context.Context, *QueryTotalLiquidStaked) (*QueryTotalLiquidStakedResponse, error) + // Query tokenize share locks + TokenizeShareLockInfo(context.Context, *QueryTokenizeShareLockInfo) (*QueryTokenizeShareLockInfoResponse, error) } -func (m *QueryDelegationResponse) 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 +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { } -func (m *QueryDelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) Validators(ctx context.Context, req *QueryValidatorsRequest) (*QueryValidatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Validators not implemented") } - -func (m *QueryDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DelegationResponse != nil { - { - size, err := m.DelegationResponse.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 (*UnimplementedQueryServer) Validator(ctx context.Context, req *QueryValidatorRequest) (*QueryValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Validator not implemented") } - -func (m *QueryUnbondingDelegationRequest) 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 (*UnimplementedQueryServer) ValidatorDelegations(ctx context.Context, req *QueryValidatorDelegationsRequest) (*QueryValidatorDelegationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorDelegations not implemented") +} +func (*UnimplementedQueryServer) ValidatorUnbondingDelegations(ctx context.Context, req *QueryValidatorUnbondingDelegationsRequest) (*QueryValidatorUnbondingDelegationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorUnbondingDelegations not implemented") +} +func (*UnimplementedQueryServer) Delegation(ctx context.Context, req *QueryDelegationRequest) (*QueryDelegationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delegation not implemented") +} +func (*UnimplementedQueryServer) UnbondingDelegation(ctx context.Context, req *QueryUnbondingDelegationRequest) (*QueryUnbondingDelegationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnbondingDelegation not implemented") +} +func (*UnimplementedQueryServer) DelegatorDelegations(ctx context.Context, req *QueryDelegatorDelegationsRequest) (*QueryDelegatorDelegationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorDelegations not implemented") +} +func (*UnimplementedQueryServer) DelegatorUnbondingDelegations(ctx context.Context, req *QueryDelegatorUnbondingDelegationsRequest) (*QueryDelegatorUnbondingDelegationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorUnbondingDelegations not implemented") +} +func (*UnimplementedQueryServer) Redelegations(ctx context.Context, req *QueryRedelegationsRequest) (*QueryRedelegationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Redelegations not implemented") +} +func (*UnimplementedQueryServer) DelegatorValidators(ctx context.Context, req *QueryDelegatorValidatorsRequest) (*QueryDelegatorValidatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidators not implemented") +} +func (*UnimplementedQueryServer) DelegatorValidator(ctx context.Context, req *QueryDelegatorValidatorRequest) (*QueryDelegatorValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorValidator not implemented") +} +func (*UnimplementedQueryServer) HistoricalInfo(ctx context.Context, req *QueryHistoricalInfoRequest) (*QueryHistoricalInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HistoricalInfo not implemented") +} +func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest) (*QueryPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) TokenizeShareRecordById(ctx context.Context, req *QueryTokenizeShareRecordByIdRequest) (*QueryTokenizeShareRecordByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenizeShareRecordById not implemented") +} +func (*UnimplementedQueryServer) TokenizeShareRecordByDenom(ctx context.Context, req *QueryTokenizeShareRecordByDenomRequest) (*QueryTokenizeShareRecordByDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenizeShareRecordByDenom not implemented") +} +func (*UnimplementedQueryServer) TokenizeShareRecordsOwned(ctx context.Context, req *QueryTokenizeShareRecordsOwnedRequest) (*QueryTokenizeShareRecordsOwnedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenizeShareRecordsOwned not implemented") +} +func (*UnimplementedQueryServer) AllTokenizeShareRecords(ctx context.Context, req *QueryAllTokenizeShareRecordsRequest) (*QueryAllTokenizeShareRecordsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllTokenizeShareRecords not implemented") +} +func (*UnimplementedQueryServer) LastTokenizeShareRecordId(ctx context.Context, req *QueryLastTokenizeShareRecordIdRequest) (*QueryLastTokenizeShareRecordIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastTokenizeShareRecordId not implemented") +} +func (*UnimplementedQueryServer) TotalTokenizeSharedAssets(ctx context.Context, req *QueryTotalTokenizeSharedAssetsRequest) (*QueryTotalTokenizeSharedAssetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalTokenizeSharedAssets not implemented") +} +func (*UnimplementedQueryServer) TotalLiquidStaked(ctx context.Context, req *QueryTotalLiquidStaked) (*QueryTotalLiquidStakedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalLiquidStaked not implemented") +} +func (*UnimplementedQueryServer) TokenizeShareLockInfo(ctx context.Context, req *QueryTokenizeShareLockInfo) (*QueryTokenizeShareLockInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenizeShareLockInfo not implemented") } -func (m *QueryUnbondingDelegationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) } -func (m *QueryUnbondingDelegationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0x12 +func _Query_Validators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorsRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa + if interceptor == nil { + return srv.(QueryServer).Validators(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/Validators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Validators(ctx, req.(*QueryValidatorsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryUnbondingDelegationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_Validator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryUnbondingDelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryUnbondingDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Unbond.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if interceptor == nil { + return srv.(QueryServer).Validator(ctx, in) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/Validator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Validator(ctx, req.(*QueryValidatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorDelegationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_ValidatorDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorDelegationsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).ValidatorDelegations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/ValidatorDelegations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorDelegations(ctx, req.(*QueryValidatorDelegationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_ValidatorUnbondingDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorUnbondingDelegationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ValidatorUnbondingDelegations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ValidatorUnbondingDelegations(ctx, req.(*QueryValidatorUnbondingDelegationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorDelegationsRequest) 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 +func _Query_Delegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegationRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa + if interceptor == nil { + return srv.(QueryServer).Delegation(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/Delegation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Delegation(ctx, req.(*QueryDelegationRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorDelegationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_UnbondingDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnbondingDelegationRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryDelegatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorDelegationsResponse) 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 interceptor == nil { + return srv.(QueryServer).UnbondingDelegation(ctx, in) } - if len(m.DelegationResponses) > 0 { - for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/UnbondingDelegation", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnbondingDelegation(ctx, req.(*QueryUnbondingDelegationRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorUnbondingDelegationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_DelegatorDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorDelegationsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryDelegatorUnbondingDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).DelegatorDelegations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorDelegations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorDelegations(ctx, req.(*QueryDelegatorDelegationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorUnbondingDelegationsRequest) 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 +func _Query_DelegatorUnbondingDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorUnbondingDelegationsRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa + if interceptor == nil { + return srv.(QueryServer).DelegatorUnbondingDelegations(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorUnbondingDelegations(ctx, req.(*QueryDelegatorUnbondingDelegationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorUnbondingDelegationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_Redelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRedelegationsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).Redelegations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/Redelegations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Redelegations(ctx, req.(*QueryRedelegationsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +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.staking.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 (m *QueryDelegatorUnbondingDelegationsResponse) 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 +func _Query_DelegatorValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorValidatorRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.UnbondingResponses) > 0 { - for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(QueryServer).DelegatorValidator(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/DelegatorValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorValidator(ctx, req.(*QueryDelegatorValidatorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryRedelegationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_HistoricalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHistoricalInfoRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).HistoricalInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/HistoricalInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HistoricalInfo(ctx, req.(*QueryHistoricalInfoRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryRedelegationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRedelegationsRequest) 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 +func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPoolRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.DstValidatorAddr) > 0 { - i -= len(m.DstValidatorAddr) - copy(dAtA[i:], m.DstValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DstValidatorAddr))) - i-- - dAtA[i] = 0x1a + if interceptor == nil { + return srv.(QueryServer).Pool(ctx, in) } - if len(m.SrcValidatorAddr) > 0 { - i -= len(m.SrcValidatorAddr) - copy(dAtA[i:], m.SrcValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SrcValidatorAddr))) - i-- - dAtA[i] = 0x12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/Pool", } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *QueryRedelegationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +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 } - return dAtA[:n], nil -} - -func (m *QueryRedelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.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 (m *QueryRedelegationsResponse) 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 +func _Query_TokenizeShareRecordById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenizeShareRecordByIdRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.RedelegationResponses) > 0 { - for iNdEx := len(m.RedelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RedelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(QueryServer).TokenizeShareRecordById(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/TokenizeShareRecordById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenizeShareRecordById(ctx, req.(*QueryTokenizeShareRecordByIdRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_TokenizeShareRecordByDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenizeShareRecordByDenomRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).TokenizeShareRecordByDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/TokenizeShareRecordByDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenizeShareRecordByDenom(ctx, req.(*QueryTokenizeShareRecordByDenomRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_TokenizeShareRecordsOwned_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenizeShareRecordsOwnedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenizeShareRecordsOwned(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/TokenizeShareRecordsOwned", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenizeShareRecordsOwned(ctx, req.(*QueryTokenizeShareRecordsOwnedRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorsRequest) 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 +func _Query_AllTokenizeShareRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllTokenizeShareRecordsRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa + if interceptor == nil { + return srv.(QueryServer).AllTokenizeShareRecords(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/AllTokenizeShareRecords", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllTokenizeShareRecords(ctx, req.(*QueryAllTokenizeShareRecordsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_LastTokenizeShareRecordId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastTokenizeShareRecordIdRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).LastTokenizeShareRecordId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/LastTokenizeShareRecordId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastTokenizeShareRecordId(ctx, req.(*QueryLastTokenizeShareRecordIdRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_TotalTokenizeSharedAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalTokenizeSharedAssetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalTokenizeSharedAssets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/TotalTokenizeSharedAssets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalTokenizeSharedAssets(ctx, req.(*QueryTotalTokenizeSharedAssetsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorsResponse) 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 +func _Query_TotalLiquidStaked_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalLiquidStaked) + if err := dec(in); err != nil { + return nil, err } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(QueryServer).TotalLiquidStaked(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/TotalLiquidStaked", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalLiquidStaked(ctx, req.(*QueryTotalLiquidStaked)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_TokenizeShareLockInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenizeShareLockInfo) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).TokenizeShareLockInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Query/TokenizeShareLockInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenizeShareLockInfo(ctx, req.(*QueryTokenizeShareLockInfo)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryDelegatorValidatorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0x12 - } - if len(m.DelegatorAddr) > 0 { - i -= len(m.DelegatorAddr) - copy(dAtA[i:], m.DelegatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.staking.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Validators", + Handler: _Query_Validators_Handler, + }, + { + MethodName: "Validator", + Handler: _Query_Validator_Handler, + }, + { + MethodName: "ValidatorDelegations", + Handler: _Query_ValidatorDelegations_Handler, + }, + { + MethodName: "ValidatorUnbondingDelegations", + Handler: _Query_ValidatorUnbondingDelegations_Handler, + }, + { + MethodName: "Delegation", + Handler: _Query_Delegation_Handler, + }, + { + MethodName: "UnbondingDelegation", + Handler: _Query_UnbondingDelegation_Handler, + }, + { + MethodName: "DelegatorDelegations", + Handler: _Query_DelegatorDelegations_Handler, + }, + { + MethodName: "DelegatorUnbondingDelegations", + Handler: _Query_DelegatorUnbondingDelegations_Handler, + }, + { + MethodName: "Redelegations", + Handler: _Query_Redelegations_Handler, + }, + { + MethodName: "DelegatorValidators", + Handler: _Query_DelegatorValidators_Handler, + }, + { + MethodName: "DelegatorValidator", + Handler: _Query_DelegatorValidator_Handler, + }, + { + MethodName: "HistoricalInfo", + Handler: _Query_HistoricalInfo_Handler, + }, + { + MethodName: "Pool", + Handler: _Query_Pool_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "TokenizeShareRecordById", + Handler: _Query_TokenizeShareRecordById_Handler, + }, + { + MethodName: "TokenizeShareRecordByDenom", + Handler: _Query_TokenizeShareRecordByDenom_Handler, + }, + { + MethodName: "TokenizeShareRecordsOwned", + Handler: _Query_TokenizeShareRecordsOwned_Handler, + }, + { + MethodName: "AllTokenizeShareRecords", + Handler: _Query_AllTokenizeShareRecords_Handler, + }, + { + MethodName: "LastTokenizeShareRecordId", + Handler: _Query_LastTokenizeShareRecordId_Handler, + }, + { + MethodName: "TotalTokenizeSharedAssets", + Handler: _Query_TotalTokenizeSharedAssets_Handler, + }, + { + MethodName: "TotalLiquidStaked", + Handler: _Query_TotalLiquidStaked_Handler, + }, + { + MethodName: "TokenizeShareLockInfo", + Handler: _Query_TokenizeShareLockInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/staking/v1beta1/query.proto", } -func (m *QueryDelegatorValidatorResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryValidatorsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2997,58 +3202,39 @@ func (m *QueryDelegatorValidatorResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryDelegatorValidatorResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegatorValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + 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 -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryHistoricalInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + i-- + dAtA[i] = 0x12 } - return dAtA[:n], nil -} - -func (m *QueryHistoricalInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryHistoricalInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryHistoricalInfoResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryValidatorsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3058,19 +3244,19 @@ func (m *QueryHistoricalInfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryHistoricalInfoResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryHistoricalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Hist != nil { + if m.Pagination != nil { { - size, err := m.Hist.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3078,12 +3264,26 @@ func (m *QueryHistoricalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[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 *QueryPoolRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryValidatorRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3093,20 +3293,27 @@ func (m *QueryPoolRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPoolRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryValidatorRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *QueryPoolResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryValidatorResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3116,18 +3323,18 @@ func (m *QueryPoolResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3139,7 +3346,7 @@ func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryValidatorDelegationsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3149,20 +3356,39 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryValidatorDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryValidatorDelegationsRequest) 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.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryValidatorDelegationsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3172,482 +3398,3135 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryValidatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryValidatorDelegationsResponse) 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 + 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 -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if len(m.DelegationResponses) > 0 { + for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegationResponses[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++ +func (m *QueryValidatorUnbondingDelegationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryValidatorsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Status) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + +func (m *QueryValidatorUnbondingDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryValidatorUnbondingDelegationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovQuery(uint64(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 m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryValidatorRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryValidatorUnbondingDelegationsResponse) 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 n + return dAtA[:n], nil } -func (m *QueryValidatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Validator.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryValidatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryValidatorDelegationsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryValidatorUnbondingDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryValidatorDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DelegationResponses) > 0 { - for _, e := range m.DelegationResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + 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 m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.UnbondingResponses) > 0 { + for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *QueryValidatorUnbondingDelegationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryDelegationRequest) 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 n + return dAtA[:n], nil } -func (m *QueryValidatorUnbondingDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.UnbondingResponses) > 0 { - for _, e := range m.UnbondingResponses { - 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 *QueryDelegationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegationRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryDelegationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0x12 } - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryDelegationResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryDelegationResponse) 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 *QueryDelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.DelegationResponse != nil { - l = m.DelegationResponse.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + { + size, err := m.DelegationResponse.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 *QueryUnbondingDelegationRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryUnbondingDelegationRequest) 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 n + return dAtA[:n], nil } -func (m *QueryUnbondingDelegationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Unbond.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryUnbondingDelegationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegatorDelegationsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryUnbondingDelegationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0x12 } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryDelegatorDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DelegationResponses) > 0 { - for _, e := range m.DelegationResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryUnbondingDelegationResponse) 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 n + return dAtA[:n], nil } -func (m *QueryDelegatorUnbondingDelegationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryUnbondingDelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegatorUnbondingDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryUnbondingDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.UnbondingResponses) > 0 { - for _, e := range m.UnbondingResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.Unbond.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryRedelegationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.SrcValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.DstValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryDelegatorDelegationsRequest) 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 n + return dAtA[:n], nil } -func (m *QueryRedelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryDelegatorDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorDelegationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.RedelegationResponses) > 0 { - for _, e := range m.RedelegationResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(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 m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryDelegatorValidatorsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryDelegatorDelegationsResponse) 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 n + return dAtA[:n], nil } -func (m *QueryDelegatorValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Validators) > 0 { - for _, e := range m.Validators { - 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 *QueryDelegatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegatorValidatorRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryDelegatorDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DelegatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(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 } - l = len(m.ValidatorAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.DelegationResponses) > 0 { + for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *QueryDelegatorValidatorResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryDelegatorUnbondingDelegationsRequest) 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 *QueryDelegatorUnbondingDelegationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorUnbondingDelegationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.Validator.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + 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.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryHistoricalInfoRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryDelegatorUnbondingDelegationsResponse) 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 *QueryDelegatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) + 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 } - return n + if len(m.UnbondingResponses) > 0 { + for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingResponses[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 *QueryHistoricalInfoResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRedelegationsRequest) 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 *QueryRedelegationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRedelegationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Hist != nil { - l = m.Hist.Size() - n += 1 + l + sovQuery(uint64(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 } - return n + if len(m.DstValidatorAddr) > 0 { + i -= len(m.DstValidatorAddr) + copy(dAtA[i:], m.DstValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DstValidatorAddr))) + i-- + dAtA[i] = 0x1a + } + if len(m.SrcValidatorAddr) > 0 { + i -= len(m.SrcValidatorAddr) + copy(dAtA[i:], m.SrcValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SrcValidatorAddr))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryPoolRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRedelegationsResponse) 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 *QueryRedelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRedelegationsResponse) 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.RedelegationResponses) > 0 { + for iNdEx := len(m.RedelegationResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RedelegationResponses[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 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.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + 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 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.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[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 *QueryDelegatorValidatorRequest) 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 *QueryDelegatorValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddr) > 0 { + i -= len(m.DelegatorAddr) + copy(dAtA[i:], m.DelegatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorValidatorResponse) 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 *QueryDelegatorValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Validator.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 *QueryHistoricalInfoRequest) 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 *QueryHistoricalInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHistoricalInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryHistoricalInfoResponse) 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 *QueryHistoricalInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHistoricalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Hist != nil { + { + size, err := m.Hist.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 *QueryPoolRequest) 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 *QueryPoolRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryPoolResponse) 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 *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Pool.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 *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 *QueryTokenizeShareRecordByIdRequest) 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 *QueryTokenizeShareRecordByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenizeShareRecordByIdResponse) 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 *QueryTokenizeShareRecordByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Record.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 *QueryTokenizeShareRecordByDenomRequest) 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 *QueryTokenizeShareRecordByDenomRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenizeShareRecordByDenomResponse) 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 *QueryTokenizeShareRecordByDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Record.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 *QueryTokenizeShareRecordsOwnedRequest) 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 *QueryTokenizeShareRecordsOwnedRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordsOwnedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenizeShareRecordsOwnedResponse) 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 *QueryTokenizeShareRecordsOwnedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareRecordsOwnedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Records[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 *QueryAllTokenizeShareRecordsRequest) 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 *QueryAllTokenizeShareRecordsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllTokenizeShareRecordsRequest) 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllTokenizeShareRecordsResponse) 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 *QueryAllTokenizeShareRecordsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllTokenizeShareRecordsResponse) 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.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Records[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 *QueryLastTokenizeShareRecordIdRequest) 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 *QueryLastTokenizeShareRecordIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastTokenizeShareRecordIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryLastTokenizeShareRecordIdResponse) 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 *QueryLastTokenizeShareRecordIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastTokenizeShareRecordIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTotalTokenizeSharedAssetsRequest) 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 *QueryTotalTokenizeSharedAssetsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalTokenizeSharedAssetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTotalTokenizeSharedAssetsResponse) 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 *QueryTotalTokenizeSharedAssetsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalTokenizeSharedAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Value.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 *QueryTotalLiquidStaked) 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 *QueryTotalLiquidStaked) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalLiquidStaked) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTotalLiquidStakedResponse) 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 *QueryTotalLiquidStakedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalLiquidStakedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Tokens) > 0 { + i -= len(m.Tokens) + copy(dAtA[i:], m.Tokens) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Tokens))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenizeShareLockInfo) 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 *QueryTokenizeShareLockInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareLockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenizeShareLockInfoResponse) 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 *QueryTokenizeShareLockInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenizeShareLockInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExpirationTime) > 0 { + i -= len(m.ExpirationTime) + copy(dAtA[i:], m.ExpirationTime) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ExpirationTime))) + i-- + dAtA[i] = 0x12 + } + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) + 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 *QueryValidatorsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Validators) > 0 { + for _, e := range m.Validators { + 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 *QueryValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Validator.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorDelegationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DelegationResponses) > 0 { + for _, e := range m.DelegationResponses { + 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 *QueryValidatorUnbondingDelegationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorUnbondingDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UnbondingResponses) > 0 { + for _, e := range m.UnbondingResponses { + 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 *QueryDelegationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DelegationResponse != nil { + l = m.DelegationResponse.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUnbondingDelegationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUnbondingDelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Unbond.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDelegatorDelegationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DelegationResponses) > 0 { + for _, e := range m.DelegationResponses { + 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 *QueryDelegatorUnbondingDelegationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UnbondingResponses) > 0 { + for _, e := range m.UnbondingResponses { + 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 *QueryRedelegationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SrcValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.DstValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRedelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RedelegationResponses) > 0 { + for _, e := range m.RedelegationResponses { + 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 *QueryDelegatorValidatorsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + 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 _, e := range m.Validators { + 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 *QueryDelegatorValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Validator.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryHistoricalInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovQuery(uint64(m.Height)) + } + return n +} + +func (m *QueryHistoricalInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Hist != nil { + l = m.Hist.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPoolRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Pool.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +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 *QueryTokenizeShareRecordByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryTokenizeShareRecordByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Record.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryTokenizeShareRecordByDenomRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenizeShareRecordByDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Record.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryTokenizeShareRecordsOwnedRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenizeShareRecordsOwnedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAllTokenizeShareRecordsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllTokenizeShareRecordsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + 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 *QueryLastTokenizeShareRecordIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryLastTokenizeShareRecordIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryTotalTokenizeSharedAssetsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTotalTokenizeSharedAssetsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Value.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryTotalLiquidStaked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTotalLiquidStakedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Tokens) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenizeShareLockInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenizeShareLockInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ExpirationTime) + if l > 0 { + 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 *QueryValidatorsRequest) 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: QueryValidatorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) + 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.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 *QueryValidatorsResponse) 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: QueryValidatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorsResponse: 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 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.Validators = append(m.Validators, Validator{}) + if err := m.Validators[len(m.Validators)-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 *QueryValidatorRequest) 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: QueryValidatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", 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.ValidatorAddr = 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 *QueryValidatorResponse) 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: QueryValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator.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 *QueryValidatorDelegationsRequest) 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: QueryValidatorDelegationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", 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.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + 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.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 *QueryValidatorDelegationsResponse) 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: QueryValidatorDelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", 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.DelegationResponses = append(m.DelegationResponses, DelegationResponse{}) + if err := m.DelegationResponses[len(m.DelegationResponses)-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 *QueryValidatorUnbondingDelegationsRequest) 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: QueryValidatorUnbondingDelegationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", 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.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + 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.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 *QueryValidatorUnbondingDelegationsResponse) 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: QueryValidatorUnbondingDelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", 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.UnbondingResponses = append(m.UnbondingResponses, UnbondingDelegation{}) + if err := m.UnbondingResponses[len(m.UnbondingResponses)-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 *QueryDelegationRequest) 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: QueryDelegationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", 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.ValidatorAddr = 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 + } } - var l int - _ = l - return n -} -func (m *QueryPoolResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - l = m.Pool.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return nil } - -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryDelegationResponse) 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: QueryDelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponse", 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.DelegationResponse == nil { + m.DelegationResponse = &DelegationResponse{} + } + if err := m.DelegationResponse.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 + } } - var l int - _ = l - return n -} -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - l = m.Params.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)))) + return nil } -func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3670,15 +6549,15 @@ func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryUnbondingDelegationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryUnbondingDelegationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3706,13 +6585,13 @@ func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = string(dAtA[iNdEx:postIndex]) + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3722,27 +6601,23 @@ func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen 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 - } + m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3765,7 +6640,7 @@ func (m *QueryValidatorsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryUnbondingDelegationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3788,15 +6663,15 @@ func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryUnbondingDelegationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryUnbondingDelegationResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Unbond", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3823,10 +6698,91 @@ func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validators = append(m.Validators, Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Unbond.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 *QueryDelegatorDelegationsRequest) 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: QueryDelegatorDelegationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -3858,7 +6814,7 @@ func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + m.Pagination = &query.PageRequest{} } if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3885,7 +6841,7 @@ func (m *QueryValidatorsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorDelegationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3908,17 +6864,17 @@ func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorDelegationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3928,77 +6884,29 @@ func (m *QueryValidatorRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { + m.DelegationResponses = append(m.DelegationResponses, DelegationResponse{}) + if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); 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 *QueryValidatorResponse) 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: QueryValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4025,7 +6933,10 @@ func (m *QueryValidatorResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4050,7 +6961,7 @@ func (m *QueryValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorDelegationsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4073,15 +6984,15 @@ func (m *QueryValidatorDelegationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorDelegationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4109,7 +7020,7 @@ func (m *QueryValidatorDelegationsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -4168,7 +7079,7 @@ func (m *QueryValidatorDelegationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorDelegationsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4191,15 +7102,15 @@ func (m *QueryValidatorDelegationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorDelegationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4226,8 +7137,8 @@ func (m *QueryValidatorDelegationsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegationResponses = append(m.DelegationResponses, DelegationResponse{}) - if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.UnbondingResponses = append(m.UnbondingResponses, UnbondingDelegation{}) + if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4288,7 +7199,7 @@ func (m *QueryValidatorDelegationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryValidatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4311,15 +7222,15 @@ func (m *QueryValidatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRedelegationsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRedelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4347,9 +7258,73 @@ func (m *QueryValidatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcValidatorAddr", 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.SrcValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstValidatorAddr", 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.DstValidatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -4406,7 +7381,7 @@ func (m *QueryValidatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryValidatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRedelegationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4429,15 +7404,15 @@ func (m *QueryValidatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRedelegationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRedelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RedelegationResponses", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4464,8 +7439,8 @@ func (m *QueryValidatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro if postIndex > l { return io.ErrUnexpectedEOF } - m.UnbondingResponses = append(m.UnbondingResponses, UnbondingDelegation{}) - if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RedelegationResponses = append(m.RedelegationResponses, RedelegationResponse{}) + if err := m.RedelegationResponses[len(m.RedelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4526,7 +7501,7 @@ func (m *QueryValidatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro } return nil } -func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4549,10 +7524,10 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorValidatorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegatorValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4589,9 +7564,9 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4601,23 +7576,27 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddr = string(dAtA[iNdEx:postIndex]) + 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 @@ -4640,7 +7619,7 @@ func (m *QueryDelegationRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegationResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4663,15 +7642,49 @@ func (m *QueryDelegationResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + 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 DelegationResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validators", 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.Validators = append(m.Validators, Validator{}) + if err := m.Validators[len(m.Validators)-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 { @@ -4698,10 +7711,10 @@ func (m *QueryDelegationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.DelegationResponse == nil { - m.DelegationResponse = &DelegationResponse{} + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} } - if err := m.DelegationResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4726,7 +7739,7 @@ func (m *QueryDelegationResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4749,10 +7762,10 @@ func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUnbondingDelegationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorValidatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnbondingDelegationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegatorValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4840,7 +7853,7 @@ func (m *QueryUnbondingDelegationRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUnbondingDelegationResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDelegatorValidatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4863,15 +7876,15 @@ func (m *QueryUnbondingDelegationResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUnbondingDelegationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDelegatorValidatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnbondingDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDelegatorValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unbond", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4898,7 +7911,7 @@ func (m *QueryUnbondingDelegationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Unbond.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4923,7 +7936,7 @@ func (m *QueryUnbondingDelegationResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryHistoricalInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4946,17 +7959,17 @@ func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorDelegationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHistoricalInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHistoricalInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } - var stringLen uint64 + m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4966,27 +7979,64 @@ func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryHistoricalInfoResponse) 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: QueryHistoricalInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHistoricalInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5013,10 +8063,10 @@ func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} + if m.Hist == nil { + m.Hist = &HistoricalInfo{} } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5041,7 +8091,7 @@ func (m *QueryDelegatorDelegationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorDelegationsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5064,49 +8114,65 @@ func (m *QueryDelegatorDelegationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorDelegationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPoolRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", 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 - } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPoolResponse) 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 } - m.DelegationResponses = append(m.DelegationResponses, DelegationResponse{}) - if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5133,10 +8199,7 @@ func (m *QueryDelegatorDelegationsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5161,7 +8224,7 @@ func (m *QueryDelegatorDelegationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5184,47 +8247,65 @@ func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", 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 - } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + 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 } - m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + 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 Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5251,10 +8332,7 @@ func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5279,7 +8357,7 @@ func (m *QueryDelegatorUnbondingDelegationsRequest) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryDelegatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTokenizeShareRecordByIdRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5302,17 +8380,17 @@ func (m *QueryDelegatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenizeShareRecordByIdRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenizeShareRecordByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5322,29 +8400,64 @@ func (m *QueryDelegatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthQuery + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.UnbondingResponses = append(m.UnbondingResponses, UnbondingDelegation{}) - if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenizeShareRecordByIdResponse) 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 } - iNdEx = postIndex - case 2: + 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: QueryTokenizeShareRecordByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenizeShareRecordByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5371,10 +8484,7 @@ func (m *QueryDelegatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5399,7 +8509,7 @@ func (m *QueryDelegatorUnbondingDelegationsResponse) Unmarshal(dAtA []byte) erro } return nil } -func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTokenizeShareRecordByDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5422,15 +8532,15 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryRedelegationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenizeShareRecordByDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRedelegationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenizeShareRecordByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5458,75 +8568,61 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddr = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SrcValidatorAddr", 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 + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.SrcValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DstValidatorAddr", 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 + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenizeShareRecordByDenomResponse) 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.DstValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + 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: QueryTokenizeShareRecordByDenomResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenizeShareRecordByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5553,10 +8649,7 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5581,7 +8674,7 @@ func (m *QueryRedelegationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryRedelegationsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTokenizeShareRecordsOwnedRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5604,17 +8697,17 @@ func (m *QueryRedelegationsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryRedelegationsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenizeShareRecordsOwnedRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRedelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenizeShareRecordsOwnedRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedelegationResponses", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5624,29 +8717,77 @@ func (m *QueryRedelegationsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.RedelegationResponses = append(m.RedelegationResponses, RedelegationResponse{}) - if err := m.RedelegationResponses[len(m.RedelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 2: + 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 *QueryTokenizeShareRecordsOwnedResponse) 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: QueryTokenizeShareRecordsOwnedResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenizeShareRecordsOwnedResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5673,10 +8814,8 @@ func (m *QueryRedelegationsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, TokenizeShareRecord{}) + if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5701,7 +8840,7 @@ func (m *QueryRedelegationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllTokenizeShareRecordsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5724,45 +8863,13 @@ func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorValidatorsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllTokenizeShareRecordsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllTokenizeShareRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -5819,7 +8926,7 @@ func (m *QueryDelegatorValidatorsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllTokenizeShareRecordsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5842,15 +8949,15 @@ func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllTokenizeShareRecordsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllTokenizeShareRecordsResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5877,8 +8984,8 @@ func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validators = append(m.Validators, Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, TokenizeShareRecord{}) + if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5939,7 +9046,7 @@ func (m *QueryDelegatorValidatorsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastTokenizeShareRecordIdRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5962,76 +9069,12 @@ func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorValidatorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastTokenizeShareRecordIdRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastTokenizeShareRecordIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddr", 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.DelegatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddr", 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.ValidatorAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6053,7 +9096,7 @@ func (m *QueryDelegatorValidatorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorValidatorResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastTokenizeShareRecordIdResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6076,17 +9119,17 @@ func (m *QueryDelegatorValidatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorValidatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastTokenizeShareRecordIdResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastTokenizeShareRecordIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6096,25 +9139,11 @@ func (m *QueryDelegatorValidatorResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Id |= uint64(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.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6136,7 +9165,7 @@ func (m *QueryDelegatorValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryHistoricalInfoRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTotalTokenizeSharedAssetsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6159,31 +9188,12 @@ func (m *QueryHistoricalInfoRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryHistoricalInfoRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTotalTokenizeSharedAssetsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryHistoricalInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTotalTokenizeSharedAssetsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - 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 ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6205,7 +9215,7 @@ func (m *QueryHistoricalInfoRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryHistoricalInfoResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTotalTokenizeSharedAssetsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6228,15 +9238,15 @@ func (m *QueryHistoricalInfoResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryHistoricalInfoResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTotalTokenizeSharedAssetsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryHistoricalInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTotalTokenizeSharedAssetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6263,10 +9273,7 @@ func (m *QueryHistoricalInfoResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistoricalInfo{} - } - if err := m.Hist.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6291,7 +9298,7 @@ func (m *QueryHistoricalInfoResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTotalLiquidStaked) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6314,10 +9321,10 @@ func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPoolRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTotalLiquidStaked: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPoolRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTotalLiquidStaked: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -6341,7 +9348,7 @@ func (m *QueryPoolRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTotalLiquidStakedResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6364,17 +9371,17 @@ func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPoolResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTotalLiquidStakedResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTotalLiquidStakedResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6384,24 +9391,23 @@ func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Tokens = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6424,7 +9430,7 @@ func (m *QueryPoolResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTokenizeShareLockInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6447,12 +9453,44 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenizeShareLockInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenizeShareLockInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6474,7 +9512,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTokenizeShareLockInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6497,17 +9535,17 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenizeShareLockInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenizeShareLockInfoResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6517,24 +9555,55 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", 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.ExpirationTime = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/staking/types/query.pb.gw.go b/x/staking/types/query.pb.gw.go index 0982dfc3d671..3205e5f889dc 100644 --- a/x/staking/types/query.pb.gw.go +++ b/x/staking/types/query.pb.gw.go @@ -871,6 +871,312 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_TokenizeShareRecordById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.TokenizeShareRecordById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenizeShareRecordById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.TokenizeShareRecordById(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TokenizeShareRecordByDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordByDenomRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.TokenizeShareRecordByDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenizeShareRecordByDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordByDenomRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.TokenizeShareRecordByDenom(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TokenizeShareRecordsOwned_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordsOwnedRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := client.TokenizeShareRecordsOwned(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenizeShareRecordsOwned_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareRecordsOwnedRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := server.TokenizeShareRecordsOwned(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllTokenizeShareRecords_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllTokenizeShareRecords_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllTokenizeShareRecordsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllTokenizeShareRecords_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllTokenizeShareRecords(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllTokenizeShareRecords_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllTokenizeShareRecordsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllTokenizeShareRecords_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllTokenizeShareRecords(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_LastTokenizeShareRecordId_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastTokenizeShareRecordIdRequest + var metadata runtime.ServerMetadata + + msg, err := client.LastTokenizeShareRecordId(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastTokenizeShareRecordId_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastTokenizeShareRecordIdRequest + var metadata runtime.ServerMetadata + + msg, err := server.LastTokenizeShareRecordId(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TotalTokenizeSharedAssets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalTokenizeSharedAssetsRequest + var metadata runtime.ServerMetadata + + msg, err := client.TotalTokenizeSharedAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalTokenizeSharedAssets_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalTokenizeSharedAssetsRequest + var metadata runtime.ServerMetadata + + msg, err := server.TotalTokenizeSharedAssets(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TotalLiquidStaked_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalLiquidStaked + var metadata runtime.ServerMetadata + + msg, err := client.TotalLiquidStaked(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalLiquidStaked_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalLiquidStaked + var metadata runtime.ServerMetadata + + msg, err := server.TotalLiquidStaked(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TokenizeShareLockInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareLockInfo + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.TokenizeShareLockInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenizeShareLockInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenizeShareLockInfo + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.TokenizeShareLockInfo(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. @@ -1157,6 +1463,166 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TokenizeShareRecordById_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenizeShareRecordById_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenizeShareRecordById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenizeShareRecordByDenom_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenizeShareRecordByDenom_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenizeShareRecordByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenizeShareRecordsOwned_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenizeShareRecordsOwned_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenizeShareRecordsOwned_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllTokenizeShareRecords_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllTokenizeShareRecords_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllTokenizeShareRecords_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastTokenizeShareRecordId_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastTokenizeShareRecordId_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastTokenizeShareRecordId_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalTokenizeSharedAssets_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TotalTokenizeSharedAssets_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TotalTokenizeSharedAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalLiquidStaked_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TotalLiquidStaked_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TotalLiquidStaked_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenizeShareLockInfo_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenizeShareLockInfo_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenizeShareLockInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1478,6 +1944,166 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TokenizeShareRecordById_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_TokenizeShareRecordById_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_TokenizeShareRecordById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenizeShareRecordByDenom_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_TokenizeShareRecordByDenom_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_TokenizeShareRecordByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenizeShareRecordsOwned_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_TokenizeShareRecordsOwned_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_TokenizeShareRecordsOwned_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllTokenizeShareRecords_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_AllTokenizeShareRecords_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_AllTokenizeShareRecords_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastTokenizeShareRecordId_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_LastTokenizeShareRecordId_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_LastTokenizeShareRecordId_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalTokenizeSharedAssets_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_TotalTokenizeSharedAssets_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_TotalTokenizeSharedAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalLiquidStaked_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_TotalLiquidStaked_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_TotalLiquidStaked_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TokenizeShareLockInfo_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_TokenizeShareLockInfo_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_TokenizeShareLockInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1509,6 +2135,22 @@ var ( pattern_Query_Pool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "pool"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TokenizeShareRecordById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "staking", "v1beta1", "tokenize_share_record_by_id", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TokenizeShareRecordByDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "staking", "v1beta1", "tokenize_share_record_by_denom", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TokenizeShareRecordsOwned_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "staking", "v1beta1", "tokenize_share_record_owned", "owner"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllTokenizeShareRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "tokenize_share_records"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_LastTokenizeShareRecordId_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "last_tokenize_share_record_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TotalTokenizeSharedAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "total_tokenize_shared_assets"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TotalLiquidStaked_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "staking", "v1beta1", "total_liquid_staked"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TokenizeShareLockInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "staking", "v1beta1", "tokenize_share_lock_info", "address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1539,4 +2181,20 @@ var ( forward_Query_Pool_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_TokenizeShareRecordById_0 = runtime.ForwardResponseMessage + + forward_Query_TokenizeShareRecordByDenom_0 = runtime.ForwardResponseMessage + + forward_Query_TokenizeShareRecordsOwned_0 = runtime.ForwardResponseMessage + + forward_Query_AllTokenizeShareRecords_0 = runtime.ForwardResponseMessage + + forward_Query_LastTokenizeShareRecordId_0 = runtime.ForwardResponseMessage + + forward_Query_TotalTokenizeSharedAssets_0 = runtime.ForwardResponseMessage + + forward_Query_TotalLiquidStaked_0 = runtime.ForwardResponseMessage + + forward_Query_TokenizeShareLockInfo_0 = runtime.ForwardResponseMessage ) diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 5165724ac964..b0465311d9ed 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -109,6 +109,43 @@ func (InfractionType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_64c30c6cf92913c9, []int{1} } +// TokenizeShareLockStatus indicates whether the address is able to tokenize shares +type TokenizeShareLockStatus int32 + +const ( + // UNSPECIFIED defines an empty tokenize share lock status + TOKENIZE_SHARE_LOCK_STATUS_UNSPECIFIED TokenizeShareLockStatus = 0 + // LOCKED indicates the account is locked and cannot tokenize shares + TOKENIZE_SHARE_LOCK_STATUS_LOCKED TokenizeShareLockStatus = 1 + // UNLOCKED indicates the account is unlocked and can tokenize shares + TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED TokenizeShareLockStatus = 2 + // LOCK_EXPIRING indicates the account is unable to tokenize shares, but + // will be able to tokenize shortly (after 1 unbonding period) + TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING TokenizeShareLockStatus = 3 +) + +var TokenizeShareLockStatus_name = map[int32]string{ + 0: "TOKENIZE_SHARE_LOCK_STATUS_UNSPECIFIED", + 1: "TOKENIZE_SHARE_LOCK_STATUS_LOCKED", + 2: "TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED", + 3: "TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING", +} + +var TokenizeShareLockStatus_value = map[string]int32{ + "TOKENIZE_SHARE_LOCK_STATUS_UNSPECIFIED": 0, + "TOKENIZE_SHARE_LOCK_STATUS_LOCKED": 1, + "TOKENIZE_SHARE_LOCK_STATUS_UNLOCKED": 2, + "TOKENIZE_SHARE_LOCK_STATUS_LOCK_EXPIRING": 3, +} + +func (x TokenizeShareLockStatus) String() string { + return proto.EnumName(TokenizeShareLockStatus_name, int32(x)) +} + +func (TokenizeShareLockStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{2} +} + // HistoricalInfo contains header and validator information for a given block. // It is stored as part of staking module's state, which persists the `n` most // recent HistoricalInfo @@ -365,12 +402,16 @@ type Validator struct { UnbondingTime time.Time `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3,stdtime" json:"unbonding_time" yaml:"unbonding_time"` // commission defines the commission parameters. Commission Commission `protobuf:"bytes,10,opt,name=commission,proto3" json:"commission"` - // min_self_delegation is the validator's self declared minimum self delegation. - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` + // Deprecated: This field has been deprecated with LSM in favor of the validator bond + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` // Deprecated: Do not use. // strictly positive if this validator's unbonding has been stopped by external modules UnbondingOnHoldRefCount int64 `protobuf:"varint,12,opt,name=unbonding_on_hold_ref_count,json=unbondingOnHoldRefCount,proto3" json:"unbonding_on_hold_ref_count,omitempty"` // list of unbonding ids, each uniquely identifing an unbonding of this validator UnbondingIds []uint64 `protobuf:"varint,13,rep,packed,name=unbonding_ids,json=unbondingIds,proto3" json:"unbonding_ids,omitempty"` + // Number of shares self bonded from the validator + ValidatorBondShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,14,opt,name=validator_bond_shares,json=validatorBondShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validator_bond_shares" yaml:"validator_bond_shares"` + // Number of shares either tokenized or owned by a liquid staking provider + LiquidShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,15,opt,name=liquid_shares,json=liquidShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquid_shares" yaml:"liquid_shares"` } func (m *Validator) Reset() { *m = Validator{} } @@ -631,6 +672,8 @@ type Delegation struct { ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` // shares define the delegation shares received. Shares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` + // has this delegation been marked as a validator self bond. + ValidatorBond bool `protobuf:"varint,4,opt,name=validator_bond,json=validatorBond,proto3" json:"validator_bond,omitempty"` } func (m *Delegation) Reset() { *m = Delegation{} } @@ -917,6 +960,15 @@ type Params struct { HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty" yaml:"historical_entries"` // bond_denom defines the bondable coin denomination. BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty" yaml:"bond_denom"` + // validator_bond_factor is required as a safety check for tokenizing shares and + // delegations from liquid staking providers + ValidatorBondFactor github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=validator_bond_factor,json=validatorBondFactor,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validator_bond_factor" yaml:"validator_bond_factor"` + // global_liquid_staking_cap represents a cap on the portion of stake that + // comes from liquid staking providers + GlobalLiquidStakingCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=global_liquid_staking_cap,json=globalLiquidStakingCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"global_liquid_staking_cap" yaml:"global_liquid_staking_cap"` + // validator_liquid_staking_cap represents a cap on the portion of stake that + // comes from liquid staking providers for a specific validator + ValidatorLiquidStakingCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=validator_liquid_staking_cap,json=validatorLiquidStakingCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validator_liquid_staking_cap" yaml:"validator_liquid_staking_cap"` } func (m *Params) Reset() { *m = Params{} } @@ -1227,9 +1279,125 @@ func (m *ValidatorUpdates) GetUpdates() []types3.ValidatorUpdate { return nil } +// TokenizeShareRecord represents a tokenized delegation +type TokenizeShareRecord struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + ModuleAccount string `protobuf:"bytes,3,opt,name=module_account,json=moduleAccount,proto3" json:"module_account,omitempty"` + Validator string `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (m *TokenizeShareRecord) Reset() { *m = TokenizeShareRecord{} } +func (m *TokenizeShareRecord) String() string { return proto.CompactTextString(m) } +func (*TokenizeShareRecord) ProtoMessage() {} +func (*TokenizeShareRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{21} +} +func (m *TokenizeShareRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenizeShareRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenizeShareRecord.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 *TokenizeShareRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenizeShareRecord.Merge(m, src) +} +func (m *TokenizeShareRecord) XXX_Size() int { + return m.Size() +} +func (m *TokenizeShareRecord) XXX_DiscardUnknown() { + xxx_messageInfo_TokenizeShareRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenizeShareRecord proto.InternalMessageInfo + +func (m *TokenizeShareRecord) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *TokenizeShareRecord) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *TokenizeShareRecord) GetModuleAccount() string { + if m != nil { + return m.ModuleAccount + } + return "" +} + +func (m *TokenizeShareRecord) GetValidator() string { + if m != nil { + return m.Validator + } + return "" +} + +// PendingTokenizeShareAuthorizations stores a list of addresses that have their +// tokenize share enablement in progress +type PendingTokenizeShareAuthorizations struct { + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` +} + +func (m *PendingTokenizeShareAuthorizations) Reset() { *m = PendingTokenizeShareAuthorizations{} } +func (m *PendingTokenizeShareAuthorizations) String() string { return proto.CompactTextString(m) } +func (*PendingTokenizeShareAuthorizations) ProtoMessage() {} +func (*PendingTokenizeShareAuthorizations) Descriptor() ([]byte, []int) { + return fileDescriptor_64c30c6cf92913c9, []int{22} +} +func (m *PendingTokenizeShareAuthorizations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PendingTokenizeShareAuthorizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PendingTokenizeShareAuthorizations.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 *PendingTokenizeShareAuthorizations) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingTokenizeShareAuthorizations.Merge(m, src) +} +func (m *PendingTokenizeShareAuthorizations) XXX_Size() int { + return m.Size() +} +func (m *PendingTokenizeShareAuthorizations) XXX_DiscardUnknown() { + xxx_messageInfo_PendingTokenizeShareAuthorizations.DiscardUnknown(m) +} + +var xxx_messageInfo_PendingTokenizeShareAuthorizations proto.InternalMessageInfo + +func (m *PendingTokenizeShareAuthorizations) GetAddresses() []string { + if m != nil { + return m.Addresses + } + return nil +} + func init() { proto.RegisterEnum("cosmos.staking.v1beta1.BondStatus", BondStatus_name, BondStatus_value) proto.RegisterEnum("cosmos.staking.v1beta1.InfractionType", InfractionType_name, InfractionType_value) + proto.RegisterEnum("cosmos.staking.v1beta1.TokenizeShareLockStatus", TokenizeShareLockStatus_name, TokenizeShareLockStatus_value) proto.RegisterType((*HistoricalInfo)(nil), "cosmos.staking.v1beta1.HistoricalInfo") proto.RegisterType((*CommissionRates)(nil), "cosmos.staking.v1beta1.CommissionRates") proto.RegisterType((*Commission)(nil), "cosmos.staking.v1beta1.Commission") @@ -1251,6 +1419,8 @@ func init() { proto.RegisterType((*RedelegationResponse)(nil), "cosmos.staking.v1beta1.RedelegationResponse") proto.RegisterType((*Pool)(nil), "cosmos.staking.v1beta1.Pool") proto.RegisterType((*ValidatorUpdates)(nil), "cosmos.staking.v1beta1.ValidatorUpdates") + proto.RegisterType((*TokenizeShareRecord)(nil), "cosmos.staking.v1beta1.TokenizeShareRecord") + proto.RegisterType((*PendingTokenizeShareAuthorizations)(nil), "cosmos.staking.v1beta1.PendingTokenizeShareAuthorizations") } func init() { @@ -1258,134 +1428,154 @@ func init() { } var fileDescriptor_64c30c6cf92913c9 = []byte{ - // 2021 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4f, 0x6c, 0x23, 0x57, - 0x19, 0xf7, 0xd8, 0xae, 0xe3, 0x7c, 0x4e, 0xe2, 0xe4, 0x6d, 0x76, 0xd7, 0xf1, 0x2e, 0xb6, 0x77, - 0x5a, 0x95, 0xb0, 0x6a, 0x1d, 0x36, 0xad, 0x8a, 0x88, 0x90, 0x68, 0x1c, 0x3b, 0x8d, 0xd5, 0x6d, - 0x36, 0x8c, 0x9d, 0x54, 0x40, 0xc5, 0x68, 0x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0x84, 0x9e, 0xef, 0xda, 0x16, 0xe4, 0x42, - 0x97, 0x10, 0x54, 0x87, 0x2c, 0x95, 0xbf, 0xa5, 0x87, 0xd5, 0x8b, 0x3d, 0xec, 0x8b, 0x49, 0x2f, - 0x07, 0x92, 0xea, 0xbf, 0x15, 0x80, 0x48, 0x59, 0x7c, 0x21, 0x53, 0x8c, 0x4d, 0x0b, 0xd9, 0xdb, - 0x53, 0xcf, 0x75, 0x1b, 0x94, 0xd2, 0x31, 0x7f, 0xfe, 0x34, 0x09, 0x57, 0x76, 0xfd, 0x82, 0xfd, - 0xc2, 0xfb, 0x60, 0x07, 0xa6, 0xb0, 0x43, 0x3d, 0x9b, 0x3b, 0x81, 0x45, 0xfb, 0xeb, 0x17, 0x45, - 0xfb, 0x1c, 0x9b, 0x1a, 0x0e, 0xf5, 0x46, 0x32, 0xf6, 0x3e, 0x4c, 0xcc, 0x1b, 0x9f, 0xa5, 0xa0, - 0x70, 0x91, 0x24, 0xda, 0x80, 0xbc, 0xe9, 0x61, 0x4e, 0xf0, 0x47, 0x94, 0xc2, 0x47, 0x54, 0x31, - 0xbc, 0xbc, 0xc6, 0x18, 0x54, 0x6d, 0xce, 0xa7, 0xc8, 0x01, 0xd5, 0x05, 0x76, 0xb3, 0x64, 0x69, - 0xc7, 0xb8, 0x9e, 0xf1, 0x2a, 0xa9, 0xca, 0x09, 0xe5, 0x2b, 0x39, 0x0b, 0x20, 0x46, 0xd4, 0x5c, - 0x48, 0xe5, 0x33, 0xea, 0x47, 0x90, 0xb7, 0x1d, 0x9b, 0xda, 0x46, 0x4f, 0xef, 0x18, 0x3d, 0xc3, - 0x31, 0x9f, 0xe7, 0x62, 0x2e, 0xa6, 0x8a, 0x54, 0x1b, 0x83, 0x53, 0xb5, 0x39, 0x49, 0xa9, 0x09, - 0x02, 0xda, 0x82, 0x29, 0x5f, 0x55, 0xfa, 0xb9, 0x2e, 0x34, 0xbe, 0x38, 0xba, 0x05, 0x33, 0xd1, - 0xd1,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, - 0xfb, 0x9e, 0x61, 0xf2, 0x0b, 0xc6, 0x68, 0x80, 0xd1, 0xeb, 0x70, 0xa3, 0xb9, 0xbd, 0xa9, 0xad, - 0x6f, 0xb4, 0x9b, 0xf7, 0xb6, 0xf5, 0xf6, 0x77, 0x77, 0x1a, 0x31, 0x03, 0xae, 0x1c, 0x9f, 0x54, - 0xf2, 0xa1, 0x50, 0xa3, 0x3f, 0xa0, 0x23, 0xb4, 0x32, 0x29, 0x55, 0xbf, 0xb7, 0x5b, 0xbb, 0xdb, - 0xd0, 0x5b, 0xcd, 0xb7, 0xb6, 0xe7, 0x95, 0xe2, 0xdc, 0xf1, 0x49, 0x05, 0xea, 0xee, 0xb0, 0xd3, - 0xc3, 0x2d, 0xbb, 0xeb, 0xa0, 0xdb, 0x50, 0x98, 0x14, 0x78, 0x77, 0xbb, 0xdd, 0x7c, 0xa7, 0x31, - 0x9f, 0x14, 0x96, 0xd7, 0xdd, 0xf7, 0x1d, 0x36, 0x09, 0xc4, 0x59, 0x6b, 0x9b, 0x9f, 0x3e, 0x2a, - 0x29, 0x0f, 0x1f, 0x95, 0x94, 0xbf, 0x3d, 0x2a, 0x29, 0x1f, 0x3d, 0x2e, 0x25, 0x1e, 0x3e, 0x2e, - 0x25, 0xfe, 0xf4, 0xb8, 0x94, 0xf8, 0xde, 0x2b, 0x4f, 0xcc, 0x9e, 0xa3, 0xe0, 0x0f, 0x23, 0x3c, - 0x8f, 0x3a, 0x19, 0x3e, 0x88, 0x5e, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0xe2, 0xd3, - 0xf7, 0x37, 0x19, 0x00, 0x00, + // 2345 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x39, 0xdd, 0x6f, 0x23, 0x57, + 0xf5, 0x19, 0xc7, 0x75, 0xe2, 0xe3, 0xc4, 0x4e, 0xee, 0x66, 0x77, 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b0, 0xe8, 0x55, 0x44, 0xe8, 0xfa, 0xa9, 0x04, 0x97, 0xfb, 0x42, 0x74, + 0xd7, 0xd6, 0xf6, 0x85, 0xc7, 0x6f, 0xc0, 0xf5, 0xed, 0x8d, 0x3b, 0xb5, 0xf5, 0xfa, 0x3b, 0x35, + 0x75, 0x6b, 0x6d, 0x59, 0xa9, 0xa9, 0x77, 0x37, 0x56, 0xee, 0x9c, 0x18, 0x00, 0xf4, 0x12, 0x5c, + 0x3d, 0x03, 0x97, 0x7e, 0x53, 0xe7, 0xa3, 0x97, 0xe1, 0xda, 0x99, 0x2c, 0x05, 0x62, 0x02, 0xdd, + 0x84, 0x85, 0x73, 0xf8, 0xa9, 0xb5, 0xaf, 0x6f, 0xd6, 0x15, 0x1a, 0xaa, 0x51, 0x6e, 0x4b, 0x65, + 0xf5, 0x93, 0xc7, 0xf3, 0xd2, 0xa3, 0xc7, 0xf3, 0xd2, 0xdf, 0x1e, 0xcf, 0x4b, 0x1f, 0x3e, 0x99, + 0x1f, 0x79, 0xf4, 0x64, 0x7e, 0xe4, 0x4f, 0x4f, 0xe6, 0x47, 0xde, 0xb9, 0x79, 0xe6, 0xb1, 0x3e, + 0x08, 0x7e, 0x80, 0x65, 0x07, 0xbc, 0x91, 0x62, 0xb7, 0xba, 0x57, 0xff, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0x3f, 0x7c, 0x5c, 0x4b, 0x9f, 0x1d, 0x00, 0x00, } func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { @@ -1394,791 +1584,876 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 12543 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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 0x45, 0xdc, 0xc2, 0x0e, - 0x7a, 0x0a, 0x52, 0xbb, 0x7a, 0x1d, 0x4f, 0x49, 0xb3, 0xc9, 0x53, 0xc3, 0x67, 0xef, 0x9d, 0x0b, - 0x11, 0xcd, 0x05, 0x29, 0x36, 0x09, 0x58, 0xa1, 0x14, 0xf2, 0x97, 0x52, 0x30, 0xd1, 0xe1, 0x2b, - 0x42, 0x90, 0x32, 0xb4, 0x06, 0xe1, 0x28, 0x9d, 0xca, 0x2a, 0xf4, 0x7f, 0x34, 0x05, 0x43, 0x96, - 0x56, 0xb9, 0xaa, 0xd5, 0xf0, 0x54, 0x82, 0x82, 0x45, 0x11, 0x4d, 0x03, 0x54, 0xb1, 0x85, 0x8d, - 0x2a, 0x36, 0x2a, 0x07, 0x53, 0xc9, 0xd9, 0xe4, 0xa9, 0xac, 0xe2, 0x83, 0xa0, 0x87, 0x60, 0xdc, - 0x6a, 0xed, 0xd4, 0xf5, 0x8a, 0xea, 0x43, 0x83, 0xd9, 0xe4, 0xa9, 0xb4, 0x92, 0x67, 0x1f, 0x16, - 0x3d, 0xe4, 0x07, 0x60, 0xec, 0x3a, 0xd6, 0xae, 0xfa, 0x51, 0x87, 0x29, 0xea, 0x28, 0x01, 0xfb, - 0x10, 0x17, 0x20, 0xd7, 0xc0, 0xb6, 0xad, 0xd5, 0xb0, 0xea, 0x1c, 0x58, 0x78, 0x2a, 0x45, 0x7b, - 0x3f, 0xdb, 0xd6, 0xfb, 0x70, 0xcf, 0x87, 0x39, 0xd5, 0xf6, 0x81, 0x85, 0x51, 0x11, 0xb2, 0xd8, - 0x68, 0x35, 0x18, 0x87, 0x74, 0x84, 0xfc, 0xca, 0x46, 0xab, 0x11, 0xe6, 0x92, 0x21, 0x64, 0x9c, - 0xc5, 0x90, 0x8d, 0x9b, 0xd7, 0xf4, 0x0a, 0x9e, 0x1a, 0xa4, 0x0c, 0x1e, 0x68, 0x63, 0xb0, 0xc5, - 0xbe, 0x87, 0x79, 0x08, 0x3a, 0xb4, 0x00, 0x59, 0xbc, 0xef, 0x60, 0xc3, 0xd6, 0x4d, 0x63, 0x6a, - 0x88, 0x32, 0xb9, 0xaf, 0xc3, 0x28, 0xe2, 0x7a, 0x35, 0xcc, 0xc2, 0xa3, 0x43, 0xe7, 0x61, 0xc8, - 0xb4, 0x1c, 0xdd, 0x34, 0xec, 0xa9, 0xcc, 0xac, 0x74, 0x6a, 0xf8, 0xec, 0xc9, 0x8e, 0x8a, 0xb0, - 0xc1, 0x70, 0x14, 0x81, 0x8c, 0x56, 0x20, 0x6f, 0x9b, 0xad, 0x66, 0x05, 0xab, 0x15, 0xb3, 0x8a, - 0x55, 0xdd, 0xd8, 0x35, 0xa7, 0xb2, 0x94, 0xc1, 0x4c, 0x7b, 0x47, 0x28, 0xe2, 0x82, 0x59, 0xc5, - 0x2b, 0xc6, 0xae, 0xa9, 0x8c, 0xda, 0x81, 0x32, 0x3a, 0x0a, 0x83, 0xf6, 0x81, 0xe1, 0x68, 0xfb, - 0x53, 0x39, 0xaa, 0x21, 0xbc, 0x24, 0xff, 0xca, 0x20, 0x8c, 0xf5, 0xa2, 0x62, 0x17, 0x21, 0xbd, - 0x4b, 0x7a, 0x39, 0x95, 0xe8, 0x47, 0x06, 0x8c, 0x26, 0x28, 0xc4, 0xc1, 0x43, 0x0a, 0xb1, 0x08, - 0xc3, 0x06, 0xb6, 0x1d, 0x5c, 0x65, 0x1a, 0x91, 0xec, 0x51, 0xa7, 0x80, 0x11, 0xb5, 0xab, 0x54, - 0xea, 0x50, 0x2a, 0xf5, 0x02, 0x8c, 0xb9, 0x4d, 0x52, 0x9b, 0x9a, 0x51, 0x13, 0xba, 0x79, 0x26, - 0xae, 0x25, 0x73, 0x65, 0x41, 0xa7, 0x10, 0x32, 0x65, 0x14, 0x07, 0xca, 0x68, 0x11, 0xc0, 0x34, - 0xb0, 0xb9, 0xab, 0x56, 0x71, 0xa5, 0x3e, 0x95, 0x89, 0x90, 0xd2, 0x06, 0x41, 0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2, 0x4b, 0xa8, 0x08, 0xe9, 0xba, 0xb6, 0x83, 0xeb, 0x53, 0xa9, 0x59, 0xe9, 0xd4, - 0xe8, 0xd9, 0x87, 0x7a, 0x9a, 0x95, 0x73, 0xab, 0x84, 0x44, 0x61, 0x94, 0xe8, 0x6d, 0x90, 0xe2, - 0x26, 0x9a, 0x70, 0x38, 0xdd, 0x1b, 0x07, 0x32, 0x97, 0x14, 0x4a, 0x87, 0x4e, 0x40, 0x96, 0xfc, - 0x65, 0xba, 0x31, 0x48, 0xdb, 0x9c, 0x21, 0x00, 0xa2, 0x17, 0xa8, 0x00, 0x19, 0x3a, 0x4d, 0xaa, - 0x58, 0xb8, 0x36, 0xb7, 0x4c, 0x14, 0xab, 0x8a, 0x77, 0xb5, 0x56, 0xdd, 0x51, 0xaf, 0x69, 0xf5, - 0x16, 0xa6, 0x0a, 0x9f, 0x55, 0x72, 0x1c, 0x78, 0x85, 0xc0, 0xd0, 0x0c, 0x0c, 0xb3, 0x59, 0xa5, - 0x1b, 0x55, 0xbc, 0x4f, 0xad, 0x67, 0x5a, 0x61, 0x13, 0x6d, 0x85, 0x40, 0x48, 0xf5, 0x2f, 0xd9, - 0xa6, 0x21, 0x54, 0x93, 0x56, 0x41, 0x00, 0xb4, 0xfa, 0x27, 0xc3, 0x86, 0xfb, 0xae, 0xce, 0xdd, - 0x6b, 0x9b, 0x4b, 0x0f, 0xc0, 0x18, 0xc5, 0x78, 0x9c, 0x0f, 0xbd, 0x56, 0x9f, 0x1a, 0x9f, 0x95, - 0x4e, 0x65, 0x94, 0x51, 0x06, 0xde, 0xe0, 0x50, 0xf9, 0x17, 0x13, 0x90, 0xa2, 0x86, 0x65, 0x0c, - 0x86, 0xb7, 0xdf, 0xb1, 0x59, 0x56, 0x17, 0x37, 0x2e, 0x97, 0x56, 0xcb, 0x79, 0x09, 0x8d, 0x02, - 0x50, 0xc0, 0xa5, 0xd5, 0x8d, 0xe2, 0x76, 0x3e, 0xe1, 0x96, 0x57, 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 0xca, 0x6a, 0x36, 0x74, 0xc3, 0x39, - 0x53, 0x69, 0x1e, 0x58, 0x0e, 0x0d, 0xdc, 0xcc, 0x5d, 0x2e, 0x97, 0x71, 0xef, 0xf3, 0x1c, 0xfb, - 0x1c, 0x31, 0x73, 0x76, 0x21, 0xbd, 0x49, 0xe8, 0x88, 0x44, 0x1c, 0xd3, 0xd1, 0xea, 0x5c, 0x52, - 0xac, 0x40, 0xa0, 0xec, 0x22, 0x57, 0x82, 0x41, 0x75, 0x71, 0x87, 0xab, 0x8e, 0xb5, 0x5d, 0x76, - 0x1e, 0x3e, 0x49, 0x27, 0x54, 0x86, 0x00, 0xe8, 0xd1, 0xf7, 0x49, 0x48, 0x6b, 0x2d, 0x76, 0x94, - 0x23, 0x49, 0x66, 0x1a, 0x2d, 0xc8, 0xcf, 0xc2, 0x10, 0xdf, 0x50, 0x46, 0x79, 0x48, 0x5e, 0xc5, - 0x07, 0xb4, 0x9e, 0x9c, 0x42, 0xfe, 0x45, 0x73, 0x90, 0xa6, 0x8d, 0xe7, 0x0e, 0x64, 0x6a, 0xae, - 0xad, 0xf5, 0x73, 0xb4, 0x91, 0x0a, 0x43, 0x93, 0x9f, 0x81, 0xcc, 0xa2, 0xd9, 0xd0, 0x0d, 0x33, - 0xc8, 0x2d, 0xcb, 0xb8, 0xd1, 0x36, 0x5b, 0x2d, 0x1e, 0x6f, 0x28, 0xac, 0x80, 0x8e, 0xc2, 0x20, - 0xbb, 0x1f, 0xc1, 0x8f, 0xa3, 0xf0, 0x92, 0xbc, 0x00, 0x43, 0x94, 0xf7, 0x86, 0x85, 0x10, 0xbf, - 0x59, 0xc7, 0x2f, 0x62, 0xd0, 0xd0, 0x94, 0xb3, 0x4f, 0x78, 0x8d, 0x45, 0x90, 0xaa, 0x6a, 0x8e, - 0xc6, 0xfb, 0x4d, 0xff, 0x97, 0xdf, 0x06, 0x19, 0xce, 0xc4, 0x46, 0x67, 0x21, 0x69, 0x5a, 0x36, - 0x3f, 0x50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x2f, 0xbf, 0x36, 0x23, 0xd1, 0x0d, 0xde, - 0x79, 0x18, 0x09, 0xc8, 0x9c, 0xde, 0xdb, 0xb6, 0x2c, 0xd5, 0xbf, 0xec, 0x4b, 0x29, 0xa0, 0x59, - 0x16, 0x47, 0xf3, 0xd1, 0xbe, 0x08, 0x39, 0x62, 0x6f, 0x71, 0x95, 0x93, 0xde, 0x0f, 0x63, 0xcc, - 0x1f, 0x84, 0x87, 0x85, 0x05, 0x64, 0x6b, 0x62, 0x6c, 0x64, 0x11, 0xa1, 0x05, 0x47, 0x68, 0x58, - 0x60, 0x2d, 0x69, 0x76, 0xe9, 0xf2, 0x4f, 0xbc, 0x3e, 0x2d, 0xdd, 0xb9, 0xf9, 0x7c, 0x73, 0x19, - 0x4e, 0xf8, 0x3e, 0x6a, 0x3b, 0x15, 0x3d, 0x90, 0xc0, 0x18, 0xf3, 0x69, 0x26, 0xf9, 0x18, 0x97, - 0x88, 0xe8, 0x9a, 0x0e, 0xe9, 0x9e, 0x7f, 0x2b, 0x74, 0x37, 0x2c, 0xf1, 0x39, 0x92, 0xce, 0x69, - 0xcf, 0x0f, 0x67, 0x60, 0x48, 0xc1, 0xef, 0x6d, 0x61, 0xdb, 0x41, 0x67, 0x21, 0x85, 0x2b, 0x7b, - 0x66, 0xa7, 0x0c, 0x13, 0xe9, 0xdc, 0x1c, 0xc7, 0x2b, 0x57, 0xf6, 0xcc, 0xe5, 0x01, 0x85, 0xe2, - 0xa2, 0x73, 0x90, 0xde, 0xad, 0xb7, 0x78, 0xca, 0x23, 0x64, 0x73, 0xfc, 0x44, 0x97, 0x08, 0xd2, - 0xf2, 0x80, 0xc2, 0xb0, 0x49, 0x55, 0xf4, 0x91, 0xce, 0x64, 0xf7, 0xaa, 0x56, 0x8c, 0x5d, 0x5a, - 0x15, 0xc1, 0x45, 0x25, 0x00, 0x1b, 0x3b, 0xe2, 0x06, 0x76, 0xaa, 0xdd, 0xc0, 0xf8, 0x29, 0xb7, - 0xb0, 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, 0x95, 0x15, 0x18, 0x0d, 0x1a, 0x78, 0x34, 0x0a, 0x09, 0x67, 0x9f, 0x0b, - 0x20, 0xe1, 0xec, 0xa3, 0x47, 0x79, 0xf2, 0x27, 0x41, 0x93, 0x3f, 0xed, 0xde, 0x95, 0xd3, 0x79, - 0x99, 0x1f, 0x59, 0x76, 0x67, 0x83, 0x6b, 0xf4, 0xc3, 0x5c, 0xe5, 0x07, 0x61, 0x2c, 0x64, 0xd5, - 0xa3, 0x52, 0x81, 0xf2, 0x18, 0x8c, 0x04, 0x4c, 0xb8, 0x7c, 0x14, 0x26, 0x3b, 0x59, 0x64, 0x79, - 0xcf, 0x85, 0x07, 0x2c, 0x2b, 0x3a, 0x07, 0x19, 0xd7, 0x24, 0x77, 0x48, 0x3d, 0xd0, 0x5e, 0x08, - 0x64, 0xc5, 0x45, 0x0d, 0x64, 0xb0, 0x13, 0x81, 0x0c, 0xb6, 0xfc, 0x1d, 0x30, 0x15, 0x65, 0x6e, - 0x43, 0xdd, 0x48, 0xb9, 0x6a, 0x78, 0x14, 0x06, 0xf9, 0xb3, 0x61, 0x09, 0xba, 0x67, 0xc3, 0x4b, - 0x44, 0x3d, 0x99, 0xe9, 0x4d, 0xb2, 0xad, 0x1c, 0x5a, 0x90, 0x55, 0x38, 0x1e, 0x69, 0x72, 0xa3, - 0x77, 0x7f, 0x18, 0x23, 0xbe, 0xfb, 0x53, 0x11, 0xcd, 0xb1, 0x69, 0x5f, 0xc5, 0x89, 0x07, 0x56, - 0x92, 0xff, 0x53, 0x06, 0x32, 0x0a, 0xb6, 0x2d, 0x62, 0x13, 0x50, 0x09, 0xb2, 0x78, 0xbf, 0x82, - 0x2d, 0xc7, 0xdb, 0x75, 0xe9, 0x14, 0x4c, 0x30, 0xec, 0xb2, 0xc0, 0x24, 0x9e, 0xdc, 0x25, 0x43, - 0x8f, 0xf3, 0x80, 0x2f, 0x3a, 0x76, 0xe3, 0xe4, 0xfe, 0x88, 0xef, 0xbc, 0x88, 0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, 0x21, 0x1c, 0x96, 0x70, - 0x32, 0xf9, 0x67, 0xe8, 0xd1, 0xc9, 0x46, 0x43, 0xb7, 0xd9, 0xef, 0x91, 0x92, 0x35, 0x41, 0x09, - 0x52, 0x4d, 0xcd, 0xe1, 0x21, 0x79, 0x69, 0x8e, 0x3f, 0x45, 0x72, 0x7f, 0x0f, 0x0f, 0x6b, 0x2c, - 0xe2, 0x8a, 0x42, 0x69, 0xd1, 0xbb, 0x80, 0xac, 0x31, 0x54, 0xca, 0x87, 0x5d, 0x63, 0x2a, 0xf6, - 0xc7, 0xe7, 0x8d, 0x5b, 0x33, 0x63, 0x07, 0x5a, 0xa3, 0x3e, 0x2f, 0x0b, 0x3e, 0xb2, 0x42, 0x96, - 0x2a, 0xa4, 0x89, 0xc8, 0x82, 0x31, 0x02, 0xad, 0xec, 0x69, 0x46, 0x0d, 0xb3, 0x4a, 0x68, 0xce, - 0xa9, 0xb4, 0xdc, 0x77, 0x25, 0x47, 0xbd, 0x4a, 0x7c, 0xec, 0x64, 0x65, 0xa4, 0xa1, 0xed, 0x2f, - 0x50, 0x00, 0xa9, 0x71, 0x3e, 0xf3, 0xea, 0x6b, 0x33, 0x03, 0xf4, 0x04, 0xdf, 0xe7, 0x25, 0x00, - 0x4f, 0x62, 0xe8, 0x5d, 0x90, 0xaf, 0xb8, 0x25, 0x4a, 0x2b, 0x32, 0xd3, 0x0f, 0x44, 0x8d, 0x45, - 0x48, 0xde, 0x2c, 0xaa, 0xfb, 0xdc, 0xad, 0x19, 0x49, 0x19, 0xab, 0x84, 0x86, 0xe2, 0x9d, 0x30, - 0xcc, 0x92, 0x41, 0x2a, 0x8d, 0x10, 0x13, 0xb1, 0x11, 0xe2, 0x34, 0xe1, 0xf5, 0xc6, 0xad, 0x19, - 0xc4, 0xba, 0xe5, 0x23, 0x96, 0x69, 0xdc, 0x08, 0x0c, 0x42, 0x08, 0x7c, 0x7d, 0xfa, 0x4d, 0x09, - 0x86, 0x17, 0x7d, 0x0f,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d, 0x56, 0x26, 0xbc, 0xfb, 0x59, 0xcd, 0x4a, 0x47, 0xae, - 0x55, 0xdb, 0x71, 0xb9, 0x26, 0xa3, 0xb9, 0xfa, 0xd0, 0xfc, 0x5c, 0x17, 0x6d, 0xa7, 0xb3, 0x68, - 0xb7, 0x60, 0xd8, 0x13, 0x89, 0x8d, 0x16, 0x21, 0xe3, 0xf0, 0xff, 0xb9, 0x84, 0xe5, 0x68, 0x09, - 0x0b, 0x32, 0x71, 0x45, 0x44, 0x50, 0xca, 0x7f, 0x2a, 0x01, 0xf8, 0xa6, 0xc5, 0x5f, 0x48, 0x15, - 0x23, 0xde, 0x82, 0xdb, 0xf6, 0xe4, 0xa1, 0xa2, 0x41, 0x4e, 0x1d, 0x92, 0xe7, 0xf7, 0x27, 0x60, - 0xe2, 0xb2, 0x98, 0xb0, 0x7f, 0xe1, 0x65, 0xb0, 0x09, 0x43, 0xd8, 0x70, 0x9a, 0x3a, 0x16, 0x1b, - 0x69, 0x8f, 0x46, 0x8d, 0x76, 0x87, 0x3e, 0xd1, 0x1f, 0xad, 0x14, 0xb7, 0x72, 0x38, 0x9b, 0x90, - 0x34, 0xbe, 0x96, 0x84, 0xa9, 0x28, 0x4a, 0xb4, 0x00, 0x63, 0x95, 0x26, 0x66, 0x0f, 0xbd, 0xf9, - 0x13, 0xcb, 0xa5, 0x82, 0x17, 0xbc, 0x86, 0x10, 0x64, 0x65, 0x54, 0x40, 0xb8, 0x83, 0xaa, 0x01, - 0x89, 0x2c, 0x89, 0xda, 0xd1, 0xf7, 0xe2, 0x7a, 0x0b, 0x25, 0x65, 0xee, 0xa1, 0x44, 0x25, 0x41, - 0x06, 0xcc, 0x45, 0x8d, 0x7a, 0x50, 0xea, 0xa3, 0xde, 0x0b, 0x63, 0xe2, 0x88, 0xec, 0x8e, 0x56, - 0xd7, 0x8c, 0xca, 0x61, 0x02, 0x73, 0xe6, 0x55, 0x78, 0xb5, 0x21, 0x76, 0xb2, 0x22, 0xce, 0xe0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4e, 0x1d, 0x46, 0xc6, 0x57, 0xa9, 0x61, 0x08, - 0xc9, 0xd2, 0x4d, 0x78, 0xad, 0xb5, 0xdf, 0xb8, 0xea, 0xe7, 0x47, 0x33, 0x42, 0xf7, 0xaa, 0xe4, - 0x2f, 0x49, 0x30, 0xb2, 0x66, 0xd7, 0x2e, 0x1b, 0xd5, 0xff, 0xa7, 0xf5, 0x76, 0x17, 0x8e, 0x04, - 0x7a, 0x79, 0x87, 0xc4, 0x79, 0xf6, 0xa3, 0x29, 0x48, 0xae, 0xd9, 0x35, 0xf4, 0x5e, 0x18, 0x0b, - 0x07, 0x0a, 0x91, 0xf1, 0x5f, 0xbb, 0x17, 0x88, 0x5e, 0xa3, 0x45, 0x7b, 0x0c, 0x74, 0x15, 0x46, - 0x82, 0xde, 0xe2, 0x54, 0x17, 0x26, 0x01, 0xcc, 0xc2, 0xa3, 0xbd, 0x62, 0xba, 0x95, 0xbd, 0x0b, - 0x32, 0xae, 0xa1, 0xbb, 0xa7, 0x0b, 0xb5, 0x40, 0x8a, 0x8e, 0x68, 0x3b, 0x98, 0x13, 0x22, 0xbd, - 0xb0, 0x29, 0xe9, 0x26, 0xbd, 0x10, 0x6e, 0x57, 0xe9, 0x45, 0x4d, 0xab, 0x1d, 0x00, 0xdf, 0x1c, - 0xb8, 0xaf, 0x0b, 0x07, 0x0f, 0xad, 0xf0, 0x48, 0x4f, 0x68, 0xee, 0x46, 0xd3, 0x6d, 0x0e, 0xc0, - 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x97, 0xcb, 0xb2, 0x05, 0xc2, 0x00, 0x00, + // 13893 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x7d, 0x74, 0x1c, 0xd7, + 0x75, 0x18, 0x8e, 0xd9, 0x5d, 0x00, 0xbb, 0x17, 0x5f, 0x8b, 0x07, 0x90, 0x04, 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, 0x39, 0x48, 0xc2, 0xc5, + 0x43, 0xe7, 0xa0, 0xdf, 0xac, 0xdb, 0xba, 0x69, 0x58, 0x13, 0xe9, 0x19, 0xe9, 0xe4, 0xc0, 0x99, + 0x63, 0xa1, 0x8a, 0xb0, 0xce, 0x60, 0x14, 0x01, 0x8c, 0x96, 0x21, 0x6b, 0x99, 0xcd, 0x46, 0x09, + 0xab, 0x25, 0xb3, 0x8c, 0x55, 0xdd, 0xd8, 0x31, 0x27, 0x32, 0x94, 0xc0, 0x74, 0x6b, 0x47, 0x28, + 0xe0, 0xbc, 0x59, 0xc6, 0xcb, 0xc6, 0x8e, 0xa9, 0x0c, 0x5b, 0xbe, 0x32, 0x3a, 0x0c, 0x7d, 0xd6, + 0xbe, 0x61, 0x6b, 0x7b, 0x13, 0x83, 0x54, 0x43, 0x78, 0x49, 0xfe, 0xd5, 0x3e, 0x18, 0xe9, 0x44, + 0xc5, 0xce, 0x43, 0xef, 0x0e, 0xe9, 0xe5, 0x44, 0xa2, 0x1b, 0x19, 0x30, 0x1c, 0xbf, 0x10, 0xfb, + 0x0e, 0x28, 0xc4, 0x3c, 0x0c, 0x18, 0xd8, 0xb2, 0x71, 0x99, 0x69, 0x44, 0xb2, 0x43, 0x9d, 0x02, + 0x86, 0xd4, 0xaa, 0x52, 0xa9, 0x03, 0xa9, 0xd4, 0x33, 0x30, 0xe2, 0xb0, 0xa4, 0x36, 0x34, 0xa3, + 0x22, 0x74, 0xf3, 0x74, 0x1c, 0x27, 0xb3, 0x45, 0x81, 0xa7, 0x10, 0x34, 0x65, 0x18, 0xfb, 0xca, + 0x68, 0x01, 0xc0, 0x34, 0xb0, 0xb9, 0xa3, 0x96, 0x71, 0xa9, 0x3a, 0x91, 0x8e, 0x90, 0xd2, 0x3a, + 0x01, 0x69, 0x91, 0x92, 0xc9, 0x6a, 0x4b, 0x55, 0xf4, 0xa8, 0xab, 0x6a, 0xfd, 0x11, 0x9a, 0xb2, + 0xca, 0x26, 0x59, 0x8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 0x1d, 0xcd, 0xca, 0xd9, 0x15, 0x82, 0xa2, 0x30, + 0x4c, 0xf4, 0x04, 0xa4, 0xb8, 0x89, 0x26, 0x14, 0x4e, 0x75, 0x46, 0x81, 0xcc, 0x25, 0x85, 0xe2, + 0xa1, 0xa3, 0x90, 0x21, 0x7f, 0x99, 0x6e, 0xf4, 0x51, 0x9e, 0xd3, 0xa4, 0x82, 0xe8, 0x05, 0xca, + 0x41, 0x9a, 0x4e, 0x93, 0x32, 0x16, 0xae, 0xcd, 0x29, 0x13, 0xc5, 0x2a, 0xe3, 0x1d, 0xad, 0x59, + 0xb5, 0xd5, 0xab, 0x5a, 0xb5, 0x89, 0xa9, 0xc2, 0x67, 0x94, 0x41, 0x5e, 0x79, 0x99, 0xd4, 0xa1, + 0x69, 0x18, 0x60, 0xb3, 0x4a, 0x37, 0xca, 0x78, 0x8f, 0x5a, 0xcf, 0x5e, 0x85, 0x4d, 0xb4, 0x65, + 0x52, 0x43, 0x9a, 0x7f, 0xce, 0x32, 0x0d, 0xa1, 0x9a, 0xb4, 0x09, 0x52, 0x41, 0x9b, 0x7f, 0x38, + 0x68, 0xb8, 0x6f, 0x0b, 0xef, 0x5e, 0xcb, 0x5c, 0x3a, 0x01, 0x23, 0x14, 0xe2, 0x41, 0x3e, 0xf4, + 0x5a, 0x75, 0x62, 0x74, 0x46, 0x3a, 0x99, 0x56, 0x86, 0x59, 0xf5, 0x3a, 0xaf, 0x95, 0x7f, 0x39, + 0x01, 0x29, 0x6a, 0x58, 0x46, 0x60, 0x60, 0xeb, 0x2d, 0x1b, 0x45, 0x75, 0x61, 0xfd, 0x52, 0x61, + 0xa5, 0x98, 0x95, 0xd0, 0x30, 0x00, 0xad, 0xb8, 0xb0, 0xb2, 0x9e, 0xdf, 0xca, 0x26, 0x9c, 0xf2, + 0xf2, 0xda, 0xd6, 0xb9, 0x87, 0xb2, 0x49, 0x07, 0xe1, 0x12, 0xab, 0x48, 0x79, 0x01, 0x1e, 0x3c, + 0x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0x9b, 0xbd, 0x3b, 0xd4, 0x3b, 0x51, 0xcd, 0x6e, + 0x71, 0xb5, 0x14, 0xcf, 0x1b, 0x6a, 0x24, 0x23, 0x42, 0x0d, 0x42, 0xa2, 0x45, 0x61, 0xdf, 0xde, + 0x62, 0xfc, 0x99, 0x7f, 0x3c, 0xd7, 0x89, 0x7f, 0xa4, 0x75, 0xdd, 0x39, 0x81, 0xde, 0x10, 0x27, + 0x70, 0x1e, 0x46, 0x5b, 0x08, 0x75, 0x6c, 0x8c, 0xdf, 0x23, 0xc1, 0x44, 0x94, 0x70, 0x62, 0x4c, + 0x62, 0xc2, 0x67, 0x12, 0xcf, 0x07, 0x25, 0x78, 0x7b, 0xf4, 0x20, 0xb4, 0x8c, 0xf5, 0x27, 0x24, + 0x38, 0x1c, 0x1e, 0x52, 0x86, 0xf2, 0xf0, 0x04, 0xf4, 0xd5, 0xb0, 0xbd, 0x6b, 0x8a, 0xb0, 0xea, + 0x78, 0x88, 0xb3, 0x26, 0x9f, 0x83, 0x83, 0xcd, 0xb1, 0xbc, 0xde, 0x3e, 0x19, 0x15, 0x17, 0x32, + 0x6e, 0x5a, 0x38, 0xfd, 0x40, 0x02, 0x0e, 0x85, 0x12, 0x0f, 0x65, 0xf4, 0x36, 0x00, 0xdd, 0xa8, + 0x37, 0x6d, 0x16, 0x3a, 0x31, 0x4b, 0x9c, 0xa1, 0x35, 0xd4, 0x78, 0x11, 0x2b, 0xdb, 0xb4, 0x9d, + 0xef, 0x49, 0xfa, 0x1d, 0x58, 0x15, 0x05, 0x78, 0xc4, 0x65, 0x34, 0x45, 0x19, 0x9d, 0x8a, 0xe8, + 0x69, 0x8b, 0x62, 0xde, 0x0f, 0xd9, 0x52, 0x55, 0xc7, 0x86, 0xad, 0x5a, 0x76, 0x03, 0x6b, 0x35, + 0xdd, 0xa8, 0x50, 0x57, 0x93, 0x9e, 0xeb, 0xdd, 0xd1, 0xaa, 0x16, 0x56, 0x46, 0xd8, 0xe7, 0x4d, + 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, 0x2a, 0x71, 0x60, 0xf1, + 0x24, 0x7e, 0x42, 0x90, 0x10, 0x38, 0x9c, 0x44, 0x17, 0x62, 0x7d, 0x45, 0x90, 0xb0, 0x3c, 0xf2, + 0x7c, 0x12, 0x06, 0x4c, 0xa3, 0xba, 0x6f, 0x1a, 0x9d, 0x30, 0xf1, 0x31, 0x4e, 0x01, 0x38, 0x0a, + 0x21, 0x70, 0x1e, 0x32, 0x9d, 0x0e, 0xc4, 0x3f, 0xfa, 0xba, 0x98, 0x1e, 0x62, 0x04, 0x16, 0x61, + 0x44, 0x18, 0x28, 0xdd, 0x34, 0x3a, 0x20, 0xf1, 0x8f, 0x39, 0x89, 0x61, 0x0f, 0x1a, 0xef, 0x86, + 0x8d, 0x2d, 0xbb, 0x82, 0x3b, 0x21, 0xf2, 0x09, 0xd1, 0x0d, 0x8e, 0xc2, 0x45, 0xb9, 0x8d, 0x8d, + 0xd2, 0x6e, 0x67, 0x14, 0x3e, 0x29, 0x44, 0x29, 0x70, 0x08, 0x89, 0x79, 0x18, 0xaa, 0x69, 0x0d, + 0x6b, 0x57, 0xab, 0x76, 0x34, 0x1c, 0x3f, 0xcd, 0x69, 0x0c, 0x3a, 0x48, 0x5c, 0x22, 0x4d, 0xa3, + 0x1b, 0x32, 0x9f, 0x12, 0x12, 0xf1, 0xa0, 0xf1, 0xa9, 0x67, 0xd9, 0x34, 0xa5, 0xd6, 0x0d, 0xb5, + 0x9f, 0x11, 0x53, 0x8f, 0xe1, 0xae, 0x7a, 0x29, 0x9e, 0x87, 0x8c, 0xa5, 0xbf, 0xd0, 0x11, 0x99, + 0x9f, 0x15, 0x23, 0x4d, 0x11, 0x08, 0xf2, 0x5b, 0x60, 0x32, 0xd4, 0x4d, 0x74, 0x40, 0xec, 0x9f, + 0x70, 0x62, 0x87, 0x43, 0x5c, 0x05, 0x37, 0x09, 0xdd, 0x92, 0xfc, 0x39, 0x61, 0x12, 0x70, 0x80, + 0xd6, 0x06, 0x59, 0x35, 0x58, 0xda, 0x4e, 0x77, 0x52, 0xfb, 0x79, 0x21, 0x35, 0x86, 0xeb, 0x93, + 0xda, 0x16, 0x1c, 0xe6, 0x14, 0xbb, 0x1b, 0xd7, 0x4f, 0x0b, 0xc3, 0xca, 0xb0, 0x2f, 0xf9, 0x47, + 0xf7, 0xad, 0x90, 0x73, 0xc4, 0x29, 0xc2, 0x53, 0x4b, 0xad, 0x69, 0xf5, 0x0e, 0x28, 0xff, 0x02, + 0xa7, 0x2c, 0x2c, 0xbe, 0x13, 0xdf, 0x5a, 0xab, 0x5a, 0x9d, 0x10, 0x7f, 0x06, 0x26, 0x04, 0xf1, + 0xa6, 0xd1, 0xc0, 0x25, 0xb3, 0x62, 0xe8, 0x2f, 0xe0, 0x72, 0x07, 0xa4, 0x7f, 0x31, 0x30, 0x54, + 0x97, 0x3c, 0xe8, 0x84, 0xf2, 0x32, 0x64, 0x9d, 0x58, 0x45, 0xd5, 0x6b, 0x75, 0xb3, 0x61, 0xc7, + 0x50, 0xfc, 0x25, 0x31, 0x52, 0x0e, 0xde, 0x32, 0x45, 0x9b, 0x2b, 0x02, 0xdb, 0x67, 0xee, 0x54, + 0x25, 0x3f, 0xc3, 0x09, 0x0d, 0xb9, 0x58, 0xdc, 0x70, 0x94, 0xcc, 0x5a, 0x5d, 0x6b, 0x74, 0x62, + 0xff, 0xfe, 0xa9, 0x30, 0x1c, 0x1c, 0x85, 0x1b, 0x0e, 0x12, 0xd1, 0x11, 0x6f, 0xdf, 0x01, 0x85, + 0x5f, 0x16, 0x86, 0x43, 0xe0, 0x70, 0x12, 0x22, 0x60, 0xe8, 0x80, 0xc4, 0x3f, 0x13, 0x24, 0x04, + 0x0e, 0x21, 0xf1, 0x66, 0xd7, 0xd1, 0x36, 0x70, 0x45, 0xb7, 0xec, 0x06, 0x0b, 0x8a, 0xdb, 0x93, + 0xfa, 0x95, 0xaf, 0xfb, 0x83, 0x30, 0xc5, 0x83, 0x4a, 0x2c, 0x11, 0x4f, 0xb2, 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b, 0x45, 0x58, 0xe7, 0xd1, 0x49, 0x3c, 0x81, 0x1f, 0x14, 0xac, 0x73, 0x0c, 0x22, + 0x36, 0x11, 0x98, 0xc4, 0x63, 0x7f, 0x50, 0x48, 0x5d, 0xa0, 0xcc, 0x3d, 0x09, 0x19, 0xc7, 0xd9, + 0xc4, 0xe3, 0x7f, 0x88, 0xe3, 0xbb, 0x38, 0x44, 0x02, 0x1e, 0x67, 0x17, 0x4f, 0xe2, 0x1f, 0x08, + 0x09, 0x78, 0xb0, 0xc8, 0x34, 0x0a, 0x06, 0x30, 0xf1, 0x94, 0x7e, 0x48, 0x4c, 0xa3, 0x40, 0xfc, + 0x42, 0x46, 0x93, 0xda, 0xfc, 0x78, 0x12, 0x3f, 0x2c, 0x46, 0x93, 0xc2, 0x13, 0x36, 0x82, 0x11, + 0x41, 0x3c, 0x8d, 0x1f, 0x15, 0x6c, 0x04, 0x02, 0x82, 0xb9, 0x0d, 0x40, 0xad, 0xd1, 0x40, 0x3c, + 0xbd, 0x97, 0x39, 0xbd, 0xd1, 0x96, 0x60, 0x60, 0xee, 0x69, 0x38, 0x1c, 0x1e, 0x09, 0xc4, 0x53, + 0xfd, 0xf0, 0x37, 0x03, 0x6b, 0x37, 0x6f, 0x20, 0x30, 0xb7, 0xe5, 0xba, 0x14, 0x6f, 0x14, 0x10, + 0x4f, 0xf6, 0x23, 0xdf, 0xf4, 0x1b, 0x6e, 0x6f, 0x10, 0x30, 0x97, 0x07, 0x70, 0x1d, 0x70, 0x3c, + 0xad, 0x1f, 0xe7, 0xb4, 0x3c, 0x48, 0x64, 0x6a, 0x70, 0xff, 0x1b, 0x8f, 0x7f, 0x5d, 0x4c, 0x0d, + 0x8e, 0x41, 0xa6, 0x86, 0x70, 0xbd, 0xf1, 0xd8, 0x1f, 0x15, 0x53, 0x43, 0xa0, 0x10, 0xcd, 0xf6, + 0x78, 0xb7, 0x78, 0x0a, 0x1f, 0x13, 0x9a, 0xed, 0xc1, 0x9a, 0x5b,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5, 0x4d, + 0xbd, 0xc2, 0x27, 0xaa, 0x07, 0x49, 0xfe, 0x4f, 0x12, 0x09, 0x62, 0xf9, 0x77, 0x94, 0x87, 0x21, + 0xc1, 0x97, 0xba, 0x53, 0xd5, 0x2a, 0x5c, 0x77, 0x6e, 0x8b, 0x64, 0xee, 0x42, 0x55, 0xab, 0x28, + 0x03, 0x9c, 0x1f, 0x52, 0x08, 0x1f, 0x87, 0x44, 0xc4, 0x38, 0xf8, 0x06, 0x3e, 0x79, 0xb0, 0x81, + 0xf7, 0x0d, 0x51, 0x2a, 0x38, 0x44, 0xbf, 0x94, 0xa0, 0x8b, 0x99, 0xba, 0x69, 0x69, 0xd5, 0x37, + 0x62, 0x46, 0x1c, 0x85, 0x4c, 0xdd, 0xac, 0xaa, 0xec, 0x0b, 0x3b, 0xe1, 0x9e, 0xae, 0x9b, 0x55, + 0xa5, 0x65, 0xd8, 0x7b, 0x6f, 0xd2, 0x74, 0xe9, 0xbb, 0x09, 0x52, 0xeb, 0x0f, 0x4a, 0xad, 0x01, + 0x83, 0x4c, 0x14, 0xdc, 0x97, 0xdd, 0x4f, 0x64, 0x40, 0x9d, 0xa3, 0xd4, 0xea, 0x7b, 0x19, 0xdb, + 0x0c, 0x52, 0xe1, 0x70, 0x04, 0x83, 0x99, 0xfe, 0xb0, 0x55, 0xb0, 0x57, 0x2d, 0x15, 0x0e, 0x27, + 0xff, 0x88, 0x04, 0xb0, 0x42, 0x24, 0x4b, 0xfb, 0x4b, 0xbc, 0x90, 0x45, 0x59, 0x50, 0x7d, 0x2d, + 0x4f, 0x45, 0x0d, 0x1a, 0x6f, 0x7f, 0xd0, 0xf2, 0xf2, 0x3d, 0x0f, 0x43, 0xae, 0x32, 0x5a, 0x58, + 0x30, 0x33, 0xd5, 0x26, 0xaa, 0xde, 0xc4, 0xb6, 0x32, 0x78, 0xd5, 0x53, 0x92, 0xff, 0xb5, 0x04, + 0x19, 0xca, 0xd3, 0x2a, 0xb6, 0x35, 0xdf,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0x26, 0x21, 0x08, 0x0d, 0x5d, 0x14, 0x48, 0x97, 0x9f, 0x6f, 0xe2, 0xc6, 0x3e, 0x8f, + 0x47, 0x23, 0xbb, 0xfc, 0x66, 0x02, 0x44, 0xba, 0x4c, 0xa1, 0x51, 0x11, 0x06, 0xe8, 0x9d, 0x50, + 0x66, 0x16, 0xf8, 0xa3, 0x93, 0x72, 0x14, 0x72, 0x81, 0x80, 0x52, 0x4b, 0xb1, 0xd4, 0xa3, 0xc0, + 0xb6, 0x53, 0x42, 0x8f, 0x41, 0x9a, 0x3d, 0x4a, 0x64, 0xef, 0xf1, 0xa7, 0xf6, 0xa6, 0xa3, 0x68, + 0xd0, 0x97, 0x89, 0xb6, 0xf6, 0x96, 0x7a, 0x94, 0xfe, 0x12, 0xfb, 0x97, 0xf4, 0xbf, 0x8c, 0xab, + 0xfa, 0x55, 0xdc, 0x20, 0xf8, 0x99, 0xf6, 0xfd, 0x5f, 0x60, 0x90, 0x94, 0x42, 0xa6, 0x2c, 0x0a, + 0xe8, 0x49, 0xc8, 0x60, 0xa3, 0xcc, 0xbb, 0x01, 0xad, 0xce, 0xc2, 0xa7, 0x2b, 0x46, 0x59, 0x74, + 0x22, 0x8d, 0xf9, 0xff, 0xe8, 0x11, 0x27, 0x60, 0x1e, 0x68, 0x8d, 0x51, 0x7d, 0x1d, 0x60, 0xa9, + 0x93, 0x1e, 0x11, 0x38, 0xa3, 0x35, 0x18, 0xae, 0xea, 0x96, 0xad, 0x5a, 0x86, 0x56, 0xb7, 0x76, + 0x4d, 0xdb, 0xa2, 0x39, 0x88, 0x81, 0x33, 0x77, 0x45, 0x51, 0x58, 0xd1, 0x2d, 0x7b, 0x53, 0x00, + 0x2f, 0xf5, 0x28, 0x43, 0x55, 0x6f, 0x05, 0xa1, 0x67, 0xee, 0xec, 0xe0, 0x86, 0x43, 0x90, 0xe6, + 0x2a, 0xda, 0xd0, 0x5b, 0x27, 0xd0, 0x02, 0x9f, 0xd0, 0x33, 0xbd, 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0x2b, 0xc7, 0x73, 0x33, 0x3f, 0xb2, 0xec, 0xcc, + 0x06, 0xc7, 0xe8, 0x07, 0xa9, 0xca, 0x77, 0xc3, 0x48, 0xc0, 0xaa, 0x47, 0xa5, 0x02, 0xe5, 0x11, + 0x18, 0xf2, 0x99, 0x70, 0xf9, 0x30, 0x8c, 0x87, 0x59, 0x64, 0x79, 0xd7, 0xa9, 0xf7, 0x59, 0x56, + 0x74, 0x16, 0xd2, 0x8e, 0x49, 0x0e, 0x49, 0x3d, 0xd0, 0x5e, 0x08, 0x60, 0xc5, 0x01, 0xf5, 0x65, + 0xb0, 0x13, 0xbe, 0x0c, 0xb6, 0xfc, 0x5d, 0x30, 0x11, 0x65, 0x6e, 0x03, 0xdd, 0x48, 0x39, 0x6a, + 0x78, 0x18, 0xfa, 0xf8, 0xb3, 0x61, 0x09, 0xba, 0x67, 0xc3, 0x4b, 0x44, 0x3d, 0x99, 0xe9, 0x4d, + 0xb2, 0xad, 0x1c, 0x5a, 0x90, 0x55, 0x98, 0x8c, 0x34, 0xb9, 0xd1, 0xbb, 0x3f, 0x8c, 0x10, 0xdf, + 0xfd, 0x29, 0x09, 0x76, 0x2c, 0xda, 0x57, 0x71, 0xe2, 0x81, 0x95, 0xe4, 0x3f, 0x4b, 0x43, 0x5a, + 0xc1, 0x56, 0x9d, 0xd8, 0x04, 0x54, 0x80, 0x0c, 0xde, 0x2b, 0xe1, 0xba, 0xed, 0xee, 0xba, 0x84, + 0x05, 0x13, 0x0c, 0xba, 0x28, 0x20, 0x89, 0x27, 0x77, 0xd0, 0xd0, 0x83, 0x3c, 0xe0, 0x8b, 0x8e, + 0xdd, 0x38, 0xba, 0x37, 0xe2, 0x3b, 0x27, 0x22, 0xbe, 0x64, 0xa4, 0xf3, 0x66, 0x58, 0x81, 0x90, + 0xef, 0x41, 0x1e, 0xf2, 0xa5, 0x62, 0x1a, 0xf3, 0xc5, 0x7c, 0xf3, 0xbe, 0x98, 0xaf, 0x37, 0xa6, + 0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2f, 0xc1, 0xc0, 0x86, 0x56, 0xc1, 0xe2, 0x51, 0x9e, 0xd6, 0x73, + 0xda, 0x87, 0xa1, 0xcf, 0xdc, 0xd9, 0x11, 0x4f, 0xfc, 0xa5, 0x14, 0x5e, 0x22, 0x7d, 0xae, 0xea, + 0x35, 0xdd, 0xe6, 0x77, 0x21, 0x59, 0x01, 0x4d, 0xc3, 0x00, 0x0d, 0xf9, 0x98, 0x11, 0xe7, 0xe9, + 0x78, 0xa0, 0x55, 0xd4, 0x88, 0x13, 0x21, 0x36, 0xf0, 0x55, 0xdc, 0xb0, 0x30, 0x5d, 0xee, 0xa7, + 0x15, 0x51, 0x94, 0x9f, 0x84, 0x41, 0xc6, 0x09, 0x5f, 0x9a, 0x4c, 0x42, 0x9a, 0x3e, 0x3c, 0xeb, + 0xf2, 0xd3, 0x4f, 0xca, 0xfc, 0xd4, 0x33, 0xa3, 0xcf, 0x58, 0x62, 0x85, 0x42, 0x21, 0x52, 0xca, + 0x27, 0xe3, 0x67, 0x12, 0x93, 0xa1, 0x23, 0xe1, 0xdf, 0xe8, 0x85, 0x43, 0xdc, 0x9d, 0x6a, 0x75, + 0xfd, 0xf4, 0xae, 0x6d, 0x8b, 0x9f, 0x92, 0x00, 0xae, 0x6a, 0x5a, 0x5d, 0x97, 0xf7, 0x21, 0xb5, + 0x64, 0xdb, 0x75, 0x74, 0x0a, 0x7a, 0x1b, 0xcd, 0xaa, 0x13, 0x84, 0x3b, 0x07, 0x16, 0xb4, 0xba, + 0x3e, 0x4b, 0x00, 0x94, 0x66, 0x15, 0x2b, 0x0c, 0x04, 0x15, 0x61, 0x7a, 0xa7, 0x59, 0xad, 0xee, + 0xab, 0x65, 0x5c, 0x32, 0xcb, 0xc4, 0x7a, 0x58, 0xb8, 0x71, 0x15, 0x97, 0x55, 0xbc, 0x57, 0xd7, + 0x0c, 0xe7, 0xee, 0x69, 0x5a, 0x39, 0x46, 0xc1, 0x16, 0x28, 0x94, 0xc2, 0x81, 0x8a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 0xff, 0xff, 0xd0, 0x2f, 0xaf, + 0x33, 0x23, 0xe0, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) @@ -2399,6 +2674,15 @@ func (this *Params) Equal(that interface{}) bool { if this.BondDenom != that1.BondDenom { return false } + if !this.ValidatorBondFactor.Equal(that1.ValidatorBondFactor) { + return false + } + if !this.GlobalLiquidStakingCap.Equal(that1.GlobalLiquidStakingCap) { + return false + } + if !this.ValidatorLiquidStakingCap.Equal(that1.ValidatorLiquidStakingCap) { + return false + } return true } func (this *RedelegationEntryResponse) Equal(that interface{}) bool { @@ -2455,6 +2739,39 @@ func (this *Pool) Equal(that interface{}) bool { } return true } +func (this *TokenizeShareRecord) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TokenizeShareRecord) + if !ok { + that2, ok := that.(TokenizeShareRecord) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Owner != that1.Owner { + return false + } + if this.ModuleAccount != that1.ModuleAccount { + return false + } + if this.Validator != that1.Validator { + return false + } + return true +} func (m *HistoricalInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2674,6 +2991,26 @@ func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.LiquidShares.Size() + i -= size + if _, err := m.LiquidShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.ValidatorBondShares.Size() + i -= size + if _, err := m.ValidatorBondShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 if len(m.UnbondingIds) > 0 { dAtA5 := make([]byte, len(m.UnbondingIds)*10) var j4 int @@ -3004,6 +3341,16 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ValidatorBond { + i-- + if m.ValidatorBond { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } { size := m.Shares.Size() i -= size @@ -3292,6 +3639,36 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.ValidatorLiquidStakingCap.Size() + i -= size + if _, err := m.ValidatorLiquidStakingCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.GlobalLiquidStakingCap.Size() + i -= size + if _, err := m.GlobalLiquidStakingCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.ValidatorBondFactor.Size() + i -= size + if _, err := m.ValidatorBondFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStaking(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a if len(m.BondDenom) > 0 { i -= len(m.BondDenom) copy(dAtA[i:], m.BondDenom) @@ -3538,6 +3915,87 @@ func (m *ValidatorUpdates) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TokenizeShareRecord) 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 *TokenizeShareRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenizeShareRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0x22 + } + if len(m.ModuleAccount) > 0 { + i -= len(m.ModuleAccount) + copy(dAtA[i:], m.ModuleAccount) + i = encodeVarintStaking(dAtA, i, uint64(len(m.ModuleAccount))) + i-- + dAtA[i] = 0x1a + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintStaking(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PendingTokenizeShareAuthorizations) 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 *PendingTokenizeShareAuthorizations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PendingTokenizeShareAuthorizations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintStaking(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintStaking(dAtA []byte, offset int, v uint64) int { offset -= sovStaking(v) base := offset @@ -3668,6 +4126,10 @@ func (m *Validator) Size() (n int) { } n += 1 + sovStaking(uint64(l)) + l } + l = m.ValidatorBondShares.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.LiquidShares.Size() + n += 1 + l + sovStaking(uint64(l)) return n } @@ -3770,6 +4232,9 @@ func (m *Delegation) Size() (n int) { } l = m.Shares.Size() n += 1 + l + sovStaking(uint64(l)) + if m.ValidatorBond { + n += 2 + } return n } @@ -3892,6 +4357,12 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovStaking(uint64(l)) } + l = m.ValidatorBondFactor.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.GlobalLiquidStakingCap.Size() + n += 1 + l + sovStaking(uint64(l)) + l = m.ValidatorLiquidStakingCap.Size() + n += 1 + l + sovStaking(uint64(l)) return n } @@ -3966,33 +4437,72 @@ func (m *ValidatorUpdates) Size() (n int) { return n } -func sovStaking(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStaking(x uint64) (n int) { - return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ValAddresses) String() string { - if this == nil { - return "nil" +func (m *TokenizeShareRecord) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ValAddresses{`, - `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, - `}`, - }, "") - return s -} -func valueToStringStaking(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + var l int + _ = l + if m.Id != 0 { + n += 1 + sovStaking(uint64(m.Id)) } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *HistoricalInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.ModuleAccount) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovStaking(uint64(l)) + } + return n +} + +func (m *PendingTokenizeShareAuthorizations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovStaking(uint64(l)) + } + } + return n +} + +func sovStaking(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStaking(x uint64) (n int) { + return sovStaking(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ValAddresses) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValAddresses{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `}`, + }, "") + return s +} +func valueToStringStaking(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *HistoricalInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 @@ -5036,6 +5546,74 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field UnbondingIds", wireType) } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorBondShares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ValidatorBondShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidShares", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LiquidShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipStaking(dAtA[iNdEx:]) @@ -5694,6 +6272,26 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorBond", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ValidatorBond = bool(v != 0) default: iNdEx = preIndex skippy, err := skipStaking(dAtA[iNdEx:]) @@ -6610,6 +7208,108 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.BondDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorBondFactor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ValidatorBondFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalLiquidStakingCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GlobalLiquidStakingCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorLiquidStakingCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ValidatorLiquidStakingCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipStaking(dAtA[iNdEx:]) @@ -7183,6 +7883,253 @@ func (m *ValidatorUpdates) Unmarshal(dAtA []byte) error { } return nil } +func (m *TokenizeShareRecord) 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 ErrIntOverflowStaking + } + 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: TokenizeShareRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenizeShareRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModuleAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ModuleAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PendingTokenizeShareAuthorizations) 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 ErrIntOverflowStaking + } + 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: PendingTokenizeShareAuthorizations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingTokenizeShareAuthorizations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStaking + } + 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 ErrInvalidLengthStaking + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStaking + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStaking(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStaking + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipStaking(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/staking/types/tokenize_share_record.go b/x/staking/types/tokenize_share_record.go new file mode 100644 index 000000000000..01a64a1f69ac --- /dev/null +++ b/x/staking/types/tokenize_share_record.go @@ -0,0 +1,22 @@ +package types + +import ( + fmt "fmt" + "strconv" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" +) + +func (r TokenizeShareRecord) GetModuleAddress() sdk.AccAddress { + // NOTE: The module name is intentionally hard coded so that, if this + // function were to move to a different module in future SDK version, + // it would not break all the address lookups + moduleName := "lsm" + return address.Module(moduleName, []byte(r.ModuleAccount)) +} + +func (r TokenizeShareRecord) GetShareTokenDenom() string { + return fmt.Sprintf("%s/%s", strings.ToLower(r.Validator), strconv.Itoa(int(r.Id))) +} diff --git a/x/staking/types/tx.pb.go b/x/staking/types/tx.pb.go index 59e3b4ba6650..b6028defef12 100644 --- a/x/staking/types/tx.pb.go +++ b/x/staking/types/tx.pb.go @@ -38,9 +38,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateValidator defines a SDK message for creating a new validator. type MsgCreateValidator struct { - Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` - Commission CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"` - MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` + Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` + Commission CommissionRates `protobuf:"bytes,2,opt,name=commission,proto3" json:"commission"` + // Deprecated: This field has been deprecated with LSM in favor of the validator bond + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` // Deprecated: Do not use. DelegatorAddress string `protobuf:"bytes,4,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` ValidatorAddress string `protobuf:"bytes,5,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` Pubkey *types.Any `protobuf:"bytes,6,opt,name=pubkey,proto3" json:"pubkey,omitempty"` @@ -126,7 +127,7 @@ type MsgEditValidator struct { // zero with no way to distinguish if an update was intended. // REF: #2373 CommissionRate *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"commission_rate,omitempty" yaml:"commission_rate"` - MinSelfDelegation *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation,omitempty" yaml:"min_self_delegation"` + MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"` // Deprecated: Do not use. } func (m *MsgEditValidator) Reset() { *m = MsgEditValidator{} } @@ -520,931 +521,4108 @@ func (m *MsgUndelegateResponse) GetCompletionTime() time.Time { return time.Time{} } -func init() { - proto.RegisterType((*MsgCreateValidator)(nil), "cosmos.staking.v1beta1.MsgCreateValidator") - proto.RegisterType((*MsgCreateValidatorResponse)(nil), "cosmos.staking.v1beta1.MsgCreateValidatorResponse") - proto.RegisterType((*MsgEditValidator)(nil), "cosmos.staking.v1beta1.MsgEditValidator") - proto.RegisterType((*MsgEditValidatorResponse)(nil), "cosmos.staking.v1beta1.MsgEditValidatorResponse") - proto.RegisterType((*MsgDelegate)(nil), "cosmos.staking.v1beta1.MsgDelegate") - proto.RegisterType((*MsgDelegateResponse)(nil), "cosmos.staking.v1beta1.MsgDelegateResponse") - proto.RegisterType((*MsgBeginRedelegate)(nil), "cosmos.staking.v1beta1.MsgBeginRedelegate") - proto.RegisterType((*MsgBeginRedelegateResponse)(nil), "cosmos.staking.v1beta1.MsgBeginRedelegateResponse") - proto.RegisterType((*MsgUndelegate)(nil), "cosmos.staking.v1beta1.MsgUndelegate") - proto.RegisterType((*MsgUndelegateResponse)(nil), "cosmos.staking.v1beta1.MsgUndelegateResponse") +// MsgUnbondValidator defines a method for performing the status transition for +// a validator from bonded to unbonded +type MsgUnbondValidator struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"address"` } -func init() { proto.RegisterFile("cosmos/staking/v1beta1/tx.proto", fileDescriptor_0926ef28816b35ab) } - -var fileDescriptor_0926ef28816b35ab = []byte{ - // 861 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4d, 0x6b, 0xe3, 0x46, - 0x18, 0xb6, 0x6c, 0xc7, 0x4d, 0x27, 0xe4, 0x4b, 0xf9, 0xc0, 0x11, 0xc1, 0x0a, 0x4a, 0x3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 0x7f, 0x82, 0xf9, 0xb8, 0xd1, 0xed, 0x4e, - 0x38, 0x1d, 0x81, 0x84, 0xaf, 0xa7, 0x00, 0xc5, 0xec, 0x57, 0x60, 0x39, 0xdd, 0x4a, 0x26, 0xa9, - 0x97, 0xc2, 0x4e, 0x54, 0x6f, 0xdc, 0xb3, 0xd2, 0x00, 0x48, 0xbc, 0x81, 0xcf, 0x27, 0x30, 0xf4, - 0x61, 0xc2, 0xfe, 0x54, 0xb0, 0x28, 0x46, 0xe5, 0xf4, 0xbe, 0x5b, 0xe2, 0x1e, 0xbb, 0x25, 0xee, - 0x4d, 0xb7, 0xc4, 0xdd, 0x3e, 0x95, 0x32, 0x8f, 0x4f, 0xa5, 0xcc, 0xcb, 0xa7, 0x52, 0xe6, 0x8f, - 0x6f, 0x26, 0x8e, 0xae, 0x9b, 0xf8, 0xcb, 0x94, 0x0e, 0x31, 0xad, 0x40, 0x2d, 0xf9, 0xdd, 0xfb, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xdc, 0x0e, 0x15, 0x7e, 0x0b, 0x00, 0x00, +func (m *MsgUnbondValidator) Reset() { *m = MsgUnbondValidator{} } +func (m *MsgUnbondValidator) String() string { return proto.CompactTextString(m) } +func (*MsgUnbondValidator) ProtoMessage() {} +func (*MsgUnbondValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{10} +} +func (m *MsgUnbondValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnbondValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnbondValidator.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 *MsgUnbondValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnbondValidator.Merge(m, src) +} +func (m *MsgUnbondValidator) XXX_Size() int { + return m.Size() +} +func (m *MsgUnbondValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnbondValidator.DiscardUnknown(m) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var xxx_messageInfo_MsgUnbondValidator proto.InternalMessageInfo -// 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 +func (m *MsgUnbondValidator) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} -// 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 { - // CreateValidator defines a method for creating a new validator. - CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) - // EditValidator defines a method for editing an existing validator. - EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error) - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error) - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error) - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) +// MsgUnbondValidatorResponse defines the Msg/UnbondValidator response type. +type MsgUnbondValidatorResponse struct { } -type msgClient struct { - cc grpc1.ClientConn +func (m *MsgUnbondValidatorResponse) Reset() { *m = MsgUnbondValidatorResponse{} } +func (m *MsgUnbondValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnbondValidatorResponse) ProtoMessage() {} +func (*MsgUnbondValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{11} +} +func (m *MsgUnbondValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnbondValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnbondValidatorResponse.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 *MsgUnbondValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnbondValidatorResponse.Merge(m, src) +} +func (m *MsgUnbondValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnbondValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnbondValidatorResponse.DiscardUnknown(m) } -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} +var xxx_messageInfo_MsgUnbondValidatorResponse proto.InternalMessageInfo + +// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +// +// Since: cosmos-sdk 0.46 +type MsgCancelUnbondingDelegation struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + // amount is always less than or equal to unbonding delegation entry balance + Amount types1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + // creation_height is the height which the unbonding took place. + CreationHeight int64 `protobuf:"varint,4,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` } -func (c *msgClient) CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) { - out := new(MsgCreateValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/CreateValidator", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgCancelUnbondingDelegation) Reset() { *m = MsgCancelUnbondingDelegation{} } +func (m *MsgCancelUnbondingDelegation) String() string { return proto.CompactTextString(m) } +func (*MsgCancelUnbondingDelegation) ProtoMessage() {} +func (*MsgCancelUnbondingDelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{12} +} +func (m *MsgCancelUnbondingDelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelUnbondingDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelUnbondingDelegation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *MsgCancelUnbondingDelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelUnbondingDelegation.Merge(m, src) +} +func (m *MsgCancelUnbondingDelegation) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelUnbondingDelegation) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelUnbondingDelegation.DiscardUnknown(m) } -func (c *msgClient) EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error) { - out := new(MsgEditValidatorResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/EditValidator", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_MsgCancelUnbondingDelegation proto.InternalMessageInfo + +func (m *MsgCancelUnbondingDelegation) GetDelegatorAddress() string { + if m != nil { + return m.DelegatorAddress } - return out, nil + return "" } -func (c *msgClient) Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error) { - out := new(MsgDelegateResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/Delegate", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgCancelUnbondingDelegation) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress } - return out, nil + return "" } -func (c *msgClient) BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error) { - out := new(MsgBeginRedelegateResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/BeginRedelegate", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgCancelUnbondingDelegation) GetAmount() types1.Coin { + if m != nil { + return m.Amount } - return out, nil + return types1.Coin{} } -func (c *msgClient) Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) { - out := new(MsgUndelegateResponse) - err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/Undelegate", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgCancelUnbondingDelegation) GetCreationHeight() int64 { + if m != nil { + return m.CreationHeight } - return out, nil + return 0 } -// MsgServer is the server API for Msg service. -type MsgServer interface { - // CreateValidator defines a method for creating a new validator. - CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) - // EditValidator defines a method for editing an existing validator. - EditValidator(context.Context, *MsgEditValidator) (*MsgEditValidatorResponse, error) - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - Delegate(context.Context, *MsgDelegate) (*MsgDelegateResponse, error) - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - BeginRedelegate(context.Context, *MsgBeginRedelegate) (*MsgBeginRedelegateResponse, error) - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - Undelegate(context.Context, *MsgUndelegate) (*MsgUndelegateResponse, error) +// MsgCancelUnbondingDelegationResponse +// +// Since: cosmos-sdk 0.46 +type MsgCancelUnbondingDelegationResponse struct { } -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { +func (m *MsgCancelUnbondingDelegationResponse) Reset() { *m = MsgCancelUnbondingDelegationResponse{} } +func (m *MsgCancelUnbondingDelegationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelUnbondingDelegationResponse) ProtoMessage() {} +func (*MsgCancelUnbondingDelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{13} } - -func (*UnimplementedMsgServer) CreateValidator(ctx context.Context, req *MsgCreateValidator) (*MsgCreateValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateValidator not implemented") +func (m *MsgCancelUnbondingDelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedMsgServer) EditValidator(ctx context.Context, req *MsgEditValidator) (*MsgEditValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EditValidator not implemented") +func (m *MsgCancelUnbondingDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelUnbondingDelegationResponse.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 (*UnimplementedMsgServer) Delegate(ctx context.Context, req *MsgDelegate) (*MsgDelegateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delegate not implemented") +func (m *MsgCancelUnbondingDelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelUnbondingDelegationResponse.Merge(m, src) } -func (*UnimplementedMsgServer) BeginRedelegate(ctx context.Context, req *MsgBeginRedelegate) (*MsgBeginRedelegateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BeginRedelegate not implemented") +func (m *MsgCancelUnbondingDelegationResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedMsgServer) Undelegate(ctx context.Context, req *MsgUndelegate) (*MsgUndelegateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Undelegate not implemented") +func (m *MsgCancelUnbondingDelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelUnbondingDelegationResponse.DiscardUnknown(m) } -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) +var xxx_messageInfo_MsgCancelUnbondingDelegationResponse proto.InternalMessageInfo + +// MsgTokenizeShares tokenizes a delegation +type MsgTokenizeShares struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` + Amount types1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + TokenizedShareOwner string `protobuf:"bytes,4,opt,name=tokenized_share_owner,json=tokenizedShareOwner,proto3" json:"tokenized_share_owner,omitempty"` } -func _Msg_CreateValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/CreateValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateValidator(ctx, req.(*MsgCreateValidator)) +func (m *MsgTokenizeShares) Reset() { *m = MsgTokenizeShares{} } +func (m *MsgTokenizeShares) String() string { return proto.CompactTextString(m) } +func (*MsgTokenizeShares) ProtoMessage() {} +func (*MsgTokenizeShares) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{14} +} +func (m *MsgTokenizeShares) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTokenizeShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTokenizeShares.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *MsgTokenizeShares) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTokenizeShares.Merge(m, src) +} +func (m *MsgTokenizeShares) XXX_Size() int { + return m.Size() +} +func (m *MsgTokenizeShares) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTokenizeShares.DiscardUnknown(m) } -func _Msg_EditValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEditValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).EditValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/EditValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EditValidator(ctx, req.(*MsgEditValidator)) - } - return interceptor(ctx, in, info, handler) +var xxx_messageInfo_MsgTokenizeShares proto.InternalMessageInfo + +// MsgTokenizeSharesResponse defines the Msg/MsgTokenizeShares response type. +type MsgTokenizeSharesResponse struct { + Amount types1.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` } -func _Msg_Delegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDelegate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Delegate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/Delegate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Delegate(ctx, req.(*MsgDelegate)) +func (m *MsgTokenizeSharesResponse) Reset() { *m = MsgTokenizeSharesResponse{} } +func (m *MsgTokenizeSharesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTokenizeSharesResponse) ProtoMessage() {} +func (*MsgTokenizeSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{15} +} +func (m *MsgTokenizeSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTokenizeSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTokenizeSharesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) } - -func _Msg_BeginRedelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgBeginRedelegate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).BeginRedelegate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/BeginRedelegate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).BeginRedelegate(ctx, req.(*MsgBeginRedelegate)) - } - return interceptor(ctx, in, info, handler) +func (m *MsgTokenizeSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTokenizeSharesResponse.Merge(m, src) +} +func (m *MsgTokenizeSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTokenizeSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTokenizeSharesResponse.DiscardUnknown(m) } -func _Msg_Undelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUndelegate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Undelegate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.staking.v1beta1.Msg/Undelegate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Undelegate(ctx, req.(*MsgUndelegate)) +var xxx_messageInfo_MsgTokenizeSharesResponse proto.InternalMessageInfo + +func (m *MsgTokenizeSharesResponse) GetAmount() types1.Coin { + if m != nil { + return m.Amount } - return interceptor(ctx, in, info, handler) + return types1.Coin{} } -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.staking.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateValidator", - Handler: _Msg_CreateValidator_Handler, - }, - { - MethodName: "EditValidator", - Handler: _Msg_EditValidator_Handler, - }, - { - MethodName: "Delegate", - Handler: _Msg_Delegate_Handler, - }, - { - MethodName: "BeginRedelegate", - Handler: _Msg_BeginRedelegate_Handler, - }, - { - MethodName: "Undelegate", - Handler: _Msg_Undelegate_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/staking/v1beta1/tx.proto", +// MsgRedeemTokensForShares redeems a tokenized share back into a native delegation +type MsgRedeemTokensForShares struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + Amount types1.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` } -func (m *MsgCreateValidator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgRedeemTokensForShares) Reset() { *m = MsgRedeemTokensForShares{} } +func (m *MsgRedeemTokensForShares) String() string { return proto.CompactTextString(m) } +func (*MsgRedeemTokensForShares) ProtoMessage() {} +func (*MsgRedeemTokensForShares) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{16} +} +func (m *MsgRedeemTokensForShares) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRedeemTokensForShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRedeemTokensForShares.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *MsgRedeemTokensForShares) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRedeemTokensForShares.Merge(m, src) +} +func (m *MsgRedeemTokensForShares) XXX_Size() int { + return m.Size() +} +func (m *MsgRedeemTokensForShares) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRedeemTokensForShares.DiscardUnknown(m) } -func (m *MsgCreateValidator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_MsgRedeemTokensForShares proto.InternalMessageInfo + +// MsgRedeemTokensForSharesResponse defines the Msg/MsgRedeemTokensForShares response type. +type MsgRedeemTokensForSharesResponse struct { + Amount types1.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` } -func (m *MsgCreateValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) +func (m *MsgRedeemTokensForSharesResponse) Reset() { *m = MsgRedeemTokensForSharesResponse{} } +func (m *MsgRedeemTokensForSharesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRedeemTokensForSharesResponse) ProtoMessage() {} +func (*MsgRedeemTokensForSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{17} +} +func (m *MsgRedeemTokensForSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRedeemTokensForSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRedeemTokensForSharesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - if m.Pubkey != nil { - { - size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + return nil, err } - i-- - dAtA[i] = 0x32 - } - 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] = 0x2a - } - 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] = 0x22 + return b[:n], nil } - { - size := m.MinSelfDelegation.Size() - i -= size - if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) +} +func (m *MsgRedeemTokensForSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRedeemTokensForSharesResponse.Merge(m, src) +} +func (m *MsgRedeemTokensForSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRedeemTokensForSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRedeemTokensForSharesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRedeemTokensForSharesResponse proto.InternalMessageInfo + +func (m *MsgRedeemTokensForSharesResponse) GetAmount() types1.Coin { + if m != nil { + return m.Amount } - i-- - dAtA[i] = 0x1a - { - size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + return types1.Coin{} +} + +// MsgTransferTokenizeShareRecord transfer a tokenize share record +type MsgTransferTokenizeShareRecord struct { + TokenizeShareRecordId uint64 `protobuf:"varint,1,opt,name=tokenize_share_record_id,json=tokenizeShareRecordId,proto3" json:"tokenize_share_record_id,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + NewOwner string `protobuf:"bytes,3,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` +} + +func (m *MsgTransferTokenizeShareRecord) Reset() { *m = MsgTransferTokenizeShareRecord{} } +func (m *MsgTransferTokenizeShareRecord) String() string { return proto.CompactTextString(m) } +func (*MsgTransferTokenizeShareRecord) ProtoMessage() {} +func (*MsgTransferTokenizeShareRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{18} +} +func (m *MsgTransferTokenizeShareRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferTokenizeShareRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferTokenizeShareRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0x12 - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) +} +func (m *MsgTransferTokenizeShareRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferTokenizeShareRecord.Merge(m, src) +} +func (m *MsgTransferTokenizeShareRecord) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferTokenizeShareRecord) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferTokenizeShareRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferTokenizeShareRecord proto.InternalMessageInfo + +// MsgTransferTokenizeShareRecordResponse defines the Msg/MsgTransferTokenizeShareRecord response type. +type MsgTransferTokenizeShareRecordResponse struct { +} + +func (m *MsgTransferTokenizeShareRecordResponse) Reset() { + *m = MsgTransferTokenizeShareRecordResponse{} +} +func (m *MsgTransferTokenizeShareRecordResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransferTokenizeShareRecordResponse) ProtoMessage() {} +func (*MsgTransferTokenizeShareRecordResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{19} +} +func (m *MsgTransferTokenizeShareRecordResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferTokenizeShareRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTransferTokenizeShareRecordResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil } - -func (m *MsgCreateValidatorResponse) 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 *MsgTransferTokenizeShareRecordResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferTokenizeShareRecordResponse.Merge(m, src) } - -func (m *MsgCreateValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgTransferTokenizeShareRecordResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferTokenizeShareRecordResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferTokenizeShareRecordResponse.DiscardUnknown(m) } -func (m *MsgCreateValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +var xxx_messageInfo_MsgTransferTokenizeShareRecordResponse proto.InternalMessageInfo + +// MsgDisableTokenizeShares prevents the tokenization of shares for a given address +type MsgDisableTokenizeShares struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` } -func (m *MsgEditValidator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgDisableTokenizeShares) Reset() { *m = MsgDisableTokenizeShares{} } +func (m *MsgDisableTokenizeShares) String() string { return proto.CompactTextString(m) } +func (*MsgDisableTokenizeShares) ProtoMessage() {} +func (*MsgDisableTokenizeShares) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{20} +} +func (m *MsgDisableTokenizeShares) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDisableTokenizeShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDisableTokenizeShares.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *MsgDisableTokenizeShares) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisableTokenizeShares.Merge(m, src) +} +func (m *MsgDisableTokenizeShares) XXX_Size() int { + return m.Size() +} +func (m *MsgDisableTokenizeShares) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisableTokenizeShares.DiscardUnknown(m) } -func (m *MsgEditValidator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_MsgDisableTokenizeShares proto.InternalMessageInfo + +// MsgDisableTokenizeSharesResponse defines the Msg/DisableTokenizeShares response type. +type MsgDisableTokenizeSharesResponse struct { } -func (m *MsgEditValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MinSelfDelegation != nil { - { - size := m.MinSelfDelegation.Size() - i -= size - if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.CommissionRate != nil { - { - size := m.CommissionRate.Size() - i -= size - if _, err := m.CommissionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - 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 - } - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) +func (m *MsgDisableTokenizeSharesResponse) Reset() { *m = MsgDisableTokenizeSharesResponse{} } +func (m *MsgDisableTokenizeSharesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDisableTokenizeSharesResponse) ProtoMessage() {} +func (*MsgDisableTokenizeSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{21} +} +func (m *MsgDisableTokenizeSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDisableTokenizeSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDisableTokenizeSharesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil } - -func (m *MsgEditValidatorResponse) 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 *MsgDisableTokenizeSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisableTokenizeSharesResponse.Merge(m, src) } - -func (m *MsgEditValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgDisableTokenizeSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDisableTokenizeSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisableTokenizeSharesResponse.DiscardUnknown(m) } -func (m *MsgEditValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +var xxx_messageInfo_MsgDisableTokenizeSharesResponse proto.InternalMessageInfo + +// MsgEnableTokenizeShares re-enables tokenization of shares for a given address +type MsgEnableTokenizeShares struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` } -func (m *MsgDelegate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgEnableTokenizeShares) Reset() { *m = MsgEnableTokenizeShares{} } +func (m *MsgEnableTokenizeShares) String() string { return proto.CompactTextString(m) } +func (*MsgEnableTokenizeShares) ProtoMessage() {} +func (*MsgEnableTokenizeShares) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{22} +} +func (m *MsgEnableTokenizeShares) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEnableTokenizeShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEnableTokenizeShares.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *MsgEnableTokenizeShares) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEnableTokenizeShares.Merge(m, src) +} +func (m *MsgEnableTokenizeShares) XXX_Size() int { + return m.Size() +} +func (m *MsgEnableTokenizeShares) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEnableTokenizeShares.DiscardUnknown(m) } -func (m *MsgDelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_MsgEnableTokenizeShares proto.InternalMessageInfo + +// MsgEnableTokenizeSharesResponse defines the Msg/EnableTokenizeShares response type. +type MsgEnableTokenizeSharesResponse struct { + CompletionTime time.Time `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` } -func (m *MsgDelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) +func (m *MsgEnableTokenizeSharesResponse) Reset() { *m = MsgEnableTokenizeSharesResponse{} } +func (m *MsgEnableTokenizeSharesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEnableTokenizeSharesResponse) ProtoMessage() {} +func (*MsgEnableTokenizeSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{23} +} +func (m *MsgEnableTokenizeSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEnableTokenizeSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEnableTokenizeSharesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, 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.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa + return b[:n], nil } - return len(dAtA) - i, nil +} +func (m *MsgEnableTokenizeSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEnableTokenizeSharesResponse.Merge(m, src) +} +func (m *MsgEnableTokenizeSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEnableTokenizeSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEnableTokenizeSharesResponse.DiscardUnknown(m) } -func (m *MsgDelegateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_MsgEnableTokenizeSharesResponse proto.InternalMessageInfo + +func (m *MsgEnableTokenizeSharesResponse) GetCompletionTime() time.Time { + if m != nil { + return m.CompletionTime } - return dAtA[:n], nil + return time.Time{} } -func (m *MsgDelegateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// MsgValidatorBond defines a SDK message for performing validator self-bond of delegated coins +// from a delegator to a validator. +type MsgValidatorBond struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty" yaml:"validator_address"` } -func (m *MsgDelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (m *MsgValidatorBond) Reset() { *m = MsgValidatorBond{} } +func (m *MsgValidatorBond) String() string { return proto.CompactTextString(m) } +func (*MsgValidatorBond) ProtoMessage() {} +func (*MsgValidatorBond) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{24} } - -func (m *MsgBeginRedelegate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgValidatorBond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgValidatorBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgValidatorBond.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *MsgValidatorBond) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgValidatorBond.Merge(m, src) +} +func (m *MsgValidatorBond) XXX_Size() int { + return m.Size() +} +func (m *MsgValidatorBond) XXX_DiscardUnknown() { + xxx_messageInfo_MsgValidatorBond.DiscardUnknown(m) } -func (m *MsgBeginRedelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_MsgValidatorBond proto.InternalMessageInfo + +// MsgValidatorBondResponse defines the Msg/ValidatorBond response type. +type MsgValidatorBondResponse struct { } -func (m *MsgBeginRedelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) +func (m *MsgValidatorBondResponse) Reset() { *m = MsgValidatorBondResponse{} } +func (m *MsgValidatorBondResponse) String() string { return proto.CompactTextString(m) } +func (*MsgValidatorBondResponse) ProtoMessage() {} +func (*MsgValidatorBondResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0926ef28816b35ab, []int{25} +} +func (m *MsgValidatorBondResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgValidatorBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgValidatorBondResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.ValidatorDstAddress) > 0 { - i -= len(m.ValidatorDstAddress) - copy(dAtA[i:], m.ValidatorDstAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorDstAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorSrcAddress) > 0 { - i -= len(m.ValidatorSrcAddress) - copy(dAtA[i:], m.ValidatorSrcAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorSrcAddress))) - 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 b[:n], nil } - return len(dAtA) - i, nil +} +func (m *MsgValidatorBondResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgValidatorBondResponse.Merge(m, src) +} +func (m *MsgValidatorBondResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgValidatorBondResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgValidatorBondResponse.DiscardUnknown(m) } -func (m *MsgBeginRedelegateResponse) 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 +var xxx_messageInfo_MsgValidatorBondResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCreateValidator)(nil), "cosmos.staking.v1beta1.MsgCreateValidator") + proto.RegisterType((*MsgCreateValidatorResponse)(nil), "cosmos.staking.v1beta1.MsgCreateValidatorResponse") + proto.RegisterType((*MsgEditValidator)(nil), "cosmos.staking.v1beta1.MsgEditValidator") + proto.RegisterType((*MsgEditValidatorResponse)(nil), "cosmos.staking.v1beta1.MsgEditValidatorResponse") + proto.RegisterType((*MsgDelegate)(nil), "cosmos.staking.v1beta1.MsgDelegate") + proto.RegisterType((*MsgDelegateResponse)(nil), "cosmos.staking.v1beta1.MsgDelegateResponse") + proto.RegisterType((*MsgBeginRedelegate)(nil), "cosmos.staking.v1beta1.MsgBeginRedelegate") + proto.RegisterType((*MsgBeginRedelegateResponse)(nil), "cosmos.staking.v1beta1.MsgBeginRedelegateResponse") + proto.RegisterType((*MsgUndelegate)(nil), "cosmos.staking.v1beta1.MsgUndelegate") + proto.RegisterType((*MsgUndelegateResponse)(nil), "cosmos.staking.v1beta1.MsgUndelegateResponse") + proto.RegisterType((*MsgUnbondValidator)(nil), "cosmos.staking.v1beta1.MsgUnbondValidator") + proto.RegisterType((*MsgUnbondValidatorResponse)(nil), "cosmos.staking.v1beta1.MsgUnbondValidatorResponse") + proto.RegisterType((*MsgCancelUnbondingDelegation)(nil), "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation") + proto.RegisterType((*MsgCancelUnbondingDelegationResponse)(nil), "cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse") + proto.RegisterType((*MsgTokenizeShares)(nil), "cosmos.staking.v1beta1.MsgTokenizeShares") + proto.RegisterType((*MsgTokenizeSharesResponse)(nil), "cosmos.staking.v1beta1.MsgTokenizeSharesResponse") + proto.RegisterType((*MsgRedeemTokensForShares)(nil), "cosmos.staking.v1beta1.MsgRedeemTokensForShares") + proto.RegisterType((*MsgRedeemTokensForSharesResponse)(nil), "cosmos.staking.v1beta1.MsgRedeemTokensForSharesResponse") + proto.RegisterType((*MsgTransferTokenizeShareRecord)(nil), "cosmos.staking.v1beta1.MsgTransferTokenizeShareRecord") + proto.RegisterType((*MsgTransferTokenizeShareRecordResponse)(nil), "cosmos.staking.v1beta1.MsgTransferTokenizeShareRecordResponse") + proto.RegisterType((*MsgDisableTokenizeShares)(nil), "cosmos.staking.v1beta1.MsgDisableTokenizeShares") + proto.RegisterType((*MsgDisableTokenizeSharesResponse)(nil), "cosmos.staking.v1beta1.MsgDisableTokenizeSharesResponse") + proto.RegisterType((*MsgEnableTokenizeShares)(nil), "cosmos.staking.v1beta1.MsgEnableTokenizeShares") + proto.RegisterType((*MsgEnableTokenizeSharesResponse)(nil), "cosmos.staking.v1beta1.MsgEnableTokenizeSharesResponse") + proto.RegisterType((*MsgValidatorBond)(nil), "cosmos.staking.v1beta1.MsgValidatorBond") + proto.RegisterType((*MsgValidatorBondResponse)(nil), "cosmos.staking.v1beta1.MsgValidatorBondResponse") } -func (m *MsgBeginRedelegateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func init() { proto.RegisterFile("cosmos/staking/v1beta1/tx.proto", fileDescriptor_0926ef28816b35ab) } + +var fileDescriptor_0926ef28816b35ab = []byte{ + // 1304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0x8f, 0xd3, 0x6c, 0xbf, 0xdd, 0xd9, 0xef, 0xf6, 0x87, 0xfb, 0x83, 0xd4, 0x5b, 0xc5, 0x95, + 0x77, 0xe9, 0x96, 0x85, 0x26, 0xb4, 0xfc, 0x28, 0xaa, 0x10, 0x68, 0xb3, 0xa1, 0xa2, 0x5a, 0x05, + 0x90, 0xdb, 0x72, 0x00, 0xa4, 0xc8, 0xb1, 0xa7, 0xae, 0x95, 0x78, 0x26, 0xeb, 0x71, 0xda, 0x0d, + 0x07, 0x84, 0xc4, 0x85, 0x1b, 0x7b, 0x01, 0xc1, 0xad, 0x12, 0x17, 0xce, 0x88, 0x3f, 0x62, 0xb5, + 0x17, 0xf6, 0x88, 0x38, 0x04, 0xd4, 0x72, 0xe0, 0xdc, 0xbf, 0x00, 0x79, 0x3c, 0x9e, 0x38, 0x8e, + 0x6d, 0xd2, 0xb2, 0x5d, 0xc1, 0x9e, 0x9a, 0xce, 0x7c, 0xde, 0x67, 0xde, 0x7c, 0xde, 0x9b, 0xf7, + 0x66, 0x0c, 0x64, 0x1d, 0x13, 0x1b, 0x93, 0x12, 0x71, 0xb5, 0x86, 0x85, 0xcc, 0xd2, 0xc1, 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 0x01, 0xf3, 0x03, 0x0a, 0xf1, 0x43, 0xd4, 0xf3, + 0x49, 0x38, 0x93, 0x4f, 0xca, 0x0f, 0x02, 0x6d, 0xa8, 0x5e, 0x99, 0x83, 0x36, 0x25, 0x27, 0x9b, + 0xd8, 0x79, 0xf2, 0xfa, 0xf7, 0x1c, 0xcc, 0x9e, 0xad, 0x7a, 0xf4, 0x04, 0xf8, 0x18, 0x2c, 0x26, + 0x79, 0xfa, 0xcf, 0x75, 0xf8, 0x56, 0x00, 0x05, 0x4f, 0x5e, 0x47, 0x43, 0x64, 0x0f, 0x3a, 0x7d, + 0x32, 0xab, 0x50, 0xc7, 0x8e, 0x21, 0xae, 0x83, 0x7c, 0x10, 0x21, 0x16, 0x3d, 0x87, 0x4e, 0xd4, + 0x2c, 0x83, 0xae, 0x96, 0x53, 0x79, 0x78, 0x43, 0x66, 0x5b, 0x86, 0x38, 0x07, 0x46, 0x09, 0x44, + 0x06, 0x74, 0xfc, 0x84, 0x53, 0xd9, 0x7f, 0xe2, 0x35, 0x70, 0x19, 0xc1, 0x43, 0x96, 0x03, 0xb4, + 0xdf, 0xa9, 0x63, 0x08, 0x1e, 0x46, 0x03, 0xbf, 0x0c, 0x96, 0xd2, 0x3d, 0xe3, 0xa7, 0x08, 0xd3, + 0x58, 0x56, 0x2c, 0xa2, 0xd5, 0x9b, 0xf0, 0xc2, 0xce, 0x52, 0xc8, 0x35, 0x85, 0x86, 0x24, 0x76, + 0x41, 0xee, 0x14, 0x02, 0xcf, 0x79, 0x37, 0x36, 0xf4, 0xb4, 0x7c, 0x6a, 0x01, 0x39, 0x61, 0xbd, + 0x8b, 0x6a, 0x39, 0x3f, 0x0a, 0xf4, 0xbd, 0xc0, 0xdb, 0x42, 0x19, 0x23, 0xe3, 0xdf, 0x59, 0xbb, + 0x06, 0x2e, 0xd2, 0x7d, 0x3e, 0x07, 0xfa, 0xac, 0x7d, 0xff, 0x7f, 0x30, 0x52, 0x25, 0xa6, 0x78, + 0x0f,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, 0xb6, 0xb9, 0x52, 0x5a, 0x61, 0x8a, 0x31, 0x90, 0xd6, 0xcf, 0x68, + 0x10, 0xae, 0x9e, 0xfd, 0x5d, 0x28, 0xad, 0x7a, 0xf6, 0x21, 0x53, 0xab, 0x67, 0x6c, 0x97, 0x28, + 0x6f, 0x3e, 0x3c, 0x2e, 0x08, 0x8f, 0x8f, 0x0b, 0xc2, 0xef, 0xc7, 0x05, 0xe1, 0xc1, 0x49, 0x21, + 0xf3, 0xf8, 0xa4, 0x90, 0xf9, 0xe5, 0xa4, 0x90, 0xf9, 0xe8, 0xa5, 0xd4, 0x2f, 0x41, 0xf7, 0xf9, + 0xe7, 0x5e, 0xfa, 0x4d, 0xa8, 0x3e, 0x4a, 0x9b, 0xed, 0x2b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, + 0x7e, 0x44, 0x19, 0x7a, 0xd3, 0x16, 0x00, 0x00, } -func (m *MsgBeginRedelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err8 != nil { - return 0, err8 - } - i -= n8 - i = encodeVarintTx(dAtA, i, uint64(n8)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil +// 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 { + // CreateValidator defines a method for creating a new validator. + CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) + // EditValidator defines a method for editing an existing validator. + EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error) + // Delegate defines a method for performing a delegation of coins + // from a delegator to a validator. + Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error) + // BeginRedelegate defines a method for performing a redelegation + // of coins from a delegator and source validator to a destination validator. + BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error) + // Undelegate defines a method for performing an undelegation from a + // delegate and a validator. + // This allows a validator to stop their services and jail themselves without + // experiencing a slash + Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) + // UnbondValidator defines a method for performing the status transition for a validator + // from bonded to unbonding + UnbondValidator(ctx context.Context, in *MsgUnbondValidator, opts ...grpc.CallOption) (*MsgUnbondValidatorResponse, error) + // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation + // and delegate back to previous validator. + // + // This has been backported from SDK 46 as a desirable safety feature for LSM. + // If a liquid staking provider is exploited and the exploiter initiates an undelegation, + // having access to CancelUnbondingDelegation allows the liquid staking provider to cancel + // the undelegation with a software upgrade and thus avoid loss of user funds + CancelUnbondingDelegation(ctx context.Context, in *MsgCancelUnbondingDelegation, opts ...grpc.CallOption) (*MsgCancelUnbondingDelegationResponse, error) + // TokenizeShares defines a method for tokenizing shares from a validator. + TokenizeShares(ctx context.Context, in *MsgTokenizeShares, opts ...grpc.CallOption) (*MsgTokenizeSharesResponse, error) + // RedeemTokensForShares defines a method for redeeming tokens from a validator for + // shares. + RedeemTokensForShares(ctx context.Context, in *MsgRedeemTokensForShares, opts ...grpc.CallOption) (*MsgRedeemTokensForSharesResponse, error) + // TransferTokenizeShareRecord defines a method to transfer ownership of + // TokenizeShareRecord + TransferTokenizeShareRecord(ctx context.Context, in *MsgTransferTokenizeShareRecord, opts ...grpc.CallOption) (*MsgTransferTokenizeShareRecordResponse, error) + // DisableTokenizeShares defines a method to prevent the tokenization of an addresses stake + DisableTokenizeShares(ctx context.Context, in *MsgDisableTokenizeShares, opts ...grpc.CallOption) (*MsgDisableTokenizeSharesResponse, error) + // EnableTokenizeShares defines a method to re-enable the tokenization of an addresseses stake + // after it has been disabled + EnableTokenizeShares(ctx context.Context, in *MsgEnableTokenizeShares, opts ...grpc.CallOption) (*MsgEnableTokenizeSharesResponse, error) + // ValidatorBond defines a method for performing a validator self-bond + ValidatorBond(ctx context.Context, in *MsgValidatorBond, opts ...grpc.CallOption) (*MsgValidatorBondResponse, error) } -func (m *MsgUndelegate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) { + out := new(MsgCreateValidatorResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/CreateValidator", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgUndelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) EditValidator(ctx context.Context, in *MsgEditValidator, opts ...grpc.CallOption) (*MsgEditValidatorResponse, error) { + out := new(MsgEditValidatorResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/EditValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgUndelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.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.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa +func (c *msgClient) Delegate(ctx context.Context, in *MsgDelegate, opts ...grpc.CallOption) (*MsgDelegateResponse, error) { + out := new(MsgDelegateResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/Delegate", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *MsgUndelegateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) BeginRedelegate(ctx context.Context, in *MsgBeginRedelegate, opts ...grpc.CallOption) (*MsgBeginRedelegateResponse, error) { + out := new(MsgBeginRedelegateResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/BeginRedelegate", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgUndelegateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) Undelegate(ctx context.Context, in *MsgUndelegate, opts ...grpc.CallOption) (*MsgUndelegateResponse, error) { + out := new(MsgUndelegateResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/Undelegate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgUndelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err10 != nil { - return 0, err10 +func (c *msgClient) UnbondValidator(ctx context.Context, in *MsgUnbondValidator, opts ...grpc.CallOption) (*MsgUnbondValidatorResponse, error) { + out := new(MsgUnbondValidatorResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/UnbondValidator", in, out, opts...) + if err != nil { + return nil, err } - i -= n10 - i = encodeVarintTx(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return out, 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++ +func (c *msgClient) CancelUnbondingDelegation(ctx context.Context, in *MsgCancelUnbondingDelegation, opts ...grpc.CallOption) (*MsgCancelUnbondingDelegationResponse, error) { + out := new(MsgCancelUnbondingDelegationResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", in, out, opts...) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return out, nil } -func (m *MsgCreateValidator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Description.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.Commission.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.MinSelfDelegation.Size() - n += 1 + l + sovTx(uint64(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)) - } - if m.Pubkey != nil { - l = m.Pubkey.Size() - n += 1 + l + sovTx(uint64(l)) + +func (c *msgClient) TokenizeShares(ctx context.Context, in *MsgTokenizeShares, opts ...grpc.CallOption) (*MsgTokenizeSharesResponse, error) { + out := new(MsgTokenizeSharesResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/TokenizeShares", in, out, opts...) + if err != nil { + return nil, err } - l = m.Value.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return out, nil } -func (m *MsgCreateValidatorResponse) Size() (n int) { - if m == nil { - return 0 +func (c *msgClient) RedeemTokensForShares(ctx context.Context, in *MsgRedeemTokensForShares, opts ...grpc.CallOption) (*MsgRedeemTokensForSharesResponse, error) { + out := new(MsgRedeemTokensForSharesResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/RedeemTokensForShares", in, out, opts...) + if err != nil { + return nil, err } - var l int - _ = l - return n + return out, nil } -func (m *MsgEditValidator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Description.Size() - n += 1 + l + sovTx(uint64(l)) - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.CommissionRate != nil { - l = m.CommissionRate.Size() - n += 1 + l + sovTx(uint64(l)) - } - if m.MinSelfDelegation != nil { - l = m.MinSelfDelegation.Size() - n += 1 + l + sovTx(uint64(l)) +func (c *msgClient) TransferTokenizeShareRecord(ctx context.Context, in *MsgTransferTokenizeShareRecord, opts ...grpc.CallOption) (*MsgTransferTokenizeShareRecordResponse, error) { + out := new(MsgTransferTokenizeShareRecordResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/TransferTokenizeShareRecord", in, out, opts...) + if err != nil { + return nil, err } - return n + return out, nil } -func (m *MsgEditValidatorResponse) Size() (n int) { - if m == nil { - return 0 +func (c *msgClient) DisableTokenizeShares(ctx context.Context, in *MsgDisableTokenizeShares, opts ...grpc.CallOption) (*MsgDisableTokenizeSharesResponse, error) { + out := new(MsgDisableTokenizeSharesResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/DisableTokenizeShares", in, out, opts...) + if err != nil { + return nil, err } - var l int - _ = l - return n + return out, nil } -func (m *MsgDelegate) 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)) +func (c *msgClient) EnableTokenizeShares(ctx context.Context, in *MsgEnableTokenizeShares, opts ...grpc.CallOption) (*MsgEnableTokenizeSharesResponse, error) { + out := new(MsgEnableTokenizeSharesResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/EnableTokenizeShares", in, out, opts...) + if err != nil { + return nil, err } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return out, nil } -func (m *MsgDelegateResponse) Size() (n int) { - if m == nil { - return 0 +func (c *msgClient) ValidatorBond(ctx context.Context, in *MsgValidatorBond, opts ...grpc.CallOption) (*MsgValidatorBondResponse, error) { + out := new(MsgValidatorBondResponse) + err := c.cc.Invoke(ctx, "/cosmos.staking.v1beta1.Msg/ValidatorBond", in, out, opts...) + if err != nil { + return nil, err } - var l int - _ = l - return n + return out, nil } -func (m *MsgBeginRedelegate) 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.ValidatorSrcAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateValidator defines a method for creating a new validator. + CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) + // EditValidator defines a method for editing an existing validator. + EditValidator(context.Context, *MsgEditValidator) (*MsgEditValidatorResponse, error) + // Delegate defines a method for performing a delegation of coins + // from a delegator to a validator. + Delegate(context.Context, *MsgDelegate) (*MsgDelegateResponse, error) + // BeginRedelegate defines a method for performing a redelegation + // of coins from a delegator and source validator to a destination validator. + BeginRedelegate(context.Context, *MsgBeginRedelegate) (*MsgBeginRedelegateResponse, error) + // Undelegate defines a method for performing an undelegation from a + // delegate and a validator. + // This allows a validator to stop their services and jail themselves without + // experiencing a slash + Undelegate(context.Context, *MsgUndelegate) (*MsgUndelegateResponse, error) + // UnbondValidator defines a method for performing the status transition for a validator + // from bonded to unbonding + UnbondValidator(context.Context, *MsgUnbondValidator) (*MsgUnbondValidatorResponse, error) + // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation + // and delegate back to previous validator. + // + // This has been backported from SDK 46 as a desirable safety feature for LSM. + // If a liquid staking provider is exploited and the exploiter initiates an undelegation, + // having access to CancelUnbondingDelegation allows the liquid staking provider to cancel + // the undelegation with a software upgrade and thus avoid loss of user funds + CancelUnbondingDelegation(context.Context, *MsgCancelUnbondingDelegation) (*MsgCancelUnbondingDelegationResponse, error) + // TokenizeShares defines a method for tokenizing shares from a validator. + TokenizeShares(context.Context, *MsgTokenizeShares) (*MsgTokenizeSharesResponse, error) + // RedeemTokensForShares defines a method for redeeming tokens from a validator for + // shares. + RedeemTokensForShares(context.Context, *MsgRedeemTokensForShares) (*MsgRedeemTokensForSharesResponse, error) + // TransferTokenizeShareRecord defines a method to transfer ownership of + // TokenizeShareRecord + TransferTokenizeShareRecord(context.Context, *MsgTransferTokenizeShareRecord) (*MsgTransferTokenizeShareRecordResponse, error) + // DisableTokenizeShares defines a method to prevent the tokenization of an addresses stake + DisableTokenizeShares(context.Context, *MsgDisableTokenizeShares) (*MsgDisableTokenizeSharesResponse, error) + // EnableTokenizeShares defines a method to re-enable the tokenization of an addresseses stake + // after it has been disabled + EnableTokenizeShares(context.Context, *MsgEnableTokenizeShares) (*MsgEnableTokenizeSharesResponse, error) + // ValidatorBond defines a method for performing a validator self-bond + ValidatorBond(context.Context, *MsgValidatorBond) (*MsgValidatorBondResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateValidator(ctx context.Context, req *MsgCreateValidator) (*MsgCreateValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateValidator not implemented") +} +func (*UnimplementedMsgServer) EditValidator(ctx context.Context, req *MsgEditValidator) (*MsgEditValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EditValidator not implemented") +} +func (*UnimplementedMsgServer) Delegate(ctx context.Context, req *MsgDelegate) (*MsgDelegateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delegate not implemented") +} +func (*UnimplementedMsgServer) BeginRedelegate(ctx context.Context, req *MsgBeginRedelegate) (*MsgBeginRedelegateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BeginRedelegate not implemented") +} +func (*UnimplementedMsgServer) Undelegate(ctx context.Context, req *MsgUndelegate) (*MsgUndelegateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Undelegate not implemented") +} +func (*UnimplementedMsgServer) UnbondValidator(ctx context.Context, req *MsgUnbondValidator) (*MsgUnbondValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnbondValidator not implemented") +} +func (*UnimplementedMsgServer) CancelUnbondingDelegation(ctx context.Context, req *MsgCancelUnbondingDelegation) (*MsgCancelUnbondingDelegationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelUnbondingDelegation not implemented") +} +func (*UnimplementedMsgServer) TokenizeShares(ctx context.Context, req *MsgTokenizeShares) (*MsgTokenizeSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenizeShares not implemented") +} +func (*UnimplementedMsgServer) RedeemTokensForShares(ctx context.Context, req *MsgRedeemTokensForShares) (*MsgRedeemTokensForSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RedeemTokensForShares not implemented") +} +func (*UnimplementedMsgServer) TransferTokenizeShareRecord(ctx context.Context, req *MsgTransferTokenizeShareRecord) (*MsgTransferTokenizeShareRecordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferTokenizeShareRecord not implemented") +} +func (*UnimplementedMsgServer) DisableTokenizeShares(ctx context.Context, req *MsgDisableTokenizeShares) (*MsgDisableTokenizeSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisableTokenizeShares not implemented") +} +func (*UnimplementedMsgServer) EnableTokenizeShares(ctx context.Context, req *MsgEnableTokenizeShares) (*MsgEnableTokenizeSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnableTokenizeShares not implemented") +} +func (*UnimplementedMsgServer) ValidatorBond(ctx context.Context, req *MsgValidatorBond) (*MsgValidatorBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidatorBond not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/CreateValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateValidator(ctx, req.(*MsgCreateValidator)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EditValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEditValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EditValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/EditValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EditValidator(ctx, req.(*MsgEditValidator)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Delegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDelegate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Delegate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/Delegate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Delegate(ctx, req.(*MsgDelegate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BeginRedelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBeginRedelegate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BeginRedelegate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/BeginRedelegate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BeginRedelegate(ctx, req.(*MsgBeginRedelegate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Undelegate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUndelegate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Undelegate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/Undelegate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Undelegate(ctx, req.(*MsgUndelegate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnbondValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnbondValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnbondValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/UnbondValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnbondValidator(ctx, req.(*MsgUnbondValidator)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelUnbondingDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelUnbondingDelegation) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelUnbondingDelegation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelUnbondingDelegation(ctx, req.(*MsgCancelUnbondingDelegation)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TokenizeShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTokenizeShares) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TokenizeShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/TokenizeShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TokenizeShares(ctx, req.(*MsgTokenizeShares)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RedeemTokensForShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRedeemTokensForShares) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RedeemTokensForShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/RedeemTokensForShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RedeemTokensForShares(ctx, req.(*MsgRedeemTokensForShares)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TransferTokenizeShareRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferTokenizeShareRecord) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferTokenizeShareRecord(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/TransferTokenizeShareRecord", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferTokenizeShareRecord(ctx, req.(*MsgTransferTokenizeShareRecord)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DisableTokenizeShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDisableTokenizeShares) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DisableTokenizeShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/DisableTokenizeShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DisableTokenizeShares(ctx, req.(*MsgDisableTokenizeShares)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EnableTokenizeShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEnableTokenizeShares) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EnableTokenizeShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/EnableTokenizeShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EnableTokenizeShares(ctx, req.(*MsgEnableTokenizeShares)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ValidatorBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgValidatorBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ValidatorBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.staking.v1beta1.Msg/ValidatorBond", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ValidatorBond(ctx, req.(*MsgValidatorBond)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.staking.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateValidator", + Handler: _Msg_CreateValidator_Handler, + }, + { + MethodName: "EditValidator", + Handler: _Msg_EditValidator_Handler, + }, + { + MethodName: "Delegate", + Handler: _Msg_Delegate_Handler, + }, + { + MethodName: "BeginRedelegate", + Handler: _Msg_BeginRedelegate_Handler, + }, + { + MethodName: "Undelegate", + Handler: _Msg_Undelegate_Handler, + }, + { + MethodName: "UnbondValidator", + Handler: _Msg_UnbondValidator_Handler, + }, + { + MethodName: "CancelUnbondingDelegation", + Handler: _Msg_CancelUnbondingDelegation_Handler, + }, + { + MethodName: "TokenizeShares", + Handler: _Msg_TokenizeShares_Handler, + }, + { + MethodName: "RedeemTokensForShares", + Handler: _Msg_RedeemTokensForShares_Handler, + }, + { + MethodName: "TransferTokenizeShareRecord", + Handler: _Msg_TransferTokenizeShareRecord_Handler, + }, + { + MethodName: "DisableTokenizeShares", + Handler: _Msg_DisableTokenizeShares_Handler, + }, + { + MethodName: "EnableTokenizeShares", + Handler: _Msg_EnableTokenizeShares_Handler, + }, + { + MethodName: "ValidatorBond", + Handler: _Msg_ValidatorBond_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/staking/v1beta1/tx.proto", +} + +func (m *MsgCreateValidator) 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 *MsgCreateValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if m.Pubkey != nil { + { + size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + 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] = 0x2a + } + 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] = 0x22 + } + { + size := m.MinSelfDelegation.Size() + i -= size + if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Commission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Description.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 *MsgCreateValidatorResponse) 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 *MsgCreateValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEditValidator) 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 *MsgEditValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEditValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinSelfDelegation.Size() + i -= size + if _, err := m.MinSelfDelegation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.CommissionRate != nil { + { + size := m.CommissionRate.Size() + i -= size + if _, err := m.CommissionRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + 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 + } + { + size, err := m.Description.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 *MsgEditValidatorResponse) 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 *MsgEditValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEditValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDelegate) 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 *MsgDelegate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.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.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 *MsgDelegateResponse) 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 *MsgDelegateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgBeginRedelegate) 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 *MsgBeginRedelegate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBeginRedelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.ValidatorDstAddress) > 0 { + i -= len(m.ValidatorDstAddress) + copy(dAtA[i:], m.ValidatorDstAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorDstAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorSrcAddress) > 0 { + i -= len(m.ValidatorSrcAddress) + copy(dAtA[i:], m.ValidatorSrcAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorSrcAddress))) + 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 *MsgBeginRedelegateResponse) 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 *MsgBeginRedelegateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBeginRedelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintTx(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgUndelegate) 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 *MsgUndelegate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUndelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.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.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 *MsgUndelegateResponse) 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 *MsgUndelegateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUndelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintTx(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgUnbondValidator) 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 *MsgUnbondValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnbondValidator) 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 *MsgUnbondValidatorResponse) 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 *MsgUnbondValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnbondValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelUnbondingDelegation) 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 *MsgCancelUnbondingDelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelUnbondingDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreationHeight != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Amount.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.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 *MsgCancelUnbondingDelegationResponse) 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 *MsgCancelUnbondingDelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelUnbondingDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgTokenizeShares) 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 *MsgTokenizeShares) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTokenizeShares) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenizedShareOwner) > 0 { + i -= len(m.TokenizedShareOwner) + copy(dAtA[i:], m.TokenizedShareOwner) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenizedShareOwner))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Amount.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.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 *MsgTokenizeSharesResponse) 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 *MsgTokenizeSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTokenizeSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.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 *MsgRedeemTokensForShares) 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 *MsgRedeemTokensForShares) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRedeemTokensForShares) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + 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 *MsgRedeemTokensForSharesResponse) 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 *MsgRedeemTokensForSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRedeemTokensForSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.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 *MsgTransferTokenizeShareRecord) 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 *MsgTransferTokenizeShareRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferTokenizeShareRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewOwner) > 0 { + i -= len(m.NewOwner) + copy(dAtA[i:], m.NewOwner) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewOwner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.TokenizeShareRecordId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TokenizeShareRecordId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferTokenizeShareRecordResponse) 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 *MsgTransferTokenizeShareRecordResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferTokenizeShareRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDisableTokenizeShares) 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 *MsgDisableTokenizeShares) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDisableTokenizeShares) 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 = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDisableTokenizeSharesResponse) 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 *MsgDisableTokenizeSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDisableTokenizeSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEnableTokenizeShares) 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 *MsgEnableTokenizeShares) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEnableTokenizeShares) 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 = encodeVarintTx(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEnableTokenizeSharesResponse) 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 *MsgEnableTokenizeSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEnableTokenizeSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err16 != nil { + return 0, err16 + } + i -= n16 + i = encodeVarintTx(dAtA, i, uint64(n16)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgValidatorBond) 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 *MsgValidatorBond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgValidatorBond) 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 *MsgValidatorBondResponse) 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 *MsgValidatorBondResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgValidatorBondResponse) 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 *MsgCreateValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Commission.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinSelfDelegation.Size() + n += 1 + l + sovTx(uint64(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)) + } + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = m.Value.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEditValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.CommissionRate != nil { + l = m.CommissionRate.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = m.MinSelfDelegation.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgEditValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDelegate) 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)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgDelegateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgBeginRedelegate) 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.ValidatorSrcAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ValidatorDstAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgBeginRedelegateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUndelegate) 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)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUndelegateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUnbondValidator) 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 *MsgUnbondValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelUnbondingDelegation) 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)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + if m.CreationHeight != 0 { + n += 1 + sovTx(uint64(m.CreationHeight)) + } + return n +} + +func (m *MsgCancelUnbondingDelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgTokenizeShares) 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)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.TokenizedShareOwner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTokenizeSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgRedeemTokensForShares) 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 = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgRedeemTokensForSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgTransferTokenizeShareRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TokenizeShareRecordId != 0 { + n += 1 + sovTx(uint64(m.TokenizeShareRecordId)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NewOwner) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTransferTokenizeShareRecordResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDisableTokenizeShares) 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)) + } + return n +} + +func (m *MsgDisableTokenizeSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEnableTokenizeShares) 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)) + } + return n +} + +func (m *MsgEnableTokenizeSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgValidatorBond) 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 *MsgValidatorBondResponse) 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 *MsgCreateValidator) 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: MsgCreateValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + 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 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.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", 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 + } + if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + 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 5: + 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 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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 m.Pubkey == nil { + m.Pubkey = &types.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value.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 *MsgCreateValidatorResponse) 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: MsgCreateValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateValidatorResponse: 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 *MsgEditValidator) 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: MsgEditValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEditValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 CommissionRate", 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 + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.CommissionRate = &v + if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", 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 + } + if err := m.MinSelfDelegation.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 *MsgEditValidatorResponse) 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: MsgEditValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEditValidatorResponse: 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 *MsgDelegate) 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: MsgDelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegate: 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 + 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 + } + if err := m.Amount.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 *MsgDelegateResponse) 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: MsgDelegateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegateResponse: 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 *MsgBeginRedelegate) 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: MsgBeginRedelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBeginRedelegate: 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 ValidatorSrcAddress", 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.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", 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.ValidatorDstAddress = 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 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.Amount.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 *MsgBeginRedelegateResponse) 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: MsgBeginRedelegateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBeginRedelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, 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 *MsgUndelegate) 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: MsgUndelegate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUndelegate: 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 + 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 + } + if err := m.Amount.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 + } } - l = len(m.ValidatorDstAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUndelegateResponse) 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: MsgUndelegateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUndelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, 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 *MsgUnbondValidator) 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: MsgUnbondValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnbondValidator: 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 + } } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} -func (m *MsgBeginRedelegateResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovTx(uint64(l)) - return n + return nil } - -func (m *MsgUndelegate) 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)) +func (m *MsgUnbondValidatorResponse) 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: MsgUnbondValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnbondValidatorResponse: 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 + } } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} -func (m *MsgUndelegateResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovTx(uint64(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)))) + return nil } -func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { +func (m *MsgCancelUnbondingDelegation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1467,17 +4645,17 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateValidator: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelUnbondingDelegation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateValidator: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelUnbondingDelegation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1487,28 +4665,59 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) + 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 { @@ -1535,13 +4744,132 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Commission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgCancelUnbondingDelegationResponse) 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: MsgCancelUnbondingDelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelUnbondingDelegationResponse: 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 *MsgTokenizeShares) 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: MsgTokenizeShares: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTokenizeShares: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1569,13 +4897,11 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1603,13 +4929,13 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1619,29 +4945,30 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 6: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenizedShareOwner", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1651,31 +4978,77 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pubkey == nil { - m.Pubkey = &types.Any{} - } - if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TokenizedShareOwner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 7: + 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 *MsgTokenizeSharesResponse) 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: MsgTokenizeSharesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTokenizeSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1702,7 +5075,7 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1727,7 +5100,7 @@ func (m *MsgCreateValidator) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateValidatorResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRedeemTokensForShares) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1750,12 +5123,77 @@ func (m *MsgCreateValidatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateValidatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRedeemTokensForShares: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRedeemTokensForShares: 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 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 + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1777,7 +5215,7 @@ func (m *MsgCreateValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { +func (m *MsgRedeemTokensForSharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1800,15 +5238,15 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEditValidator: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRedeemTokensForSharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEditValidator: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRedeemTokensForSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1835,15 +5273,65 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err } - var stringLen uint64 + 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 *MsgTransferTokenizeShareRecord) 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: MsgTransferTokenizeShareRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferTokenizeShareRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenizeShareRecordId", wireType) + } + m.TokenizeShareRecordId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1853,27 +5341,14 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TokenizeShareRecordId |= 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: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommissionRate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1899,17 +5374,13 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTx } if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_cosmos_cosmos_sdk_types.Dec - m.CommissionRate = &v - if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + return io.ErrUnexpectedEOF } + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSelfDelegation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1937,11 +5408,7 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.MinSelfDelegation = &v - if err := m.MinSelfDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.NewOwner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1964,7 +5431,7 @@ func (m *MsgEditValidator) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEditValidatorResponse) Unmarshal(dAtA []byte) error { +func (m *MsgTransferTokenizeShareRecordResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1987,10 +5454,10 @@ func (m *MsgEditValidatorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEditValidatorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTransferTokenizeShareRecordResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEditValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTransferTokenizeShareRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2014,7 +5481,7 @@ func (m *MsgEditValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDelegate) Unmarshal(dAtA []byte) error { +func (m *MsgDisableTokenizeShares) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2037,10 +5504,10 @@ func (m *MsgDelegate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDelegate: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDisableTokenizeShares: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDelegate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDisableTokenizeShares: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2075,71 +5542,6 @@ func (m *MsgDelegate) Unmarshal(dAtA []byte) error { } 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 - 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 - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2161,7 +5563,7 @@ func (m *MsgDelegate) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDelegateResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDisableTokenizeSharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2184,10 +5586,10 @@ func (m *MsgDelegateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDelegateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDisableTokenizeSharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDisableTokenizeSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2211,7 +5613,7 @@ func (m *MsgDelegateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { +func (m *MsgEnableTokenizeShares) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2234,10 +5636,10 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBeginRedelegate: wiretype end group for non-group") + return fmt.Errorf("proto: MsgEnableTokenizeShares: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBeginRedelegate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgEnableTokenizeShares: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2272,103 +5674,6 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { } m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSrcAddress", 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.ValidatorSrcAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDstAddress", 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.ValidatorDstAddress = 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 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.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2390,7 +5695,7 @@ func (m *MsgBeginRedelegate) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBeginRedelegateResponse) Unmarshal(dAtA []byte) error { +func (m *MsgEnableTokenizeSharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2413,10 +5718,10 @@ func (m *MsgBeginRedelegateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBeginRedelegateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgEnableTokenizeSharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBeginRedelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgEnableTokenizeSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2473,7 +5778,7 @@ func (m *MsgBeginRedelegateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { +func (m *MsgValidatorBond) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2496,10 +5801,10 @@ func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUndelegate: wiretype end group for non-group") + return fmt.Errorf("proto: MsgValidatorBond: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUndelegate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgValidatorBond: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2566,39 +5871,6 @@ func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { } 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 - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2620,7 +5892,7 @@ func (m *MsgUndelegate) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUndelegateResponse) Unmarshal(dAtA []byte) error { +func (m *MsgValidatorBondResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2643,45 +5915,12 @@ func (m *MsgUndelegateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUndelegateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgValidatorBondResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUndelegateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgValidatorBondResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CompletionTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 02da27fec732..8f4a37be30f7 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -57,8 +57,9 @@ func NewValidator(operator sdk.ValAddress, pubKey cryptotypes.PubKey, descriptio UnbondingHeight: int64(0), UnbondingTime: time.Unix(0, 0).UTC(), Commission: NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), - MinSelfDelegation: sdk.OneInt(), UnbondingOnHoldRefCount: 0, + ValidatorBondShares: sdk.ZeroDec(), + LiquidShares: sdk.ZeroDec(), }, nil } @@ -444,7 +445,6 @@ func (v *Validator) MinEqual(other *Validator) bool { v.Description.Equal(other.Description) && v.Commission.Equal(other.Commission) && v.Jailed == other.Jailed && - v.MinSelfDelegation.Equal(other.MinSelfDelegation) && v.ConsensusPubkey.Equal(other.ConsensusPubkey) } @@ -510,8 +510,9 @@ func (v Validator) GetConsensusPower(r sdk.Int) int64 { return v.ConsensusPower(r) } func (v Validator) GetCommission() sdk.Dec { return v.Commission.Rate } -func (v Validator) GetMinSelfDelegation() sdk.Int { return v.MinSelfDelegation } +func (v Validator) GetMinSelfDelegation() sdk.Int { return sdk.ZeroInt() } func (v Validator) GetDelegatorShares() sdk.Dec { return v.DelegatorShares } +func (v Validator) GetLiquidShares() sdk.Dec { return v.LiquidShares } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v Validator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {