QuickStart
Get up and running with EVVM Testnet Contracts in minutes using our interactive setup wizard.
Prerequisites
Ensure you have the following installed:
- Foundry - Solidity development toolkit (includes
forge
andcast
) - Node.js - For npm dependency management
- Git - Version control system
1. Clone and Install
git clone https://github.com/EVVM-org/Testnet-Contracts
cd Testnet-Contracts
make install
The make install
command will:
- Install npm dependencies
- Compile contracts with IR optimization (
--via-ir
)
2. Environment Setup
Create your .env file with required API keys:
# Copy the example and fill in your values
cp .env.example .env
Add your configuration:
RPC_URL_ETH_SEPOLIA=https://your-ethereum-sepolia-url
RPC_URL_ARB_SEPOLIA=https://your-arbitrum-sepolia-url
ETHERSCAN_API=your_etherscan_api_key
3. Secure Key Management
Import your testnet private key securely using Foundry:
cast wallet import defaultKey --interactive
This command will prompt you to enter your private key securely. The key will be encrypted and stored locally by Foundry. Never commit real private keys to version control.
4. Interactive Setup & Deployment
Run the automated setup wizard:
./evvm-init.sh
The script will guide you through:
Administrator Configuration
- Admin address - Contract administrator with governance privileges
- Golden Fisher address - Special permissions for golden staking
- Activator address - Controls system activation and feature flags
EVVM Metadata Configuration
- EVVM Name - Default: "EVVM" (your abstract blockchain's identity)
- EVVM ID - Unique identifier for your EVVM instance
- Principal Token Name - Default: "Mate token" (the core ecosystem token)
- Principal Token Symbol - Default: "MATE"
Advanced Configuration (Optional)
- Total Supply - Default: 2,033,333,333 × 10¹⁸ (total token economics)
- Era Tokens - Default: 1,016,666,666.5 × 10¹⁸ (rewards pool for staking system)
- Reward per operation - Default: 5 × 10¹⁸ (base reward for transaction processing)
The principalTokenAddress
parameter is not included in the interactive setup wizard as it is an extremely advanced and sensitive configuration option.
If you need to specify a custom principal token address:
- Modify the deployment script directly in
script/DeployTestnet.s.sol
- Update the
principalTokenAddress
field in theEvvmMetadata
struct (currently set to0x0000000000000000000000000000000000000001
)
This option should only be used in very specific scenarios and requires deep understanding of the EVVM token architecture.
Do NOT commit these changes to your repository as they will be discarded immediately
The interactive wizard will prompt you to select a deployment network:
Available Networks
- eth - Ethereum Sepolia testnet
- arb - Arbitrum Sepolia testnet (default)
- custom - Custom RPC URL (for other networks)
Network Configuration
The wizard will automatically handle network selection and deployment parameters based on your choice.
5. What Happens Next
The evvm-init.sh
script automatically:
-
Validates Input - Ensures all addresses follow Ethereum format (0x + 40 hex characters) and numbers are valid
-
Generates Configuration Files in the
input/
directory:address.json
- Administrator addresses for system governanceevvmBasicMetadata.json
- EVVM identity and principal token metadataevvmAdvancedMetadata.json
- Supply parameters and reward distribution settings
-
Displays Configuration Summary - Shows all entered values for confirmation
-
Optional Immediate Deployment - Prompts to deploy contracts right after configuration
-
Contract Deployment - Deploys the complete EVVM ecosystem using
DeployTestnet.s.sol
-
Contract Verification - Automatically verifies contracts on block explorers using Etherscan API
6. Manual Deployment (Alternative)
If you prefer manual control or want to deploy later:
# For Ethereum Sepolia
make deployTestnet NETWORK=eth
# For Arbitrum Sepolia (default)
make deployTestnet NETWORK=arb
# For custom RPC URL
forge script script/DeployTestnet.s.sol:DeployTestnet \
--rpc-url YOUR_RPC_URL \
--account defaultKey \
--broadcast \
--verify \
--etherscan-api-key $ETHERSCAN_API \
-vvvvvv
Local Development
For local testing with Anvil:
# Start local blockchain
make anvil
# Deploy to local testnet (in another terminal)
make deployLocalTestnet
7. Verify Your Deployment
After deployment, check the broadcast/
directory for:
- Transaction receipts - Detailed transaction information
- Deployed contract addresses - Contract addresses on the target network
- Gas usage reports - Deployment cost analysis
What Gets Deployed
The EVVM ecosystem consists of four main contracts:
- Evvm.sol - Core virtual machine implementation with payment processing
- NameService.sol - Domain name resolution and identity system
- Staking.sol - Token staking, rewards mechanism, and fisher registration
- Estimator.sol - Staking rewards estimation and calculation system
Understanding Your Deployment
- Transaction Flow - Learn how transactions are processed in your new EVVM
- Payment Functions - Explore available payment operations
- Staking Operations - Understand staking functionality
8. Next Steps
- View deployment artifacts in
broadcast/
directory - Check contract verification on Etherscan/Arbiscan
- Test your contracts using the provided test suite:
make test
- Monitor gas usage and optimize if needed:
make seeSizes
- Compile contracts for development:
make compile
9. Available Commands
Run make help
to see all available commands:
make install # Install dependencies and compile contracts
make compile # Compile contracts with IR optimization
make anvil # Run Anvil local testnet
make deployLocalTestnet # Deploy to local Anvil
make deployTestnet NETWORK=<eth|arb> # Deploy to testnets
make seeSizes # View contract sizes
Explore the EVVM Ecosystem
Once your testnet contracts are deployed, explore the complete EVVM documentation:
Core System Documentation
- Transaction Processing - Learn how transactions flow through the EVVM ecosystem
- EVVM Core Contract - Understand payment processing and token management
- Staking System - Token staking, rewards, and fisher registration
- Name Service - Username registration and identity resolution
Advanced Features
- Treasury Operations - Cross-chain deposits and withdrawals
- P2P Swap - Peer-to-peer token exchange protocol
- Signature Structures - EIP-191 signature specifications for all services
Payment Functions
- Single Payments - Basic payment operations
- Batch Payments - Multi-payment and dispersal functions
- Withdrawal Functions - Cross-chain token withdrawals
Key Concepts
- Nonce Types - Synchronous vs asynchronous transaction ordering
- Staking Functions - Complete staking operation guide
- Name Service Functions - Username and metadata management
Need Help?
- Configuration files - Review
input/
directory if you need to modify settings - Environment setup - Check
.env.example
for required variables - Documentation - Explore the comprehensive sections above
- Local testing - Use
make anvil
andmake deployLocalTestnet
for development - Abstract Blockchain Concepts - Start with the Introduction to understand EVVM's revolutionary architecture
That's it! You now have a fully deployed and verified EVVM testnet environment ready for development and testing. Explore the ecosystem documentation to build powerful applications on the world's first abstract blockchain.