triggerconstantcontract — Tron Wallet API

Executes a read-only native Tron contract call without broadcasting a transaction.

POSThttps://triport.io/rpc/tron/wallet/triggerconstantcontract
Network
Tron mainnet
Scope
tron:rpc
Auth
x-token: $TRIPORT_API_KEY
Rate limit
free+; tron_read_rpc_heavy: 2 / 5 / 20 / 80 RPS sustained · short burst 4 / 10 / 40 / 160 (free / basic / pro / business; default, unmeasured); Burst capacity

Endpoint and plans: Tron RPC endpoint.

triggerconstantcontract simulates a contract function through the native wallet interface. It can query a view function or simulate a state-changing function such as transfer(address,uint256) without committing changes or broadcasting a transaction. The function is identified by its Solidity signature, with optional ABI-encoded arguments supplied separately.

Both address fields use hex-41 by default; all addresses must be Base58 when visible is true. For a raw EVM call object and ABI-encoded return bytes, use eth_call. A successful HTTP status does not by itself prove that contract execution succeeded.

Parameters

The JSON body defines the caller, target, function, and optional arguments.

owner_addressstringrequired
Caller address in hex-41 form by default.
contract_addressstringrequired
Target contract address in hex-41 form by default.
function_selectorstringrequired
Non-empty Solidity signature such as totalSupply().
parameterstringoptional
ABI-encoded arguments as hexadecimal without a 0x prefix.
visiblebooleanoptional
Defaults to false; set true only when every address is Base58.

Response

The OpenAPI contract publishes no response example or closed set of execution-result fields. {} is a schema-valid placeholder, not evidence that the sample call succeeded. The dated observation below documents a response subset separately from that schema.

responseobject
Native constant-call result; properties are not enumerated by the schema.

Errors

Wallet failures use HTTP status plus JSON. See Tron errors.

HTTPMeaningWhen it happens
400Bad requestA required field is missing or an address/parameter is malformed.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe scope or tier does not permit the request.
429Rate limitedThe tron_read_rpc_heavy budget is exceeded.

Contract execution can also report a revert inside a successful HTTP response; inspect the returned operation-specific object rather than checking HTTP alone.

Examples

const body = {
  owner_address: "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
  contract_address: "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
  function_selector: "totalSupply()",
};
const response = await fetch("https://triport.io/rpc/tron/wallet/triggerconstantcontract", {
  method: "POST",
  headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify(body),
});
const callResult = await response.json();

Notes

  • This operation is read-only; no broadcast endpoint is part of this guide.
  • Do not include 0x in parameter; the schema accepts bare hexadecimal only.
  • Related: eth_call.
  • A TRC-20 balanceOf that returns zero is usually a parameter-encoding issue; see why a TRC-20 balanceOf call returns zero.