Parameters
-
Object- The transaction call object, The fields in the object include:Item Name Data Type Description fromDATA, 20 BytesCaller address, using TRON's hexadecimal address format with the 41prefix removed.toDATA, 20 BytesContract address, using TRON's hexadecimal address format with the 41prefix removed.gasQUANTITYNot supported in TRON; must be set to 0x0.gasPriceQUANTITYNot supported in TRON; must be set to 0x0.valueQUANTITY(Optional) Amount of TRX sent with the call (Unit: sun, Format: Hex). Maps to msg.valuefor simulation; no actual funds are transferred.dataDATAFunction selector along with ABI-encoded parameters. -
QUANTITY|TAG- Block number or block identifier; currently, only"latest"is supported.
Returns
DATA- The result returned from executing the contract function.
Example
Request
curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{
"from": "0xF0CC5A2A84CD0F68ED1667070934542D673ACBD8",
"to": "0x70082243784DCDF3042034E7B044D6D342A91360",
"gas": "0x0",
"gasPrice": "0x0",
"value": "0x0",
"data": "0x70a08231000000000000000000000041f0cc5a2a84cd0f68ed1667070934542d673acbd8"
}, "latest"],
"id": 1
}'Response
{"jsonrpc":"2.0","id":1,"result":"0x"}