ante

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

func NewAnteHandler(options 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)

Types

type AddressFetcher

type AddressFetcher func(sdk.Context) []sdk.AccAddress

AddressFetcher is a type signature for functions used by the AuthenticatedMempoolDecorator to get authorized addresses.

type AuthenticatedMempoolDecorator

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

AuthenticatedMempoolDecorator blocks all txs from reaching the mempool unless they're signed by one of the authorzed addresses. It only runs before entry to mempool (CheckTx), and not in consensus (DeliverTx)

func NewAuthenticatedMempoolDecorator

func NewAuthenticatedMempoolDecorator(fetchers ...AddressFetcher) AuthenticatedMempoolDecorator

func (AuthenticatedMempoolDecorator) AnteHandle

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

type HandlerOptions

type HandlerOptions struct {
	AccountKeeper   evmtypes.AccountKeeper
	BankKeeper      evmtypes.BankKeeper
	EvmKeeper       evmante.EVMKeeper
	FeegrantKeeper  authante.FeegrantKeeper
	SignModeHandler authsigning.SignModeHandler
	SigGasConsumer  authante.SignatureVerificationGasConsumer
	FeeMarketKeeper evmtypes.FeeMarketKeeper
	AddressFetchers []AddressFetcher
	MaxTxGasWanted  uint64
}

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

func (HandlerOptions) Validate

func (options HandlerOptions) Validate() error

Jump to

Keyboard shortcuts

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