35 major breaking releases

38.0.0 Sep 26, 2024
37.0.0 Jul 18, 2024
36.0.0 Jul 12, 2024
35.0.0 Jun 21, 2024
0.0.0 Nov 21, 2022

#3 in #fee

Download history 1062/week @ 2024-08-26 622/week @ 2024-09-02 1110/week @ 2024-09-09 884/week @ 2024-09-16 1329/week @ 2024-09-23 1338/week @ 2024-09-30 1220/week @ 2024-10-07 1628/week @ 2024-10-14 1972/week @ 2024-10-21 1606/week @ 2024-10-28 1675/week @ 2024-11-04 21157/week @ 2024-11-11 25968/week @ 2024-11-18 28791/week @ 2024-11-25 23468/week @ 2024-12-02 28922/week @ 2024-12-09

108,449 downloads per month
Used in 51 crates (6 directly)

Apache-2.0

2.5MB
46K 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 SignedExtension (ChargeAssetTxPayment).

License: Apache-2.0

Release

Polkadot SDK stable2409


lib.rs:

Asset Transaction Payment Pallet

This pallet allows runtimes that include it to pay for transactions in assets other than the main 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 SignedExtension (ChargeAssetTxPayment).

Dependencies

~17–32MB
~524K SLoC