# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://scroll-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/scroll/scroll-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://scroll-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'eth_getBlockReceipts', params: ['latest']})
};

fetch('https://scroll-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://scroll-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getBlockReceipts",
    "params": ["latest"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://scroll-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_getBlockReceipts\",\n  \"params\": [\n    \"latest\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://scroll-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_getBlockReceipts\",\n  \"params\": [\n    \"latest\"\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://scroll-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_getBlockReceipts\",\n  \"params\": [\n    \"latest\"\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: eth_getBlockReceipts
description: Returns the receipts of a block by number or hash.
params:
  - name: Block number or tag or hash
    required: true
    description: The block number, tag, or hash to retrieve receipts from.
    schema:
      title: Block number, tag, or block hash
      description: Identifies a block by explicit number, a predefined tag (e.g., latest/safe/finalized), or a 32-byte block hash.
      anyOf:
        - title: Block number
          type: string
          pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
          description: Unsigned integer block height (e.g., 0 for genesis).
        - title: Block tag
          description: A well-known tag such as "latest", "earliest", "pending", "safe", or "finalized".
          type: string
          enum:
            - earliest
            - finalized
            - safe
            - latest
            - pending
        - title: Block hash
          type: string
          pattern: ^0x[0-9a-f]{64}$
          description: 32-byte Keccak hash of the block header identifying a specific block.
result:
  name: Receipts information
  description: An array of transaction receipt objects.
  schema:
    oneOf:
      - title: Not Found (null)
        type: 'null'
      - title: Receipts information
        type: array
        items:
          type: object
          title: Receipt information
          required:
            - blockHash
            - blockNumber
            - from
            - cumulativeGasUsed
            - gasUsed
            - logs
            - logsBloom
            - transactionHash
            - transactionIndex
            - effectiveGasPrice
          additionalProperties: false
          properties:
            type:
              title: type
              type: string
              pattern: ^0x([0-9a-fA-F]?){1,2}$
            transactionHash:
              title: transaction hash
              type: string
              pattern: ^0x[0-9a-f]{64}$
            transactionIndex:
              title: transaction index
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            blockHash:
              title: block hash
              type: string
              pattern: ^0x[0-9a-f]{64}$
            blockNumber:
              title: block number
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            from:
              title: from
              type: string
              pattern: ^0x[0-9a-fA-F]{40}$
            to:
              title: to
              description: Address of the receiver or null in a contract creation transaction.
              oneOf:
                - title: Contract Creation (null)
                  type: 'null'
                - title: Recipient Address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
            cumulativeGasUsed:
              title: cumulative gas used
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              description: The sum of gas used by this transaction and all preceding transactions in the same block.
            gasUsed:
              title: gas used
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              description: The amount of gas used for this specific transaction alone.
            blobGasUsed:
              title: blob gas used
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              description: The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844.
            contractAddress:
              title: contract address
              description: The contract address created, if the transaction was a contract creation, otherwise null.
              oneOf:
                - title: hex encoded address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                - title: 'Null'
                  type: 'null'
            logs:
              title: logs
              type: array
              items:
                title: log
                type: object
                required:
                  - transactionHash
                additionalProperties: false
                properties:
                  removed:
                    title: removed
                    type: boolean
                  logIndex:
                    title: log index
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                  transactionIndex:
                    title: transaction index
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                  transactionHash:
                    title: transaction hash
                    type: string
                    pattern: ^0x[0-9a-f]{64}$
                  blockHash:
                    title: block hash
                    type: string
                    pattern: ^0x[0-9a-f]{64}$
                  blockNumber:
                    title: block number
                    type: string
                    pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                  address:
                    title: address
                    type: string
                    pattern: ^0x[0-9a-fA-F]{40}$
                  data:
                    title: data
                    type: string
                    pattern: ^0x[0-9a-f]*$
                  topics:
                    title: topics
                    type: array
                    items:
                      title: 32 hex encoded bytes
                      type: string
                      pattern: ^0x[0-9a-f]{64}$
            logsBloom:
              title: logs bloom
              type: string
              pattern: ^0x[0-9a-f]{512}$
            root:
              title: state root
              type: string
              pattern: ^0x[0-9a-f]{64}$
              description: The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.
            status:
              title: status
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              description: Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.
            effectiveGasPrice:
              title: effective gas price
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              description: The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).
            blobGasPrice:
              title: blob gas price
              type: string
              pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              description: The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844.
examples:
  - name: eth_getBlockReceipts example
    params:
      - name: Block number or tag or hash
        value: latest
    result:
      name: Receipts information
      value:
        - blockHash: '0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182'
          blockNumber: '0x6f55'
          contractAddress: null
          cumulativeGasUsed: '0x18c36'
          from: '0x22896bfc68814bfd855b1a167255ee497006e730'
          gasUsed: '0x18c36'
          blobGasUsed: '0x20000'
          effectiveGasPrice: '0x9502f907'
          blobGasPrice: '0x32'
          logs:
            - address: '0xfd584430cafa2f451b4e2ebcf3986a21fff04350'
              topics:
                - '0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d'
                - '0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8'
                - '0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2'
                - '0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730'
              data: 0x
              blockNumber: '0x6f55'
              transactionHash: '0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975'
              transactionIndex: '0x0'
              blockHash: '0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182'
              logIndex: '0x0'
              removed: false
          logsBloom: '0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000'
          status: '0x1'
          to: '0xfd584430cafa2f451b4e2ebcf3986a21fff04350'
          transactionHash: '0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975'
          transactionIndex: '0x0'
          type: '0x0'
        - blockHash: '0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182'
          blockNumber: '0x6f55'
          contractAddress: null
          cumulativeGasUsed: '0x1de3e'
          from: '0x712e3a792c974b3e3dbe41229ad4290791c75a82'
          gasUsed: '0x5208'
          blobGasUsed: '0x20000'
          effectiveGasPrice: '0x9502f907'
          blobGasPrice: '0x32'
          logs: []
          logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
          status: '0x1'
          to: '0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338'
          transactionHash: '0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6'
          transactionIndex: '0x1'
          type: '0x2'
```
