Skip to main content

/wallet/getcontractinfo REST API Endpoint

Returns contract's information from the blockchain.

Updated on
Oct 4, 2023

/wallet/getcontractinfo REST API Endpoint

Body Parameters

value
string
REQUIRED
The contract address, encoded in hexString
visible
boolean
A boolean value indicating whether the address is in base58 format

Returns

runtimecode
The contract runtime code
smart_contract
The smart_contract object with the following fields:
bytecode
The compiled bytecode of the contract
name
The name of the contract
origin_address
The address of the account that created the contract
abi
The Application Binary Interface (ABI) of the contract, which specifies the methods and events of the contract
entrys
An array of objects containing information about the methods and events of the contract
stateMutability
The state mutability of the method (e.g. pure, view, nonpayable, payable)
type
The type of the method (e.g. function, event, constructor, fallback)
name
The name of the method or event
constant
A boolean value indicating whether the method is a constant (read-only) function
inputs
An array of objects containing information about the parameters of the method
indexed
A boolean value indicating whether the parameter is indexed (for events)
name
The name of the parameter
type
The type of the parameter
output
An array of objects containing information about the return values of the method
type
The type of the return value
origin_energy_limit
The maximum energy limit for executing the contract
contract_address
The address of the deployed contract
code_hash
The hash of the contract's bytecode
contract_state
The contrat state object with the following fields:
update_cycle
The current maintenance cycle number
energy_usage
The total amount of basic energy usage of the contract in the current maintenance cycle
energy_factor
The energy factor of the contract
Request
1
curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/getcontractinfo \
2
--header 'accept: application/json' \
3
--header 'content-type: application/json' \
4
--data '
5
{
6
"value": "TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8",
7
"visible": true
8
}
9
'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free