ERC-7996 Contract feature detection

Draft · Other · created 2025-07-07

Contracts expose detailed features that cannot be represented by ERC-165 interfaces via a supportsFeature function, allowing other contracts or apps to query and confirm support.

Why it is needed

ERC-165 is a standard way to check which interfaces a contract supports, but not every capability is cleanly separated into its own unique interface. ENS has maintained backward compatibility with contracts created in 2016 using ERC-165, but there was no standard way to announce newly added detailed capabilities without changing the existing interface. Forcing such capabilities to be represented required creating and registering fake ERC-165 interfaces, which unnecessarily pollutes ERC-165's selector space. Without a standardized method, each project announces capabilities in its own different way, making it impossible to check consistently from the outside.

What to implement

In depth

Definition of a feature

In this standard, a feature refers to a contract attribute that cannot be represented by ERC-165. That is, it refers to detailed behavior or capability not separated into its own unique function interface.

Naming features

Feature names SHOULD use reverse domain name format. For example, eth.ens.resolver.extended.multicall refers to the multicall feature of an extended ENS resolver contract. The reverse domain format reduces name collisions and lets meaning be inferred from the name alone.

Computing the feature identifier

The feature identifier is the first 4 bytes of the keccak256 hash of the feature name. For example, bytes4(keccak256("eth.ens.resolver.extended.multicall")) = 0x96b62db8.

The IERC7996 interface

Contracts following this standard SHALL implement the function supportsFeature(bytes4 featureId) external view returns (bool). The ERC-165 identifier for this interface is 0x582de3e7.

Detection procedure

First confirm via the standard ERC-165 procedure whether the contract supports IERC7996 (0x582de3e7). If it does, call supportsFeature(featureId) to confirm whether the desired feature is implemented. A contract that discloses features MAY implement no features at all.

Backward compatibility and adoption status

Callers unaware of features or a specific feature see no change in behavior. According to the original text, ENS already implements this ERC.

Standard status

This proposal is currently in Draft status and not yet finalized; its content may change or discussion may stall going forward.

Things to watch out for

Original ERC · ← ERCs