eth_getBlockReceipts - Somnia

Example code for the eth_getBlockReceipts JSON-RPC method. Complete guide on how to use eth_getBlockReceipts JSON-RPC in GetBlock Web3 documentation.

This method returns all transaction receipts for a given block on the Somnia network. This is efficient for indexing entire blocks of transaction data.

Parameters

Parameter
Type
Required
Description

blockNumber

string

Yes

Block number (hex) or "latest"

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "eth_getBlockReceipts",
  "params": ["latest"]
}'

Response Example

Response (JSON)
{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "result": [
    {
      "transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b",
      "status": "0x1",
      "gasUsed": "0x5208",
      "logs": []
    }
  ]
}

Use Cases

  • Block indexing services

  • Batch receipt retrieval

  • Analytics and monitoring

  • Building block explorers

SDK Integration

Last updated

Was this helpful?