Actions22
- Call Contract
- Estimate Gas
- Get Balance
- Get Block
- Get Block By Hash
- Get Block Number
- Get Block Transaction Count By Hash
- Get Block Transaction Count By Number
- Get Code
- Get Gas Price
- Get Logs
- Get Storage At
- Get Transaction
- Get Transaction By Block Hash And Index
- Get Transaction By Block Number And Index
- Get Transaction Count
- Get Transaction Receipt
- Get Uncle By Block Hash And Index
- Get Uncle By Block Number And Index
- Get Uncle Count By Block Hash
- Get Uncle Count By Block Number
- Send Raw Transaction
Get Transaction Receipt
AI-generatedOverview
This node interacts with the Infura blockchain API to retrieve the receipt of a specific Ethereum transaction using its transaction hash. It is useful for developers and blockchain analysts who need to verify transaction details such as status, gas used, and block information after a transaction has been processed on the Ethereum network.
Use Case Examples
- A developer wants to confirm if a transaction was successful and retrieve its gas usage details.
- A blockchain analyst needs to fetch the receipt of a transaction to audit its execution and status.
Properties
| Name | Meaning |
|---|---|
| Transaction Hash | The unique hash identifier of the Ethereum transaction for which the receipt is requested. |
Output
JSON
blockNumberDecimal- The block number in decimal format where the transaction was included.transactionIndexDecimal- The index position of the transaction within the block in decimal format.gasUsedDecimal- The amount of gas used by the transaction in decimal format.cumulativeGasUsedDecimal- The total gas used in the block up to and including this transaction in decimal format.statusDecimal- The status of the transaction receipt in decimal format (1 indicates success).success- Boolean indicating if the transaction was successful (true if statusDecimal is 1).transactionHash- The hash of the transaction.blockHash- The hash of the block containing the transaction.from- The address of the sender.to- The address of the receiver.logs- Array of log objects generated by the transaction.logsBloom- Bloom filter for the logs generated by the transaction.contractAddress- The contract address created, if the transaction was a contract creation.gasUsed- Gas used by the transaction in hexadecimal format.cumulativeGasUsed- Cumulative gas used in the block in hexadecimal format.status- Status of the transaction receipt in hexadecimal format.
Dependencies
- Infura API credentials including network, project ID, and optionally project secret for authentication.
Troubleshooting
- Ensure the transaction hash is correct and corresponds to a transaction on the specified network.
- If the node throws an error about invalid JSON or request failure, verify the Infura credentials and network configuration.
- If the transaction receipt is null, the transaction might not be mined yet or the hash is incorrect.
Links
- Infura Ethereum API - eth_getTransactionReceipt - Official Infura documentation for the getTransactionReceipt method used to fetch transaction receipts.