Skip to content

pallet-xcm: API changes to use VersionedAssetId instead of u32 to specify asset for fees#2

Open
xlc wants to merge 11 commits intomasterfrom
kk-fee-asset-id
Open

pallet-xcm: API changes to use VersionedAssetId instead of u32 to specify asset for fees#2
xlc wants to merge 11 commits intomasterfrom
kk-fee-asset-id

Conversation

@xlc
Copy link
Owner

@xlc xlc commented Nov 12, 2025

Multiple pallet-xcm calls use u32 index as a way to specify which asset from the assets (also an arg of the call) is to be used for fees purposes. This PR brings major API change (breaking change) that proposes usage of VersionedAssetId instead

Affected pallet-xcm calls: teleport_assets, reserve_transfer_assets, limited_reserve_transfer_assets, limited_teleport_assets, transfer_assets

This is follow-up change to the: paritytech#9842, that aims to remove the requirement of the client to provide sorted list of Assets to the APIs (often a point failures). With the mentioned change sorting happens on the runtime side and u32 index (provided by the client) can become invalid after sorting (this PR aims that problem)

Relevant dicussion on XCM public element channel

@github-actions
Copy link

Found 2 minor logging issues in pallet-xcm where incorrect logging targets were used, likely due to copy-pasting.


Review Suggestions

polkadot/xcm/pallet-xcm/src/lib.rs:1484

The tracing::debug! macro has an incorrect target. It is set to xcm::pallet_xcm::do_teleport_assets within the transfer_assets function. It should be updated to xcm::pallet_xcm::transfer_assets for correct log filtering and debugging.


polkadot/xcm/pallet-xcm/src/lib.rs:2066

The tracing::debug! macro has an incorrect target. It is set to xcm::pallet_xcm::do_teleport_assets within the do_reserve_transfer_assets function. It should be updated to xcm::pallet_xcm::do_reserve_transfer_assets for correct log filtering and debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants