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.Coin)
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ int64)
- func (k Keeper) BankKeeper() types.BankKeeper
- func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64)
- func (k Keeper) DeductCommitments(ctx sdk.Context, creator string, denom string, amount sdk.Int) (types.Commitments, error)
- func (k Keeper) DepositLiquidTokensUnclaimed(ctx sdk.Context, denom string, amount sdk.Int, creator string) error
- func (k Keeper) EdenUncommitted(ctx sdk.Context, creator string, amount sdk.Coin)
- func (k Keeper) GetCommitments(ctx sdk.Context, creator string) (val types.Commitments, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetVestingInfo(ctx sdk.Context, baseDenom string) (*types.VestingInfo, int)
- 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 sdk.Int, creator string) error
- func (k Keeper) ProcessWithdrawTokens(ctx sdk.Context, creator string, denom string, amount sdk.Int) error
- func (k Keeper) ProcessWithdrawUSDC(ctx sdk.Context, creator string, denom string, amount sdk.Int) error
- func (k Keeper) ProcessWithdrawValidatorCommission(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) StandardStakingToken(ctx sdk.Context, delegator string, validator string, denom string) 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 { // Initiate commitment according to standard staking StandardStakingToken(sdk.Context, string, string, string) error // 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, bool) // Withdraw tokens // context, creator, denom, amount ProcessWithdrawTokens(sdk.Context, string, string, sdk.Int) error // Withdraw validator commission // context, delegator, validator, denom, amount ProcessWithdrawValidatorCommission(sdk.Context, string, string, string, sdk.Int) error // Withdraw tokens - only USDC // context, creator, denom, amount ProcessWithdrawUSDC(ctx sdk.Context, creator string, denom string, amount sdk.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, apKeeper 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) BeforeEpochStart ¶
BeforeEpochStart performs a no-op
func (Keeper) DeductCommitments ¶
func (Keeper) DepositLiquidTokensUnclaimed ¶ added in v0.14.0
func (k Keeper) DepositLiquidTokensUnclaimed(ctx sdk.Context, denom string, amount sdk.Int, creator string) error
accounting the liquid token as a unclaimed token in commitment module.
func (Keeper) EdenUncommitted ¶ added in v0.12.0
Committed executes the indicated for committed hook
func (Keeper) GetCommitments ¶
func (k Keeper) GetCommitments( ctx sdk.Context, creator string, ) (val types.Commitments, found bool)
GetCommitments returns a commitments from its index
func (Keeper) GetVestingInfo ¶
GetVestingDenom returns the vesting denom for the given base denom
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 sdk.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) ProcessWithdrawTokens ¶
func (k Keeper) ProcessWithdrawTokens(ctx sdk.Context, creator string, denom string, amount sdk.Int) error
Withdraw Token
func (Keeper) ProcessWithdrawUSDC ¶
func (k Keeper) ProcessWithdrawUSDC(ctx sdk.Context, creator string, denom string, amount sdk.Int) error
Withdraw Token - USDC Only withraw USDC from dexRevenue wallet
func (Keeper) ProcessWithdrawValidatorCommission ¶
func (k Keeper) ProcessWithdrawValidatorCommission(ctx sdk.Context, delegator string, creator string, denom string, amount sdk.Int) error
Withdraw validator's commission 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 ¶
- commitments.go
- deposit_liquid_tokens.go
- epoch_hooks.go
- hooks.go
- keeper.go
- msg_server.go
- msg_server_cancel_vest.go
- msg_server_commit_liquid_tokens.go
- msg_server_commit_unclaimed_rewards.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
- msg_server_withdraw_tokens.go
- params.go
- query.go
- query_params.go
- query_show_commitments.go
- vest.go