Skip to main content
Executes a message call against the current chain state without broadcasting a transaction. No gas is consumed on-chain. Used to read contract state or simulate calls.

Parameters

transactionObject
object
required
The transaction call object.
blockParameter
string
required
Block number in hexadecimal, or a block tag: latest, earliest, pending, safe, or finalized.

Returns

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

Flashblocks Behavior

On a Flashblocks-aware endpoint, use "pending" as the block parameter to query preconfirmed state — data available up to 200ms before the next full block is sealed. Executes the call against the latest preconfirmed Flashblock state. Use "pending" to simulate against the most current chain state, including transactions not yet in a sealed block.
curl https://mainnet-preconf.base.org \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","data":"0x70a08231000000000000000000000000d3CdA913deB6f4967b2Ef66ae97DE114a83bcc01"},"pending"],"id":1}'

Example

{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "data": "0x70a082310000000000000000000000004200000000000000000000000000000000000006"
    },
    "latest"
  ],
  "id": 1
}

Errors

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