Skip to main content

/wallet/triggersmartcontract REST API Endpoint

Returns TransactionExtention, which contains the unsigned Transaction.

Updated on
Oct 4, 2023

/wallet/triggersmartcontract REST API Endpoint

Body Parameters

owner_address
string
REQUIRED
The address that triggers the contract, converted to a hexString
contract_address
string
REQUIRED
The contract address, encoded in hexString
function_selector
string
REQUIRED
The function call. This field must not be left blank
parameter
string
REQUIRED
The parameter encoding needs to be in accordance with the ABI rules
fee_limit
integer
REQUIRED
The maximum TRX consumption, measured in SUN (1 TRX = 1,000,000 SUN)
call_value
integer
REQUIRED
The amount of TRX transferred with this transaction, measured in SUN
permission_id
integer
The ID of the permission that is required to execute the transaction
visible
boolean
A boolean value indicating whether the address is in base58 format

Returns

result
The result object with the following fields:
result
It is true if the estimate is successful, otherwise false
code
The response code
message
The result message
energy_used
The etimated energy consumption
constant_result
The result list of tiggered functions
transaction
The transaction object with the following field:
visible
A boolean value indicating whether the transaction was successful
txid
The transaction id
raw_data
An object that contains the transaction details with the following fields:
contract
An array of objects containing information about the delegate resource contract
parameter
An object containing the delegate resource contract parameters
value
An object containing the values of the delegate resource contract parameters
call_value
The amount of TRX passed into the contract
owner_address
The owner address of the exchange pair
contract_address
The contract address
data
The operating parameters
call_token_value
The amount of TRC-10 transferred into the contract
token_id
The TRC-10 token id
type_url
The URL of the freeze balance contract type
type
The type of the freeze balance contract
ref_block_bytes
The ref block bytes of the transaction
ref_block_hash
The ref block hash of the transaction
expiration
This is a timestamp indicating the expiration time of the transaction in milliseconds
timestamp
This is a timestamp indicating the time at which the transaction was created in milliseconds
raw_data_hex
The hexadecimal representation of the raw data in the transactio
Request
1
curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/triggersmartcontract \
2
--header 'accept: application/json' \
3
--header 'content-type: application/json' \
4
--data '
5
{
6
"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
7
"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",
8
"function_selector": "transfer(address,uint256)",
9
"parameter": "00000000000000000000004115208EF33A926919ED270E2FA61367B2DA3753DA0000000000000000000000000000000000000000000000000000000000000032",
10
"fee_limit": 1000000000,
11
"call_value": 0,
12
"visible": true
13
}
14
'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free