Tron Read Contract
tron_read_contractRead-only (constant) call against any TRON contract, executed via external RPC. TRC-20 helpers balanceOf / allowance / decimals / symbol / name / totalSupply are built in; any other function can be called with a raw selector plus ABI-encoded parameter. No state is changed and no key is involved. When to use: an agent needs an on-chain value without trusting a third-party API - USDT balance of an address, token decimals, an allowance, or any view function. Do not use: to send a transaction (this never writes), or to look up a historical balance. Returns: ok, contract, function, output_type, value (decoded), value_human for 6-decimal tokens, raw, energy_used.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contract": "<contract>",
"function": "<function>"
},
"name": "tron_read_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| argument | No | TRON address argument (for balanceOf / allowance) | |
| contract | Yes | Contract address (base58 or 41-hex) | |
| function | Yes | balanceOf | allowance | decimals | symbol | name | totalSupply, or a raw selector like 'foo(uint256)' | |
| argument2 | No | Second address argument (for allowance) | |
| parameter | No | Raw ABI-encoded parameter hex, for raw selectors | |
| output_type | No |