bor_getRootHash RPC Method
Parameters
fromBlock
integer
REQUIRED
Loading...
toBlock
integer
REQUIRED
Loading...
Returns
result
Loading...
Request
1curl https://docs-demo.matic.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"jsonrpc":"2.0","method":"bor_getRootHash","params":[1000, 1032], "id":1}'
1curl https://docs-demo.matic.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"jsonrpc":"2.0","method":"bor_getRootHash","params":[1000, 1032], "id":1}'
1require 'eth'2client = Eth::Client.create 'https://docs-demo.matic.quiknode.pro/'3payload = {4"jsonrpc": "2.0",5"method": "bor_getRootHash",6"params": [1000,1032],7"id": "1"8}9response = client.send(payload.to_json)10puts response
1require 'eth'2client = Eth::Client.create 'https://docs-demo.matic.quiknode.pro/'3payload = {4"jsonrpc": "2.0",5"method": "bor_getRootHash",6"params": [1000,1032],7"id": "1"8}9response = client.send(payload.to_json)10puts response
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.matic.quiknode.pro/");4const response = await provider.send("bor_getRootHash", [1000, 1032]);5console.log(response);6})();7
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.matic.quiknode.pro/");4const response = await provider.send("bor_getRootHash", [1000, 1032]);5console.log(response);6})();7
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5"jsonrpc": "2.0",6"method": "bor_getRootHash",7"params": [81000,9103210],11"id": 112});1314var requestOptions = {15method: 'POST',16headers: myHeaders,17body: raw,18redirect: 'follow'19};2021fetch("https://docs-demo.matic.quiknode.pro/", requestOptions)22.then(response => response.text())23.then(result => console.log(result))24.catch(error => console.log('error', error));
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5"jsonrpc": "2.0",6"method": "bor_getRootHash",7"params": [81000,9103210],11"id": 112});1314var requestOptions = {15method: 'POST',16headers: myHeaders,17body: raw,18redirect: 'follow'19};2021fetch("https://docs-demo.matic.quiknode.pro/", requestOptions)22.then(response => response.text())23.then(result => console.log(result))24.catch(error => console.log('error', error));
1import requests2import json34url = "https://docs-demo.matic.quiknode.pro/"56payload = json.dumps({7"jsonrpc": "2.0",8"method": "bor_getRootHash",9"params": [101000,11103212],13"id": 114})15headers = {16'Content-Type': 'application/json'17}1819response = requests.request("POST", url, headers=headers, data=payload)2021print(response.text)22
1import requests2import json34url = "https://docs-demo.matic.quiknode.pro/"56payload = json.dumps({7"jsonrpc": "2.0",8"method": "bor_getRootHash",9"params": [101000,11103212],13"id": 114})15headers = {16'Content-Type': 'application/json'17}1819response = requests.request("POST", url, headers=headers, data=payload)2021print(response.text)22
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.matic.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": "bor_getRootHash",15"params": [161000,17103218],19"id": 120})2122response = https.request(request)23puts response.read_body24
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.matic.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": "bor_getRootHash",15"params": [161000,17103218],19"id": 120})2122response = https.request(request)23puts response.read_body24
1from web3 import HTTPProvider2client = HTTPProvider('https://docs-demo.matic.quiknode.pro/')3params = [1000,1032]4response = client.make_request('bor_getRootHash', params)5print(response)6
1from web3 import HTTPProvider2client = HTTPProvider('https://docs-demo.matic.quiknode.pro/')3params = [1000,1032]4response = client.make_request('bor_getRootHash', params)5print(response)6
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free