-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Vstam1/nonfungibles adapter v2 #7344
base: master
Are you sure you want to change the base?
Conversation
Assets: nonfungibles_v2::Transfer<AccountId>, | ||
Matcher: MatchesNonFungibles<Assets::CollectionId, Assets::ItemId>, | ||
AccountIdConverter: ConvertLocation<AccountId>, | ||
AccountId: Clone, // can't get away without it since Currency is generic over it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccountId: Clone, // can't get away without it since Currency is generic over it. | |
AccountId: Clone, // can't get away without it since `nonfungibles_v2` is generic over it. |
Assets: nonfungibles_v2::Mutate<AccountId, ItemConfig>, | ||
Matcher: MatchesNonFungibles<Assets::CollectionId, Assets::ItemId>, | ||
AccountIdConverter: ConvertLocation<AccountId>, | ||
AccountId: Clone + Eq, // can't get away without it since Currency is generic over it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccountId: Clone + Eq, // can't get away without it since Currency is generic over it. | |
AccountId: Clone + Eq, // can't get away without it since `nonfungibles_v2` is generic over it. |
Assets: nonfungibles_v2::Mutate<AccountId, ItemConfig>, | ||
Matcher: MatchesNonFungibles<Assets::CollectionId, Assets::ItemId>, | ||
AccountIdConverter: ConvertLocation<AccountId>, | ||
AccountId: Clone + Eq, // can't get away without it since Currency is generic over it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccountId: Clone + Eq, // can't get away without it since Currency is generic over it. | |
AccountId: Clone + Eq, // can't get away without it since `nonfungibles_v2` is generic over it. |
Assets: nonfungibles_v2::Mutate<AccountId, ItemConfig> + nonfungibles_v2::Transfer<AccountId>, | ||
Matcher: MatchesNonFungibles<Assets::CollectionId, Assets::ItemId>, | ||
AccountIdConverter: ConvertLocation<AccountId>, | ||
AccountId: Clone + Eq, // can't get away without it since Currency is generic over it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccountId: Clone + Eq, // can't get away without it since Currency is generic over it. | |
AccountId: Clone + Eq, // can't get away without it since `nonfungibles_v2` is generic over it. |
impl Incrementable for MultiLocationCollectionId { | ||
fn increment(&self) -> Option<Self> { | ||
None | ||
} | ||
|
||
fn initial_value() -> Option<Self> { | ||
None | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to implement this? Aren't we going to be forcing the collection id of collections identified by MultiLocation
s?
This pr introduces the
NonFungiblesV2Adapter
as a new type for the XCM executor's AssetTransactor type, designed to work with the NFTs pallet. This Pr is a PoC to investigate how the NFTs pallet could work with XCM.Introduces:
NonFungiblesV2Adapter
MultiLocationCollectionId
: Wrapper for MultiLocation that implements theIncrementable
trait. The trait implementation allow the NFT's pallet CollectionId type to be a wrapped MultiLocation.xcm-simulator
parachain runtime.