---
title: "getcontract"
method: POST
path: "/node/v1/tron/mainnet/{apiKey}/wallet/getcontract"
---

# getcontract

`POST /node/v1/tron/mainnet/{apiKey}/wallet/getcontract`

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

## Path parameters

- `apiKey` string, required

## Request body

- object
  - `value` string, required
  - `visible` boolean, required

## Response `200`

200

- object
  - `origin_address` string — Contract creator address
  - `contract_address` string — Contract address
  - `code_hash` string — code hash
  - `origin_energy_limit` integer — Each transaction is allowed to consume the maximum energy of the contract creator, the unit is sun
  - `abi` object — ABI
  - `name` string — contract name
  - `consume_user_resource_percent` integer — Proportion of user energy consumption
  - `bytecode` string — Bytecode
  - `call_value` integer — The amount of TRX passed into the contract when deploying the contract

---

[API](https://skmtc.net/zan/apis/zan-getnftmetadata.md) · [All operations](https://skmtc.net/zan/apis/zan-getnftmetadata/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zan/zan-getnftmetadata/versions/be8fa2338895/schema)
