ante

package
v6.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

func NewAnteHandler(options HandlerOptions) sdk.AnteHandler

NewAnteHandler returns an ante handler responsible for attempting to route an Ethereum or SDK transaction to an internal ante handler for performing transaction-level processing (e.g. fee payment, signature verification) before being passed onto it's respective handler.

Types

type EVMHandlerOptions

type EVMHandlerOptions struct {
	Cdc                    codec.BinaryCodec
	AccountKeeper          anteinterfaces.AccountKeeper
	BankKeeper             anteinterfaces.BankKeeper
	IBCKeeper              *ibckeeper.Keeper
	FeeMarketKeeper        anteinterfaces.FeeMarketKeeper
	EvmKeeper              anteinterfaces.EVMKeeper
	FeegrantKeeper         ante.FeegrantKeeper
	ExtensionOptionChecker ante.ExtensionOptionChecker
	SignModeHandler        *txsigning.HandlerMap
	SigGasConsumer         func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
	MaxTxGasWanted         uint64
	// use dynamic fee checker or the cosmos-sdk default one for native transactions
	DynamicFeeChecker bool
	PendingTxListener chainante.PendingTxListener
}

HandlerOptions defines the list of module keepers required to run the Cosmos EVM AnteHandler decorators.

func (EVMHandlerOptions) Options

func (options EVMHandlerOptions) Options() EVMHandlerOptions

func (EVMHandlerOptions) Validate

func (options EVMHandlerOptions) Validate() error

Validate checks if the keepers are defined

func (EVMHandlerOptions) WithCodec

func (options EVMHandlerOptions) WithCodec(cdc codec.BinaryCodec) *EVMHandlerOptions

func (EVMHandlerOptions) WithMaxTxGasWanted

func (options EVMHandlerOptions) WithMaxTxGasWanted(maxTxGasWanted uint64) *EVMHandlerOptions

type HandlerOptions

type HandlerOptions struct {
	EvmOptions            EVMHandlerOptions
	IBCKeeper             *keeper.Keeper
	WasmConfig            *wasmTypes.NodeConfig
	WasmKeeper            *wasmkeeper.Keeper
	TXCounterStoreService corestoretypes.KVStoreService
	CircuitKeeper         *circuitkeeper.Keeper
	SanctionKeeper        *sanctionkeeper.Keeper
}

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

func (HandlerOptions) Validate

func (options HandlerOptions) Validate() error

Validate checks if the keepers are defined

type MultiChainIDDecorator

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

MultiChainIDDecorator is a custom decorator that allows an additional chain ID for signature verification. It wraps the standard SigVerificationDecorator.

func NewMultiChainIDDecorator

func NewMultiChainIDDecorator(svd ante.SigVerificationDecorator) MultiChainIDDecorator

NewMultiChainIDDecorator creates a new MultiChainIDDecorator.

func (MultiChainIDDecorator) AnteHandle

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

AnteHandle performs signature verification. If the signature verification fails with the context's chain ID, it retries with a derived EVM-compatible chain ID (e.g. "mantra-1" -> "mantra-evm-1").

Jump to

Keyboard shortcuts

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