mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Enable cross-chain NFT transfers on asset-hub (#2796)
This PR introduces the following changes: - [x] Adds a `UniquesTransactor` to asset-hub-rococo - [x] Adds a `UniquesTransactor` to asset-hub-westend We can't add a transactor for `pallet-nfts` like we do for `pallet-uniques` because `pallet-nfts` uses `nonfungibles_v2::Mutate` instead of `nonfungibles::Mutate`, and making that work would be out of scope of this PR. With these modifications, reserve-based NFT cross-chain transfers can be performed on asset-hub. --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,7 @@ pub mod runtime_api;
|
||||
|
||||
use crate::matching::{LocalLocationPattern, ParentLocation};
|
||||
use frame_support::traits::{Equals, EverythingBut};
|
||||
use parachains_common::AssetIdForTrustBackedAssets;
|
||||
use parachains_common::{AssetIdForTrustBackedAssets, CollectionId, ItemId};
|
||||
use xcm_builder::{
|
||||
AsPrefixedGeneralIndex, MatchedConvertedConcreteId, StartsWith, V4V3LocationConverter,
|
||||
};
|
||||
@@ -43,6 +43,10 @@ pub type AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocation> =
|
||||
pub type AssetIdForTrustBackedAssetsConvertLatest<TrustBackedAssetsPalletLocation> =
|
||||
AsPrefixedGeneralIndex<TrustBackedAssetsPalletLocation, AssetIdForTrustBackedAssets, JustTry>;
|
||||
|
||||
/// `Location` vs `CollectionId` converter for `Uniques`
|
||||
pub type CollectionIdForUniquesConvert<UniquesPalletLocation> =
|
||||
AsPrefixedGeneralIndex<UniquesPalletLocation, CollectionId, JustTry>;
|
||||
|
||||
/// [`MatchedConvertedConcreteId`] converter dedicated for `TrustBackedAssets`
|
||||
pub type TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance> =
|
||||
MatchedConvertedConcreteId<
|
||||
@@ -53,6 +57,17 @@ pub type TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, B
|
||||
JustTry,
|
||||
>;
|
||||
|
||||
/// [`MatchedConvertedConcreteId`] converter dedicated for `Uniques`
|
||||
pub type UniquesConvertedConcreteId<UniquesPalletLocation> = MatchedConvertedConcreteId<
|
||||
CollectionId,
|
||||
ItemId,
|
||||
// The asset starts with the uniques pallet. The `CollectionId` of the asset is specified as a
|
||||
// junction within the pallet itself.
|
||||
StartsWith<UniquesPalletLocation>,
|
||||
CollectionIdForUniquesConvert<UniquesPalletLocation>,
|
||||
JustTry,
|
||||
>;
|
||||
|
||||
/// [`MatchedConvertedConcreteId`] converter dedicated for storing `AssetId` as `Location`.
|
||||
pub type LocationConvertedConcreteId<LocationFilter, Balance> = MatchedConvertedConcreteId<
|
||||
xcm::v3::Location,
|
||||
|
||||
Reference in New Issue
Block a user