Documentation ¶
Index ¶
- func QueryDelegationRewards(cliCtx context.CLIContext, cdc *codec.Codec, ...) ([]byte, error)
- func QueryDelegatorTotalRewards(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute, delAddr string) ([]byte, error)
- func QueryDelegatorValidators(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute string, ...) ([]byte, error)
- func QueryValidatorCommission(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute string, ...) ([]byte, error)
- func WithdrawAllDelegatorRewards(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute string, ...) ([]sdk.Msg, error)
- func WithdrawValidatorRewardsAndCommission(validatorAddr sdk.ValAddress) ([]sdk.Msg, error)
- type PrettyParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryDelegationRewards ¶
func QueryDelegationRewards(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute, delAddr, valAddr string) ([]byte, error)
QueryDelegationRewards queries a delegation rewards.
func QueryDelegatorTotalRewards ¶ added in v0.31.0
func QueryDelegatorTotalRewards(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute, delAddr string) ([]byte, error)
QueryDelegatorTotalRewards queries delegator total rewards.
func QueryDelegatorValidators ¶
func QueryDelegatorValidators(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute string, delegatorAddr sdk.AccAddress) ([]byte, error)
QueryDelegatorValidators returns delegator's list of validators it submitted delegations to.
func QueryValidatorCommission ¶
func QueryValidatorCommission(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute string, validatorAddr sdk.ValAddress) ([]byte, error)
QueryValidatorCommission returns a validator's commission.
func WithdrawAllDelegatorRewards ¶
func WithdrawAllDelegatorRewards(cliCtx context.CLIContext, cdc *codec.Codec, queryRoute string, delegatorAddr sdk.AccAddress) ([]sdk.Msg, error)
WithdrawAllDelegatorRewards builds a multi-message slice to be used to withdraw all delegations rewards for the given delegator.
func WithdrawValidatorRewardsAndCommission ¶
func WithdrawValidatorRewardsAndCommission(validatorAddr sdk.ValAddress) ([]sdk.Msg, error)
WithdrawValidatorRewardsAndCommission builds a two-message message slice to be used to withdraw both validation's commission and self-delegation reward.
Types ¶
type PrettyParams ¶ added in v0.31.0
type PrettyParams struct { CommunityTax json.RawMessage `json:"community_tax"` BaseProposerReward json.RawMessage `json:"base_proposer_reward"` BonusProposerReward json.RawMessage `json:"bonus_proposer_reward"` WithdrawAddrEnabled json.RawMessage `json:"withdraw_addr_enabled"` }
Convenience struct for CLI output
func NewPrettyParams ¶ added in v0.31.0
func NewPrettyParams(communityTax json.RawMessage, baseProposerReward json.RawMessage, bonusProposerReward json.RawMessage, withdrawAddrEnabled json.RawMessage) PrettyParams
Construct a new PrettyParams
func QueryParams ¶ added in v0.31.0
func QueryParams(cliCtx context.CLIContext, queryRoute string) (PrettyParams, error)
QueryParams actually queries distribution params.
func (PrettyParams) String ¶ added in v0.31.0
func (pp PrettyParams) String() string