ante

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error)

Types

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions
	IBCKeeper                  *ibckeeper.Keeper
	BypassMinFeeMsgTypes       []string
	MaxBypassMinFeeMsgGasUsage string
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.

func (HandlerOptions) GetMaxBypassMinFeeMsgGasUsage

func (h HandlerOptions) GetMaxBypassMinFeeMsgGasUsage() uint64

type MempoolFeeDecorator

type MempoolFeeDecorator struct {
	BypassMinFeeMsgTypes       []string
	MaxBypassMinFeeMsgGasUsage uint64
}

MempoolFeeDecorator will check if the transaction's fee is at least as large as the local validator's minimum gasFee (defined in validator config).

If fee is too low, decorator returns error and tx is rejected from mempool. Note this only applies when ctx.CheckTx = true. If fee is high enough or not CheckTx, then call next AnteHandler.

CONTRACT: Tx must implement FeeTx to use MempoolFeeDecorator

func NewMempoolFeeDecorator

func NewMempoolFeeDecorator(bypassMsgTypes []string, MaxBypassMinFeeMsgGasUsage uint64) MempoolFeeDecorator

func (MempoolFeeDecorator) AnteHandle

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

Jump to

Keyboard shortcuts

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