keeper

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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,
	bankKeeper types.BankKeeper,
) Keeper

func (Keeper) GetAllDenomsMetaData

func (k Keeper) GetAllDenomsMetaData(ctx sdk.Context) []bank.Metadata

func (Keeper) GetAllToken

func (k Keeper) GetAllToken(ctx sdk.Context) (list []types.Token)

GetAllToken returns all token

func (Keeper) GetDenomHolders

func (k Keeper) GetDenomHolders(ctx sdk.Context, denom string) []bank.Balance

func (Keeper) GetDenomMetaData

func (k Keeper) GetDenomMetaData(ctx sdk.Context, denom string) (bank.Metadata, bool)

func (Keeper) GetToken

func (k Keeper) GetToken(ctx sdk.Context, id uint64) (token types.Token)

GetToken returns a token from its id

func (Keeper) GetTokenByDenom added in v1.1.0

func (k Keeper) GetTokenByDenom(ctx sdk.Context, denom string) types.Token

func (Keeper) GetTokenCount

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

GetTokenCount get the total number of token

func (Keeper) HasToken

func (k Keeper) HasToken(ctx sdk.Context, id uint64) bool

HasToken checks if the token exists in the store

func (Keeper) IssueToken

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

IssueToken appends a token in the store with a new id and update the count

func (Keeper) Logger

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

func (Keeper) MintToken

func (k Keeper) MintToken(ctx sdk.Context, address string, amount sdk.Coin) error

func (Keeper) RemoveToken

func (k Keeper) RemoveToken(ctx sdk.Context, id uint64)

RemoveToken removes a token from the store

func (Keeper) SetDenomMetaData

func (k Keeper) SetDenomMetaData(ctx sdk.Context, metadata bank.Metadata)

func (Keeper) SetToken

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

SetToken set a specific token in the store

func (Keeper) SetTokenCount

func (k Keeper) SetTokenCount(ctx sdk.Context, count uint64)

SetTokenCount set the total number of token

func (Keeper) TokenByDenom added in v1.1.0

func (Keeper) TokensByOwner added in v1.1.0

Jump to

Keyboard shortcuts

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