keeper

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	FeeFactorBase = 3
	FeeFactorExp  = 4
)

fee factor formula: (ln(len({name}))/ln{base})^{exp}

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc codec.Marshaler, key sdk.StoreKey, paramSpace params.Subspace,
	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, feeCollectorName string) Keeper

func (Keeper) AddToken

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

AddToken saves a new token

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) DeductMintTokenFee

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

DeductMintTokenFee performs fee handling for minting token

func (Keeper) EditToken

func (k Keeper) EditToken(ctx sdk.Context, msg types.MsgEditToken) error

EditToken edits the specified token

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) (token exported.TokenI, err error)

GetToken returns the token of the specified symbol or minUint

func (Keeper) GetTokenIssueFee

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

GetTokenIssueFee returns the token issurance fee

func (Keeper) GetTokenMintFee

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

GetTokenMintFee returns the token minting fee

func (Keeper) GetTokens

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

GetTokens returns all existing tokens

func (Keeper) HasToken

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

HasToken asserts a token exists

func (Keeper) IssueToken

func (k Keeper) IssueToken(ctx sdk.Context, msg types.MsgIssueToken) error

IssueToken issues a new token

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MintToken

func (k Keeper) MintToken(ctx sdk.Context, msg types.MsgMintToken) error

MintToken mints specified amount token to a specified owner

func (Keeper) SetParamSet

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

SetParamSet set token params from the global param store

func (Keeper) TransferTokenOwner

func (k Keeper) TransferTokenOwner(ctx sdk.Context, msg types.MsgTransferTokenOwner) error

TransferTokenOwner transfers the owner of the specified token to a new one

type ValidateTokenFeeDecorator

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

func (ValidateTokenFeeDecorator) AnteHandle

func (dtf ValidateTokenFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

AnteHandle returns an AnteHandler that checks if the balance of the fee payer is sufficient for token related fee

Jump to

Keyboard shortcuts

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