BNB Smart Chain
eth_getBlockReceipts
eth_getBlockReceipts hands back the receipt for every transaction in one BNB Smart Chain block from a single request. Each receipt carries status flags, gas used, effective gas price (in BNB), and the full event logs for that transaction. BSC is the BNB-fee EVM whose validators pack blocks roughly every three seconds, so a busy slot can hold hundreds of receipts. One bulk fetch beats firing a separate request per transaction. Aim the call at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 and the node streams the whole block's receipts as one array.
Use cases
- Ingest every event emitted in a block in one round trip for a BSC log indexer.
- Sum gas used and BNB fees across all transactions in a block for analytics or cost reporting.
- Sweep all BEP-20 Transfer logs in the block to keep token balances current.
- Flag transactions whose receipt
statusis"0x0"to surface reverts for error triage.
Parameters
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Yes | The block whose receipts to fetch. |
Response
| Type | Description |
|---|---|
| array of object | Array of receipt objects. Each receipt contains: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress, gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" failure), logs, logsBloom, type. |
Example request
Try it live in the BNB Smart Chain playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag is unrecognised or malformed. |
-32000 | Block not found | The requested block does not exist or has been pruned. |
Common pitfalls
- For whole-block receipt ingestion this is far leaner than looping
eth_getTransactionReceiptper transaction — make it your default for that job. - A block dense with PancakeSwap swaps and verbose logs produces a large payload, so stream or chunk the response rather than buffering it all in memory.
- Older BSC nodes and some providers do not expose this method; verify it is available on your endpoint before depending on it in production.
Supported networks
- Mainnet — Chain ID: 56
- Testnet — Chain ID: 97
See also
Parameters
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"