curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/triggerconstantcontract \
--header 'Content-Type: application/json' \
--data '{
"owner_address": "41b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
"function_selector": "balanceOf(address)",
"parameter": "000000000000000000000000b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b"
}'
{
"result": {
"result": true
},
"energy_used": 123,
"constant_result": [
"<string>"
],
"transaction": {}
}
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/triggerconstantcontract \
--header 'Content-Type: application/json' \
--data '{
"owner_address": "41b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
"function_selector": "balanceOf(address)",
"parameter": "000000000000000000000000b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b"
}'
{
"result": {
"result": true
},
"energy_used": 123,
"constant_result": [
"<string>"
],
"transaction": {}
}
owner_address
— (optional) address calling the contract method in hexadecimal formatcontract_address
— smart contract address to call in hexadecimal formatfunction_selector
— function signature or selector (e.g., “balanceOf(address)”)parameter
— (optional) encoded parameters for the function call in hexadecimal formatresult
— execution result object containing:
result
— boolean indicating if the call was successfulenergy_used
— estimated energy consumption if this were a real transactionconstant_result
— array of return values from the contract method in hexadecimal formattransaction
— transaction object that would be created (for reference, not executed)wallet/triggerconstantcontract
method is used for:
Contract call result
The response is of type object
.
Was this page helpful?