-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Implementing EIP-2981 (ERC721 Royalties) #2789
Comments
Looking forward to this! |
We're interested in this EIP. Has there been support from marketplaces? Can you elaborate what this EIP would look like as a part of OpenZeppelin Contracts? You mentioned interfaces but I imagine it would also be useful to have an implementation. |
I am interested in working on this issue since I have been following that EIP closely. |
Would also be very interested in seeing this gain some traction |
Are "mainstream" marketplaces planning to adopt this feature? @hack3r-0m Do you have an idea of what concretely would be added in OpenZeppelin Contracts? What contracts or libraries and what would they look like. |
Hi, This list isn't exhaustive but it's growing.
In addition to this, we've got lots of individual creators basing their royalty information on EIP-2981. I'm also currently in talks with a few larger marketplaces who're very excited about supporting this. Nifty Gateway being one of these parties. Implementing EIP-2981 is relatively low effort. You'd want to decide if:
Please see this reference implementation: Also here's a video that describes the rational: Happy to answer any questions wrt to implementation. Just let me know. |
@frangio Sorry for the late reply - I was waiting to see how marketplaces were going to react. There is a request on OpenSea, but as far I know, they didn't signalled yet support. Maybe @blmalone could convince them to adopt it :) Regarding what I mentioned about the interface, it was just a vague idea. I was imagining something that would work with a press of a button in OpenZeppelin's contract wizard. @blmalone suggested implementation could be a good basis for that. |
Yeah putting royalty info in Contracts Wizard would be nice. We try to avoid using storage variable if they're not necessary (which is why we have |
Thanks for the explanation regarding I'd expect that most NFT owners wouldn't change this info after deployment. I did a non-exhaustive search on this contract database and it seems that many contracts expose an external |
Hello @JulissaDantes, Thanks for this implementation, since I was doing it myself for a project... I hope it will be available soon. |
Hello @JulissaDantes, Have you thought about making ERC721Royalty.sol Enumerable ? Or maybe I am missing something, another implementation I missed. Robin, |
@robinportigliatti What do you mean by making
While users can opt-in, we don't want to force that. If someone wants If you want to know more about building a token contract with multiple modules, check out the wizard. Hopefully, it will soon include a toggle for royalties ! |
🧐 Motivation
Recently, EIP-2981 went to Final Status. It proposes a "standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal support for royalty payments across all NFT marketplaces and ecosystem participants".
While it is possible to implement your own royalty system overriding ERC721/ERC1155's
transferFrom
functions, I was wondering if it would make sense to support EIP-2981 as an alternative to minimize gas usage in deployment. Plus, EIP-2981 would better support optional royalty payments.📝 Details
If it makes sense to add EIP-2981 support to OpenZeppelin contracts, I think it could be a nice idea to make an interface ERC721HasRoyalties.sol and IERC1155HasRoyalties.sol to extend ERC721 and ERC1155 contracts.
(P.S.: Since it has been recently finalized, I don't think many marketplaces are adopting EIP-2981 for now, but if this feature makes sense, I can keep track of it 😃)
The text was updated successfully, but these errors were encountered: