Crate pallet_transaction_payment[][src]

Transaction Payment Module

This module provides the basic logic needed to pay the absolute minimum amount needed for a transaction to be included. This includes:

The base fee and adjusted weight and length fees constitute the inclusion fee, which is the minimum fee for a transaction to be included in a block.

The formula of final fee:

inclusion_fee = base_fee + length_fee + [targeted_fee_adjustment * weight_fee];
final_fee = inclusion_fee + tip;

Additionally, this module allows one to configure:

Re-exports

pub use $crate::traits::GetPalletVersion as _;

Structs

ChargeTransactionPayment

Require the transactor pay for themselves and maybe include a tip to gain additional priority in the queue.

CurrencyAdapter

Implements the transaction payment for a module implementing the Currency trait (eg. the pallet_balances) using an unbalance handler (implementing OnUnbalanced).

FeeDetails

The FeeDetails is composed of:

GenesisConfig

Genesis config for the module, allow to build genesis storage.

InclusionFee

The base fee and adjusted weight and length fees constitute the inclusion fee.

Module
NextFeeMultiplier
RuntimeDispatchInfo

Information related to a dispatchable’s class, weight, and fee that can be queried from the runtime.

TargetedFeeAdjustment

A struct to update the weight multiplier per block. It implements Convert<Multiplier, Multiplier>, meaning that it can convert the previous multiplier to the next one. This should be called on on_finalize of a block, prior to potentially cleaning the weight data from the system module.

Enums

Call

Dispatchable calls.

Traits

Config
MultiplierUpdate

Something that can convert the current multiplier to the next one.

OnChargeTransaction

Handle withdrawing, refunding and depositing of transaction fees.

Type Definitions

Multiplier

Fee multiplier.