-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow to configure who can mint nft #252
Comments
I think it makes sense. @HashWarlock wdyt? |
If so. I am willinng to raise a PR. I mean work has already been done. |
I am not entirely sure what you mean by this. Currently, only the // Collection must exist and sender must be issuer of collection
if let Some(collection_issuer) =
pallet_uniques::Pallet::<T>::collection_owner(collection_id)
{
ensure!(collection_issuer == sender, Error::<T>::NoPermission);
// -- snip What would we exactly gain by using a custom origin? Sorry if I didn't understand you correctly. |
Correct. My point is to control who can be the For this we take a type And current behaviour would be achieved by:
Then all signed origin can create collection ( & in turn nft inside it ) And if we want it to be controlled we do something like:
Then only |
Ok, it makes sense to me now, thanks for the explanation. |
With the Uniques pallet, we can set the team with function
We could leverage this existing functionality to set the Example:
By default, these accounts are assigned to the Collection This can remove the need for adding a trait & won't require storage migrations downstream. |
Summary
In many of the network there will be the need to control who exactly can mint the nft. Currently, anyone can do so. It might be more convinent to allow the runtime to configure this.
Proposed changes
Current
Inside calls like
mint_nft_directly_to_nft
,create_collection
and so we haveProposed
Change to custom origin verifier
where
T::ProducerOrigin
will beIf so, I am willing to work on this.
The text was updated successfully, but these errors were encountered: