Overview
The CDP SDK supports multiple blockchain networks across EVM-compatible chains and Solana. Each network has different capabilities, and the SDK provides type-safe access to network-specific features.Supported Networks
EVM Networks
The SDK supports a wide range of EVM-compatible networks:Mainnet Networks
Mainnet Networks
- Base - Coinbase’s Layer 2 network (full feature support)
- Ethereum - Ethereum mainnet
- Optimism - Optimistic Ethereum Layer 2
- Arbitrum - Arbitrum One Layer 2
- Polygon - Polygon PoS network
- Avalanche - Avalanche C-Chain
- BNB - BNB Smart Chain
- Zora - Zora Network
Testnet Networks
Testnet Networks
- Base Sepolia - Base testnet with faucet support
- Ethereum Sepolia - Ethereum testnet
- Ethereum Holesky - Ethereum testnet for staking
- Optimism Sepolia - Optimism testnet
- Arbitrum Sepolia - Arbitrum testnet
Solana Networks
- Solana Mainnet - Solana production network
- Solana Devnet - Solana development network with faucet support
Network Capabilities
Different networks support different features in the CDP SDK. The SDK enforces these capabilities at the type level to prevent runtime errors.EVM Network Capabilities
| Network | Token Balances | Faucet | Transfer | Swap | Fund (Onramp) |
|---|---|---|---|---|---|
| Base | ✓ | - | ✓ | ✓ | ✓ |
| Base Sepolia | ✓ | ✓ | ✓ | - | - |
| Ethereum | ✓ | - | ✓ | ✓ | - |
| Ethereum Sepolia | - | ✓ | ✓ | - | - |
| Optimism | - | - | - | ✓ | - |
| Arbitrum | - | - | - | ✓ | - |
| Polygon | - | - | - | - | - |
sendTransaction is available on all networks. It provides low-level transaction sending without additional features like token resolution or swap routing.
Capability Descriptions
List Token Balances
List Token Balances
Query ERC-20 token balances for an account. Returns token metadata including symbol, decimals, and balance.Supported networks: Base, Base Sepolia, Ethereum
Faucet
Faucet
Request testnet tokens for testing and development. Typically provides native tokens (ETH, SOL) for gas.Supported networks: Base Sepolia, Ethereum Sepolia, Ethereum Holesky, Optimism Sepolia, Arbitrum Sepolia, Solana Devnet
Transfer
Transfer
Transfer native tokens or ERC-20 tokens with automatic gas estimation and token address resolution.Supported networks: Base, Base Sepolia, Ethereum, Ethereum Sepolia, Optimism, Arbitrum
Swap
Swap
Execute token-to-token swaps using decentralized exchange aggregators with optimized routing.Supported networks: Base, Ethereum, Optimism, Arbitrum
Fund (Onramp)
Fund (Onramp)
Enable fiat-to-crypto onramp for purchasing crypto with credit/debit cards or bank transfers.Supported networks: Base
Network-Scoped Accounts
The SDK provides a type-safe way to work with network-specific features using network-scoped accounts. When you scope an account to a network, only the methods available on that network are accessible.Testnet vs Mainnet
When to Use Testnets
Development and Testing
Development and Testing
Use testnet networks during development to:
- Test your integration without real funds
- Experiment with transactions and smart contracts
- Debug issues in a safe environment
- Use faucets to get free testnet tokens
CI/CD Pipelines
CI/CD Pipelines
Integrate testnet transactions in your CI/CD:
- Run automated E2E tests with real blockchain interactions
- Validate transaction flows before production deployment
- Test error handling and edge cases
When to Use Mainnet
Production Applications
Production Applications
Use mainnet networks for:
- Real user transactions with actual value
- Production-ready applications
- Live blockchain data and state
Important Considerations
Important Considerations
- Transactions use real funds and cannot be reversed
- Gas fees must be paid in native tokens (ETH, SOL, etc.)
- Network congestion can affect transaction times
- Always test thoroughly on testnet first
Network Configuration
Chain IDs
Each EVM network has a unique chain ID:RPC URLs
The SDK uses Coinbase Node RPC URLs by default. For Base networks, you can access node URLs:Custom Networks
For networks not natively supported, you can use custom RPC URLs:Network Status and Health
Best Practices
Network Selection
Network Selection
- Start development on testnets (Base Sepolia, Ethereum Sepolia)
- Use Base for production applications with full CDP feature support
- Consider network fees - Layer 2 networks (Base, Optimism, Arbitrum) have lower gas costs
- Choose networks based on your target users and ecosystem
Error Handling
Error Handling
- Handle network-specific errors (insufficient balance, network congestion)
- Implement retry logic for transient network failures
- Check network capabilities before calling methods
- Use try-catch blocks for all network operations
Performance
Performance
- Cache network configuration and RPC URLs
- Scope accounts to networks early to avoid repeated calls
- Use batch operations when supported
- Monitor transaction confirmation times per network
Next Steps
Transactions
Learn about transaction lifecycle and management
Accounts
Understand different account types
Sending Transactions
Step-by-step guide to sending transactions
Token Transfers
Transfer tokens across networks