System Requirements
OnchainTestKit requires the following software to be installed on your system:
- Node.js: Version 14 or higher
- Package Manager: npm, yarn, bun, or pnpm
- Foundry: For running local Anvil nodes
- Operating System: macOS, Linux, or Windows (with WSL2)
Installation Steps
- yarn
- npm
- bun
Installing Foundry
OnchainTestKit uses Anvil (part of Foundry) for local blockchain nodes. Install Foundry using the official installer:Environment Configuration
Create a.env file in your project root with the following variables:
.env
Project Structure
We recommend organizing your tests in the following structure:Playwright Configuration
Create aplaywright.config.ts file:
playwright.config.ts