Crates.io | pallet-asset-tx-payment |
lib.rs | pallet-asset-tx-payment |
version | 38.0.0 |
source | src |
created_at | 2022-11-21 10:38:51.710078 |
updated_at | 2024-09-26 06:24:27.915311 |
description | pallet to manage transaction payments in assets |
homepage | https://paritytech.github.io/polkadot-sdk/ |
repository | https://github.com/paritytech/polkadot-sdk.git |
max_upload_size | |
id | 719999 |
size | 48,739 |
This pallet allows runtimes that include it to pay for transactions in assets other than the native token of the chain.
It does this by extending transactions to include an optional AssetId
that specifies the asset
to be used for payment (defaulting to the native token on None
). It expects an
[OnChargeAssetTransaction
] implementation analogously to [pallet-transaction-payment
]. The
included [FungiblesAdapter
] (implementing [OnChargeAssetTransaction
]) determines the fee
amount by converting the fee calculated by [pallet-transaction-payment
] into the desired
asset.
This pallet wraps FRAME's transaction payment pallet and functions as a replacement. This means
you should include both pallets in your construct_runtime
macro, but only include this
pallet's [SignedExtension
] ([ChargeAssetTxPayment
]).
License: Apache-2.0
Polkadot SDK stable2409