{"eip":2544,"title":"ENS Wildcard Resolution","description":"Adds support for \"wildcard\" resolution of subdomains in ENS.","authors":["Nick Johnson (@arachnid)","0age (@0age)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2020-02-28","requires":[137],"discussionsTo":"https://ethereum-magicians.org/t/eip-2544-ens-wildcard-resolution","repo":"ERCs","label":"ERC-2544","officialUrl":"https://eips.ethereum.org/EIPS/eip-2544","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2544.md","url":"https://eips.huatuo.xyz/eip-2544/","tldr":{"en":"Lets an ENS client walk up to a parent name's resolver when a subdomain has none, so a project can serve unlimited subdomains like `alice.wallet.eth` without registering each one.","ja":"サブドメインにリゾルバーがない場合に、ENS クライアントが親の名前のリゾルバーまでたどれるようにする。これにより、`alice.wallet.eth` のようなサブドメインを 1 つずつ登録せずに、プロジェクトが無制限に提供できる。","ko":"서브도메인에 리졸버가 없을 때 ENS 클라이언트가 부모 이름의 리졸버까지 거슬러 올라가게 해, 프로젝트가 `alice.wallet.eth` 같은 서브도메인을 하나씩 등록하지 않고도 무제한으로 제공할 수 있게 한다.","zh":"当子域名没有解析器时，让 ENS 客户端向上查找父域名的解析器，这样项目无需逐个注册，就能提供数量不限的 `alice.wallet.eth` 这类子域名。"},"tags":["ens","naming","wildcard","resolver","subdomains"],"explainers":{"en":{"lang":"en","tldr":"Lets an ENS client walk up to a parent name's resolver when a subdomain has none, so a project can serve unlimited subdomains like `alice.wallet.eth` without registering each one.","tags":["ens","naming","wildcard","resolver","subdomains"],"related":[137,2304,3668,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2544/","markdown":"## What problem does it solve?\n\nUnder [EIP-137](/eip-137/), resolving an ENS name is two steps: hash the name into a `node`, ask the ENS registry for that node's resolver, then ask the resolver for the record. If no resolver is set for that exact node, resolution simply fails.\n\nWallets, exchanges and dapps wanted to give every user a name like `user123.app.eth`. Doing that meant one registry transaction per user, which is expensive at scale and means the name is not usable until that transaction is mined.\n\nERC-2544 adds **wildcard resolution**: one resolver set on the parent can answer for any subdomain beneath it, without changing the registry or existing resolvers.\n\n## How it works\n\n**Finding the resolver.** The client looks up the resolver for the full name. If it is the zero address, it strips the leftmost label and tries again (`a.b.eth` → `b.eth` → `eth` → root) until it finds a resolver or runs out of labels.\n\n**Calling the resolver.** The record is always requested for the *original* name, not the parent where the resolver was found. Resolvers may also implement a new function:\n\n```solidity\nfunction resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory);\n```\n\n- `name` is the full name in DNS wire format (length-prefixed labels), so the resolver can see the plaintext labels instead of only a hash.\n- `data` is the ABI-encoded call the client would have made, e.g. `addr(namehash(name))`.\n- The resolver returns that function's ABI-encoded result, or reverts if unsupported.\n\nIf the resolver advertises `resolve` via [ERC-165](/eip-165/), the client calls it; otherwise it calls the normal function (`addr`, `text`, …) directly. Seeing plaintext labels enables designs such as resolving `42.nifty.eth` to the owner of NFT #42, or to a `CREATE2` address derived from the label.\n\nA resolver set directly on a subdomain still takes priority over the parent's wildcard.\n\n## Sample code\n\nClient-side resolver lookup, mirroring the spec's pseudocode (ethers v6):\n\n```ts\nimport { Contract, ZeroAddress, namehash, dnsEncode } from \"ethers\";\n\nconst parent = (name: string) =\u003e name.split(\".\").slice(1).join(\".\");\n\nasync function findResolver(registry: Contract, name: string) {\n  for (let current = name; current !== \"\"; current = parent(current)) {\n    const r: string = await registry.resolver(namehash(current));\n    if (r !== ZeroAddress) return r;\n  }\n  return null; // resolution fails\n}\n\n// With an extended resolver: send the original name, DNS-encoded\n// const data = iface.encodeFunctionData(\"addr(bytes32)\", [namehash(name)]);\n// const out  = await resolver.resolve(dnsEncode(name), data);\n```\n\nRecent versions of ethers and viem already implement this walk-up logic in their ENS helpers.\n\n## Things to know\n\n- Status is **Stagnant** in the EIP repository, and the spec leaves the `resolve` interface ID as `0xTBD`. ENS has since adopted the design in its own ENSIP process, which is what libraries implement; check ENS documentation for the final interface ID.\n- Legacy EIP-137-only clients will not find wildcard records; they fail to resolve rather than resolve incorrectly.\n- Catch-all resolvers make typos dangerous: `alcie.app.eth` may resolve to a valid-looking address. Consider validating names or making funds recoverable.\n- `resolve` pairs naturally with [ERC-3668](/eip-3668/) (CCIP-Read), which lets the resolver fetch records from off-chain sources.\n"},"ja":{"lang":"ja","tldr":"サブドメインにリゾルバーがない場合に、ENS クライアントが親の名前のリゾルバーまでたどれるようにする。これにより、`alice.wallet.eth` のようなサブドメインを 1 つずつ登録せずに、プロジェクトが無制限に提供できる。","tags":["ens","naming","wildcard","resolver","subdomains"],"related":[137,2304,3668,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2544/","markdown":"## 何を解決するのか\n\n[EIP-137](/eip-137/) では、ENS の名前解決は 2 段階です。名前をハッシュして `node` にし、その node のリゾルバーを ENS レジストリに問い合わせ、次にリゾルバーにレコードを問い合わせます。その node ちょうどにリゾルバーが設定されていなければ、解決は単に失敗します。\n\nウォレット、取引所、dapp は、すべてのユーザーに `user123.app.eth` のような名前を与えたいと考えていました。そのためにはユーザーごとにレジストリへのトランザクションが 1 回必要で、規模が大きくなるとコストがかさみ、そのトランザクションがマイニングされるまで名前も使えません。\n\nERC-2544 は**ワイルドカード解決**を追加します。親に設定した 1 つのリゾルバーが、レジストリや既存のリゾルバーを変更することなく、その下のあらゆるサブドメインに応答できます。\n\n## 仕組み\n\n**リゾルバーの探索。** クライアントは、完全な名前のリゾルバーを調べます。それがゼロアドレスなら、いちばん左のラベルを取り除いて再試行します（`a.b.eth` → `b.eth` → `eth` → ルート）。リゾルバーが見つかるか、ラベルがなくなるまで繰り返します。\n\n**リゾルバーの呼び出し。** レコードは、リゾルバーが見つかった親ではなく、常に*元の*名前に対して要求されます。リゾルバーは新しい関数を実装することもできます。\n\n```solidity\nfunction resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory);\n```\n\n- `name` は DNS ワイヤ形式（長さ接頭辞付きのラベル）の完全な名前です。これにより、リゾルバーはハッシュだけでなく平文のラベルを確認できます。\n- `data` は、クライアントが本来行うはずだった呼び出しを ABI エンコードしたものです（例：`addr(namehash(name))`）。\n- リゾルバーはその関数の ABI エンコード済みの結果を返し、サポートしていなければ revert します。\n\nリゾルバーが [ERC-165](/eip-165/) で `resolve` を公開している場合、クライアントはそれを呼び出します。そうでなければ、通常の関数（`addr`、`text` など）を直接呼び出します。平文のラベルが見えることで、`42.nifty.eth` を NFT #42 の所有者に解決したり、ラベルから導出した `CREATE2` アドレスに解決したりする設計が可能になります。\n\nサブドメインに直接設定されたリゾルバーは、引き続き親のワイルドカードより優先されます。\n\n## サンプルコード\n\n仕様の疑似コードに沿った、クライアント側のリゾルバー探索です（ethers v6）。\n\n```ts\nimport { Contract, ZeroAddress, namehash, dnsEncode } from \"ethers\";\n\nconst parent = (name: string) =\u003e name.split(\".\").slice(1).join(\".\");\n\nasync function findResolver(registry: Contract, name: string) {\n  for (let current = name; current !== \"\"; current = parent(current)) {\n    const r: string = await registry.resolver(namehash(current));\n    if (r !== ZeroAddress) return r;\n  }\n  return null; // resolution fails\n}\n\n// With an extended resolver: send the original name, DNS-encoded\n// const data = iface.encodeFunctionData(\"addr(bytes32)\", [namehash(name)]);\n// const out  = await resolver.resolve(dnsEncode(name), data);\n```\n\n最近のバージョンの ethers と viem は、この上方向への探索ロジックを ENS ヘルパーですでに実装しています。\n\n## 知っておくべきこと\n\n- EIP リポジトリ上のステータスは **Stagnant** で、仕様では `resolve` のインターフェース ID が `0xTBD` のままです。その後 ENS はこの設計を独自の ENSIP プロセスで採用しており、ライブラリが実装しているのはそちらです。最終的なインターフェース ID は ENS のドキュメントで確認してください。\n- EIP-137 のみに対応した従来のクライアントはワイルドカードのレコードを見つけられません。誤って解決するのではなく、解決に失敗します。\n- すべてを受け止めるリゾルバーでは、タイプミスが危険です。`alcie.app.eth` が、正しそうに見えるアドレスに解決されるかもしれません。名前の検証や、資金を取り戻せる仕組みを検討してください。\n- `resolve` は、リゾルバーがオフチェーンのソースからレコードを取得できるようにする [ERC-3668](/eip-3668/)（CCIP-Read）と相性が良いです。\n"},"ko":{"lang":"ko","tldr":"서브도메인에 리졸버가 없을 때 ENS 클라이언트가 부모 이름의 리졸버까지 거슬러 올라가게 해, 프로젝트가 `alice.wallet.eth` 같은 서브도메인을 하나씩 등록하지 않고도 무제한으로 제공할 수 있게 한다.","tags":["ens","naming","wildcard","resolver","subdomains"],"related":[137,2304,3668,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2544/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-137](/eip-137/)에서 ENS 이름 해석은 두 단계입니다. 이름을 해시해 `node`로 만들고, ENS 레지스트리에 그 node의 리졸버를 물어본 다음, 리졸버에 레코드를 물어봅니다. 그 node에 정확히 맞는 리졸버가 설정되어 있지 않으면 해석은 그냥 실패합니다.\n\n지갑, 거래소, dapp은 모든 사용자에게 `user123.app.eth` 같은 이름을 주고 싶어 했습니다. 그러려면 사용자마다 레지스트리 트랜잭션이 하나씩 필요한데, 규모가 커지면 비용이 많이 들고 그 트랜잭션이 채굴되기 전에는 이름을 쓸 수도 없습니다.\n\nERC-2544는 **와일드카드 해석**을 추가합니다. 부모에 설정된 리졸버 하나가 레지스트리나 기존 리졸버를 바꾸지 않고도 그 아래 모든 서브도메인에 응답할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n**리졸버 찾기.** 클라이언트는 전체 이름의 리졸버를 조회합니다. 제로 주소이면 가장 왼쪽 레이블을 떼어 내고 다시 시도합니다(`a.b.eth` → `b.eth` → `eth` → 루트). 리졸버를 찾거나 레이블이 없어질 때까지 반복합니다.\n\n**리졸버 호출.** 레코드는 리졸버를 찾은 부모가 아니라 항상 *원래* 이름에 대해 요청합니다. 리졸버는 새 함수를 구현할 수도 있습니다.\n\n```solidity\nfunction resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory);\n```\n\n- `name`은 DNS 와이어 형식(길이 접두사가 붙은 레이블)의 전체 이름이므로, 리졸버는 해시뿐 아니라 평문 레이블을 볼 수 있습니다.\n- `data`는 클라이언트가 원래 보냈을 호출을 ABI 인코딩한 것입니다. 예: `addr(namehash(name))`.\n- 리졸버는 그 함수의 ABI 인코딩된 결과를 반환하며, 지원하지 않으면 revert합니다.\n\n리졸버가 [ERC-165](/eip-165/)로 `resolve`를 알리면 클라이언트가 이를 호출하고, 그렇지 않으면 일반 함수(`addr`, `text` 등)를 직접 호출합니다. 평문 레이블을 볼 수 있으므로 `42.nifty.eth`를 NFT #42의 소유자로 해석하거나 레이블에서 도출한 `CREATE2` 주소로 해석하는 설계가 가능합니다.\n\n서브도메인에 직접 설정된 리졸버는 여전히 부모의 와일드카드보다 우선합니다.\n\n## 샘플 코드\n\n명세의 의사 코드를 따른 클라이언트 측 리졸버 조회입니다(ethers v6).\n\n```ts\nimport { Contract, ZeroAddress, namehash, dnsEncode } from \"ethers\";\n\nconst parent = (name: string) =\u003e name.split(\".\").slice(1).join(\".\");\n\nasync function findResolver(registry: Contract, name: string) {\n  for (let current = name; current !== \"\"; current = parent(current)) {\n    const r: string = await registry.resolver(namehash(current));\n    if (r !== ZeroAddress) return r;\n  }\n  return null; // resolution fails\n}\n\n// With an extended resolver: send the original name, DNS-encoded\n// const data = iface.encodeFunctionData(\"addr(bytes32)\", [namehash(name)]);\n// const out  = await resolver.resolve(dnsEncode(name), data);\n```\n\n최신 버전의 ethers와 viem은 ENS 헬퍼에 이미 이런 상위 탐색 로직을 구현해 두었습니다.\n\n## 알아둘 점\n\n- EIP 저장소에서의 상태는 **Stagnant**이며, 명세에는 `resolve`의 인터페이스 ID가 `0xTBD`로 남아 있습니다. 이후 ENS가 이 설계를 자체 ENSIP 절차로 채택했으며, 라이브러리가 구현하는 것은 그쪽입니다. 최종 인터페이스 ID는 ENS 문서를 확인하세요.\n- EIP-137만 지원하는 기존 클라이언트는 와일드카드 레코드를 찾지 못합니다. 잘못 해석하는 것이 아니라 해석에 실패합니다.\n- 모든 이름을 받아 주는 리졸버는 오타를 위험하게 만듭니다. `alcie.app.eth`가 그럴듯해 보이는 주소로 해석될 수 있습니다. 이름을 검증하거나 자금을 회수할 수 있게 만드는 방안을 고려하세요.\n- `resolve`는 리졸버가 오프체인 소스에서 레코드를 가져올 수 있게 해 주는 [ERC-3668](/eip-3668/)(CCIP-Read)과 자연스럽게 어울립니다.\n"},"zh":{"lang":"zh","tldr":"当子域名没有解析器时，让 ENS 客户端向上查找父域名的解析器，这样项目无需逐个注册，就能提供数量不限的 `alice.wallet.eth` 这类子域名。","tags":["ens","naming","wildcard","resolver","subdomains"],"related":[137,2304,3668,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2544/","markdown":"## 它解决什么问题？\n\n在 [EIP-137](/eip-137/) 下，解析一个 ENS 名称分为两步：把名称哈希成 `node`，向 ENS 注册表查询该 node 的解析器，再向解析器查询记录。如果该 node 本身没有设置解析器，解析就直接失败。\n\n钱包、交易所和 dapp 希望给每个用户一个类似 `user123.app.eth` 的名称。这意味着每个用户都要发一笔注册表交易，规模一大成本就很高，而且在该交易被打包之前名称无法使用。\n\nERC-2544 增加了**通配符解析**：设置在父域名上的一个解析器可以回答其下任意子域名的查询，而无需改动注册表或现有解析器。\n\n## 它如何运作\n\n**查找解析器。** 客户端先查找完整名称的解析器。如果是零地址，就去掉最左边的标签再试一次（`a.b.eth` → `b.eth` → `eth` → 根），直到找到解析器或标签用完为止。\n\n**调用解析器。** 记录始终是针对*原始*名称请求的，而不是找到解析器的那个父域名。解析器还可以实现一个新函数：\n\n```solidity\nfunction resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory);\n```\n\n- `name` 是 DNS 线格式（带长度前缀的标签）的完整名称，因此解析器能看到明文标签，而不只是一个哈希。\n- `data` 是客户端原本会发起的调用的 ABI 编码，例如 `addr(namehash(name))`。\n- 解析器返回该函数 ABI 编码后的结果，如果不支持则 revert。\n\n如果解析器通过 [ERC-165](/eip-165/) 声明支持 `resolve`，客户端就调用它；否则直接调用常规函数（`addr`、`text` 等）。能看到明文标签，使得一些设计成为可能，例如把 `42.nifty.eth` 解析为 NFT #42 的所有者，或解析为由标签推导出的 `CREATE2` 地址。\n\n直接设置在子域名上的解析器仍然优先于父域名的通配符。\n\n## 示例代码\n\n客户端侧的解析器查找，对应规范中的伪代码（ethers v6）：\n\n```ts\nimport { Contract, ZeroAddress, namehash, dnsEncode } from \"ethers\";\n\nconst parent = (name: string) =\u003e name.split(\".\").slice(1).join(\".\");\n\nasync function findResolver(registry: Contract, name: string) {\n  for (let current = name; current !== \"\"; current = parent(current)) {\n    const r: string = await registry.resolver(namehash(current));\n    if (r !== ZeroAddress) return r;\n  }\n  return null; // resolution fails\n}\n\n// With an extended resolver: send the original name, DNS-encoded\n// const data = iface.encodeFunctionData(\"addr(bytes32)\", [namehash(name)]);\n// const out  = await resolver.resolve(dnsEncode(name), data);\n```\n\n较新版本的 ethers 和 viem 已经在它们的 ENS 辅助函数中实现了这种向上查找的逻辑。\n\n## 需要注意\n\n- 在 EIP 仓库中状态为 **Stagnant**，规范中 `resolve` 的接口 ID 仍为 `0xTBD`。此后 ENS 在自己的 ENSIP 流程中采纳了这一设计，各库实现的就是那一版；最终的接口 ID 请查阅 ENS 文档。\n- 只支持 EIP-137 的旧客户端找不到通配符记录；它们会解析失败，而不会解析出错误结果。\n- 兜底型解析器会让拼写错误变得危险：`alcie.app.eth` 可能解析为一个看上去有效的地址。请考虑验证名称，或让资金可以追回。\n- `resolve` 与 [ERC-3668](/eip-3668/)（CCIP-Read）天然搭配，后者让解析器可以从链下来源获取记录。\n"}}}
