write_contract
Execute state-changing functions on a TRON smart contract with a configured wallet. Call contract methods, pass arguments, and send TRX value to write transactions on mainnet or other networks.
Instructions
Execute state-changing functions on a smart contract. Requires configured wallet.
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": {
"contractAddress": "<contractAddress>",
"functionName": "<functionName>"
},
"name": "write_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | No | Optional contract ABI array. If not provided, will fetch from chain. Use for contracts with incomplete on-chain ABI. | |
| args | No | Function arguments (supports arrays and objects for complex types) | |
| value | No | TRX value to send (in Sun) | |
| network | No | Network name. Defaults to mainnet. | |
| functionName | Yes | Function name to call | |
| contractAddress | Yes | The contract address |