Implementing EIP-2981 (ERC721 Royalties)
See original GitHub issue🧐 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 😃)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:23
- Comments:13 (7 by maintainers)
from @benber86 is https://github.com/benber86/nft_royalties_market
I am interested in working on this issue since I have been following that EIP closely.