ante

package
v0.1.4-testnet-hotfix Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnteHandler

func NewAnteHandler(options HandlerOptions, consensusKeeper consensusparamkeeper.Keeper) (sdk.AnteHandler, error)

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

func Recover added in v0.0.6

func Recover(logger log.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 AuthzLimiterDecorator

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

AuthzLimiterDecorator blocks certain msg types from being granted or executed within authz.

func NewAuthzLimiterDecorator

func NewAuthzLimiterDecorator(disabledMsgTypes ...string) AuthzLimiterDecorator

NewAuthzLimiterDecorator creates a decorator to block certain msg types from being granted or executed within authz.

func (AuthzLimiterDecorator) AnteHandle

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

type HandlerOptions added in v0.0.6

type HandlerOptions struct {
	AccountKeeper          *accountkeeper.AccountKeeper
	BankKeeper             bankkeeper.Keeper
	IBCKeeper              *ibckeeper.Keeper
	SpvKeeper              spvkeeper.Keeper
	FeegrantKeeper         authante.FeegrantKeeper
	SignModeHandler        *txsigning.HandlerMap
	SigGasConsumer         authante.SignatureVerificationGasConsumer
	MaxTxGasWanted         uint64
	AddressFetchers        []AddressFetcher
	ExtensionOptionChecker authante.ExtensionOptionChecker
	TxFeeChecker           authante.TxFeeChecker
}

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

type SPVNFTDecorator added in v0.0.6

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

SPVNFTDecorator blocks certain msg types from being granted or executed within authz.

func NewSPVNFTDecorator added in v0.0.6

func NewSPVNFTDecorator(keeper spvkeeper.Keeper) SPVNFTDecorator

NewSPVNFTDecorator creates a decorator to block spv nft from transferring.

func (SPVNFTDecorator) AnteHandle added in v0.0.6

func (sd SPVNFTDecorator) 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