> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/hyperliquid-evm-eth-get-block-receipts",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# eth_getBlockReceipts | Hyperliquid EVM

> Returns all transaction receipts for a given block.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `eth_getBlockReceipts` JSON-RPC method returns all transaction receipts for a given block. This method is highly efficient for retrieving receipt data for all transactions in a block with a single API call, making it ideal for block processing, event extraction, and comprehensive transaction analysis.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

The method takes one parameter:

1. **Block number** - The block for which to retrieve all transaction receipts

### Parameter details

* `blockNumber` (string, required) — Block identifier: `"latest"`, `"earliest"`, `"pending"`, or a specific block number in hexadecimal

## Response

The method returns an array of transaction receipt objects for all transactions in the specified block.

### Response structure

**Receipt array:**

* Array of transaction receipt objects, one for each transaction in the block
* Empty array if the block contains no transactions
* `null` if the block doesn't exist

**Transaction receipt object:**

* `transactionHash` — Hash of the transaction
* `transactionIndex` — Index of the transaction in the block (0-based)
* `blockHash` — Hash of the block containing the transaction
* `blockNumber` — Number of the block containing the transaction
* `from` — Address of the transaction sender
* `to` — Address of the transaction receiver (null for contract creation)
* `gasUsed` — Amount of gas used by this specific transaction
* `cumulativeGasUsed` — Total gas used in the block up to and including this transaction
* `contractAddress` — Address of the created contract (null if not a contract creation)
* `logs` — Array of log objects generated by the transaction
* `status` — Transaction status (`0x0` for failure, `0x1` for success)
* `effectiveGasPrice` — Actual gas price paid by the transaction
* `type` — Transaction type (0x0 for legacy, 0x1 for EIP-2930, 0x2 for EIP-1559)

## Usage example

### Basic implementation

```javascript theme={"system"}
// Get all transaction receipts for a block on Hyperliquid
const getBlockReceipts = async (blockNumber) => {
  const response = await fetch('https://hyperliquid-mainnet.core.chainstack.com/YOUR_ENDPOINT/evm', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      jsonrpc: '2.0',
      method: 'eth_getBlockReceipts',
      params: [blockNumber],
      id: 1
    })
  });
  
  const data = await response.json();
  return data.result;
};

// Analyze block transaction outcomes
const analyzeBlockTransactions = async (blockNumber) => {
  const receipts = await getBlockReceipts(blockNumber);
  
  if (!receipts || receipts.length === 0) {
    return { message: 'No transactions in block' };
  }
  
  const analysis = {
    totalTransactions: receipts.length,
    successfulTransactions: 0,
    failedTransactions: 0,
    totalGasUsed: 0,
    contractCreations: 0,
    totalLogs: 0
  };
  
  receipts.forEach(receipt => {
    // Count successful vs failed transactions
    if (receipt.status === '0x1') {
      analysis.successfulTransactions++;
    } else {
      analysis.failedTransactions++;
    }
    
    // Sum gas usage
    analysis.totalGasUsed += parseInt(receipt.gasUsed, 16);
    
    // Count contract creations
    if (receipt.contractAddress) {
      analysis.contractCreations++;
    }
    
    // Count logs/events
    analysis.totalLogs += receipt.logs.length;
  });
  
  analysis.successRate = (analysis.successfulTransactions / analysis.totalTransactions) * 100;
  
  return analysis;
};

// Extract all events from a block
const extractBlockEvents = async (blockNumber, contractAddress = null) => {
  const receipts = await getBlockReceipts(blockNumber);
  
  if (!receipts) {
    return [];
  }
  
  // Extract all logs from all receipts
  const allLogs = receipts.flatMap(receipt => 
    receipt.logs.map(log => ({
      ...log,
      transactionHash: receipt.transactionHash,
      transactionIndex: receipt.transactionIndex,
      blockNumber: receipt.blockNumber
    }))
  );
  
  // Filter by contract address if specified
  if (contractAddress) {
    return allLogs.filter(log => 
      log.address.toLowerCase() === contractAddress.toLowerCase()
    );
  }
  
  return allLogs;
};

// Usage examples
analyzeBlockTransactions('latest')
  .then(analysis => console.log('Block Analysis:', analysis))
  .catch(error => console.error('Error:', error));

// Extract events from a specific block
extractBlockEvents('0x9d0c37')
  .then(events => console.log(`Found ${events.length} events in block`))
  .catch(error => console.error('Error:', error));
```

## Hyperliquid-specific considerations

### System transactions

**HyperCore transactions:**

* Block receipts include receipts for both regular and system transactions
* System transactions originate from HyperCore and may have different patterns
* All transactions (regular and system) are included in the receipt array
* System transactions contribute to block gas usage and event generation

### Efficiency benefits

**Batch processing:**

* Retrieve all receipts for a block in one request
* More efficient than individual `eth_getTransactionReceipt` calls
* Reduces API call overhead and network latency
* Ideal for processing entire blocks atomically

### Receipt data interpretation

**Transaction status:**

* `0x1` — Transaction succeeded
* `0x0` — Transaction failed (reverted)
* Failed transactions still consume gas
* Check status before processing transaction effects

**Gas analysis:**

* `gasUsed` — Gas consumed by individual transaction
* `cumulativeGasUsed` — Total gas used up to this transaction in the block
* Use for calculating gas efficiency and block utilization

## Example request

```shell Shell theme={"system"}
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["0x9d0c37"],"id":1}' \
  https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm
```

## Use cases

The `eth_getBlockReceipts` method is essential for applications that need to:

* **Block processing**: Efficiently process all transactions in a block with a single API call
* **Event indexing**: Build comprehensive event indexes from receipt data
* **Analytics platforms**: Collect transaction and event data for analysis
* **DeFi monitoring**: Track protocol events and state changes
* **Audit systems**: Verify transaction outcomes and contract interactions
* **Block explorers**: Display comprehensive block transaction information
* **Transaction monitoring**: Track transaction success rates and patterns
* **Gas analysis**: Analyze gas usage patterns across block transactions
* **Smart contract monitoring**: Track contract interactions and events
* **System transaction analysis**: Analyze both regular and HyperCore system transaction receipts
* **Data synchronization**: Maintain synchronized blockchain data
* **Integration services**: Provide receipt data to external systems

<Note>
  This method returns receipts for all transactions in a block, including both regular transactions and system transactions from HyperCore. This can be a large amount of data for blocks with many transactions. Consider filtering strategies for high-volume blocks.
</Note>


## OpenAPI

````yaml /openapi/hyperliquid_node_api/evm_eth_get_block_receipts.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - eth_getBlockReceipts
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: eth_getBlockReceipts
      description: Returns all transaction receipts for a given block.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - params
                - id
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                  description: JSON-RPC version
                method:
                  type: string
                  enum:
                    - eth_getBlockReceipts
                  default: eth_getBlockReceipts
                  description: The RPC method name
                params:
                  type: array
                  description: 'Parameters: [blockNumber]'
                  default:
                    - '0x9d0c37'
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: eth_getBlockReceipts
              params:
                - '0x9d0c37'
              id: 1
      responses:
        '200':
          description: Successful response with all transaction receipts for the block
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: array
                    description: Array of transaction receipt objects
                    items:
                      type: object
                      properties:
                        transactionHash:
                          type: string
                          description: Hash of the transaction
                        transactionIndex:
                          type: string
                          description: Index of the transaction in the block
                        blockHash:
                          type: string
                          description: Hash of the block containing the transaction
                        blockNumber:
                          type: string
                          description: Number of the block containing the transaction
                        from:
                          type: string
                          description: Address of the sender
                        to:
                          type: string
                          description: Address of the receiver
                        gasUsed:
                          type: string
                          description: Amount of gas used by the transaction
                        cumulativeGasUsed:
                          type: string
                          description: Total gas used in the block up to this transaction
                        contractAddress:
                          type: string
                          description: >-
                            Contract address created, if the transaction was a
                            contract creation
                        logs:
                          type: array
                          description: Array of log objects generated by the transaction
                        status:
                          type: string
                          description: >-
                            Transaction status (0x0 for failure, 0x1 for
                            success)
                        effectiveGasPrice:
                          type: string
                          description: Actual gas price paid by the transaction
                        type:
                          type: string
                          description: Transaction type
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  - transactionHash: >-
                      0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                    transactionIndex: '0x0'
                    blockHash: >-
                      0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
                    blockNumber: '0x9d0c37'
                    from: '0xFC1286EeddF81d6955eDAd5C8D99B8Aa32F3D2AA'
                    to: '0x5555555555555555555555555555555555555555'
                    gasUsed: '0x5208'
                    cumulativeGasUsed: '0x5208'
                    contractAddress: null
                    logs: []
                    status: '0x1'
                    effectiveGasPrice: '0x3b9aca00'
                    type: '0x0'

````