Actions11
Overview
This node interacts with Ethereum Virtual Machine (EVM) compatible blockchains to retrieve the receipt of a specific transaction. The "Get Transaction Receipt" operation fetches detailed information about a transaction identified by its hash, including status, gas used, logs, and block confirmations. It optionally supports waiting for a specified number of confirmations before returning the receipt, which is useful to ensure the transaction is securely included in the blockchain.
Common scenarios where this node is beneficial include:
- Verifying the success or failure of a transaction after submission.
- Retrieving event logs emitted by smart contracts during the transaction.
- Waiting for a certain number of confirmations to reduce the risk of chain reorganizations affecting transaction finality.
Practical example:
- After sending a token transfer transaction, use this node to wait for 3 confirmations and then obtain the transaction receipt to confirm the transfer succeeded and extract any emitted events.
Properties
| Name | Meaning |
|---|---|
| Transaction Hash | The unique hash identifier of the transaction to get details for. |
| Wait for Confirmations | Boolean flag indicating whether to wait for a specific number of confirmations before returning the receipt. |
| Number of Confirmations | The number of confirmations to wait for if the above flag is enabled. |
Output
The node outputs an array of JSON objects, each representing the transaction receipt corresponding to the input item. The receipt typically includes fields such as:
transactionHash: The hash of the transaction.blockNumber: The block number containing the transaction.status: Whether the transaction was successful (1) or failed (0).gasUsed: Amount of gas consumed by the transaction.logs: Array of event logs generated by the transaction.confirmations: Number of confirmations the transaction has received.
If the "Wait for Confirmations" option is enabled, the output will only be returned once the transaction has reached the specified confirmation count.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for an EVM-compatible RPC provider to interact with the blockchain network.
- Uses the ethers.js library for blockchain communication and wallet management.
- No additional external services are required beyond the configured RPC endpoint.
Troubleshooting
- Invalid Transaction Hash: If the provided transaction hash is malformed or does not exist on the network, the node may throw an error or return no receipt. Verify the hash format and that the transaction has been broadcasted.
- Timeout Waiting for Confirmations: When waiting for confirmations, network delays or low block times can cause long waits. Ensure the RPC provider is reliable and consider adjusting the confirmation count.
- RPC Connection Issues: Errors connecting to the blockchain RPC endpoint can occur due to incorrect credentials or network issues. Check the API key and network availability.
- Private Key Errors: Although not directly relevant for this operation, other operations requiring private keys must ensure valid keys are provided; otherwise, errors will be thrown.