klay_estimateComputationCost RPC Method
參數
transaction
物件
必填
載入中...
出自
字串
載入中...
至
字串
必填
載入中...
氣體
整數
載入中...
gasPrice
整數
載入中...
值
整數
載入中...
資料
字串
載入中...
BlockNumberOrTag
字串
必填
載入中...
退貨
quantity
字串
載入中...
請求
1curlkaia\2-X POST \3-H "Content-Type: application/json" \4--data '{5"method": "klay_estimateComputationCost",6"id": 1,7"jsonrpc": "2.0",8"params": [9{10"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",11"to": "0x069942a3ca0dabf495dba872533134205764bc9c",12"value": "0x0",13"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"14},15「最新」16]17}'
1curlkaia\2-X POST \3-H "Content-Type: application/json" \4--data '{5"method": "klay_estimateComputationCost",6"id": 1,7"jsonrpc": "2.0",8"params": [9{10"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",11"to": "0x069942a3ca0dabf495dba872533134205764bc9c",12"value": "0x0",13"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"14},15「最新」16]17}'
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var 原始 = JSON.stringify({5"jsonrpc": "2.0",6"method": "klay_estimateComputationCost",7"params": [8{9"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",10"to": "0x069942a3ca0dabf495dba872533134205764bc9c",11"value": "0x0",12"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"13},14「最新」15],16"id": 117});1819var requestOptions = {20方法: 'POST',21標題: myHeaders,22正文: 原始,23重定向: '追蹤'24};2526fetch(「kaia」, requestOptions)27.接著(回應 => response.text())28.接著(結果 => 控制台.log(結果))29.catchcatch(錯誤 => console.log('error', error));30
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var 原始 = JSON.stringify({5"jsonrpc": "2.0",6"method": "klay_estimateComputationCost",7"params": [8{9"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",10"to": "0x069942a3ca0dabf495dba872533134205764bc9c",11"value": "0x0",12"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"13},14「最新」15],16"id": 117});1819var requestOptions = {20方法: 'POST',21標題: myHeaders,22正文: 原始,23重定向: '追蹤'24};2526fetch(「kaia」, requestOptions)27.接著(回應 => response.text())28.接著(結果 => 控制台.log(結果))29.catchcatch(錯誤 => console.log('error', error));30
1匯入 請求2匯入 json34網址 = "kaia"56有效載荷 = json.dumps({7"jsonrpc": "2.0",8"method": "klay_estimateComputationCost",9"params": [10{11"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",12"to": "0x069942a3ca0dabf495dba872533134205764bc9c",13"value": "0x0",14"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"15},16「最新」17],18"id": 119})20標題 = {21「Content-Type」: 'application/json'22}2324回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2526列印(回應.text)27
1匯入 請求2匯入 json34網址 = "kaia"56有效載荷 = json.dumps({7"jsonrpc": "2.0",8"method": "klay_estimateComputationCost",9"params": [10{11"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",12"to": "0x069942a3ca0dabf495dba872533134205764bc9c",13"value": "0x0",14"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"15},16「最新」17],18"id": 119})20標題 = {21「Content-Type」: 'application/json'22}2324回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2526列印(回應.text)27
1需要 "uri"2require "json"3需要 "net/http"45網址 = URI("kaia")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"jsonrpc": "2.0",14"method": "klay_estimateComputationCost",15"params": [16{17"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",18"to": "0x069942a3ca0dabf495dba872533134205764bc9c",19"value": "0x0",20"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"21},22「最新」23],24"id": 125})2627回應 = https.請求(請求)28puts 回應。read_body29
1需要 "uri"2require "json"3需要 "net/http"45網址 = URI("kaia")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"jsonrpc": "2.0",14"method": "klay_estimateComputationCost",15"params": [16{17"from": "0x73718c4980728857f3aa5148e9d1b471efa3a7dd",18"to": "0x069942a3ca0dabf495dba872533134205764bc9c",19"value": "0x0",20"input": "0x2a31efc7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000003039"21},22「最新」23],24"id": 125})2627回應 = https.請求(請求)28puts 回應。read_body29