Do you need to register that a contract supports an interface using ERC165?

In contract need I add every magic value to supportedInterfaces,I don’t find the program if I don’t do this.

1 Like

I am sorry, I am not sure what do you mean, so could you please show me an example?

1 Like

In erc721 contract ,there are many

   constructor () public {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
    }

If I don’t execute _registerInterface() function to register interface what will happen?Is it must?

1 Like

Hi @gopher,

Welcome to the community :wave:

If you are creating an ERC721, then to be compliant you need to implement the ERC165 interfaces. This allows other services to interact with your contract and know what interfaces it implements.

If you have an NFT that doesn’t implement ERC165 then you aren’t compliant with the EIP: