JSON-RPCMethods

eth_call: parameters, returns and CU

Execute a read-only call against block state and return the result.

Summary

Execute a read-only call against the state of a given block and return its result.

Compute units (CU) and pricing

CU per call

15 CU

Price per 1M calls (USD)

$1.50

Parameters

ParameterTypeDescription
transactionobjectCall object with to (the address being called) and optional from, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, value and data/input. Quantity fields value, gas, gasPrice, maxFeePerGas and maxPriorityFeePerGas encode nonnegative integers minimally in hex: 0x0 is zero and 0x1 is one; 0x, 0x00 and 0x01 are not valid Quantity. data/input is complete-bytes Data: 0x is empty, 0x00 is one zero byte, 0x0001 is two bytes, and leading zeros in Data must be preserved. Never treat addresses, hashes, signatures or arbitrary 0x fields as Quantity.
blockParameterQUANTITY|TAGOptional block number or tag the call runs against: latest or pending; safe, finalized and earliest return -32011 (not billed); defaults to the latest block.

Returns

  • Type: DATA
  • Description: Call return data, usually ABI-encoded, as 0x-prefixed hex; 0x when there is no return value.

Notes

The call is read-only: it creates no transaction and changes no state, and a revert normally surfaces as an error.

Request example

export BLOCKVECTRA_API_KEY=rgw_your_api_key

curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $BLOCKVECTRA_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
      {
        "to": "0x0000000000000000000000000000000000000000",
        "data": "0x"
      },
      "latest"
    ],
    "id": 1
  }'

Supported chains

Available on all 29 supported chains.

Last updated: