'Can not set opensea.io royalties on a NFT Contract
I have the following ERC721 contract which is creating an NFT Collection with specified royalty fees:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "./openzeppelin-contracts/contracts/token/common/ERC2981.sol";
import "./openzeppelin-contracts/contracts/token/ERC721/ERC721.sol";
import "./openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "./openzeppelin-contracts/contracts/access/Ownable.sol";
contract Collection is ERC721, ERC721Enumerable, ERC2981, Ownable {
constructor(uint96 _royaltyFeesInBips) ERC721("MyToken", "MTK") {
setRoyaltyInfo(owner(), _royaltyFeesInBips);
}
function safeMint(address to, uint256 tokenId) public onlyOwner {
_safeMint(to, tokenId);
}
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
_setDefaultRoyalty(_receiver, _royaltyFeesInBips);
}
function contractURI() public view returns (string memory) {
return "ipfs://QmQRTsxyt8Wv9v9DSLegJNbZqBMPJxb1X3Ueu9QngRFX8g";
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId);
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, ERC2981)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
}
with the following contract metadata at contractURI
{
"name": "OpenSea Creatures",
"description": "OpenSea Creatures are adorable aquatic beings primarily for demonstrating what can be done using the OpenSea platform. Adopt one today to try out all the OpenSea buying, selling, and bidding feature set.",
"image": "https://openseacreatures.io/image.png",
"external_link": "https://openseacreatures.io",
"seller_fee_basis_points": 100, # Indicates a 1% seller fee.
"fee_recipient": "0x4c39afBBa8C472F6aB272AC37bA683AE0323dfd7" # Where seller fees will be paid to.
}
unfortunately, when I deploy and check its settings at opensea.io I see that the royalty fees are not automatically set
Solution 1:[1]
I was running into the same issue, judging by what they say in the documentation, they seem to send the revenue in bulk once a month. But i haven’t been able to confirm that yet.
Receiving your revenue
Revenue will be distributed in bulk once a month to the payment address specified. OpenSea provides it's marketplace infrastructure for free—it's entirely free to get started setting up a marketplace and using our platform. As compensation for this service, 2.5% of each sale will go to OpenSea — independent of whatever fees you choose to receive.
https://docs.opensea.io/docs/10-setting-fees-on-secondary-sales
Solution 2:[2]
You can only add royalties via the OpenSea UI.
Go to your collection, hit “edit”, and scroll down to find the royalty section.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sergi Nogal |
| Solution 2 | HNipps |
