Skip to content

Commit 0f94888

Browse files
committed
Add bundler support to multiple networks.
Signed-off-by: bgravenorst <[email protected]>
1 parent a99456a commit 0f94888

File tree

240 files changed

+9103
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+9103
-28
lines changed

services/concepts/bundler.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
description: Infura supports ERC-4337 bundler methods.
3+
sidebar_label: Bundler methods
4+
---
5+
6+
# Bundler methods (ERC-4337)
7+
8+
Infura supports [ERC-4337](https://docs.erc4337.io/) bundler JSON-RPC methods that enable you to build
9+
account abstraction (AA) experiences like gas sponsorship (paymasters), ERC-20 gas payment, session keys, or
10+
batched actions using smart accounts.
11+
12+
Use the bundler JSON-RPC methods if your app or wallet uses smart accounts, if you use an externally
13+
owned account (EOA) only, use standard Ethereum JSON-RPC methods.
14+
15+
:::info
16+
AA moves validation and fee-payment logic into smart contracts. Instead of sending raw transactions
17+
from an EOA, clients submit [user operations (UserOps)](#user-operations) to a bundler. The
18+
bundler collects and simulates these operations, then executes them through a
19+
[shared coordination contract (EntryPoint)](#entrypoint-contracts) on the network.
20+
21+
Smart accounts are smart contract-based wallets that serve as the foundation of AA. They embed custom
22+
logic for authentication, authorization, network fee payment, nonce management and execution.
23+
:::
24+
25+
:::info
26+
Refer to the [official Pimlico documentation](https://docs.pimlico.io/references/bundler)
27+
for more about the bundler methods and
28+
[EntryPoint errors](https://docs.pimlico.io/references/bundler/entrypoint-errors#entrypoint-errors).
29+
:::
30+
31+
## User operations
32+
33+
A user operation (UserOp) is an is an off-chain request that a bundler later includes onchain by
34+
calling the EntryPoint. UserOps go to a dedicated mempool watched by bundlers instead of being broadcast
35+
as raw L1/L2 transactions.
36+
37+
## EntryPoint contract
38+
39+
The EntryPoint contract is the shared coordination contract defined by ERC-4337. Bundlers call them to
40+
validate and execute user operations (UserOps) from smart accounts. At a high level, an EntryPoint:
41+
42+
- Runs the ERC-4337 validation and execution.
43+
- Enforces nonce and signature checks exposed by each smart account.
44+
- Coordinates fee payment (including paymasters).
45+
- Executes the requested calls onchain.
46+
47+
The bundler supports calling multiple EntryPoint versions (v0.6 and v0.7/v0.8) through the same set
48+
of RPC methods, allowing it to handle both older and modern smart account schemes.
49+
50+
Use the [`eth_supportedEntryPoints`](../reference/ethereum/json-rpc-methods/bundler/eth_supportedentrypoints)
51+
method to fetch the EntryPoint addresses supported by the bundler.
52+
53+
## Supported methods
54+
55+
The following bundler methods are available on the [supported networks](#supported-networks):
56+
57+
- [`eth_sendUserOperation`](../reference/ethereum/json-rpc-methods/bundler/eth_senduseroperation.mdx):
58+
Submits a user operation to be included onchain.
59+
- [`eth_estimateUserOperationGas`](../reference/ethereum/json-rpc-methods/bundler/eth_estimateuseroperationgas):
60+
Simulates the user operation and estimates the appropriate gas limits.
61+
- [`eth_getUserOperationReceipt`](../reference/ethereum/json-rpc-methods/bundler/eth_getuseroperationreceipt):
62+
Fetches the receipt of a user operation.
63+
- [`eth_getUserOperationByHash`](../reference/ethereum/json-rpc-methods/bundler/eth_getuseroperationbyhash):
64+
Fetches the user operation by hash.
65+
- [`eth_supportedEntryPoints`](../reference/ethereum/json-rpc-methods/bundler/eth_supportedentrypoints):
66+
Fetches the EntryPoint addresses supported by the bundler.
67+
- [`pimlico_getUserOperationGasPrice`](../reference/ethereum/json-rpc-methods/bundler/pimlico_getuseroperationgasprice):
68+
Returns the gas prices that must be used for the user operation.
69+
- [`pimlico_getUserOperationStatus`](../reference/ethereum/json-rpc-methods/bundler/pimlico_getuseroperationstatus):
70+
Returns the user operation status.
71+
- [`pimlico_simulateAssetChanges`](../reference/ethereum/json-rpc-methods/bundler/pimlico_simulateassetchanges):
72+
Simulates a user operation to predict the asset changes it will cause.
73+
74+
## Supported networks
75+
76+
Bundler methods are active on the following networks:
77+
78+
- [Arbitrum](../reference/arbitrum/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
79+
- [Avalanche](../reference/avalanche-c-chain/json-rpc-methods/bundler/index.md) (mainnet and Fuji)
80+
- [Base](../reference/base/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
81+
- [Blast](../reference/blast/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
82+
- [BNB Smart Chain](../reference/bnb-smart-chain/json-rpc-methods/bundler/index.md) (mainnet and testnet)
83+
- [Celo](../reference/celo/json-rpc-methods/bundler/index.md) (mainnet and Alfajores)
84+
- [Ethereum](../reference/ethereum/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
85+
- [Linea](../reference/linea/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
86+
- [Mantle](../reference/mantle/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
87+
- [opBNB](../reference/opbnb/json-rpc-methods/bundler/index.md) (mainnet)
88+
- [Optimism](../reference/optimism/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
89+
- [Polygon](../reference/polygon-pos/json-rpc-methods/bundler/index.md) (mainnet and Amoy)
90+
- [Scroll](../reference/scroll/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
91+
- [Sei](../reference/sei/json-rpc-methods/bundler/index.md) (mainnet and testnet)
92+
- [Unichain](../reference/unichain/json-rpc-methods/bundler/index.md) (mainnet and Sepolia)
93+
94+
:::info
95+
[Contact support](https://support.infura.io/) if you require bundler method activation on a network not listed here that’s currently supported by Pimlico.
96+
:::
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl without an override">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "eth_estimateUserOperationGas",
14+
"params": [
15+
{
16+
"sender": "0x5a6b47F4131bf1feAFA56A05573314BcF44C9149",
17+
"nonce": "0x845adb2c711129d4f3966735ed98a9f09fc4ce5700000000000000000000",
18+
"factory": "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
19+
"factoryData": "0xc5265d5d000000000000000000000000aac5d4240af87249b3f71bc8e4a2cae074a3e419",
20+
"callData": "0xe9ae5c5300000000000000000000000000000000000000000000000000000000000000000000000000",
21+
"callGasLimit": "0x0",
22+
"verificationGasLimit": "0x0",
23+
"preVerificationGas": "0x0",
24+
"maxFeePerGas": "0x7a5cf70d5",
25+
"maxPriorityFeePerGas": "0x3b9aca00",
26+
"paymaster": null,
27+
"paymasterVerificationGasLimit": null,
28+
"paymasterPostOpGasLimit": null,
29+
"paymasterData": null,
30+
"signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
31+
},
32+
"0x0000000071727De22E5E9d8BAf0edAc6f37da032"
33+
],
34+
"id": 1
35+
}'
36+
```
37+
38+
</TabItem>
39+
<TabItem value="curl with an override">
40+
41+
```bash
42+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
43+
-X POST \
44+
-H "Content-Type: application/json" \
45+
-d '{
46+
"jsonrpc": "2.0",
47+
"method": "eth_estimateUserOperationGas",
48+
"params": [
49+
{
50+
"sender": "0xa203fDb8bC335F86016F635b85389B62B189E417",
51+
"nonce": "0x35bf2a054f92f3730b87582ef223c8d663f9eb01158154750000000000000000",
52+
"factory": "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
53+
"callData": "0xb61d27f6000000000000000000000000530fff22987e137e7c8d2adcc4c15eb45b4fa752",
54+
"callGasLimit": "0x0",
55+
"verificationGasLimit": "0x0",
56+
"preVerificationGas": "0x0",
57+
"maxPriorityFeePerGas": "0x12a05f200",
58+
"maxFeePerGas": "0x5b08082fa",
59+
"paymaster": null,
60+
"paymasterVerificationGasLimit": null,
61+
"paymasterPostOpGasLimit": null,
62+
"paymasterData": null,
63+
"signature": "0xa6cc6589c8bd561cfd68d7b6b0757ef6f208e7438782939938498eee7d703260137856c840c491b3d415956265e81bf5c2184a725be2abfc365f7536b6af525e1c"
64+
},
65+
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
66+
{
67+
"0xd9c9cd5f6779558b6e0ed4e6acf6b1947e7fa1f3": {
68+
"balance": "0xde0b6b3a7640000"
69+
},
70+
"0xebe8efa441b9302a0d7eaecc277c09d20d684540": {
71+
"stateDiff": {
72+
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80": "0x21"
73+
}
74+
}
75+
}
76+
],
77+
"id": 1
78+
}'
79+
```
80+
81+
</TabItem>
82+
</Tabs>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "eth_getUserOperationByHash",
14+
"params": ["0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f"],
15+
"id": 1
16+
}'
17+
```
18+
19+
</TabItem>
20+
</Tabs>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "eth_getUserOperationReceipt",
14+
"params": ["0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f"],
15+
"id": 1
16+
}'
17+
```
18+
19+
</TabItem>
20+
</Tabs>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "eth_sendUserOperation",
14+
"params": [
15+
{
16+
"sender": "0x5a6b47F4131bf1feAFA56A05573314BcF44C9149",
17+
"nonce": "0x845ADB2C711129D4F3966735ED98A9F09FC4CE5700000000000000000000",
18+
"factory": "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
19+
"factoryData": "0xc5265d5d000000000000000000000000aac5d4240af87249b3f71bc8e4a2cae074a3e419",
20+
"callData": "0xe9ae5c5300000000000000000000000000000000000000000000000000000000000000000000000000",
21+
"callGasLimit": "0x13880",
22+
"verificationGasLimit": "0x60B01",
23+
"preVerificationGas": "0xD3E3",
24+
"maxPriorityFeePerGas": "0x3B9ACA00",
25+
"maxFeePerGas": "0x7A5CF70D5",
26+
"paymaster": "0x",
27+
"paymasterVerificationGasLimit": "0x0",
28+
"paymasterPostOpGasLimit": "0x0",
29+
"paymasterData": null,
30+
"signature": "0xa6cc6589c8bd561cfd68d7b6b0757ef6f208e7438782939938498eee7d703260137856c840c491b3d415956265e81bf5c2184a725be2abfc365f7536b6af525e1c"
31+
},
32+
"0x0000000071727De22E5E9d8BAf0edAc6f37da032"
33+
],
34+
"id": 1
35+
}'
36+
```
37+
38+
</TabItem>
39+
</Tabs>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "eth_supportedEntryPoints",
14+
"params": [],
15+
"id": 1
16+
}'
17+
```
18+
19+
</TabItem>
20+
</Tabs>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "pimlico_getUserOperationGasPrice",
14+
"params": [],
15+
"id": 1
16+
}'
17+
```
18+
19+
</TabItem>
20+
</Tabs>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "pimlico_getUserOperationStatus",
14+
"params": ["0x9bd004b8240da8eba3a02190a72be8a70ade8ef4c581b6e59789643c5e642ac3"],
15+
"id": 1
16+
}'
17+
```
18+
19+
</TabItem>
20+
</Tabs>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl">
6+
7+
```bash
8+
curl https://arbitrum-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{
12+
"jsonrpc": "2.0",
13+
"method": "pimlico_simulateAssetChanges",
14+
"id": 4337,
15+
"params": [
16+
{
17+
"sender": "0x5a6b47F4131bf1feAFA56A05573314BcF44C9149",
18+
"nonce": "0x1",
19+
"callData": "0x9faf00f4d9c8df66a69fd6242d468aa8a31a439d14fc6c7af3868a06ed392233bc7e39475df25ad2b52bd5e19e1d438277207a415cb4d4ce8ad192464c55ddf1a9559ff900000000000000000000000073da77f0f2daaa88b908413495d3d0e37458212e00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000039946fd82c9c86c9a61bceed86fbdd284590bdd90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
20+
"callGasLimit": "0x0",
21+
"verificationGasLimit": "0x0",
22+
"preVerificationGas": "0x0",
23+
"maxFeePerGas": "0x7a5cf70d5",
24+
"maxPriorityFeePerGas": "0x3b9aca00",
25+
"paymasterVerificationGasLimit": "0x0",
26+
"paymasterPostOpGasLimit": "0x0",
27+
"signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
28+
},
29+
"0x0000000071727De22E5E9d8BAf0edAc6f37da032"
30+
]
31+
}'
32+
```
33+
34+
</TabItem>
35+
</Tabs>

0 commit comments

Comments
 (0)