ante

package
v0.0.0-...-eccf466 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Secp256k1VerifyCost uint64 = 21000
)

Variables

This section is empty.

Functions

func ConsumeMultisignatureVerificationGas

func ConsumeMultisignatureVerificationGas(
	meter sdk.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

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 sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params,
) error

SigVerificationGasConsumer is the neura 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)

- ed25519 (Validators)

- multisig (Cosmos SDK multisigs)

Types

type HandlerOptions

type HandlerOptions struct {
	Cdc                    codec.BinaryCodec
	AccountKeeper          evmtypes.AccountKeeper
	BankKeeper             evmtypes.BankKeeper
	DistributionKeeper     anteutils.DistributionKeeper
	IBCKeeper              *ibckeeper.Keeper
	StakingKeeper          vestingtypes.StakingKeeper
	FeeMarketKeeper        evmante.FeeMarketKeeper
	EvmKeeper              evmante.EVMKeeper
	FeegrantKeeper         ante.FeegrantKeeper
	ExtensionOptionChecker ante.ExtensionOptionChecker
	SignModeHandler        authsigning.SignModeHandler
	SigGasConsumer         func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
	MaxTxGasWanted         uint64
	TxFeeChecker           anteutils.TxFeeChecker
}

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

func (HandlerOptions) Validate

func (options HandlerOptions) Validate() error

Validate checks if the keepers are defined

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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