keeper

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 17 Imported by: 17 modules, 47 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler, key sdk.StoreKey, paramSpace paramstypes.Subspace,
	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) Fees

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 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 []types.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) Params

func (Keeper) SetParamSet

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

SetParamSet set token params from the global param store

func (Keeper) Token

func (Keeper) Tokens

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

Jump to

Keyboard shortcuts

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