ante

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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(opts HandlerOptions) (sdk.AnteHandler, error)

NewAnteHandler returns an 'AnteHandler' that will run actions before a tx is sent to a module's handler.

func Recover

func Recover(logger tmlog.Logger, err *error)

func SigVerificationGasConsumer

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

SigVerificationGasConsumer 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)

- secp256k1, secp256r1 (default Cosmos SDK keys)

- multisig (Cosmos SDK multisigs)

Types

type HandlerOptions

type HandlerOptions struct {
	Cdc                    codec.BinaryCodec
	AccountKeeper          evmtypes.AccountKeeper
	BankKeeper             evmtypes.BankKeeper
	IBCKeeper              *ibckeeper.Keeper
	EvmKeeper              evmante.EVMKeeper
	FeegrantKeeper         authante.FeegrantKeeper
	VolunteerKeeper        volunteerante.VolunteerKeeper
	ExtensionOptionChecker authante.ExtensionOptionChecker
	SignModeHandler        authsigning.SignModeHandler
	SigGasConsumer         authante.SignatureVerificationGasConsumer
	FeeMarketKeeper        evmante.FeeMarketKeeper
	MaxTxGasWanted         uint64
	TxFeeChecker           authante.TxFeeChecker

	BypassMinFeeMsgTypes []string
	TxCounterStoreKey    storetypes.StoreKey
	WasmKeeper           *wasmkeeper.Keeper
	WasmConfig           wasmTypes.WasmConfig
}

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

type MinGasPriceDecorator added in v1.3.0

type MinGasPriceDecorator struct {
	BypassMinFeeMsgTypes []string
	// contains filtered or unexported fields
}

MinGasPriceDecorator will check if the transaction's fee is at least as large as the MinGasPrices param. If fee is too low, decorator returns error and tx is rejected. This applies for both CheckTx and DeliverTx If fee is high enough, then call next AnteHandler CONTRACT: Tx must implement FeeTx to use MinGasPriceDecorator

func NewMinGasPriceDecorator added in v1.3.0

func NewMinGasPriceDecorator(fk ethermintante.FeeMarketKeeper, ek ethermintante.EVMKeeper, bypassMsgTypes []string) MinGasPriceDecorator

func (MinGasPriceDecorator) AnteHandle added in v1.3.0

func (mpd MinGasPriceDecorator) 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