GetContractInfo
POST
Queries a contract's information from the blockchain. The difference from the
wallet/getcontract interface is that this interface returns not only the bytecode but also the runtime bytecode of the contract. Compared with bytecode, runtime bytecode does not contain constructor and constructor parameter information.Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.Request Body
valuestring
Contract address (format: Base58 or Hex).Example: TG3XXyExBkPp9nzdajDZsozEu4BkaSJozsvisibleboolean
Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)Responses
runtimecodestring
Runtime bytecode of the contract.smart_contractobject
Smart contract object. See GetContract for fields.State of the contract. See Resource model APIs for details.
energy_usageinteger
Total basic energy usage of the contract in the current maintenance cycle.energy_factorinteger
Energy factor of the contract.update_cycleinteger
Current maintenance cycle number.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "400"}
cURL
curl -X POST 'https://tron-mainnet.nodit.io/wallet/getcontractinfo' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"value": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs"}'