ERC-20 Token Balance
March 26, 2026 · View on GitHub
Query the ERC-20 token balance of any Ethereum address — a simple "Hello World" for interacting with smart contracts.
Try it out: shawntabrizi.com/ERC20-Token-Balance
How It Works
- Enter an Ethereum address to get its ETH balance
- Enter an ERC-20 token contract address to get the token balance, name, and symbol
Uses ethers.js to query the Ethereum blockchain. Connects to your browser wallet (MetaMask, etc.) if available, otherwise falls back to a free public RPC endpoint.
Example Token Contracts
| Token | Contract Address |
|---|---|
| USDC | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| USDT | 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
| DAI | 0x6B175474E89094C44Da98b954EedeAC495271d0F |
Related Projects
- ETH Balance — Get the ETH balance of an address
- ETH Transaction Graph — Visualize Ethereum transactions in real time