question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Reactions:23
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
arpucommented, Jul 26, 2021
3reactions
hack3r-0mcommented, Aug 19, 2021

I am interested in working on this issue since I have been following that EIP closely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling NFT Royalties With EIP-2981 - HackerNoon
EIP-2981 introduces an easier method for enabling royalties for NFT projects. Learn all about this royalty standard and how to implement it ...
Read more >
EIP-2981: NFT Royalty Standard
A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal support for royalty payments ...
Read more >
How to integrate EIP-2981 with this basic ERC-721 contract
This repo has an ERC 1155 implementation with EIP 2981 royalties; for an ERC 721, you'd just need ...
Read more >
Has anyone implemented EIP 2981 - Smart Contracts
All the examples I see set these values on a per token basis, but I'm inclined to make the recipient and royalty basis...
Read more >
EIP-2981 — Simple and effective royalty standards for all
ERC721 /1155 cannot easily enforce royalties themself due to various technical challenges which arise when doing so, however this does not mean standards...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found