16 major breaking releases

new 20.0.0 Mar 26, 2023
19.0.0 Mar 5, 2023
18.0.0 Feb 26, 2023
17.0.0 Feb 19, 2023
0.0.0 Nov 21, 2022

#449 in Magic Beans

Download history 14/week @ 2022-12-08 166/week @ 2022-12-15 27/week @ 2022-12-22 38/week @ 2023-01-05 26/week @ 2023-01-12 53/week @ 2023-01-19 23/week @ 2023-01-26 43/week @ 2023-02-02 57/week @ 2023-02-09 57/week @ 2023-02-16 28/week @ 2023-02-23 20/week @ 2023-03-02 2/week @ 2023-03-09 64/week @ 2023-03-23

86 downloads per month

Apache-2.0

2MB
38K 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

~8–44MB
~753K SLoC