POSTeth_call

Tron Mainnethttps://tron-mainnet.nodit.io/

Executes a contract function immediately in a read-only manner. It does not create a transaction on the chain. It is functionally equivalent to triggerConstantContract of the FullNode HTTP API.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

It contains following parameters in order:

  1. callObject: The call information, as an object. (required)
  2. block: The block to query against. (required)
    • The string form supports only latest.
    • The object form may specify blockNumber or blockHash. The node only verifies that the referenced block exists, and execution always runs against the latest state.
params[0]object
fromstring

The caller address. Pass it in the TRON hexadecimal address form with the 41 prefix removed.

tostring

The contract address. Pass it in the TRON hexadecimal address form with the 41 prefix removed.

gasstring

Retained for Ethereum compatibility. It is not used by the TRON implementation.

gasPricestring

Retained for Ethereum compatibility. It is not used by the TRON implementation.

valuestring

The amount of TRX sent with the call, in sun, passed in hexadecimal. It maps to msg.value during simulation; no actual funds are transferred.

datastring

The function selector and the ABI-encoded parameters.

inputstring

An alias for data. When both are given, this value takes precedence. When a value is given, it requires a 0x prefix and an even number of hex digits; an empty string means empty bytes.

params[1]oneOf
oneOf

The block to query against. The string form supports only latest, and earliest, pending, finalized and safe cannot be used. In the object form, if both blockNumber and blockHash are given, blockNumber takes precedence.

string (enum)

Executes against the latest block.

Responses

응답 본문이 없습니다.

X-API-KEY
RequestCU23
cURL
curl -X POST "https://tron-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "from": "0xf0cc5a2a84cd0f68ed1667070934542d673acbd8",
      "to": "0x70082243784dcdf3042034e7b044d6d342a91360",
      "gas": "0x0",
      "gasPrice": "0x0",
      "value": "0x0",
      "data": "0x70a08231000000000000000000000041f0cc5a2a84cd0f68ed1667070934542d673acbd8"
    },
    "latest"
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x"
}