Parameters
- transactionobjectREQUIRED
The transaction call object:
- fromstring
The address from which the transaction is sent
- tostringREQUIRED
The address to which the transaction is addressed
- gasinteger
The integer of gas provided for the transaction execution
- gasPriceinteger
The integer of gasPrice used for each paid gas encoded as hexadecimal
- valueinteger
The integer of value sent with this transaction encoded as hexadecimal
- datastring
The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation.
- BlockNumberOrTagstringREQUIRED
The block number in integer or hexadecimal format or block tag(earliest and latest)
Returns
- quantitystring
Return the amount of computation cost used
Request
1curl https://docs-demo.kaia-kairos.quiknode.pro/ \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"latest"16]17}'
1curl https://docs-demo.kaia-kairos.quiknode.pro/ \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"latest"16]17}'
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = 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"latest"15],16"id": 117});1819var requestOptions = {20method: 'POST',21headers: myHeaders,22body: raw,23redirect: 'follow'24};2526fetch("https://docs-demo.kaia-kairos.quiknode.pro/", requestOptions)27.then(response => response.text())28.then(result => console.log(result))29.catch(error => console.log('error', error));30
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = 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"latest"15],16"id": 117});1819var requestOptions = {20method: 'POST',21headers: myHeaders,22body: raw,23redirect: 'follow'24};2526fetch("https://docs-demo.kaia-kairos.quiknode.pro/", requestOptions)27.then(response => response.text())28.then(result => console.log(result))29.catch(error => console.log('error', error));30
1import requests2import json34url = "https://docs-demo.kaia-kairos.quiknode.pro/"56payload = 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"latest"17],18"id": 119})20headers = {21'Content-Type': 'application/json'22}2324response = requests.request("POST", url, headers=headers, data=payload)2526print(response.text)27
1import requests2import json34url = "https://docs-demo.kaia-kairos.quiknode.pro/"56payload = 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"latest"17],18"id": 119})20headers = {21'Content-Type': 'application/json'22}2324response = requests.request("POST", url, headers=headers, data=payload)2526print(response.text)27
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.kaia-kairos.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = 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"latest"23],24"id": 125})2627response = https.request(request)28puts response.read_body29
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.kaia-kairos.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = 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"latest"23],24"id": 125})2627response = https.request(request)28puts response.read_body29
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free