newsence
來源篩選

ERC-8160: Primary Agent Registry for Address-to-Agent Resolution

Ethereum Magicians

ERC-8160, Primary Agent Registry , introduces a singleton contract on each EVM chain that gives a canonical answer to “which agent does this address represent?”. It builds on existing agent registry work like ERC-8004 and ERC-8122, but focuses on the reverse direction: mapping an Ethereum address to exactly one (registry, tokenId) pair so wallets, dapps, and indexers don’t all reinvent their own lookup mechanisms. github.com/ethereum/ERCs Add ERC: Primary Agent Registry master ← nxt3d:primary-agent opened 01:52AM - 12 Feb 26 UTC nxt3d +464 -0 ## Summary Adds a new draft ERC: **Primary Agent Registry**, a singleton regi … stry that maps each Ethereum address to exactly one agent identity (registry contract + token ID). It provides a single, chain-wide source of truth for resolving “this address → which agent?” and works with existing agent registries (e.g. ERC-8004, ERC-8122). ## Motivation Agents act on-chain via Ethereum addresses, but an address alone doesn’t identify the agent. There’s no standard way to go from address → agent. This ERC defines a canonical registry (one per chain, deterministic address) so wallets, protocols, and indexers can resolve any address to the agent it represents and complete a verification loop with the agent registry. ## What’s in the spec - **Interface**: `register`, `resolveAgentId`, `agentData`, `isRegistered` (and event). - **Storage**: Packed `bytes` (registry address + token ID), single-slot for common cases. - **Access control**: Admin and registrar roles (implementation-agnostic; OZ optional). - **Registrar types**: Self, ERC-1271, ownable, and role-check registrars for different verification methods. - **Verification loop**: Forward/reverse resolution and how to verify with ERC-8004 `getAgentWallet` and ERC-8122 `agent_account`. - **Singleton deployment**: Deterministic address per chain (e.g. CREATE2). ## Status - **Status**: Draft - **Requires**: ERC-1271 - **Discussion**: https://ethereum-magicians.org/t/erc-xxxx-primary-agent-registry No EIP number assigned yet (placeholder XXXX in front matter). The contract is intentionally small: a single mapping from address → bytes that packs the agent registry address and token ID, plus four functions— register , resolveAgentId , agentData , and isRegistered . Write access is gated by a registrar role, but the spec is access-control-agnostic and describes several registrar patterns (self-registrar for EOAs, ERC-1271-based registrar for smart wallets, a signed registrar with nonces and deadlines, and ownable/role-check registrars) so different ecosystems can plug in whatever verification model fits their needs. The ERC also defines a simple verification loop between the Primary Agent Registry and agent registries: forward resolution goes address → (registry, tokenId) via ERC-8160, then from the agent registry to the wallet/account (e.g. ERC-8004’s getAgentWallet(tokenId) or ERC-8122’s getMetadata(tokenId, "agent_account") ), and reverse resolution confirms that wallet/account maps back to the same (registry, tokenId) . A registration is considered verified only when both directions agree. I’m especially interested in feedback from wallet, agent-framework, and infra builders on whether this loop and the proposed registrar types fit the identity workflows you’re already building. 1 post - 1 participant Read full topic

newsence

ERC-8160:用於地址到代理解析的主要代理註冊表

Ethereum Magicians
16 天前

AI 生成摘要

ERC-8160 提出在每個 EVM 鏈上部署一個單例合約,為以太坊地址到特定代理身份(註冊表合約 + 代幣 ID)提供標準化的映射,旨在為錢包、dapps 和索引器統一代理解析方式。

ERC-8160:主要代理人註冊表:地址到代理人解析 - ERCs - 以太坊魔法師團體

摘要

本 ERC 定義了一個標準介面,用於將以太坊地址解析為代理人。代理人可以是智慧合約、EOA 或其他實體。此標準允許應用程式發現與特定地址相關聯的代理人,並與之互動。

動機

在以太坊生態系統中,地址通常與各種實體相關聯,例如智慧合約、EOA 和其他代理人。目前,沒有標準化的方法來發現與特定地址相關聯的代理人。這使得應用程式難以與這些代理人互動,並限制了生態系統的互操作性。

本 ERC 旨在通過定義一個標準介面來解決這個問題,該介面允許應用程式將以太坊地址解析為代理人。這將使應用程式能夠發現與特定地址相關聯的代理人,並與之互動,從而提高生態系統的互操作性。

規範

PrimaryAgentRegistry 合約必須實現以下介面:

primaryAgent(address _address)

返回給定地址的主要代理人。如果沒有主要代理人,則返回零地址。

setPrimaryAgent(address _address, address _agent)

設置給定地址的主要代理人。只有合約的所有者才能調用此函數。

PrimaryAgentSet(address indexed address_, address indexed agent_)

當地址的主要代理人更改時發出此事件。

理據

此標準旨在簡單易用。它只定義了兩個函數:一個用於解析地址的主要代理人,另一個用於設置地址的主要代理人。這使得應用程式易於實現和使用。

該標準還旨在具有靈活性。它允許地址與任何類型的代理人相關聯,包括智慧合約、EOA 和其他實體。這使得它可以應用於各種用例。

向後兼容性

此標準與現有的以太坊基礎設施向後兼容。它不會對現有的合約或應用程式造成任何更改。

安全性考慮

setPrimaryAgent 函數只能由合約的所有者調用。這可以防止惡意行為者設置地址的錯誤代理人。

版權

根據 CC0 授權。