Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) ApplyVestingSchedule(ctx sdk.Context, funder, funded sdk.AccAddress, coins sdk.Coins, ...) (vestingAcc *types.ClawbackVestingAccount, newAccountCreated, wasMerged bool, ...)
- func (k Keeper) Balances(goCtx context.Context, req *types.QueryBalancesRequest) (*types.QueryBalancesResponse, error)
- func (k Keeper) Clawback(goCtx context.Context, msg *types.MsgClawback) (*types.MsgClawbackResponse, error)
- func (k Keeper) ConvertIntoVestingAccount(goCtx context.Context, msg *types.MsgConvertIntoVestingAccount) (*types.MsgConvertIntoVestingAccountResponse, error)
- func (k Keeper) ConvertVestingAccount(goCtx context.Context, msg *types.MsgConvertVestingAccount) (*types.MsgConvertVestingAccountResponse, error)
- func (k Keeper) CreateClawbackVestingAccount(goCtx context.Context, msg *types.MsgCreateClawbackVestingAccount) (*types.MsgCreateClawbackVestingAccountResponse, error)
- func (k Keeper) GetClawbackVestingAccount(ctx sdk.Context, addr sdk.AccAddress) (*types.ClawbackVestingAccount, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) TotalLocked(goCtx context.Context, req *types.QueryTotalLockedRequest) (*types.QueryTotalLockedResponse, error)
- func (k Keeper) UpdateVestingFunder(goCtx context.Context, msg *types.MsgUpdateVestingFunder) (*types.MsgUpdateVestingFunderResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of this module maintains collections of vesting.
func NewKeeper ¶
func NewKeeper( storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ak types.AccountKeeper, bk types.BankKeeper, sk stakingkeeper.Keeper, ) Keeper
NewKeeper creates new instances of the vesting Keeper
func (Keeper) ApplyVestingSchedule ¶ added in v1.7.2
func (k Keeper) ApplyVestingSchedule( ctx sdk.Context, funder, funded sdk.AccAddress, coins sdk.Coins, startTime time.Time, lockupPeriods, vestingPeriods sdkvesting.Periods, merge bool, ) (vestingAcc *types.ClawbackVestingAccount, newAccountCreated, wasMerged bool, err error)
ApplyVestingSchedule takes funder and funded addresses
func (Keeper) Balances ¶
func (k Keeper) Balances( goCtx context.Context, req *types.QueryBalancesRequest, ) (*types.QueryBalancesResponse, error)
Balances returns the locked, unvested and vested amount of tokens for a clawback vesting account
func (Keeper) Clawback ¶
func (k Keeper) Clawback( goCtx context.Context, msg *types.MsgClawback, ) (*types.MsgClawbackResponse, error)
Clawback removes the unvested amount from a ClawbackVestingAccount. The destination defaults to the funder address, but can be overridden.
Checks performed on the ValidateBasic include:
- funder and vesting addresses are correct bech32 format
- if destination address is not empty it is also correct bech32 format
func (Keeper) ConvertIntoVestingAccount ¶
func (k Keeper) ConvertIntoVestingAccount( goCtx context.Context, msg *types.MsgConvertIntoVestingAccount, ) (*types.MsgConvertIntoVestingAccountResponse, error)
ConvertIntoVestingAccount converts a default chain account to the ClawbackVestingAccount after its lock and vesting periods have started.
func (Keeper) ConvertVestingAccount ¶
func (k Keeper) ConvertVestingAccount( goCtx context.Context, msg *types.MsgConvertVestingAccount, ) (*types.MsgConvertVestingAccountResponse, error)
ConvertVestingAccount converts a ClawbackVestingAccount to the default chain account after its lockup and vesting periods have concluded.
func (Keeper) CreateClawbackVestingAccount ¶
func (k Keeper) CreateClawbackVestingAccount( goCtx context.Context, msg *types.MsgCreateClawbackVestingAccount, ) (*types.MsgCreateClawbackVestingAccountResponse, error)
CreateClawbackVestingAccount creates a new ClawbackVestingAccount, or merges a grant into an existing one.
func (Keeper) GetClawbackVestingAccount ¶ added in v1.8.0
func (k Keeper) GetClawbackVestingAccount(ctx sdk.Context, addr sdk.AccAddress) (*types.ClawbackVestingAccount, error)
GetClawbackVestingAccount is a helper function to get the account from the account keeper and check if it is of the correct type for clawback vesting.
func (Keeper) TotalLocked ¶ added in v1.6.4
func (k Keeper) TotalLocked( goCtx context.Context, req *types.QueryTotalLockedRequest, ) (*types.QueryTotalLockedResponse, error)
func (Keeper) UpdateVestingFunder ¶
func (k Keeper) UpdateVestingFunder( goCtx context.Context, msg *types.MsgUpdateVestingFunder, ) (*types.MsgUpdateVestingFunderResponse, error)
UpdateVestingFunder updates the funder account of a ClawbackVestingAccount.
Checks performed on the ValidateBasic include:
- new funder and vesting addresses are correct bech32 format
- new funder address is not the zero address
- new funder address is not the same as the current funder address