Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type CommitmentKeeperI
- type Hooks
- type Keeper
- func (k Keeper) AfterCommitmentChange(ctx sdk.Context, creator string, amount sdk.Coins)
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ int64)
- func (k Keeper) BankKeeper() types.BankKeeper
- func (k Keeper) BeforeDelegationCreated(ctx sdk.Context, delegator string, validator string) error
- func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64)
- func (k Keeper) BurnEdenBoost(ctx sdk.Context, creator string, denom string, amount math.Int) (types.Commitments, error)
- func (k Keeper) DeductClaimed(ctx sdk.Context, creator string, denom string, amount math.Int) (types.Commitments, error)
- func (k Keeper) DeductUnclaimed(ctx sdk.Context, creator string, denom string, amount math.Int) (types.Commitments, error)
- func (k Keeper) DepositLiquidTokensClaimed(ctx sdk.Context, denom string, amount math.Int, sender string) error
- func (k Keeper) EdenUncommitted(ctx sdk.Context, creator string, amount sdk.Coin)
- func (k Keeper) GetAllCommitments(ctx sdk.Context) (list []*types.Commitments)
- func (k Keeper) GetCommitments(ctx sdk.Context, creator string) types.Commitments
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetVestingInfo(ctx sdk.Context, baseDenom string) (*types.VestingInfo, int)
- func (k Keeper) HandleWithdrawFromCommitment(ctx sdk.Context, commitments *types.Commitments, amount sdk.Coins, ...) error
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IterateCommitments(ctx sdk.Context, handlerFn func(commitments types.Commitments) (stop bool))
- 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) ProcessTokenVesting(ctx sdk.Context, denom string, amount math.Int, creator string) error
- func (k Keeper) RecordClaimReward(ctx sdk.Context, creator string, denom string, amount math.Int, ...) error
- func (k Keeper) RecordWithdrawValidatorCommission(ctx sdk.Context, delegator string, creator string, denom string, ...) error
- func (k Keeper) RemoveCommitments(ctx sdk.Context, creator string)
- func (k Keeper) SetCommitments(ctx sdk.Context, commitments types.Commitments)
- func (k *Keeper) SetHooks(eh types.CommitmentHooks) *Keeper
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) ShowCommitments(goCtx context.Context, req *types.QueryShowCommitmentsRequest) (*types.QueryShowCommitmentsResponse, error)
- func (k Keeper) VestTokens(ctx sdk.Context, epochIdentifier string) error
- type MultiCommitmentHooks
Constants ¶
This section is empty.
Variables ¶
var VestNowEnabled = false
VestNow is not enabled at this stage
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type CommitmentKeeperI ¶
type CommitmentKeeperI interface { // Iterate all commitments IterateCommitments(sdk.Context, func(types.Commitments) (stop bool)) // Update commitment SetCommitments(ctx sdk.Context, commitments types.Commitments) // Get commitment GetCommitments(sdk.Context, string) types.Commitments // Update commitments for claim reward operation RecordClaimReward(sdk.Context, string, string, math.Int, types.EarnType) error // Update commitments for validator's commission withdrawal to self delegator RecordWithdrawValidatorCommission(sdk.Context, string, string, string, math.Int) error }
Interface declearation
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for commitments keeper
func (Hooks) AfterEpochEnd ¶
AfterEpochEnd implements EpochHooks
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, assetProfileKeeper types.AssetProfileKeeper, authority string, ) *Keeper
func (Keeper) AfterCommitmentChange ¶
Committed executes the indicated for committed hook
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd distributes vested tokens at the end of each epoch
func (Keeper) BankKeeper ¶
func (k Keeper) BankKeeper() types.BankKeeper
func (Keeper) BeforeDelegationCreated ¶ added in v0.15.0
Process delegation hook - create commitment entities for delegator and validator
func (Keeper) BeforeEpochStart ¶
BeforeEpochStart performs a no-op
func (Keeper) BurnEdenBoost ¶ added in v0.15.0
func (Keeper) DeductClaimed ¶ added in v0.15.0
func (Keeper) DeductUnclaimed ¶ added in v0.15.0
func (Keeper) DepositLiquidTokensClaimed ¶ added in v0.15.0
func (k Keeper) DepositLiquidTokensClaimed(ctx sdk.Context, denom string, amount math.Int, sender string) error
accounting the liquid token as a claimed token in commitment module.
func (Keeper) EdenUncommitted ¶ added in v0.12.0
Committed executes the indicated for committed hook
func (Keeper) GetAllCommitments ¶ added in v0.21.0
func (k Keeper) GetAllCommitments(ctx sdk.Context) (list []*types.Commitments)
GetAllCommitments returns all commitments
func (Keeper) GetCommitments ¶
GetCommitments returns a commitments from its index
func (Keeper) GetVestingInfo ¶
GetVestingDenom returns the vesting denom for the given base denom
func (Keeper) HandleWithdrawFromCommitment ¶ added in v0.15.0
func (Keeper) IterateCommitments ¶
func (k Keeper) IterateCommitments(ctx sdk.Context, handlerFn func(commitments types.Commitments) (stop bool))
IterateCommitments iterates over all Commitments and performs a callback.
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ProcessTokenVesting ¶ added in v0.13.0
func (k Keeper) ProcessTokenVesting(ctx sdk.Context, denom string, amount math.Int, creator string) error
Vesting token Check if vesting entity count is not exceeding the maximum and if it is fine, creates a new vesting entity Deduct from unclaimed bucket. If it is insufficent, deduct from committed bucket as well.
func (Keeper) RecordClaimReward ¶ added in v0.15.0
func (k Keeper) RecordClaimReward(ctx sdk.Context, creator string, denom string, amount math.Int, withdrawMode types.EarnType) error
Update commitments for claim reward operation
func (Keeper) RecordWithdrawValidatorCommission ¶ added in v0.15.0
func (k Keeper) RecordWithdrawValidatorCommission(ctx sdk.Context, delegator string, creator string, denom string, amount math.Int) error
Update commitments for validator's commission withdrawal to self delegator
func (Keeper) RemoveCommitments ¶
RemoveCommitments removes a commitments from the store
func (Keeper) SetCommitments ¶
func (k Keeper) SetCommitments(ctx sdk.Context, commitments types.Commitments)
SetCommitments set a specific commitments in the store from its index
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(eh types.CommitmentHooks) *Keeper
SetHooks set the epoch hooks
func (Keeper) ShowCommitments ¶
func (k Keeper) ShowCommitments(goCtx context.Context, req *types.QueryShowCommitmentsRequest) (*types.QueryShowCommitmentsResponse, error)
type MultiCommitmentHooks ¶
type MultiCommitmentHooks []types.CommitmentHooks
combine multiple commitment hooks, all hook functions are run in array sequence
func NewMultiEpochHooks ¶
func NewMultiEpochHooks(hooks ...types.CommitmentHooks) MultiCommitmentHooks
func (MultiCommitmentHooks) CommitmentChanged ¶
Committed is called when staker committed his token
func (MultiCommitmentHooks) EdenUncommitted ¶ added in v0.12.0
Committed is called when staker committed his token
Source Files ¶
- claim_reward.go
- commitments.go
- deposit_liquid_tokens.go
- epoch_hooks.go
- hooks.go
- keeper.go
- msg_server.go
- msg_server_cancel_vest.go
- msg_server_commit_claimed_rewards.go
- msg_server_commit_liquid_tokens.go
- msg_server_stake.go
- msg_server_uncommit_tokens.go
- msg_server_unstake.go
- msg_server_update_vesting_info.go
- msg_server_vest.go
- msg_server_vest_liquid.go
- msg_server_vest_now.go
- params.go
- query.go
- query_params.go
- query_show_commitments.go
- vest.go