eth_getRootHash

eth_getRootHash RPC Method

Parameters:

fromBlock - integer - The block number from which the range starts

toBlock - integer - The block number where the range ends

Returns:

result - The root hash of the specified block range

Code Examples:

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "jsonrpc": "2.0",
  "method": "eth_getRootHash",
  "params": [
    1000,
    1032
  ],
  "id": 1
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.ebs.ezat.io/core/api/v1.0/rpc/polygon/mainnet?x-api-key-id=API-KEY-ID&x-api-key=API-KEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Last updated