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

# triggerconstantcontract

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

Invoke the readonly function (modified by the view or pure modifier) of a contract for contract data query; or Invoke the non-readonly function of a contract for predicting whether the transaction can be successfully executed and estimating the energy consumption; or estimate the energy consumption of contract deployment

## Path parameters

- `apiKey` string, required

## Request body

- object
  - `owner_address` string, required — Owner address that triggers the contract. If visible=true, use base58check format, otherwise use hex format. For constant call you can use the all-zero address.
  - `contract_address` string, required — Smart contract address. If visible=true, use base58check format, otherwise use hex format.
  - `function_selector` string — Function call, must not be left blank.
  - `parameter` string — Parameter encoding needs to be in accordance with the ABI rules, the rules are more complicated, users can use the ethers library to encode,For details, please refer to the document-Guide-Smart Contract-Best Practice-Parameter Encoding and Decoding.
  - `visible` boolean, required — Optional.Whehter the address is in base58 format.

## Response `200`

200

- object
  - `result` object
    - `result` boolean
  - `energy_used` integer — Estimated energy consumption, including the basic energy consumption and penalty energy consumption
  - `energy_penalty` integer — The penalty energy consumption
  - `constant_result` string[] — Result list
  - `transaction` object — Transaction information

---

[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)
