ante

package
v3.1.0-arabica Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSigVerificationGasConsumer = ante.DefaultSigVerificationGasConsumer

Functions

func FormatTx

func FormatTx(tx sdk.Tx) string

func NewAnteHandler

func NewAnteHandler(
	accountKeeper ante.AccountKeeper,
	bankKeeper authtypes.BankKeeper,
	blobKeeper blob.Keeper,
	feegrantKeeper ante.FeegrantKeeper,
	signModeHandler signing.SignModeHandler,
	sigGasConsumer ante.SignatureVerificationGasConsumer,
	channelKeeper *ibckeeper.Keeper,
	paramKeeper paramkeeper.Keeper,
	msgVersioningGateKeeper *MsgVersioningGateKeeper,
) sdk.AnteHandler

func ValidateTxFee

func ValidateTxFee(ctx sdk.Context, tx sdk.Tx, paramKeeper params.Keeper) (sdk.Coins, int64, error)

ValidateTxFee implements default fee validation logic for transactions. It ensures that the provided transaction fee meets a minimum threshold for the node as well as a network minimum threshold and computes the tx priority based on the gas price.

func ValidateTxFeeWrapper

func ValidateTxFeeWrapper(paramKeeper params.Keeper) ante.TxFeeChecker

The purpose of this wrapper is to enable the passing of an additional paramKeeper parameter in ante.NewDeductFeeDecorator whilst still satisfying the ante.TxFeeChecker type.

Types

type ConsumeTxSizeGasDecorator

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

The code was copied from celestia's fork of the cosmos-sdk: https://github.com/celestiaorg/cosmos-sdk/blob/release/v0.46.x-celestia/x/auth/ante/basic.go In app versions v2 and below, the txSizeCostPerByte used for gas cost estimation is taken from the auth module. In app v3 and above, the versioned constant appconsts.TxSizeCostPerByte is used.

func NewConsumeGasForTxSizeDecorator

func NewConsumeGasForTxSizeDecorator(ak ante.AccountKeeper) ConsumeTxSizeGasDecorator

func (ConsumeTxSizeGasDecorator) AnteHandle

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

type GovProposalDecorator

type GovProposalDecorator struct{}

GovProposalDecorator ensures that a tx with a MsgSubmitProposal has at least one message in the proposal.

func NewGovProposalDecorator

func NewGovProposalDecorator() GovProposalDecorator

func (GovProposalDecorator) AnteHandle

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

AnteHandle implements the AnteHandler interface. It ensures that MsgSubmitProposal has at least one message

type HandlePanicDecorator

type HandlePanicDecorator struct{}

HandlePanicDecorator that catches panics and wraps them in the transaction that caused the panic

func NewHandlePanicDecorator

func NewHandlePanicDecorator() HandlePanicDecorator

func (HandlePanicDecorator) AnteHandle

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

type MaxTxSizeDecorator

type MaxTxSizeDecorator struct{}

MaxTxSizeDecorator ensures that a tx can not be larger than application's configured versioned constant.

func NewMaxTxSizeDecorator

func NewMaxTxSizeDecorator() MaxTxSizeDecorator

func (MaxTxSizeDecorator) AnteHandle

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

AnteHandle implements the AnteHandler interface. It ensures that tx size is under application's configured threshold.

type MsgVersioningGateKeeper

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

MsgVersioningGateKeeper dictates which transactions are accepted for an app version

func NewMsgVersioningGateKeeper

func NewMsgVersioningGateKeeper(acceptedList map[uint64]map[string]struct{}) *MsgVersioningGateKeeper

func (MsgVersioningGateKeeper) AnteHandle

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

AnteHandle implements the ante.Decorator interface

func (MsgVersioningGateKeeper) IsAllowed

func (mgk MsgVersioningGateKeeper) IsAllowed(ctx context.Context, msgName string) (bool, error)

Jump to

Keyboard shortcuts

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