ante

package
v8.0.0-...-5660e53 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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 DefaultSigVerificationGasConsumer

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

DefaultSigVerificationGasConsumer is the default 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.

func NewAnteHandler

func NewAnteHandler(options HandlerOptions) sdk.AnteHandler

Types

type CheckTxFeees

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

func NewCheckTxFeees

func NewCheckTxFeees(bypassMinFeeMsgTypes []string, maxBypassMinFeeMsgGasUsage uint64) CheckTxFeees

func (CheckTxFeees) Check

func (ctf CheckTxFeees) Check(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error)

type DisableMsgDecorator

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

func NewDisableMsgDecorator

func NewDisableMsgDecorator(disabledMsgTypes []string, govKeeper Govkeeper) DisableMsgDecorator

func (DisableMsgDecorator) AnteHandle

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

type EthPubKeyDecorator

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

func NewEthPubKeyDecorator

func NewEthPubKeyDecorator(ak ante.AccountKeeper) EthPubKeyDecorator

func (EthPubKeyDecorator) AnteHandle

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

type Govkeeper

type Govkeeper interface {
	GetDisabledMsgs(ctx sdk.Context) []string
}

type HandlerOptions

type HandlerOptions struct {
	AccountKeeper     evmtypes.AccountKeeper
	BankKeeper        authtypes.BankKeeper
	FeegrantKeeper    ante.FeegrantKeeper
	EvmKeeper         ethante.EVMKeeper
	FeeMarketKeeper   evmtypes.FeeMarketKeeper
	IbcKeeper         *ibckeeper.Keeper
	GovKeeper         Govkeeper
	SignModeHandler   *txsigning.HandlerMap
	SigGasConsumer    ante.SignatureVerificationGasConsumer
	TxFeeChecker      ante.TxFeeChecker
	MaxTxGasWanted    uint64
	InterceptMsgTypes map[int64][]string
	DisabledAuthzMsgs []string
	PendingTxListener ethante.PendingTxListener

	UnsafeUnorderedTx bool
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper, EVM Keeper and Fee Market Keeper.

func (HandlerOptions) Validate

func (options HandlerOptions) Validate() error

type PubKeyDecorator

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

func NewPubKeyDecorator

func NewPubKeyDecorator(ak ante.AccountKeeper) PubKeyDecorator

func (PubKeyDecorator) AnteHandle

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

type RejectExtensionOptionsDecorator

type RejectExtensionOptionsDecorator struct{}

RejectExtensionOptionsDecorator is an AnteDecorator that rejects all extension options which can optionally be included in protobuf transactions. Users that need extension options should create a custom AnteHandler chain that handles needed extension options properly and rejects unknown ones.

func NewRejectExtensionOptionsDecorator

func NewRejectExtensionOptionsDecorator() RejectExtensionOptionsDecorator

NewRejectExtensionOptionsDecorator creates a new RejectExtensionOptionsDecorator

func (RejectExtensionOptionsDecorator) AnteHandle

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

AnteHandle implements the AnteDecorator.AnteHandle method

type TxListenerDecorator

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

func (TxListenerDecorator) AnteHandle

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

Jump to

Keyboard shortcuts

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