3

Reading through the EIP for ERC 721 I notice that it is required to implement 2 different interfaces. Why is this?

I noticed this portion in the documentation, but I think some clarification is necessary.

ERC-165 Interface

We chose Standard Interface Detection (ERC-165) to expose the interfaces that a ERC-721 smart contract supports.

A future EIP may create a global registry of interfaces for contracts. We strongly support such an EIP and it would allow your ERC-721 implementation to implement ERC721Enumerable, ERC721Metadata, or other interfaces by delegating to a separate contract.

1 Answer 1

3

The ERC-165 standard provides a standard for generating an identifier for an interface.

This way, if the identifier of a given version of a given interface matches with your contract, it's a way of ensuring that your contract is compliant with that interface.

As per line 4 of the specification,

///  Note: the ERC-165 identifier for this interface is 0x80ac58cd

Edit:

In plain English, basically it's a way of taking a finger print of the interface, and checking that against a finger print of the functions you've implemented, and makes sure they're the same.

1
  • Correct me if I'm wrong but this ERC-165 identifier (0x80ac58cd) makes sure we implement all standard ERC721 functions or is there more to this? Mar 7, 2022 at 11:02

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.