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

ERC721MetadataMintable missing from v3.0.0 #3206

Closed
takahser opened this issue Feb 20, 2022 · 5 comments Β· Fixed by #3210
Closed

ERC721MetadataMintable missing from v3.0.0 #3206

takahser opened this issue Feb 20, 2022 · 5 comments Β· Fixed by #3210

Comments

@takahser
Copy link
Contributor

takahser commented Feb 20, 2022

πŸ’» Environment

  • βœ… OpenZeppelin v2.5.0
  • ❌ OpenZeppelin v3.0.0

πŸ“ Details

In OpenZeppelin v2 there used to be a ERC721MetadataMintable extension containing a mintWithTokenURI method that allowed you to pass the tokenUri when minting a new token.
In v3 and v4 this ERC721 extension seems to be missing. Unfortunately I was not able to figure out why it was removed. The v3.0.0 release notes fail to mention this change as well. I didn't find any answer in the forum neither.
Is there any particular reason for its removal?

@Amxx
Copy link
Collaborator

Amxx commented Feb 20, 2022

Hello @takahser

Instead of providing a limited number of presets, our focus is on helping devs "compose" the contract that best matches their needs.

If you try out the wizard, and if you enable mintable and uriStorage, it will give you code that should fit your needs.

@takahser
Copy link
Contributor Author

Hi @Amxx

our focus is on helping devs "compose" the contract

Generally, I think that's a very good approach. πŸ‘ I was just wondering why features are getting deprecated without being mentioned in the release notes. It's unfortunate that I was not able to find an answer to that question, is there a place where I would have found this information?

If you try out the wizard, and if you enable mintable and uriStorage, it will give you code that should fit your needs.

That's awesome! Well, actually in my case the ERC721URIStorage would normally do the job.
Unfortunately, in contrast to its ERC1155 counterpart, the ERC721 contract doesn't allow me to define an amount. Since I'd like to use that functionality as well, I think I'll have to use ERC1155 but there is no ERC1155URIStorage extension (or similar). Do you know if there's a way to combine these two functionalities (ERC1155 and URIStorage)?

@Amxx
Copy link
Collaborator

Amxx commented Feb 21, 2022

Do you know if there's a way to combine these two functionalities (ERC1155 and URIStorage)?

It is possible to build URIStorage on top of ERC1155, just not using ERC721URIStorage (obviously).
This should be pretty straightforward to implement.

@takahser takahser mentioned this issue Feb 21, 2022
3 tasks
@takahser
Copy link
Contributor Author

I wrote an extension for ERC1155 implementing the behavior I was looking for.
Basically, it adds an ERC721URIStorage-like behavior: #3210

@frangio
Copy link
Contributor

frangio commented Feb 22, 2022

wondering why features are getting deprecated without being mentioned in the release notes

The removal of ERC721Metadata was mentioned in the breaking changes for 3.0.0:

ERC721Metadata, ERC721Enumerable: these contracts were removed, and their functionality merged into ERC721.

ERC721MetadataMintable was a preset that used this contract so it was removed as a result.

We will make sure to mention all contracts removed next time.

@frangio frangio closed this as completed Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants