keeper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HUNDRED_DEC = sdk.NewDec(100)

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type DeductTaxDecorator

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

DeductTaxDecorator deducts tax by a given fee rate from the standard collected fee. The tax is sent to a treasury account Call next AnteHandler if tax successfully sent to treasury or no fee provided CONTRACT: Tx must implement FeeTx interface to use DeductTaxDecorator.

func (DeductTaxDecorator) AnteHandle

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

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
) *Keeper

func (Keeper) BaseDenom

func (k Keeper) BaseDenom(ctx sdk.Context) (res string)

BseDenom returns the base denom.

func (Keeper) ContractAddress

func (k Keeper) ContractAddress(ctx sdk.Context) (res string)

ContractAddress returns the contract address.

func (Keeper) FeeRate

func (k Keeper) FeeRate(ctx sdk.Context) (res int32)

FeeRate returns the fee rate.

func (Keeper) GetParams

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

GetParams get all parameters as types.Params.

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) SetParams

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

SetParams set the params.

Jump to

Keyboard shortcuts

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