24 releases (major breaking)

new 21.0.0 Jan 13, 2025
20.0.0 Sep 26, 2024
19.0.0 Jul 18, 2024
18.0.0 Jul 12, 2024
0.1.0-dev.2 Jul 27, 2023

#482 in Magic Beans

Download history 636/week @ 2024-09-27 625/week @ 2024-10-04 737/week @ 2024-10-11 1352/week @ 2024-10-18 909/week @ 2024-10-25 1007/week @ 2024-11-01 14934/week @ 2024-11-08 26287/week @ 2024-11-15 25088/week @ 2024-11-22 23886/week @ 2024-11-29 26618/week @ 2024-12-06 24598/week @ 2024-12-13 7885/week @ 2024-12-20 9514/week @ 2024-12-27 21330/week @ 2025-01-03 22857/week @ 2025-01-10

65,457 downloads per month
Used in 14 crates (4 directly)

Apache-2.0

3MB
46K 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 TransactionExtension (ChargeAssetTxPayment).

License: Apache-2.0

Release

Polkadot SDK Stable 2412

Dependencies

~18–33MB
~542K SLoC