keeper

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EdenValPubKey     cryptotypes.PubKey
	EdenBValPubKey    cryptotypes.PubKey
	EdenValPubKeyAny  *codectypes.Any
	EdenBValPubKeyAny *codectypes.Any
)

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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 EpochHooks added in v0.54.0

type EpochHooks struct {
	// contains filtered or unexported fields
}

EpochHooks wrapper struct for incentive keeper

func (EpochHooks) AfterEpochEnd added in v0.54.0

func (h EpochHooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

AfterEpochEnd implements EpochHooks

func (EpochHooks) BeforeEpochStart added in v0.54.0

func (h EpochHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

BeforeEpochStart implements EpochHooks

type Keeper

type Keeper struct {
	*stakingkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService store.KVStoreService,
	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 (k Keeper) BeforeEdenBCommitChange(ctx sdk.Context, addr sdk.AccAddress) error

func (Keeper) BeforeEdenBInitialCommit

func (k Keeper) BeforeEdenBInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error

func (Keeper) BeforeEdenCommitChange

func (k Keeper) BeforeEdenCommitChange(ctx sdk.Context, addr sdk.AccAddress) error

func (Keeper) BeforeEdenInitialCommit

func (k Keeper) BeforeEdenInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error

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) error

Burn EdenBoost from Elys unstaked

func (Keeper) BurnEdenBIfElysStakingReduced

func (k Keeper) BurnEdenBIfElysStakingReduced(ctx sdk.Context) error

func (Keeper) CalcDelegationAmount

func (k Keeper) CalcDelegationAmount(ctx sdk.Context, delegator sdk.AccAddress) math.Int

Calculate the delegated amount

func (Keeper) ClaimAndVestProviderStakingRewards added in v0.54.0

func (k Keeper) ClaimAndVestProviderStakingRewards(ctx sdk.Context) error

func (Keeper) CommitmentChanged

func (k Keeper) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error

Process commitmentChanged hook

func (Keeper) CommitmentHooks

func (k Keeper) CommitmentHooks() CommitmentHooks

Return the wrapper struct

func (Keeper) Delegation

func (k Keeper) Delegation(goCtx context.Context, addrDel sdk.AccAddress, addrVal sdk.ValAddress) (stakingtypes.DelegationI, error)

func (Keeper) DelegationRewards

func (k Keeper) DelegationRewards(ctx sdk.Context, delegatorAddress string, validatorAddress string) (sdk.DecCoins, error)

func (Keeper) EdenUncommitted

func (k Keeper) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error

Process eden uncommitted hook

func (Keeper) EndBlocker

func (k Keeper) EndBlocker(ctx sdk.Context) error

EndBlocker of incentive module

func (Keeper) EpochHooks added in v0.54.0

func (k Keeper) EpochHooks() EpochHooks

Return the wrapper struct

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) 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 (k Keeper) GetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress) (found bool)

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) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

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 (Keeper) IterateBondedValidatorsByPower

func (k Keeper) IterateBondedValidatorsByPower(goCtx context.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error

iterate through the bonded validator set and perform the provided function

func (Keeper) IterateDelegations

func (k Keeper) IterateDelegations(goCtx context.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error

func (Keeper) IterateValidators

func (k Keeper) IterateValidators(goCtx context.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool)) error

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) ProcessRewardsDistribution

func (k Keeper) ProcessRewardsDistribution(ctx sdk.Context) error

Rewards distribution

func (Keeper) ProcessUpdateIncentiveParams

func (k Keeper) ProcessUpdateIncentiveParams(ctx sdk.Context)

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 (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) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) Slash

func (k Keeper) Slash(goCtx context.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFactor math.LegacyDec) (math.Int, error)

func (Keeper) SlashWithInfractionReason

func (k Keeper) SlashWithInfractionReason(goCtx context.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFactor math.LegacyDec, infraction stakingtypes.Infraction) (math.Int, error)

func (Keeper) StakingHooks

func (k Keeper) StakingHooks() StakingHooks

Return the wrapper struct

func (Keeper) TakeDelegationSnapshot

func (k Keeper) TakeDelegationSnapshot(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) TotalBondedElysEdenTokens added in v0.52.0

func (k Keeper) TotalBondedElysEdenTokens(goCtx context.Context) (math.Int, error)

func (Keeper) TotalBondedTokens

func (k Keeper) TotalBondedTokens(goCtx context.Context) (math.Int, error)

func (Keeper) UpdateStakersRewards

func (k Keeper) UpdateStakersRewards(ctx sdk.Context) error

func (Keeper) Validator

func (k Keeper) Validator(goCtx context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error)

extended staking keeper functionalities

func (Keeper) WithdrawAllRewards

func (Keeper) WithdrawEdenBReward

func (k Keeper) WithdrawEdenBReward(ctx sdk.Context, addr sdk.AccAddress) error

func (Keeper) WithdrawEdenReward

func (k Keeper) WithdrawEdenReward(ctx sdk.Context, addr sdk.AccAddress) error

type StakingHooks

type StakingHooks struct {
	// contains filtered or unexported fields
}

StakingHooks wrapper struct for slashing keeper

func (StakingHooks) AfterDelegationModified

func (h StakingHooks) AfterDelegationModified(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (StakingHooks) AfterUnbondingInitiated

func (h StakingHooks) AfterUnbondingInitiated(goCtx context.Context, id uint64) error

staking StakingHooks Must be called when a validator is created

func (StakingHooks) AfterValidatorBeginUnbonding

func (h StakingHooks) AfterValidatorBeginUnbonding(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

Must be called when a validator begins unbonding

func (StakingHooks) AfterValidatorBonded

func (h StakingHooks) AfterValidatorBonded(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

Must be called when a validator is bonded

func (StakingHooks) AfterValidatorCreated

func (h StakingHooks) AfterValidatorCreated(goCtx context.Context, valAddr sdk.ValAddress) error

staking StakingHooks Must be called when a validator is created

func (StakingHooks) AfterValidatorRemoved

func (h StakingHooks) AfterValidatorRemoved(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

Must be called when a validator is deleted

func (StakingHooks) BeforeDelegationCreated

func (h StakingHooks) BeforeDelegationCreated(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

Must be called when a delegation is created

func (StakingHooks) BeforeDelegationRemoved

func (h StakingHooks) BeforeDelegationRemoved(goCtx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

Must be called when a delegation is removed

func (StakingHooks) BeforeDelegationSharesModified

func (h StakingHooks) BeforeDelegationSharesModified(goCtx context.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(goCtx context.Context, valAddr sdk.ValAddress) error

Must be called when a validator's state changes

func (StakingHooks) BeforeValidatorSlashed

func (h StakingHooks) BeforeValidatorSlashed(goCtx context.Context, valAddr sdk.ValAddress, fraction sdkmath.LegacyDec) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL