eth_call

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

Parameters

  1. Object - The transaction call object, the items in it as below.
Item NameData TypeDescription
fromDATA, 20 BytesCaller address. Hex format address, remove the prefix "41"
toDATA, 20 BytesContract address. Hex format address, remove the prefix "41"
gasQUANTITYNot supported. The value is 0x0
gasPriceQUANTITYNot supported. The value is 0x0
valueQUANTITYNot supported. The value is 0x0
dataDATAHash of the method signature and encoded parameters.
  1. QUANTITY|TAG - currently, only "latest" is available.

Returns

DATA - the return value of executed contract function.

Example

curl -X POST '47.95.206.44:50545/jsonrpc' --data '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [{
        "from": "0xF0CC5A2A84CD0F68ED1667070934542D673ACBD8",
        "to": "0x70082243784DCDF3042034E7B044D6D342A91360",
        "gas": "0x0",
        "gasPrice": "0x0",
        "value": "0x0",
        "data": "0x70a08231000000000000000000000041f0cc5a2a84cd0f68ed1667070934542d673acbd8"
    }, "latest"],
    "id": 1
}'

Result

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