Description
ERC-7996 contract features for ENS.
Status
draft
Created
7/29/2025
Author
  • raffy.eth

ENSIP-22: Contract Features

Abstract

This ENSIP standardizes ERC-7996 contract features relevant to ENS, enabling new optimizations while preserving compatibility with existing deployments.

Motivation

ENS has maintained backwards compatibility with contracts created in 2016 through extensive use of ERC-165. Unfortunately, not all contract capabilities can be expressed through an unique interface.

Features allow expression of contract capabilities that preserve existing interfaces. This proposal standardizes features related to the ENS protocol.

Specification

Contract features are defined in EIP-7996.

EIP-7996 has the following Solidity interface:

/// @dev Interface selector: `0x582de3e7`
interface IERC7996 {
    /// @notice Check if a feature is supported.
    /// @param featureId The feature identifier.
    /// @return `true` if the feature is supported by the contract.
    function supportsFeature(bytes4 featureId) external view returns (bool);
}

Resolver with Features

Any resolver that supports features must adhere to the following criteria:

Therefore, when resolution calldata is not a multicall, the resolver may be invoked directly without batch gateway infrastructure.

function supportsInterface(
    bytes4 interfaceId
) public view virtual override(ERC165) returns (bool) {
    return type(IERC7996).interfaceId == interfaceId || super.supportsInterface(interfaceId);
}

function supportsFeature(bytes4 feature) external pure returns (bool) {
    return false;
}

eth.ens.resolver.extended.multicall — 0x96b62db8

If a resolver is an IExtendedResolver and supports this feature, resolve(name, data) must handle multicall(bytes[]) as expected.

For resolvers that utilize CCIP-Read, this feature permits a single OffchainLookup request to fetch multiple records, which greatly reduces latency and network traffic.

A resolver with this feature may always be invoked directly without batch gateway infrastructure.

function supportsFeature(bytes4 feature) external pure returns (bool) {
    return feature == 0x96b62db8;
}

Backwards Compatibility

Callers unaware of features or any specific feature experience no change in behavior.

Security Considerations

As stated in ERC-7996, declaring support for a feature does not guarantee that the contract implements it.

Copyright

Copyright and related rights waived via CC0.