evm_get_token_balance
Retrieve ERC20 token balances for any wallet on supported EVM chains, returning raw and human-readable amounts with automatic decimal handling.
Instructions
Get ERC20 token balance for any wallet address on any supported EVM chain.
Returns the token balance in both raw units and human-readable format accounting for token decimals. Works with any ERC20-compliant token contract across all 7 supported EVM chains.
CRITICAL RULES:
Token address MUST be a valid ERC20 contract (has decimals(), balanceOf())
Returns 0 balance for addresses that never held the token (not an error)
Decimals are fetched automatically from token contract (typically 6 or 18)
Balance units depend on token decimals (USDC=6, most tokens=18)
Does NOT work with native tokens (use evm_get_balance for ETH/POL/etc)
PARAMETERS:
chain: EVM chain where token is deployed (required)
Token contracts are chain-specific
Same token may have different addresses per chain
Example: USDC on Polygon vs USDC on Ethereum
tokenAddress: ERC20 token contract address (required)
Format: 0x followed by 40 hex characters
Must be deployed contract with ERC20 interface
Examples: USDC, USDT, DAI, WETH, custom tokens
walletAddress: Address to check balance for (required)
Any valid Ethereum address
Can be EOA (user wallet) or contract address
Format: 0x followed by 40 hex characters
EXAMPLES: ✅ Check USDC balance on Polygon: {chain: "polygon", tokenAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", walletAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"}
✅ Check custom token on BSC: {chain: "bsc", tokenAddress: "0x...", walletAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"}
✅ Check WETH balance on Arbitrum: {chain: "arbitrum", tokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", walletAddress: "0x..."}
❌ Invalid - trying to check native ETH (use evm_get_balance): {chain: "ethereum", tokenAddress: "0x0000000000000000000000000000000000000000", walletAddress: "0x..."}
❌ Invalid - wrong chain (token not deployed there): {chain: "avalanche", tokenAddress: "0x2791Bca...POLYGON_USDC", walletAddress: "0x..."}
SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559
CRITICAL GAS CONSIDERATIONS:
Ethereum: High gas costs, use gas oracle for timing
Polygon/BSC: Very low gas, safe for frequent transactions
Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum
Avalanche: Dynamic fees, can spike during congestion
Always check gas price before executing transactions
TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.
OUTPUT STRUCTURE: • success: Boolean indicating query success • chain: Chain queried • tokenAddress: Token contract address • walletAddress: Wallet checked • balance: Object with raw (string) and formatted (string) values • decimals: Number of decimals the token uses • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Using native token address (use evm_get_balance for ETH/POL/AVAX)
Using token address from wrong chain (USDC Polygon ≠ USDC Ethereum)
Not accounting for decimals when interpreting raw balance
Expecting USD value (this returns token units, not dollar value)
Forgetting tokens are chain-specific (must deploy/bridge to each chain)
USE CASES:
Check token holdings before initiating transfers
Verify token receipt after purchase or swap
Monitor token balances across multiple chains
Validate sufficient token balance for DeFi operations
Build portfolio tracking dashboards
TOKEN DECIMALS REFERENCE:
Most tokens: 18 decimals (same as ETH)
Stablecoins (USDC, USDT): 6 decimals
Bitcoin-pegged (WBTC): 8 decimals
Custom tokens: varies (fetched automatically)
Running on Linux.
LINUX-SPECIFIC NOTES:
Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)
Python 3 is typically 'python3' command
GNU tools are standard
Use 'xdg-open' command to open files/applications
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"tokenAddress": "<tokenAddress>",
"walletAddress": "<walletAddress>"
},
"name": "evm_get_token_balance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain to query | |
| tokenAddress | Yes | ERC20 token contract address (0x...) | |
| walletAddress | Yes | Wallet address to check balance for (0x...) |