pub type TransactionPayment = Pallet<Runtime>;
Aliased Type§
struct TransactionPayment(/* private fields */);
Implementations
§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
pub fn next_fee_multiplier() -> FixedU128
pub fn next_fee_multiplier() -> FixedU128
Public function to access the next fee multiplier.
pub fn query_info<Extrinsic>(
unchecked_extrinsic: Extrinsic,
len: u32,
) -> RuntimeDispatchInfo<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
Extrinsic: ExtrinsicLike + GetDispatchInfo,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
pub fn query_info<Extrinsic>(
unchecked_extrinsic: Extrinsic,
len: u32,
) -> RuntimeDispatchInfo<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
Extrinsic: ExtrinsicLike + GetDispatchInfo,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
Query the data that we know about the fee of a given call
.
This pallet is not and cannot be aware of the internals of a signed extension, for example a tip. It only interprets the extrinsic as some encoded value and accounts for its weight and length, the runtime’s extrinsic base weight, and the current fee multiplier.
All dispatchables must be annotated with weight and will have some fee info. This function always returns.
pub fn query_fee_details<Extrinsic>(
unchecked_extrinsic: Extrinsic,
len: u32,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
Extrinsic: ExtrinsicLike + GetDispatchInfo,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
pub fn query_fee_details<Extrinsic>(
unchecked_extrinsic: Extrinsic,
len: u32,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
Extrinsic: ExtrinsicLike + GetDispatchInfo,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
Query the detailed fee of a given call
.
pub fn query_call_info(
call: <T as Config>::RuntimeCall,
len: u32,
) -> RuntimeDispatchInfo<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo> + GetDispatchInfo,
pub fn query_call_info(
call: <T as Config>::RuntimeCall,
len: u32,
) -> RuntimeDispatchInfo<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo> + GetDispatchInfo,
Query information of a dispatch class, weight, and fee of a given encoded Call
.
pub fn query_call_fee_details(
call: <T as Config>::RuntimeCall,
len: u32,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo> + GetDispatchInfo,
pub fn query_call_fee_details(
call: <T as Config>::RuntimeCall,
len: u32,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo> + GetDispatchInfo,
Query fee details of a given encoded Call
.
pub fn compute_fee(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balancewhere
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
pub fn compute_fee(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balancewhere
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
Compute the final fee value for a particular transaction.
pub fn compute_fee_details(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
pub fn compute_fee_details(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
Compute the fee details for a particular transaction.
pub fn compute_actual_fee(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
post_info: &<<T as Config>::RuntimeCall as Dispatchable>::PostInfo,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balancewhere
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
pub fn compute_actual_fee(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
post_info: &<<T as Config>::RuntimeCall as Dispatchable>::PostInfo,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balancewhere
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
Compute the actual post dispatch fee for a particular transaction.
Identical to compute_fee
with the only difference that the post dispatch corrected
weight is used for the weight fee calculation.
pub fn compute_actual_fee_details(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
post_info: &<<T as Config>::RuntimeCall as Dispatchable>::PostInfo,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
pub fn compute_actual_fee_details(
len: u32,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
post_info: &<<T as Config>::RuntimeCall as Dispatchable>::PostInfo,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
) -> FeeDetails<<<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance>where
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
Compute the actual post dispatch fee details for a particular transaction.
pub fn length_to_fee(
length: u32,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
pub fn length_to_fee( length: u32, ) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
Compute the length portion of a fee by invoking the configured LengthToFee
impl.
pub fn weight_to_fee(
weight: Weight,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
pub fn weight_to_fee( weight: Weight, ) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
Compute the unadjusted portion of the weight fee by invoking the configured WeightToFee
impl. Note that the input weight
is capped by the maximum block weight before computation.
pub fn deposit_fee_paid_event(
who: <T as Config>::AccountId,
actual_fee: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance,
)
pub fn deposit_fee_paid_event( who: <T as Config>::AccountId, actual_fee: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance, tip: <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance, )
Deposit the [Event::TransactionFeePaid
] event.
Trait Implementations
§impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
§impl<T> Callable<T> for Pallet<T>where
T: Config,
impl<T> Callable<T> for Pallet<T>where
T: Config,
type RuntimeCall = Call<T>
§impl<T> Convert<Weight, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>where
T: Config,
impl<T> Convert<Weight, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>where
T: Config,
§fn convert(
weight: Weight,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
fn convert( weight: Weight, ) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
Compute the fee for the specified weight.
This fee is already adjusted by the per block fee adjustment factor and is therefore the share that the weight contributes to the overall fee of a transaction. It is mainly for informational purposes and not used in the actual fee calculation.
§impl<T, AnyCall> EstimateCallFee<AnyCall, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>where
T: Config,
AnyCall: GetDispatchInfo + Encode,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
impl<T, AnyCall> EstimateCallFee<AnyCall, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance> for Pallet<T>where
T: Config,
AnyCall: GetDispatchInfo + Encode,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
§fn estimate_call_fee(
call: &AnyCall,
post_info: PostDispatchInfo,
) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
fn estimate_call_fee( call: &AnyCall, post_info: PostDispatchInfo, ) -> <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance
§impl<T> GetStorageVersion for Pallet<T>where
T: Config,
impl<T> GetStorageVersion for Pallet<T>where
T: Config,
§type InCodeStorageVersion = NoStorageVersionSet
type InCodeStorageVersion = NoStorageVersionSet
§fn in_code_storage_version() -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version() -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
storage_version
attribute, or
[NoStorageVersionSet
] if the attribute is missing.§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
§fn current_storage_version() -> Self::InCodeStorageVersion
fn current_storage_version() -> Self::InCodeStorageVersion
in_code_storage_version
and will be removed after March 2024.Self::current_storage_version
] instead. Read more§impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn on_finalize(
_: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn on_finalize( _: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
§fn integrity_test()
fn integrity_test()
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read more§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§impl<T> IntegrityTest for Pallet<T>where
T: Config,
impl<T> IntegrityTest for Pallet<T>where
T: Config,
§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].§impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn offchain_worker(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn offchain_worker( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
§impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn on_finalize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
Hooks::on_finalize
].§impl<T> OnGenesis for Pallet<T>where
T: Config,
impl<T> OnGenesis for Pallet<T>where
T: Config,
§fn on_genesis()
fn on_genesis()
§impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Hooks::on_initialize
].§impl<T> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].§impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
§fn module_name() -> &'static str
fn module_name() -> &'static str
§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
§impl<T> PalletsInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletsInfoAccess for Pallet<T>where
T: Config,
§impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
fn storage_info() -> Vec<StorageInfo>
§impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.