/walletsolidity/estimateenergy REST API Endpoint
Body Parameters
owner_address
string
REQUIRED
Loading...
contract_address
string
REQUIRED
Loading...
function_selector
integer
REQUIRED
Loading...
parameter
string
REQUIRED
Loading...
visible
boolean
Loading...
Returns
result
Loading...
result
Loading...
code
Loading...
message
Loading...
energy_required
Loading...
Request
curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", "function_selector": "balanceOf(address)", "parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", "visible": true } '
const url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy'; const headers = { 'accept': 'application/json', 'content-type': 'application/json' }; const data = { "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", "function_selector": "balanceOf(address)", "parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", "visible": true }; fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(data) }) .then(response => response.json()) .then(responseData => { console.log(responseData); }) .catch(error => { console.error('Error:', error); });
import requests import json url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbyid' headers = { 'Accept': 'application/json', 'Content-Type': 'application/json' } data = { "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", "function_selector": "balanceOf(address)", "parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", "visible": True } response = requests.post(url, headers=headers, data=json.dumps(data)) if response.status_code == 200: result = response.json() # Handle the response data print(result) else: # Handle any errors print('Request failed with status code', response.status_code) print(response.text)
require 'net/http' require 'json' require 'uri' endpoint = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy' headers = { 'accept' => 'application/json', 'content-type' => 'application/json' } data = { "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", "function_selector": "balanceOf(address)", "parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", "visible": true } http = Net::HTTP.new(api_url.host, api_url.port) request = Net::HTTP::Post.new(api_url.path, headers) request.body = data.to_json response = http.request(request) response_data = JSON.parse(response.body) puts response_data
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free