> ## 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/getcontractinfo | TRON

> TRON API method that retrieves detailed information about a smart contract, including its ABI, bytecode, source code, and metadata.

TRON API method that retrieves detailed information about a smart contract, including its ABI, bytecode, source code, and metadata. This method is essential for understanding and interacting with deployed contracts on the TRON network.

## Parameters

* `value` — contract address to retrieve information for
* `visible` — boolean indicating whether to use visible (Base58) address format instead of hex

## Response

* `contract_address` — the contract address
* `bytecode` — contract bytecode in hex format
* `name` — contract name if available
* `abi` — Application Binary Interface defining contract functions and events
* `source_map` — source code mapping for debugging purposes
* `source_code` — original contract source code if available
* `compiler_version` — Solidity compiler version used
* `consume_user_resource_percent` — percentage of user resources consumed
* `origin_address` — address that deployed the contract
* `origin_energy_limit` — energy limit set by contract creator
* `contract_state` — current state of the contract
* `code_hash` — hash of the contract code

## Use case

The `wallet/getcontractinfo` method is used for:

* Retrieving contract ABI for building function calls and parsing events.
* Verifying contract source code and understanding contract functionality.
* Building contract explorers and analysis tools for developers.
* Debugging contract deployments and understanding energy consumption settings.
* Implementing contract interaction interfaces in wallets and dApps.
* Auditing smart contracts and understanding their implementation details.


## OpenAPI

````yaml openapi/tron_node_api/getcontractinfo.json post /95e61622bf6a8af293978377718e3b77/wallet/getcontractinfo
openapi: 3.0.0
info:
  title: wallet/getcontractinfo TRON API
  version: 1.0.0
  description: Get detailed contract information including ABI
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getcontractinfo:
    post:
      tags:
        - Smart Contracts
      summary: wallet/getcontractinfo
      operationId: getContractInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
                  description: Contract address to get information for
                visible:
                  type: boolean
                  description: Whether to use visible (Base58) address format
              required:
                - value
              example:
                value: TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs
                visible: true
      responses:
        '200':
          description: Detailed contract information
          content:
            application/json:
              schema:
                type: object
                properties:
                  contract_address:
                    type: string
                    description: The contract address
                  bytecode:
                    type: string
                    description: Contract bytecode in hex format
                  name:
                    type: string
                    description: Contract name if available
                  abi:
                    type: object
                    description: Application Binary Interface
                  source_map:
                    type: string
                    description: Source code mapping for debugging
                  source_code:
                    type: string
                    description: Original contract source code
                  compiler_version:
                    type: string
                    description: Solidity compiler version used
                  consume_user_resource_percent:
                    type: number
                    description: Percentage of user resources consumed
                  origin_address:
                    type: string
                    description: Address that deployed the contract
                  origin_energy_limit:
                    type: number
                    description: Energy limit set by contract creator
                  contract_state:
                    type: string
                    description: Current state of the contract
                  code_hash:
                    type: string
                    description: Hash of the contract code

````