Get comprehensive token data for any ERC20 token on Base network. Perfect for pre-trade due diligence and market research.
- On-Chain Data: name, symbol, decimals, total supply (via Foundry)
- Market Data: price, 24h change, liquidity, volume (DexScreener API)
- Security Info: contract address, Basescan link, DEX info
- Zero Cost: Read-only operations, no gas fees
- Foundry (
castcommand) jq(JSON parsing)curl(API calls)
# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Install jq (Ubuntu/Debian)
sudo apt-get install jq
# Install jq (macOS)
brew install jqchmod +x token-info.sh
./token-info.sh <token_address>./token-info.sh 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Output:
π Fetching token info for 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913...
π On-Chain Data
ββββββββββββββββββββββββββββββββββββββββ
Name: USD Coin
Symbol: USDC
Decimals: 6
Total Supply: 70,000,000,000 USDC
π° Market Data
ββββββββββββββββββββββββββββββββββββββββ
Price: $1.00
24h Change: 0.01%
Liquidity: $616,007.96
Volume (24h): $28,405.94
DEX: aerodrome
Main Pair: USDC/USDbC
Chart: https://dexscreener.com/base/0x98c7A2338336d2d354663246F64676009c7bDa97
π Security
ββββββββββββββββββββββββββββββββββββββββ
Contract: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Basescan: https://basescan.org/address/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
β οΈ Warning: Always verify token contract on Basescan
Malicious contracts can fake names/symbols
./token-info.sh 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed- Verify token has liquidity before swapping
- Check current price and recent trends
- Estimate potential price impact
- Compare trading volumes across tokens
- Find active trading pairs
- Track price movements
- Confirm token contract exists
- Verify on Basescan before trading
- Check for adequate liquidity
Perfect companion for Bankr trading:
# 1. Check token info
./token-info.sh 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed
# 2. If looks good, trade via Bankr
bankr "Buy $50 of DEGEN on Base"export BASE_RPC_URL="https://your-custom-rpc.com"
./token-info.sh 0x...Default: https://mainnet.base.org
β Safe to use:
- Read-only operations (no transactions)
- No private keys required
- No gas fees
- Input validation prevents injection
- Always verify contract on Basescan
- Malicious contracts can fake names/symbols
- Check contract address matches expected token
- Cross-reference multiple sources
- On-Chain Queries: Uses Foundry's
castto call ERC20 functionsname(),symbol(),decimals(),totalSupply()
- Market Data: Fetches from DexScreener API
- Price, volume, liquidity from main trading pair
- Validation: Checks address format before execution
- Error Handling: Graceful fallbacks for missing data
- Base network only (easily modified for other chains)
- DexScreener API required for market data
- Public RPC may rate limit on heavy usage
- Unverified contracts may return misleading data
PRs welcome! Ideas:
- Multi-chain support
- Additional data sources
- Historical price data
- Holder distribution
- Contract verification check
MIT
Built with:
- Foundry - Ethereum development toolkit
- DexScreener API - DEX aggregator data
- Bankr - AI-powered crypto trading
Created by @droppingbeans π«