Parameters
Block number (hex), or
latest, earliest, pending, safe, finalizedIf
true, returns full transaction objects; if false, returns transaction hashesReturns
Block object or
nullShow properties
Show properties
Block number (hex)
Block hash (32 bytes)
Parent block hash
PoW nonce (8 bytes)
SHA3 of uncles data
Bloom filter for logs
Root of transaction trie
Root of state trie
Root of receipts trie
Beneficiary address
Block difficulty (hex)
Total chain difficulty (hex)
Extra data field
Block size in bytes (hex)
Max gas allowed (hex)
Total gas used (hex)
Unix timestamp (hex)
Transaction objects or hashes
Array of uncle hashes
Base fee per gas (EIP-1559)
Example
curl -X POST "https://edge.goldsky.com/standard/evm/1?secret=YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["latest", false], "id": 1}'
const response = await fetch('https://edge.goldsky.com/standard/evm/1?secret=YOUR_SECRET', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"latest",
false
],
"id": 1
})
});
const { result } = await response.json();
console.log(result);
import requests
response = requests.post(
'https://edge.goldsky.com/standard/evm/1?secret=YOUR_SECRET',
json={
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"latest",
false
],
"id": 1
}
)
print(response.json()['result'])