Skip to content
BaseHub by wbnns Updated

eth_simulateV1

Simulates one or more transaction bundles against the current pre-confirmed Flashblock state. Supports state overrides, multi-block simulation, and optional transfer tracing.

A Base pre-confirmation method served on the standard public endpoints (https://mainnet.base.org / https://sepolia.base.org), which are all Flashblocks-enabled.

NameTypeRequiredDescription
simulationPayloadobjectYesThe simulation configuration.
blockParameterstringYesUse "pending" to simulate against the current Flashblock state.

The simulationPayload object accepts:

FieldTypeRequiredDescription
blockStateCallsarrayYesArray of block state call objects. Each object represents one simulated block.
traceTransfersbooleanNoIf true, ETH transfer events are included as logs in the result. Defaults to false.
validationbooleanNoIf true, transaction validation (nonce, balance) is enforced. Defaults to false.

Each entry in blockStateCalls accepts:

FieldTypeDescription
callsarrayArray of transaction call objects to simulate within this block.
stateOverridesobjectPer-address state overrides applied before simulation (for example, balance, nonce, code, storage). Optional.
blockOverridesobjectBlock-level overrides (for example, number, timestamp). Optional.

result is an array of simulated block results, one per entry in blockStateCalls. Each result is a full block object that embeds a calls array alongside the standard block fields:

FieldTypeDescription
numberstringSimulated block number (hex).
hashstringSimulated block hash.
parentHashstringParent block hash.
timestampstringBlock timestamp (hex).
gasLimitstringGas limit (hex).
gasUsedstringTotal gas used by the simulated calls (hex).
baseFeePerGasstringBase fee per gas (hex).
stateRootstringAlways "0x000...000", because simulation never commits state to the trie.
callsarrayArray of individual call results.

Each entry in calls has:

FieldTypeDescription
statusstring"0x1" for success, "0x0" for failure.
gasUsedstringGas used as a hexadecimal integer.
returnDatastringHex-encoded return data.
logsarrayLogs emitted (including ETH transfer logs if traceTransfers is true).
errorstringRevert reason if the call failed. Optional.
Terminal window
curl https://sepolia.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_simulateV1",
"params": [
{
"blockStateCalls": [
{
"calls": [{"to": "0x...", "data": "0x..."}],
"stateOverrides": {}
}
],
"traceTransfers": true,
"validation": true
},
"pending"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"baseFeePerGas": "0x0",
"blobGasUsed": "0x39d0",
"calls": [
{
"gasUsed": "0x5208",
"logs": [],
"returnData": "0x",
"status": "0x1"
}
],
"difficulty": "0x0",
"excessBlobGas": "0x0",
"extraData": "0x01000000640000000500000000004c4b40",
"gasLimit": "0x17d78400",
"gasUsed": "0x5208",
"hash": "0x2f2f692821995e39653f63164b2d5d0e0bba66c86c2a199fd3009c0b9906c7b0",
"logsBloom": "0x000...000",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x2c31c49",
"parentBeaconBlockRoot": "0x64e625f8bc74f78539f962aa09d522c63576ff6ad57170c668882d99e669ef52",
"parentHash": "0x9653660afa4fca3976a21d42ebf849c337e9840993f050fee3affc673a573bf8",
"receiptsRoot": "0xf78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efa",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x2a6",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x6a10957f",
"transactions": [
"0xa401668a06b038c488c1abc013676dfe63fc645d182ece34d8b3f40f45689279"
],
"transactionsRoot": "0x0b1328c457d7a8108ea9f2559142890491b680fdb691720b3d0c857c3d11002c",
"uncles": [],
"withdrawals": [],
"withdrawalsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
]
}