Lucene search

K
code423n4Code4renaCODE423N4:2022-07-FRACTIONAL-FINDINGS-ISSUES-544
HistoryJul 14, 2022 - 12:00 a.m.

The FERC1155.sol don't respect the EIP2981

2022-07-1400:00:00
Code4rena
github.com
8

Lines of code

Vulnerability details

Impact

The EIP-2981: NFT Royalty Standard implementation is incomplete, missing the implementation of function supportsInterface(bytes4 interfaceID) external view returns (bool); from the EIP-165: Standard Interface Detection

Proof of Concept

A marketplace implemented royalties could check if the NFT have royalties, but if don’t add the interface of ERC2981 on the _registerInterface, the marketplace can’t know if this NFT haves

Tools Used

Manual Review

Recommended Mitigation Steps

Like in solmate ERC1155.sol add the ERC2981 interfaceId on the FERC1155 contract

    /*//////////////////////////////////////////////////////////////
                              ERC165 LOGIC
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view  override returns (bool) {
        return
            super.supportsInterface(interfaceId) ||
            interfaceId == 0x2a55205a; // ERC165 Interface ID for ERC2981
    }  

The text was updated successfully, but these errors were encountered:

All reactions