Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spike): cross-chain nonfungible implementation #400

Open
wants to merge 102 commits into
base: main
Choose a base branch
from

Conversation

chungquantin
Copy link
Collaborator

@chungquantin chungquantin commented Dec 5, 2024

Description

Blocked by: #387

Context: Why can't we use the default NonFungiblesTransactor provided by the xcm crate? Current asset transactor for nonfungible implementation is currently only for nonfungibles, not nonfungibles_v2. If we want it to support latest the version of the pallet-nfts crate (collection management functionalities), we need to reconstruct the NonFungiblesTransaction.

The pull request implements the NonFungiblesTransactor using the ForeignNfts pallet nfts instance. This makes changes to the pallet-nfts CollectionId type to remove the Copy required parameter trait as xcm::latest::Location is not implemented with Copy. Replace all the copies of CollectionId in the pallet-nfts code to use Clone. Performance benchmarking should be considered to see if there is a huge change in the memory efficiency.

  • MultiLocationCollectionId implemented with xcm::latest::Location
  • NonFungiblesTransactor
  • ForeignNfts instance and runtime configuration
  • XCM simulator integration tests

Outcome

Screenshot 2024-12-09 at 13 02 11

@chungquantin chungquantin force-pushed the chungquantin/feat-nfts_cross_chain branch from eba2458 to 7332079 Compare December 13, 2024 03:38
@chungquantin chungquantin force-pushed the chungquantin/feat-nfts_cross_chain branch from 76a0d8e to e0d13f2 Compare December 13, 2024 04:07
@chungquantin
Copy link
Collaborator Author

Because if the incrementable can be removed it would not be necessary to implement the MultiLocation(Location) type

You can view the changes if we remove the incrementable trait here #406. Imo, the current approach in this PR is cleaner as it does not remove any thing related to functionality in the pallet-nfts, mainly changes in the CollectionId trait and data ownership.

@chungquantin chungquantin force-pushed the chungquantin/feat-nfts branch 7 times, most recently from dc2c68f to 4b4cd22 Compare December 31, 2024 03:57
@chungquantin chungquantin force-pushed the chungquantin/feat-nfts branch from 6ab88c1 to f83bdc5 Compare January 10, 2025 12:15
Base automatically changed from chungquantin/feat-nfts to main January 15, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants