We're now supporting Polygon zkEVM!
Learn more here.
Parameters:
Returns:
message - object - The BeaconBlock object from the CL spec
slot - string - The slot to which this block corresponds
proposer_index - string - Index of validator in validator registry
parent_root - string - The signing merkle root of the parent BeaconBlock
state_root - string - The tree hash merkle root of the BeaconState for the BeaconBlock
body - object - The BeaconBlockBody object from the CL spec
signature - string - The signature
Code Examples:
var myHeaders = new Headers(); myHeaders.append("accept", "application/json"); var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' }; fetch("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v2/beacon/blocks/head", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
require "uri" require "net/http" url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v2/beacon/blocks/head") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["accept"] = "application/json" response = https.request(request) puts response.read_body
curl -X GET \ "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v2/beacon/blocks/head" -H "accept: application/json"
import requests url = "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v2/beacon/blocks/head" payload={} headers = { 'accept': 'application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)