EVM RPC API
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
Parameters
Object
- An object of type Callfrom
:DATA
, 20 Bytes - (optional) The address the transaction is sent fromto
:DATA
, 20 Bytes - The address the transaction is directed togas
:QUANTITY
- (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executionsgasPrice
:QUANTITY
- (optional) Integer of the gasPrice used for each paid gasvalue
:QUANTITY
- (optional) Integer of the value sent with this transactiondata
: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
POST
https://{network}.s.chainbase.online/v1
/
{api-key}
Path Parameters
api-key
string
requiredBody
application/json
id
integer
default: 1requiredjsonrpc
string
default: 2.0requiredmethod
string
default: eth_callrequiredparams
any[]
requiredResponse
200 - application/json
id
integer
requiredjsonrpc
string
requiredresult
string
required