keeper

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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
}

func NewKeeper

NewKeeper creates new Keeper

func (Keeper) CreateDenom

func (k Keeper) CreateDenom(
	ctx sdk.Context,
	originalDenom string,
	startTime int64,
	periods sdkvesting.Periods,
) (types.Denom, error)

CreateDenom creates new liquid denom and stores it

func (Keeper) DeleteDenom

func (k Keeper) DeleteDenom(ctx sdk.Context, baseDenom string)

DeleteDenom deletes denom from the storage

func (Keeper) Denom

Denom retrieves liquid token denom by its name

func (Keeper) Denoms

Denoms retrieves liquid tokens denoms

func (Keeper) GetAllDenoms added in v1.7.4

func (k Keeper) GetAllDenoms(ctx sdk.Context) (list []types.Denom)

GetAllGenesisAccount returns all genesisAccount

func (Keeper) GetDenom

func (k Keeper) GetDenom(ctx sdk.Context, baseDenom string) (val types.Denom, found bool)

GetDenom queries denom from the store

func (Keeper) GetDenomCounter

func (k Keeper) GetDenomCounter(ctx sdk.Context) uint64

GetDenomCounter get the counter for denoms

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of liquidvesting parameters.

func (Keeper) IsLiquidVestingEnabled added in v1.7.5

func (k Keeper) IsLiquidVestingEnabled(ctx sdk.Context) bool

func (Keeper) IterateDenoms added in v1.7.4

func (k Keeper) IterateDenoms(ctx sdk.Context, cb func(account types.Denom) (stop bool))

IterateDenoms iterates over all the stored denoms and performs a callback function. Stops iteration when callback returns true.

func (Keeper) Liquidate

func (k Keeper) Liquidate(goCtx context.Context, msg *types.MsgLiquidate) (*types.MsgLiquidateResponse, error)

Liquidate liquidates specified amount of token locked in vesting into liquid token

func (Keeper) Redeem

func (k Keeper) Redeem(goCtx context.Context, msg *types.MsgRedeem) (*types.MsgRedeemResponse, error)

Redeem redeems specified amount of liquid token into original locked token and adds them to account

func (Keeper) ResetParamsToDefault added in v1.7.6

func (k Keeper) ResetParamsToDefault(ctx sdk.Context)

func (Keeper) SetDenom

func (k Keeper) SetDenom(ctx sdk.Context, denom types.Denom)

SetDenom sets denom in the store

func (Keeper) SetDenomCounter

func (k Keeper) SetDenomCounter(ctx sdk.Context, counter uint64)

SetDenomCounter set the counter for denoms

func (Keeper) SetLiquidVestingEnabled added in v1.7.5

func (k Keeper) SetLiquidVestingEnabled(ctx sdk.Context, enable bool)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the liquidvesting parameters to the param space.

func (Keeper) UpdateDenomPeriods

func (k Keeper) UpdateDenomPeriods(ctx sdk.Context, baseDenom string, newPeriods sdkvesting.Periods) error

UpdateDenomPeriods updates schedule periods bound to liquid denom

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL