post https://api.shasta.trongrid.io/wallet/getcontractinfo
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.
Returns
| Field | Type | Description |
|---|---|---|
| runtimecode | string | Contract runtime code |
| smart_contract | SmartContract | Smart contract object, refer to GetContract |
| contract_state | ContractState | Contract state, refer to Dynamic energy model APIs |
| contract_state.energy_usage | int64 | the total amount of basic energy usage of the contract in the current maintenance cycle |
| contract_state.energy_factor | int64 | the energy factor of the contract |
| contract_state.update_cycle | int64 | current maintenance cycle number |