Documentation ¶
Index ¶
- Constants
- func CalculateWithdrawable(current time.Time, vesting types.VestingPool) sdk.Int
- func ConvertVestingTypesToGenesisVestingTypes(vestingTypes *types.VestingTypes) []types.GenesisVestingType
- func DurationFromUnits(unit PeriodUnit, value int64) time.Duration
- func GetVestingAccountIDBytes(id uint64) []byte
- func GetVestingAccountIDFromBytes(bz []byte) uint64
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AppendVestingAccount(ctx sdk.Context, vestingAccount types.VestingAccount) uint64
- func (k Keeper) CreateVestingAccount(ctx sdk.Context, fromAddress string, toAddress string, amount sdk.Coins, ...) error
- func (k Keeper) CreateVestingPool(ctx sdk.Context, addr string, name string, amount sdk.Int, ...) error
- func (k Keeper) DeleteAccountVestings(ctx sdk.Context, accountAddress string) (accountVestings types.AccountVestings)
- func (k Keeper) Denom(ctx sdk.Context) (res string)
- func (k Keeper) GetAccountVestings(ctx sdk.Context, accountAddress string) (accountVestings types.AccountVestings, found bool)
- func (k Keeper) GetAllAccountVestings(ctx sdk.Context) (list []types.AccountVestings)
- func (k Keeper) GetAllVestingAccount(ctx sdk.Context) (list []types.VestingAccount)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetVestingAccount(ctx sdk.Context, id uint64) (val types.VestingAccount, found bool)
- func (k Keeper) GetVestingAccountCount(ctx sdk.Context) uint64
- func (k Keeper) GetVestingType(ctx sdk.Context, name string) (vestingType types.VestingType, err error)
- func (k Keeper) GetVestingTypes(ctx sdk.Context) (vestingTypes types.VestingTypes)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RemoveVestingAccount(ctx sdk.Context, id uint64)
- func (k Keeper) SendToNewVestingAccount(ctx sdk.Context, fromAddr string, toAddr string, vestingId int32, ...) (withdrawn sdk.Coin, returnedError error)
- func (k Keeper) SetAccountVestings(ctx sdk.Context, accountVestings types.AccountVestings)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetVestingAccount(ctx sdk.Context, vestingAccount types.VestingAccount)
- func (k Keeper) SetVestingAccountCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetVestingTypes(ctx sdk.Context, vestingTypes types.VestingTypes)
- func (k Keeper) VestingPools(goCtx context.Context, req *types.QueryVestingPoolsRequest) (*types.QueryVestingPoolsResponse, error)
- func (k Keeper) VestingType(goCtx context.Context, req *types.QueryVestingTypeRequest) (*types.QueryVestingTypeResponse, error)
- func (k Keeper) Vestings(goCtx context.Context, req *types.QueryVestingsRequest) (*types.QueryVestingsResponse, error)
- func (k Keeper) WithdrawAllAvailable(ctx sdk.Context, addr string) (withdrawn sdk.Coin, returnedError error)
- type PeriodUnit
Constants ¶
const ( Day = "day" Hour = "hour" Minute = "minute" Second = "second" )
Variables ¶
This section is empty.
Functions ¶
func CalculateWithdrawable ¶
func ConvertVestingTypesToGenesisVestingTypes ¶
func ConvertVestingTypesToGenesisVestingTypes(vestingTypes *types.VestingTypes) []types.GenesisVestingType
func DurationFromUnits ¶
func DurationFromUnits(unit PeriodUnit, value int64) time.Duration
func GetVestingAccountIDBytes ¶
GetVestingAccountIDBytes returns the byte representation of the ID
func GetVestingAccountIDFromBytes ¶
GetVestingAccountIDFromBytes returns ID in uint64 format from a byte array
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, memKey sdk.StoreKey, ps paramtypes.Subspace, bank types.BankKeeper, staking types.StakingKeeper, account types.AccountKeeper, distribution types.DistributionKeeper, gov types.GovKeeper, ) *Keeper
func (Keeper) AppendVestingAccount ¶
func (k Keeper) AppendVestingAccount( ctx sdk.Context, vestingAccount types.VestingAccount, ) uint64
AppendVestingAccount appends a vestingAccount in the store with a new id and update the count
func (Keeper) CreateVestingAccount ¶
func (Keeper) CreateVestingPool ¶
func (Keeper) DeleteAccountVestings ¶
func (k Keeper) DeleteAccountVestings(ctx sdk.Context, accountAddress string) (accountVestings types.AccountVestings)
get the vesting types
func (Keeper) GetAccountVestings ¶
func (k Keeper) GetAccountVestings(ctx sdk.Context, accountAddress string) (accountVestings types.AccountVestings, found bool)
get the vesting types
func (Keeper) GetAllAccountVestings ¶
func (k Keeper) GetAllAccountVestings(ctx sdk.Context) (list []types.AccountVestings)
GetAllAccountVestings returns all AccountVestings
func (Keeper) GetAllVestingAccount ¶
func (k Keeper) GetAllVestingAccount(ctx sdk.Context) (list []types.VestingAccount)
GetAllVestingAccount returns all vestingAccount
func (Keeper) GetVestingAccount ¶
func (k Keeper) GetVestingAccount(ctx sdk.Context, id uint64) (val types.VestingAccount, found bool)
GetVestingAccount returns a vestingAccount from its id
func (Keeper) GetVestingAccountCount ¶
GetVestingAccountCount get the total number of vestingAccount
func (Keeper) GetVestingType ¶
func (k Keeper) GetVestingType(ctx sdk.Context, name string) (vestingType types.VestingType, err error)
get the vesting type by name
func (Keeper) GetVestingTypes ¶
func (k Keeper) GetVestingTypes(ctx sdk.Context) (vestingTypes types.VestingTypes)
get the vesting types
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RemoveVestingAccount ¶
RemoveVestingAccount removes a vestingAccount from the store
func (Keeper) SendToNewVestingAccount ¶
func (Keeper) SetAccountVestings ¶
func (k Keeper) SetAccountVestings(ctx sdk.Context, accountVestings types.AccountVestings)
set the vesting types
func (Keeper) SetVestingAccount ¶
func (k Keeper) SetVestingAccount(ctx sdk.Context, vestingAccount types.VestingAccount)
SetVestingAccount set a specific vestingAccount in the store
func (Keeper) SetVestingAccountCount ¶
SetVestingAccountCount set the total number of vestingAccount
func (Keeper) SetVestingTypes ¶
func (k Keeper) SetVestingTypes(ctx sdk.Context, vestingTypes types.VestingTypes)
set the vesting types
func (Keeper) VestingPools ¶
func (k Keeper) VestingPools(goCtx context.Context, req *types.QueryVestingPoolsRequest) (*types.QueryVestingPoolsResponse, error)
func (Keeper) VestingType ¶
func (k Keeper) VestingType(goCtx context.Context, req *types.QueryVestingTypeRequest) (*types.QueryVestingTypeResponse, error)
func (Keeper) Vestings ¶
func (k Keeper) Vestings(goCtx context.Context, req *types.QueryVestingsRequest) (*types.QueryVestingsResponse, error)
type PeriodUnit ¶
type PeriodUnit string
func UnitsFromDuration ¶
func UnitsFromDuration(duration time.Duration) (unit PeriodUnit, value int64)
Source Files ¶
- account_vestings.go
- grpc_query.go
- grpc_query_params.go
- grpc_query_vesting_pools.go
- grpc_query_vesting_type.go
- grpc_query_vestings.go
- keeper.go
- msg_server.go
- msg_server_create_vesting_account.go
- msg_server_create_vesting_pool.go
- msg_server_send_to_vesting_account.go
- msg_server_withdraw_all_available.go
- params.go
- utils.go
- vesting.go
- vesting_account.go
- vesting_types.go