Documentation ¶
Index ¶
- Variables
- func FormatTx(tx sdk.Tx) string
- func NewAnteHandler(accountKeeper ante.AccountKeeper, bankKeeper authtypes.BankKeeper, ...) sdk.AnteHandler
- func ValidateTxFee(ctx sdk.Context, tx sdk.Tx, paramKeeper params.Keeper) (sdk.Coins, int64, error)
- func ValidateTxFeeWrapper(paramKeeper params.Keeper) ante.TxFeeChecker
- type ConsumeTxSizeGasDecorator
- type GovProposalDecorator
- type HandlePanicDecorator
- type MaxTxSizeDecorator
- type MsgVersioningGateKeeper
Constants ¶
This section is empty.
Variables ¶
var DefaultSigVerificationGasConsumer = ante.DefaultSigVerificationGasConsumer
Functions ¶
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 ¶
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 ¶
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 ¶
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