Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) DeleteVestEntry(ctx sdk.Context, vesterAccount string) (err error)
- func (k Keeper) GetAllVestEntries(ctx sdk.Context) (list []types.VestEntry)
- func (k Keeper) GetVestEntry(ctx sdk.Context, vesterAccount string) (val types.VestEntry, err error)
- func (k Keeper) HasAuthority(authority string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ProcessVesting(ctx sdk.Context)
- func (k Keeper) SetVestEntry(ctx sdk.Context, entry types.VestEntry) (err error)
- func (k Keeper) VestEntry(goCtx context.Context, req *types.QueryVestEntryRequest) (*types.QueryVestEntryResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, bankKeeper types.BankKeeper, blockTimeKeeper types.BlockTimeKeeper, authorities []string, ) *Keeper
func (Keeper) DeleteVestEntry ¶
func (Keeper) GetAllVestEntries ¶
func (Keeper) GetVestEntry ¶
func (Keeper) HasAuthority ¶
func (Keeper) ProcessVesting ¶
Process vesting for all vest entries. Intended to be called in BeginBlocker. For each vest entry: 1. Return if `block_time <= vest_entry.start_time` (vesting has not started yet) 2. Return if `prev_block_time >= vest_entry.end_time` (vesting has ended) 3. Transfer the following amount of tokens from vester account to treasury account:
min( (block_time - last_vest_time) / (end_time - last_vest_time), 1 ) * vester_account_balance where `last_vest_time = max(start_time, prev_block_time)`
func (Keeper) SetVestEntry ¶
func (Keeper) VestEntry ¶
func (k Keeper) VestEntry( goCtx context.Context, req *types.QueryVestEntryRequest, ) (*types.QueryVestEntryResponse, error)
Click to show internal directories.
Click to hide internal directories.