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
AI-generatedOverview
This node interacts with the Infura blockchain API to retrieve details of a specific Ethereum transaction by its hash. It is useful for scenarios where you need to fetch transaction information such as sender, recipient, value, gas price, block number, and other transaction metadata from the Ethereum blockchain. For example, it can be used in blockchain analytics, monitoring transaction status, or integrating Ethereum transaction data into workflows.
Use Case Examples
- Retrieve transaction details by providing the transaction hash to monitor the status and details of a specific Ethereum transaction.
- Use the node to fetch transaction data for auditing or reporting purposes in a blockchain application.
Properties
| Name | Meaning |
|---|---|
| Transaction Hash | The hash of the Ethereum transaction to retrieve details for. |
Output
JSON
blockNumberDecimal- The block number containing the transaction, converted to decimal.transactionIndexDecimal- The index of the transaction within the block, converted to decimal.nonceDecimal- The nonce of the transaction, converted to decimal.valueEth- The value transferred in the transaction, converted from Wei to Ether.gasPriceGwei- The gas price used for the transaction, converted from Wei to Gwei.result- Raw result data from the Infura API response (if applicable).metadatanetwork- The blockchain network used (e.g., mainnet, rinkeby).operation- The operation performed, here 'getTransaction'.timestamp- Timestamp when the data was retrieved.infura_endpoint- The Infura API endpoint used for the request.raw_response- The full raw response from the Infura API.
Dependencies
- Infura API credentials including network, project ID, and optionally project secret for authentication.
Troubleshooting
- Ensure the transaction hash is valid and correctly formatted as a hexadecimal string starting with '0x'.
- Check that the Infura API credentials are correctly configured and have access to the specified network.
- If the node throws an error about unknown operation, verify that the operation parameter is set to 'getTransaction'.
- If the response is empty or null, the transaction hash might not exist on the specified network or the transaction is pending and not yet indexed.
Links
- Infura eth_getTransactionByHash API - Official Infura documentation for the eth_getTransactionByHash JSON-RPC method used to get transaction details by hash.