eth_getBlockReceipts
https://triport.io/rpc/bscReturn all transaction receipts in a block.
eth_getBlockReceipts returns an array containing the transaction receipts for one BNB Smart Chain block.
Use it when an indexer needs status, gas, logs, and contract-creation results for the complete block without looking up every receipt separately. The block is selected with a standard tag or hex block number.
Unlike eth_getTransactionReceipt, this method is block-scoped and can return many receipts. Unlike eth_getLogs, it returns receipt objects rather than only matching event logs.
Parameters
JSON-RPC params is a positional array: [block].
blockstring (block tag or hex quantity)requiredlatest, earliest, pending, or an EVM hex block number.Response
The response below is the checked fixture for this method; it is reproduced without changing its fields or values.
resultarray<object>result[].transactionHashstringresult[].transactionIndexstringresult[].blockHashstringresult[].blockNumberstringresult[].fromstringresult[].tostringnull for contract creation.result[].contractAddressstringresult[].cumulativeGasUsedstringresult[].gasUsedstringresult[].effectiveGasPricestringresult[].logsarray<object>result[].logsBloomstringresult[].statusstringresult[].typestringErrors
Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | A required positional parameter is missing or a value does not match the OpenRPC schema. |
-32000 | Upstream request failure | Interpret the message with the code: header not found means a missing block; pruned/unsupported state text means unavailable historical state. |
401 | Unauthorized | The x-token API key is missing or invalid. |
429 | Rate limited | The request exceeds the configured category RPS for the caller's tier. |
Examples
JavaScript (fetch)
const response = await fetch("https://triport.io/rpc/bsc", {
method: "POST",
headers: {
"x-token": process.env.TRIPORT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockReceipts",
"params": [
"latest"
]
}),
});
const payload = await response.json();
console.log(payload.result);Notes
- The BSC categories use configured defaults of 15 / 20 / 100 / 250 RPS; they are marked unmeasured in the tier matrix.
- Related methods:
eth_getTransactionReceipt,eth_getBlockByNumber,eth_getLogs.