{"eip":7769,"title":"JSON-RPC API for ERC-4337","description":"JSON-RPC API methods for communication between smart contract account wallets and ERC-4337 bundlers","authors":["Vitalik Buterin (@vbuterin)","Yoav Weiss (@yoavw)","Dror Tirosh (@drortirosh)","Shahaf Nacson (@shahafn)","Alex Forshtat (@forshtat)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2024-08-23","requires":[155,4337,7562],"discussionsTo":"https://ethereum-magicians.org/t/erc-7769-json-rpc-for-erc-4337-account-abstraction/21126","repo":"ERCs","label":"ERC-7769","officialUrl":"https://eips.ethereum.org/EIPS/eip-7769","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7769.md","url":"https://eips.huatuo.xyz/eip-7769/","tldr":{"en":"Standardizes the JSON-RPC methods wallets use to talk to ERC-4337 bundlers (send, estimate, look up UserOperations), plus debug methods for testing bundlers.","ja":"ウォレットが ERC-4337 の Bundler と通信するための JSON-RPC メソッド（UserOperation の送信、見積もり、検索）と、Bundler をテストするためのデバッグメソッドを標準化する。","ko":"지갑이 ERC-4337 번들러와 통신할 때 쓰는 JSON-RPC 메서드(UserOperation 전송, 추정, 조회)와 번들러 테스트용 디버그 메서드를 표준화한다.","zh":"标准化钱包与 ERC-4337 bundler 通信所用的 JSON-RPC 方法（发送、估算、查询 UserOperation），以及用于测试 bundler 的 debug 方法。"},"tags":["account-abstraction","json-rpc","bundler","erc-4337","wallet"],"explainers":{"en":{"lang":"en","tldr":"Standardizes the JSON-RPC methods wallets use to talk to ERC-4337 bundlers (send, estimate, look up UserOperations), plus debug methods for testing bundlers.","tags":["account-abstraction","json-rpc","bundler","erc-4337","wallet"],"related":[4337,7562,7702,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7769/","markdown":"## What problem does it solve?\n\nIn [ERC-4337](/eip-4337/) account abstraction, users do not send ordinary transactions. They sign `UserOperation` objects that go to a separate mempool run by *bundlers*, which pack many of them into one `handleOps` call on the `EntryPoint` contract. Standard methods like `eth_sendRawTransaction` and `eth_estimateGas` don't fit this flow.\n\nERC-7769 defines the RPC surface every bundler should expose, so a wallet or SDK can switch bundler providers without code changes.\n\n## How it works\n\n**`eth` namespace (public):**\n\n| Method | Purpose |\n| --- | --- |\n| `eth_sendUserOperation` | Validate, simulate and add a UserOperation to the mempool; returns `userOpHash` |\n| `eth_estimateUserOperationGas` | Return `preVerificationGas`, `verificationGasLimit`, `callGasLimit` (and paymaster verification gas); signature may be a stub; accepts a state override set |\n| `eth_getUserOperationByHash` | Return the UserOperation plus `blockNumber`, `transactionHash`, etc. |\n| `eth_getUserOperationReceipt` | Return `success`, `actualGasCost`, `actualGasUsed`, this op's own logs, and the bundle's transaction receipt |\n| `eth_supportedEntryPoints` | EntryPoint addresses the bundler accepts, preferred first |\n| `eth_chainId` | [EIP-155](/eip-155/) chain ID |\n\nErrors use specific codes, for example `-32602` invalid fields, `-32500` rejected by EntryPoint validation (message carries the `AAxx` code), `-32501` rejected by the paymaster, `-32502` [ERC-7562](/eip-7562/) opcode rule violation, `-32503` out of time range, `-32507` bad signature.\n\nOn chains with [EIP-7702](/eip-7702/), a UserOperation may carry an `eip7702Auth` tuple, and setting `factory` to the marker `0x7702` tells the EntryPoint the sender is a 7702-delegated EOA; `factoryData` is then passed to the sender for initialization.\n\n**`debug` namespace (testing only):** `debug_bundler_clearState`, `dumpMempool`, `sendBundleNow`, `setBundlingMode`, `setReputation`, `dumpReputation`, `addUserOps`. These exist so a shared compatibility test suite can drive any bundler.\n\n## Sample code\n\nSubmitting a UserOperation and polling for its receipt (TypeScript, plain `fetch`):\n\n```ts\nasync function rpc(method: string, params: unknown[]) {\n  const res = await fetch(BUNDLER_URL, {\n    method: \"POST\",\n    headers: { \"content-type\": \"application/json\" },\n    body: JSON.stringify({ jsonrpc: \"2.0\", id: 1, method, params }),\n  });\n  const json = await res.json();\n  if (json.error) throw new Error(`${json.error.code}: ${json.error.message}`);\n  return json.result;\n}\n\nconst [entryPoint] = await rpc(\"eth_supportedEntryPoints\", []);\nconst gas = await rpc(\"eth_estimateUserOperationGas\", [userOp, entryPoint]);\nObject.assign(userOp, gas);\nuserOp.signature = await signUserOp(userOp, entryPoint); // wallet-specific\n\nconst userOpHash = await rpc(\"eth_sendUserOperation\", [userOp, entryPoint]);\n\nlet receipt = null;\nwhile (!receipt) {\n  await new Promise((r) =\u003e setTimeout(r, 2000));\n  receipt = await rpc(\"eth_getUserOperationReceipt\", [userOpHash]);\n}\nconsole.log(receipt.success, receipt.actualGasCost);\n```\n\n## Things to know\n\n- **Status: Draft.** Field names and error codes may still change.\n- All numeric fields are hex strings, and empty bytes must be `\"0x\"`.\n- `receipt` in `eth_getUserOperationReceipt` covers the whole bundle; use the top-level `logs` for your own operation.\n- `postOpGasLimit` for paymasters cannot be estimated reliably; paymasters should supply it.\n- `debug_*` methods must never be exposed on production endpoints.\n"},"ja":{"lang":"ja","tldr":"ウォレットが ERC-4337 の Bundler と通信するための JSON-RPC メソッド（UserOperation の送信、見積もり、検索）と、Bundler をテストするためのデバッグメソッドを標準化する。","tags":["account-abstraction","json-rpc","bundler","erc-4337","wallet"],"related":[4337,7562,7702,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7769/","markdown":"## 何を解決するのか\n\n[ERC-4337](/eip-4337/) のアカウント抽象化では、ユーザーは通常のトランザクションを送りません。`UserOperation` オブジェクトに署名し、それが *Bundler* の運用する別の mempool に送られ、Bundler が多数をまとめて `EntryPoint` コントラクトへの 1 回の `handleOps` 呼び出しにします。`eth_sendRawTransaction` や `eth_estimateGas` のような標準メソッドは、この流れには合いません。\n\nERC-7769 は、すべての Bundler が公開すべき RPC の範囲を定義します。これにより、ウォレットや SDK はコードを変えずに Bundler プロバイダーを切り替えられます。\n\n## 仕組み\n\n**`eth` 名前空間（公開）:**\n\n| メソッド | 役割 |\n| --- | --- |\n| `eth_sendUserOperation` | UserOperation を検証・シミュレーションして mempool に追加し、`userOpHash` を返す |\n| `eth_estimateUserOperationGas` | `preVerificationGas`、`verificationGasLimit`、`callGasLimit`（および Paymaster の検証ガス）を返す。署名はスタブでもよく、state override セットを受け付ける |\n| `eth_getUserOperationByHash` | UserOperation と、`blockNumber`、`transactionHash` などを返す |\n| `eth_getUserOperationReceipt` | `success`、`actualGasCost`、`actualGasUsed`、この op 自身のログ、バンドルのトランザクションレシートを返す |\n| `eth_supportedEntryPoints` | Bundler が受け付ける EntryPoint のアドレス（優先するものが先頭） |\n| `eth_chainId` | [EIP-155](/eip-155/) のチェーン ID |\n\nエラーには専用のコードが使われます。たとえば `-32602` はフィールドが無効、`-32500` は EntryPoint の検証による拒否（メッセージに `AAxx` コードが含まれる）、`-32501` は Paymaster による拒否、`-32502` は [ERC-7562](/eip-7562/) の opcode ルール違反、`-32503` は時間範囲外、`-32507` は署名不正です。\n\n[EIP-7702](/eip-7702/) があるチェーンでは、UserOperation に `eip7702Auth` タプルを含められます。`factory` にマーカー `0x7702` を設定すると、送信元が 7702 で委任された EOA であることを EntryPoint に伝え、その場合 `factoryData` は初期化のために送信元に渡されます。\n\n**`debug` 名前空間（テスト専用）:** `debug_bundler_clearState`、`dumpMempool`、`sendBundleNow`、`setBundlingMode`、`setReputation`、`dumpReputation`、`addUserOps`。これらは、共通の互換性テストスイートがどの Bundler も操作できるようにするために存在します。\n\n## サンプルコード\n\nUserOperation を送信し、レシートをポーリングする（TypeScript、素の `fetch`）:\n\n```ts\nasync function rpc(method: string, params: unknown[]) {\n  const res = await fetch(BUNDLER_URL, {\n    method: \"POST\",\n    headers: { \"content-type\": \"application/json\" },\n    body: JSON.stringify({ jsonrpc: \"2.0\", id: 1, method, params }),\n  });\n  const json = await res.json();\n  if (json.error) throw new Error(`${json.error.code}: ${json.error.message}`);\n  return json.result;\n}\n\nconst [entryPoint] = await rpc(\"eth_supportedEntryPoints\", []);\nconst gas = await rpc(\"eth_estimateUserOperationGas\", [userOp, entryPoint]);\nObject.assign(userOp, gas);\nuserOp.signature = await signUserOp(userOp, entryPoint); // wallet-specific\n\nconst userOpHash = await rpc(\"eth_sendUserOperation\", [userOp, entryPoint]);\n\nlet receipt = null;\nwhile (!receipt) {\n  await new Promise((r) =\u003e setTimeout(r, 2000));\n  receipt = await rpc(\"eth_getUserOperationReceipt\", [userOpHash]);\n}\nconsole.log(receipt.success, receipt.actualGasCost);\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** フィールド名やエラーコードはまだ変わる可能性があります。\n- 数値フィールドはすべて 16 進数の文字列で、空のバイト列は `\"0x\"` でなければなりません。\n- `eth_getUserOperationReceipt` の `receipt` はバンドル全体を対象としています。自分の operation のログにはトップレベルの `logs` を使ってください。\n- Paymaster の `postOpGasLimit` は確実に見積もることができません。Paymaster 側が指定すべきです。\n- `debug_*` メソッドを本番のエンドポイントで公開してはいけません。\n"},"ko":{"lang":"ko","tldr":"지갑이 ERC-4337 번들러와 통신할 때 쓰는 JSON-RPC 메서드(UserOperation 전송, 추정, 조회)와 번들러 테스트용 디버그 메서드를 표준화한다.","tags":["account-abstraction","json-rpc","bundler","erc-4337","wallet"],"related":[4337,7562,7702,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7769/","markdown":"## 어떤 문제를 해결하나요?\n\n[ERC-4337](/eip-4337/) 계정 추상화에서 사용자는 일반 트랜잭션을 보내지 않습니다. `UserOperation` 객체에 서명하고, 이는 *번들러*가 운영하는 별도의 mempool로 가며, 번들러는 이를 많이 모아 `EntryPoint` 컨트랙트에 대한 한 번의 `handleOps` 호출로 묶습니다. `eth_sendRawTransaction`이나 `eth_estimateGas` 같은 표준 메서드는 이 흐름에 맞지 않습니다.\n\nERC-7769는 모든 번들러가 노출해야 하는 RPC 표면을 정의하여, 지갑이나 SDK가 코드를 바꾸지 않고도 번들러 제공자를 바꿀 수 있게 합니다.\n\n## 어떻게 동작하나요?\n\n**`eth` 네임스페이스(공개):**\n\n| 메서드 | 역할 |\n| --- | --- |\n| `eth_sendUserOperation` | UserOperation을 검증하고 시뮬레이션해 mempool에 추가하며, `userOpHash`를 반환 |\n| `eth_estimateUserOperationGas` | `preVerificationGas`, `verificationGasLimit`, `callGasLimit`(및 paymaster 검증 가스)를 반환. 서명은 스텁이어도 되고, state override 집합을 받음 |\n| `eth_getUserOperationByHash` | UserOperation과 함께 `blockNumber`, `transactionHash` 등을 반환 |\n| `eth_getUserOperationReceipt` | `success`, `actualGasCost`, `actualGasUsed`, 해당 op 자체의 로그, 번들의 트랜잭션 영수증을 반환 |\n| `eth_supportedEntryPoints` | 번들러가 받는 EntryPoint 주소(선호하는 것이 먼저) |\n| `eth_chainId` | [EIP-155](/eip-155/) 체인 ID |\n\n오류는 고유한 코드를 사용합니다. 예를 들어 `-32602`는 잘못된 필드, `-32500`은 EntryPoint 검증에 의한 거부(메시지에 `AAxx` 코드 포함), `-32501`은 paymaster에 의한 거부, `-32502`는 [ERC-7562](/eip-7562/) opcode 규칙 위반, `-32503`은 시간 범위 초과, `-32507`은 잘못된 서명입니다.\n\n[EIP-7702](/eip-7702/)가 있는 체인에서는 UserOperation이 `eip7702Auth` 튜플을 담을 수 있으며, `factory`를 마커 `0x7702`로 설정하면 발신자가 7702로 위임된 EOA임을 EntryPoint에 알립니다. 이때 `factoryData`는 초기화를 위해 발신자에게 전달됩니다.\n\n**`debug` 네임스페이스(테스트 전용):** `debug_bundler_clearState`, `dumpMempool`, `sendBundleNow`, `setBundlingMode`, `setReputation`, `dumpReputation`, `addUserOps`. 공용 호환성 테스트 스위트가 어떤 번들러든 구동할 수 있도록 존재합니다.\n\n## 샘플 코드\n\nUserOperation을 제출하고 영수증을 폴링하는 예(TypeScript, 순수 `fetch`):\n\n```ts\nasync function rpc(method: string, params: unknown[]) {\n  const res = await fetch(BUNDLER_URL, {\n    method: \"POST\",\n    headers: { \"content-type\": \"application/json\" },\n    body: JSON.stringify({ jsonrpc: \"2.0\", id: 1, method, params }),\n  });\n  const json = await res.json();\n  if (json.error) throw new Error(`${json.error.code}: ${json.error.message}`);\n  return json.result;\n}\n\nconst [entryPoint] = await rpc(\"eth_supportedEntryPoints\", []);\nconst gas = await rpc(\"eth_estimateUserOperationGas\", [userOp, entryPoint]);\nObject.assign(userOp, gas);\nuserOp.signature = await signUserOp(userOp, entryPoint); // wallet-specific\n\nconst userOpHash = await rpc(\"eth_sendUserOperation\", [userOp, entryPoint]);\n\nlet receipt = null;\nwhile (!receipt) {\n  await new Promise((r) =\u003e setTimeout(r, 2000));\n  receipt = await rpc(\"eth_getUserOperationReceipt\", [userOpHash]);\n}\nconsole.log(receipt.success, receipt.actualGasCost);\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 필드 이름과 오류 코드는 아직 바뀔 수 있습니다.\n- 모든 숫자 필드는 16진수 문자열이며, 빈 바이트는 `\"0x\"`여야 합니다.\n- `eth_getUserOperationReceipt`의 `receipt`는 번들 전체를 다룹니다. 자신의 operation 로그는 최상위 `logs`를 사용하세요.\n- paymaster의 `postOpGasLimit`은 안정적으로 추정할 수 없으므로 paymaster가 제공해야 합니다.\n- `debug_*` 메서드는 프로덕션 엔드포인트에 절대 노출해서는 안 됩니다.\n"},"zh":{"lang":"zh","tldr":"标准化钱包与 ERC-4337 bundler 通信所用的 JSON-RPC 方法（发送、估算、查询 UserOperation），以及用于测试 bundler 的 debug 方法。","tags":["account-abstraction","json-rpc","bundler","erc-4337","wallet"],"related":[4337,7562,7702,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7769/","markdown":"## 它解决什么问题？\n\n在 [ERC-4337](/eip-4337/) 账户抽象中，用户并不发送普通交易。他们签署 `UserOperation` 对象，这些对象进入由 *bundler* 运行的独立 mempool，bundler 再把许多个打包进对 `EntryPoint` 合约的一次 `handleOps` 调用。`eth_sendRawTransaction` 和 `eth_estimateGas` 这类标准方法不适用于这一流程。\n\nERC-7769 定义了每个 bundler 都应提供的 RPC 接口，这样钱包或 SDK 无需修改代码即可切换 bundler 服务商。\n\n## 它如何运作\n\n**`eth` 命名空间（公开）：**\n\n| 方法 | 用途 |\n| --- | --- |\n| `eth_sendUserOperation` | 验证、模拟并将 UserOperation 加入 mempool；返回 `userOpHash` |\n| `eth_estimateUserOperationGas` | 返回 `preVerificationGas`、`verificationGasLimit`、`callGasLimit`（以及 paymaster 验证 gas）；签名可以是占位值；接受 state override 集合 |\n| `eth_getUserOperationByHash` | 返回 UserOperation 以及 `blockNumber`、`transactionHash` 等 |\n| `eth_getUserOperationReceipt` | 返回 `success`、`actualGasCost`、`actualGasUsed`、该 op 自身的日志，以及该 bundle 的交易回执 |\n| `eth_supportedEntryPoints` | bundler 接受的 EntryPoint 地址，首选的排在前面 |\n| `eth_chainId` | [EIP-155](/eip-155/) 链 ID |\n\n错误使用特定的代码，例如 `-32602` 字段无效，`-32500` 被 EntryPoint 验证拒绝（消息中带有 `AAxx` 代码），`-32501` 被 paymaster 拒绝，`-32502` 违反 [ERC-7562](/eip-7562/) 的 opcode 规则，`-32503` 超出时间范围，`-32507` 签名错误。\n\n在支持 [EIP-7702](/eip-7702/) 的链上，UserOperation 可以携带 `eip7702Auth` 元组，将 `factory` 设为标记值 `0x7702` 即告诉 EntryPoint 该 sender 是经 7702 委托的 EOA；此时 `factoryData` 会被传给 sender 用于初始化。\n\n**`debug` 命名空间（仅用于测试）：** `debug_bundler_clearState`、`dumpMempool`、`sendBundleNow`、`setBundlingMode`、`setReputation`、`dumpReputation`、`addUserOps`。这些方法的存在是为了让共享的兼容性测试套件可以驱动任何 bundler。\n\n## 示例代码\n\n提交 UserOperation 并轮询其回执（TypeScript，直接使用 `fetch`）：\n\n```ts\nasync function rpc(method: string, params: unknown[]) {\n  const res = await fetch(BUNDLER_URL, {\n    method: \"POST\",\n    headers: { \"content-type\": \"application/json\" },\n    body: JSON.stringify({ jsonrpc: \"2.0\", id: 1, method, params }),\n  });\n  const json = await res.json();\n  if (json.error) throw new Error(`${json.error.code}: ${json.error.message}`);\n  return json.result;\n}\n\nconst [entryPoint] = await rpc(\"eth_supportedEntryPoints\", []);\nconst gas = await rpc(\"eth_estimateUserOperationGas\", [userOp, entryPoint]);\nObject.assign(userOp, gas);\nuserOp.signature = await signUserOp(userOp, entryPoint); // wallet-specific\n\nconst userOpHash = await rpc(\"eth_sendUserOperation\", [userOp, entryPoint]);\n\nlet receipt = null;\nwhile (!receipt) {\n  await new Promise((r) =\u003e setTimeout(r, 2000));\n  receipt = await rpc(\"eth_getUserOperationReceipt\", [userOpHash]);\n}\nconsole.log(receipt.success, receipt.actualGasCost);\n```\n\n## 需要注意\n\n- **状态：Draft。** 字段名和错误码仍可能变化。\n- 所有数值字段都是十六进制字符串，空字节必须写成 `\"0x\"`。\n- `eth_getUserOperationReceipt` 中的 `receipt` 涵盖整个 bundle；请使用顶层的 `logs` 查看你自己 operation 的日志。\n- paymaster 的 `postOpGasLimit` 无法可靠估算；应由 paymaster 提供。\n- `debug_*` 方法绝不能暴露在生产端点上。\n"}}}
