Developer Command
Developer utilities and helpers for EVVM contract development.
Command
./evvm developer [options]
Description
The developer command provides utilities for EVVM developers working with smart contracts. It includes tools for generating interfaces, running tests, and other development workflows.
This command is primarily intended for EVVM core developers and advanced users who need to work with contract interfaces or modify EVVM contracts.
Options
--makeInterface, -i
Generate Solidity interfaces for EVVM contracts.
- Type:
boolean - Default:
false - Usage:
./evvm developer --makeInterface
This option:
- Prompts to select a contract (Core, NameService, P2PSwap, Staking, Estimator, Treasury, TreasuryExternalChainStation, TreasuryHostChainStation, or All)
- Uses
cast interfaceto generate Solidity interface files - Replaces SPDX license headers with
EVVM-NONCOMMERCIAL-1.0 - Renames interfaces with
Iprefix (e.g.,ICore.sol) - Saves to
./lib/evvm/testnet/src/interfaces/
--runTest, -t
Run the test suite for EVVM contracts with configurable filters.
- Type:
boolean - Default:
false - Usage:
./evvm developer --runTest
This option:
- Prompts to select a contract to test
- Prompts for test type:
- Unit correct - Tests for expected successful operations
- Unit revert - Tests for expected revert conditions
- Fuzzing - Property-based fuzz tests
- Full test suite - All test types combined
- Prompts for output format:
- Markdown - Saves results as
.mdfile - JSON - Saves results as
.jsonfile - None - Terminal output only
- Markdown - Saves results as
- Runs
forge testwith--summary --detailed --gas-report -vvvand appropriate--match-contractfilters - Saves results to
./lib/evvm/testnet/output/testResults/with timestamp
Usage Examples
Generate Contract Interfaces
./evvm developer --makeInterface
This command will:
- Read compiled contract artifacts
- Generate interface files for all EVVM contracts
- Save interfaces to the appropriate directory
Output:
Generating contract interfaces...
✓ ICore.sol
✓ INameService.sol
✓ IStaking.sol
✓ IEstimator.sol
✓ ITreasury.sol
✓ IP2PSwap.sol
Interfaces generated successfully!
Use Cases
For Integration Developers
Generate interfaces to:
- Build external contracts that interact with EVVM
- Create mock contracts for testing
- Ensure type-safe contract interactions
For Core Developers
Generate interfaces to:
- Update contract interfaces after modifications
- Maintain consistency across contracts
- Document public contract APIs
Usage Examples
Interactive Mode
Run without flags for interactive menu:
./evvm developer
This shows options:
Select an action:
🭬 Generate Contract Interfaces
Run Full Test Suite
exit
Generate Contract Interfaces
./evvm developer --makeInterface
Run Tests
./evvm developer --runTest
Related Commands
Examples
Complete Development Workflow
-
Generate interfaces:
./evvm developer --makeInterface -
Deploy to local testnet:
./evvm deploy --skipInputConfig -
Test integration:
# Use generated interfaces in your test contracts
Prerequisites
Before using developer commands:
- Foundry - Required for contract compilation
- Bun - Required for CLI execution
- Compiled contracts - Run
forge buildbefore generating interfaces
Troubleshooting
Contracts Not Compiled
If interface generation fails:
Error: No compiled contracts found
Solution: Compile contracts first:
forge build
Permission Issues
If file writing fails:
Solution: Ensure you have write permissions in the project directory.
Best Practices
- Regenerate after changes: Always regenerate interfaces after modifying contracts
- Version control: Commit generated interfaces to version control
- Testing: Use generated interfaces in test contracts for type safety
- Documentation: Interfaces serve as contract API documentation