Pre-alphaWork in progress
Skip to content

eth_call ​

Executes a new message call immediately without creating a transaction on the block chain.

Ethereum specification · All supported methods

Parameters ​

Parameters are positional, in the order below.

ParameterTypeRequiredDescription
TransactionTransaction objectYesTransaction fields for the call.
BlockBlock number, tag, or EIP-1898 hash selectorNodefault: 'latest'. The state is the one after the block has been executed.

Transaction fields ​

FieldMeaning
fromSender address used during execution
toDestination address; omit for contract creation where supported
data or inputEncoded call data or contract creation code; use one field
valueValue transferred in wei, as a hexadecimal quantity
gasGas allowance for the simulation, as a hexadecimal quantity
gasPriceLegacy gas price in wei; use instead of EIP-1559 fee fields
maxFeePerGas, maxPriorityFeePerGasEIP-1559 fee limits in wei, where applicable
accessListAddresses and storage keys supplied for execution

Return value ​

The call’s return data as hexadecimal bytes. An execution revert returns an error rather than successful output.

Example ​

Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.

sh
curl -X POST "<gateway-url>/<service-url>" \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"},"latest"]}'

Illustrative response; values depend on the selected network and request:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x"
}

Direct behavior ​

State at the network head and its 128 preceding blocks is available through the recent service. Older state requests are automatically routed to providers with archive state.

Requests using latest follow Direct’s reference-block rules. The selected reference is preserved during recovery; separate requests can see a newer reference.

For providers ​

Support the recent-state window and the covered EIP-1898 selectors, including requireCanonical. Historical requests require verified archive state.

See provider qualification for checks and continued eligibility.

Unstoppable Infrastructure.