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

> TRON API method that calls a constant (read-only) smart contract method without consuming energy or bandwidth. TRON via Chainstack.

TRON API method that calls a constant (read-only) smart contract method without consuming energy or bandwidth. This method allows you to query contract state and call view functions without broadcasting a transaction to the blockchain.

## Parameters

* `owner_address` — (optional) address calling the contract method in hexadecimal format
* `contract_address` — smart contract address to call in hexadecimal format
* `function_selector` — function signature or selector (e.g., "balanceOf(address)")
* `parameter` — (optional) encoded parameters for the function call in hexadecimal format

## Response

* `result` — execution result object containing:
  * `result` — boolean indicating if the call was successful
* `energy_used` — estimated energy consumption if this were a real transaction
* `constant_result` — array of return values from the contract method in hexadecimal format
* `transaction` — transaction object that would be created (for reference, not executed)

## Use case

The `wallet/triggerconstantcontract` method is used for:

* Calling read-only smart contract methods to query blockchain state.
* Reading token balances, contract variables, and other view data without costs.
* Testing contract method calls before executing actual transactions.
* Building user interfaces that need to display current contract state.
* Implementing contract interaction tools that require state queries.
* Estimating energy costs for contract method calls before execution.


## OpenAPI

````yaml openapi/tron_node_api/triggerconstantcontract.json post /95e61622bf6a8af293978377718e3b77/wallet/triggerconstantcontract
openapi: 3.0.0
info:
  title: wallet/triggerconstantcontract TRON API
  version: 1.0.0
  description: Call a constant contract method without consuming resources (read-only)
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/triggerconstantcontract:
    post:
      tags:
        - Smart Contracts
      summary: wallet/triggerconstantcontract
      operationId: triggerConstantContract
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                owner_address:
                  type: string
                  description: Address calling the contract method in hex format
                contract_address:
                  type: string
                  description: Smart contract address in hex format
                function_selector:
                  type: string
                  description: Function selector (method signature) to call
                parameter:
                  type: string
                  description: Encoded parameters for the function call
              required:
                - contract_address
                - function_selector
              example:
                owner_address: 41b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b
                contract_address: 41a614f803b6fd780986a42c78ec9c7f77e6ded13c
                function_selector: balanceOf(address)
                parameter: 000000000000000000000000b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b
      responses:
        '200':
          description: Contract call result
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      result:
                        type: boolean
                        description: Whether the call was successful
                  energy_used:
                    type: number
                    description: Energy that would be consumed (for estimation)
                  constant_result:
                    type: array
                    description: Return values from the contract method call
                    items:
                      type: string
                  transaction:
                    type: object
                    description: Transaction object that would be created (not executed)

````