0

I have added the following lines in my Remix ERC721 code (from Contracts Wizard)

import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Royalty.sol";
import "@openzeppelin/[email protected]/interfaces/IERC2981.sol";

What function code do I need to use to set royalty price and royalty address?

Is it as simple as adding the following to contractURI metadata?

"seller_fee_basis_points": 100
fee_recipient": "0x ADDRESS GOES HERE"

I have done an extensive search of the forums and nothing has addressed this already, so hoping this thread will shed some light.

1 Answer 1

1

Yes, for openSea you only need to add these fields to the contract-level metadata

"seller_fee_basis_points": 100
fee_recipient": "0x ADDRESS GOES HERE"

However I suggest to also implement the royalty standard EIP-2981

https://eips.ethereum.org/EIPS/eip-2981

you can implement both the contract level metadata and the EIP royalty standard in the same contract safely :) I do it to support OpenSea and to support newer marketplaces that adopt the standard

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.