diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 942f8cf8639c8680f9c65601eafb668508cf6f04..8df40f677f68a4046179b3b0da4adcaf9e564ddb 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -31,8 +31,7 @@ use assets_common::{ foreign_creators::ForeignCreators, local_and_foreign_assets::{LocalFromLeft, TargetFromLeft}, matching::{FromNetwork, FromSiblingParachain}, - AssetIdForPoolAssets, AssetIdForPoolAssetsConvertV3Location, - AssetIdForTrustBackedAssetsConvert, + AssetIdForPoolAssets, AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert, }; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::AggregateMessageOrigin; @@ -346,7 +345,7 @@ pub type NativeAndAllAssets = fungibles::UnionOf< PoolAssets, NativeAndNonPoolAssets, LocalFromLeft< - AssetIdForPoolAssetsConvertV3Location<PoolAssetsPalletLocationV3>, + AssetIdForPoolAssetsConvert<PoolAssetsPalletLocationV3, xcm::v3::Location>, AssetIdForPoolAssets, xcm::v3::Location, >, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index c464fec4edd6f9195693fdb399555dba78b3ca16..4e525261931a4286601ed79c6961df5aa573fab5 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -76,6 +76,8 @@ parameter_types! { pub TrustBackedAssetsPalletIndex: u8 = <Assets as PalletInfoAccess>::index() as u8; pub TrustBackedAssetsPalletLocationV3: xcm::v3::Location = xcm::v3::Junction::PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into(); + pub PoolAssetsPalletLocationV3: xcm::v3::Location = + xcm::v3::Junction::PalletInstance(<PoolAssets as PalletInfoAccess>::index() as u8).into(); pub ForeignAssetsPalletLocation: Location = PalletInstance(<ForeignAssets as PalletInfoAccess>::index() as u8).into(); pub PoolAssetsPalletLocation: Location = diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 35b73d89dcde120cc1937230de7fdc8cab0e4034..b6b4f7eab3d10f92b0395441a663b98598e72617 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -29,8 +29,7 @@ pub mod xcm_config; use assets_common::{ local_and_foreign_assets::{LocalFromLeft, TargetFromLeft}, - AssetIdForPoolAssets, AssetIdForPoolAssetsConvertV3Location, - AssetIdForTrustBackedAssetsConvert, + AssetIdForPoolAssets, AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert, }; use codec::{Decode, Encode, MaxEncodedLen}; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; @@ -326,7 +325,7 @@ pub type NativeAndAllAssets = fungibles::UnionOf< PoolAssets, NativeAndNonPoolAssets, LocalFromLeft< - AssetIdForPoolAssetsConvertV3Location<PoolAssetsPalletLocationV3>, + AssetIdForPoolAssetsConvert<PoolAssetsPalletLocationV3, xcm::v3::Location>, AssetIdForPoolAssets, xcm::v3::Location, >, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index 9ba07ccdc0388f26206526a100fc6e4a72ec370e..7105925fc9f7e0bb02b1287d1ed1c4c539981818 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -73,6 +73,8 @@ parameter_types! { pub TrustBackedAssetsPalletIndex: u8 = <Assets as PalletInfoAccess>::index() as u8; pub TrustBackedAssetsPalletLocationV3: xcm::v3::Location = xcm::v3::Junction::PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into(); + pub PoolAssetsPalletLocationV3: xcm::v3::Location = + xcm::v3::Junction::PalletInstance(<PoolAssets as PalletInfoAccess>::index() as u8).into(); pub ForeignAssetsPalletLocation: Location = PalletInstance(<ForeignAssets as PalletInfoAccess>::index() as u8).into(); pub PoolAssetsPalletLocation: Location = diff --git a/cumulus/parachains/runtimes/assets/common/src/lib.rs b/cumulus/parachains/runtimes/assets/common/src/lib.rs index 1b99549619ad2eba865cb87fba9170c57c3979e7..24c9a86398144b0c66fd73054824f16b9aa21a1f 100644 --- a/cumulus/parachains/runtimes/assets/common/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/common/src/lib.rs @@ -119,17 +119,10 @@ pub type ForeignAssetsConvertedConcreteId< >; pub type AssetIdForPoolAssets = u32; -/// `Location` vs `AssetIdForPoolAssets` converter for `PoolAssets` with explicit `v3 Location`. -pub type AssetIdForPoolAssetsConvertV3Location<PoolAssetsPalletLocation> = AsPrefixedGeneralIndex< - PoolAssetsPalletLocation, - AssetIdForPoolAssets, - JustTry, - xcm::v3::Location, ->; /// `Location` vs `AssetIdForPoolAssets` converter for `PoolAssets`. -pub type AssetIdForPoolAssetsConvert<PoolAssetsPalletLocation> = - AsPrefixedGeneralIndex<PoolAssetsPalletLocation, AssetIdForPoolAssets, TryConvertInto>; +pub type AssetIdForPoolAssetsConvert<PoolAssetsPalletLocation, L = Location> = + AsPrefixedGeneralIndex<PoolAssetsPalletLocation, AssetIdForPoolAssets, TryConvertInto, L>; /// [`MatchedConvertedConcreteId`] converter dedicated for `PoolAssets` pub type PoolAssetsConvertedConcreteId<PoolAssetsPalletLocation, Balance> = MatchedConvertedConcreteId<