29 major breaking releases

32.0.0 Apr 8, 2024
31.0.0 Mar 18, 2024
30.0.0 Feb 26, 2024
29.0.0 Feb 13, 2024
0.0.0 Nov 21, 2022

#920 in Magic Beans

Download history 96/week @ 2023-12-22 536/week @ 2023-12-29 794/week @ 2024-01-05 538/week @ 2024-01-12 379/week @ 2024-01-19 374/week @ 2024-01-26 251/week @ 2024-02-02 637/week @ 2024-02-09 1627/week @ 2024-02-16 1578/week @ 2024-02-23 839/week @ 2024-03-01 514/week @ 2024-03-08 977/week @ 2024-03-15 1025/week @ 2024-03-22 646/week @ 2024-03-29 765/week @ 2024-04-05

3,483 downloads per month
Used in 40 crates (5 directly)

Apache-2.0

2.5MB
45K 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


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–31MB
~498K SLoC