Documentation ¶
Overview ¶
nolint
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) AddBurnCoin(ctx sdk.Context, coin sdk.Coin)
- func (k Keeper) AddFanToken(ctx sdk.Context, token tokentypes.FanToken) error
- func (k Keeper) BurnFanToken(ctx sdk.Context, denom string, amount sdk.Int, owner sdk.AccAddress) error
- func (k Keeper) DeductIssueFanTokenFee(ctx sdk.Context, owner sdk.AccAddress, issueFee sdk.Coin, symbol string) error
- func (k Keeper) EditFanToken(ctx sdk.Context, symbol string, mintable bool, owner sdk.AccAddress) error
- func (k Keeper) FanToken(c context.Context, req *types.QueryFanTokenRequest) (*types.QueryFanTokenResponse, error)
- func (k Keeper) FanTokens(c context.Context, req *types.QueryFanTokensRequest) (*types.QueryFanTokensResponse, error)
- func (k Keeper) GetAllBurnCoin(ctx sdk.Context) []sdk.Coin
- func (k Keeper) GetBurnCoin(ctx sdk.Context, denom string) (sdk.Coin, error)
- func (k Keeper) GetFanToken(ctx sdk.Context, denom string) (tokentypes.FanTokenI, error)
- func (k Keeper) GetFanTokenIssueFee(ctx sdk.Context, issueFee sdk.Coin, symbol string) sdk.Coin
- func (k Keeper) GetFanTokens(ctx sdk.Context, owner sdk.AccAddress) (tokens []tokentypes.FanTokenI)
- func (k Keeper) GetOwner(ctx sdk.Context, denom string) (sdk.AccAddress, error)
- func (k Keeper) GetParamSet(ctx sdk.Context) tokentypes.Params
- func (k Keeper) HasFanToken(ctx sdk.Context, denom string) bool
- func (k Keeper) HasSymbol(ctx sdk.Context, symbol string) bool
- func (k Keeper) IssueFanToken(ctx sdk.Context, symbol string, name string, maxSupply sdk.Int, ...) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintFanToken(ctx sdk.Context, recipient sdk.AccAddress, denom string, amount sdk.Int, ...) error
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParamSet(ctx sdk.Context, params tokentypes.Params)
- func (k Keeper) TotalBurn(c context.Context, req *types.QueryTotalBurnRequest) (*types.QueryTotalBurnResponse, error)
- func (k Keeper) TransferFanTokenOwner(ctx sdk.Context, symbol string, srcOwner sdk.AccAddress, ...) error
- type ValidateTokenFeeDecorator
Constants ¶
const ( FeeFactorBase = 3 FeeFactorExp = 4 )
fee factor formula: (ln(len({name}))/ln{base})^{exp}
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the token MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) AddBurnCoin ¶
AddBurnCoin saves the total amount of the burned tokens
func (Keeper) AddFanToken ¶
AddToken saves a new token
func (Keeper) BurnFanToken ¶
func (k Keeper) BurnFanToken( ctx sdk.Context, denom string, amount sdk.Int, owner sdk.AccAddress, ) error
BurnToken burns the specified amount of token
func (Keeper) DeductIssueFanTokenFee ¶
func (k Keeper) DeductIssueFanTokenFee(ctx sdk.Context, owner sdk.AccAddress, issueFee sdk.Coin, symbol string) error
DeductIssueTokenFee performs fee handling for issuing token
func (Keeper) EditFanToken ¶
func (k Keeper) EditFanToken( ctx sdk.Context, symbol string, mintable bool, owner sdk.AccAddress, ) error
EditToken edits the specified token
func (Keeper) FanToken ¶
func (k Keeper) FanToken(c context.Context, req *types.QueryFanTokenRequest) (*types.QueryFanTokenResponse, error)
func (Keeper) FanTokens ¶
func (k Keeper) FanTokens(c context.Context, req *types.QueryFanTokensRequest) (*types.QueryFanTokensResponse, error)
func (Keeper) GetAllBurnCoin ¶
GetAllBurnCoin returns the total amount of all the burned tokens
func (Keeper) GetBurnCoin ¶
GetBurnCoin returns the total amount of the burned tokens
func (Keeper) GetFanToken ¶
GetToken returns the token of the specified symbol or min uint
func (Keeper) GetFanTokenIssueFee ¶
GetTokenIssueFee returns the token issuance fee
func (Keeper) GetFanTokens ¶
func (k Keeper) GetFanTokens(ctx sdk.Context, owner sdk.AccAddress) (tokens []tokentypes.FanTokenI)
GetTokens returns all existing tokens
func (Keeper) GetParamSet ¶
func (k Keeper) GetParamSet(ctx sdk.Context) tokentypes.Params
GetParamSet returns token params from the global param store
func (Keeper) HasFanToken ¶
HasToken asserts a token exists
func (Keeper) IssueFanToken ¶
func (k Keeper) IssueFanToken( ctx sdk.Context, symbol string, name string, maxSupply sdk.Int, description string, owner sdk.AccAddress, issueFee sdk.Coin, ) error
IssueToken issues a new token
func (Keeper) MintFanToken ¶
func (k Keeper) MintFanToken( ctx sdk.Context, recipient sdk.AccAddress, denom string, amount sdk.Int, owner sdk.AccAddress, ) error
MintToken mints the specified amount of token to the specified recipient NOTE: empty owner means that the external caller is responsible to manage the token authority
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params return the all the parameter in tonken module
func (Keeper) SetParamSet ¶
func (k Keeper) SetParamSet(ctx sdk.Context, params tokentypes.Params)
SetParamSet sets token params to the global param store
func (Keeper) TotalBurn ¶
func (k Keeper) TotalBurn(c context.Context, req *types.QueryTotalBurnRequest) (*types.QueryTotalBurnResponse, error)
TotalBurn return the all burn coin
func (Keeper) TransferFanTokenOwner ¶
func (k Keeper) TransferFanTokenOwner( ctx sdk.Context, symbol string, srcOwner sdk.AccAddress, dstOwner sdk.AccAddress, ) error
TransferTokenOwner transfers the owner of the specified token to a new one
type ValidateTokenFeeDecorator ¶
type ValidateTokenFeeDecorator struct {
// contains filtered or unexported fields
}
func NewValidateTokenFeeDecorator ¶
func NewValidateTokenFeeDecorator(k Keeper, bk types.BankKeeper) ValidateTokenFeeDecorator
func (ValidateTokenFeeDecorator) AnteHandle ¶
func (dtf ValidateTokenFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)
AnteHandle returns an AnteHandler that checks if the balance of the fee payer is sufficient for token related fee