mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
Remove xcm::v3 from assets-common nits (#4037)
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`)
This commit is contained in:
@@ -82,8 +82,6 @@ parameter_types! {
|
||||
PalletInstance(<PoolAssets as PalletInfoAccess>::index() as u8).into();
|
||||
pub UniquesPalletLocation: Location =
|
||||
PalletInstance(<Uniques as PalletInfoAccess>::index() as u8).into();
|
||||
pub PoolAssetsPalletLocationV3: xcm::v3::Location =
|
||||
xcm::v3::Junction::PalletInstance(<PoolAssets as PalletInfoAccess>::index() as u8).into();
|
||||
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
||||
pub const GovernanceLocation: Location = Location::parent();
|
||||
pub StakingPot: AccountId = CollatorSelection::account_id();
|
||||
@@ -179,6 +177,7 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte
|
||||
StartsWithExplicitGlobalConsensus<UniversalLocationNetworkId>,
|
||||
),
|
||||
Balance,
|
||||
xcm::v3::Location,
|
||||
>;
|
||||
|
||||
/// Means for transacting foreign assets from different global consensus.
|
||||
@@ -581,7 +580,11 @@ impl xcm_executor::Config for XcmConfig {
|
||||
WeightToFee,
|
||||
crate::NativeAndAssets,
|
||||
(
|
||||
TrustBackedAssetsAsLocation<TrustBackedAssetsPalletLocation, Balance>,
|
||||
TrustBackedAssetsAsLocation<
|
||||
TrustBackedAssetsPalletLocation,
|
||||
Balance,
|
||||
xcm::v3::Location,
|
||||
>,
|
||||
ForeignAssetsConvertedConcreteId,
|
||||
),
|
||||
ResolveAssetTo<StakingPot, crate::NativeAndAssets>,
|
||||
|
||||
Reference in New Issue
Block a user