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 covers ERC1844, a proposal for associating contract capabilities (interfaces) with ENS so that external applications can discover more detailed contract functionality.
This article translates, summarizes, and supplements the material below.
I have also covered various other EIPs.
Overview
ERC1844 defines a mechanism for publishing information about contract interfaces associated with Ethereum Name Service (ENS) names or addresses so that applications can discover and use them.
An interface here refers to functionality provided by a particular contract. By allowing applications to query the functionality associated with an address or name through ENS, they can discover where a capability is implemented even if the address itself does not implement that capability directly.
An interface may be implemented by the target contract itself or by a separate contract. The ability to associate functionality flexibly with its implementation location is a defining feature of this proposal.
Motivation
Ethereum has long used ERC165 to determine whether an address (contract) implements a particular interface. However, this is limited to functionality provided by the address itself and does not cover functionality delegated to other contracts.
For more information about ERC165, see the following article.
[ERC165] How to Check Whether a Contract Supports a Particular Interface
In practice, a capability that a contract does not implement itself may still be available through integration with another contract. For example, an ERC20 token might not support atomic swaps (the simultaneous exchange of multiple assets), but its name can be associated with that functionality by combining it with another contract that provides atomic swaps.
With ERC1844, ENS can store information such as the swap functionality associated with this name is implemented at this address. External applications can retrieve that information and connect to the contract providing the correct functionality. This makes richer capability discovery possible using a name or address as the starting point.
This capability provides a foundation for greater application flexibility and extensibility and an improved Web3 user experience.
How It Works
Overview
ERC1844 defines a new function, interfaceImplementer, for querying which smart contract implements a particular interface for a name or address associated with ENS (Ethereum Name Service).
The function adds a new profile to the ENS mechanism known as a resolver. It takes a specified ENS name (node) and an ID that uniquely identifies the interface (interfaceID), and returns the address of the smart contract that actually implements that interface.
Function Specification
function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view returns (address);The function works as follows.
nodeis the hashed value (namehash) of the target ENS name.interfaceIDis an ERC165 interface ID (for example,0x80ac58cd).- The return value is the address of the contract implementing the interface. If no implementation exists, it returns the zero address (
address(0)).
The function itself is also defined as an interface identifiable via ERC165, with the interface ID 0xb8f2bbb4.
Implementation Rules
The returned address must be a smart contract. An EOA (Externally Owned Account) is not permitted.
Where possible, the returned smart contract should also comply with ERC165. In other words, it should expose which interfaces it supports.
Fallback Strategy
Resolvers implementing this feature are also permitted to adopt the following fallback strategy.
First, if no address has been explicitly specified for the requested interface via interfaceImplementer, the resolver can use the addr() function to retrieve the primary contract address associated with the ENS name. It can then check whether that contract supports the specified interface ID. If it does, the resolver returns the address; otherwise, it returns 0.
Even if the target contract reverts during this process, the resolver must return 0 rather than propagate the error.
Applicability
ERC1844 can be used for both forward resolution (name to address) and reverse resolution (address to name) in ENS. This makes it possible to query associated interface information starting from either a name or an address.
Additional Considerations
Problems with Storing Interface Information Directly in Contracts
The simplest approach to interface discovery is to add a function to the target contract itself that reports which interfaces it implements. However, this approach has several problems.
First, each contract must maintain its own list of supported interfaces. This not only increases code complexity but also requires a new access control mechanism to determine who can modify the list. For contracts that were originally simple and static, the additional design work can be a significant burden.
Furthermore, the need for this functionality must be recognized and incorporated into the design during contract development. Such functionality cannot be retroactively added to already deployed contracts. This is a natural constraint of blockchain immutability.
Maintaining an interface list within a contract also imposes a structural restriction: only one canonical list can exist. For example, one user may expect only the basic ERC20 functionality, while another may want to determine whether extended functionality is also supported. Accommodating these different perspectives flexibly can be difficult.
Benefits of Using an ENS Resolver
An approach based on ENS resolvers has been proposed to address these challenges.
ENS makes it possible to associate information dynamically with a name (or address) from outside the contract. This allows anyone to add or update interface information later without modifying the original contract.
With an ENS resolver, even a third party other than the developer can register information such as the interface implementation associated with this ENS name is located at this contract. For example, if an existing token contract does not support atomic swaps, specifying another related contract can improve the discoverability of that functionality.
Compared with the conventional approach of embedding the implementation information in the contract itself, ENS resolvers offer greater extensibility and flexibility in the following ways.
- No modifications to the contract are required.
- Flexible access management (anyone can register information).
- Multiple interface versions or implementations can coexist.
Citation
Nick Johnson (@arachnid), "ERC-1844: ENS Interface Discovery [DRAFT]," Ethereum Improvement Proposals, no. 1844, March 2019. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-1844.
Closing Remarks
This article covered ERC1844, a proposal for associating contract capabilities (interfaces) with ENS so that external applications can discover more detailed contract functionality. I hope it was helpful.
If you have any questions, feel free to reach out via Twitter DM.
I also publish on other platforms, which you can explore below.



