POSTGetContract

Tron Mainnethttps://tron-mainnet.nodit.io/wallet/getcontract

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

Request Body
valuestringrequired

The contract address. (Format: Base58 or hex). Example: TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs

visibleboolean

Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)

Responses
origin_addressstring

Address of the contract creator.

contract_addressstring

Contract address. (Format: Base58 or Hex)

bytecodestring

Bytecode of the smart contract.

call_valueinteger (int64)

Amount of TRX transferred into the contract at deployment. (Unit: sun)

consume_user_resource_percentint64 (int64)

Percentage of user Energy consumption for a smart contract. (Range: [0-100])

X-API-KEY
RequestCU30
cURL
curl -X POST "https://tron-mainnet.nodit.io/wallet/getcontract" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "value": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "visible": true
}'
Response
Example · 200
{
  "origin_address": "string",
  "contract_address": "string",
  "abi": {},
  "bytecode": "string",
  "call_value": 0
}