Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Make pallet_nfts storages public #13517

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

jasl
Copy link
Contributor

@jasl jasl commented Mar 2, 2023

Background:
I'm trying to build a pallet to work with pallet_nft,
my goal is disable most of pallet_nfts extrinsic and my pallet will help to management collection, minting nfts and update them, users can only own and burn, rest of other operations are limited.

my first try is using nonfungibles_v2 traits but meet some trouble (I make a PR #13514 ), but I don't know how to construct ItemId so I'm stuck.

here's second try, I'm letting my pallet extending pallet_nft (pub trait Config<I: 'static = ()>: frame_system::Config + pallet_nfts::Config<I>), so I can access pallet_nft directly, and most of functions are public so I can call them, however, some of arguments require read from storage (e.g. collection_id) are restricted by pub(super) so I can't access them.

But still, ItemId is hard to construct... any advice?

this PR make them public.

@jasl
Copy link
Contributor Author

jasl commented Mar 2, 2023

@jsidorenko Could you help to take a look? (don't know how to assign reviewers...)

@dmitry-markin dmitry-markin added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Mar 6, 2023
@shawntabrizi
Copy link
Member

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 48c8875 into paritytech:master Mar 9, 2023
@jasl jasl deleted the public-nfts-storage branch March 9, 2023 18:08
ukint-vs pushed a commit to gear-tech/substrate that referenced this pull request Apr 10, 2023
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants