ante

package
v0.42.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 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(
	ak authkeeper.AccountKeeper, bankKeeper feegranttypes.BankKeeper, feeGrantKeeper feegrantkeeper.Keeper,
	sigGasConsumer authante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler,
) sdk.AnteHandler

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the fee_payer or from fee_granter (if valid grant exist).

Types

type DeductGrantedFeeDecorator

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

DeductGrantedFeeDecorator deducts fees from fee_payer or fee_granter (if exists a valid fee allowance) of the tx If the fee_payer or fee_granter does not have the funds to pay for the fees, return with InsufficientFunds error Call next AnteHandler if fees successfully deducted CONTRACT: Tx must implement GrantedFeeTx interface to use DeductGrantedFeeDecorator

func (DeductGrantedFeeDecorator) AnteHandle

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

AnteHandle performs a decorated ante-handler responsible for deducting transaction fees. Fees will be deducted from the account designated by the FeePayer on a transaction by default. However, if the fee payer differs from the transaction signer, the handler will check if a fee grant has been authorized. If the transaction's signer does not exist, it will be created.

Jump to

Keyboard shortcuts

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