23 releases (major breaking)

20.0.0 Sep 26, 2024
19.0.0 Jul 18, 2024
18.0.0 Jul 12, 2024
17.0.0 Jun 24, 2024
0.1.0-dev.2 Jul 27, 2023

#10 in #fee

Download history 660/week @ 2024-08-26 365/week @ 2024-09-02 670/week @ 2024-09-09 389/week @ 2024-09-16 665/week @ 2024-09-23 611/week @ 2024-09-30 630/week @ 2024-10-07 932/week @ 2024-10-14 1254/week @ 2024-10-21 994/week @ 2024-10-28 864/week @ 2024-11-04 20540/week @ 2024-11-11 24898/week @ 2024-11-18 27845/week @ 2024-11-25 22547/week @ 2024-12-02 27510/week @ 2024-12-09

104,017 downloads per month
Used in 13 crates (4 directly)

Apache-2.0

2.5MB
42K SLoC

pallet-asset-conversion-tx-payment

Asset Conversion Transaction Payment Pallet

This pallet allows runtimes that include it to pay for transactions in assets other than the native token of the chain.

Overview

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.

Integration

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

Release

Polkadot SDK stable2409

Dependencies

~18–32MB
~532K SLoC