keeper

package
v0.0.0-...-34f0fe8 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

nolint

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 token MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key sdk.StoreKey,
	paramSpace types.ParamSubspace,
	ak types.AccountKeeper,
	bankKeeper types.BankKeeper,
	distrKeeper types.DistrKeeper,
	blockedAddrs map[string]bool,
) Keeper

func (Keeper) AddFanToken

func (k Keeper) AddFanToken(ctx sdk.Context, token *types.FanToken) error

AddFanToken saves a new token

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, coin sdk.Coin, owner sdk.AccAddress) error

Burn burns the specified amount of fantoken

func (Keeper) GetFanToken

func (k Keeper) GetFanToken(ctx sdk.Context, denom string) (*types.FanToken, error)

GetFanToken returns the fantoken of the specified denom

func (Keeper) GetFanTokens

func (k Keeper) GetFanTokens(ctx sdk.Context, owner sdk.AccAddress) (fantokens []types.FanToken)

GetFanTokens returns all existing fantokens

func (Keeper) GetParamSet

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

GetParamSet returns fantoken params from the global param store

func (Keeper) HasFanToken

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

HasFanToken asserts a fantoken exists

func (Keeper) Issue

func (k Keeper) Issue(ctx sdk.Context, name, symbol, uri string, maxSupply sdk.Int, minter, authority sdk.AccAddress) (denom string, err error)

Issue issues a new fantoken

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, minter, recipient sdk.AccAddress, coin sdk.Coin) error

Mint mints the specified amount of fantoken to the specified recipient

func (Keeper) Params

Params return the all the parameter in fantoken module

func (Keeper) SetAuthority

func (k Keeper) SetAuthority(ctx sdk.Context, denom string, oldAuthority, newAuthority sdk.AccAddress) error

SetAuthority transfers the authority of the specified fantoken to a new one

func (Keeper) SetMinter

func (k Keeper) SetMinter(ctx sdk.Context, denom string, oldMinter, newMinter sdk.AccAddress) error

SetMinter transfers the minter of the specified fantoken to a new one

func (Keeper) SetParamSet

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

SetParamSet sets fantoken params to the global param store

func (Keeper) SetUri

func (k Keeper) SetUri(ctx sdk.Context, denom, newUri string, authority sdk.AccAddress) error

Jump to

Keyboard shortcuts

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