Skip to main content
Ethereum API
Multichain API

eth_getTransactionReceipt

Summary: Returns the receipt of a transaction by transaction hash.

Parameters

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

32 byte hex value

Returns

Receipt information
object

Receipt information

type
string
Pattern: ^0x([0-9a-fA-F]?){1,2}$

type

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

32 byte hex value

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

transaction index

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

32 byte hex value

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

block number

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

hex encoded address

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

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

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

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

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

The amount of gas used for this specific transaction alone.

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

The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844.

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

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

logs
array of objects

logs

removed
boolean

removed

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

log index

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

transaction index

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

32 byte hex value

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

32 byte hex value

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

block number

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

hex encoded address

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

data

topics
array of strings

topics

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

logs bloom

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

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

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

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

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

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
string
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844.

Customize request
Parameter
Value
string

Connect your MetaMask wallet to run requests successfully.

Request

await window.ethereum.request({
"method": "eth_getTransactionReceipt",
"params": [
"0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
],
});

Example response

{
"blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
"blockNumber": "0x50",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
"gasUsed": "0x5208",
"blobGasUsed": "0x20000",
"effectiveGasPrice": "0x1",
"blobGasPrice": "0x3",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
"transactionHash": "0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3",
"transactionIndex": "0x0"
}