evm_validate_address
Validate Ethereum addresses for correct format and EIP-55 checksum, and detect whether an address is a contract or wallet on a specified EVM chain to prevent transaction errors.
Instructions
Validate Ethereum address format, checksum, and determine if it's a contract or EOA.
Performs comprehensive address validation including format checking, EIP-55 checksum verification, and on-chain contract detection. Essential for preventing transaction errors.
CRITICAL RULES:
Address MUST be 42 characters (0x + 40 hex digits)
Validates EIP-55 checksum if provided (mixed case)
Distinguishes between Externally Owned Accounts (EOA) and contracts
Returns validation status even for invalid addresses (doesn't throw)
PARAMETERS:
chain: EVM chain to check contract status (required)
Contract detection requires chain query
Same address may be EOA on one chain, contract on another
Validation format rules are universal across chains
address: Ethereum address to validate (required)
Format: 0x followed by 40 hexadecimal characters
Can be lowercase, uppercase, or mixed case (checksummed)
Examples: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" (checksummed)
EXAMPLES: ✅ Validate checksummed address: {chain: "ethereum", address: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"}
✅ Check if address is contract: {chain: "polygon", address: "0x1234567890123456789012345678901234567890"}
✅ Validate lowercase address: {chain: "bsc", address: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"}
❌ Invalid - wrong length: {chain: "ethereum", address: "0x1234"}
❌ Invalid - missing 0x prefix: {chain: "polygon", address: "742d35Cc6634C0532925a3b844Bc9e7595f0bEb"}
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 operation success • valid: Boolean - is address format valid? • checksumValid: Boolean - does checksum match? (null if all lowercase/uppercase) • isContract: Boolean - is this a contract address? • address: Original input address • checksummedAddress: Properly checksummed version (EIP-55) • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Not checking both "valid" and "isContract" fields
Assuming checksum validation failure means invalid address
Forgetting addresses can be contracts on some chains but not others
Not using checksummed addresses in user interfaces
USE CASES:
Validate user input before sending transactions
Distinguish between wallet addresses and contract addresses
Verify address checksums for security
Convert addresses to proper EIP-55 format
Prevent sending tokens to wrong address types
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>",
"address": "<address>"
},
"name": "evm_validate_address"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain to query | |
| address | Yes | Ethereum address to validate (0x... - 42 characters) |