Is there a generic way to set royalties from smart contract. Looking for a method that applies to all top marketplaces.
3 Answers
Checkout EIP-2981, you can find it here: https://eips.ethereum.org/EIPS/eip-2981
-
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.– Community BotCommented Apr 3, 2022 at 17:47
-
1
Metasalt (https://metasalt.io) implemented the EIP2918 standard.
Follows the requirements of standard exactly leaving as much flexibility intact as intended by the authors. Importantly, the marketplace is designed to accept NFTS containing:
function royaltyInfo(uint256 tokenId, uint256 salePrice)
You can write your own code for royalty. you just need to set some percentage at time of mint and at time of sale in MP. MP get royalty detail and deduct royalty price at time of sale and send it to creator. on every sale royalty sent to creator.