triggerconstantcontract
https://triport.io/rpc/tron/wallet/triggerconstantcontractExecutes a read-only native Tron contract call without broadcasting a transaction.
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_addressstringrequiredcontract_addressstringrequiredfunction_selectorstringrequiredtotalSupply().parameterstringoptional0x prefix.visiblebooleanoptionalfalse; 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.
responseobjectErrors
Wallet failures use HTTP status plus JSON. See Tron errors.
| HTTP | Meaning | When it happens |
|---|---|---|
400 | Bad request | A required field is missing or an address/parameter is malformed. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The scope or tier does not permit the request. |
429 | Rate limited | The 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
0xinparameter; the schema accepts bare hexadecimal only. - Related:
eth_call.