post

package
v30.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BankSendGasConsumption = 12490

BankSendGasConsumption is the gas consumption of the bank sends that occur during feemarket handler execution.

Variables

This section is empty.

Functions

func DeductCoins

func DeductCoins(bankKeeper bankkeeper.Keeper, ctx sdk.Context, coins sdk.Coins, distributeFees bool) error

DeductCoins deducts coins from the given account. Coins can be sent to the default fee collector ( causes coins to be distributed to stakers) or kept in the fee collector account (soft burn).

func SendTip

func SendTip(bankKeeper bankkeeper.Keeper, ctx sdk.Context, proposer sdk.AccAddress, coins sdk.Coins) error

SendTip sends a tip to the current block proposer.

Types

type FeeMarketDeductDecorator

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

FeeMarketDeductDecorator deducts fees from the fee payer based off of the current state of the feemarket. The fee payer is the fee granter (if specified) or first signer of the tx. If the fee payer does not have the funds to pay for the fees, return an InsufficientFunds error. If there is an excess between the given fee and the on-chain min base fee is given as a tip. Call next PostHandler if fees successfully deducted. CONTRACT: Tx must implement FeeTx interface

func (FeeMarketDeductDecorator) PayOutFeeAndRefundFeePay

func (dfd FeeMarketDeductDecorator) PayOutFeeAndRefundFeePay(ctx sdk.Context, feeTx sdk.FeeTx, fee, refund sdk.Coin) error

PayOutFeeAndRefundFeePay handles the payout for a feepay-covered tx:

  • the consumed fee is deducted as usual (distributed or soft-burned per params.DistributeFees);
  • the unused-gas remainder of the escrow is refunded from the feemarket-fee-collector back to the x/feepay module account and re-credited to the executing contract's feepay balance.

No proposer tip is generated for feepay txs.

func (FeeMarketDeductDecorator) PayOutFeeAndTip

func (dfd FeeMarketDeductDecorator) PayOutFeeAndTip(ctx sdk.Context, fee, tip sdk.Coin) error

PayOutFeeAndTip deducts the provided fee and tip from the fee payer. If the tx uses a feegranter, the fee granter address will pay the fee instead of the tx signer.

func (FeeMarketDeductDecorator) PostHandle

func (dfd FeeMarketDeductDecorator) PostHandle(ctx sdk.Context, tx sdk.Tx, simulate, success bool, next sdk.PostHandler) (sdk.Context, error)

PostHandle deducts the fee from the fee payer based on the min base fee and the gas consumed in the gasmeter. If there is a difference between the provided fee and the min-base fee, the difference is paid as a tip. Fees are sent to the x/feemarket fee-collector address.

Jump to

Keyboard shortcuts

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