For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_simulateV1 - Ethereum

Example code for the eth_simulateV1 JSON RPC method. Сomplete guide on how to use eth_simulateV1 JSON RPC in GetBlock Web3 documentation.

This method simulates a bundle of transactions against a specific block state and returns per-transaction execution results including gas used, return data, and event logs. Unlike eth_call (single message call) or eth_estimateGas (single-transaction gas), it simulates chained transactions in a single call. Used heavily by wallets, MEV searchers, and bundlers to preview complex multi-step operations before submission.

Parameters

Parameter
Type
Required
Description

payload

object

Yes

Simulation payload (see below)

blockParameter

string

Yes

Block state to simulate against — hex block number, or latest, finalized, safe

Payload Object

Field
Type
Required
Description

blockStateCalls

array of object

Yes

Ordered list of block simulations, each containing transactions to execute

traceTransfers

boolean

No

If true, emit synthetic Transfer events for ETH movements

validation

boolean

No

If true, apply signature and nonce validation (defaults to false)

returnFullTransactions

boolean

No

If true, return full transaction objects in the response

Block State Call Object

Field
Type
Required
Description

blockOverrides

object

No

Overrides for block-level fields (number, time, baseFeePerGas, etc.)

stateOverrides

object

No

Overrides for account state (balance, nonce, code, storage)

calls

array of object

Yes

Transactions to execute in this simulated block (same shape as eth_call transaction object)

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_simulateV1",
    "params": [
        {
            "blockStateCalls": [
                {
                    "calls": [
                        {
                            "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
                            "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
                            "data": "0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045"
                        }
                    ]
                }
            ],
            "validation": false,
            "traceTransfers": true
        },
        "latest"
    ],
    "id": "getblock.io"
}'

Response

Response Parameters

Parameter
Type
Description

jsonrpc

string

JSON-RPC protocol version ("2.0")

id

string

Request identifier matching the request

result

array of object

Simulated blocks, one per blockStateCall entry

result[].number

string

Simulated block number (hex)

result[].hash

string

Simulated block hash

result[].timestamp

string

Simulated block timestamp

result[].gasUsed

string

Total gas consumed by all calls in this simulated block

result[].baseFeePerGas

string

Base fee per gas for this simulated block

result[].calls

array of object

Per-call execution results

result[].calls[].status

string

0x1 = success, 0x0 = reverted

result[].calls[].returnData

string

Hex-encoded return data (or revert reason for reverted calls)

result[].calls[].gasUsed

string

Gas consumed by this call

result[].calls[].logs

array of object

Event logs emitted during this call

Use Cases

  • Multi-Step Transaction Preview: Preview the outcome of a swap, approve+swap, or multi-hop DeFi operation before broadcasting

  • MEV Bundle Simulation: Simulate an entire MEV bundle to verify profitability and behavior before submission to a builder

  • Wallet UX Preview: Show users a rich 'this is what will happen' preview covering multiple contract interactions

  • Account Abstraction Preflight: ERC-4337 bundlers and paymasters simulate UserOperations before submission

  • What-If Analysis: State-overrides enable simulating actions with hypothetical account balances or contract code

Error Handling

Error Code
Message
Description

-32602

Invalid params

Payload structure is malformed or a call object is invalid

3

Execution reverted

One or more simulated calls reverted (individual calls[].status = "0x0" also indicates per-call reverts)

-32000

Execution error

Node failed to simulate the payload

Web3 Integration

Was this helpful?