Skip to content

TransactionPayment


Storage functions


NextFeeMultiplier

Python

result = substrate.query(
    'TransactionPayment', 'NextFeeMultiplier', []
)

Return value

'u128'

StorageVersion

Python

result = substrate.query(
    'TransactionPayment', 'StorageVersion', []
)

Return value

('V1Ancient', 'V2')

Constants


OperationalFeeMultiplier

A fee mulitplier for Operational extrinsics to compute "virtual tip" to boost their priority

This value is multipled by the final_fee to obtain a "virtual tip" that is later added to a tip component in regular priority calculations. It means that a Normal transaction can front-run a similarly-sized Operational extrinsic (with no tip), by including a tip value greater than the virtual tip.

``rust,ignore // ForNormal` let priority = priority_calc(tip);

// For Operational let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier; let priority = priority_calc(tip + virtual_tip); ```

Note that since we use final_fee the multiplier applies also to the regular tip sent with the transaction. So, not only does the transaction get a priority bump based on the inclusion_fee, but we also amplify the impact of tips applied to Operational transactions.

Value

5

Python

constant = substrate.get_constant('TransactionPayment', 'OperationalFeeMultiplier')

TransactionByteFee

The fee to be paid for making a transaction; the per-byte portion.

Value

100

Python

constant = substrate.get_constant('TransactionPayment', 'TransactionByteFee')

WeightToFee

The polynomial that is applied in order to derive fee from weight.

Value

[{'coeff_frac': 8000, 'coeff_integer': 0, 'degree': 1, 'negative': False}]

Python

constant = substrate.get_constant('TransactionPayment', 'WeightToFee')