mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
5601f2865b
This PR mainly removes `xcm::v3` stuff from `assets-common` to make it
more generic and facilitate the transition to newer XCM versions. Some
of the implementations here used hard-coded `xcm::v3::Location`, but now
it's up to the runtime to configure according to its needs.
Additional/consequent changes:
- `penpal` runtime uses now `xcm::latest::Location` for `pallet_assets`
as `AssetId`, because we don't care about migrations here
- it pretty much simplify xcm-emulator integration tests, where we don't
need now a lots of boilerplate conversions:
```
v3::Location::try_from(...).expect("conversion works")`
```
- xcm-emulator tests
- split macro `impl_assets_helpers_for_parachain` to the
`impl_assets_helpers_for_parachain` and
`impl_foreign_assets_helpers_for_parachain` (avoids using hard-coded
`xcm::v3::Location`)
27 lines
1.2 KiB
Plaintext
27 lines
1.2 KiB
Plaintext
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
|
|
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
|
|
|
|
title: "Remove `xcm::v3` from `assets-common` nits"
|
|
|
|
doc:
|
|
- audience: Runtime Dev
|
|
description: |
|
|
Remove `xcm::v3` imports from `assets-common` to make it more generic and facilitate the transition to newer XCM versions.
|
|
The implementations `AssetIdForTrustBackedAssetsConvert`, `ForeignAssetsConvertedConcreteId`, or `TrustBackedAssetsAsLocation`
|
|
used hard-coded `xcm::v3::Location`, which has been changed to use `xcm::latest::Location` by default.
|
|
Alternatively, the providing runtime can configure them according to its needs, such as with a lower XCM version.
|
|
|
|
Example:
|
|
```patch
|
|
- AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocationV3>,
|
|
+ AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocationV3, xcm::v3::Location>,
|
|
```
|
|
|
|
Another change is that the removed `xcm_builder::V4V3LocationConverter` can be replaced with `WithLatestLocationConverter`.
|
|
|
|
crates:
|
|
- name: assets-common
|
|
bump: patch
|
|
- name: staging-xcm-builder
|
|
bump: patch
|