37 major breaking releases

40.0.0 Apr 3, 2025
39.1.0 Mar 27, 2025
39.0.0 Jan 13, 2025
38.0.0 Sep 26, 2024
0.0.0 Nov 21, 2022

#41 in #pallet

Download history 6653/week @ 2024-12-22 12613/week @ 2024-12-29 22308/week @ 2025-01-05 33425/week @ 2025-01-12 31776/week @ 2025-01-19 26864/week @ 2025-01-26 30130/week @ 2025-02-02 34295/week @ 2025-02-09 34232/week @ 2025-02-16 11859/week @ 2025-02-23 4561/week @ 2025-03-02 5890/week @ 2025-03-09 4161/week @ 2025-03-16 4923/week @ 2025-03-23 4180/week @ 2025-03-30 4225/week @ 2025-04-06

17,810 downloads per month
Used in 82 crates (6 directly)

Apache-2.0

3MB
52K SLoC

pallet-asset-tx-payment

Asset 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 FungiblesAdapter (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

Dependencies

~19–34MB
~581K SLoC