keeper

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeeBase = types.MinSymbolLen
	FeeExp  = 3
)

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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.Codec,
	storeKey sdk.StoreKey,
	paramSpace paramstypes.Subspace,
	bankKeeper types.BankKeeper,
	accountKeeper types.AccountKeeper,
	moduleAddr map[string]bool,
) *Keeper

func (Keeper) AddToken

func (k Keeper) AddToken(ctx sdk.Context, token types.Token) error

func (Keeper) BurnToken

func (k Keeper) BurnToken(ctx sdk.Context, symbol string, amount uint64, owner sdk.AccAddress) error

func (Keeper) DeductIssueTokenFee

func (k Keeper) DeductIssueTokenFee(ctx sdk.Context, owner sdk.AccAddress, symbol string) error

DeductIssueTokenFee performs fee handling for issuing token

func (Keeper) DeductOperateTokenFee

func (k Keeper) DeductOperateTokenFee(ctx sdk.Context, owner sdk.AccAddress, symbol string) error

DeductOperateTokenFee performs fee handling for operate token

func (Keeper) DeleteUpgradeToken added in v1.7.0

func (k Keeper) DeleteUpgradeToken(ctx sdk.Context, denom string) error

DeleteUpgradeToken upgrade del token func

func (Keeper) EditToken

func (k Keeper) EditToken(ctx sdk.Context, symbol, name string, maxSupply uint64, owner sdk.AccAddress) error

func (Keeper) Fees

func (Keeper) GetIssueTokenFee

func (k Keeper) GetIssueTokenFee(ctx sdk.Context, symbol string) (sdk.Coin, error)

GetIssueTokenFee returns operate token fee

func (Keeper) GetOperateTokenFee

func (k Keeper) GetOperateTokenFee(ctx sdk.Context, symbol string) (sdk.Coin, error)

GetOperateTokenFee returns operate token fee

func (Keeper) GetParamSet

func (k Keeper) GetParamSet(ctx sdk.Context) types.Params

GetParamSet returns token params from the global param store

func (Keeper) GetToken

func (k Keeper) GetToken(ctx sdk.Context, denom string) (types.TokenI, error)

GetToken returns the token of the specified symbol or min-unit

func (Keeper) GetTokens

func (k Keeper) GetTokens(ctx sdk.Context, owner sdk.AccAddress) (tokens []types.TokenI)

GetTokens returns all existing tokens

func (Keeper) HasSymbol

func (k Keeper) HasSymbol(ctx sdk.Context, symbol string) bool

func (Keeper) HasToken

func (k Keeper) HasToken(ctx sdk.Context, denom string) bool

func (Keeper) IssueToken

func (k Keeper) IssueToken(
	ctx sdk.Context,
	symbol, name, minUnit string,
	scale uint32,
	initialSupply uint64,
	maxSupply uint64,
	mintable bool,
	owner sdk.AccAddress,
) error

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MintToken

func (k Keeper) MintToken(ctx sdk.Context, symbol string, amount uint64, to, owner sdk.AccAddress) error

func (Keeper) Params

func (Keeper) SetParamSet

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

SetParamSet sets token params to the global param store

func (Keeper) SetUpgradeToken added in v1.7.0

func (k Keeper) SetUpgradeToken(ctx sdk.Context, token types.Token)

SetUpgradeToken upgrade set token func

func (Keeper) Token

func (Keeper) Tokens

func (Keeper) TransferOwnerToken

func (k Keeper) TransferOwnerToken(ctx sdk.Context, symbol string, owner, to sdk.AccAddress) error

Jump to

Keyboard shortcuts

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