{"eip":7777,"title":"Governance for Human Robot Societies","description":"Defines interfaces for managing the identities of humans and robots, and establishing rule sets for their interaction.","authors":["OpenMind","Jan Liphardt \u003cjan@openmind.org\u003e","Shaohong Zhong (@ShaohongZ)","Boyuan Chen (@bchen-dev)","Paige Xu \u003cpaige@openmind.org\u003e","James Ball \u003cjames.ball@nethermind.io\u003e","Thamer Dridi \u003cthamer.dridi@nethermind.io\u003e"],"status":"Review","type":"Standards Track","category":"ERC","created":"2024-09-29","discussionsTo":"https://ethereum-magicians.org/t/erc-7777-proposal-for-human-robot-societies/21216","repo":"ERCs","label":"ERC-7777","officialUrl":"https://eips.ethereum.org/EIPS/eip-7777","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7777.md","url":"https://eips.huatuo.xyz/eip-7777/","tldr":{"en":"Defines two contract interfaces, IUniversalIdentity for robot identities backed by hardware keys and IUniversalCharter for rule-based communities of humans and robots, so they can register, agree to rules and be checked for compliance on-chain.","ja":"ハードウェアキーに裏付けられたロボットのアイデンティティ用の IUniversalIdentity と、人間とロボットからなるルールベースのコミュニティ用の IUniversalCharter という 2 つのコントラクトインターフェースを定義し、登録、ルールへの同意、コンプライアンスの確認をオンチェーンで行えるようにする。","ko":"하드웨어 키로 뒷받침되는 로봇 신원을 위한 IUniversalIdentity와, 인간과 로봇으로 이루어진 규칙 기반 커뮤니티를 위한 IUniversalCharter 두 컨트랙트 인터페이스를 정의해, 등록하고 규칙에 동의하고 준수 여부를 온체인에서 확인할 수 있게 한다.","zh":"定义两个合约接口：用于由硬件密钥支撑的机器人身份的 IUniversalIdentity，以及用于由人类和机器人组成、基于规则的社区的 IUniversalCharter，使它们可以在链上注册、同意规则并接受合规检查。"},"tags":["identity","robots","governance","interface"],"explainers":{"en":{"lang":"en","tldr":"Defines two contract interfaces, IUniversalIdentity for robot identities backed by hardware keys and IUniversalCharter for rule-based communities of humans and robots, so they can register, agree to rules and be checked for compliance on-chain.","tags":["identity","robots","governance","interface"],"related":[8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7777/","markdown":"## What problem does it solve?\n\nThe authors expect robots and other non-human agents to increasingly act and transact alongside people. Such machines have no passport, no birthplace that decides which laws apply to them, and no access to ordinary banking. The proposal argues that public blockchains are a neutral place to give them an identity and let humans and robots opt into shared rule sets.\n\nERC-7777 standardizes the contract interfaces for that: one for a robot's identity, and one for a \"charter\" (a community with a rule set) that humans and robots can join, follow and leave. A standard interface means tools can work with any charter or identity contract instead of each project inventing its own.\n\n## How it works\n\n**`IUniversalIdentity`** (one contract per robot):\n\n- `getHardwareIdentity()` returns a `HardwareIdentity` struct: a hardware-bound public key, manufacturer, operator, model, serial number, and signatures of the initial and current system-state hashes (e.g. firmware).\n- `generateChallenge()` and `verifyChallenge(challenge, signature)` implement challenge-response: anyone can ask the robot to sign a fresh challenge with its secure-element key to prove it is the physical device it claims to be.\n- `addRule(bytes)` / `removeRule(bytes)` record which rules the robot agrees to follow; rules are plain text encoded as bytes, e.g. \"A robot must keep a 1m distance from humans.\"\n- `checkCompliance(bytes rule)` reports whether the robot complies with a rule.\n\n**`IUniversalCharter`** (one contract per community):\n\n- `registerUser(UserType, bytes[] ruleSet)` where `UserType` is `Human` or `Robot`. The contract MUST check compliance before registering.\n- `leaveSystem()`, callable only by the user, again after a compliance check.\n- `checkCompliance(user, ruleSet)`, which SHOULD call each rule on the user's identity contract.\n- `updateRuleSet(...)` and `terminateContract()`, which SHOULD be restricted to authorized accounts.\n\nEvents (`UserRegistered`, `UserLeft`, `RuleSetUpdated`, `RuleAdded`, `SubscribedToCharter`, and others) make every change visible to off-chain systems.\n\n## Sample code\n\nThe charter interface (from the spec):\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IUniversalCharter {\n    enum UserType { Human, Robot }\n\n    function registerUser(UserType userType, bytes[] memory ruleSet) external;\n    function leaveSystem() external;\n    function checkCompliance(address user, bytes[] memory ruleSet) external view returns (bool);\n    function updateRuleSet(bytes[] memory newRuleSet) external;\n    function terminateContract() external;\n\n    event UserRegistered(address indexed user, UserType userType, bytes[] ruleSet);\n    event UserLeft(address indexed user);\n    event ComplianceChecked(address indexed user, bytes[] ruleSet);\n    event RuleSetUpdated(bytes[] newRuleSet, address updatedBy);\n}\n```\n\nA robot joining a charter. In the reference implementation the robot's identity contract is the registered address, so registration goes through it (`updateCompliance` and `subscribeAndRegisterToCharter` are reference-implementation helpers, not part of the interface):\n\n```ts\nimport { Contract, toUtf8Bytes } from \"ethers\";\n\nconst rule = toUtf8Bytes(\"A robot must keep a 1m distance from humans.\");\nconst identity = new Contract(IDENTITY, [\n  \"function addRule(bytes)\",\n  \"function updateCompliance(bytes,bool)\",\n  \"function subscribeAndRegisterToCharter(address,uint256)\",\n], ownerSigner);\n\nawait (await identity.addRule(rule)).wait();\nawait (await identity.updateCompliance(rule, true)).wait();\nawait (await identity.subscribeAndRegisterToCharter(CHARTER, 1n)).wait(); // rule set version 1\n```\n\n## Things to know\n\n- **Status: Review.** The interfaces may still change before Final.\n- \"Compliance\" is only as meaningful as whoever sets it. In the reference implementation the identity contract's owner sets compliance status, so on-chain checks reflect the owner's attestation, not physical verification of behavior. Its hardware challenge check is also only a placeholder.\n- Rule management and ownership are security-critical: restrict `addRule`, `removeRule`, compliance updates and `updateRuleSet`, and protect upgradeable initializers against re-execution.\n- Large rule sets cost a lot of gas to pass and check; the spec suggests capping their size.\n- For a related approach to on-chain identity and reputation for autonomous agents, see [ERC-8004](/eip-8004/).\n"},"ja":{"lang":"ja","tldr":"ハードウェアキーに裏付けられたロボットのアイデンティティ用の IUniversalIdentity と、人間とロボットからなるルールベースのコミュニティ用の IUniversalCharter という 2 つのコントラクトインターフェースを定義し、登録、ルールへの同意、コンプライアンスの確認をオンチェーンで行えるようにする。","tags":["identity","robots","governance","interface"],"related":[8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7777/","markdown":"## 何を解決するのか\n\n著者らは、ロボットやその他の人間以外のエージェントが、人間と並んで行動し取引する機会が増えていくと予想しています。こうした機械にはパスポートも、どの法律が適用されるかを決める出生地も、通常の銀行サービスを利用する手段もありません。この提案は、パブリックブロックチェーンが、彼らにアイデンティティを与え、人間とロボットが共通のルールセットを選択して参加できるようにするための中立的な場だと主張しています。\n\nERC-7777 はそのためのコントラクトインターフェースを標準化します。1 つはロボットのアイデンティティ用、もう 1 つは人間とロボットが参加し、従い、脱退できる「チャーター」（ルールセットを持つコミュニティ）用です。標準インターフェースがあれば、各プロジェクトが独自に作るのではなく、ツールがあらゆるチャーターやアイデンティティのコントラクトを扱えるようになります。\n\n## 仕組み\n\n**`IUniversalIdentity`**（ロボット 1 台につき 1 コントラクト）:\n\n- `getHardwareIdentity()` は `HardwareIdentity` 構造体を返します。ハードウェアに紐づく公開鍵、製造者、運用者、モデル、シリアル番号、そして初期および現在のシステム状態ハッシュ（例: ファームウェア）の署名が含まれます。\n- `generateChallenge()` と `verifyChallenge(challenge, signature)` はチャレンジレスポンスを実装します。誰でもロボットに新しいチャレンジへ secure element の鍵で署名するよう求め、それが自称どおりの物理デバイスであることを証明させられます。\n- `addRule(bytes)` / `removeRule(bytes)` は、ロボットが従うことに同意したルールを記録します。ルールは bytes にエンコードされたプレーンテキストです。例: \"A robot must keep a 1m distance from humans.\"\n- `checkCompliance(bytes rule)` は、ロボットがルールに準拠しているかどうかを報告します。\n\n**`IUniversalCharter`**（コミュニティ 1 つにつき 1 コントラクト）:\n\n- `registerUser(UserType, bytes[] ruleSet)`。`UserType` は `Human` または `Robot` です。コントラクトは登録前にコンプライアンスを確認しなければなりません（MUST）。\n- `leaveSystem()`。ユーザー本人のみが呼び出せ、こちらもコンプライアンス確認の後に実行されます。\n- `checkCompliance(user, ruleSet)`。ユーザーのアイデンティティコントラクト上で各ルールを呼び出すべきです（SHOULD）。\n- `updateRuleSet(...)` と `terminateContract()`。権限のあるアカウントに制限すべきです（SHOULD）。\n\nイベント（`UserRegistered`、`UserLeft`、`RuleSetUpdated`、`RuleAdded`、`SubscribedToCharter` など）により、あらゆる変更がオフチェーンのシステムから見えるようになります。\n\n## サンプルコード\n\nチャーターのインターフェース（仕様より）:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IUniversalCharter {\n    enum UserType { Human, Robot }\n\n    function registerUser(UserType userType, bytes[] memory ruleSet) external;\n    function leaveSystem() external;\n    function checkCompliance(address user, bytes[] memory ruleSet) external view returns (bool);\n    function updateRuleSet(bytes[] memory newRuleSet) external;\n    function terminateContract() external;\n\n    event UserRegistered(address indexed user, UserType userType, bytes[] ruleSet);\n    event UserLeft(address indexed user);\n    event ComplianceChecked(address indexed user, bytes[] ruleSet);\n    event RuleSetUpdated(bytes[] newRuleSet, address updatedBy);\n}\n```\n\nロボットがチャーターに参加する例。リファレンス実装では、ロボットのアイデンティティコントラクトが登録されるアドレスなので、登録はそれを経由します（`updateCompliance` と `subscribeAndRegisterToCharter` はリファレンス実装のヘルパーであり、インターフェースの一部ではありません）。\n\n```ts\nimport { Contract, toUtf8Bytes } from \"ethers\";\n\nconst rule = toUtf8Bytes(\"A robot must keep a 1m distance from humans.\");\nconst identity = new Contract(IDENTITY, [\n  \"function addRule(bytes)\",\n  \"function updateCompliance(bytes,bool)\",\n  \"function subscribeAndRegisterToCharter(address,uint256)\",\n], ownerSigner);\n\nawait (await identity.addRule(rule)).wait();\nawait (await identity.updateCompliance(rule, true)).wait();\nawait (await identity.subscribeAndRegisterToCharter(CHARTER, 1n)).wait(); // rule set version 1\n```\n\n## 知っておくべきこと\n\n- **ステータス: Review。** Final になる前にインターフェースが変更される可能性があります。\n- 「コンプライアンス」の意味の重さは、それを設定する主体次第です。リファレンス実装ではアイデンティティコントラクトのオーナーがコンプライアンス状態を設定するため、オンチェーンのチェックが反映するのはオーナーの証明であり、振る舞いの物理的な検証ではありません。ハードウェアのチャレンジ確認もプレースホルダーにすぎません。\n- ルール管理とオーナー権限はセキュリティ上きわめて重要です。`addRule`、`removeRule`、コンプライアンス更新、`updateRuleSet` を制限し、アップグレード可能な initializer が再実行されないよう保護してください。\n- 大きなルールセットは、渡すのも確認するのも gas コストが大きくなります。仕様はそのサイズに上限を設けることを提案しています。\n- 自律エージェント向けのオンチェーンのアイデンティティとレピュテーションに関する関連アプローチについては、[ERC-8004](/eip-8004/) を参照してください。\n"},"ko":{"lang":"ko","tldr":"하드웨어 키로 뒷받침되는 로봇 신원을 위한 IUniversalIdentity와, 인간과 로봇으로 이루어진 규칙 기반 커뮤니티를 위한 IUniversalCharter 두 컨트랙트 인터페이스를 정의해, 등록하고 규칙에 동의하고 준수 여부를 온체인에서 확인할 수 있게 한다.","tags":["identity","robots","governance","interface"],"related":[8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7777/","markdown":"## 어떤 문제를 해결하나요?\n\n저자들은 로봇과 다른 비인간 에이전트가 사람과 나란히 행동하고 거래하는 일이 점점 늘어날 것으로 예상합니다. 이런 기계에는 여권도, 어느 나라 법이 적용될지 정하는 출생지도, 일반 은행 서비스를 이용할 방법도 없습니다. 이 제안은 퍼블릭 블록체인이 이들에게 신원을 부여하고, 인간과 로봇이 공통 규칙 집합에 자발적으로 참여하게 하는 중립적인 장소라고 주장합니다.\n\nERC-7777은 이를 위한 컨트랙트 인터페이스를 표준화합니다. 하나는 로봇의 신원용이고, 다른 하나는 인간과 로봇이 가입하고, 따르고, 탈퇴할 수 있는 \"차터\"(규칙 집합을 가진 커뮤니티)용입니다. 표준 인터페이스가 있으면 프로젝트마다 제각각 만드는 대신 도구가 어떤 차터나 신원 컨트랙트와도 동작할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n**`IUniversalIdentity`** (로봇 한 대당 컨트랙트 하나):\n\n- `getHardwareIdentity()`는 `HardwareIdentity` 구조체를 반환합니다. 하드웨어에 묶인 공개 키, 제조사, 운영자, 모델, 일련번호, 그리고 초기 및 현재 시스템 상태 해시(예: 펌웨어)의 서명이 들어 있습니다.\n- `generateChallenge()`와 `verifyChallenge(challenge, signature)`는 챌린지-응답을 구현합니다. 누구나 로봇에게 새 챌린지에 secure element 키로 서명하라고 요청해, 그 로봇이 주장하는 물리적 기기가 맞는지 증명하게 할 수 있습니다.\n- `addRule(bytes)` / `removeRule(bytes)`는 로봇이 따르기로 동의한 규칙을 기록합니다. 규칙은 bytes로 인코딩한 일반 텍스트입니다. 예: \"A robot must keep a 1m distance from humans.\"\n- `checkCompliance(bytes rule)`는 로봇이 해당 규칙을 준수하는지 알려 줍니다.\n\n**`IUniversalCharter`** (커뮤니티 하나당 컨트랙트 하나):\n\n- `registerUser(UserType, bytes[] ruleSet)`. `UserType`은 `Human` 또는 `Robot`입니다. 컨트랙트는 등록 전에 반드시 준수 여부를 확인해야 합니다(MUST).\n- `leaveSystem()`. 사용자 본인만 호출할 수 있으며, 마찬가지로 준수 여부 확인 후에 실행됩니다.\n- `checkCompliance(user, ruleSet)`. 사용자의 신원 컨트랙트에서 각 규칙을 호출해야 합니다(SHOULD).\n- `updateRuleSet(...)`과 `terminateContract()`. 권한 있는 계정으로 제한해야 합니다(SHOULD).\n\n이벤트(`UserRegistered`, `UserLeft`, `RuleSetUpdated`, `RuleAdded`, `SubscribedToCharter` 등)는 모든 변경 사항을 오프체인 시스템에서 볼 수 있게 합니다.\n\n## 샘플 코드\n\n차터 인터페이스(스펙에서):\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IUniversalCharter {\n    enum UserType { Human, Robot }\n\n    function registerUser(UserType userType, bytes[] memory ruleSet) external;\n    function leaveSystem() external;\n    function checkCompliance(address user, bytes[] memory ruleSet) external view returns (bool);\n    function updateRuleSet(bytes[] memory newRuleSet) external;\n    function terminateContract() external;\n\n    event UserRegistered(address indexed user, UserType userType, bytes[] ruleSet);\n    event UserLeft(address indexed user);\n    event ComplianceChecked(address indexed user, bytes[] ruleSet);\n    event RuleSetUpdated(bytes[] newRuleSet, address updatedBy);\n}\n```\n\n로봇이 차터에 가입하는 예. 레퍼런스 구현에서는 로봇의 신원 컨트랙트가 등록되는 주소이므로 등록은 그 컨트랙트를 통해 이루어집니다(`updateCompliance`와 `subscribeAndRegisterToCharter`는 레퍼런스 구현의 도우미이며 인터페이스의 일부가 아닙니다).\n\n```ts\nimport { Contract, toUtf8Bytes } from \"ethers\";\n\nconst rule = toUtf8Bytes(\"A robot must keep a 1m distance from humans.\");\nconst identity = new Contract(IDENTITY, [\n  \"function addRule(bytes)\",\n  \"function updateCompliance(bytes,bool)\",\n  \"function subscribeAndRegisterToCharter(address,uint256)\",\n], ownerSigner);\n\nawait (await identity.addRule(rule)).wait();\nawait (await identity.updateCompliance(rule, true)).wait();\nawait (await identity.subscribeAndRegisterToCharter(CHARTER, 1n)).wait(); // rule set version 1\n```\n\n## 알아둘 점\n\n- **상태: Review.** Final이 되기 전에 인터페이스가 바뀔 수 있습니다.\n- \"준수 여부\"의 의미는 그것을 설정하는 주체만큼만 믿을 수 있습니다. 레퍼런스 구현에서는 신원 컨트랙트의 소유자가 준수 상태를 설정하므로, 온체인 확인은 소유자의 증명을 반영할 뿐 행동을 물리적으로 검증한 결과가 아닙니다. 하드웨어 챌린지 확인도 자리표시자일 뿐입니다.\n- 규칙 관리와 소유권은 보안상 매우 중요합니다. `addRule`, `removeRule`, 준수 상태 업데이트, `updateRuleSet`을 제한하고, 업그레이드 가능한 initializer가 다시 실행되지 않도록 보호하세요.\n- 큰 규칙 집합은 전달하고 확인하는 데 gas가 많이 듭니다. 스펙은 크기에 상한을 두라고 제안합니다.\n- 자율 에이전트를 위한 온체인 신원과 평판에 대한 관련 접근 방식은 [ERC-8004](/eip-8004/)를 참고하세요.\n"},"zh":{"lang":"zh","tldr":"定义两个合约接口：用于由硬件密钥支撑的机器人身份的 IUniversalIdentity，以及用于由人类和机器人组成、基于规则的社区的 IUniversalCharter，使它们可以在链上注册、同意规则并接受合规检查。","tags":["identity","robots","governance","interface"],"related":[8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7777/","markdown":"## 它解决什么问题？\n\n作者预计，机器人和其他非人类代理将越来越多地与人类一起行动和交易。这类机器没有护照，没有决定适用哪国法律的出生地，也无法使用普通的银行服务。该提案认为，公共区块链是一个中立的场所，可以为它们赋予身份，并让人类和机器人自愿加入共同的规则集。\n\nERC-7777 为此标准化了合约接口：一个用于机器人的身份，另一个用于\"章程\"（charter，即拥有一套规则的社区），人类和机器人可以加入、遵守和退出。有了标准接口，工具就能与任何章程或身份合约配合使用，而不必让每个项目各自发明一套。\n\n## 它如何运作\n\n**`IUniversalIdentity`**（每个机器人一个合约）：\n\n- `getHardwareIdentity()` 返回一个 `HardwareIdentity` 结构体：与硬件绑定的公钥、制造商、运营方、型号、序列号，以及初始和当前系统状态哈希（如固件）的签名。\n- `generateChallenge()` 和 `verifyChallenge(challenge, signature)` 实现挑战-应答：任何人都可以要求机器人用其安全元件（secure element）的密钥对一个新的挑战进行签名，以证明它就是自称的那台物理设备。\n- `addRule(bytes)` / `removeRule(bytes)` 记录机器人同意遵守哪些规则；规则是编码为 bytes 的纯文本，例如 \"A robot must keep a 1m distance from humans.\"\n- `checkCompliance(bytes rule)` 报告机器人是否遵守某条规则。\n\n**`IUniversalCharter`**（每个社区一个合约）：\n\n- `registerUser(UserType, bytes[] ruleSet)`，其中 `UserType` 为 `Human` 或 `Robot`。合约在注册前必须（MUST）检查合规性。\n- `leaveSystem()`，只有用户本人可以调用，同样要先进行合规检查。\n- `checkCompliance(user, ruleSet)`，应该（SHOULD）在用户的身份合约上调用每条规则。\n- `updateRuleSet(...)` 和 `terminateContract()`，应该（SHOULD）限制为授权账户才能调用。\n\n事件（`UserRegistered`、`UserLeft`、`RuleSetUpdated`、`RuleAdded`、`SubscribedToCharter` 等）让每一次变更对链下系统都可见。\n\n## 示例代码\n\n章程接口（来自规范）：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IUniversalCharter {\n    enum UserType { Human, Robot }\n\n    function registerUser(UserType userType, bytes[] memory ruleSet) external;\n    function leaveSystem() external;\n    function checkCompliance(address user, bytes[] memory ruleSet) external view returns (bool);\n    function updateRuleSet(bytes[] memory newRuleSet) external;\n    function terminateContract() external;\n\n    event UserRegistered(address indexed user, UserType userType, bytes[] ruleSet);\n    event UserLeft(address indexed user);\n    event ComplianceChecked(address indexed user, bytes[] ruleSet);\n    event RuleSetUpdated(bytes[] newRuleSet, address updatedBy);\n}\n```\n\n机器人加入章程。在参考实现中，注册的地址是机器人的身份合约，因此注册要通过它进行（`updateCompliance` 和 `subscribeAndRegisterToCharter` 是参考实现的辅助函数，不属于接口）：\n\n```ts\nimport { Contract, toUtf8Bytes } from \"ethers\";\n\nconst rule = toUtf8Bytes(\"A robot must keep a 1m distance from humans.\");\nconst identity = new Contract(IDENTITY, [\n  \"function addRule(bytes)\",\n  \"function updateCompliance(bytes,bool)\",\n  \"function subscribeAndRegisterToCharter(address,uint256)\",\n], ownerSigner);\n\nawait (await identity.addRule(rule)).wait();\nawait (await identity.updateCompliance(rule, true)).wait();\nawait (await identity.subscribeAndRegisterToCharter(CHARTER, 1n)).wait(); // rule set version 1\n```\n\n## 需要注意\n\n- **状态：Review。** 在成为 Final 之前，接口仍可能变化。\n- \"合规\"的意义取决于设置它的人。在参考实现中，由身份合约的所有者设置合规状态，因此链上检查反映的是所有者的声明，而不是对行为的物理验证。它的硬件挑战检查也只是占位实现。\n- 规则管理和所有权对安全至关重要：请限制 `addRule`、`removeRule`、合规更新和 `updateRuleSet` 的调用权限，并防止可升级的初始化函数被重复执行。\n- 大型规则集在传递和检查时会消耗大量 gas；规范建议限制其大小。\n- 关于自主代理的链上身份和声誉的相关方案，请参见 [ERC-8004](/eip-8004/)。\n"}}}
