Skip to content

Document Infura Bundler support #2183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
.env.development.local
.env.test.local
.env.production.local
.prettierignore

npm-debug.log*
.vercel
Expand Down
13 changes: 8 additions & 5 deletions services/get-started/pricing/credit-cost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,18 @@ a specific network, then use the default Ethereum method's credit cost.

<CreditCostTable methods="evm" />


### Trace methods

<CreditCostTable methods="evm_trace" />


### Filter methods

<CreditCostTable methods="evm_filter" />

### Debug methods


<CreditCostTable methods="evm_debug" />


### Subscription events

You can subscribe and unsubscribe to events using [`eth_subscribe`](../../reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx) and [`eth_unsubscribe`](../../reference/ethereum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx).
Expand All @@ -75,7 +71,6 @@ are charged at approximately one second intervals.

<CreditCostTable methods="linea" />


## Polygon

<CreditCostTable methods="polygon" />
Expand All @@ -95,3 +90,11 @@ All Solana methods are charged at 160 credits per request.
## Gas API

<CreditCostTable methods="gasApi" />

## Bundler API

:::info
The Bundler API methods are currently only available on Ethereum Mainnet and Sepolia.
:::

<CreditCostTable methods="bundler" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js'

Simulates the user operation and estimates the appropriate gas limits. Returns an error if the operation
is unsuccessful. <CreditCost network="bundler" method="eth_estimateUserOperationGas" />

:::tip
- You can use `stateOverrides` to estimate the gas cost even if the sender has no funds.
However, if the operation is sent onchain when the sender has no balance, it will revert during
the call phase due to lack of funds.

- You can include a dummy signature for the `signature` field to estimate the gas cost. For example:
`0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c`
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace `<YOUR-API-KEY>` with an API key from your [MetaMask Developer dashboard](https://developer.metamask.io/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

<Tabs>
<TabItem value="v0.7" label="v0.7 and v0.8 user operation">
Comment on lines +4 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our current tab style is optimized for usage with code samples – the tabs use the same color and style and signify a single, continuous UI element with the code sample:
Screenshot 2025-07-31 at 12 52 20 PM
This has been fine so far because we only use tabs with code samples. I don't think this style works as well for non-code sample usage, as the tab bar appears as a completely separate element to the parameters list:
Screenshot 2025-07-31 at 12 53 02 PM
We may need to adjust the global tab style if we intend to use it outside of code samples. There are only a few instances added here, so I'm ok with addressing it in a future issue.


- `userOperation`: The user operation object containing the following fields:

- `sender`: (string) - The address of the account making the operation.
- `nonce`: (string) - Unique identifier for the request from this sender. This includes the key and sequence number.
- `factory`: (string) [_optional_] - The factory contract address that will deploy the smart account if it doesn't exist yet.
- `factoryData`: (string) [_optional_] - The data passed to the factory contract to deploy the smart account.
- `callData`: (string) [_optional_] - The data to pass to the sender during the main execution call.
- `callGasLimit`: (string) - The amount of gas to allocate the main execution call.
- `verificationGasLimit`: (string) - The amount of gas to allocate for the verification step.
- `preVerificationGas`: (string) - The amount of gas to pay for to compensate the bundler for pre-verification execution and `calldata`.
- `maxFeePerGas`: (string) - Maximum fee per gas, in wei, the sender is willing to pay per gas.
- `maxPriorityFeePerGas`: (string) - Maximum fee, in wei, the sender is willing to pay per gas above the base fee.
- `paymaster`: (string) [_optional_] - Address of paymaster sponsoring the transaction, or `null` if none.
- `paymasterVerificationGasLimit`: (string) [_optional_] - The amount of gas to allocate for the verification step of the paymaster, or `null` if no paymaster.
- `paymasterPostOpGasLimit`: (string) [_optional_] - The amount of gas to allocate for the post-operation step of the paymaster, or `null` if no paymaster.
- `paymasterData`: (string) [_optional_] - The data to pass to the paymaster during the verification step, or `null` if no paymaster.
- `signature`: (string) - The signature data. For gas estimation, this can be a dummy signature.
- `eip7702Auth`: (object) [_optional_] - The EIP-7702 authorization data. This can be a dummy authorization
for estimations:
- `address`: (string) - The contract address for the authorization.
- `chainId`: (string) - The chain ID.
- `nonce`: (string) - The nonce.
- `r`: (string) - The r component of the signature.
- `s`: (string) - The s component of the signature.
- `v`: (string) - The v component of the signature.
- `yParity`: (string) - The y-parity value.

- `entryPoint`: (string) - The EntryPoint contract address (`0x0000000071727De22E5E9d8BAf0edAc6f37da032`).

- `stateOverrides`: (object) [_optional_] - State overrides to apply for the simulation. Each key is an address, and each value is an object that can contain:
- `balance`: (string) [_optional_] - The balance to set for the address.
- `nonce`: (string) [_optional_] - The nonce to set for the address.
- `code`: (string) [_optional_] - The code to set for the address.
- `state`: (object) [_optional_] - Complete state to set, where each key is a 32-byte hex storage slot and each value is a 32-byte hex value.
- `stateDiff`: (object) [_optional_] - State differences to apply, where each key is a 32-byte hex storage slot and each value is a 32-byte hex value.

</TabItem>
<TabItem value="v0.6" label="v0.6 user operation">

- `userOperation`: The user operation object containing the following fields:

- `sender`: (string) - The address of the account making the operation.
- `nonce`: (string) - Unique identifier for the request from this sender.
- `initCode`: (string) - The initialization code for the smart account if it doesn't exist yet.
- `callData`: (string) [_optional_] - The data to pass to the sender during the main execution call.
- `callGasLimit`: (string) - The amount of gas to allocate the main execution call.
- `verificationGasLimit`: (string) - The amount of gas to allocate for the verification step.
- `preVerificationGas`: (string) - The amount of gas to pay for to compensate the bundler for pre-verification execution and `calldata`.
- `maxFeePerGas`: (string) - Maximum fee per gas, in wei, the sender is willing to pay per gas.
- `maxPriorityFeePerGas`: (string) - Maximum fee, in wei, the sender is willing to pay per gas above the base fee.
- `paymasterAndData`: (string) - The address of the paymaster contract and the data that will be passed to it.
- `signature`: (string) - The signature data. For gas estimation, this can be a dummy signature.
- `eip7702Auth`: (object) [_optional_] - The EIP-7702 authorization data. This can be a dummy authorization
for estimations:
- `address`: (string) - The contract address for the authorization.
- `chainId`: (string) - The chain ID.
- `nonce`: (string) - The nonce.
- `r`: (string) - The r component of the signature.
- `s`: (string) - The s component of the signature.
- `v`: (string) - The v component of the signature.
- `yParity`: (string) - The y-parity value.

- `entryPoint`: (string) - The EntryPoint contract address (`0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789`).

- `stateOverrides`: (object) [_optional_] - State overrides to apply for the simulation. Each key is an address, and each value is an object that can contain:
- `balance`: (string) [_optional_] - The balance to set for the address.
- `nonce`: (string) [_optional_] - The nonce to set for the address.
- `code`: (string) [_optional_] - The code to set for the address.
- `state`: (object) [_optional_] - Complete state to set, where each key is a 32-byte hex storage slot and each value is a 32-byte hex value.
- `stateDiff`: (object) [_optional_] - State differences to apply, where each key is a 32-byte hex storage slot and each value is a 32-byte hex value.

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

<Tabs>
<TabItem value="curl without an override">

```bash
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateUserOperationGas",
"params": [
{
"sender": "0x5a6b47F4131bf1feAFA56A05573314BcF44C9149",
"nonce": "0x845adb2c711129d4f3966735ed98a9f09fc4ce5700000000000000000000",
"factory": "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
"factoryData": "0xc5265d5d000000000000000000000000aac5d4240af87249b3f71bc8e4a2cae074a3e419",
"callData": "0xe9ae5c5300000000000000000000000000000000000000000000000000000000000000000000000000",
"callGasLimit": "0x0",
"verificationGasLimit": "0x0",
"preVerificationGas": "0x0",
"maxFeePerGas": "0x7a5cf70d5",
"maxPriorityFeePerGas": "0x3b9aca00",
"paymaster": null,
"paymasterVerificationGasLimit": null,
"paymasterPostOpGasLimit": null,
"paymasterData": null,
"signature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
},
"0x0000000071727De22E5E9d8BAf0edAc6f37da032"
],
"id": 1
}'
```

</TabItem>
<TabItem value="curl with an override">

```bash
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateUserOperationGas",
"params": [
{
"sender": "0xa203fDb8bC335F86016F635b85389B62B189E417",
"nonce": "0x35bf2a054f92f3730b87582ef223c8d663f9eb01158154750000000000000000",
"factory": "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
"callData": "0xb61d27f6000000000000000000000000530fff22987e137e7c8d2adcc4c15eb45b4fa752",
"callGasLimit": "0x0",
"verificationGasLimit": "0x0",
"preVerificationGas": "0x0",
"maxPriorityFeePerGas": "0x12a05f200",
"maxFeePerGas": "0x5b08082fa",
"paymaster": null,
"paymasterVerificationGasLimit": null,
"paymasterPostOpGasLimit": null,
"paymasterData": null,
"signature": "0xa6cc6589c8bd561cfd68d7b6b0757ef6f208e7438782939938498eee7d703260137856c840c491b3d415956265e81bf5c2184a725be2abfc365f7536b6af525e1c"
},
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
{
"0xd9c9cd5f6779558b6e0ed4e6acf6b1947e7fa1f3": {
"balance": "0xde0b6b3a7640000"
},
"0xebe8efa441b9302a0d7eaecc277c09d20d684540": {
"stateDiff": {
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80": "0x21"
}
}
}
],
"id": 1
}'
```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

<Tabs>
<TabItem value="JSON">

```JSON
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"preVerificationGas": "0xd3e3",
"verificationGasLimit": "0x60b01",
"callGasLimit": "0x13880",
"paymasterVerificationGasLimit": "0x0",
"paymasterPostOpGasLimit": "0x0"
}
}
```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

**Type:** `Object`

An object containing the estimated gas values for the user operation.

<Tabs>
<TabItem value="v0.7" label="v0.7 and v0.8">

- `preVerificationGas`: (string) - The amount of gas to pay for to compensate the bundler for
pre-verification execution and `calldata`.
- `verificationGasLimit`: (string) - The amount of gas to allocate for the verification step.
- `callGasLimit`: (string) - The amount of gas to allocate the main execution call.
- `paymasterVerificationGasLimit`: (string) - The amount of gas to allocate for the verification step
of the paymaster, or `null` if no paymaster.
- `paymasterPostOpGasLimit`: (string) - The amount of gas to allocate for the post-operation step of
the paymaster, or `null` if no paymaster.

</TabItem>
<TabItem value="v0.6" label="v0.6">

- `preVerificationGas`: (string) - The amount of gas to pay for to compensate the bundler for
pre-verification execution and `calldata`.
- `verificationGas`: (string) - The amount of gas used for verification (legacy field from v0.6).
- `verificationGasLimit`: (string) - The amount of gas to allocate for the verification step.
- `callGasLimit`: (string) - The amount of gas to allocate the main execution call.

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js'

Fetches user operation details by providing its hash. If the user operation is not available, it
will return `null`. <CreditCost network="bundler" method="eth_getUserOperationByHash" />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace `<YOUR-API-KEY>` with an API key from your [MetaMask Developer dashboard](https://developer.metamask.io/).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `userOpHash`: (string) - The 32-byte hash of the user operation to retrieve.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

<Tabs>
<TabItem value="curl">

```bash
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUserOperationByHash",
"params": ["0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f"],
"id": 1
}'
```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

<Tabs>
<TabItem value="JSON">

```JSON
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"userOperation": {
"sender": "0x8C6bdb488F664EB98E12cB2671fE2389Cc227D33",
"nonce": "0x18554d9a95404c5e8ac591f8608a18f80000000000000000",
"initCode": "0xaee9762ce625e0a8f7b184670fb57c37bfe1d0f1296601cd000000000000000000000000417f5a41305ddc99d18b5e176521b468b2a31b86000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014c982ab3499d854fca39ff8326b27d3b8a9463c5d000000000000000000000000",
"callData": "0x519454470000000000000000000000008eb187a55b701f8990539bf219b7921d5d3bdadd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001647c7efe6b0000000000000000000000000000000000000000000000000000000000000080bfa0715290784075e564f966fffd9898ace1d7814f833780f62e59b0791357460000000000000000000000008c6bdb488f664eb98e12cb2671fe2389cc227d3300000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000007677265676f7279000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001b1ec8da9a52488e3f60b7b7af36c2e64f1873e03a047c2c2e9061bbef4d0a9d8f1332b32afb163075273cd462140c2a24b2c9e1276adfaae0b4cb84ef78b95e8a0000000000000000000000000000000000000000000000000000000065a32e4f00000000000000000000000000000000000000000000000000000000",
"callGasLimit": "0x39b2d",
"verificationGasLimit": "0x6fb14",
"preVerificationGas": "0xc6a0",
"maxFeePerGas": "0x974038caf",
"maxPriorityFeePerGas": "0x974038c95",
"paymasterAndData": "0xe3dc822d77f8ca7ac74c30b0dffea9fcdcaaa3210000000000000000000000000000000000000000000000000000000065a3229b00000000000000000000000000000000000000000000000000000000000000009c3e8f934f2ec99974fddae7d38107a6d899c236c1b127e97d3c074cea5bb328023e295bb95254be40c47b82633676f8716c43c81aca3f2e49c2944afd1326371b",
"signature": "0x000000003ea0a3434dfd35a9eb05c4605466a7e05a5c3fc8aaba066c83bf4b43300dfd930e2203725eafa2702f860e5b6c18b4402ffb86b0d9b9c1719f1692254039810b1b"
},
"entryPoint": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"transactionHash": "0x57465d20d634421008a167cfcfcde94847dba9d6b5d3652b071d4b84e5ce74ff",
"blockHash": "0xeaeec1eff4095bdcae44d86574cf1bf08b14b26be571b7c2290f32f9f250c103",
"blockNumber": "0x31de70e"
}
}
```

</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
An object containing the user operation information and transaction details, or `null` if the user
operation is not available. When available, the response object contains:

- `userOperation`: (object) - The user operation object containing:
- `sender`: (string) - The address of the account that initiated the user operation.
- `nonce`: (string) - The nonce used for the user operation.
- `initCode`: (string) - The initialization code for account creation.
- `callData`: (string) - The data to pass to the sender during the main execution call.
- `callGasLimit`: (string) - The amount of gas allocated for the main execution call.
- `verificationGasLimit`: (string) - The amount of gas allocated for the verification step.
- `preVerificationGas`: (string) - The amount of gas to compensate the bundler for pre-verification execution.
- `maxFeePerGas`: (string) - Maximum fee per gas, in wei, the sender is willing to pay per gas.
- `maxPriorityFeePerGas`: (string) - Maximum fee, in wei, the sender is willing to pay per gas above
the base fee.
- `paymasterAndData`: (string) - The paymaster address and data.
- `signature`: (string) - The signature data for the user operation.
- `entryPoint`: (string) - The EntryPoint contract address used.
- `transactionHash`: (string) - The hash of the transaction that included this user operation.
- `blockHash`: (string) - The hash of the block containing the transaction.
- `blockNumber`: (string) - The number of the block containing the transaction.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js'

Fetches the receipt of a user operation by providing its hash. If the receipt is not available, it
will return `null`. <CreditCost network="bundler" method="eth_getUserOperationReceipt" />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace `<YOUR-API-KEY>` with an API key from your [MetaMask Developer dashboard](https://developer.metamask.io/).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `userOpHash`: (string) - The 32-byte hash of the user operation for which to retrieve the receipt.
Loading
Loading