Skip to main content
EVM

eth_getTransactionReceipt

Summary: Get transaction receipt by hash

This request returns the receipt of a transaction by transaction hash. Receipts for pending transactions aren't available.

Parameters

transactionHash string
required

A string representing the hash (32 bytes) of a transaction.

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

Returns

A transaction receipt object, or null when no receipt was found.
eth_getTransactionReceiptResponse oneOf

null

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
string
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x1ecac319d356e2bd78262dc9efddb6b048f33e4c706f356d72768f87c5fc0753"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0x3ff53efeec688238a8ecc0a1404221d1be3723aa6531f12f4d635dc8e7824779",
"blockNumber": "0x49b95c",
"contractAddress": null,
"cumulativeGasUsed": "0xadcd6",
"effectiveGasPrice": "0x3ba1f2a",
"from": "0x188e0b45cedd8f5e425e73c8aa7953b92115ec24",
"gasUsed": "0x21950",
"logs": [
{
"address": "0xef4fb24ad0916217251f553c0596f8edc630eb66",
"blockHash": "0x3ff53efeec688238a8ecc0a1404221d1be3723aa6531f12f4d635dc8e7824779",
"blockNumber": "0x49b95c",
"data": "0x00000000000000000000000000000000000000000000000000000000000000e0a0...",
"logIndex": "0x14",
"removed": false,
"topics": [
"0xfc8703fd57380f9dd234a89dce51333782d49c5902f307b02f03e014d18fe471"
],
"transactionHash": "0x1ecac319d356e2bd78262dc9efddb6b048f33e4c706f356d72768f87c5fc0753",
"transactionIndex": "0x8"
}
],
"logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000...",
"status": "0x1",
"to": "0xef4fb24ad0916217251f553c0596f8edc630eb66",
"transactionHash": "0x1ecac319d356e2bd78262dc9efddb6b048f33e4c706f356d72768f87c5fc0753",
"transactionIndex": "0x8",
"type": "0x0"
}
}