POSTeth_getCode

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

Returns the runtime bytecode deployed at a contract address. Querying a regular account returns 0x.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

It contains following parameters in order:

  1. address: The contract address to look up. (required)
  2. block: The block to query against. (required, currently only latest is supported)
params[0]string

A TRON account address. It is not a Base58 address but the 20-byte form obtained by removing the 41 prefix from the TRON hexadecimal address. (e.g.) TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t → 41a614f803b6fd780986a42c78ec9c7f77e6ded13c → 0xa614f803b6fd780986a42c78ec9c7f77e6ded13c

params[1]string

A TRON account address. It is not a Base58 address but the 20-byte form obtained by removing the 41 prefix from the TRON hexadecimal address. (e.g.) TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t → 41a614f803b6fd780986a42c78ec9c7f77e6ded13c → 0xa614f803b6fd780986a42c78ec9c7f77e6ded13c

Responses

No response body.

X-API-KEY
RequestCU30
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_getCode",
    "params": [
      "0xa614f803b6fd780986a42c78ec9c7f77e6ded13c",
      "latest"
    ]
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x"
}