Configuration Builder
Theconfigure() function provides a chainable API for building test configurations:
Wallet Configuration
MetaMask Configuration
Coinbase Wallet Configuration
Network Configuration
Local Node Options
Configure a local Anvil node with specific parameters:Network Details
Add custom networks to your wallet:Environment Variables
Required Variables
.env
Other Env Variables
.env
Using Configurations in Tests
Configuration Best Practices
1
Separate config files
Create separate configuration files for each wallet type to keep your code organized:
2
Use environment variables
Never hardcode sensitive data. Always use environment variables for:
- Seed phrases
- API keys
- RPC endpoints
- Private keys
3
Type your configurations
Export typed configurations for better IDE support:
4
Validate environment
Add validation for required environment variables: