Skip to main content

Documentation Index

Fetch the complete documentation index at: https://base-a060aa97-mux-base-docs-codex-moly1dzt.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Executes a message call immediately without broadcasting a transaction to the network. No gas is consumed on-chain. Used to read contract state or simulate calls.
Flashblocks: Query https://mainnet-preconf.base.org with "pending" to simulate against the current pre-confirmed block state, updated every ~200ms.
eth_call "pending" block context on Flashblocks nodes: Block-context properties (block.number, block.timestamp, block.basefee) may reflect a block several behind tip because Flashblocks-aware nodes keep historical Flashblocks state to tolerate propagation differences. The call result still reflects received Flashblocks state applied on top of that base context, but contracts that depend on block context properties should account for this behavior.

Parameters

transaction
object
required
The transaction call object.
block
string
required
Block number in hex, or "latest", "pending", "safe", "finalized", "earliest". Use "pending" on a Flashblocks endpoint to call against pre-confirmed state.

Returns

result
string
The return value of the call as a hex-encoded byte array.

Error Codes

CodeMessageDescription
-32000execution revertedThe call reverted. The data field in the error object contains the ABI-encoded revert reason when available.

Example

curl https://mainnet.base.org \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
      {
        "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "data": "0x70a082310000000000000000000000004200000000000000000000000000000000000006"
      },
      "latest"
    ],
    "id": 1
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
}