---
eip: 7769
label: ERC-7769
title: JSON-RPC API for ERC-4337
status: Draft
type: Standards Track
category: ERC
created: 2024-08-23
requires: 155, 4337, 7562
official: https://eips.ethereum.org/EIPS/eip-7769
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7769.md
canonical: https://eips.huatuo.xyz/eip-7769/
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]
---

# ERC-7769: JSON-RPC API for ERC-4337

> JSON-RPC API methods for communication between smart contract account wallets and ERC-4337 bundlers

**TL;DR:** Standardizes the JSON-RPC methods wallets use to talk to ERC-4337 bundlers (send, estimate, look up UserOperations), plus debug methods for testing bundlers.

## What problem does it solve?

In [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.

ERC-7769 defines the RPC surface every bundler should expose, so a wallet or SDK can switch bundler providers without code changes.

## How it works

**`eth` namespace (public):**

| Method | Purpose |
| --- | --- |
| `eth_sendUserOperation` | Validate, simulate and add a UserOperation to the mempool; returns `userOpHash` |
| `eth_estimateUserOperationGas` | Return `preVerificationGas`, `verificationGasLimit`, `callGasLimit` (and paymaster verification gas); signature may be a stub; accepts a state override set |
| `eth_getUserOperationByHash` | Return the UserOperation plus `blockNumber`, `transactionHash`, etc. |
| `eth_getUserOperationReceipt` | Return `success`, `actualGasCost`, `actualGasUsed`, this op's own logs, and the bundle's transaction receipt |
| `eth_supportedEntryPoints` | EntryPoint addresses the bundler accepts, preferred first |
| `eth_chainId` | [EIP-155](/eip-155/) chain ID |

Errors 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.

On 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.

**`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.

## Sample code

Submitting a UserOperation and polling for its receipt (TypeScript, plain `fetch`):

```ts
async function rpc(method: string, params: unknown[]) {
  const res = await fetch(BUNDLER_URL, {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
  });
  const json = await res.json();
  if (json.error) throw new Error(`${json.error.code}: ${json.error.message}`);
  return json.result;
}

const [entryPoint] = await rpc("eth_supportedEntryPoints", []);
const gas = await rpc("eth_estimateUserOperationGas", [userOp, entryPoint]);
Object.assign(userOp, gas);
userOp.signature = await signUserOp(userOp, entryPoint); // wallet-specific

const userOpHash = await rpc("eth_sendUserOperation", [userOp, entryPoint]);

let receipt = null;
while (!receipt) {
  await new Promise((r) => setTimeout(r, 2000));
  receipt = await rpc("eth_getUserOperationReceipt", [userOpHash]);
}
console.log(receipt.success, receipt.actualGasCost);
```

## Things to know

- **Status: Draft.** Field names and error codes may still change.
- All numeric fields are hex strings, and empty bytes must be `"0x"`.
- `receipt` in `eth_getUserOperationReceipt` covers the whole bundle; use the top-level `logs` for your own operation.
- `postOpGasLimit` for paymasters cannot be estimated reliably; paymasters should supply it.
- `debug_*` methods must never be exposed on production endpoints.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7769
