evm_get_token_info
Retrieve ERC20 token metadata—name, symbol, decimals, and total supply—using a chain and contract address to validate tokens and format amounts correctly.
Instructions
Get comprehensive ERC20 token metadata and information from any EVM chain.
Fetches name, symbol, decimals, and total supply directly from the token contract's public methods. Essential for understanding token properties before interacting with it.
CRITICAL RULES:
Token MUST implement ERC20 standard interface (name(), symbol(), decimals(), totalSupply())
Some tokens may not implement optional methods like name() or symbol()
Decimals are critical for proper amount formatting (6 for USDC, 18 for most)
Total supply can be 0 for deflationary tokens or before minting
Information is read-only, no gas cost (view function)
PARAMETERS:
chain: EVM chain where token is deployed (required)
Token must be deployed on specified chain
Same token name may exist on multiple chains with different addresses
Chain-specific deployment addresses
tokenAddress: ERC20 token contract address (required)
Format: 0x followed by 40 hex characters
Must be deployed contract with ERC20 interface
Examples: USDC, DAI, WETH, custom tokens
EXAMPLES: ✅ Get USDC info on Polygon: {chain: "polygon", tokenAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}
✅ Get DAI info on Ethereum: {chain: "ethereum", tokenAddress: "0x6B175474E89094C44Da98b954EedeAC495271d0F"}
✅ Get custom token info on BSC: {chain: "bsc", tokenAddress: "0x..."}
❌ Invalid - native token (no contract): {chain: "polygon", tokenAddress: "0x0000000000000000000000000000000000000000"}
❌ Invalid - not an ERC20 token: {chain: "ethereum", tokenAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"} // NFT contract
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 • name: Token name (e.g., "USD Coin") • symbol: Token symbol (e.g., "USDC") • decimals: Number of decimals (6, 8, or 18 typically) • totalSupply: Total token supply (raw units and formatted) • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Trying to get info for native tokens (ETH, POL don't have contracts)
Using token address from wrong chain
Not checking decimals before formatting amounts
Assuming all tokens have 18 decimals (USDC has 6)
Confusing token symbol with token name
USE CASES:
Verify token authenticity before trading
Get decimals for proper amount formatting
Check total supply for tokenomics analysis
Display token metadata in UI
Validate token contract before approvals
DECIMALS IMPACT:
18 decimals: 1 token = 1000000000000000000 raw units
6 decimals: 1 token = 1000000 raw units (USDC, USDT)
8 decimals: 1 token = 100000000 raw units (WBTC)
OPTIONAL METHODS: Some tokens may not implement name() or symbol():
Fallback to "Unknown" if not implemented
Core method decimals() is usually present
totalSupply() is part of standard ERC20
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>"
},
"name": "evm_get_token_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain to query | |
| tokenAddress | Yes | ERC20 token contract address (0x...) |