跳到主要内容Skip to main content

← 返回链← Back to Chain

协议档案Protocol records

EIP-7702:给 EOA 设置代码EIP-7702: Set Code for EOAs

交集:AI Agent 需要一个可编程账户来收付款、限额、批量调用和恢复权限;EIP-7702 让 EOA 在单笔交易里委托一段代码,给「代理执行」提供了账户层入口。
适用范围:官方规范只定义「EOA 设置代码」的交易格式、授权元组与委托指示符;它不替开发者初始化存储,也不保证钱包界面能正确展示委托状态。客户端被建议对已有委托的 EOA 只接受一笔待处理交易,以降低交易失效风险。
未解决:委托代码的升级与撤销、会话密钥的生命周期、被委托合约的安全审计,以及不同钱包对 7702 的展示与风控口径,都还在演进。
Intersection: AI agents need a programmable account for payments, spending limits, batching and permission recovery; EIP-7702 lets an EOA delegate to code within a transaction, giving agent execution an account-level entry point.
Scope: the official spec only defines the transaction format, authorization tuples and delegation indicator for an EOA setting code; it does not initialise storage for developers or guarantee that wallets display delegation correctly. Clients are advised to accept only one pending transaction for an EOA with a non-zero delegation indicator to reduce invalidation risk.
Open: delegation upgrades and revocation, session-key lifecycles, security audits of delegated contracts, and wallet display/risk policy for 7702 are still evolving.

关键参数Key specs

提出 / created
2024-05-07
核心对象 / object
authorization tuple + delegation indicator
作用 / effect
EOA 可在交易中委托代码执行
协议状态 / status
已部署(Final;随 Pectra 升级上线)
许可 / license
CC0(EIP 文本,以官方页为准)

官方原文怎么说What the source says

Add a new EIP-2718 transaction type that allows Externally Owned Accounts (EOAs) to set the code in their account.
1 https://eips.ethereum.org/EIPS/eip-7702
This EIP does not provide developers the opportunity to run initcode and set storage slots during delegation.
2 https://eips.ethereum.org/EIPS/eip-7702
clients do not accept more than one pending transaction for any EOA with a non-zero delegation indicator
3 https://eips.ethereum.org/EIPS/eip-7702

资料与许可Source and licence

资料时间Source checked
2026-11-19
许可 / 类型Licence / kind
official-specification
许可说明Licence evidence
https://eips.ethereum.org/EIPS/eip-7702
类目Category
协议档案Protocol records

同类目还有More in this category

下一步Next step

去官网看原页Open the official page →

← 返回链← Back to Chain