-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pallet-nfts, pallet_uniques] - Expose private structs (#6087)
# Description This PR exposes pallet_nfts and pallet_uniques structs, so other pallets can access storage to use it for extending nft functionalities. In pallet uniques it also exposes collection and asset metadata storage as they are private. ## Integration This integration allows nfts and uniques extension pallets to use then private - now public structs to retrieve and parse storage from pallet_nfts. We are building cross-chain NFT pallet and in order to transfer collection that houses multiple NFT owners we need to manually remove NFTs and Collections from storage without signers. We would also like to refund deposits on origin chain and we were unable to as struct data was private. We have built cross-chain pallet that allows to send nfts or collections between two pallets in abstract way without having to look which pallet parachain (If nfts or uniques) implements. ## Review Notes Code exposes private structs to public structs. No breaking change. Build runs fine, tests are also ok. <img width="468" alt="screen1" src="https://github.com/user-attachments/assets/f31f60b5-390c-4497-b46b-59dd561204ae"> <img width="664" alt="screen2" src="https://github.com/user-attachments/assets/7e2aa71c-3bc4-49a9-8afc-47d4f45f4359"> <img width="598" alt="screen3" src="https://github.com/user-attachments/assets/10f4e427-858f-460d-8644-f5750494edb0"> PR is tied with following issue: Closes #5959 # Checklist * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. * [x] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. * [ ] I have made corresponding changes to the documentation (if applicable) * [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) --------- Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: command-bot <>
- Loading branch information
Showing
4 changed files
with
72 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
title: Expose private structs in pallet_nfts and pallet_uniques. | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
PR changes certain structs in pallet_nfts and pallet_uniques into public. It also changes 2 storages (collection & asset metadata) into public in pallet_uniques. | ||
|
||
crates: | ||
- name: pallet-nfts | ||
bump: patch | ||
- name: pallet-uniques | ||
bump: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters