Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( EmptyAnte = func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { return ctx, nil } )
This empty ante is used to call AnteHandles that are not attached to the main AnteHandler.
Functions ¶
Types ¶
type DeductFeeDecorator ¶
type DeductFeeDecorator struct {
// contains filtered or unexported fields
}
DeductFeeDecorator deducts fees from the first signer of the tx If the first signer 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 FeeTx interface to use DeductFeeDecorator
Additionally, the Deduct Fee ante is a fork of the SDK's DeductFeeDecorator. This decorator looks for single message transactions with no provided fee. If they correspond to a registered FeePay Contract, the FeePay module will cover the cost of the fee (if the balance permits).
func NewDeductFeeDecorator ¶
func NewDeductFeeDecorator(fpk feepaykeeper.Keeper, gfk globalfeekeeper.Keeper, ak ante.AccountKeeper, bk bankkeeper.Keeper, fgk ante.FeegrantKeeper, bondDenom string, isFeePayTx *bool) DeductFeeDecorator
func (DeductFeeDecorator) AnteHandle ¶
type MsgIsFeePayTx ¶
type MsgIsFeePayTx struct {
// contains filtered or unexported fields
}
MsgFilterDecorator defines an AnteHandler decorator that only checks and saves if a
func NewFeeRouteDecorator ¶
func NewFeeRouteDecorator(feePayKeeper feepaykeeper.Keeper, feePayDecorator *DeductFeeDecorator, globalFeeDecorator *globalfeeante.FeeDecorator, isFeePayTx *bool) MsgIsFeePayTx
func (MsgIsFeePayTx) AnteHandle ¶
func (mfd MsgIsFeePayTx) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
This handle is responsible for routing the transaction to the fee decorators in the right order.