{"eip":7831,"title":"Multi-Chain Addressing","description":"Textual representation of an address and a chain.","authors":["Sam Wilson (@SamWilsn) \u003csam@binarycake.ca\u003e"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2024-08-30","requires":[55,137,155,165,2304],"discussionsTo":"https://ethereum-magicians.org/t/erc-7831-multi-chain-addressing/21942","repo":"ERCs","label":"ERC-7831","officialUrl":"https://eips.ethereum.org/EIPS/eip-7831","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7831.md","url":"https://eips.huatuo.xyz/eip-7831/","tldr":{"en":"A human-readable address format like example.eth:optimism that names both the account and the chain, with chain names resolved through ENS instead of a centralised list.","ja":"example.eth:optimism のように、アカウントとチェーンの両方を名前で示す人間が読めるアドレス形式。チェーン名は中央集権的なリストではなく ENS で解決する。","ko":"example.eth:optimism처럼 계정과 체인을 모두 이름으로 나타내는 사람이 읽을 수 있는 주소 형식. 체인 이름은 중앙화된 목록이 아니라 ENS로 해석한다.","zh":"一种人类可读的地址格式，如 example.eth:optimism，同时标明账户和链，链名通过 ENS 而不是中心化列表来解析。"},"tags":["addresses","multichain","ens","l2","ux"],"explainers":{"en":{"lang":"en","tldr":"A human-readable address format like example.eth:optimism that names both the account and the chain, with chain names resolved through ENS instead of a centralised list.","tags":["addresses","multichain","ens","l2","ux"],"related":[7930,3770,137,2304,55],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7831/","markdown":"## What problem does it solve?\n\nWith many L2s sharing the same address format, a bare `0x…` address no longer tells you **where** to send funds. Sending to the right address on the wrong chain can make funds unreachable. Chain IDs are not human-friendly, and the usual name-to-ID mapping is a centrally maintained list that does not scale with the number of chains.\n\nERC-7831 proposes a single string that carries both the account and the target chain, and uses ENS on a \"root chain\" to look up what a chain name means.\n\n## How it works\n\nA chain-specific address has up to three colon-separated parts, from most specific (left) to most general (right):\n\n```\nlocal-part : chain-part [ : root-part ]\n```\n\n- **`local-part`**: the account. Either a hex address **without** `0x` (checksum casing required, leading zeros optional), or an ENS-style name that must contain at least one dot.\n- **`chain-part`**: an ENS label naming the target chain, e.g. `optimism`.\n- **`root-part`** (optional): the decimal chain ID of the root chain where ENS lookups happen. Omit it for mainnet (`1`); it is required otherwise.\n\nThe whole thing may be wrapped in parentheses to avoid parsing ambiguity, e.g. `(example.eth:optimism)`.\n\nResolution goes right to left:\n\n1. Pick the root chain (default mainnet).\n2. Resolve `\u003cchain-part\u003e` under a parent ENS name to a **bridge contract**. The bridge must implement `ChainMetadata` (`chainId()`, `coinType()`, `acceptsName()`) and pass ERC-165 and `acceptsName` checks.\n3. Resolve the account: verify the checksum for hex, or resolve the ENS name with [ERC-2304](/eip-2304/) multichain `addr` using the target chain's coin type.\n\nThe checksum is an [ERC-55](/eip-55/) variant that also works for addresses that are not 20 bytes long.\n\n## Sample code\n\nSplitting an address into its parts (TypeScript):\n\n```ts\ntype ChainSpecific = { local: string; chain: string; root: bigint };\n\nfunction parseChainSpecific(input: string): ChainSpecific {\n  const bare = input.startsWith(\"(\") \u0026\u0026 input.endsWith(\")\") ? input.slice(1, -1) : input;\n  const parts = bare.split(\":\");\n  if (parts.length \u003c 2 || parts.length \u003e 3) throw new Error(\"expected local:chain[:root]\");\n  const [local, chain, root] = parts;\n  if (local.startsWith(\"0x\")) throw new Error(\"hex local-part must not have 0x\");\n  const isHex = /^[0-9a-fA-F]+$/.test(local);\n  if (!isHex \u0026\u0026 !local.includes(\".\")) throw new Error(\"ENS local-part needs a dot\");\n  if (root !== undefined \u0026\u0026 !/^[0-9]+$/.test(root)) throw new Error(\"root must be decimal\");\n  return { local, chain, root: root ? BigInt(root) : 1n };\n}\n\nparseChainSpecific(\"example.eth:optimism\");\n// { local: \"example.eth\", chain: \"optimism\", root: 1n }\nparseChainSpecific(\"6A10161835a36302BfD39bDA9B44f5734442234e:ethereum:11155111\");\n// root chain is 11155111 instead of mainnet\n```\n\n## Things to know\n\n- **Status: Draft**, with open TODOs. The parent ENS name for chain labels is a placeholder (`tbd.eth`) and the bridge's ERC-165 interface ID is not final, so the format cannot be resolved end-to-end yet.\n- `example.eth:optimism` and `example.eth:optimism:10` are different: the second resolves names against an ENS deployment on chain 10.\n- Related efforts tackle the same problem differently: [ERC-3770](/eip-3770/) prefixes a short chain name (`eth:0x…`), and [ERC-7930](/eip-7930/) defines a binary interoperable address format.\n- Wallets that do not support the format will simply reject these strings, since they are neither valid hex addresses nor plain ENS names.\n"},"ja":{"lang":"ja","tldr":"example.eth:optimism のように、アカウントとチェーンの両方を名前で示す人間が読めるアドレス形式。チェーン名は中央集権的なリストではなく ENS で解決する。","tags":["addresses","multichain","ens","l2","ux"],"related":[7930,3770,137,2304,55],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7831/","markdown":"## 何を解決するのか\n\n多くの L2 が同じアドレス形式を共有しているため、素の `0x…` アドレスだけでは、資金を**どこに**送ればよいのかわかりません。正しいアドレスでも間違ったチェーンに送ると、資金に手が届かなくなることがあります。チェーン ID は人間にとって扱いやすくなく、名前から ID への一般的な対応づけは、中央で管理されるリストであり、チェーンの数が増えるとスケールしません。\n\nERC-7831 は、アカウントと送信先チェーンの両方を運ぶ 1 つの文字列を提案し、チェーン名が何を意味するかを調べるために「ルートチェーン」上の ENS を使います。\n\n## 仕組み\n\nチェーン固有のアドレスは、コロンで区切られた最大 3 つの部分からなり、左が最も具体的、右が最も一般的です。\n\n```\nlocal-part : chain-part [ : root-part ]\n```\n\n- **`local-part`**: アカウント。`0x` を**付けない** 16 進アドレス（チェックサムの大文字小文字が必須で、先頭のゼロは省略可）か、少なくとも 1 つのドットを含む ENS 形式の名前のどちらかです。\n- **`chain-part`**: 送信先チェーンを示す ENS ラベル（例: `optimism`）。\n- **`root-part`**（任意）: ENS の参照を行うルートチェーンの 10 進のチェーン ID。メインネット（`1`）の場合は省略でき、それ以外では必須です。\n\n解析の曖昧さを避けるため、全体を丸括弧で囲んでもかまいません。例: `(example.eth:optimism)`。\n\n解決は右から左へ進みます。\n\n1. ルートチェーンを選びます（デフォルトはメインネット）。\n2. 親の ENS 名の下で `\u003cchain-part\u003e` を**ブリッジコントラクト**に解決します。ブリッジは `ChainMetadata`（`chainId()`、`coinType()`、`acceptsName()`）を実装し、ERC-165 と `acceptsName` のチェックに通らなければなりません。\n3. アカウントを解決します。16 進ならチェックサムを検証し、ENS 名なら、送信先チェーンの coin type を使って [ERC-2304](/eip-2304/) のマルチチェーン `addr` で解決します。\n\nチェックサムは [ERC-55](/eip-55/) の派生形式で、20 バイトでないアドレスにも使えます。\n\n## サンプルコード\n\nアドレスを各部分に分割する例（TypeScript）:\n\n```ts\ntype ChainSpecific = { local: string; chain: string; root: bigint };\n\nfunction parseChainSpecific(input: string): ChainSpecific {\n  const bare = input.startsWith(\"(\") \u0026\u0026 input.endsWith(\")\") ? input.slice(1, -1) : input;\n  const parts = bare.split(\":\");\n  if (parts.length \u003c 2 || parts.length \u003e 3) throw new Error(\"expected local:chain[:root]\");\n  const [local, chain, root] = parts;\n  if (local.startsWith(\"0x\")) throw new Error(\"hex local-part must not have 0x\");\n  const isHex = /^[0-9a-fA-F]+$/.test(local);\n  if (!isHex \u0026\u0026 !local.includes(\".\")) throw new Error(\"ENS local-part needs a dot\");\n  if (root !== undefined \u0026\u0026 !/^[0-9]+$/.test(root)) throw new Error(\"root must be decimal\");\n  return { local, chain, root: root ? BigInt(root) : 1n };\n}\n\nparseChainSpecific(\"example.eth:optimism\");\n// { local: \"example.eth\", chain: \"optimism\", root: 1n }\nparseChainSpecific(\"6A10161835a36302BfD39bDA9B44f5734442234e:ethereum:11155111\");\n// root chain is 11155111 instead of mainnet\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft**。未解決の TODO があります。チェーンラベルの親 ENS 名はプレースホルダー（`tbd.eth`）で、ブリッジの ERC-165 インターフェース ID も確定していないため、この形式はまだエンドツーエンドでは解決できません。\n- `example.eth:optimism` と `example.eth:optimism:10` は別物です。後者は、チェーン 10 上の ENS のデプロイに対して名前を解決します。\n- 関連する取り組みが、同じ問題を別の方法で扱っています。[ERC-3770](/eip-3770/) は短いチェーン名をプレフィックスにし（`eth:0x…`）、[ERC-7930](/eip-7930/) はバイナリの相互運用可能なアドレス形式を定義します。\n- この形式に対応していないウォレットは、有効な 16 進アドレスでも通常の ENS 名でもないため、こうした文字列を単に拒否します。\n"},"ko":{"lang":"ko","tldr":"example.eth:optimism처럼 계정과 체인을 모두 이름으로 나타내는 사람이 읽을 수 있는 주소 형식. 체인 이름은 중앙화된 목록이 아니라 ENS로 해석한다.","tags":["addresses","multichain","ens","l2","ux"],"related":[7930,3770,137,2304,55],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7831/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 L2가 같은 주소 형식을 쓰다 보니, `0x…` 주소만으로는 자금을 **어디로** 보내야 하는지 알 수 없습니다. 올바른 주소라도 잘못된 체인으로 보내면 자금에 접근할 수 없게 될 수 있습니다. 체인 ID는 사람이 다루기 쉽지 않고, 이름을 ID로 바꾸는 일반적인 매핑은 중앙에서 관리하는 목록이라 체인 수가 늘어나면 확장되지 않습니다.\n\nERC-7831은 계정과 대상 체인을 함께 담은 하나의 문자열을 제안하고, 체인 이름이 무엇을 뜻하는지 조회하는 데 \"루트 체인\"의 ENS를 사용합니다.\n\n## 어떻게 동작하나요?\n\n체인별 주소는 콜론으로 구분된 최대 세 부분으로 이루어지며, 왼쪽이 가장 구체적이고 오른쪽이 가장 일반적입니다.\n\n```\nlocal-part : chain-part [ : root-part ]\n```\n\n- **`local-part`**: 계정. `0x`가 **없는** 16진 주소(체크섬 대소문자 필수, 앞의 0은 선택)이거나, 점이 하나 이상 들어간 ENS 스타일 이름입니다.\n- **`chain-part`**: 대상 체인을 가리키는 ENS 레이블(예: `optimism`).\n- **`root-part`**(선택): ENS 조회가 이뤄지는 루트 체인의 10진 체인 ID. 메인넷(`1`)이면 생략할 수 있고, 그 외에는 필수입니다.\n\n파싱의 모호함을 피하기 위해 전체를 괄호로 감쌀 수 있습니다. 예: `(example.eth:optimism)`.\n\n해석은 오른쪽에서 왼쪽으로 진행됩니다.\n\n1. 루트 체인을 고릅니다(기본은 메인넷).\n2. 상위 ENS 이름 아래에서 `\u003cchain-part\u003e`를 **브리지 컨트랙트**로 해석합니다. 브리지는 `ChainMetadata`(`chainId()`, `coinType()`, `acceptsName()`)를 구현하고 ERC-165 및 `acceptsName` 검사를 통과해야 합니다.\n3. 계정을 해석합니다. 16진이면 체크섬을 검증하고, ENS 이름이면 대상 체인의 coin type으로 [ERC-2304](/eip-2304/) 멀티체인 `addr`을 사용해 해석합니다.\n\n체크섬은 [ERC-55](/eip-55/)의 변형으로, 20바이트가 아닌 주소에서도 동작합니다.\n\n## 샘플 코드\n\n주소를 각 부분으로 나누기(TypeScript):\n\n```ts\ntype ChainSpecific = { local: string; chain: string; root: bigint };\n\nfunction parseChainSpecific(input: string): ChainSpecific {\n  const bare = input.startsWith(\"(\") \u0026\u0026 input.endsWith(\")\") ? input.slice(1, -1) : input;\n  const parts = bare.split(\":\");\n  if (parts.length \u003c 2 || parts.length \u003e 3) throw new Error(\"expected local:chain[:root]\");\n  const [local, chain, root] = parts;\n  if (local.startsWith(\"0x\")) throw new Error(\"hex local-part must not have 0x\");\n  const isHex = /^[0-9a-fA-F]+$/.test(local);\n  if (!isHex \u0026\u0026 !local.includes(\".\")) throw new Error(\"ENS local-part needs a dot\");\n  if (root !== undefined \u0026\u0026 !/^[0-9]+$/.test(root)) throw new Error(\"root must be decimal\");\n  return { local, chain, root: root ? BigInt(root) : 1n };\n}\n\nparseChainSpecific(\"example.eth:optimism\");\n// { local: \"example.eth\", chain: \"optimism\", root: 1n }\nparseChainSpecific(\"6A10161835a36302BfD39bDA9B44f5734442234e:ethereum:11155111\");\n// root chain is 11155111 instead of mainnet\n```\n\n## 알아둘 점\n\n- **상태: Draft**이며 미해결 TODO가 있습니다. 체인 레이블의 상위 ENS 이름은 자리표시자(`tbd.eth`)이고 브리지의 ERC-165 인터페이스 ID도 확정되지 않아, 이 형식은 아직 처음부터 끝까지 해석할 수 없습니다.\n- `example.eth:optimism`과 `example.eth:optimism:10`은 다릅니다. 후자는 체인 10에 배포된 ENS를 기준으로 이름을 해석합니다.\n- 관련된 시도들이 같은 문제를 다르게 풀고 있습니다. [ERC-3770](/eip-3770/)은 짧은 체인 이름을 접두사로 붙이고(`eth:0x…`), [ERC-7930](/eip-7930/)은 바이너리 상호운용 주소 형식을 정의합니다.\n- 이 형식을 지원하지 않는 지갑은 유효한 16진 주소도 일반 ENS 이름도 아니기 때문에 이런 문자열을 그냥 거부합니다.\n"},"zh":{"lang":"zh","tldr":"一种人类可读的地址格式，如 example.eth:optimism，同时标明账户和链，链名通过 ENS 而不是中心化列表来解析。","tags":["addresses","multichain","ens","l2","ux"],"related":[7930,3770,137,2304,55],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7831/","markdown":"## 它解决什么问题？\n\n当许多 L2 共用相同的地址格式时，单独一个 `0x…` 地址已经无法告诉你资金应该发往**哪里**。把资金发到错误链上的正确地址，可能导致资金无法找回。链 ID 对人不友好，而通常的名称到 ID 映射是一份集中维护的列表，无法随链数量扩展。\n\nERC-7831 提出一个同时携带账户和目标链的字符串，并利用\"根链\"上的 ENS 来查询链名的含义。\n\n## 它如何运作\n\n链特定地址最多由三个以冒号分隔的部分组成，从最具体（左）到最通用（右）：\n\n```\nlocal-part : chain-part [ : root-part ]\n```\n\n- **`local-part`**：账户。要么是**不带** `0x` 的十六进制地址（要求校验和大小写，前导零可选），要么是至少包含一个点的 ENS 风格名称。\n- **`chain-part`**：命名目标链的 ENS 标签，例如 `optimism`。\n- **`root-part`**（可选）：进行 ENS 查询的根链的十进制链 ID。主网（`1`）可省略，其他情况下必须提供。\n\n为避免解析歧义，整体可以用括号包起来，例如 `(example.eth:optimism)`。\n\n解析从右到左进行：\n\n1. 选择根链（默认为主网）。\n2. 在某个父级 ENS 名称下，把 `\u003cchain-part\u003e` 解析为一个**桥合约**。该桥必须实现 `ChainMetadata`（`chainId()`、`coinType()`、`acceptsName()`），并通过 ERC-165 和 `acceptsName` 检查。\n3. 解析账户：对十六进制验证校验和，或使用目标链的 coin type，通过 [ERC-2304](/eip-2304/) 多链 `addr` 解析 ENS 名称。\n\n校验和是 [ERC-55](/eip-55/) 的一个变体，也适用于长度不是 20 字节的地址。\n\n## 示例代码\n\n把地址拆分为各部分（TypeScript）：\n\n```ts\ntype ChainSpecific = { local: string; chain: string; root: bigint };\n\nfunction parseChainSpecific(input: string): ChainSpecific {\n  const bare = input.startsWith(\"(\") \u0026\u0026 input.endsWith(\")\") ? input.slice(1, -1) : input;\n  const parts = bare.split(\":\");\n  if (parts.length \u003c 2 || parts.length \u003e 3) throw new Error(\"expected local:chain[:root]\");\n  const [local, chain, root] = parts;\n  if (local.startsWith(\"0x\")) throw new Error(\"hex local-part must not have 0x\");\n  const isHex = /^[0-9a-fA-F]+$/.test(local);\n  if (!isHex \u0026\u0026 !local.includes(\".\")) throw new Error(\"ENS local-part needs a dot\");\n  if (root !== undefined \u0026\u0026 !/^[0-9]+$/.test(root)) throw new Error(\"root must be decimal\");\n  return { local, chain, root: root ? BigInt(root) : 1n };\n}\n\nparseChainSpecific(\"example.eth:optimism\");\n// { local: \"example.eth\", chain: \"optimism\", root: 1n }\nparseChainSpecific(\"6A10161835a36302BfD39bDA9B44f5734442234e:ethereum:11155111\");\n// root chain is 11155111 instead of mainnet\n```\n\n## 需要注意\n\n- **状态：Draft**，仍有待办事项。链标签的父级 ENS 名称只是占位符（`tbd.eth`），桥的 ERC-165 接口 ID 也尚未最终确定，因此该格式目前还无法端到端解析。\n- `example.eth:optimism` 和 `example.eth:optimism:10` 并不相同：后者针对部署在链 10 上的 ENS 来解析名称。\n- 相关工作以不同方式解决同一问题：[ERC-3770](/eip-3770/) 在前面加一个简短的链名（`eth:0x…`），[ERC-7930](/eip-7930/) 则定义了一种二进制的可互操作地址格式。\n- 不支持该格式的钱包会直接拒绝这些字符串，因为它们既不是有效的十六进制地址，也不是普通的 ENS 名称。\n"}}}
