This QA automation script checks the on-chain status of a transaction using its hash. It connects to an Ethereum-compatible RPC, retrieves the transaction and receipt, and verifies that it was successfully confirmed.
- Confirm the existence of a transaction
- Retrieve its status (
SuccessorFailed) - Log key details (sender, recipient, block number)
- Useful for validating on-chain actions in test scenarios
- Clone the repository:
git clone https://github.com/yourusername/qa-web3-tx-verifier.git
cd qa-web3-tx-verifier- Install dependencies:
npm install- Create a
.envfile:
RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID
TX_HASH=0xYourTransactionHashHere- Run the script:
node qa-web3-tx-verifier.jsβ
Transaction found:
Hash: 0xabc...
From: 0x...
To: 0x...
Status: Success
Block: 18400234
This project is part of a QA Web3 portfolio by RaΓΊl Casado (GaslessQA), focused on validating decentralized system behaviors through smart automation.
RaΓΊl Casado β GaslessQA
π https://www.linkedin.com/in/gaslessqa/
MIT