Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ENSIP-22, which defines new ENS resolver features to retrieve multiple records efficiently.
This explanation is based on the following specification.
For other EIPs, BIPs, SLIPs, CAIPs, and ENSIPs, see the following page.
Overview
ENSIP-22 defines Ethereum Name Service (ENS) contract features within the ERC-7996 framework. Its objective is to enable new optimizations while maintaining compatibility with previously deployed contracts.
Explicitly defining ENS-specific features provides a consistent way to discover and use these capabilities.
Motivation
Since its introduction in 2016, ENS has maintained compatibility with older contracts. One mechanism that supports this compatibility is ERC-165, a standard for identifying the interfaces that a smart contract implements.
For an introduction to ERC-165, see the following article.
ERC-165: Checking Whether a Contract Supports an Interface
An interface alone, however, cannot necessarily express every capability of a contract. Additional functionality and specialized behavior may require a separate means of discovery.
Contract features provide a way to describe these capabilities without breaking existing interfaces.
ENSIP-22 standardizes features related to ENS so that extensions and optimizations can be introduced consistently.
How It Works
ENSIP-22 defines ENS resolver features within the contract-feature framework established by ERC-7996.
A resolver is a contract that resolves an ENS name, such as vitalik.eth, to addresses or other information.
The specification defines requirements for resolver behavior and a mechanism for retrieving multiple records in a single operation.
Resolver Requirements
Resolvers supporting the features described in ENSIP-22 are subject to the following requirements.
-
ERC-3668 (CCIP-Read) support
CCIP-Read enables a resolver to obtain data from off-chain sources. When using this mechanism, recursive requests must be supported and the external gateway must support Cross-Origin Resource Sharing (CORS).
-
EIP-140 support
The resolver must be compiled for an EVM revision that supports EIP-140, enabling explicit revert behavior and associated error handling.
For more information about EIP-140, see the following article.
EIP-140: Understanding the REVERT Instruction
-
Direct calls
When the resolution calldata is not a multicall, callers can invoke the resolver directly without an additional batching gateway.
Extended Multicall
The specification introduces the following ENS resolver feature.
eth.ens.resolver.extended.multicall — 0x96b62db8If a resolver implements IExtendedResolver and advertises this feature, its resolve(name, data) function must correctly handle multicall(bytes[]).
This allows multiple requests to be processed together. In particular, resolvers using CCIP-Read can retrieve multiple records through a single OffchainLookup request, potentially reducing network latency and communication overhead.
Practical Benefits
Resolvers implementing this extension can support direct invocation without a dedicated batching gateway.
Batching record retrieval can make ENS resolution faster and more efficient, improving the user experience.
Backward Compatibility
ENSIP-22 introduces additional features without breaking existing resolution mechanisms.
Callers that are unaware of these resolver features, or do not use them, can continue operating as before. Existing systems do not have to adopt the new features to retain their original behavior.
Security
As ERC-7996 explains, a contract's declaration that it supports a feature does not guarantee that the feature is implemented correctly.
A caller should distinguish advertised support from verified behavior. Applications should perform appropriate validation and use trustworthy implementations rather than treating a feature declaration as a guarantee of safety.
Conclusion
ENSIP-22 defines additional resolver capabilities, including extended multicall support, that can make retrieving multiple ENS records more efficient while preserving compatibility with existing resolvers.
