call_contract
Execute state-changing functions on TRON smart contracts with automatic resource estimation. Acquires missing energy and bandwidth via Merx to complete on-chain transactions.
Instructions
Execute a state-changing smart contract function. Estimates resources, buys via Merx if needed. Requires TRON_PRIVATE_KEY and TRON_ADDRESS.
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_address": "<contract_address>",
"function_selector": "<function_selector>"
},
"name": "call_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contract_address | Yes | Contract TRON address. | |
| function_selector | Yes | Function signature, e.g. "stake(uint256)". | |
| parameter | No | ABI-encoded parameter hex (optional). | |
| call_value_trx | No | TRX to send with call (optional). |