TriportRPC

triggerconstantcontract

POSThttps://triport.io/rpc/tron/wallet/triggerconstantcontract

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

Tron mainnettron:rpcfree+; tron_read_rpc_heavy: 2 / 5 / 20 / 80 RPS (free / basic / pro / business; default, unmeasured)

triggerconstantcontract executes a constant contract function through the native wallet interface. It is read-only and does not create or broadcast 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 concrete response example is unknown: the OpenAPI contract publishes no response example or execution-result fields. {} is a schema-valid placeholder, not evidence that the sample call succeeded.

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.