ante

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: Apache-2.0 Imports: 22 Imported by: 16

Documentation

Index

Constants

View Source
const (
	Secp256k1VerifyCost uint64 = 21000
)

Variables

This section is empty.

Functions

func ConsumeMultisignatureVerificationGas

func ConsumeMultisignatureVerificationGas(
	meter storetypes.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey,
	params authtypes.Params, accSeq uint64,
) error

ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature

func NewAnteHandler added in v0.5.0

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.

func SigVerificationGasConsumer

func SigVerificationGasConsumer(
	meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params,
) error

SigVerificationGasConsumer is the Cosmos EVM implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type. The types of keys supported are:

- ethsecp256k1 (Ethereum keys)

- secp256k1 (Cosmos keys)

- ed25519 (Validators)

- multisig (Cosmos SDK multisigs)

Types

type HandlerOptions added in v0.4.0

type HandlerOptions 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 PendingTxListener
}

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

func (HandlerOptions) Validate added in v0.4.0

func (options HandlerOptions) Validate() error

Validate checks if the keepers are defined

type PendingTxListener added in v0.4.0

type PendingTxListener func(common.Hash)

type TxListenerDecorator added in v0.4.0

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

func NewTxListenerDecorator added in v0.4.0

func NewTxListenerDecorator(pendingTxListener PendingTxListener) TxListenerDecorator

NewTxListenerDecorator creates a new TxListenerDecorator with the provided PendingTxListener. CONTRACT: must be put at the last of the chained decorators

func (TxListenerDecorator) AnteHandle added in v0.4.0

func (d TxListenerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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