POST triggersmartcontract
/wallet/triggersmartcontract
This is a standard Tron Protocol endpoint. This RPC call is usually used to create smart contract execution transaction via Tron node. When this method called via Transatron, it also provides an estimate of how much would transaction cost for user. Along with standard transaction object returned by the Tron node, Transatron injects transatron
object into response with estimation parameters. Please check this object structure here
In this call tx_fee_rtrx_account
, tx_fee_rusdt_account
, tx_fee_rtrx_instant
and tx_fee_rusdt_instant
parameters provide estimated values of a transaction fee for different types of payment.
Parameters user_account_balance_rtrx
and user_account_balance_rusdt
provide current balance in TRN (former RTRX) or TFU (former USDT).
Parameter code
provides understanding of will the transaction be covered if broadcasted, while message
gives the reason if not.
Example of request
{
"contract_address": "41<..........>13c",
"owner_address": "412<..........>daa",
"function_selector": "transfer(address,uint256)",
"parameter": "0000000000000<..........>00000000000000002710",
"call_value": 0,
"fee_limit": 27300000
}
Example of response
{
"result": {
"result": true
},
"transatron": {
"code": "LIMIT_EXCEED",
"message": "4461696c<..........>5366851682e",
"tx_fee_rtrx": 13773500,
"tx_fee_rtrx_account": 0,
"tx_fee_rusdt_account": 0,
"tx_fee_rtrx_instant": 13296500,
"tx_fee_rusdt_instant": 4187933,
"user_account_balance_rusdt": 0,
"user_account_balance_rtrx": 0
},
"transaction": {
"visible": false,
"txID": "acb<..........>9bc9",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"data": "a9059cbb000<..........>680",
"owner_address": "41<..........>e9",
"contract_address": "41a<..........>13c"
},
"type_url": "type.googleapis.com/protocol.TriggerSmartContract"
},
"type": "TriggerSmartContract"
}
],
"ref_block_bytes": "e<..........>b",
"ref_block_hash": "59b<..........>a1e",
"expiration": 1709141757000,
"timestamp": 1709141698029
},
"raw_data_hex": "0a02<..........>86df31"
}
}