HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
API Reference

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

FieldTypeDescription
runtimecodestringContract runtime code
smart_contractSmartContractSmart contract object, refer to GetContract
contract_stateContractStateContract state, refer to Dynamic energy model APIs
contract_state.energy_usageint64the total amount of basic energy usage of the contract in the current maintenance cycle
contract_state.energy_factorint64the energy factor of the contract
contract_state.update_cycleint64current maintenance cycle number
Language
Click Try It! to start a request and see the response here!