eth_call

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

Parameters

  • Object - An object of type Call
    • from:DATA, 20 Bytes - (optional) The address the transaction is sent from
    • to:DATA, 20 Bytes - The address the transaction is directed to
    • gas: QUANTITY - (optional) Integer of the gas provided for the transaction execution.
      eth_call consumes zero gas, but this parameter may be needed by some executions
    • gasPrice: QUANTITY - (optional) Integer of the gasPrice used for each paid gas
    • value: QUANTITY - (optional) Integer of the value sent with this transaction
    • data: DATA - (optional) Hash of the method signature and encoded parameters.
      For details see Ethereum Contract ABI
  • QAUANTITY|TAG - Integer block number or one of "earliest", "latest" or "pending"

Example

{
     "id": "1",
     "jsonrpc": "2.0",
     "method": "eth_call",
     "params": [
          {
               "to": "0x08a2e41fb99a7599725190b9c970ad3893fa33cf",
               "data": "0x18160ddd",
               "from": "0x08a2e41fb99a7599725190b9c970ad3893fa33cf",
               "gas": "0xfffff",
               "gasPrice": "0xfffff",
               "value": "0x123123"
          },
          "latest"
     ]
}

Returns

  • DATA - The return value of executed contract
Language
URL
Click Try It! to start a request and see the response here!