{"eip":4972,"title":"Name-Owned Account","description":"Name-Owned Account for Social Identity","authors":["Shu Dong (@dongshu2013)","Qi Zhou (@qizhou)","Zihao Chen (@zihaoccc)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2022-04-04","requires":[137],"discussionsTo":"https://ethereum-magicians.org/t/eip-4972-name-owned-account/8822","repo":"ERCs","label":"ERC-4972","officialUrl":"https://eips.ethereum.org/EIPS/eip-4972","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4972.md","url":"https://eips.huatuo.xyz/eip-4972/","tldr":{"en":"Gives every name in an ENS-style name service its own deterministic smart contract account, controlled by whoever owns the name, so assets and data can live with the name and move when the name is transferred.","ja":"ENS 型ネームサービスのすべての名前に、決定論的なスマートコントラクトアカウントを 1 つずつ与え、名前の所有者が制御する。資産やデータを名前と一緒に持たせ、名前を譲渡すれば一緒に移動できる。","ko":"ENS 방식 네임 서비스의 모든 이름에 결정적인 스마트 컨트랙트 계정을 하나씩 부여하고 이름 소유자가 제어한다. 자산과 데이터가 이름과 함께 있다가 이름이 이전되면 같이 이동한다.","zh":"为 ENS 类名称服务中的每个名称提供各自确定性的智能合约账户，由名称所有者控制，使资产和数据可以跟随名称，并在名称转让时一并转移。"},"tags":["ens","naming","account","identity","create2"],"explainers":{"en":{"lang":"en","tldr":"Gives every name in an ENS-style name service its own deterministic smart contract account, controlled by whoever owns the name, so assets and data can live with the name and move when the name is transferred.","tags":["ens","naming","account","identity","create2"],"related":[137,1014,6551,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-4972/","markdown":"## What problem does it solve?\n\nA name like `alice.eth` resolves to an address, but the name itself holds nothing. If Alice sells or transfers the name, any assets or reputation are still tied to whatever address she pointed it at, not to the name.\n\nERC-4972 proposes a **Name-Owned Account (NOA)**: a smart contract account that belongs to the name node itself. Whoever owns the name controls the account. Transfer the name and the account, with everything in it, goes along. It also hands every name holder a ready-made smart contract account, which the authors hope helps contract-account adoption.\n\n## How it works\n\nThe ownership chain is: *name owner → name node ([ERC-137](/eip-137/)) → owned account*.\n\nTwo small interfaces:\n\n- The name service registry exposes `ownedAccount(bytes32 node) → address`, the NOA for a given name node.\n- The NOA exposes `name() → bytes32` (its name node) and `nameService() → address` (the registry where the name lives), so anyone can trace an account back to its name and check who currently owns it.\n\nCreation: a factory (possibly the name service itself) deploys NOAs with `CREATE2` ([EIP-1014](/eip-1014/)), using identical init code and the **name node as the salt**. That makes the mapping from name to account one-to-one and deterministic, so the address is known before the account is even deployed.\n\nWhat the NOA can actually *do* (execute calls, hold tokens, validate signatures) is left to the implementation.\n\n## Sample code\n\nInterfaces from the spec, plus how a factory could derive the address:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface INameServiceRegistry {\n    function ownedAccount(bytes32 node) external view returns (address);\n}\n\ninterface INameOwnedAccount {\n    function name() external view returns (bytes32);\n    function nameService() external view returns (address);\n}\n\nabstract contract NOAFactory is INameServiceRegistry {\n    bytes32 public immutable initCodeHash; // hash of the shared NOA init code\n\n    constructor(bytes32 h) { initCodeHash = h; }\n\n    function ownedAccount(bytes32 node) public view returns (address) {\n        return address(uint160(uint256(keccak256(\n            abi.encodePacked(bytes1(0xff), address(this), node, initCodeHash)\n        ))));\n    }\n}\n```\n\nComputing an ENS-style name node off-chain (ethers v6):\n\n```ts\nimport { namehash } from \"ethers\";\nconst node = namehash(\"alice.eth\"); // bytes32 passed to ownedAccount(node)\n```\n\n## Things to know\n\n- Status is **Draft**: the interface may change and there is no canonical deployment defined by the spec.\n- The NOA's own permission model (how it checks the current name owner before executing) is not specified; implementations must get this right, since a stale or wrong owner check would hand control to the wrong party.\n- Anyone buying a name with an NOA effectively buys its contents too; buyers and marketplaces should inspect the account.\n- A similar idea for NFTs is [ERC-6551](/eip-6551/) (token-bound accounts); for general smart accounts see [ERC-4337](/eip-4337/).\n"},"ja":{"lang":"ja","tldr":"ENS 型ネームサービスのすべての名前に、決定論的なスマートコントラクトアカウントを 1 つずつ与え、名前の所有者が制御する。資産やデータを名前と一緒に持たせ、名前を譲渡すれば一緒に移動できる。","tags":["ens","naming","account","identity","create2"],"related":[137,1014,6551,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-4972/","markdown":"## 何を解決するのか\n\n`alice.eth` のような名前はアドレスに解決されますが、名前自体は何も保持していません。Alice が名前を売却または譲渡しても、資産や評判は、彼女が名前の指す先に設定したアドレスに結びついたままで、名前には結びついていません。\n\nERC-4972 は **Name-Owned Account（NOA）**を提案します。名前ノードそのものに属するスマートコントラクトアカウントです。名前を所有する人がそのアカウントを制御します。名前を譲渡すれば、アカウントも中身ごと一緒に移ります。また、すべての名前保有者にすぐ使えるスマートコントラクトアカウントを与えることになり、著者はこれがコントラクトアカウントの普及に役立つことを期待しています。\n\n## 仕組み\n\n所有の連鎖は次のとおりです。*名前の所有者 → 名前ノード（[ERC-137](/eip-137/)）→ 所有されるアカウント*。\n\n小さなインターフェースが 2 つあります。\n\n- ネームサービスのレジストリは `ownedAccount(bytes32 node) → address` を公開します。指定した名前ノードの NOA です。\n- NOA は `name() → bytes32`（その名前ノード）と `nameService() → address`（名前が存在するレジストリ）を公開します。これにより、誰でもアカウントからその名前をたどり、現在の所有者を確認できます。\n\n作成: ファクトリー（ネームサービス自身でもよい）が、同一の init code と、**ソルトとしての名前ノード**を使い、`CREATE2`（[EIP-1014](/eip-1014/)）で NOA をデプロイします。これにより、名前からアカウントへの対応が 1 対 1 かつ決定論的になり、アカウントがデプロイされる前にそのアドレスがわかります。\n\nNOA が実際に何をできるか（呼び出しの実行、トークンの保有、署名の検証）は、実装に委ねられています。\n\n## サンプルコード\n\n仕様のインターフェースと、ファクトリーがアドレスを導出する方法の例:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface INameServiceRegistry {\n    function ownedAccount(bytes32 node) external view returns (address);\n}\n\ninterface INameOwnedAccount {\n    function name() external view returns (bytes32);\n    function nameService() external view returns (address);\n}\n\nabstract contract NOAFactory is INameServiceRegistry {\n    bytes32 public immutable initCodeHash; // hash of the shared NOA init code\n\n    constructor(bytes32 h) { initCodeHash = h; }\n\n    function ownedAccount(bytes32 node) public view returns (address) {\n        return address(uint160(uint256(keccak256(\n            abi.encodePacked(bytes1(0xff), address(this), node, initCodeHash)\n        ))));\n    }\n}\n```\n\nENS 形式の名前ノードをオフチェーンで計算する（ethers v6）:\n\n```ts\nimport { namehash } from \"ethers\";\nconst node = namehash(\"alice.eth\"); // bytes32 passed to ownedAccount(node)\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。インターフェースは変わる可能性があり、仕様は標準となるデプロイを定義していません。\n- NOA 自体の権限モデル（実行前に現在の名前の所有者をどうチェックするか）は規定されていません。古いまたは誤った所有者チェックは、間違った相手に制御権を渡してしまうため、実装側で正しく作る必要があります。\n- NOA 付きの名前を買う人は、その中身も事実上買うことになります。購入者とマーケットプレイスはアカウントを確認すべきです。\n- NFT 向けの似たアイデアが [ERC-6551](/eip-6551/)（トークンバウンドアカウント）です。一般的なスマートアカウントについては [ERC-4337](/eip-4337/) を参照してください。\n"},"ko":{"lang":"ko","tldr":"ENS 방식 네임 서비스의 모든 이름에 결정적인 스마트 컨트랙트 계정을 하나씩 부여하고 이름 소유자가 제어한다. 자산과 데이터가 이름과 함께 있다가 이름이 이전되면 같이 이동한다.","tags":["ens","naming","account","identity","create2"],"related":[137,1014,6551,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-4972/","markdown":"## 어떤 문제를 해결하나요?\n\n`alice.eth` 같은 이름은 주소로 해석되지만 이름 자체는 아무것도 보유하지 않습니다. Alice가 이름을 판매하거나 이전해도 자산이나 평판은 이름이 아니라 그녀가 이름이 가리키도록 설정한 주소에 그대로 묶여 있습니다.\n\nERC-4972는 **Name-Owned Account(NOA)**를 제안합니다. 이름 노드 자체에 속하는 스마트 컨트랙트 계정입니다. 이름을 소유한 사람이 계정을 제어합니다. 이름을 이전하면 계정도 내용물과 함께 따라갑니다. 또한 모든 이름 보유자에게 바로 쓸 수 있는 스마트 컨트랙트 계정을 제공하므로, 저자들은 이것이 컨트랙트 계정 도입에 도움이 되기를 기대합니다.\n\n## 어떻게 동작하나요?\n\n소유권 체인은 다음과 같습니다. *이름 소유자 → 이름 노드([ERC-137](/eip-137/)) → 소유된 계정*.\n\n작은 인터페이스가 두 개 있습니다.\n\n- 네임 서비스 레지스트리는 `ownedAccount(bytes32 node) → address`를 노출하며, 주어진 이름 노드의 NOA를 반환합니다.\n- NOA는 `name() → bytes32`(자신의 이름 노드)와 `nameService() → address`(이름이 있는 레지스트리)를 노출하므로, 누구든 계정에서 이름을 거슬러 추적하고 현재 소유자를 확인할 수 있습니다.\n\n생성: 팩토리(네임 서비스 자체일 수도 있음)가 동일한 init code와 **솔트로서의 이름 노드**를 사용해 `CREATE2`([EIP-1014](/eip-1014/))로 NOA를 배포합니다. 그러면 이름에서 계정으로의 매핑이 일대일이고 결정적이 되어, 계정이 배포되기 전에도 주소를 알 수 있습니다.\n\nNOA가 실제로 *무엇을 할 수 있는지*(호출 실행, 토큰 보유, 서명 검증)는 구현에 맡겨져 있습니다.\n\n## 샘플 코드\n\n명세의 인터페이스와, 팩토리가 주소를 도출하는 방법:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface INameServiceRegistry {\n    function ownedAccount(bytes32 node) external view returns (address);\n}\n\ninterface INameOwnedAccount {\n    function name() external view returns (bytes32);\n    function nameService() external view returns (address);\n}\n\nabstract contract NOAFactory is INameServiceRegistry {\n    bytes32 public immutable initCodeHash; // hash of the shared NOA init code\n\n    constructor(bytes32 h) { initCodeHash = h; }\n\n    function ownedAccount(bytes32 node) public view returns (address) {\n        return address(uint160(uint256(keccak256(\n            abi.encodePacked(bytes1(0xff), address(this), node, initCodeHash)\n        ))));\n    }\n}\n```\n\nENS 스타일 이름 노드를 오프체인에서 계산하기(ethers v6):\n\n```ts\nimport { namehash } from \"ethers\";\nconst node = namehash(\"alice.eth\"); // bytes32 passed to ownedAccount(node)\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다. 인터페이스가 바뀔 수 있고 명세는 표준 배포본을 정의하지 않습니다.\n- NOA 자체의 권한 모델(실행 전에 현재 이름 소유자를 어떻게 확인하는지)은 정해져 있지 않습니다. 오래되었거나 잘못된 소유자 확인은 엉뚱한 쪽에 제어권을 넘기게 되므로 구현이 이를 올바르게 처리해야 합니다.\n- NOA가 있는 이름을 사는 사람은 사실상 그 내용물도 사는 것입니다. 구매자와 마켓플레이스는 계정을 확인해야 합니다.\n- NFT에 대한 비슷한 아이디어는 [ERC-6551](/eip-6551/)(토큰 바운드 계정)이며, 일반적인 스마트 계정은 [ERC-4337](/eip-4337/)을 참고하세요.\n"},"zh":{"lang":"zh","tldr":"为 ENS 类名称服务中的每个名称提供各自确定性的智能合约账户，由名称所有者控制，使资产和数据可以跟随名称，并在名称转让时一并转移。","tags":["ens","naming","account","identity","create2"],"related":[137,1014,6551,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-4972/","markdown":"## 它解决什么问题？\n\n像 `alice.eth` 这样的名称会解析到一个地址，但名称本身不持有任何东西。如果 Alice 出售或转让这个名称，所有资产或声誉仍然绑定在她把名称指向的那个地址上，而不是名称上。\n\nERC-4972 提出了**名称所有账户（Name-Owned Account，NOA）**：属于名称节点本身的智能合约账户。谁拥有名称，谁就控制该账户。转让名称，账户及其中的一切也随之转移。它还为每个名称持有者提供了一个现成的智能合约账户，作者希望这有助于合约账户的普及。\n\n## 它如何运作\n\n所有权链条是：*名称所有者 → 名称节点（[ERC-137](/eip-137/)）→ 被拥有的账户*。\n\n有两个小接口：\n\n- 名称服务注册表公开 `ownedAccount(bytes32 node) → address`，即给定名称节点对应的 NOA。\n- NOA 公开 `name() → bytes32`（其名称节点）和 `nameService() → address`（名称所在的注册表），这样任何人都能从账户追溯到它的名称，并查看当前的所有者。\n\n创建：由工厂（可以就是名称服务本身）使用 `CREATE2`（[EIP-1014](/eip-1014/)）部署 NOA，使用相同的 init code，并以**名称节点作为盐值（salt）**。这使得从名称到账户的映射是一对一且确定性的，因此在账户部署之前就能知道它的地址。\n\nNOA 实际能*做*什么（执行调用、持有代币、验证签名）由具体实现决定。\n\n## 示例代码\n\n规范中的接口，以及工厂如何推导地址：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface INameServiceRegistry {\n    function ownedAccount(bytes32 node) external view returns (address);\n}\n\ninterface INameOwnedAccount {\n    function name() external view returns (bytes32);\n    function nameService() external view returns (address);\n}\n\nabstract contract NOAFactory is INameServiceRegistry {\n    bytes32 public immutable initCodeHash; // hash of the shared NOA init code\n\n    constructor(bytes32 h) { initCodeHash = h; }\n\n    function ownedAccount(bytes32 node) public view returns (address) {\n        return address(uint160(uint256(keccak256(\n            abi.encodePacked(bytes1(0xff), address(this), node, initCodeHash)\n        ))));\n    }\n}\n```\n\n在链下计算 ENS 风格的名称节点（ethers v6）：\n\n```ts\nimport { namehash } from \"ethers\";\nconst node = namehash(\"alice.eth\"); // bytes32 passed to ownedAccount(node)\n```\n\n## 需要注意\n\n- 状态为 **Draft**：接口可能变化，规范也没有定义权威的部署。\n- NOA 自身的权限模型（执行前如何检查当前名称所有者）没有规定；实现必须正确处理，因为过期或错误的所有者检查会把控制权交给错误的一方。\n- 购买带有 NOA 的名称，实际上也买下了其中的内容；买家和市场应当检查该账户。\n- NFT 方面的类似思路是 [ERC-6551](/eip-6551/)（代币绑定账户）；通用智能账户请参阅 [ERC-4337](/eip-4337/)。\n"}}}
