Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type CommitmentKeeperI
- type Hooks
- type Keeper
- func (k Keeper) AddEdenEdenBOnAccount(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Coins
- func (k Keeper) AddEdenEdenBOnModule(ctx sdk.Context, moduleName string, amt sdk.Coins) sdk.Coins
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ int64) error
- func (k Keeper) BankKeeper() types.BankKeeper
- func (k Keeper) BeforeEpochStart(_ sdk.Context, _ string, _ int64) error
- func (k Keeper) BlockedAddr(addr sdk.AccAddress) bool
- func (k Keeper) BurnCoins(goCtx context.Context, moduleName string, amt sdk.Coins) error
- func (k Keeper) BurnEdenBoost(ctx sdk.Context, creator sdk.AccAddress, denom string, amount math.Int) error
- func (k Keeper) CommitLiquidTokens(ctx sdk.Context, addr sdk.AccAddress, denom string, amount math.Int, ...) error
- func (k Keeper) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error
- func (k Keeper) CommitmentVestingInfo(goCtx context.Context, req *types.QueryCommitmentVestingInfoRequest) (*types.QueryCommitmentVestingInfoResponse, error)
- func (k Keeper) CommittedTokensLocked(goCtx context.Context, req *types.QueryCommittedTokensLockedRequest) (*types.QueryCommittedTokensLockedResponse, error)
- func (k Keeper) DeductClaimed(ctx sdk.Context, creator sdk.AccAddress, denom string, amount math.Int) (types.Commitments, error)
- func (k Keeper) DeleteLegacyCommitments(ctx sdk.Context, creator string)
- func (k Keeper) DepositLiquidTokensClaimed(ctx sdk.Context, denom string, amount math.Int, sender sdk.AccAddress) error
- func (k Keeper) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error
- func (k Keeper) GetAllBalances(goCtx context.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) GetAllCommitments(ctx sdk.Context) (list []*types.Commitments)
- func (k Keeper) GetAllCommitmentsWithPagination(ctx sdk.Context, pagination *query.PageRequest) ([]*types.Commitments, *query.PageResponse, error)
- func (k Keeper) GetAllLegacyCommitments(ctx sdk.Context) []*types.Commitments
- func (k Keeper) GetCommitments(ctx sdk.Context, creator sdk.AccAddress) types.Commitments
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetVestingInfo(ctx sdk.Context, baseDenom string) (*types.VestingInfo, int)
- func (k Keeper) HasCommitments(ctx sdk.Context, creator sdk.AccAddress) bool
- func (k Keeper) HasLegacyCommitments(ctx sdk.Context, creator string) bool
- 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) MintCoins(goCtx context.Context, moduleName string, amt sdk.Coins) error
- func (k Keeper) NumberOfCommitments(goCtx context.Context, req *types.QueryNumberOfCommitmentsRequest) (*types.QueryNumberOfCommitmentsResponse, error)
- 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 sdk.AccAddress) error
- func (k Keeper) RemoveCommitments(ctx sdk.Context, creator sdk.AccAddress)
- func (k Keeper) SendCoinsFromAccountToModule(goCtx context.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error
- func (k Keeper) SendCoinsFromModuleToAccount(goCtx context.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error
- func (k Keeper) SendCoinsFromModuleToModule(goCtx context.Context, senderModule string, recipientModule string, ...) error
- 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) SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) SubEdenEdenBOnModule(ctx sdk.Context, moduleName string, amt sdk.Coins) (sdk.Coins, error)
- func (k Keeper) TotalNumberOfCommitments(ctx sdk.Context) int64
- func (k Keeper) UncommitTokens(ctx sdk.Context, addr sdk.AccAddress, denom string, amount math.Int, ...) error
- type MultiCommitmentHooks
- func (mh MultiCommitmentHooks) BeforeEdenBCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
- func (mh MultiCommitmentHooks) BeforeEdenBInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
- func (mh MultiCommitmentHooks) BeforeEdenCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
- func (mh MultiCommitmentHooks) BeforeEdenInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
- func (mh MultiCommitmentHooks) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error
- func (mh MultiCommitmentHooks) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error
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, sdk.AccAddress) types.Commitments }
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, storeService store.KVStoreService, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, assetProfileKeeper types.AssetProfileKeeper, authority string, ) *Keeper
func (Keeper) AddEdenEdenBOnAccount ¶ added in v0.31.0
func (Keeper) AddEdenEdenBOnModule ¶ added in v0.31.0
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) BlockedAddr ¶ added in v0.31.0
func (k Keeper) BlockedAddr(addr sdk.AccAddress) bool
func (Keeper) BurnEdenBoost ¶ added in v0.15.0
func (Keeper) CommitLiquidTokens ¶ added in v0.31.0
func (k Keeper) CommitLiquidTokens(ctx sdk.Context, addr sdk.AccAddress, denom string, amount math.Int, lockUntil uint64) error
CommitLiquidTokens commit the tokens from user's balance
func (Keeper) CommitmentChanged ¶ added in v0.31.0
Committed executes the indicated for committed hook
func (Keeper) CommitmentVestingInfo ¶ added in v0.38.1
func (k Keeper) CommitmentVestingInfo(goCtx context.Context, req *types.QueryCommitmentVestingInfoRequest) (*types.QueryCommitmentVestingInfoResponse, error)
func (Keeper) CommittedTokensLocked ¶ added in v0.37.0
func (k Keeper) CommittedTokensLocked(goCtx context.Context, req *types.QueryCommittedTokensLockedRequest) (*types.QueryCommittedTokensLockedResponse, error)
func (Keeper) DeductClaimed ¶ added in v0.15.0
func (Keeper) DeleteLegacyCommitments ¶ added in v0.42.0
remove after migration
func (Keeper) DepositLiquidTokensClaimed ¶ added in v0.15.0
func (k Keeper) DepositLiquidTokensClaimed(ctx sdk.Context, denom string, amount math.Int, sender sdk.AccAddress) 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) GetAllBalances ¶ added in v0.31.0
func (Keeper) GetAllCommitments ¶ added in v0.21.0
func (k Keeper) GetAllCommitments(ctx sdk.Context) (list []*types.Commitments)
GetAllCommitments returns all commitments
func (Keeper) GetAllCommitmentsWithPagination ¶ added in v0.49.4
func (k Keeper) GetAllCommitmentsWithPagination(ctx sdk.Context, pagination *query.PageRequest) ([]*types.Commitments, *query.PageResponse, error)
func (Keeper) GetAllLegacyCommitments ¶ added in v0.29.31
func (k Keeper) GetAllLegacyCommitments(ctx sdk.Context) []*types.Commitments
remove after migration
func (Keeper) GetCommitments ¶
func (k Keeper) GetCommitments(ctx sdk.Context, creator sdk.AccAddress) types.Commitments
GetCommitments returns a commitments from its index
func (Keeper) GetVestingInfo ¶
GetVestingDenom returns the vesting denom for the given base denom
func (Keeper) HasCommitments ¶ added in v0.31.0
func (Keeper) HasLegacyCommitments ¶ added in v0.42.0
remove after migration
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) NumberOfCommitments ¶ added in v0.31.0
func (k Keeper) NumberOfCommitments(goCtx context.Context, req *types.QueryNumberOfCommitmentsRequest) (*types.QueryNumberOfCommitmentsResponse, error)
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 sdk.AccAddress) 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) RemoveCommitments ¶
func (k Keeper) RemoveCommitments(ctx sdk.Context, creator sdk.AccAddress)
RemoveCommitments removes a commitments from the store
func (Keeper) SendCoinsFromAccountToModule ¶ added in v0.31.0
func (Keeper) SendCoinsFromModuleToAccount ¶ added in v0.31.0
func (Keeper) SendCoinsFromModuleToModule ¶ added in v0.31.0
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)
func (Keeper) SpendableCoins ¶ added in v0.31.0
func (Keeper) SubEdenEdenBOnModule ¶ added in v0.31.0
func (Keeper) TotalNumberOfCommitments ¶ added in v0.31.0
NumberOfCommitments returns total number of commitment items
type MultiCommitmentHooks ¶
type MultiCommitmentHooks []types.CommitmentHooks
combine multiple commitment hooks, all hook functions are run in array sequence
func NewMultiCommitmentHooks ¶ added in v0.31.0
func NewMultiCommitmentHooks(hooks ...types.CommitmentHooks) MultiCommitmentHooks
func (MultiCommitmentHooks) BeforeEdenBCommitChange ¶ added in v0.31.0
func (mh MultiCommitmentHooks) BeforeEdenBCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
func (MultiCommitmentHooks) BeforeEdenBInitialCommit ¶ added in v0.31.0
func (mh MultiCommitmentHooks) BeforeEdenBInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
func (MultiCommitmentHooks) BeforeEdenCommitChange ¶ added in v0.31.0
func (mh MultiCommitmentHooks) BeforeEdenCommitChange(ctx sdk.Context, addr sdk.AccAddress) error
func (MultiCommitmentHooks) BeforeEdenInitialCommit ¶ added in v0.31.0
func (mh MultiCommitmentHooks) BeforeEdenInitialCommit(ctx sdk.Context, addr sdk.AccAddress) error
func (MultiCommitmentHooks) CommitmentChanged ¶
func (mh MultiCommitmentHooks) CommitmentChanged(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coins) error
Committed is called when staker committed his token
func (MultiCommitmentHooks) EdenUncommitted ¶ added in v0.12.0
func (mh MultiCommitmentHooks) EdenUncommitted(ctx sdk.Context, creator sdk.AccAddress, amount sdk.Coin) error
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_claim_vesting.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_commitment_vesting_info.go
- query_params.go