Architecture
Core Concepts
1. Wallet Abstraction
- MetaMask and Coinbase Wallet are modeled as programmable objects.
- Actions like importing wallets, switching networks, and handling notifications are exposed as high-level methods.
2. Local Node Management
- Each test can spin up its own local Ethereum node (Anvil) with automatic port allocation.
- Supports chain state manipulation (snapshots, reverts), time travel, and account impersonation.
3. Parallelization
- Designed for parallel Playwright test execution.
- Each worker gets a unique node and wallet context, avoiding cross-test interference.
Supported Wallets
MetaMask
Full support for MetaMask automation including account management, network switching, and transaction handling
Coinbase Wallet
Complete Coinbase Wallet support with passkey authentication and WebAuthn integration
Best Practices
- Always check for wallet fixture existence before running actions
- Use environment variables for sensitive data (seed phrases, passwords)
- Use Playwright’s parallelization features for fast test execution
- Clean up local nodes after tests to free resources
- Use snapshots for efficient state management between test steps
- For Coinbase Wallet passkey tests, ensure proper credential management between registration and approval steps
- When testing network switching, ensure the network is already added or use the ADD_NETWORK action first
Next Steps
1
Quick Start
Follow our Quick Start guide to get up and running quickly
2
Learn Common Actions
Explore common wallet actions available across all wallets
3
Wallet-Specific Features
Dive into MetaMask or Coinbase Wallet specific features