Documentation ¶
Index ¶
- Constants
- Variables
- func CreateTestInputAdvanced(t *testing.T, isCheckTx bool, initCoins int64, communityTax sdk.Dec) (sdk.Context, auth.AccountKeeper, Keeper, staking.Keeper, ...)
- func CreateTestInputDefault(t *testing.T, isCheckTx bool, initCoins int64) (sdk.Context, auth.AccountKeeper, Keeper, staking.Keeper, ...)
- func GetDelegatorStartingInfoAddresses(key []byte) (valAddr sdk.ValAddress, delAddr sdk.AccAddress)
- func GetDelegatorStartingInfoKey(v sdk.ValAddress, d sdk.AccAddress) []byte
- func GetDelegatorWithdrawAddrKey(delAddr sdk.AccAddress) []byte
- func GetDelegatorWithdrawInfoAddress(key []byte) (delAddr sdk.AccAddress)
- func GetValidatorAccumulatedCommissionAddress(key []byte) (valAddr sdk.ValAddress)
- func GetValidatorAccumulatedCommissionKey(v sdk.ValAddress) []byte
- func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress)
- func GetValidatorCurrentRewardsKey(v sdk.ValAddress) []byte
- func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddress, period uint64)
- func GetValidatorHistoricalRewardsKey(v sdk.ValAddress, k uint64) []byte
- func GetValidatorHistoricalRewardsPrefix(v sdk.ValAddress) []byte
- func GetValidatorSlashEventAddressHeight(key []byte) (valAddr sdk.ValAddress, height uint64)
- func GetValidatorSlashEventKey(v sdk.ValAddress, height uint64) []byte
- func GetValidatorSlashEventPrefix(v sdk.ValAddress) []byte
- func MakeTestCodec() *codec.Codec
- func NewQuerier(k Keeper) sdk.Querier
- func ParamTypeTable() params.TypeTable
- type DummyFeeCollectionKeeper
- type Hooks
- func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorBonded(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorPowerDidChange(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec)
- type Keeper
- func (k Keeper) AllocateTokens(ctx sdk.Context, sumPrecommitPower, totalPower int64, proposer sdk.ConsAddress, ...)
- func (k Keeper) AllocateTokensToValidator(ctx sdk.Context, val sdk.Validator, tokens sdk.DecCoins)
- 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) DeleteValidatorSlashEvents(ctx sdk.Context, val sdk.ValAddress)
- func (k Keeper) GetBaseProposerReward(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetBonusProposerReward(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetCommunityTax(ctx sdk.Context) 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) GetFeePool(ctx sdk.Context) (feePool types.FeePool)
- func (k Keeper) GetOutstandingRewards(ctx sdk.Context) (rewards types.OutstandingRewards)
- func (k Keeper) GetPreviousProposerConsAddr(ctx sdk.Context) (consAddr sdk.ConsAddress)
- 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) GetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height uint64) (event types.ValidatorSlashEvent, found bool)
- func (k Keeper) GetWithdrawAddrEnabled(ctx sdk.Context) bool
- func (k Keeper) HasDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) bool
- func (k Keeper) Hooks() Hooks
- 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) IterateValidatorSlashEvents(ctx sdk.Context, ...)
- func (k Keeper) IterateValidatorSlashEventsBetween(ctx sdk.Context, val sdk.ValAddress, startingHeight uint64, ...)
- func (k Keeper) SetBaseProposerReward(ctx sdk.Context, percent sdk.Dec)
- func (k Keeper) SetBonusProposerReward(ctx sdk.Context, percent sdk.Dec)
- func (k Keeper) SetCommunityTax(ctx sdk.Context, percent sdk.Dec)
- 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) SetOutstandingRewards(ctx sdk.Context, rewards types.OutstandingRewards)
- 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) SetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height uint64, ...)
- func (k Keeper) SetWithdrawAddr(ctx sdk.Context, delegatorAddr sdk.AccAddress, withdrawAddr sdk.AccAddress) sdk.Error
- func (k Keeper) SetWithdrawAddrEnabled(ctx sdk.Context, enabled bool)
- func (k Keeper) WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) sdk.Error
- func (k Keeper) WithdrawValidatorCommission(ctx sdk.Context, valAddr sdk.ValAddress) sdk.Error
- type QueryDelegationRewardsParams
- type QueryValidatorCommissionParams
- type QueryValidatorSlashesParams
Constants ¶
const ( QueryParams = "params" QueryOutstandingRewards = "outstanding_rewards" QueryValidatorCommission = "validator_commission" QueryValidatorSlashes = "validator_slashes" QueryDelegationRewards = "delegation_rewards" ParamCommunityTax = "community_tax" ParamBaseProposerReward = "base_proposer_reward" ParamBonusProposerReward = "bonus_proposer_reward" ParamWithdrawAddrEnabled = "withdraw_addr_enabled" )
nolint
const (
// default paramspace for params keeper
DefaultParamspace = "distr"
)
Variables ¶
var ( FeePoolKey = []byte{0x00} // key for global distribution state ProposerKey = []byte{0x01} // key for the proposer operator address OutstandingRewardsKey = []byte{0x02} // key for outstanding rewards DelegatorWithdrawAddrPrefix = []byte{0x03} // key for delegator withdraw address DelegatorStartingInfoPrefix = []byte{0x04} // key for delegator starting info ValidatorHistoricalRewardsPrefix = []byte{0x05} // key for historical validators rewards / stake ValidatorCurrentRewardsPrefix = []byte{0x06} // key for current validator rewards ValidatorAccumulatedCommissionPrefix = []byte{0x07} // key for accumulated validator commission ValidatorSlashEventPrefix = []byte{0x08} // key for validator slash fraction ParamStoreKeyCommunityTax = []byte("communitytax") ParamStoreKeyBaseProposerReward = []byte("baseproposerreward") ParamStoreKeyBonusProposerReward = []byte("bonusproposerreward") ParamStoreKeyWithdrawAddrEnabled = []byte("withdrawaddrenabled") )
keys
Functions ¶
func CreateTestInputAdvanced ¶
func CreateTestInputAdvanced(t *testing.T, isCheckTx bool, initCoins int64, communityTax sdk.Dec) ( sdk.Context, auth.AccountKeeper, Keeper, staking.Keeper, DummyFeeCollectionKeeper)
hogpodge of all sorts of input required for testing
func CreateTestInputDefault ¶
func CreateTestInputDefault(t *testing.T, isCheckTx bool, initCoins int64) ( sdk.Context, auth.AccountKeeper, Keeper, staking.Keeper, DummyFeeCollectionKeeper)
test input with default values
func GetDelegatorStartingInfoAddresses ¶ added in v0.30.0
func GetDelegatorStartingInfoAddresses(key []byte) (valAddr sdk.ValAddress, delAddr sdk.AccAddress)
gets the addresses from a delegator starting info key
func GetDelegatorStartingInfoKey ¶ added in v0.30.0
func GetDelegatorStartingInfoKey(v sdk.ValAddress, d sdk.AccAddress) []byte
gets the key for a delegator's starting info
func GetDelegatorWithdrawAddrKey ¶ added in v0.25.0
func GetDelegatorWithdrawAddrKey(delAddr sdk.AccAddress) []byte
gets the key for a delegator's withdraw addr
func GetDelegatorWithdrawInfoAddress ¶ added in v0.26.0
func GetDelegatorWithdrawInfoAddress(key []byte) (delAddr sdk.AccAddress)
gets an address from a delegator's withdraw info key
func GetValidatorAccumulatedCommissionAddress ¶ added in v0.30.0
func GetValidatorAccumulatedCommissionAddress(key []byte) (valAddr sdk.ValAddress)
gets the address from a validator's accumulated commission key
func GetValidatorAccumulatedCommissionKey ¶ added in v0.30.0
func GetValidatorAccumulatedCommissionKey(v sdk.ValAddress) []byte
gets the key for a validator's current commission
func GetValidatorCurrentRewardsAddress ¶ added in v0.30.0
func GetValidatorCurrentRewardsAddress(key []byte) (valAddr sdk.ValAddress)
gets the address from a validator's current rewards key
func GetValidatorCurrentRewardsKey ¶ added in v0.30.0
func GetValidatorCurrentRewardsKey(v sdk.ValAddress) []byte
gets the key for a validator's current rewards
func GetValidatorHistoricalRewardsAddressPeriod ¶ added in v0.30.0
func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr sdk.ValAddress, period uint64)
gets the address & period from a validator's historical rewards key
func GetValidatorHistoricalRewardsKey ¶ added in v0.30.0
func GetValidatorHistoricalRewardsKey(v sdk.ValAddress, k uint64) []byte
gets the key for a validator's historical rewards
func GetValidatorHistoricalRewardsPrefix ¶ added in v0.30.0
func GetValidatorHistoricalRewardsPrefix(v sdk.ValAddress) []byte
gets the prefix key for a validator's historical rewards
func GetValidatorSlashEventAddressHeight ¶ added in v0.30.0
func GetValidatorSlashEventAddressHeight(key []byte) (valAddr sdk.ValAddress, height uint64)
gets the height from a validator's slash event key
func GetValidatorSlashEventKey ¶ added in v0.30.0
func GetValidatorSlashEventKey(v sdk.ValAddress, height uint64) []byte
gets the key for a validator's slash fraction
func GetValidatorSlashEventPrefix ¶ added in v0.30.0
func GetValidatorSlashEventPrefix(v sdk.ValAddress) []byte
gets the prefix key for a validator's slash fractions
func NewQuerier ¶
func ParamTypeTable ¶ added in v0.25.0
type declaration for parameters
Types ¶
type DummyFeeCollectionKeeper ¶ added in v0.25.0
type DummyFeeCollectionKeeper struct{}
__________________________________________________________________________________ fee collection keeper used only for testing
func (DummyFeeCollectionKeeper) ClearCollectedFees ¶ added in v0.25.0
func (fck DummyFeeCollectionKeeper) ClearCollectedFees(_ sdk.Context)
func (DummyFeeCollectionKeeper) GetCollectedFees ¶ added in v0.25.0
func (fck DummyFeeCollectionKeeper) GetCollectedFees(_ sdk.Context) sdk.Coins
nolint
func (DummyFeeCollectionKeeper) SetCollectedFees ¶ added in v0.25.0
func (fck DummyFeeCollectionKeeper) SetCollectedFees(in sdk.Coins)
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
func (Hooks) AfterDelegationModified ¶
func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorBeginUnbonding ¶
func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorBonded ¶
func (h Hooks) AfterValidatorBonded(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorCreated ¶
func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
nolint
func (Hooks) AfterValidatorPowerDidChange ¶ added in v0.30.0
func (h Hooks) AfterValidatorPowerDidChange(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorRemoved ¶
func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeDelegationCreated ¶
func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeDelegationRemoved ¶
func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeDelegationSharesModified ¶
func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeValidatorModified ¶
func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)
func (Hooks) BeforeValidatorSlashed ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
keeper of the staking store
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace, ck types.BankKeeper, sk types.StakingKeeper, fck types.FeeCollectionKeeper, codespace sdk.CodespaceType) Keeper
create a new keeper
func (Keeper) AllocateTokens ¶
func (k Keeper) AllocateTokens(ctx sdk.Context, sumPrecommitPower, totalPower int64, proposer sdk.ConsAddress, votes []abci.VoteInfo)
allocate fees handles distribution of the collected fees
func (Keeper) AllocateTokensToValidator ¶
allocate tokens to a particular validator, splitting according to commission
func (Keeper) DeleteAllValidatorHistoricalRewards ¶
delete all historical rewards
func (Keeper) DeleteAllValidatorSlashEvents ¶
delete all slash events
func (Keeper) DeleteDelegatorStartingInfo ¶
func (k Keeper) DeleteDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress)
delete the starting info associated with a delegator
func (Keeper) DeleteDelegatorWithdrawAddr ¶
func (k Keeper) DeleteDelegatorWithdrawAddr(ctx sdk.Context, delAddr, withdrawAddr sdk.AccAddress)
delete a delegator withdraw addr
func (Keeper) DeleteValidatorAccumulatedCommission ¶
func (k Keeper) DeleteValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress)
delete accumulated commission for a validator
func (Keeper) DeleteValidatorCurrentRewards ¶
func (k Keeper) DeleteValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress)
delete current rewards for a validator
func (Keeper) DeleteValidatorHistoricalReward ¶
delete a historical reward
func (Keeper) DeleteValidatorHistoricalRewards ¶
func (k Keeper) DeleteValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress)
delete historical rewards for a validator
func (Keeper) DeleteValidatorSlashEvents ¶
func (k Keeper) DeleteValidatorSlashEvents(ctx sdk.Context, val sdk.ValAddress)
delete slash events for a particular validator
func (Keeper) GetBaseProposerReward ¶
returns the current BaseProposerReward rate from the global param store nolint: errcheck
func (Keeper) GetBonusProposerReward ¶
returns the current BaseProposerReward rate from the global param store nolint: errcheck
func (Keeper) GetCommunityTax ¶
returns the current CommunityTax rate from the global param store nolint: errcheck
func (Keeper) GetDelegatorStartingInfo ¶
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) GetFeePool ¶
get the global fee pool distribution info
func (Keeper) GetOutstandingRewards ¶ added in v0.30.0
func (k Keeper) GetOutstandingRewards(ctx sdk.Context) (rewards types.OutstandingRewards)
get outstanding rewards
func (Keeper) GetPreviousProposerConsAddr ¶
func (k Keeper) GetPreviousProposerConsAddr(ctx sdk.Context) (consAddr sdk.ConsAddress)
get the proposer public key for this block
func (Keeper) GetValidatorAccumulatedCommission ¶
func (k Keeper) GetValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress) (commission types.ValidatorAccumulatedCommission)
get accumulated commission for a validator
func (Keeper) GetValidatorCurrentRewards ¶
func (k Keeper) GetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress) (rewards types.ValidatorCurrentRewards)
get current rewards for a validator
func (Keeper) GetValidatorHistoricalReferenceCount ¶
historical reference count (used for testcases)
func (Keeper) GetValidatorHistoricalRewards ¶
func (k Keeper) GetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64) (rewards types.ValidatorHistoricalRewards)
get historical rewards for a particular period
func (Keeper) GetValidatorSlashEvent ¶
func (k Keeper) GetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height uint64) (event types.ValidatorSlashEvent, found bool)
get slash event for height
func (Keeper) GetWithdrawAddrEnabled ¶
returns the current WithdrawAddrEnabled nolint: errcheck
func (Keeper) HasDelegatorStartingInfo ¶
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) IterateDelegatorStartingInfos ¶
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 ¶
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 ¶
func (k Keeper) IterateValidatorAccumulatedCommissions(ctx sdk.Context, handler func(val sdk.ValAddress, commission types.ValidatorAccumulatedCommission) (stop bool))
iterate over accumulated commissions
func (Keeper) IterateValidatorCurrentRewards ¶
func (k Keeper) IterateValidatorCurrentRewards(ctx sdk.Context, handler func(val sdk.ValAddress, rewards types.ValidatorCurrentRewards) (stop bool))
iterate over current rewards
func (Keeper) IterateValidatorHistoricalRewards ¶
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) IterateValidatorSlashEvents ¶
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 ¶
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) SetBaseProposerReward ¶ added in v0.25.0
nolint: errcheck
func (Keeper) SetBonusProposerReward ¶ added in v0.25.0
nolint: errcheck
func (Keeper) SetCommunityTax ¶ added in v0.25.0
nolint: errcheck
func (Keeper) SetDelegatorStartingInfo ¶
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) SetOutstandingRewards ¶ added in v0.30.0
func (k Keeper) SetOutstandingRewards(ctx sdk.Context, rewards types.OutstandingRewards)
set outstanding rewards
func (Keeper) SetPreviousProposerConsAddr ¶
func (k Keeper) SetPreviousProposerConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress)
set the proposer public key for this block
func (Keeper) SetValidatorAccumulatedCommission ¶
func (k Keeper) SetValidatorAccumulatedCommission(ctx sdk.Context, val sdk.ValAddress, commission types.ValidatorAccumulatedCommission)
set accumulated commission for a validator
func (Keeper) SetValidatorCurrentRewards ¶
func (k Keeper) SetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress, rewards types.ValidatorCurrentRewards)
set current rewards for a validator
func (Keeper) SetValidatorHistoricalRewards ¶
func (k Keeper) SetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64, rewards types.ValidatorHistoricalRewards)
set historical rewards for a particular period
func (Keeper) SetValidatorSlashEvent ¶
func (k Keeper) SetValidatorSlashEvent(ctx sdk.Context, val sdk.ValAddress, height uint64, event types.ValidatorSlashEvent)
set slash event for height
func (Keeper) SetWithdrawAddr ¶
func (k Keeper) SetWithdrawAddr(ctx sdk.Context, delegatorAddr sdk.AccAddress, withdrawAddr sdk.AccAddress) sdk.Error
set withdraw address
func (Keeper) SetWithdrawAddrEnabled ¶ added in v0.30.0
nolint: errcheck
func (Keeper) WithdrawDelegationRewards ¶
func (k Keeper) WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) sdk.Error
withdraw rewards from a delegation
func (Keeper) WithdrawValidatorCommission ¶
withdraw validator commission
type QueryDelegationRewardsParams ¶ added in v0.30.0
type QueryDelegationRewardsParams struct { DelegatorAddr sdk.AccAddress `json:"delegator_addr"` ValidatorAddr sdk.ValAddress `json:"validator_addr"` }
params for query 'custom/distr/delegation_rewards'
func NewQueryDelegationRewardsParams ¶ added in v0.30.0
func NewQueryDelegationRewardsParams(delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) QueryDelegationRewardsParams
creates a new instance of QueryDelegationRewardsParams
type QueryValidatorCommissionParams ¶ added in v0.30.0
type QueryValidatorCommissionParams struct {
ValidatorAddr sdk.ValAddress `json:"validator_addr"`
}
params for query 'custom/distr/validator_commission'
func NewQueryValidatorCommissionParams ¶ added in v0.30.0
func NewQueryValidatorCommissionParams(validatorAddr sdk.ValAddress) QueryValidatorCommissionParams
creates a new instance of QueryValidatorCommissionParams
type QueryValidatorSlashesParams ¶ added in v0.30.0
type QueryValidatorSlashesParams struct { ValidatorAddr sdk.ValAddress `json:"validator_addr"` StartingHeight uint64 `json:"starting_height"` EndingHeight uint64 `json:"ending_height"` }
params for query 'custom/distr/validator_slashes'
func NewQueryValidatorSlashesParams ¶ added in v0.30.0
func NewQueryValidatorSlashesParams(validatorAddr sdk.ValAddress, startingHeight uint64, endingHeight uint64) QueryValidatorSlashesParams
creates a new instance of QueryValidatorSlashesParams