Crates.io | pallet-asset-conversion-tx-payment |
lib.rs | pallet-asset-conversion-tx-payment |
version | 20.0.0 |
source | src |
created_at | 2023-07-25 18:30:17.540148 |
updated_at | 2024-09-26 09:02:32.305854 |
description | Pallet to manage transaction payments in assets by converting them to native assets. |
homepage | https://paritytech.github.io/polkadot-sdk/ |
repository | https://github.com/paritytech/polkadot-sdk.git |
max_upload_size | |
id | 925855 |
size | 59,771 |
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 [AssetConversionAdapter
] (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