This returns the receipt of a block — preconfirmed OR finalized. Preconfirmed receipts are identifiable by their zero blockHash (0x00...00) and blockNumber: null. Once the parent block seals (within 2 seconds), the same receipt returns with a real block hash. This zero-hash convention is the canonical way to distinguish preconfirmed vs finalized receipts without additional RPC calls.
bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [
"pending"
],
"id": "getblock.io"
}'
javascriptimport axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [
"pending"
],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data, null, 2)))
.catch(error => console.log(error));
pythonimport requests
import json
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = json.dumps({{
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [
"pending"
],
"id": "getblock.io"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
rustuse reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let payload = json!({
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [
"pending"
],
"id": "getblock.io"
});
let response = client
.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
.header("Content-Type", "application/json")
.json(&payload)
.send()
.await?;
let result: serde_json::Value = response.json().await?;
println!("{:#?}", result);
Ok(())
}
json{
"jsonrpc": "2.0",
"result": [
{
"type": "0x7e",
"status": "0x1",
"cumulativeGasUsed": "0xb496",
"logs": [],
"depositNonce": "0x2ddfd39",
"depositReceiptVersion": "0x1",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionHash": "0xd6586cd3a1cf6f2a79dfdc513863cbaff925578131dc9e42872acdc3dab4aee9",
"transactionIndex": "0x0",
"blockHash": "0xe9526259318b13325e3926a3d29a4323d53d7e3c25ebfcf6b0f7ace7376af639",
"blockNumber": "0x2ddfd36",
"gasUsed": "0xb496",
"effectiveGasPrice": "0x0",
"blobGasUsed": "0x41e8",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"to": "0x4200000000000000000000000000000000000015",
"contractAddress": null,
"l1GasPrice": "0x1564212e",
"l1GasUsed": "0x72a",
"l1Fee": "0x0",
"l1BaseFeeScalar": "0x8dd",
"l1BlobBaseFee": "0x1571d4a",
"l1BlobBaseFeeScalar": "0x101c12",
"daFootprintGasScalar": "0x94"
}
],
"id": "getblock.io"
}