pallet-xcm: API changes to use VersionedAssetId instead of u32 to specify asset for fees#10243
Merged
franciscoaguirre merged 14 commits intomasterfrom Nov 12, 2025
Merged
pallet-xcm: API changes to use VersionedAssetId instead of u32 to specify asset for fees#10243franciscoaguirre merged 14 commits intomasterfrom
VersionedAssetId instead of u32 to specify asset for fees#10243franciscoaguirre merged 14 commits intomasterfrom
Conversation
Contributor
Author
|
/cmd prdoc --audience runtime_dev --audience runtime_user --bump major |
…time_dev --audience runtime_user --bump major'
VersionedAssetId instead of u32 to specify asset for feesVersionedAssetId instead of u32 to specify asset for fees
VersionedAssetId instead of u32 to specify asset for feesVersionedAssetId instead of u32 to specify asset for fees
acatangiu
approved these changes
Nov 10, 2025
| /// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. | ||
| #[pallet::call_index(8)] | ||
| #[pallet::weight(T::WeightInfo::reserve_transfer_assets())] | ||
| pub fn limited_reserve_transfer_assets( |
Contributor
There was a problem hiding this comment.
I'm going to deprecate on another PR since deprecating is not a major bump and there are some places in the codebase where replacing the deprecated function would need some work
| /// - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. | ||
| #[pallet::call_index(9)] | ||
| #[pallet::weight(T::WeightInfo::teleport_assets())] | ||
| pub fn limited_teleport_assets( |
Contributor
|
trying an AI review bot and found some typos xlc#2 (comment) |
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
franciscoaguirre
approved these changes
Nov 12, 2025
0xRVE
pushed a commit
that referenced
this pull request
Nov 18, 2025
… specify asset for fees (#10243) 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: #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](https://matrix.to/#/!nYxxyvMNMUaniRIokh:parity.io/$gAcAEznmQL6LhUlvGPHSaePUV4cZtxoco2I6ap8Cn3Q?via=parity.io&via=matrix.org&via=web3.foundation) on XCM public element channel --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiple pallet-xcm calls use
u32index as a way to specify which asset from theassets(also an arg of the call) is to be used for fees purposes. This PR brings major API change (breaking change) that proposes usage ofVersionedAssetIdinsteadAffected pallet-xcm calls:
teleport_assets,reserve_transfer_assets,limited_reserve_transfer_assets,limited_teleport_assets,transfer_assetsThis is follow-up change to the: #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
u32index (provided by the client) can become invalid after sorting (this PR aims that problem)Relevant dicussion on XCM public element channel