@evvm/testnet-contracts 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +355 -55
  3. package/contracts/evvm/Evvm.sol +28 -31
  4. package/contracts/evvm/lib/ErrorsLib.sol +2 -1
  5. package/contracts/evvm/lib/EvvmStructs.sol +27 -1
  6. package/contracts/evvm/lib/SignatureUtils.sol +2 -5
  7. package/contracts/nameService/NameService.sol +118 -363
  8. package/contracts/nameService/lib/ErrorsLib.sol +1 -7
  9. package/contracts/nameService/lib/IdentityValidation.sol +182 -0
  10. package/contracts/nameService/lib/NameServiceStructs.sol +69 -0
  11. package/contracts/nameService/lib/SignatureUtils.sol +11 -4
  12. package/contracts/p2pSwap/P2PSwap.sol +41 -154
  13. package/contracts/p2pSwap/lib/P2PSwapStructs.sol +59 -0
  14. package/contracts/p2pSwap/lib/SignatureUtils.sol +1 -2
  15. package/contracts/staking/Estimator.sol +7 -6
  16. package/contracts/staking/Staking.sol +46 -146
  17. package/contracts/staking/lib/SignatureUtils.sol +1 -2
  18. package/contracts/staking/lib/StakingStructs.sol +94 -0
  19. package/contracts/treasury/Treasury.sol +18 -20
  20. package/contracts/treasuryTwoChains/TreasuryExternalChainStation.sol +88 -35
  21. package/contracts/treasuryTwoChains/TreasuryHostChainStation.sol +81 -47
  22. package/contracts/treasuryTwoChains/lib/ErrorsLib.sol +2 -0
  23. package/contracts/treasuryTwoChains/lib/ExternalChainStationStructs.sol +3 -14
  24. package/contracts/treasuryTwoChains/lib/HostChainStationStructs.sol +3 -7
  25. package/contracts/treasuryTwoChains/lib/SignatureUtils.sol +5 -7
  26. package/interfaces/IEstimator.sol +7 -50
  27. package/interfaces/IEvvm.sol +17 -91
  28. package/interfaces/INameService.sol +37 -88
  29. package/interfaces/IP2PSwap.sol +19 -15
  30. package/interfaces/IStaking.sol +20 -50
  31. package/interfaces/ITreasury.sol +1 -4
  32. package/interfaces/ITreasuryExternalChainStation.sol +11 -15
  33. package/interfaces/ITreasuryHostChainStation.sol +7 -10
  34. package/library/Erc191TestBuilder.sol +0 -1
  35. package/library/EvvmService.sol +14 -78
  36. package/library/primitives/IERC20.sol +79 -0
  37. package/library/utils/GovernanceUtils.sol +81 -0
  38. package/library/utils/{service/AsyncNonceService.sol → nonces/AsyncNonce.sol} +9 -11
  39. package/library/utils/nonces/SyncNonce.sol +27 -0
  40. package/library/utils/service/EvvmPayments.sol +77 -0
  41. package/library/utils/service/StakingServiceUtils.sol +15 -20
  42. package/package.json +11 -13
  43. package/library/utils/service/MakeServicePaymentOnEvvm.sol +0 -49
  44. package/library/utils/service/SyncNonceService.sol +0 -18
package/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
1
  Copyright (c) 2025
2
- GERMAN MARIA ABAL BAZZANO <g@evvm.org>
2
+ MATE Labs Inc., a Delaware corporation ("Licensor")
3
3
 
4
4
  EVVM is licensed under the EVVM Noncommercial License v1.0 (the "License").
5
5
  You may obtain a copy of the License text in this file or at:
@@ -47,7 +47,7 @@ URL for them above, as well as copies of any plain-text lines
47
47
  beginning with `Required Notice:` that the licensor provided
48
48
  with the software. For example:
49
49
 
50
- > Required Notice: Copyright (c) 2025 GERMAN MARIA ABAL BAZZANO (g@evvm.org)
50
+ > Required Notice: Copyright (c) 2025 MATE Labs Inc., a Delaware corporation ("Licensor")
51
51
 
52
52
  ## Changes and New Works License
53
53
 
package/README.md CHANGED
@@ -20,13 +20,21 @@ EVVM provides a complete ecosystem of smart contracts:
20
20
  ## Latest Features
21
21
 
22
22
  **Enhanced Deployment Experience:**
23
- - **Interactive TypeScript Wizard**: Modern, user-friendly deployment wizard with comprehensive guidance
24
- - **Automatic RPC Fallback**: 99%+ deployment success rate with 5 fallback RPCs per network
23
+ - **CLI Executable**: Global `evvm` command for seamless deployment and management
24
+ - **Interactive Wizard**: User-friendly deployment wizard with comprehensive guidance
25
+ - **Automatic RPC Fallback**: 99%+ deployment success rate with multiple fallback endpoints
25
26
  - **Deployment Summary**: Instant access to all deployed contract addresses with explorer links
26
27
  - **Auto Registry Integration**: Automatic EVVM registration and ID configuration
27
28
  - **Smart Prerequisites Check**: Automatic dependency initialization and validation
28
29
  - **Multi-Wallet Support**: Easy selection from your Foundry keystores
29
30
 
31
+ **CLI Commands Available:**
32
+ - `evvm deploy` - Deploy new EVVM instance with interactive setup
33
+ - `evvm register` - Register existing EVVM in the registry
34
+ - `evvm fulltest` - Run complete test suite
35
+ - `evvm help` - Display comprehensive help
36
+ - `evvm version` - Show CLI version
37
+
30
38
  **Reliability Improvements:**
31
39
  - Intelligent retry mechanism for network failures
32
40
  - Comprehensive error handling and troubleshooting guides
@@ -226,26 +234,57 @@ forge install hyperlane-xyz/hyperlane-monorepo # For cross-chain functionality
226
234
  ```
227
235
 
228
236
  ## Repository Structure
237
+ - `evvm` — CLI executable - Main entry point for all EVVM commands
238
+ - `cli/` — CLI source code (TypeScript)
239
+ - `index.ts` — Main entry point and CLI initialization
240
+ - `commands/` — Command implementations
241
+ - `deploy/` — Deployment command modules
242
+ - `deploySingle.ts` — Single-chain deployment
243
+ - `deployCross.ts` — Cross-chain deployment
244
+ - `register/` — Registration command modules
245
+ - `registerSingle.ts` — Single-chain registration
246
+ - `registerCross.ts` — Cross-chain registration
247
+ - `developer.ts` — Developer utilities
248
+ - `help.ts` — Help documentation
249
+ - `version.ts` — Version information
250
+ - `registerEvvm.ts` — EVVM registration logic
251
+ - `setUpCrossChainTreasuries.ts` — Cross-chain treasury setup
252
+ - `utils/` — Utility functions
253
+ - `configurationInputs.ts` — Configuration input handling
254
+ - `crossChain.ts` — Cross-chain utilities
255
+ - `explorerVerification.ts` — Block explorer contract verification
256
+ - `foundry.ts` — Foundry integration and scripts
257
+ - `prompts.ts` — Interactive CLI prompts
258
+ - `rpc.ts` — RPC endpoint management and fallback
259
+ - `validators.ts` — Input validation functions
260
+ - `constants/` — CLI constants and configuration
261
+ - `ChainData.json` — Network and chain configuration data
262
+ - `index.ts` — Constants exports
263
+ - `types/` — TypeScript type definitions
264
+ - `index.ts` — Type definitions
229
265
  - `src/contracts/evvm/` — Core EVVM contracts and storage
230
266
  - `src/contracts/nameService/` — NameService contracts for domain management
231
267
  - `src/contracts/staking/` — Staking and Estimator contracts
232
268
  - `src/contracts/treasury/` — Treasury contract for managing deposits and withdrawals
233
269
  - `src/contracts/p2pSwap/` — P2P token exchange service contracts
234
270
  - `src/lib/` — Shared Solidity libraries (AdvancedStrings, SignatureRecover, etc.)
235
- - `script/` — Foundry deployment scripts (e.g., `DeployTestnet.s.sol`)
236
- - `scripts/` — TypeScript utilities and deployment wizard (`evvm-init.ts`)
271
+ - `script/` — Foundry deployment scripts (e.g., `Deploy.s.sol`)
237
272
  - `lib/` — External dependencies (OpenZeppelin, Uniswap v3, forge-std)
238
273
  - `broadcast/` — Foundry deployment artifacts and transaction history
239
274
  - `cache/` — Foundry compilation cache
240
- - `input/` — Configuration files for deployment (generated by wizard)
241
- - `evvm-init.sh` — Legacy bash wizard (deprecated, use `npm run wizard` instead)
275
+ - `input/` — Configuration files for deployment (generated by CLI)
242
276
 
243
277
  ## Prerequisites
244
278
  - [Foundry](https://getfoundry.sh/) (Solidity development toolkit)
245
- - [Node.js](https://nodejs.org/) v16 or higher (required for deployment wizard)
279
+ - [Bun](https://bun.sh/) v1.0 or higher (JavaScript runtime for CLI - faster than Node.js)
246
280
  - Git (for cloning and managing the repository)
247
281
  - Environment variables set up (`.env` file with API keys and RPC URLs)
248
282
 
283
+ > **Note**: The CLI uses Bun for superior performance. If you don't have Bun installed, you can install it with:
284
+ > ```bash
285
+ > curl -fsSL https://bun.sh/install | bash
286
+ > ```
287
+
249
288
  ### Environment Setup
250
289
  Create a `.env` file with your configuration:
251
290
  ```bash
@@ -283,28 +322,69 @@ Want to create your own virtual blockchain? Follow these steps to deploy a compl
283
322
 
284
323
  ### 1. Clone and Install
285
324
  ```bash
286
- git clone https://github.com/EVVM-org/Testnet-Contracts
325
+ git clone --recursive https://github.com/EVVM-org/Testnet-Contracts
287
326
  cd Testnet-Contracts
288
327
  make install
289
328
  ```
290
329
 
291
- ### 2. Environment Setup
330
+ ### 2. Make CLI Globally Available (Optional but Recommended)
331
+ ```bash
332
+ # Make the CLI executable
333
+ chmod +x evvm
334
+
335
+ # Add to your PATH (choose one method):
336
+ # Method 1: Create symlink in local bin
337
+ mkdir -p ~/.local/bin
338
+ ln -s $(pwd)/evvm ~/.local/bin/evvm
339
+
340
+ # Method 2: Add to PATH in your shell profile
341
+ echo 'export PATH="'$(pwd)':$PATH"' >> ~/.bashrc # or ~/.zshrc
342
+ source ~/.bashrc # or source ~/.zshrc
343
+
344
+ # Verify installation
345
+ evvm version
346
+ ```
347
+
348
+ Once installed, you can use `evvm` commands from anywhere in your terminal.
349
+
350
+ ### 3. Environment Setup
292
351
  Create `.env` file with your configuration:
293
352
  ```bash
294
353
  cp .env.example .env
295
354
  # Add your RPC URLs and API keys
296
355
  ```
297
356
 
298
- ### 3. Secure Key Import
357
+ ### 4. Secure Key Import
299
358
  ```bash
300
359
  cast wallet import defaultKey --interactive
301
360
  ```
302
361
 
303
- ### 4. Interactive Setup & Deploy
362
+ ### 5. Deploy Using the CLI
363
+
364
+ The **recommended way** to deploy is using the EVVM CLI. You have two options:
365
+
366
+ **Option A: Using Global CLI (Recommended - if you completed step 2)**
367
+ ```bash
368
+ evvm deploy
369
+ ```
370
+
371
+ **Option B: Using NPM from the repository directory**
304
372
  ```bash
305
373
  npm run wizard
306
374
  ```
307
375
 
376
+ **Option C: Using CLI with custom options**
377
+ ```bash
378
+ # Skip interactive setup and use existing configuration
379
+ evvm deploy --skipInputConfig
380
+
381
+ # Deploy with a specific wallet
382
+ evvm deploy --walletName myWallet
383
+
384
+ # Combine options for quick deployment
385
+ evvm deploy -s -w myWallet
386
+ ```
387
+
308
388
  The interactive deployment wizard will guide you through:
309
389
  - **Prerequisites check** (Foundry, Git, Node.js)
310
390
  - **Dependency initialization** (git submodules - automatic)
@@ -315,8 +395,8 @@ The interactive deployment wizard will guide you through:
315
395
  - **Wallet selection** (from your Foundry keystores)
316
396
  - **Automatic deployment** with contract verification
317
397
  - **Deployment summary** with all contract addresses and explorer links
318
- - **Registry EVVM registration** (automatic for supported networks)
319
- - **EVVM ID configuration** (automatic setup)
398
+ - **Registry EVVM registration** (cross-chain registration on Ethereum Sepolia)
399
+ - **EVVM ID configuration** (automatic setup on your deployment chain)
320
400
 
321
401
  **What happens after deployment:**
322
402
  - All 6 core contracts deployed and verified on your chosen network
@@ -325,11 +405,158 @@ The interactive deployment wizard will guide you through:
325
405
  - Treasury contract address
326
406
  - Staking, Estimator, NameService, and P2PSwap addresses
327
407
  - Direct links to block explorer for each contract
328
- - Automatic registration with Registry EVVM (Ethereum Sepolia)
329
- - EVVM ID assigned and configured
408
+ - **Cross-chain registration flow:**
409
+ 1. Registry registration happens on Ethereum Sepolia (where the Registry EVVM lives)
410
+ 2. You receive a unique EVVM ID (e.g., ID: 1090)
411
+ 3. The EVVM ID is then set on your deployed contract (on your deployment chain)
412
+ 4. Both transactions show explorer links for verification
330
413
 
331
414
  That's it! Your EVVM virtual blockchain is now deployed, verified, and ready to use.
332
415
 
416
+ ## CLI Commands Reference
417
+
418
+ The EVVM CLI provides powerful commands for managing your EVVM deployments:
419
+
420
+ ### Deploy Command
421
+
422
+ Deploy a new EVVM instance with interactive configuration:
423
+
424
+ ```bash
425
+ evvm deploy [options]
426
+ ```
427
+
428
+ **Options:**
429
+ - `--skipInputConfig`, `-s` - Skip interactive setup, use existing `./input/Inputs.sol`
430
+ - `--walletName <name>`, `-w <name>` - Specify Foundry wallet (default: `defaultKey`)
431
+
432
+ **Examples:**
433
+ ```bash
434
+ # Interactive deployment with configuration wizard
435
+ evvm deploy
436
+
437
+ # Deploy using existing configuration
438
+ evvm deploy --skipInputConfig
439
+
440
+ # Deploy with specific wallet
441
+ evvm deploy --walletName myWallet
442
+
443
+ # Quick deploy with existing config and custom wallet
444
+ evvm deploy -s -w production
445
+ ```
446
+
447
+ ### Register Command
448
+
449
+ Register an existing EVVM instance in the registry:
450
+
451
+ ```bash
452
+ evvm register [options]
453
+ ```
454
+
455
+ **Options:**
456
+ - `--evvmAddress <address>` - EVVM contract address to register
457
+ - `--walletName <name>`, `-w <name>` - Foundry wallet name (default: `defaultKey`)
458
+ - `--useCustomEthRpc` - Use custom Ethereum Sepolia RPC for registry calls
459
+
460
+ **Examples:**
461
+ ```bash
462
+ # Register with prompts for missing information
463
+ evvm register
464
+
465
+ # Register with specific EVVM address
466
+ evvm register --evvmAddress 0x123...
467
+
468
+ # Register with custom wallet and RPC
469
+ evvm register --evvmAddress 0x123... --walletName myWallet --useCustomEthRpc
470
+ ```
471
+
472
+ **Note**: The RPC URL for your deployment chain is read from the `RPC_URL` environment variable in your `.env` file.
473
+
474
+ ### Test Command
475
+
476
+ Run the complete EVVM test suite:
477
+
478
+ ```bash
479
+ evvm fulltest
480
+ ```
481
+
482
+ Executes all unit tests with:
483
+ - Test results summary
484
+ - Detailed execution logs
485
+ - Gas usage reports
486
+ - Progress indicators
487
+
488
+ ### Help Command
489
+
490
+ Display comprehensive CLI documentation:
491
+
492
+ ```bash
493
+ evvm help
494
+ # or
495
+ evvm --help
496
+ evvm -h
497
+ ```
498
+
499
+ ### Version Command
500
+
501
+ Show current CLI version:
502
+
503
+ ```bash
504
+ evvm version
505
+ # or
506
+ evvm --version
507
+ evvm -v
508
+ ```
509
+
510
+ ### Global Options
511
+
512
+ These options work with any command:
513
+
514
+ - `-h`, `--help` - Show help for the command
515
+ - `-v`, `--version` - Show CLI version
516
+
517
+ ### Environment Variables
518
+
519
+ The CLI reads configuration from your `.env` file:
520
+
521
+ ```bash
522
+ # Required for deployment
523
+ RPC_URL=https://sepolia-rollup.arbitrum.io/rpc
524
+
525
+ # Optional: Custom Ethereum Sepolia RPC (for registry operations)
526
+ ETH_SEPOLIA_RPC=https://eth-sepolia.public.blastapi.io
527
+
528
+ # Optional: Block explorer API key for contract verification
529
+ ETHERSCAN_API=your_api_key_here
530
+
531
+ # Optional: For Blockscout verification
532
+ BLOCKSCOUT_HOMEPAGE=https://sepolia.explorer.com
533
+ ```
534
+
535
+ ### CLI Features
536
+
537
+ Automatic RPC Fallback:
538
+ - Automatically tries 5 fallback endpoints if primary RPC fails
539
+ - 99%+ deployment success rate
540
+ - No manual intervention required
541
+
542
+ Smart Prerequisites Check:
543
+ - Validates Foundry installation
544
+ - Verifies wallet configuration
545
+ - Checks network connectivity
546
+ - Initializes git submodules automatically
547
+
548
+ Interactive Prompts:
549
+ - Address validation with format checking
550
+ - Secure password input for sensitive data
551
+ - Arrow-key selection menus
552
+ - Confirmation dialogs with defaults
553
+
554
+ Comprehensive Error Handling:
555
+ - Clear error messages with troubleshooting tips
556
+ - Automatic retry on transient failures
557
+ - Helpful suggestions for common issues
558
+ - Direct links to documentation
559
+
333
560
  ## Manual Configuration (Alternative)
334
561
 
335
562
  If you prefer manual control over configuration, create these files in `input/`:
@@ -356,12 +583,14 @@ If you prefer manual control over configuration, create these files in `input/`:
356
583
  **input/evvmAdvancedMetadata.json**:
357
584
  ```json
358
585
  {
359
- "totalSupply": 2033333333000000000000000000,
360
586
  "eraTokens": 1016666666500000000000000000,
361
- "reward": 5000000000000000000
587
+ "reward": 5000000000000000000,
588
+ "totalSupply": 2033333333000000000000000000
362
589
  }
363
590
  ```
364
591
 
592
+ > **Important**: The field order in `evvmAdvancedMetadata.json` **must be alphabetical** (`eraTokens`, `reward`, `totalSupply`). Foundry's `vm.parseJson` decodes fields alphabetically, not by matching field names. Do not use code formatters (like Prettier) on these files as they may reorder fields incorrectly.
593
+
365
594
  ## Local Development & Manual Deployment
366
595
 
367
596
  ### Start Local Development
@@ -400,7 +629,7 @@ make help # Show all available commands
400
629
 
401
630
  ### NPM Scripts
402
631
  ```bash
403
- npm run wizard # Run interactive deployment wizard (recommended)
632
+ npm run wizard # Run interactive deployment wizard (uses CLI internally)
404
633
  npm run build # Copy src/ files to root (for NPM publishing)
405
634
  npm run clean # Remove copied files from root
406
635
  npm run compile # forge build
@@ -410,6 +639,25 @@ npm run deploy:sepolia # Deploy to Ethereum Sepolia
410
639
  npm run deploy:arbitrum # Deploy to Arbitrum Sepolia
411
640
  ```
412
641
 
642
+ ### Direct CLI Usage
643
+
644
+ Once you've set up the CLI executable, use it directly:
645
+
646
+ ```bash
647
+ evvm deploy # Deploy new EVVM instance
648
+ evvm register # Register existing EVVM
649
+ evvm fulltest # Run test suite
650
+ evvm help # Show all commands
651
+ evvm version # Show CLI version
652
+ ```
653
+
654
+ Advantages of direct CLI usage:
655
+ - Faster execution with Bun runtime
656
+ - Available globally from any directory
657
+ - Cleaner syntax
658
+ - Better error messages
659
+ - Tab completion support in compatible shells
660
+
413
661
  ## RPC Reliability
414
662
 
415
663
  The deployment wizard includes an intelligent RPC fallback mechanism to ensure maximum deployment success rates, even when individual RPC providers experience downtime.
@@ -421,18 +669,18 @@ The deployment wizard includes an intelligent RPC fallback mechanism to ensure m
421
669
  **Multi-Provider Support**: Each network has 5 verified RPC endpoints:
422
670
 
423
671
  **Ethereum Sepolia Fallback Chain:**
424
- 1. `https://0xrpc.io/sep` (Primary)
425
- 2. `https://ethereum-sepolia.rpc.subquery.network/public` (0.165s latency)
426
- 3. `https://ethereum-sepolia.gateway.tatum.io` (0.172s latency)
427
- 4. `https://sepolia.drpc.org` (0.192s latency)
428
- 5. `https://gateway.tenderly.co/public/sepolia` (0.184s latency)
672
+ 1. `https://1rpc.io/sepolia` (1RPC - fastest)
673
+ 2. `https://ethereum-sepolia.rpc.subquery.network/public` (SubQuery)
674
+ 3. `https://ethereum-sepolia-rpc.publicnode.com` (PublicNode - stable)
675
+ 4. `https://sepolia.drpc.org` (dRPC)
676
+ 5. `https://gateway.tenderly.co/public/sepolia` (Tenderly)
429
677
 
430
678
  **Arbitrum Sepolia Fallback Chain:**
431
679
  1. `https://sepolia-rollup.arbitrum.io/rpc` (Official Arbitrum)
432
- 2. `https://arbitrum-sepolia.gateway.tenderly.co` (0.167s latency)
433
- 3. `https://endpoints.omniatech.io/v1/arbitrum/sepolia/public` (0.258s latency)
434
- 4. `https://arbitrum-sepolia.drpc.org` (0.590s latency)
435
- 5. `https://arbitrum-sepolia-rpc.publicnode.com` (0.430s latency)
680
+ 2. `https://arbitrum-sepolia.gateway.tenderly.co` (Tenderly)
681
+ 3. `https://endpoints.omniatech.io/v1/arbitrum/sepolia/public` (Omnia)
682
+ 4. `https://arbitrum-sepolia-rpc.publicnode.com` (PublicNode)
683
+ 5. `https://arbitrum-sepolia.drpc.org` (dRPC)
436
684
 
437
685
  **Smart Retry Logic**: The wizard displays clear progress messages during fallback attempts and provides troubleshooting tips if all endpoints fail.
438
686
 
@@ -448,40 +696,48 @@ The deployment wizard includes an intelligent RPC fallback mechanism to ensure m
448
696
  After successful deployment, the wizard displays a comprehensive summary of all deployed contracts:
449
697
 
450
698
  ```
451
- ═══════════════════════════════════════════════════════════
452
- DEPLOYED CONTRACTS SUMMARY
453
- ═══════════════════════════════════════════════════════════
699
+ DEPLOYED CONTRACTS SUMMARY
700
+ ==========================
454
701
 
455
- Network: Ethereum Sepolia (Chain ID: 11155111)
702
+ Network: Arbitrum Sepolia (Chain ID: 421614)
456
703
 
457
704
  Core Contracts:
458
- EVVM: 0xb0994626541c9bd3d64605dee610386c7a005a39
459
- https://sepolia.etherscan.io/address/0xb099...
460
- Treasury: 0x47be342c4d803490530737cac7bcf34916cf7e80
461
- https://sepolia.etherscan.io/address/0x47be...
705
+ EVVM: 0x3e562a2e932afd6c1630d5f3b8eb3d88a4b058c2
706
+ https://sepolia.arbiscan.io/address/0x3e56...
707
+ Treasury: 0x5c3a673dcf38e08b1f4e361ed7ed7be76df7b188
708
+ https://sepolia.arbiscan.io/address/0x5c3a...
462
709
 
463
710
  Supporting Contracts:
464
- Staking: 0xc2cd4ec40bb4fa6f98c7b7095f692588e6b68fd4
465
- Estimator: 0x1adf3fd08f0744f24bb29bbfcfb57a5f37f144cb
466
- NameService: 0xe28eedff481b7c640394f44070309a0afe06de00
467
- P2PSwap: 0xc90dc57d848fae4ecf46268b8a90015085968645
711
+ Staking: 0xcdef28d767f0029f0e75563c8e7ed44a2aab6cf2
712
+ Estimator: 0xcfff3e950c3b1f7b850394d4cf3d60b31041f139
713
+ NameService: 0xdfa5e2529b06683dcec37f67f0607f294809a512
714
+ P2PSwap: 0xef2efb60d353731287696d74d360c635844f0ae2
468
715
 
469
- ═══════════════════════════════════════════════════════════
716
+ REGISTRY EVVM REGISTRATION
717
+ ==========================
718
+
719
+ EVVM Address: 0x3e562a2e932afd6c1630d5f3b8eb3d88a4b058c2
720
+ Deployed on: Arbitrum Sepolia (Chain ID: 421614)
721
+ Registry: Ethereum Sepolia (cross-chain registration)
722
+
723
+ EVVM registered with ID: 1090
724
+ EVVM ID 1090 set on Arbitrum Sepolia
470
725
  ```
471
726
 
472
727
  This summary includes:
473
728
  - Network name and chain ID
474
729
  - All 6 deployed contract addresses
475
- - Direct links to block explorer for verification
730
+ - Direct links to block explorer for verification (Etherscan for ETH Sepolia, Arbiscan for Arbitrum Sepolia)
476
731
  - Organized by contract importance (Core vs Supporting)
732
+ - Cross-chain registration status and assigned EVVM ID
477
733
 
478
734
  ## Troubleshooting
479
735
 
480
736
  ### RPC Connection Issues
481
737
 
482
- **Problem**: Deployment fails with "Connection timed out" or "HTTP error 522"
738
+ Problem: Deployment fails with "Connection timed out" or "HTTP error 522"
483
739
 
484
- **Solution**: The wizard automatically tries fallback RPCs. If all fail:
740
+ Solution: The wizard automatically tries fallback RPCs. If all fail:
485
741
  1. Check your internet connection
486
742
  2. Verify firewall/VPN settings aren't blocking RPC endpoints
487
743
  3. Try again later (temporary provider downtime)
@@ -489,9 +745,9 @@ This summary includes:
489
745
 
490
746
  ### Wallet Not Found
491
747
 
492
- **Problem**: "No wallets found" error during deployment
748
+ Problem: "No wallets found" error during deployment
493
749
 
494
- **Solution**:
750
+ Solution:
495
751
  ```bash
496
752
  cast wallet import <WALLET_NAME> --interactive
497
753
  ```
@@ -499,9 +755,9 @@ Then run the wizard again and select your imported wallet.
499
755
 
500
756
  ### Insufficient Funds
501
757
 
502
- **Problem**: Deployment fails with "insufficient funds for gas"
758
+ Problem: Deployment fails with "insufficient funds for gas"
503
759
 
504
- **Solution**:
760
+ Solution:
505
761
  1. Get testnet ETH from faucets:
506
762
  - Ethereum Sepolia: [sepoliafaucet.com](https://sepoliafaucet.com/)
507
763
  - Arbitrum Sepolia: [faucet.quicknode.com/arbitrum/sepolia](https://faucet.quicknode.com/arbitrum/sepolia)
@@ -510,28 +766,71 @@ Then run the wizard again and select your imported wallet.
510
766
 
511
767
  ### Git Submodules Not Initialized
512
768
 
513
- **Problem**: Compilation fails with missing dependencies
769
+ Problem: Compilation fails with missing dependencies
514
770
 
515
- **Solution**: The wizard automatically initializes submodules, but you can also do it manually:
771
+ Solution: The wizard automatically initializes submodules, but you can also do it manually:
516
772
  ```bash
517
773
  git submodule update --init --recursive
518
774
  ```
519
775
 
520
776
  ### Contract Size Too Large
521
777
 
522
- **Problem**: "Contract code size exceeds 24576 bytes"
778
+ Problem: "Contract code size exceeds 24576 bytes"
523
779
 
524
- **Solution**: The project uses `via-ir` optimization to stay under limits. If you modified contracts:
780
+ Solution: The project uses `via-ir` optimization to stay under limits. If you modified contracts:
525
781
  ```bash
526
782
  make seeSizes # Check contract sizes
527
783
  ```
528
784
  Consider refactoring large contracts or using libraries.
529
785
 
786
+ ### CLI Command Not Found
787
+
788
+ Problem: `evvm: command not found` when trying to run CLI commands
789
+
790
+ Solution: The CLI executable is not in your PATH. You have three options:
791
+
792
+ 1. **Run from the repository directory:**
793
+ ```bash
794
+ ./evvm deploy
795
+ ```
796
+
797
+ 2. **Add to PATH temporarily (current session only):**
798
+ ```bash
799
+ export PATH="$(pwd):$PATH"
800
+ evvm deploy
801
+ ```
802
+
803
+ 3. **Add to PATH permanently (recommended):**
804
+ ```bash
805
+ # For bash
806
+ echo 'export PATH="'$(pwd)':$PATH"' >> ~/.bashrc
807
+ source ~/.bashrc
808
+
809
+ # For zsh
810
+ echo 'export PATH="'$(pwd)':$PATH"' >> ~/.zshrc
811
+ source ~/.zshrc
812
+ ```
813
+
814
+ ### Bun Not Installed
815
+
816
+ Problem: CLI fails with "bun: command not found"
817
+
818
+ Solution: Install Bun runtime:
819
+ ```bash
820
+ curl -fsSL https://bun.sh/install | bash
821
+
822
+ # Restart your terminal or run:
823
+ source ~/.bashrc # or source ~/.zshrc
824
+
825
+ # Verify installation
826
+ bun --version
827
+ ```
828
+
530
829
  ### TypeScript/TSX Not Found
531
830
 
532
- **Problem**: `npm run wizard` fails with "tsx: command not found"
831
+ Problem: `npm run wizard` fails with "tsx: command not found"
533
832
 
534
- **Solution**:
833
+ Solution:
535
834
  ```bash
536
835
  npm install # Reinstall dependencies
537
836
  ```
@@ -548,8 +847,9 @@ The EVVM ecosystem consists of six main contracts:
548
847
 
549
848
  ## Configuration Files
550
849
  Key files for EVVM deployment:
551
- - `scripts/evvm-init.ts` — Interactive TypeScript deployment wizard (run with `npm run wizard`)
552
- - `input/` — Generated configuration files (address.json, evvmBasicMetadata.json, evvmAdvancedMetadata.json)
850
+ - `evvm` — CLI executable entry point (run with `./evvm` or just `evvm` if in PATH)
851
+ - `cli/` — CLI implementation (TypeScript with Bun runtime)
852
+ - `input/Inputs.sol` — Generated deployment configuration (created by CLI wizard)
553
853
  - `.env` — Environment variables (RPC URLs, API keys)
554
854
  - `foundry.toml` — Foundry project configuration
555
855
  - `makefile` — Build and deployment automation