> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet/getcontract | TRON

> TRON API method that retrieves detailed information about a smart contract deployed on the TRON network. Chainstack TRON reference.

TRON API method that retrieves detailed information about a smart contract deployed on the TRON network. This method provides comprehensive contract data including bytecode, ABI, deployment information, and resource configuration.

## Parameters

* `value` — the smart contract address in hexadecimal format

## Response

* `bytecode` — compiled contract bytecode in hexadecimal format
* `name` — human-readable name of the smart contract
* `origin_address` — address of the account that deployed the contract
* `contract_address` — the contract's address in hexadecimal format
* `abi` — Application Binary Interface defining contract methods and events
* `origin_energy_limit` — maximum energy limit set during contract deployment
* `consume_user_resource_percent` — percentage of caller's resources used for contract execution (0-100)
* `code_hash` — unique hash identifier of the contract's bytecode
* `trx_hash` — transaction hash of the original contract deployment transaction

## Use case

The `wallet/getcontract` method is used for:

* Retrieving comprehensive information about deployed smart contracts.
* Obtaining contract ABI for building user interfaces and interaction tools.
* Analyzing contract resource configuration and deployment details.
* Verifying contract bytecode and comparing with expected implementations.
* Building block explorers and contract verification tools.
* Understanding contract resource consumption settings for optimization.


## OpenAPI

````yaml openapi/tron_node_api/getcontract.json post /95e61622bf6a8af293978377718e3b77/wallet/getcontract
openapi: 3.0.0
info:
  title: wallet/getcontract TRON API
  version: 1.0.0
  description: Get smart contract information by contract address
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getcontract:
    post:
      tags:
        - Smart Contracts
      summary: wallet/getcontract
      operationId: getContract
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
                  description: Contract address in hex format
              required:
                - value
              example:
                value: 41a614f803b6fd780986a42c78ec9c7f77e6ded13c
      responses:
        '200':
          description: Smart contract information
          content:
            application/json:
              schema:
                type: object
                properties:
                  bytecode:
                    type: string
                    description: Contract bytecode in hex format
                  name:
                    type: string
                    description: Contract name
                  origin_address:
                    type: string
                    description: Address that deployed the contract
                  contract_address:
                    type: string
                    description: Contract address in hex format
                  abi:
                    type: object
                    description: Contract ABI (Application Binary Interface)
                  origin_energy_limit:
                    type: number
                    description: Original energy limit set for the contract
                  consume_user_resource_percent:
                    type: number
                    description: Percentage of user resources consumed by contract calls
                  code_hash:
                    type: string
                    description: Hash of the contract code
                  trx_hash:
                    type: string
                    description: Transaction hash of the contract deployment

````