pallet-asset-conversion-tx-payment

Crates.iopallet-asset-conversion-tx-payment
lib.rspallet-asset-conversion-tx-payment
version24.0.0
created_at2023-07-25 18:30:17.540148+00
updated_at2025-08-01 15:01:17.502904+00
descriptionPallet to manage transaction payments in assets by converting them to native assets.
homepagehttps://paritytech.github.io/polkadot-sdk/
repositoryhttps://github.com/paritytech/polkadot-sdk.git
max_upload_size
id925855
size180,090
Parity Crate Owner (parity-crate-owner)

documentation

README

pallet-asset-conversion-tx-payment

Asset Conversion 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 [AssetConversionAdapter] (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

Commit count: 19113

cargo fmt