Skip to main content
EVM

eth_getBlockReceipts

Summary: Get block receipts by block number

This request returns all transaction receipts of the given block identified by block number, hash, or tag. Transaction receipts provide a way to track the success or failure of a transaction (1 if successful and 0 if failed), as well as the amount of gas used and any event logs that might have been produced by a smart contract during the transaction.

Parameters

block anyOf
required

Block number, block hash, or string tag.

Block number string

Block number in hexadecimal.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Block tag enum

See the default block parameter.

  • earliest: The lowest numbered block the client has available.
  • finalized: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination.
  • latest: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
  • pending: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool.

Enum:
"earliest"
"finalized"
"latest"
"pending"
Block hash string

32 byte hex value.

Pattern: ^0x[0-9a-f]{64}$

Returns

Block object, or null when there is no block.
eth_getBlockReceiptsResponse oneOf

array

Not Found (null).

object
required

Receipt information

type enum

The transaction type as introduced in EIP-2718, in hexadecimal. Use:

  • 0x00 for LegacyTxType
  • 0x01 for AccessListTxType (EIP-2930)
  • 0x02 for DynamicFeeTxType (EIP-1559)

Enum:
"0x00"
"0x01"
"0x02"
transactionHash string

The transaction hash in which the call was made.

Pattern: ^0x[0-9a-f]{64}$

transactionIndex string

The position in the block, in hexadecimal.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

blockHash string

Block hash; 32 byte hex identifier for the block derived from the block header.

Pattern: ^0x[0-9a-f]{64}$

blockNumber string

Block number as hex-encoded unsigned integer.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

from string

Address of the sender.

Pattern: ^0x[0-9a-fA-F]{40}$

to oneOf

Address of the receiver or null in a contract creation transaction.

Contract Creation (null) null

Contract Creation (null)

Recipient Address string

Hex-encoded address.

Pattern: ^0x[0-9a-fA-F]{40}$

cumulativeGasUsed string

The sum of gas used by this transaction and all preceding transactions in the same block.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

gasUsed string

The amount of gas used for this specific transaction alone.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

contractAddress oneOf

The contract address created, if the transaction was a contract creation, otherwise null.

Contract address string

Hex-encoded address.

Pattern: ^0x[0-9a-fA-F]{40}$

Null null

Null

logs array

object
required

removed boolean

logIndex string

Hex-encoded unsigned integer.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

transactionIndex string

A hexadecimal of the integer representing the position in the block.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

transactionHash string

The transaction hash in which the call was made.

Pattern: ^0x[0-9a-f]{64}$

blockHash string

Block hash; 32 byte hex identifier for the block derived from the block header.

Pattern: ^0x[0-9a-f]{64}$

blockNumber string

Block number as hex-encoded unsigned integer.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

address string

Hex-encoded address.

Pattern: ^0x[0-9a-fA-F]{40}$

data string

Hex-encoded bytes.

Pattern: ^0x[0-9a-f]*$

topics array

string

32 Hex-encoded bytes.

Pattern: ^0x[0-9a-f]{64}$

logsBloom string

Bloom filter for the block logs; null when block is pending.

Pattern: ^0x[0-9a-f]{512}$

root string

The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.

Pattern: ^0x[0-9a-f]{64}$

status enum

Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Enum:
"0x0"
"0x1"
effectiveGasPrice string

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).

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Customize request
Parameter
Value
anyOf
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": ["0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"blockHash": "0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8",
"blockNumber": "0x4fde9d",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x77359400",
"from": "0xd3d7dbe73bbdd5a5c7a49ca322763c4d400fc240",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000...",
"status": "0x1",
"to": "0x11e90f43a39f4409935f254fac26b360893f1785",
"transactionHash": "0x8eafa76140b66efeef371e5a62ad8b0fb16298eb349157ced4e1ec76b108cceb",
"transactionIndex": "0x0",
"type": "0x0"
},
{
"blockHash": "0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8",
"blockNumber": "0x4fde9d",
"contractAddress": null,
"cumulativeGasUsed": "0x101f6",
"effectiveGasPrice": "0x59e78fe",
"from": "0x00381fd3e1ca2a3758bb86983836c645ca0c1f4a",
"gasUsed": "0xafee",
"logs": [
{
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"blockHash": "0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8",
"blockNumber": "0x4fde9d",
"data": "0x0000000000000000000000000000000000000000000000000b6139a7cbd20000",
"logIndex": "0x0",
"removed": false,
"topics": [
"0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c",
"0x00000000000000000000000000381fd3e1ca2a3758bb86983836c645ca0c1f4a"
],
"transactionHash": "0x962e545e8ac3caef02f251d175cb0519c14db387559bb5804e988e175b3bc6c4",
"transactionIndex": "0x1"
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000...",
"status": "0x1",
"to": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"transactionHash": "0x962e545e8ac3caef02f251d175cb0519c14db387559bb5804e988e175b3bc6c4",
"transactionIndex": "0x1",
"type": "0x0"
},
{
"blockHash": "0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8",
"blockNumber": "0x4fde9d",
"contractAddress": null,
"cumulativeGasUsed": "0x1fc52",
"effectiveGasPrice": "0x4f20124",
"from": "0x685ee51518320a6625fa2bb523b2eab385df68b3",
"gasUsed": "0xfa5c",
"logs": [
{
"address": "0xffbfd3124eae5938afd36294af98a6207567135b",
"blockHash": "0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8",
"blockNumber": "0x4fde9d",
"data": "0x0000000000000000000000000d92d3d772d85389b4b25d10dc52715546...",
"logIndex": "0x1",
"removed": false,
"topics": [
"0x2f824f69f211e444df15d741157e83cdf23c50f39399b9523853a84b91379ca6"
],
"transactionHash": "0x04d2b7d5c8e2452bfdafe1655bd88332ad5f0c14aafa574da794adf3d4e7e14f",
"transactionIndex": "0x2"
}
],
"logsBloom": "0x0000000001000000000000000000000000000000000000000000...",
"status": "0x1",
"to": "0xffbfd3124eae5938afd36294af98a6207567135b",
"transactionHash": "0x04d2b7d5c8e2452bfdafe1655bd88332ad5f0c14aafa574da794adf3d4e7e14f",
"transactionIndex": "0x2",
"type": "0x2"
}
]
}