ТарифыGitHubКабинет

TRON

wallet/getcontractinfoКредиты: 25

Returns a smart contract with its runtime code and energy state.

Сеть: tron

Параметры

ИмяТипОписание
valuestringContract address (base58 or hex).
visiblebooleantrue = base58 addresses (in the request and the response); false (default) = hex addresses. (необязательно)

Результат

Тип

Object

Object with smart_contract (origin_address, contract_address, abi, bytecode, call_value, consume_user_resource_percent, name, origin_energy_limit, code_hash, trx_hash, version), runtimecode (on-chain bytecode without constructor data) and contract_state (energy_usage, energy_factor, update_cycle). {} when the address is not a contract.

Примеры кода

curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/getcontractinfo' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "value": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "visible": true
}'