pezpallet-asset-conversion-tx-payment

Crates.iopezpallet-asset-conversion-tx-payment
lib.rspezpallet-asset-conversion-tx-payment
version10.0.0
created_at2025-12-29 12:22:40.493382+00
updated_at2025-12-29 12:22:40.493382+00
descriptionPallet to manage transaction payments in assets by converting them to native assets.
homepagehttps://pezkuwichain.io/
repositoryhttps://github.com/pezkuwichain/pezkuwi-sdk.git
max_upload_size
id2010515
size186,218
(SatoshiQaziMuhammed)

documentation

https://docs.pezkuwichain.io/

README

pezpallet-asset-conversion-tx-payment

Asset Conversion Transaction Payment Pezpallet

This pezpallet 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 [pezpallet-transaction-payment]. The included [AssetConversionAdapter] (implementing [OnChargeAssetTransaction]) determines the fee amount by converting the fee calculated by [pezpallet-transaction-payment] into the desired asset.

Integration

This pezpallet wraps FRAME's transaction payment pezpallet and functions as a replacement. This means you should include both pallets in your construct_runtime macro, but only include this pezpallet's [TransactionExtension] ([ChargeAssetTxPayment]).

License: Apache-2.0

Commit count: 185

cargo fmt