[][src]Crate pallet_transaction_payment

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:

  • weight fee: A fee proportional to amount of weight a transaction consumes.
  • length fee: A fee proportional to the encoded length of the transaction.
  • tip: An optional tip. Tip increases the priority of the transaction, giving it a higher chance to be included by the transaction queue.

Additionally, this module allows one to configure:

  • The mapping between one unit of weight to one unit of fee via Trait::WeightToFee.
  • A means of updating the fee for the next block, via defining a multiplier, based on the final state of the chain at the end of the previous block. This can be configured via Trait::FeeMultiplierUpdate

Structs

ChargeTransactionPayment

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

GenesisConfig

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

Module
NextFeeMultiplier
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

MultiplierUpdate

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

Trait

Type Definitions

Multiplier

Fee multiplier.