Skip to content

gaslessqa/qa-web3-balance-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QA Web3 - Balance Check

This project demonstrates a simple Web3 test script that connects to an Ethereum-compatible network and retrieves the ETH balance of a wallet address.

📊 Objective

As a QA automation engineer transitioning into Web3, this test validates that:

  • The dApp can connect to a provider (e.g. Infura or Alchemy).
  • The wallet address is valid.
  • The balance is retrieved correctly in Ether (ETH).

🚀 How to Run

  1. Clone the repository:
git clone https://github.com/yourusername/qa-web3-balance-check.git
cd qa-web3-balance-check
  1. Install dependencies:
npm install
  1. Create a .env file with the following content:
RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID
WALLET_ADDRESS=0xYourWalletHere
  1. Run the script:
node qa-web3-balance-check.js

📊 Sample Output

✅ Wallet balance for 0x1234...abcd: 2.735 ETH

✅ Testing (optional)

You can add a test to assert that the retrieved balance is a valid number and the address format is correct. A sample test will be provided using Jest or Mocha.

📃 Author

Raúl Casado – GaslessQA
🔗 https://www.linkedin.com/in/gaslessqa/

📚 License

MIT

About

QA script to validate Ethereum wallet balance using ethers.js and automated Jest tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors