eth_call RPC Method

Runs a read-only message call against the current or specified block state without submitting a transaction.

Parameters#

objectrequired

Transaction call object containing the following properties:

fromstringoptional

Sender address for the call.

tostringoptional

Recipient address of the call.

gasstringoptional

Gas budget allocated for execution, hex-encoded.

maxFeePerGasstringoptional

Upper bound on the per-gas fee the caller will pay, hex-encoded.

maxPriorityFeePerGasstringoptional

Tip per unit of gas for the block producer, hex-encoded.

valuestringoptional

Amount of native token attached to the call, hex-encoded.

inputstringoptional

Contract bytecode or ABI-encoded function selector with arguments.

datastringoptional

Same as input — contract bytecode or ABI-encoded call data.

noncestringoptional

Caller nonce, hex-encoded.

chainIdstringoptional

Target chain identifier, hex-encoded.

accessListarrayoptional

EIP-2930 access list.

authorizationListarrayoptional

EIP-7702 authorization list.

stringrequired

Block identifier — a tag (latest, safe, finalized, pending) or a 32-byte block hash.

Result#

string - Hex-encoded bytes returned by the contract call.

Code sample#

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

Response#

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
Try It