pallet-asset-tx-payment

Crates.iopallet-asset-tx-payment
lib.rspallet-asset-tx-payment
version38.0.0
sourcesrc
created_at2022-11-21 10:38:51.710078
updated_at2024-09-26 06:24:27.915311
descriptionpallet to manage transaction payments in assets
homepagehttps://paritytech.github.io/polkadot-sdk/
repositoryhttps://github.com/paritytech/polkadot-sdk.git
max_upload_size
id719999
size48,739
Parity Crate Owner (parity-crate-owner)

documentation

README

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

Commit count: 18077

cargo fmt