Skip to main content

/walletsolidity/estimateenergy REST API Endpoint

Estimate the energy required for the successful execution of smart contract transactions (Confirmed state).

Updated on
Oct 4, 2023

/walletsolidity/estimateenergy 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
integer
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
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_required
The estimated energy to run the contract
Request
1
curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy \
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": "balanceOf(address)",
9
"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",
10
"visible": true
11
}
12
'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free