Documentation ¶
Index ¶
- func AllInvariants(k Keeper) sdk.Invariant
- func CanWithdrawInvariant(k Keeper) sdk.Invariant
- func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p *types.CommunityPoolSpendProposal) error
- func ModuleAccountInvariant(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func NonNegativeOutstandingInvariant(k Keeper) sdk.Invariant
- func ReferenceCountInvariant(k Keeper) sdk.Invariant
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- type Hooks
- func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error
- func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
- type Keeper
- func (k Keeper) AllocateTokens(ctx sdk.Context, sumPreviousPrecommitPower, totalPreviousPower int64, ...)
- func (k Keeper) AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins)
- func (k Keeper) CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, ...) (rewards sdk.DecCoins)
- func (k Keeper) CommunityPool(c context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error)
- func (k Keeper) DelegationRewards(c context.Context, req *types.QueryDelegationRewardsRequest) (*types.QueryDelegationRewardsResponse, error)
- func (k Keeper) DelegationTotalRewards(c context.Context, req *types.QueryDelegationTotalRewardsRequest) (*types.QueryDelegationTotalRewardsResponse, error)
- func (k Keeper) DelegatorValidators(c context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error)
- func (k Keeper) DelegatorWithdrawAddress(c context.Context, req *types.QueryDelegatorWithdrawAddressRequest) (*types.QueryDelegatorWithdrawAddressResponse, error)
- func (k Keeper) DeleteAllValidatorHistoricalRewards(ctx sdk.Context)
- func (k Keeper) DeleteAllValidatorSlashEvents(ctx sdk.Context)
- func (k Keeper) DeleteDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress)
- func (k Keeper) DeleteDelegatorWithdrawAddr(ctx sdk.Context, delAddr, withdrawAddr sdk.AccAddress)
- func (k Keeper) DeleteValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress)
- func (k Keeper) DeleteValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress)
- func (k Keeper) DeleteValidatorHistoricalReward(ctx sdk.Context, val sdk.ValAddress, period uint64)
- func (k Keeper) DeleteValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress)
- func (k Keeper) DeleteValidatorOutstandingRewards(ctx sdk.Context, val sdk.ValAddress)
- func (k Keeper) DeleteValidatorSlashEvents(ctx sdk.Context, val sdk.ValAddress)
- func (k Keeper) DistributeFromFeePool(ctx sdk.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
- func (k Keeper) GetBaseProposerReward(ctx sdk.Context) (percent sdk.Dec)
- func (k Keeper) GetBonusProposerReward(ctx sdk.Context) (percent sdk.Dec)
- func (k Keeper) GetCommunityTax(ctx sdk.Context) (percent sdk.Dec)
- func (k Keeper) GetDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) (period types.DelegatorStartingInfo)
- func (k Keeper) GetDelegatorWithdrawAddr(ctx sdk.Context, delAddr sdk.AccAddress) sdk.AccAddress
- func (k Keeper) GetDistributionAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetFeePool(ctx sdk.Context) (feePool types.FeePool)
- func (k Keeper) GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins
- func (k Keeper) GetParams(clientCtx sdk.Context) (params types.Params)
- func (k Keeper) GetPreviousProposerConsAddr(ctx sdk.Context) sdk.ConsAddress
- func (k Keeper) GetTotalRewards(ctx sdk.Context) (totalRewards sdk.DecCoins)
- func (k Keeper) GetValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress) (commission types.ValidatorAccumulatedCommission)
- func (k Keeper) GetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress) (rewards types.ValidatorCurrentRewards)
- func (k Keeper) GetValidatorHistoricalReferenceCount(ctx sdk.Context) (count uint64)
- func (k Keeper) GetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64) (rewards types.ValidatorHistoricalRewards)
- func (k Keeper) GetValidatorOutstandingRewards(ctx sdk.Context, val sdk.ValAddress) (rewards types.ValidatorOutstandingRewards)
- func (k Keeper) GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins
- func (k Keeper) GetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height, period uint64) (event types.ValidatorSlashEvent, found bool)
- func (k Keeper) GetWithdrawAddrEnabled(ctx sdk.Context) (enabled bool)
- func (k Keeper) HasDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IncrementValidatorPeriod(ctx sdk.Context, val stakingtypes.ValidatorI) uint64
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IterateDelegatorStartingInfos(ctx sdk.Context, ...)
- func (k Keeper) IterateDelegatorWithdrawAddrs(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorAccumulatedCommissions(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorCurrentRewards(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorHistoricalRewards(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorOutstandingRewards(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorSlashEvents(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorSlashEventsBetween(ctx sdk.Context, val sdk.ValAddress, startingHeight uint64, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress, ...)
- func (k Keeper) SetDelegatorWithdrawAddr(ctx sdk.Context, delAddr, withdrawAddr sdk.AccAddress)
- func (k Keeper) SetFeePool(ctx sdk.Context, feePool types.FeePool)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPreviousProposerConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress)
- func (k Keeper) SetValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress, ...)
- func (k Keeper) SetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress, rewards types.ValidatorCurrentRewards)
- func (k Keeper) SetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64, ...)
- func (k Keeper) SetValidatorOutstandingRewards(ctx sdk.Context, val sdk.ValAddress, rewards types.ValidatorOutstandingRewards)
- func (k Keeper) SetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height, period uint64, ...)
- func (k Keeper) SetWithdrawAddr(ctx sdk.Context, delegatorAddr sdk.AccAddress, withdrawAddr sdk.AccAddress) error
- func (k Keeper) ValidatorCommission(c context.Context, req *types.QueryValidatorCommissionRequest) (*types.QueryValidatorCommissionResponse, error)
- func (k Keeper) ValidatorOutstandingRewards(c context.Context, req *types.QueryValidatorOutstandingRewardsRequest) (*types.QueryValidatorOutstandingRewardsResponse, error)
- func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSlashesRequest) (*types.QueryValidatorSlashesResponse, error)
- func (k Keeper) WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error)
- func (k Keeper) WithdrawValidatorCommission(ctx sdk.Context, valAddr sdk.ValAddress) (sdk.Coins, error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶ added in v0.46.1
AllInvariants runs all invariants of the distribution module
func CanWithdrawInvariant ¶ added in v0.46.1
CanWithdrawInvariant checks that current rewards can be completely withdrawn
func HandleCommunityPoolSpendProposal ¶ added in v0.46.1
func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p *types.CommunityPoolSpendProposal) error
HandleCommunityPoolSpendProposal is a handler for executing a passed community spend proposal
func ModuleAccountInvariant ¶ added in v0.46.1
ModuleAccountInvariant checks that the coins held by the distr ModuleAccount is consistent with the sum of validator outstanding rewards
func NewMsgServerImpl ¶ added in v0.46.1
NewMsgServerImpl returns an implementation of the distribution MsgServer interface for the provided Keeper.
func NewQuerier ¶ added in v0.30.0
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
func NonNegativeOutstandingInvariant ¶ added in v0.46.1
NonNegativeOutstandingInvariant checks that outstanding unwithdrawn fees are never negative
func ReferenceCountInvariant ¶ added in v0.46.1
ReferenceCountInvariant checks that the number of historical rewards records is correct
func RegisterInvariants ¶ added in v0.46.1
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
register all distribution invariants
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
func (Hooks) AfterDelegationModified ¶ added in v0.30.0
func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
create new delegation period record
func (Hooks) AfterValidatorBeginUnbonding ¶ added in v0.30.0
func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (Hooks) AfterValidatorBonded ¶ added in v0.30.0
func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
func (Hooks) AfterValidatorCreated ¶ added in v0.30.0
initialize validator distribution record
func (Hooks) AfterValidatorRemoved ¶ added in v0.30.0
func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorRemoved performs clean up after a validator is removed
func (Hooks) BeforeDelegationCreated ¶ added in v0.30.0
func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
increment period
func (Hooks) BeforeDelegationRemoved ¶ added in v0.30.0
func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
func (Hooks) BeforeDelegationSharesModified ¶ added in v0.30.0
func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
withdraw delegation rewards (which also increments period)
func (Hooks) BeforeValidatorModified ¶ added in v0.30.0
func (Hooks) BeforeValidatorSlashed ¶ added in v0.30.0
func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
record the slash event
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the distribution store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, feeCollectorName string, ) Keeper
NewKeeper creates a new distribution Keeper instance
func (Keeper) AllocateTokens ¶
func (k Keeper) AllocateTokens( ctx sdk.Context, sumPreviousPrecommitPower, totalPreviousPower int64, previousProposer sdk.ConsAddress, bondedVotes []abci.VoteInfo, )
AllocateTokens handles distribution of the collected fees bondedVotes is a list of (validator address, validator voted on last block flag) for all validators in the bonded set.
func (Keeper) AllocateTokensToValidator ¶ added in v0.30.0
func (k Keeper) AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins)
AllocateTokensToValidator allocate tokens to a particular validator, splitting according to commission
func (Keeper) CalculateDelegationRewards ¶ added in v0.46.1
func (k Keeper) CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins)
calculate the total rewards accrued by a delegation
func (Keeper) CommunityPool ¶ added in v0.46.1
func (k Keeper) CommunityPool(c context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error)
CommunityPool queries the community pool coins
func (Keeper) DelegationRewards ¶ added in v0.46.1
func (k Keeper) DelegationRewards(c context.Context, req *types.QueryDelegationRewardsRequest) (*types.QueryDelegationRewardsResponse, error)
DelegationRewards the total rewards accrued by a delegation
func (Keeper) DelegationTotalRewards ¶ added in v0.46.1
func (k Keeper) DelegationTotalRewards(c context.Context, req *types.QueryDelegationTotalRewardsRequest) (*types.QueryDelegationTotalRewardsResponse, error)
DelegationTotalRewards the total rewards accrued by a each validator
func (Keeper) DelegatorValidators ¶ added in v0.46.1
func (k Keeper) DelegatorValidators(c context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error)
DelegatorValidators queries the validators list of a delegator
func (Keeper) DelegatorWithdrawAddress ¶ added in v0.46.1
func (k Keeper) DelegatorWithdrawAddress(c context.Context, req *types.QueryDelegatorWithdrawAddressRequest) (*types.QueryDelegatorWithdrawAddressResponse, error)
DelegatorWithdrawAddress queries Query/delegatorWithdrawAddress
func (Keeper) DeleteAllValidatorHistoricalRewards ¶ added in v0.30.0
delete all historical rewards
func (Keeper) DeleteAllValidatorSlashEvents ¶ added in v0.30.0
delete all slash events
func (Keeper) DeleteDelegatorStartingInfo ¶ added in v0.30.0
func (k Keeper) DeleteDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress)
delete the starting info associated with a delegator
func (Keeper) DeleteDelegatorWithdrawAddr ¶ added in v0.30.0
func (k Keeper) DeleteDelegatorWithdrawAddr(ctx sdk.Context, delAddr, withdrawAddr sdk.AccAddress)
delete a delegator withdraw addr
func (Keeper) DeleteValidatorAccumulatedCommission ¶ added in v0.30.0
func (k Keeper) DeleteValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress)
delete accumulated commission for a validator
func (Keeper) DeleteValidatorCurrentRewards ¶ added in v0.30.0
func (k Keeper) DeleteValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress)
delete current rewards for a validator
func (Keeper) DeleteValidatorHistoricalReward ¶ added in v0.30.0
delete a historical reward
func (Keeper) DeleteValidatorHistoricalRewards ¶ added in v0.30.0
func (k Keeper) DeleteValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress)
delete historical rewards for a validator
func (Keeper) DeleteValidatorOutstandingRewards ¶ added in v0.33.0
func (k Keeper) DeleteValidatorOutstandingRewards(ctx sdk.Context, val sdk.ValAddress)
delete validator outstanding rewards
func (Keeper) DeleteValidatorSlashEvents ¶ added in v0.30.0
func (k Keeper) DeleteValidatorSlashEvents(ctx sdk.Context, val sdk.ValAddress)
delete slash events for a particular validator
func (Keeper) DistributeFromFeePool ¶ added in v0.46.1
func (k Keeper) DistributeFromFeePool(ctx sdk.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error
DistributeFromFeePool distributes funds from the distribution module account to a receiver address while updating the community pool
func (Keeper) ExportGenesis ¶ added in v0.46.1
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (Keeper) FundCommunityPool ¶ added in v0.46.1
FundCommunityPool allows an account to directly fund the community fund pool. The amount is first added to the distribution module account and then directly added to the pool. An error is returned if the amount cannot be sent to the module account.
func (Keeper) GetBaseProposerReward ¶
GetBaseProposerReward returns the current distribution base proposer rate.
func (Keeper) GetBonusProposerReward ¶
GetBonusProposerReward returns the current distribution bonus proposer reward rate.
func (Keeper) GetCommunityTax ¶
GetCommunityTax returns the current distribution community tax.
func (Keeper) GetDelegatorStartingInfo ¶ added in v0.30.0
func (k Keeper) GetDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) (period types.DelegatorStartingInfo)
get the starting info associated with a delegator
func (Keeper) GetDelegatorWithdrawAddr ¶
func (k Keeper) GetDelegatorWithdrawAddr(ctx sdk.Context, delAddr sdk.AccAddress) sdk.AccAddress
get the delegator withdraw address, defaulting to the delegator address
func (Keeper) GetDistributionAccount ¶ added in v0.46.1
func (k Keeper) GetDistributionAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetDistributionAccount returns the distribution ModuleAccount
func (Keeper) GetFeePool ¶
get the global fee pool distribution info
func (Keeper) GetFeePoolCommunityCoins ¶ added in v0.32.0
get the community coins
func (Keeper) GetParams ¶ added in v0.46.1
GetParams returns the total set of distribution parameters.
func (Keeper) GetPreviousProposerConsAddr ¶
func (k Keeper) GetPreviousProposerConsAddr(ctx sdk.Context) sdk.ConsAddress
GetPreviousProposerConsAddr returns the proposer consensus address for the current block.
func (Keeper) GetTotalRewards ¶ added in v0.46.1
GetTotalRewards returns the total amount of fee distribution rewards held in the store
func (Keeper) GetValidatorAccumulatedCommission ¶ added in v0.30.0
func (k Keeper) GetValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress) (commission types.ValidatorAccumulatedCommission)
get accumulated commission for a validator
func (Keeper) GetValidatorCurrentRewards ¶ added in v0.30.0
func (k Keeper) GetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress) (rewards types.ValidatorCurrentRewards)
get current rewards for a validator
func (Keeper) GetValidatorHistoricalReferenceCount ¶ added in v0.30.0
historical reference count (used for testcases)
func (Keeper) GetValidatorHistoricalRewards ¶ added in v0.30.0
func (k Keeper) GetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64) (rewards types.ValidatorHistoricalRewards)
get historical rewards for a particular period
func (Keeper) GetValidatorOutstandingRewards ¶ added in v0.33.0
func (k Keeper) GetValidatorOutstandingRewards(ctx sdk.Context, val sdk.ValAddress) (rewards types.ValidatorOutstandingRewards)
get validator outstanding rewards
func (Keeper) GetValidatorOutstandingRewardsCoins ¶ added in v0.33.0
func (k Keeper) GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins
get outstanding rewards
func (Keeper) GetValidatorSlashEvent ¶ added in v0.30.0
func (k Keeper) GetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height, period uint64) (event types.ValidatorSlashEvent, found bool)
get slash event for height
func (Keeper) GetWithdrawAddrEnabled ¶ added in v0.30.0
GetWithdrawAddrEnabled returns the current distribution withdraw address enabled parameter.
func (Keeper) HasDelegatorStartingInfo ¶ added in v0.30.0
func (k Keeper) HasDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) bool
check existence of the starting info associated with a delegator
func (Keeper) IncrementValidatorPeriod ¶ added in v0.46.1
func (k Keeper) IncrementValidatorPeriod(ctx sdk.Context, val stakingtypes.ValidatorI) uint64
increment validator period, returning the period just ended
func (Keeper) InitGenesis ¶ added in v0.46.1
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis sets distribution information for genesis
func (Keeper) IterateDelegatorStartingInfos ¶ added in v0.30.0
func (k Keeper) IterateDelegatorStartingInfos(ctx sdk.Context, handler func(val sdk.ValAddress, del sdk.AccAddress, info types.DelegatorStartingInfo) (stop bool))
iterate over delegator starting infos
func (Keeper) IterateDelegatorWithdrawAddrs ¶ added in v0.30.0
func (k Keeper) IterateDelegatorWithdrawAddrs(ctx sdk.Context, handler func(del sdk.AccAddress, addr sdk.AccAddress) (stop bool))
iterate over delegator withdraw addrs
func (Keeper) IterateValidatorAccumulatedCommissions ¶ added in v0.30.0
func (k Keeper) IterateValidatorAccumulatedCommissions(ctx sdk.Context, handler func(val sdk.ValAddress, commission types.ValidatorAccumulatedCommission) (stop bool))
iterate over accumulated commissions
func (Keeper) IterateValidatorCurrentRewards ¶ added in v0.30.0
func (k Keeper) IterateValidatorCurrentRewards(ctx sdk.Context, handler func(val sdk.ValAddress, rewards types.ValidatorCurrentRewards) (stop bool))
iterate over current rewards
func (Keeper) IterateValidatorHistoricalRewards ¶ added in v0.30.0
func (k Keeper) IterateValidatorHistoricalRewards(ctx sdk.Context, handler func(val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards) (stop bool))
iterate over historical rewards
func (Keeper) IterateValidatorOutstandingRewards ¶ added in v0.33.0
func (k Keeper) IterateValidatorOutstandingRewards(ctx sdk.Context, handler func(val sdk.ValAddress, rewards types.ValidatorOutstandingRewards) (stop bool))
iterate validator outstanding rewards
func (Keeper) IterateValidatorSlashEvents ¶ added in v0.30.0
func (k Keeper) IterateValidatorSlashEvents(ctx sdk.Context, handler func(val sdk.ValAddress, height uint64, event types.ValidatorSlashEvent) (stop bool))
iterate over all slash events
func (Keeper) IterateValidatorSlashEventsBetween ¶ added in v0.30.0
func (k Keeper) IterateValidatorSlashEventsBetween(ctx sdk.Context, val sdk.ValAddress, startingHeight uint64, endingHeight uint64, handler func(height uint64, event types.ValidatorSlashEvent) (stop bool))
iterate over slash events between heights, inclusive
func (Keeper) Params ¶ added in v0.46.1
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of distribution module
func (Keeper) SetDelegatorStartingInfo ¶ added in v0.30.0
func (k Keeper) SetDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress, period types.DelegatorStartingInfo)
set the starting info associated with a delegator
func (Keeper) SetDelegatorWithdrawAddr ¶
func (k Keeper) SetDelegatorWithdrawAddr(ctx sdk.Context, delAddr, withdrawAddr sdk.AccAddress)
set the delegator withdraw address
func (Keeper) SetFeePool ¶
set the global fee pool distribution info
func (Keeper) SetParams ¶ added in v0.46.1
SetParams sets the distribution parameters to the param space.
func (Keeper) SetPreviousProposerConsAddr ¶
func (k Keeper) SetPreviousProposerConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress)
set the proposer public key for this block
func (Keeper) SetValidatorAccumulatedCommission ¶ added in v0.30.0
func (k Keeper) SetValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress, commission types.ValidatorAccumulatedCommission)
set accumulated commission for a validator
func (Keeper) SetValidatorCurrentRewards ¶ added in v0.30.0
func (k Keeper) SetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress, rewards types.ValidatorCurrentRewards)
set current rewards for a validator
func (Keeper) SetValidatorHistoricalRewards ¶ added in v0.30.0
func (k Keeper) SetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards)
set historical rewards for a particular period
func (Keeper) SetValidatorOutstandingRewards ¶ added in v0.33.0
func (k Keeper) SetValidatorOutstandingRewards(ctx sdk.Context, val sdk.ValAddress, rewards types.ValidatorOutstandingRewards)
set validator outstanding rewards
func (Keeper) SetValidatorSlashEvent ¶ added in v0.30.0
func (k Keeper) SetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height, period uint64, event types.ValidatorSlashEvent)
set slash event for height
func (Keeper) SetWithdrawAddr ¶ added in v0.30.0
func (k Keeper) SetWithdrawAddr(ctx sdk.Context, delegatorAddr sdk.AccAddress, withdrawAddr sdk.AccAddress) error
SetWithdrawAddr sets a new address that will receive the rewards upon withdrawal
func (Keeper) ValidatorCommission ¶ added in v0.46.1
func (k Keeper) ValidatorCommission(c context.Context, req *types.QueryValidatorCommissionRequest) (*types.QueryValidatorCommissionResponse, error)
ValidatorCommission queries accumulated commission for a validator
func (Keeper) ValidatorOutstandingRewards ¶ added in v0.46.1
func (k Keeper) ValidatorOutstandingRewards(c context.Context, req *types.QueryValidatorOutstandingRewardsRequest) (*types.QueryValidatorOutstandingRewardsResponse, error)
ValidatorOutstandingRewards queries rewards of a validator address
func (Keeper) ValidatorSlashes ¶ added in v0.46.1
func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSlashesRequest) (*types.QueryValidatorSlashesResponse, error)
ValidatorSlashes queries slash events of a validator
func (Keeper) WithdrawDelegationRewards ¶ added in v0.30.0
func (k Keeper) WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error)
withdraw rewards from a delegation
func (Keeper) WithdrawValidatorCommission ¶ added in v0.30.0
func (k Keeper) WithdrawValidatorCommission(ctx sdk.Context, valAddr sdk.ValAddress) (sdk.Coins, error)
withdraw validator commission
type Migrator ¶ added in v0.46.1
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶ added in v0.46.1
NewMigrator returns a new Migrator.