curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [
"latest"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": [
{}
]
}curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": [
"latest"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": [
{}
]
}eth_getTransactionReceipt for each transaction individually when you need all receipts from a block.
quantity|tag — the block number as a hexadecimal string, or one of the following block tags:
latest — the most recent block in the canonical chainearliest — the genesis blockpending — the pending state/transactionsresult — an array of transaction receipt objects, each containing:
transactionHash — hash of the transactiontransactionIndex — index position of the transactionblockHash — hash of the block containing this transactionblockNumber — number of the block containing this transactionfrom — address of the senderto — address of the receivercumulativeGasUsed — total gas used in the block up to this transactiongasUsed — gas used by this transactioncontractAddress — contract address created, if anylogs — array of log objects generated by this transactionlogsBloom — bloom filter for the logsstatus — 1 (success) or 0 (failure)eth_getBlockReceipts code examplesconst { ethers } = require("ethers");
const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");
async function getBlockReceipts() {
const blockNumber = "latest"; // Or use hex like "0x1234"
const receipts = await provider.send("eth_getBlockReceipts", [blockNumber]);
console.log(`Found ${receipts.length} receipts`);
receipts.forEach((receipt, i) => {
console.log(`Transaction ${i}: ${receipt.transactionHash}, Gas used: ${parseInt(receipt.gasUsed, 16)}`);
});
}
getBlockReceipts();
eth_getBlockReceipts is building analytics tools that need to process all transaction outcomes in a block, such as calculating total gas usage, counting successful vs. failed transactions, or extracting all events emitted in a block.Was this page helpful?