Skip to main content

/wallet/getcontract REST API Endpoint

Returns a contract's information from the blockchain, including the bytecode of the contract, ABI, configuration parameters, etc.

Updated on
Oct 4, 2023

/wallet/getcontract 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

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
Request
1
curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/getcontract \
2
--header 'accept: application/json' \
3
--header 'content-type: application/json' \
4
--data '
5
{
6
"value": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",
7
"visible": true
8
}
9
'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free