{"eip":7701,"title":"Native Account Abstraction","description":"Native Account Abstraction protocol, relying on a new transaction type and a family of opcodes","authors":["Vitalik Buterin (@vbuterin)","Yoav Weiss (@yoavw)","Alex Forshtat (@forshtat)","Dror Tirosh (@drortirosh)","Shahaf Nacson (@shahafn)"],"status":"Withdrawn","type":"Standards Track","category":"Core","created":"2024-05-01","discussionsTo":"https://ethereum-magicians.org/t/eip-7701-native-account-abstraction/19893","repo":"EIPs","label":"EIP-7701","officialUrl":"https://eips.ethereum.org/EIPS/eip-7701","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7701.md","url":"https://eips.huatuo.xyz/eip-7701/","tldr":{"en":"A withdrawn proposal for protocol-level account abstraction: a new transaction type split into validation, payment and execution phases run by the account and an optional paymaster. Superseded by EIP-8141.","ja":"撤回されたプロトコルレベルのアカウント抽象化の提案。検証・支払い・実行の各フェーズを、アカウントと任意の paymaster が実行する新しいトランザクションタイプ。EIP-8141 に置き換えられた。","ko":"철회된 프로토콜 수준 계정 추상화 제안. 검증, 지불, 실행 단계로 나뉜 새 트랜잭션 유형을 계정과 선택적 paymaster가 실행한다. EIP-8141로 대체되었다.","zh":"一项已撤回的协议层账户抽象提案：新增一种交易类型，拆分为验证、支付和执行三个阶段，由账户和可选的 paymaster 运行。已被 EIP-8141 取代。"},"tags":["account-abstraction","core","transactions","wallets","withdrawn"],"explainers":{"en":{"lang":"en","tldr":"A withdrawn proposal for protocol-level account abstraction: a new transaction type split into validation, payment and execution phases run by the account and an optional paymaster. Superseded by EIP-8141.","tags":["account-abstraction","core","transactions","wallets","withdrawn"],"related":[8141,4337,2718,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7701/","markdown":"## What problem does it solve?\n\nOn Ethereum, only an externally owned account (EOA) with an ECDSA key can start a transaction, and that same account must pay gas. Smart contract wallets work around this with [ERC-4337](/eip-4337/), which runs a separate mempool, bundlers and an `EntryPoint` contract. That works, but it adds infrastructure, gas overhead and trust assumptions outside the protocol.\n\nEIP-7701 proposed making this native: let a contract account define its own rules for validating a transaction, and let a separate contract (a paymaster) pay the gas, all as part of the core transaction format.\n\n## How it works\n\nThe proposal added a new [EIP-2718](/eip-2718/) transaction type (\"AA transaction\") whose fields include `sender`, `sender_validation_data`, optional `deployer` and `paymaster` with their data, `sender_execution_data`, and separate gas limits for each phase.\n\nA transaction runs as a series of top-level calls, each with a **role**:\n\n1. **Deployment** (only if the sender has no code yet): the deployer creates the account.\n2. **Sender validation**: the account checks the signature or whatever rule it uses.\n3. **Paymaster validation** (optional): the paymaster agrees to pay.\n4. **Sender execution**: the actual action.\n5. **Paymaster post-op** (optional): the paymaster settles up afterwards.\n\nTwo new opcodes tie this together:\n\n- `CURRENT_ROLE` returns which phase the code is running in.\n- `ACCEPT_ROLE` works like `RETURN` but also states which role the contract is accepting. If a validation phase does not end with a matching `ACCEPT_ROLE`, the transaction is invalid and cannot be included in a block.\n\nA `TXPARAM*` opcode family (modelled on `CALLDATA*`) lets the account read transaction fields such as the nonce, the paymaster, or the signing hash. During these calls `msg.sender` is the fixed entry-point address `0x7701` and `tx.origin` is the sender.\n\n## Sample code\n\nShape of the proposed transaction payload (RLP, from the spec):\n\n```text\nAA_TX_TYPE || rlp([\n  chain_id, nonce,\n  sender, sender_validation_data,\n  deployer, deployer_data,\n  paymaster, paymaster_data,\n  sender_execution_data,\n  max_priority_fee_per_gas, max_fee_per_gas,\n  sender_validation_gas, paymaster_validation_gas,\n  sender_execution_gas, paymaster_post_op_gas,\n  access_list, authorization_list\n])\n```\n\nSimplified processing order (pseudocode):\n\n```python\npayer = tx.paymaster or tx.sender\ncharge(payer, max_gas * gas_price)\nif no_code(tx.sender):\n    assert call(tx.deployer, role=SENDER_DEPLOYMENT).accepted\nassert call(tx.sender, role=SENDER_VALIDATION).accepted\nif tx.paymaster:\n    assert call(tx.paymaster, role=PAYMASTER_VALIDATION).accepted\ncall(tx.sender, role=SENDER_EXECUTION)          # may fail; tx still included\nif tx.paymaster:\n    call(tx.paymaster, role=PAYMASTER_POST_OP)\nrefund(payer, unused_gas * gas_price)\n```\n\n## Things to know\n\n- Status is **Withdrawn**. The spec states it was superseded by [EIP-8141](/eip-8141/) (Frame Transaction), which is the place to follow native account abstraction work.\n- The transaction type number was never assigned (`TBD`), and the proposal never shipped on mainnet.\n- For account abstraction you can use today, see [ERC-4337](/eip-4337/) and the EOA delegation mechanism of [EIP-7702](/eip-7702/).\n- The spec flagged a security point that carries over to any similar design: a contract that unintentionally contains an \"accept\" path could authorise actions, so tooling and auditors would need to flag it.\n"},"ja":{"lang":"ja","tldr":"撤回されたプロトコルレベルのアカウント抽象化の提案。検証・支払い・実行の各フェーズを、アカウントと任意の paymaster が実行する新しいトランザクションタイプ。EIP-8141 に置き換えられた。","tags":["account-abstraction","core","transactions","wallets","withdrawn"],"related":[8141,4337,2718,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7701/","markdown":"## 何を解決するのか\n\nEthereum では、ECDSA 鍵を持つ外部所有アカウント（EOA）だけがトランザクションを開始でき、そのアカウント自身が gas を支払う必要があります。スマートコントラクトウォレットは [ERC-4337](/eip-4337/) でこれを回避しており、別の mempool、bundler、`EntryPoint` コントラクトを動かします。これで機能はしますが、インフラ、gas のオーバーヘッド、プロトコル外の信頼の前提が増えます。\n\nEIP-7701 は、これをネイティブにすることを提案しました。コントラクトアカウントがトランザクションの検証ルールを自分で定義でき、別のコントラクト（paymaster）が gas を支払えるようにし、すべてをコアのトランザクション形式の一部とするものです。\n\n## 仕組み\n\nこの提案は、新しい [EIP-2718](/eip-2718/) トランザクションタイプ（「AA トランザクション」）を追加しました。フィールドには `sender`、`sender_validation_data`、任意の `deployer` と `paymaster` およびそれらのデータ、`sender_execution_data`、そして各フェーズごとの個別の gas 上限が含まれます。\n\nトランザクションは、それぞれ**ロール**を持つ一連のトップレベル呼び出しとして実行されます。\n\n1. **デプロイ**（sender にまだコードがない場合のみ）: deployer がアカウントを作成します。\n2. **sender の検証**: アカウントが署名、またはアカウントが使うルールを検証します。\n3. **paymaster の検証**（任意）: paymaster が支払いに同意します。\n4. **sender の実行**: 実際のアクションです。\n5. **paymaster の post-op**（任意）: paymaster が後から精算します。\n\n2 つの新しい opcode がこれらを結び付けます。\n\n- `CURRENT_ROLE` は、コードがどのフェーズで実行されているかを返します。\n- `ACCEPT_ROLE` は `RETURN` と同様に動作しますが、コントラクトがどのロールを受け入れるかも示します。検証フェーズが対応する `ACCEPT_ROLE` で終わらなければ、そのトランザクションは無効となり、ブロックに含めることはできません。\n\n`TXPARAM*` opcode ファミリー（`CALLDATA*` をモデルにしたもの）により、アカウントは nonce、paymaster、署名ハッシュなどのトランザクションフィールドを読み取れます。これらの呼び出しの間、`msg.sender` は固定のエントリポイントアドレス `0x7701`、`tx.origin` は sender です。\n\n## サンプルコード\n\n提案されたトランザクションペイロードの形（RLP、仕様より）:\n\n```text\nAA_TX_TYPE || rlp([\n  chain_id, nonce,\n  sender, sender_validation_data,\n  deployer, deployer_data,\n  paymaster, paymaster_data,\n  sender_execution_data,\n  max_priority_fee_per_gas, max_fee_per_gas,\n  sender_validation_gas, paymaster_validation_gas,\n  sender_execution_gas, paymaster_post_op_gas,\n  access_list, authorization_list\n])\n```\n\n簡略化した処理順序（擬似コード）:\n\n```python\npayer = tx.paymaster or tx.sender\ncharge(payer, max_gas * gas_price)\nif no_code(tx.sender):\n    assert call(tx.deployer, role=SENDER_DEPLOYMENT).accepted\nassert call(tx.sender, role=SENDER_VALIDATION).accepted\nif tx.paymaster:\n    assert call(tx.paymaster, role=PAYMASTER_VALIDATION).accepted\ncall(tx.sender, role=SENDER_EXECUTION)          # may fail; tx still included\nif tx.paymaster:\n    call(tx.paymaster, role=PAYMASTER_POST_OP)\nrefund(payer, unused_gas * gas_price)\n```\n\n## 知っておくべきこと\n\n- ステータスは **Withdrawn** です。仕様には、[EIP-8141](/eip-8141/)（Frame Transaction）に置き換えられたと記されており、ネイティブなアカウント抽象化の取り組みを追うならそちらを見てください。\n- トランザクションタイプの番号は割り当てられないまま（`TBD`）で、この提案がメインネットに出ることはありませんでした。\n- 現在使えるアカウント抽象化については、[ERC-4337](/eip-4337/) と、[EIP-7702](/eip-7702/) の EOA 委任の仕組みを参照してください。\n- 仕様は、似た設計すべてに当てはまるセキュリティ上の注意点を指摘していました。意図せず「accept」のパスを含むコントラクトが、アクションを認可してしまう可能性があるため、ツールや監査人がそれを指摘する必要があります。\n"},"ko":{"lang":"ko","tldr":"철회된 프로토콜 수준 계정 추상화 제안. 검증, 지불, 실행 단계로 나뉜 새 트랜잭션 유형을 계정과 선택적 paymaster가 실행한다. EIP-8141로 대체되었다.","tags":["account-abstraction","core","transactions","wallets","withdrawn"],"related":[8141,4337,2718,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7701/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움에서는 ECDSA 키를 가진 외부 소유 계정(EOA)만 트랜잭션을 시작할 수 있고, 같은 계정이 가스비도 내야 합니다. 스마트 컨트랙트 지갑은 [ERC-4337](/eip-4337/)로 이를 우회하며, 별도의 멤풀, bundler, `EntryPoint` 컨트랙트를 운영합니다. 동작은 하지만 인프라, 가스 오버헤드, 프로토콜 밖의 신뢰 가정이 늘어납니다.\n\nEIP-7701은 이를 네이티브로 만들자고 제안했습니다. 컨트랙트 계정이 트랜잭션 검증 규칙을 스스로 정의하고, 별도의 컨트랙트(paymaster)가 가스비를 내도록 하며, 이 모든 것을 코어 트랜잭션 형식의 일부로 삼는 것입니다.\n\n## 어떻게 동작하나요?\n\n이 제안은 새로운 [EIP-2718](/eip-2718/) 트랜잭션 유형(\"AA 트랜잭션\")을 추가했습니다. 필드로 `sender`, `sender_validation_data`, 선택적 `deployer`와 `paymaster` 및 그 데이터, `sender_execution_data`, 그리고 단계별 개별 가스 한도가 있습니다.\n\n트랜잭션은 각각 **역할(role)**을 가진 일련의 최상위 호출로 실행됩니다.\n\n1. **배포**(sender에 아직 코드가 없을 때만): deployer가 계정을 만듭니다.\n2. **sender 검증**: 계정이 서명 또는 자신이 쓰는 규칙을 확인합니다.\n3. **paymaster 검증**(선택): paymaster가 비용 지불에 동의합니다.\n4. **sender 실행**: 실제 동작입니다.\n5. **paymaster post-op**(선택): paymaster가 나중에 정산합니다.\n\n새 opcode 두 개가 이를 하나로 묶습니다.\n\n- `CURRENT_ROLE`은 코드가 어느 단계에서 실행되고 있는지 반환합니다.\n- `ACCEPT_ROLE`은 `RETURN`처럼 동작하지만 컨트랙트가 어떤 역할을 수락하는지도 함께 밝힙니다. 검증 단계가 대응하는 `ACCEPT_ROLE`로 끝나지 않으면 트랜잭션은 무효이며 블록에 포함될 수 없습니다.\n\n`TXPARAM*` opcode 계열(`CALLDATA*`를 본뜸)은 계정이 nonce, paymaster, 서명 해시 같은 트랜잭션 필드를 읽게 해 줍니다. 이 호출들 동안 `msg.sender`는 고정된 엔트리포인트 주소 `0x7701`이고 `tx.origin`은 sender입니다.\n\n## 샘플 코드\n\n제안된 트랜잭션 페이로드의 형태(RLP, 스펙에서 발췌):\n\n```text\nAA_TX_TYPE || rlp([\n  chain_id, nonce,\n  sender, sender_validation_data,\n  deployer, deployer_data,\n  paymaster, paymaster_data,\n  sender_execution_data,\n  max_priority_fee_per_gas, max_fee_per_gas,\n  sender_validation_gas, paymaster_validation_gas,\n  sender_execution_gas, paymaster_post_op_gas,\n  access_list, authorization_list\n])\n```\n\n단순화한 처리 순서(의사 코드):\n\n```python\npayer = tx.paymaster or tx.sender\ncharge(payer, max_gas * gas_price)\nif no_code(tx.sender):\n    assert call(tx.deployer, role=SENDER_DEPLOYMENT).accepted\nassert call(tx.sender, role=SENDER_VALIDATION).accepted\nif tx.paymaster:\n    assert call(tx.paymaster, role=PAYMASTER_VALIDATION).accepted\ncall(tx.sender, role=SENDER_EXECUTION)          # may fail; tx still included\nif tx.paymaster:\n    call(tx.paymaster, role=PAYMASTER_POST_OP)\nrefund(payer, unused_gas * gas_price)\n```\n\n## 알아둘 점\n\n- 상태는 **Withdrawn**입니다. 스펙에는 [EIP-8141](/eip-8141/)(Frame Transaction)로 대체되었다고 적혀 있으며, 네이티브 계정 추상화 작업은 그쪽을 따라가야 합니다.\n- 트랜잭션 유형 번호는 끝내 배정되지 않았고(`TBD`), 이 제안은 메인넷에 출시된 적이 없습니다.\n- 오늘 쓸 수 있는 계정 추상화는 [ERC-4337](/eip-4337/)과 [EIP-7702](/eip-7702/)의 EOA 위임 메커니즘을 참고하세요.\n- 스펙은 비슷한 모든 설계에 적용되는 보안상의 주의점을 짚었습니다. 의도치 않게 \"accept\" 경로를 포함한 컨트랙트가 동작을 승인할 수 있으므로, 도구와 감사자가 이를 걸러내야 합니다.\n"},"zh":{"lang":"zh","tldr":"一项已撤回的协议层账户抽象提案：新增一种交易类型，拆分为验证、支付和执行三个阶段，由账户和可选的 paymaster 运行。已被 EIP-8141 取代。","tags":["account-abstraction","core","transactions","wallets","withdrawn"],"related":[8141,4337,2718,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7701/","markdown":"## 它解决什么问题？\n\n在以太坊上，只有持有 ECDSA 密钥的外部拥有账户（EOA）才能发起交易，而且同一个账户必须支付 gas。智能合约钱包通过 [ERC-4337](/eip-4337/) 绕过了这一限制，它运行单独的内存池、bundler 和 `EntryPoint` 合约。这样可行，但会增加基础设施、gas 开销以及协议之外的信任假设。\n\nEIP-7701 提议把这件事原生化：让合约账户自己定义验证交易的规则，并让另一个合约（paymaster）支付 gas，这一切都作为核心交易格式的一部分。\n\n## 它如何运作\n\n该提案新增了一种 [EIP-2718](/eip-2718/) 交易类型（\"AA 交易\"），字段包括 `sender`、`sender_validation_data`、可选的 `deployer` 和 `paymaster` 及其数据、`sender_execution_data`，以及每个阶段各自独立的 gas 上限。\n\n一笔交易由一系列顶层调用组成，每个调用有一个**角色**：\n\n1. **部署**（仅当 sender 还没有代码时）：deployer 创建账户。\n2. **sender 验证**：账户检查签名或它使用的任何规则。\n3. **paymaster 验证**（可选）：paymaster 同意付费。\n4. **sender 执行**：真正的操作。\n5. **paymaster post-op**（可选）：paymaster 事后结算。\n\n两个新的操作码把这些串联起来：\n\n- `CURRENT_ROLE` 返回代码当前运行在哪个阶段。\n- `ACCEPT_ROLE` 的工作方式类似 `RETURN`，但还会声明合约接受哪个角色。如果验证阶段没有以匹配的 `ACCEPT_ROLE` 结束，该交易无效，不能被打包进区块。\n\n`TXPARAM*` 操作码家族（仿照 `CALLDATA*`）让账户可以读取交易字段，如 nonce、paymaster 或签名哈希。在这些调用期间，`msg.sender` 是固定的入口点地址 `0x7701`，`tx.origin` 是 sender。\n\n## 示例代码\n\n提议的交易载荷的结构（RLP，来自规范）：\n\n```text\nAA_TX_TYPE || rlp([\n  chain_id, nonce,\n  sender, sender_validation_data,\n  deployer, deployer_data,\n  paymaster, paymaster_data,\n  sender_execution_data,\n  max_priority_fee_per_gas, max_fee_per_gas,\n  sender_validation_gas, paymaster_validation_gas,\n  sender_execution_gas, paymaster_post_op_gas,\n  access_list, authorization_list\n])\n```\n\n简化的处理顺序（伪代码）：\n\n```python\npayer = tx.paymaster or tx.sender\ncharge(payer, max_gas * gas_price)\nif no_code(tx.sender):\n    assert call(tx.deployer, role=SENDER_DEPLOYMENT).accepted\nassert call(tx.sender, role=SENDER_VALIDATION).accepted\nif tx.paymaster:\n    assert call(tx.paymaster, role=PAYMASTER_VALIDATION).accepted\ncall(tx.sender, role=SENDER_EXECUTION)          # may fail; tx still included\nif tx.paymaster:\n    call(tx.paymaster, role=PAYMASTER_POST_OP)\nrefund(payer, unused_gas * gas_price)\n```\n\n## 需要注意\n\n- 状态为 **Withdrawn**。规范说明它已被 [EIP-8141](/eip-8141/)（Frame Transaction）取代，关注原生账户抽象的进展应该去看后者。\n- 交易类型编号从未分配（`TBD`），该提案也从未在主网上线。\n- 如需现在就能使用的账户抽象，请参阅 [ERC-4337](/eip-4337/) 以及 [EIP-7702](/eip-7702/) 的 EOA 委托机制。\n- 规范指出了一个安全问题，它适用于任何类似的设计：一个无意中包含\"accept\"路径的合约可能会授权某些操作，因此工具和审计人员需要将其标出。\n"}}}
