/walletsolidity/estimateenergy REST API Endpoint
身體參數
owner_address
字串
必填
載入中...
contract_address
字串
必填
載入中...
function_selector
整數
必填
載入中...
parameter
字串
必填
載入中...
visible
布林值
載入中...
退貨
結果
載入中...
結果
載入中...
程式碼
載入中...
訊息
載入中...
energy_required
載入中...
請求
1curl 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": true11}12'
1curl 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": true11}12'
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy';2const 標頭 = {3'accept': 'application/json',4'content-type': 'application/json'5};6const data = {7"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",8"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",9"function_selector": "balanceOf(address)",10"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",11"visible": true12};1314取得(url, {15方法: 'POST',16標題: 標頭:,17body: JSON.stringify(data)18})19.接著(回應 => response.json())20.then(responseData => {21console.log(responseData);22})23.catchcatch(錯誤 => {24console.error('Error:', error);25});
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy';2const 標頭 = {3'accept': 'application/json',4'content-type': 'application/json'5};6const data = {7"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",8"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",9"function_selector": "balanceOf(address)",10"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",11"visible": true12};1314取得(url, {15方法: 'POST',16標題: 標頭:,17body: JSON.stringify(data)18})19.接著(回應 => response.json())20.then(responseData => {21console.log(responseData);22})23.catchcatch(錯誤 => {24console.error('Error:', error);25});
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbyid'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",11"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",12"function_selector": "balanceOf(address)",13"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",14"visible": True15}161718回應 = 請求.POST(url, 標頭=headers, data=json.dumps(data))19if response.status_code == 200:20result = response.json()21# Handle the response data22print(result)23else:24# Handle any errors25print('Request failed with status code', response.status_code)26print(response.text)27
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbyid'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",11"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",12"function_selector": "balanceOf(address)",13"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",14"visible": True15}161718回應 = 請求.POST(url, 標頭=headers, data=json.dumps(data))19if response.status_code == 200:20result = response.json()21# Handle the response data22print(result)23else:24# Handle any errors25print('Request failed with status code', response.status_code)26print(response.text)27
1需要 'net/http'2require 'json'3需要 'uri'45endpoint = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy'6標題 = {7'accept' => 'application/json',8'content-type' => 'application/json'9}10資料 = {11"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",12"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",13"function_selector": "balanceOf(address)",14"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",15"visible": true16}1718http = Net::HTTP.new(api_url.host, api_url.port)19request = Net::HTTP::Post.new(api_url.path, headers)20請求。正文 = data.to_json2122回應 = http.請求(請求)23response_data = JSON.parse(response.body)24puts response_data25
1需要 'net/http'2require 'json'3需要 'uri'45endpoint = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/estimateenergy'6標題 = {7'accept' => 'application/json',8'content-type' => 'application/json'9}10資料 = {11"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",12"contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs",13"function_selector": "balanceOf(address)",14"parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c",15"visible": true16}1718http = Net::HTTP.new(api_url.host, api_url.port)19request = Net::HTTP::Post.new(api_url.path, headers)20請求。正文 = data.to_json2122回應 = http.請求(請求)23response_data = JSON.parse(response.body)24puts response_data25