Skip to main content
POST
eth_getBlockReceipts
curl --request POST \
  --url https://rpc.testnet.tempo.xyz/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": [
    {}
  ]
}
Tempo API method that returns all transaction receipts for a given block. This is more efficient than fetching receipts individually when you need all receipts from a block.

Parameters

  • blockParameter — the block number (hex) or tag (latest, earliest, pending)

Response

  • result — array of receipt objects for all transactions in the block:
    • transactionHash — hash of the transaction
    • transactionIndex — index of the transaction in the block
    • blockHash — hash of the block
    • blockNumber — block number
    • from — sender address
    • to — recipient address
    • cumulativeGasUsed — total gas used in the block up to this transaction
    • gasUsed — gas used by this transaction
    • contractAddress — contract address if this was a deployment
    • logs — array of log objects
    • logsBloom — bloom filter for logs
    • status0x1 for success, 0x0 for failure
    • effectiveGasPrice — actual gas price paid
    • type — transaction type
    • feeToken — (Tempo-specific) token used to pay fees
    • feePayer — (Tempo-specific) address that paid the fees

eth_getBlockReceipts code examples

const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

const getBlockReceipts = async (blockNumber) => {
    const receipts = await provider.send("eth_getBlockReceipts", [blockNumber]);

    console.log(`Block ${blockNumber}: ${receipts.length} transactions`);

    let totalGasUsed = 0n;
    let successCount = 0;
    let failCount = 0;

    for (const receipt of receipts) {
      const gasUsed = BigInt(receipt.gasUsed);
      totalGasUsed += gasUsed;

      if (receipt.status === "0x1") {
        successCount++;
      } else {
        failCount++;
      }

      console.log(`\nTx ${receipt.transactionIndex}: ${receipt.transactionHash}`);
      console.log(`  Status: ${receipt.status === "0x1" ? "Success" : "Failed"}`);
      console.log(`  Gas Used: ${gasUsed}`);
      console.log(`  Logs: ${receipt.logs.length}`);

      // Tempo-specific fields
      if (receipt.feeToken) {
        console.log(`  Fee Token: ${receipt.feeToken}`);
      }
      if (receipt.feePayer) {
        console.log(`  Fee Payer: ${receipt.feePayer}`);
      }
    }

    console.log(`\n--- Summary ---`);
    console.log(`Total transactions: ${receipts.length}`);
    console.log(`Successful: ${successCount}, Failed: ${failCount}`);
    console.log(`Total gas used: ${totalGasUsed}`);
  };

getBlockReceipts("latest");

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_getBlockReceipts
params
any[]

Block number or tag

id
integer
default:1

Response

200 - application/json

Array of transaction receipts

jsonrpc
string
id
integer
result
object[]

Array of receipt objects for all transactions in the block