ante

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 26 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 DefaultSigVerificationGasConsumer

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

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 HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions
	BankKeeper           bankkeeper.Keeper
	AccountKeeper        authkeeper.AccountKeeper
	IBCKeeper            *ibckeeper.Keeper
	TokenKeeper          tokenkeeper.Keeper
	OracleKeeper         oraclekeeper.Keeper
	GuardianKeeper       guardiankeeper.Keeper
	EvmKeeper            ethante.EVMKeeper
	FeeMarketKeeper      ethante.FeeMarketKeeper
	BypassMinFeeMsgTypes []string
	MaxTxGasWanted       uint64
}

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

type RejectMessagesDecorator

type RejectMessagesDecorator struct{}

RejectMessagesDecorator prevents invalid msg types from being executed

func (RejectMessagesDecorator) AnteHandle

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

AnteHandle rejects the following messages: 1. Messages that requires ethereum-specific authentication. For example `MsgEthereumTx` requires fee to be deducted in the antehandler in order to perform the refund. 2. Messages that creates vesting accounts.

type ValidateServiceDecorator

type ValidateServiceDecorator struct{}

ValidateServiceDecorator is responsible for checking the permission to execute MsgCallService

func NewValidateServiceDecorator

func NewValidateServiceDecorator() ValidateServiceDecorator

NewValidateServiceDecorator returns an instance of ServiceAuthDecorator

func (ValidateServiceDecorator) AnteHandle

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

AnteHandle checks the transaction

type ValidateTokenDecorator

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

ValidateTokenDecorator is responsible for restricting the token participation of the swap prefix

func NewValidateTokenDecorator

func NewValidateTokenDecorator(tk tokenkeeper.Keeper) ValidateTokenDecorator

NewValidateTokenDecorator returns an instance of ValidateTokenDecorator

func (ValidateTokenDecorator) AnteHandle

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

AnteHandle checks the transaction

Jump to

Keyboard shortcuts

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