Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type CommitmentHooks
- func (h CommitmentHooks) BeforeEdenBCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
- func (h CommitmentHooks) BeforeEdenBInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
- func (h CommitmentHooks) BeforeEdenCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
- func (h CommitmentHooks) BeforeEdenInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
- func (h CommitmentHooks) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error
- func (h CommitmentHooks) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error
- type Keeper
- func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BeforeEdenBCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
- func (k Keeper) BeforeEdenBInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
- func (k Keeper) BeforeEdenCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
- func (k Keeper) BeforeEdenInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
- func (k Keeper) BurnEdenBFromEdenUncommitted(ctx sdk.Context, delegator sdk.AccAddress, uncommitAmt math.Int) error
- func (k Keeper) BurnEdenBFromElysUnstaking(ctx sdk.Context, delegator sdk.AccAddress)
- func (k Keeper) BurnEdenBIfElysStakingReduced(ctx sdk.Context)
- func (k Keeper) CalcBondedDelegationAmount(ctx sdk.Context, delAddr sdk.AccAddress) math.Int
- func (k Keeper) CalcDelegationAmount(ctx sdk.Context, delegator sdk.AccAddress) math.Int
- func (k Keeper) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error
- func (k Keeper) CommitmentHooks() CommitmentHooks
- func (k Keeper) Delegation(ctx sdk.Context, addrDel sdk.AccAddress, addrVal sdk.ValAddress) stakingtypes.DelegationI
- func (k Keeper) DelegationRewards(ctx sdk.Context, delegatorAddress string, validatorAddress string) (sdk.DecCoins, error)
- func (k Keeper) DeleteLegacyElysStakeChange(ctx sdk.Context, address sdk.AccAddress)
- func (k Keeper) DeleteLegacyElysStaked(ctx sdk.Context, address string)
- func (k Keeper) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllElysStakeChange(ctx sdk.Context) (list []sdk.AccAddress)
- func (k Keeper) GetAllElysStaked(ctx sdk.Context) (list []types.ElysStaked)
- func (k Keeper) GetAllLegacyElysStakeChange(ctx sdk.Context) (list []sdk.AccAddress)
- func (k Keeper) GetAllLegacyElysStaked(ctx sdk.Context) (list []types.ElysStaked)
- func (k Keeper) GetEdenBValidator(ctx sdk.Context) stakingtypes.ValidatorI
- func (k Keeper) GetEdenValidator(ctx sdk.Context) stakingtypes.ValidatorI
- func (k Keeper) GetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress) (found bool)
- func (k Keeper) GetElysStaked(ctx sdk.Context, address sdk.AccAddress) types.ElysStaked
- func (k Keeper) GetLegacyParams(ctx sdk.Context) (params types.LegacyParams)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) Invariant(goCtx context.Context, req *types.QueryInvariantRequest) (*types.QueryInvariantResponse, error)
- func (k Keeper) IterateBondedValidatorsByPower(ctx sdk.Context, ...)
- func (k Keeper) IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, ...)
- func (k Keeper) IterateValidators(ctx sdk.Context, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ProcessRewardsDistribution(ctx sdk.Context)
- func (k Keeper) ProcessUpdateIncentiveParams(ctx sdk.Context)
- func (k Keeper) RemoveElysStakeChange(ctx sdk.Context, address sdk.AccAddress)
- func (k Keeper) RemoveElysStaked(ctx sdk.Context, acc sdk.AccAddress)
- func (k Keeper) Rewards(goCtx context.Context, req *types.QueryRewardsRequest) (*types.QueryRewardsResponse, error)
- func (k Keeper) SetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) SetElysStaked(ctx sdk.Context, elysStaked types.ElysStaked)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, ...) math.Int
- func (k Keeper) SlashWithInfractionReason(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, ...) math.Int
- func (k Keeper) StakingHooks() StakingHooks
- func (k Keeper) TakeDelegationSnapshot(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) TotalBondedTokens(ctx sdk.Context) math.Int
- func (k Keeper) UpdateStakersRewards(ctx sdk.Context) error
- func (k Keeper) Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI
- func (k Keeper) WithdrawAllRewards(goCtx context.Context, msg *types.MsgWithdrawAllRewards) (*types.MsgWithdrawAllRewardsResponse, error)
- func (k Keeper) WithdrawEdenBReward(ctx sdk.Context, addr sdk.AccAddress) error
- func (k Keeper) WithdrawEdenReward(ctx sdk.Context, addr sdk.AccAddress) error
- type StakingHooks
- func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
- func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
Constants ¶
This section is empty.
Variables ¶
var ( EdenValPubKey cryptotypes.PubKey EdenBValPubKey cryptotypes.PubKey EdenValPubKeyAny *codectypes.Any EdenBValPubKeyAny *codectypes.Any )
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type CommitmentHooks ¶
type CommitmentHooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentive keeper
func (CommitmentHooks) BeforeEdenBCommitChange ¶
func (h CommitmentHooks) BeforeEdenBCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
func (CommitmentHooks) BeforeEdenBInitialCommit ¶
func (h CommitmentHooks) BeforeEdenBInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
func (CommitmentHooks) BeforeEdenCommitChange ¶
func (h CommitmentHooks) BeforeEdenCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
func (CommitmentHooks) BeforeEdenInitialCommit ¶
func (h CommitmentHooks) BeforeEdenInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
func (CommitmentHooks) CommitmentChanged ¶
func (h CommitmentHooks) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error
CommitmentChanged implements CommentmentHook
func (CommitmentHooks) EdenUncommitted ¶
func (h CommitmentHooks) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error
EdenUncommitted implements EdenUncommitted
type Keeper ¶
type Keeper struct { *stakingkeeper.Keeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, parameterKeeper types.ParameterKeeper, stakingKeeper *stakingkeeper.Keeper, commKeeper types.CommitmentKeeper, distrKeeper types.DistrKeeper, assetProfileKeeper types.AssetProfileKeeper, tokenomicsKeeper types.TokenomicsKeeper, authority string, ) *Keeper
func (Keeper) AfterDelegationModified ¶
func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Updating commitments on delegation changes
func (Keeper) BeforeDelegationCreated ¶
func (k Keeper) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Creating a commitment object for a delegator if one does not exist:
func (Keeper) BeforeDelegationRemoved ¶
func (k Keeper) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Keeper) BeforeDelegationSharesModified ¶
func (k Keeper) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Keeper) BeforeEdenBCommitChange ¶
func (Keeper) BeforeEdenBInitialCommit ¶
func (Keeper) BeforeEdenCommitChange ¶
func (Keeper) BeforeEdenInitialCommit ¶
func (Keeper) BurnEdenBFromEdenUncommitted ¶
func (k Keeper) BurnEdenBFromEdenUncommitted(ctx sdk.Context, delegator sdk.AccAddress, uncommitAmt math.Int) error
Burn EdenBoost from Eden unclaimed
func (Keeper) BurnEdenBFromElysUnstaking ¶
func (k Keeper) BurnEdenBFromElysUnstaking(ctx sdk.Context, delegator sdk.AccAddress)
Burn EdenBoost from Elys unstaked
func (Keeper) BurnEdenBIfElysStakingReduced ¶
func (Keeper) CalcBondedDelegationAmount ¶
Calculate delegation to bonded validators
func (Keeper) CalcDelegationAmount ¶
Calculate the delegated amount
func (Keeper) CommitmentChanged ¶
Process commitmentChanged hook
func (Keeper) CommitmentHooks ¶
func (k Keeper) CommitmentHooks() CommitmentHooks
Return the wrapper struct
func (Keeper) Delegation ¶
func (k Keeper) Delegation(ctx sdk.Context, addrDel sdk.AccAddress, addrVal sdk.ValAddress) stakingtypes.DelegationI
func (Keeper) DelegationRewards ¶
func (Keeper) DeleteLegacyElysStakeChange ¶ added in v0.42.0
func (k Keeper) DeleteLegacyElysStakeChange(ctx sdk.Context, address sdk.AccAddress)
func (Keeper) DeleteLegacyElysStaked ¶ added in v0.42.0
TODO: remove all legacy prefixes and functions after migration
func (Keeper) EdenUncommitted ¶
Process eden uncommitted hook
func (Keeper) EndBlocker ¶
EndBlocker of incentive module
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis
func (Keeper) GetAllElysStakeChange ¶
func (k Keeper) GetAllElysStakeChange(ctx sdk.Context) (list []sdk.AccAddress)
func (Keeper) GetAllElysStaked ¶
func (k Keeper) GetAllElysStaked(ctx sdk.Context) (list []types.ElysStaked)
GetAllElysStaked returns all elysStaked
func (Keeper) GetAllLegacyElysStakeChange ¶ added in v0.42.0
func (k Keeper) GetAllLegacyElysStakeChange(ctx sdk.Context) (list []sdk.AccAddress)
func (Keeper) GetAllLegacyElysStaked ¶ added in v0.42.0
func (k Keeper) GetAllLegacyElysStaked(ctx sdk.Context) (list []types.ElysStaked)
remove after migration
func (Keeper) GetEdenBValidator ¶
func (k Keeper) GetEdenBValidator(ctx sdk.Context) stakingtypes.ValidatorI
func (Keeper) GetEdenValidator ¶
func (k Keeper) GetEdenValidator(ctx sdk.Context) stakingtypes.ValidatorI
func (Keeper) GetElysStakeChange ¶
func (Keeper) GetElysStaked ¶
func (k Keeper) GetElysStaked(ctx sdk.Context, address sdk.AccAddress) types.ElysStaked
GetElysStaked returns a elysStaked from its index
func (Keeper) GetLegacyParams ¶ added in v0.42.0
func (k Keeper) GetLegacyParams(ctx sdk.Context) (params types.LegacyParams)
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) Invariant ¶ added in v0.32.0
func (k Keeper) Invariant(goCtx context.Context, req *types.QueryInvariantRequest) (*types.QueryInvariantResponse, error)
func (Keeper) IterateBondedValidatorsByPower ¶
func (k Keeper) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool))
iterate through the bonded validator set and perform the provided function
func (Keeper) IterateDelegations ¶
func (k Keeper) IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool))
func (Keeper) IterateValidators ¶
func (k Keeper) IterateValidators(ctx sdk.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool))
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ProcessRewardsDistribution ¶
Rewards distribution
func (Keeper) ProcessUpdateIncentiveParams ¶
func (Keeper) RemoveElysStakeChange ¶
func (k Keeper) RemoveElysStakeChange(ctx sdk.Context, address sdk.AccAddress)
func (Keeper) RemoveElysStaked ¶
func (k Keeper) RemoveElysStaked(ctx sdk.Context, acc sdk.AccAddress)
RemoveElysStaked removes a elysStaked from the store
func (Keeper) Rewards ¶
func (k Keeper) Rewards(goCtx context.Context, req *types.QueryRewardsRequest) (*types.QueryRewardsResponse, error)
func (Keeper) SetElysStakeChange ¶
func (k Keeper) SetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress)
func (Keeper) SetElysStaked ¶
func (k Keeper) SetElysStaked(ctx sdk.Context, elysStaked types.ElysStaked)
SetElysStaked set a specific elysStaked in the store from its index
func (Keeper) SlashWithInfractionReason ¶
func (k Keeper) SlashWithInfractionReason(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFactor sdk.Dec, infraction stakingtypes.Infraction) math.Int
func (Keeper) TakeDelegationSnapshot ¶
func (k Keeper) TakeDelegationSnapshot(ctx sdk.Context, addr sdk.AccAddress)
func (Keeper) Validator ¶
func (k Keeper) Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI
extended staking keeper functionalities
func (Keeper) WithdrawAllRewards ¶
func (k Keeper) WithdrawAllRewards(goCtx context.Context, msg *types.MsgWithdrawAllRewards) (*types.MsgWithdrawAllRewardsResponse, error)
func (Keeper) WithdrawEdenBReward ¶
func (Keeper) WithdrawEdenReward ¶
type StakingHooks ¶
type StakingHooks struct {
// contains filtered or unexported fields
}
StakingHooks wrapper struct for slashing keeper
func (StakingHooks) AfterDelegationModified ¶
func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (StakingHooks) AfterUnbondingInitiated ¶
func (h StakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
staking StakingHooks Must be called when a validator is created
func (StakingHooks) AfterValidatorBeginUnbonding ¶
func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator begins unbonding
func (StakingHooks) AfterValidatorBonded ¶
func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator is bonded
func (StakingHooks) AfterValidatorCreated ¶
func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
staking StakingHooks Must be called when a validator is created
func (StakingHooks) AfterValidatorRemoved ¶
func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator is deleted
func (StakingHooks) BeforeDelegationCreated ¶
func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation is created
func (StakingHooks) BeforeDelegationRemoved ¶
func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation is removed
func (StakingHooks) BeforeDelegationSharesModified ¶
func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation's shares are modified
func (StakingHooks) BeforeValidatorModified ¶
func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error
Must be called when a validator's state changes
func (StakingHooks) BeforeValidatorSlashed ¶
func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error