A compact toolkit for creating virtual EVM chains on testnets.
Two ways to use EVVM:
- As a library - Import Solidity contracts in your dApp
- As a CLI tool - Deploy and manage EVVM instances on testnets
Docs & hosted library: https://www.evvm.info/
NPM (recommended):
npm install @evvm/testnet-contractsOr with Forge:
forge install EVVM-org/Testnet-ContractsImport in your contracts:
import "@evvm/testnet-contracts/interfaces/IEvvm.sol";Guide: How to build on top of EVVM: https://www.evvm.info/docs/HowToMakeAEVVMService
Before deploying with the CLI, ensure you have the following installed:
- Clone & install
git clone --recursive https://github.com/EVVM-org/Testnet-Contracts
cd Testnet-Contracts
# Option 1: Using CLI (recommended)
chmod +x ./evvm
./evvm install
# Option 2: Manual installation
bun install
forge install- Prepare environment
cp .env.example .env
# Edit RPC_URL, ETHERSCAN_API, etc.- Import wallet (secure)
cast wallet import defaultKey --interactive- Deploy (interactive)
If you are on Linux or macOS, run:
./evvm deployIf you are on Windows, run on PowerShell:
.\evvm.bat deployOr use Bun from any directory:
bun run evvm deployUsing CLI Scripts (Recommended for local development)
The repository includes platform-specific wrapper scripts to easily call the CLI:
Linux/macOS:
# Make script executable (first time only)
chmod +x ./evvm
# Run any EVVM CLI command
./evvm deploy
./evvm register --evvmAddress 0x...
./evvm developer --makeInterface
./evvm helpWindows (PowerShell):
# Run any EVVM CLI command
.\evvm.bat deploy
.\evvm.bat register --evvmAddress 0x...
.\evvm.bat developer --makeInterface
.\evvm.bat helpThe scripts automatically detect your OS and architecture (x64, ARM64, MUSL) and execute the appropriate compiled binary from .executables/ folder.
Quick Start (CLI): https://www.evvm.info/docs/QuickStart
Deployment & Registration:
evvm deploy# Deploy EVVM (single or cross-chain)evvm deploy --skipInputConfig# Deploy with existing config (no prompts)evvm deploy --crossChain# Deploy cross-chain EVVM instanceevvm register --evvmAddress <addr># Register EVVM in registryevvm register --crossChain# Register cross-chain EVVM
Cross-Chain Management:
evvm setUpCrossChainTreasuries# Configure treasury station connections
Developer Utilities:
evvm developer --makeInterface# Generate Solidity interfaces from contractsevvm developer --runTest# Run test suites with custom filtersevvm install# Install Bun and Foundry dependencies
Information:
evvm help# Show comprehensive CLI helpevvm version# Show CLI version
- NPM install:
npm install @evvm/testnet-contracts - Forge install:
forge install EVVM-org/Testnet-Contracts - Import in Solidity:
import "@evvm/testnet-contracts/interfaces/IEvvm.sol";
- RPC timeouts: CLI automatically tries fallback RPCs; set
RPC_URLin.envto a reliable endpoint. - Wallet not found: import with
cast wallet import <name> --interactive. - Bun missing: install Bun (
curl -fsSL https://bun.sh/install | bash). - Tests: run
./evvm developer --runTest(Linux/Mac) orevvm.bat developer --runTest(Windows), orforge test. - Script not executable (Linux/Mac): run
chmod +x ./evvmand ensure.executables/binaries have execute permissions. - Wrong architecture detected: The wrapper scripts auto-detect OS/architecture. If issues occur, manually run the correct binary from
.executables/.
Files & structure (short)
src/contracts/— core contracts (Evvm, NameService, Staking, Treasury, P2PSwap)cli/— TypeScript CLI sourcescript/— Foundry deployment scriptsinput/— optional JSON/Sol files generated by CLI.executables/— pre-compiled CLI binaries for multiple platformsevvm— Linux/macOS CLI wrapper script (auto-detects architecture)evvm.bat— Windows CLI wrapper script (auto-detects architecture)
We welcome contributions from the community! Here's how you can help:
- Report Issues - Found a bug or have a suggestion? Open an issue on GitHub
- Suggest Features - Have an idea for improvement? Create a feature request issue
- Submit Code Changes:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and add tests
- Push to your branch (
git push origin feature/amazing-feature) - Submit a Pull Request with a detailed description
- Issues: Use GitHub Issues for bug reports, feature requests, and discussions
- Pull Requests: Each PR should reference a related issue
- Tests: All new features must include tests
- Code Style: Follow the existing code patterns in the repository
- Commit Messages: Write clear, descriptive commit messages
- Never commit private keys: Always use
cast wallet import <YOUR_ALIAS> --interactiveto securely store your keys - Use test credentials only: This repository is for testnet deployment only
- Environment variables: Store sensitive data like API keys in
.envfiles (not committed to git) - Verify contracts: Always verify your deployed contracts on block explorers