{"eip":8273,"title":"Attestation-Gated Agentic Actions","description":"An on-chain Agent Attestation Registry with transaction-scoped authorization via transient storage.","authors":["Yunan Li","Qingzhi Zha (@rickzha610)","Xianrui Qin (@xrqin)","Vitto Rivabella (@eversmile12)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2025-05-26","requires":[165,1153],"discussionsTo":"https://ethereum-magicians.org/t/erc-8273-attestation-gated-agentic-actions/28617","repo":"ERCs","label":"ERC-8273","officialUrl":"https://eips.ethereum.org/EIPS/eip-8273","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8273.md","url":"https://eips.huatuo.xyz/eip-8273/","tldr":{"en":"A registry standard where a trusted attestor approves an AI agent's action and triggers it in the same transaction, with the approval held in transient storage so it vanishes when the transaction ends and cannot be reused.","ja":"信頼できるアテスターが AI エージェントのアクションを承認し、同じトランザクション内でそれを実行するレジストリ標準。承認は transient storage に保持され、トランザクションの終了とともに消えるため、再利用できない。","ko":"신뢰할 수 있는 증명자가 AI 에이전트의 동작을 승인하고 같은 트랜잭션에서 실행하는 레지스트리 표준. 승인은 transient storage에 보관되어 트랜잭션이 끝나면 사라지므로 재사용할 수 없다.","zh":"一种注册表标准：受信任的证明方批准 AI agent 的某个动作，并在同一笔交易中触发它，批准记录存放在瞬态存储中，交易结束即消失，无法被重复使用。"},"tags":["agents","attestation","authorization","transient-storage","erc"],"explainers":{"en":{"lang":"en","tldr":"A registry standard where a trusted attestor approves an AI agent's action and triggers it in the same transaction, with the approval held in transient storage so it vanishes when the transaction ends and cannot be reused.","tags":["agents","attestation","authorization","transient-storage","erc"],"related":[8004,1153,4337,7702,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8273/","markdown":"## What problem does it solve?\n\nAs AI agents start acting on-chain, protocols want to ask \"is this caller a vetted agent, and is it allowed to do *this particular* thing?\" An identity record such as [ERC-8004](/eip-8004/) can say an address belongs to an agent, but it says nothing about a single operation, and it cannot guarantee the same agent is still behind that address.\n\nERC-8273 adds a per-operation layer. An **attestor** (an off-chain service the deployer trusts) evaluates the agent and the requested action, then issues an attestation and executes the action **atomically**. The attestation is active only inside that transaction. The standard defines the plumbing, not what is being attested; meaning comes from the `capability` value the attestor and the DApp agree on.\n\n## How it works\n\n- **One issuance entry point:** `attestAndCall(subject, capability, evidenceHash, wallet, exec)`, callable only by authorized attestors. It:\n  1. stores a permanent audit record and emits `Attested`;\n  2. writes the `attestationId` into [EIP-1153](/eip-1153/) transient storage, keyed by `(wallet, capability, actionDigest)` and by `(subject, capability, actionDigest)`;\n  3. runs the action so that the target DApp sees the agent's own wallet as `msg.sender`;\n  4. reverts everything if the action fails.\n- **Scope has two axes:**\n  - `capability` is a coarse class such as `keccak256(\"DEFI_ACCESS_V1\")`.\n  - `actionDigest` binds one concrete call (target, selector, arguments and a nonce). `actionDigest = 0` means capability-only mode, which must not be used for value transfers or other high-risk actions.\n- **Execution profiles** define how the wallet makes the call: a direct profile for smart wallets or [EIP-7702](/eip-7702/) accounts exposing `executeFromRelayer`, or an [ERC-4337](/eip-4337/) profile that submits a UserOperation the agent's account already authorized.\n- **Gating:** the DApp calls `getActiveAttestationByWallet(msg.sender, capability, digest)`, which reverts if no active attestation exists. Bool views such as `isAttestedAddress` exist for indexers and UIs and must not be the only check.\n- When the transaction ends, the EVM clears transient storage, so nothing persists as reusable authorization.\n\n## Sample code\n\nA reward contract that only pays agents carrying a fresh attestation:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\ninterface IERC8273WalletAttestation {\n    struct AttestationRecord {\n        uint256 subjectId; bytes32 subjectType; address attestor;\n        bytes32 capability; bytes32 actionDigest; uint64 issuedAt;\n        uint8 status; bytes32 evidenceHash; address wallet;\n    }\n    function getActiveAttestationByWallet(address wallet, bytes32 capability, bytes32 actionDigest)\n        external view returns (AttestationRecord memory);\n}\n\ncontract RewardDistributor {\n    IERC8273WalletAttestation public immutable registry;     // the registry you trust\n    bytes32 public constant DEFI_ACCESS = keccak256(\"DEFI_ACCESS_V1\");\n    bool private locked;\n\n    constructor(IERC8273WalletAttestation r) { registry = r; }\n\n    function claimReward() external {\n        require(!locked, \"reentrant\");\n        locked = true;\n        // Reverts unless an attestor opened a window for msg.sender in this tx.\n        registry.getActiveAttestationByWallet(msg.sender, DEFI_ACCESS, bytes32(0));\n        _payReward(msg.sender);\n        locked = false;\n    }\n\n    function _payReward(address agent) internal { /* ... */ }\n}\n```\n\nThe capability-only mode is used here only because the check is \"is this an approved agent\"; anything moving funds per call should use a non-zero `actionDigest`.\n\n## Things to know\n\n- **Status: Draft.** Interfaces may change.\n- The attestor sits on the hot path: if it is offline, gated actions cannot run. The spec suggests the asynchronous ERC-8004 validation registry when per-action, synchronous approval is not needed.\n- An active attestation does not stop reentrancy within the same transaction, so gated functions must use a reentrancy guard.\n- Anyone can deploy a registry. A DApp must name the registries it trusts rather than trusting any contract that reports support via [ERC-165](/eip-165/).\n- A compromised attestor can approve many transactions until it is removed; registries should limit attestor authority and monitor `Attested` events.\n"},"ja":{"lang":"ja","tldr":"信頼できるアテスターが AI エージェントのアクションを承認し、同じトランザクション内でそれを実行するレジストリ標準。承認は transient storage に保持され、トランザクションの終了とともに消えるため、再利用できない。","tags":["agents","attestation","authorization","transient-storage","erc"],"related":[8004,1153,4337,7702,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8273/","markdown":"## 何を解決するのか\n\nAI エージェントがオンチェーンで動き始めると、プロトコルは「この呼び出し元は審査済みのエージェントか、そして*この特定の*ことを行ってよいか」を尋ねたくなります。[ERC-8004](/eip-8004/) のような ID レコードは、アドレスがエージェントに属することは示せますが、個々の操作については何も語らず、同じエージェントが今もそのアドレスの背後にいることも保証できません。\n\nERC-8273 は、操作単位のレイヤーを追加します。**アテスター**（デプロイヤーが信頼するオフチェーンのサービス）が、エージェントと要求されたアクションを評価し、アテステーションを発行して、アクションを**アトミックに**実行します。アテステーションが有効なのは、そのトランザクションの内部だけです。この標準が定義するのは仕組みであり、何をアテストするかではありません。意味は、アテスターと DApp が合意する `capability` の値から生まれます。\n\n## 仕組み\n\n- **発行のエントリポイントは 1 つ:** `attestAndCall(subject, capability, evidenceHash, wallet, exec)`。承認されたアテスターだけが呼び出せます。これは次のことを行います。\n  1. 永続的な監査レコードを保存し、`Attested` を emit する。\n  2. `attestationId` を、`(wallet, capability, actionDigest)` と `(subject, capability, actionDigest)` をキーとして、[EIP-1153](/eip-1153/) の transient storage に書き込む。\n  3. 対象の DApp が、エージェント自身のウォレットを `msg.sender` として見るようにアクションを実行する。\n  4. アクションが失敗したら、すべてを revert する。\n- **スコープは 2 つの軸を持ちます:**\n  - `capability` は、`keccak256(\"DEFI_ACCESS_V1\")` のような大まかなクラスです。\n  - `actionDigest` は、1 つの具体的な呼び出し（ターゲット、セレクター、引数、nonce）に結びつきます。`actionDigest = 0` は capability のみのモードを意味し、価値の移転やその他のリスクの高いアクションに使ってはいけません。\n- **実行プロファイル**は、ウォレットが呼び出しを行う方法を定義します。`executeFromRelayer` を公開するスマートウォレットまたは [EIP-7702](/eip-7702/) アカウント向けの direct プロファイル、あるいはエージェントのアカウントがすでに認可した UserOperation を送信する [ERC-4337](/eip-4337/) プロファイルです。\n- **ゲート:** DApp は `getActiveAttestationByWallet(msg.sender, capability, digest)` を呼び出し、有効なアテステーションがなければ revert します。`isAttestedAddress` のような bool を返す view は、インデクサーや UI のために存在しますが、唯一のチェックにしてはいけません。\n- トランザクションが終了すると、EVM が transient storage をクリアするため、再利用可能な認可として残るものは何もありません。\n\n## サンプルコード\n\n新しいアテステーションを持つエージェントにのみ報酬を支払うコントラクト:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\ninterface IERC8273WalletAttestation {\n    struct AttestationRecord {\n        uint256 subjectId; bytes32 subjectType; address attestor;\n        bytes32 capability; bytes32 actionDigest; uint64 issuedAt;\n        uint8 status; bytes32 evidenceHash; address wallet;\n    }\n    function getActiveAttestationByWallet(address wallet, bytes32 capability, bytes32 actionDigest)\n        external view returns (AttestationRecord memory);\n}\n\ncontract RewardDistributor {\n    IERC8273WalletAttestation public immutable registry;     // the registry you trust\n    bytes32 public constant DEFI_ACCESS = keccak256(\"DEFI_ACCESS_V1\");\n    bool private locked;\n\n    constructor(IERC8273WalletAttestation r) { registry = r; }\n\n    function claimReward() external {\n        require(!locked, \"reentrant\");\n        locked = true;\n        // Reverts unless an attestor opened a window for msg.sender in this tx.\n        registry.getActiveAttestationByWallet(msg.sender, DEFI_ACCESS, bytes32(0));\n        _payReward(msg.sender);\n        locked = false;\n    }\n\n    function _payReward(address agent) internal { /* ... */ }\n}\n```\n\nここで capability のみのモードを使っているのは、チェックが「承認されたエージェントか」というものだからにすぎません。呼び出しごとに資金を動かすものは、0 以外の `actionDigest` を使うべきです。\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** インターフェースは変わる可能性があります。\n- アテスターはホットパス上にいます。オフラインになると、ゲートされたアクションは実行できません。仕様は、アクションごとの同期的な承認が不要な場合は、非同期の ERC-8004 の validation registry を使うことを提案しています。\n- 有効なアテステーションは、同じトランザクション内のリエントランシーを防ぎません。そのため、ゲートされた関数にはリエントランシーガードを使わなければなりません。\n- レジストリは誰でもデプロイできます。DApp は、[ERC-165](/eip-165/) でサポートを報告する任意のコントラクトを信頼するのではなく、信頼するレジストリを名指しで指定しなければなりません。\n- 侵害されたアテスターは、取り除かれるまで多くのトランザクションを承認できます。レジストリはアテスターの権限を制限し、`Attested` イベントを監視すべきです。\n"},"ko":{"lang":"ko","tldr":"신뢰할 수 있는 증명자가 AI 에이전트의 동작을 승인하고 같은 트랜잭션에서 실행하는 레지스트리 표준. 승인은 transient storage에 보관되어 트랜잭션이 끝나면 사라지므로 재사용할 수 없다.","tags":["agents","attestation","authorization","transient-storage","erc"],"related":[8004,1153,4337,7702,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8273/","markdown":"## 어떤 문제를 해결하나요?\n\nAI 에이전트가 온체인에서 행동하기 시작하면서, 프로토콜은 \"이 호출자는 검증된 에이전트인가, 그리고 *이 특정한* 일을 해도 되는가?\"를 묻고 싶어 합니다. [ERC-8004](/eip-8004/) 같은 신원 레코드는 어떤 주소가 에이전트에 속한다는 것은 말해 줄 수 있지만, 개별 작업에 대해서는 아무것도 말해 주지 않으며, 같은 에이전트가 여전히 그 주소 뒤에 있다는 것도 보장하지 못합니다.\n\nERC-8273은 작업 단위의 계층을 추가합니다. **증명자(attestor)**(배포자가 신뢰하는 오프체인 서비스)가 에이전트와 요청된 동작을 평가한 뒤 증명을 발급하고 동작을 **원자적으로** 실행합니다. 증명은 그 트랜잭션 안에서만 유효합니다. 이 표준이 정의하는 것은 배관일 뿐 무엇을 증명하는지가 아닙니다. 의미는 증명자와 DApp이 합의한 `capability` 값에서 나옵니다.\n\n## 어떻게 동작하나요?\n\n- **발급 진입점은 하나:** `attestAndCall(subject, capability, evidenceHash, wallet, exec)`, 권한 있는 증명자만 호출할 수 있습니다. 이 함수는 다음을 수행합니다.\n  1. 영구 감사 레코드를 저장하고 `Attested`를 emit합니다.\n  2. `attestationId`를 `(wallet, capability, actionDigest)`와 `(subject, capability, actionDigest)`를 키로 해서 [EIP-1153](/eip-1153/) transient storage에 기록합니다.\n  3. 대상 DApp이 에이전트 자신의 지갑을 `msg.sender`로 보도록 동작을 실행합니다.\n  4. 동작이 실패하면 모든 것을 revert합니다.\n- **범위에는 두 축이 있습니다:**\n  - `capability`는 `keccak256(\"DEFI_ACCESS_V1\")` 같은 대략적인 분류입니다.\n  - `actionDigest`는 구체적인 호출 하나(대상, 셀렉터, 인자, nonce)에 묶입니다. `actionDigest = 0`은 capability 전용 모드를 뜻하며, 가치 이전이나 기타 위험도가 높은 동작에는 사용해서는 안 됩니다.\n- **실행 프로파일**은 지갑이 호출을 만드는 방식을 정의합니다. `executeFromRelayer`를 노출하는 스마트 지갑이나 [EIP-7702](/eip-7702/) 계정용 직접 프로파일, 또는 에이전트의 계정이 이미 인가한 UserOperation을 제출하는 [ERC-4337](/eip-4337/) 프로파일입니다.\n- **게이팅:** DApp은 `getActiveAttestationByWallet(msg.sender, capability, digest)`를 호출하며, 유효한 증명이 없으면 revert됩니다. `isAttestedAddress` 같은 bool view는 인덱서와 UI를 위해 존재하며 유일한 검사여서는 안 됩니다.\n- 트랜잭션이 끝나면 EVM이 transient storage를 지우므로, 재사용 가능한 인가로 남는 것은 없습니다.\n\n## 샘플 코드\n\n신선한 증명을 가진 에이전트에게만 보상을 지급하는 컨트랙트:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\ninterface IERC8273WalletAttestation {\n    struct AttestationRecord {\n        uint256 subjectId; bytes32 subjectType; address attestor;\n        bytes32 capability; bytes32 actionDigest; uint64 issuedAt;\n        uint8 status; bytes32 evidenceHash; address wallet;\n    }\n    function getActiveAttestationByWallet(address wallet, bytes32 capability, bytes32 actionDigest)\n        external view returns (AttestationRecord memory);\n}\n\ncontract RewardDistributor {\n    IERC8273WalletAttestation public immutable registry;     // the registry you trust\n    bytes32 public constant DEFI_ACCESS = keccak256(\"DEFI_ACCESS_V1\");\n    bool private locked;\n\n    constructor(IERC8273WalletAttestation r) { registry = r; }\n\n    function claimReward() external {\n        require(!locked, \"reentrant\");\n        locked = true;\n        // Reverts unless an attestor opened a window for msg.sender in this tx.\n        registry.getActiveAttestationByWallet(msg.sender, DEFI_ACCESS, bytes32(0));\n        _payReward(msg.sender);\n        locked = false;\n    }\n\n    function _payReward(address agent) internal { /* ... */ }\n}\n```\n\n여기서 capability 전용 모드를 쓴 것은 검사 내용이 \"승인된 에이전트인가\"이기 때문일 뿐입니다. 호출마다 자금을 움직이는 것은 0이 아닌 `actionDigest`를 사용해야 합니다.\n\n## 알아둘 점\n\n- **상태: Draft.** 인터페이스는 바뀔 수 있습니다.\n- 증명자는 핫 패스에 있습니다. 오프라인이면 게이팅된 동작을 실행할 수 없습니다. 명세는 동작별 동기 승인이 필요 없는 경우 비동기 ERC-8004 검증 레지스트리를 쓰라고 제안합니다.\n- 유효한 증명은 같은 트랜잭션 안에서의 재진입을 막지 못하므로, 게이팅된 함수는 재진입 방지 장치를 써야 합니다.\n- 레지스트리는 누구나 배포할 수 있습니다. DApp은 [ERC-165](/eip-165/)로 지원한다고 보고하는 아무 컨트랙트나 신뢰하는 대신, 신뢰하는 레지스트리를 명시해야 합니다.\n- 침해된 증명자는 제거될 때까지 많은 트랜잭션을 승인할 수 있습니다. 레지스트리는 증명자의 권한을 제한하고 `Attested` 이벤트를 모니터링해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一种注册表标准：受信任的证明方批准 AI agent 的某个动作，并在同一笔交易中触发它，批准记录存放在瞬态存储中，交易结束即消失，无法被重复使用。","tags":["agents","attestation","authorization","transient-storage","erc"],"related":[8004,1153,4337,7702,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8273/","markdown":"## 它解决什么问题？\n\n随着 AI agent 开始在链上行动，协议希望问：“这个调用者是经过审核的 agent 吗？它被允许做*这一件具体的事*吗？”像 [ERC-8004](/eip-8004/) 这样的身份记录可以说明某个地址属于某个 agent，但对单次操作什么也说明不了，也无法保证这个地址背后仍是同一个 agent。\n\nERC-8273 增加了按操作划分的一层。**证明方（attestor）**（部署者信任的链下服务）评估 agent 及其请求的动作，然后签发证明并**原子地**执行该动作。证明只在那笔交易内有效。该标准定义的是底层机制，而不是被证明的内容；含义来自证明方与 DApp 商定的 `capability` 值。\n\n## 它如何运作\n\n- **唯一的签发入口：** `attestAndCall(subject, capability, evidenceHash, wallet, exec)`，只能由获授权的证明方调用。它会：\n  1. 存储一条永久的审计记录并触发 `Attested`；\n  2. 把 `attestationId` 写入 [EIP-1153](/eip-1153/) 瞬态存储，以 `(wallet, capability, actionDigest)` 和 `(subject, capability, actionDigest)` 为键；\n  3. 执行动作，使目标 DApp 看到 agent 自己的钱包作为 `msg.sender`；\n  4. 如果动作失败，则全部 revert。\n- **范围有两个维度：**\n  - `capability` 是粗粒度的类别，例如 `keccak256(\"DEFI_ACCESS_V1\")`。\n  - `actionDigest` 绑定一次具体的调用（目标、选择器、参数和 nonce）。`actionDigest = 0` 表示仅按 capability 的模式，不得用于转移价值或其他高风险动作。\n- **执行配置**定义钱包如何发起调用：一种是直接配置，适用于暴露了 `executeFromRelayer` 的智能钱包或 [EIP-7702](/eip-7702/) 账户；另一种是 [ERC-4337](/eip-4337/) 配置，提交一个 agent 账户已授权的 UserOperation。\n- **门控：** DApp 调用 `getActiveAttestationByWallet(msg.sender, capability, digest)`，如果不存在有效的证明就会 revert。`isAttestedAddress` 这类返回 bool 的 view 是为索引器和 UI 准备的，不得作为唯一的检查。\n- 交易结束时，EVM 会清除瞬态存储，因此不会留下任何可重复使用的授权。\n\n## 示例代码\n\n一个只向持有新鲜证明的 agent 发放奖励的合约：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\ninterface IERC8273WalletAttestation {\n    struct AttestationRecord {\n        uint256 subjectId; bytes32 subjectType; address attestor;\n        bytes32 capability; bytes32 actionDigest; uint64 issuedAt;\n        uint8 status; bytes32 evidenceHash; address wallet;\n    }\n    function getActiveAttestationByWallet(address wallet, bytes32 capability, bytes32 actionDigest)\n        external view returns (AttestationRecord memory);\n}\n\ncontract RewardDistributor {\n    IERC8273WalletAttestation public immutable registry;     // the registry you trust\n    bytes32 public constant DEFI_ACCESS = keccak256(\"DEFI_ACCESS_V1\");\n    bool private locked;\n\n    constructor(IERC8273WalletAttestation r) { registry = r; }\n\n    function claimReward() external {\n        require(!locked, \"reentrant\");\n        locked = true;\n        // Reverts unless an attestor opened a window for msg.sender in this tx.\n        registry.getActiveAttestationByWallet(msg.sender, DEFI_ACCESS, bytes32(0));\n        _payReward(msg.sender);\n        locked = false;\n    }\n\n    function _payReward(address agent) internal { /* ... */ }\n}\n```\n\n这里使用仅按 capability 的模式，只是因为检查的内容是“这是不是一个被批准的 agent”；任何每次调用都要转移资金的场景都应使用非零的 `actionDigest`。\n\n## 需要注意\n\n- **状态：Draft。** 接口可能变化。\n- 证明方处在关键路径上：如果它离线，受门控的动作就无法运行。当不需要按动作、同步的批准时，规范建议使用异步的 ERC-8004 验证注册表。\n- 有效的证明并不能阻止同一笔交易内的重入，因此受门控的函数必须使用重入保护。\n- 任何人都可以部署注册表。DApp 必须明确指定自己信任的注册表，而不是信任任何通过 [ERC-165](/eip-165/) 声称支持的合约。\n- 被攻破的证明方在被移除之前可以批准大量交易；注册表应限制证明方的权限并监控 `Attested` 事件。\n"}}}
