keeper

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HUNDRED_DEC = sdkmath.LegacyNewDec(100)

Functions

func NewMsgServerImpl

func NewMsgServerImpl(k Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the x/tax MsgServer interface.

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,
	storeService store.KVStoreService,
	wasmKeeper types.WasmKeeper,
	authority string,
) Keeper

func (Keeper) BaseDenom

func (k Keeper) BaseDenom(ctx context.Context) string

BseDenom returns the base denom.

func (Keeper) ContractAddress

func (k Keeper) ContractAddress(ctx context.Context) string

ContractAddress returns the contract address.

func (Keeper) CustomTxFeeChecker added in v0.5.0

func (k Keeper) CustomTxFeeChecker(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error)

CustomTxFeeChecker reuses the default fee logic, but we will add the ability to pay fees in other denoms defined as a module parameter. The exact price will be calculated in base asset(defined in the min-gas-prices of the validators' config).

func (Keeper) FeeRate

func (k Keeper) FeeRate(ctx context.Context) int32

FeeRate returns the fee rate.

func (Keeper) GetAuthority added in v0.5.0

func (k Keeper) GetAuthority() string

GetAuthority returns the x/tax module's authority.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx context.Context) (params types.Params, err error)

GetParams get all parameters as types.Params.

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) SetParams

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

SetParams set the params.

type Migrator added in v0.5.0

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

Migrator is a struct for handling in-place state migrations.

func NewMigrator added in v0.5.0

func NewMigrator(k Keeper, ss exported.Subspace) Migrator

func (Migrator) Migrate2to3 added in v0.5.0

func (m Migrator) Migrate2to3(ctx sdk.Context) error

Migrate1to2 migrates the x/tax module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/tax module state.

Jump to

Keyboard shortcuts

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