operator-filter-registry icon indicating copy to clipboard operation
operator-filter-registry copied to clipboard

ERC2981 Royalty for Specific Token IDs

Open radleypr opened this issue 3 years ago • 2 comments

Hi, we are trying to implement an ERC2981 standard NFT, where the royalty receiver is different for every token IDs. After testing on OpenSea, it seems that only the minter of the first NFT is set as the royalty receiver for all token IDs, which can be seen from the creator fee:

image

In the contract we implemented _setTokenRoyalty(tokenId, to, defaultRoyalty)

    function mintNFT(
        address to,
        string memory uri
    ) public onlyRole(DEFAULT_ADMIN_ROLE) returns (uint256) {
        require(!hasRole(DEFAULT_ADMIN_ROLE, to), "Admins cannot receive NFTs");
        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
        _setTokenURI(tokenId, uri);
        _setTokenRoyalty(tokenId, to, defaultRoyalty);
        return tokenId;
    }

Please advise if it is possible to have dynamic creator fee royalty, thank you.

radleypr avatar Feb 22 '23 07:02 radleypr

I have the same problem here.

VanTan291 avatar Feb 23 '23 04:02 VanTan291

OS does not support this part of the EIP-2981. You cannot define multiple receivers for different token ids.

Toomaie avatar Apr 14 '23 13:04 Toomaie