@evvm/testnet-contracts 2.2.3 → 3.0.0

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 (71) hide show
  1. package/LICENSE +145 -118
  2. package/README.md +162 -39
  3. package/contracts/core/Core.sol +1394 -0
  4. package/contracts/core/lib/CoreStorage.sol +171 -0
  5. package/contracts/nameService/NameService.sol +666 -586
  6. package/contracts/nameService/lib/IdentityValidation.sol +18 -3
  7. package/contracts/p2pSwap/P2PSwap.sol +439 -285
  8. package/contracts/staking/Estimator.sol +128 -40
  9. package/contracts/staking/Staking.sol +329 -322
  10. package/contracts/treasury/Treasury.sol +48 -37
  11. package/contracts/treasuryTwoChains/TreasuryExternalChainStation.sol +585 -198
  12. package/contracts/treasuryTwoChains/TreasuryHostChainStation.sol +425 -174
  13. package/contracts/treasuryTwoChains/lib/PayloadUtils.sol +2 -4
  14. package/interfaces/{IEvvm.sol → ICore.sol} +67 -29
  15. package/interfaces/IEstimator.sol +1 -1
  16. package/interfaces/INameService.sol +58 -52
  17. package/interfaces/IP2PSwap.sol +18 -17
  18. package/interfaces/IStaking.sol +22 -17
  19. package/interfaces/ITreasury.sol +2 -1
  20. package/interfaces/ITreasuryExternalChainStation.sol +15 -9
  21. package/interfaces/ITreasuryHostChainStation.sol +14 -11
  22. package/interfaces/IUserValidator.sol +6 -0
  23. package/library/Erc191TestBuilder.sol +350 -297
  24. package/library/EvvmService.sol +38 -27
  25. package/library/errors/CoreError.sol +116 -0
  26. package/library/errors/CrossChainTreasuryError.sol +36 -0
  27. package/library/errors/NameServiceError.sol +79 -0
  28. package/library/errors/StakingError.sol +79 -0
  29. package/library/errors/TreasuryError.sol +33 -0
  30. package/library/primitives/SignatureRecover.sol +33 -0
  31. package/library/structs/CoreStructs.sol +146 -0
  32. package/library/structs/ExternalChainStationStructs.sol +92 -0
  33. package/library/structs/HostChainStationStructs.sol +77 -0
  34. package/library/structs/NameServiceStructs.sol +47 -0
  35. package/library/structs/P2PSwapStructs.sol +127 -0
  36. package/library/structs/StakingStructs.sol +67 -0
  37. package/library/utils/AdvancedStrings.sol +84 -5
  38. package/library/utils/CAUtils.sol +29 -0
  39. package/library/utils/SignatureUtil.sol +34 -0
  40. package/library/utils/governance/Admin.sol +66 -0
  41. package/library/utils/governance/ProposalStructs.sol +49 -0
  42. package/library/utils/service/CoreExecution.sol +177 -0
  43. package/library/utils/service/StakingServiceUtils.sol +30 -3
  44. package/library/utils/signature/CoreHashUtils.sol +73 -0
  45. package/library/utils/signature/NameServiceHashUtils.sol +156 -0
  46. package/library/utils/signature/P2PSwapHashUtils.sol +65 -0
  47. package/library/utils/signature/StakingHashUtils.sol +41 -0
  48. package/library/utils/signature/TreasuryCrossChainHashUtils.sol +40 -0
  49. package/package.json +2 -1
  50. package/contracts/evvm/Evvm.sol +0 -1327
  51. package/contracts/evvm/lib/ErrorsLib.sol +0 -18
  52. package/contracts/evvm/lib/EvvmStorage.sol +0 -62
  53. package/contracts/evvm/lib/EvvmStructs.sol +0 -90
  54. package/contracts/evvm/lib/SignatureUtils.sol +0 -120
  55. package/contracts/nameService/lib/ErrorsLib.sol +0 -21
  56. package/contracts/nameService/lib/NameServiceStructs.sol +0 -69
  57. package/contracts/nameService/lib/SignatureUtils.sol +0 -245
  58. package/contracts/p2pSwap/lib/P2PSwapStructs.sol +0 -59
  59. package/contracts/p2pSwap/lib/SignatureUtils.sol +0 -98
  60. package/contracts/staking/lib/ErrorsLib.sol +0 -22
  61. package/contracts/staking/lib/SignatureUtils.sol +0 -39
  62. package/contracts/staking/lib/StakingStructs.sol +0 -94
  63. package/contracts/treasury/lib/ErrorsLib.sol +0 -11
  64. package/contracts/treasuryTwoChains/lib/ErrorsLib.sol +0 -48
  65. package/contracts/treasuryTwoChains/lib/ExternalChainStationStructs.sol +0 -80
  66. package/contracts/treasuryTwoChains/lib/HostChainStationStructs.sol +0 -87
  67. package/contracts/treasuryTwoChains/lib/SignatureUtils.sol +0 -79
  68. package/library/utils/GovernanceUtils.sol +0 -81
  69. package/library/utils/nonces/AsyncNonce.sol +0 -32
  70. package/library/utils/nonces/SyncNonce.sol +0 -27
  71. package/library/utils/service/EvvmPayments.sol +0 -79
package/LICENSE CHANGED
@@ -1,166 +1,193 @@
1
- Copyright (c) 2025
2
- MATE Labs Inc., a Delaware corporation ("Licensor")
1
+ ================================================================================
2
+ EVVM NONCOMMERCIAL LICENSE v1.0
3
+ ================================================================================
3
4
 
4
- EVVM is licensed under the EVVM Noncommercial License v1.0 (the "License").
5
- You may obtain a copy of the License text in this file or at:
5
+ SPDX-License-Identifier: EVVM-NONCOMMERCIAL-1.0
6
+
7
+ Copyright (c) 2025 MATE Labs Inc., a Delaware corporation
8
+
9
+ ================================================================================
10
+
11
+ 1. OVERVIEW
12
+
13
+ This software is licensed under a modified PolyForm Noncommercial License
14
+ 1.0.0 with additional share-alike requirements. You may use, modify, and
15
+ distribute this software for noncommercial purposes only, subject to the terms
16
+ below.
17
+
18
+ COMMERCIAL USE REQUIRES A SEPARATE LICENSE.
19
+ For commercial licensing inquiries, contact: g@evvm.org
20
+
21
+ Full license text available at:
6
22
  https://polyformproject.org/licenses/noncommercial/1.0.0/
7
23
 
8
- COMMERCIAL USE OF THIS SOFTWARE REQUIRES A SEPARATE COMMERCIAL LICENSE.
9
- For commercial licensing, please contact g@evvm.org.
24
+ ================================================================================
25
+
26
+ 2. BASE LICENSE: PolyForm Noncommercial 1.0.0
27
+
28
+ 2.1 Acceptance
29
+
30
+ By using this software, you agree to these terms as binding obligations and
31
+ conditions.
32
+
33
+ 2.2 Copyright License
34
+
35
+ MATE Labs Inc. grants you a copyright license to use the software for any
36
+ permitted purpose, subject to the distribution and modification restrictions
37
+ below.
38
+
39
+ 2.3 Distribution License
40
+
41
+ You may distribute copies of the software, including modified versions,
42
+ provided you comply with Section 3 (Share-Alike Requirements) and Section 2.4
43
+ (Notices).
44
+
45
+ 2.4 Notices
46
+
47
+ Anyone receiving the software from you must also receive:
48
+ - A copy of this license or the URL:
49
+ https://polyformproject.org/licenses/noncommercial/1.0.0/
50
+ - The following notice: "Copyright (c) 2025 MATE Labs Inc."
51
+
52
+ 2.5 Changes and New Works License
53
+
54
+ You may create modifications and derivative works for any permitted purpose,
55
+ subject to Section 3.
56
+
57
+ 2.6 Patent License
58
+
59
+ MATE Labs Inc. grants you a patent license covering any patent claims that
60
+ would be infringed by using the software.
61
+
62
+ 2.7 Permitted Purposes
63
+
64
+ The following are permitted purposes:
65
+
66
+ - Noncommercial purposes: Any use that does not generate revenue or provide
67
+ commercial advantage
10
68
 
11
- --------------------------------------------------------------------------------
69
+ - Personal use: Research, experimentation, testing, study, entertainment,
70
+ hobbies, or religious observance without commercial application
12
71
 
13
- # PolyForm Noncommercial License 1.0.0
72
+ - Noncommercial organizations: Use by charitable, educational, research,
73
+ public safety, health, environmental, or government institutions
14
74
 
15
- https://polyformproject.org/licenses/noncommercial/1.0.0
75
+ 2.8 Fair Use
16
76
 
17
- ## Acceptance
77
+ These terms do not limit your fair use rights under applicable law.
18
78
 
19
- In order to get any license under these terms, you must agree
20
- to them as both strict obligations and conditions to all
21
- your licenses.
79
+ 2.9 No Sublicensing
22
80
 
23
- ## Copyright License
81
+ You may not sublicense or transfer your licenses to others.
24
82
 
25
- The licensor grants you a copyright license for the
26
- software to do everything you might do with the software
27
- that would otherwise infringe the licensor's copyright
28
- in it for any permitted purpose. However, you may
29
- only distribute the software according to [Distribution
30
- License](#distribution-license) and make changes or new works
31
- based on the software according to [Changes and New Works
32
- License](#changes-and-new-works-license).
83
+ 2.10 Patent Defense
33
84
 
34
- ## Distribution License
85
+ If you or your company claims the software infringes any patent, all your
86
+ licenses terminate immediately.
35
87
 
36
- The licensor grants you an additional copyright license
37
- to distribute copies of the software. Your license
38
- to distribute covers distributing the software with
39
- changes and new works permitted by [Changes and New Works
40
- License](#changes-and-new-works-license).
88
+ 2.11 Violations and Cure Period
41
89
 
42
- ## Notices
90
+ If you violate these terms, you have 32 days from written notification to:
91
+ - Come into full compliance, AND
92
+ - Take practical steps to correct past violations
43
93
 
44
- You must ensure that anyone who gets a copy of any part of
45
- the software from you also gets a copy of these terms or the
46
- URL for them above, as well as copies of any plain-text lines
47
- beginning with `Required Notice:` that the licensor provided
48
- with the software. For example:
94
+ Otherwise, all licenses terminate immediately.
49
95
 
50
- > Required Notice: Copyright (c) 2025 MATE Labs Inc., a Delaware corporation ("Licensor")
96
+ ================================================================================
51
97
 
52
- ## Changes and New Works License
98
+ 3. SHARE-ALIKE REQUIREMENTS
53
99
 
54
- The licensor grants you an additional copyright license to
55
- make changes and new works based on the software for any
56
- permitted purpose.
100
+ 3.1 Scope
57
101
 
58
- ## Patent License
102
+ If you create a Derivative Work and engage in Triggering Distribution, you
103
+ must publicly release that Derivative Work under this same license.
59
104
 
60
- The licensor grants you a patent license for the software that
61
- covers patent claims the licensor can license, or becomes able
62
- to license, that you would infringe by using the software.
105
+ 3.2 Definitions
63
106
 
64
- ## Noncommercial Purposes
107
+ "Derivative Work" means any modification, enhancement, or work based on the
108
+ software that:
109
+ - Alters, adds, or removes functionality of the original code
110
+ - Incorporates substantial portions of the original source code
111
+ - Creates new components that depend on or interface with the original
112
+ software
65
113
 
66
- Any noncommercial purpose is a permitted purpose.
114
+ Derivative Work does NOT include:
115
+ - Configuration files or parameters
116
+ - Plugins or extensions that use only public APIs
117
+ - Works that merely link to or use the software as a library without
118
+ modification
67
119
 
68
- ## Personal Uses
120
+ "Triggering Distribution" means:
121
+ - Making the Derivative Work available to any third party (whether by
122
+ download, hosting, or other means)
123
+ - Using the Derivative Work to provide services accessible to third parties
124
+ - Deploying the Derivative Work in production environments accessible to
125
+ others
69
126
 
70
- Personal use for research, experiment, and testing for
71
- the benefit of public knowledge, personal study, private
72
- entertainment, hobby projects, amateur pursuits, or religious
73
- observance, without any anticipated commercial application,
74
- is use for a permitted purpose.
127
+ 3.3 Publication Requirements
75
128
 
76
- ## Noncommercial Organizations
129
+ Within 90 days of first Triggering Distribution, you must:
77
130
 
78
- Use by any charitable organization, educational institution,
79
- public research organization, public safety or health
80
- organization, environmental protection organization,
81
- or government institution is use for a permitted purpose
82
- regardless of the source of funding or obligations resulting
83
- from the funding.
131
+ 1. Publish source code on a publicly accessible platform (e.g., GitHub,
132
+ GitLab, Codeberg)
84
133
 
85
- ## Fair Use
134
+ 2. Include this license with the published code
86
135
 
87
- You may have "fair use" rights for the software under the
88
- law. These terms do not limit them.
136
+ 3. Provide clear attribution identifying:
137
+ - The original work (EVVM)
138
+ - MATE Labs Inc. as the original licensor
139
+ - A description of your modifications
89
140
 
90
- ## No Other Rights
141
+ 4. Ensure accessibility - the code must remain publicly available for at
142
+ least 3 years
91
143
 
92
- These terms do not allow you to sublicense or transfer any of
93
- your licenses to anyone else, or prevent the licensor from
94
- granting licenses to anyone else. These terms do not imply
95
- any other licenses.
144
+ 3.4 Internal Use Exception
96
145
 
97
- ## Patent Defense
146
+ You are NOT required to publish Derivative Works that:
147
+ - Remain internal to your organization
148
+ - Are not distributed to third parties
149
+ - Are not used to provide services to external users
98
150
 
99
- If you make any written claim that the software infringes or
100
- contributes to infringement of any patent, your patent license
101
- for the software granted under these terms ends immediately. If
102
- your company makes such a claim, your patent license ends
103
- immediately for work on behalf of your company.
151
+ However, once you engage in Triggering Distribution, the 90-day publication
152
+ requirement begins.
104
153
 
105
- ## Violations
154
+ ================================================================================
106
155
 
107
- The first time you are notified in writing that you have
108
- violated any of these terms, or done anything with the software
109
- not covered by your licenses, your licenses can nonetheless
110
- continue if you come into full compliance with these terms,
111
- and take practical steps to correct past violations, within
112
- 32 days of receiving notice. Otherwise, all your licenses
113
- end immediately.
156
+ 4. NO LIABILITY
114
157
 
115
- ## No Liability
158
+ AS FAR AS THE LAW ALLOWS, THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY
159
+ WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
160
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT.
116
161
 
117
- ***As far as the law allows, the software comes as is, without
118
- any warranty or condition, and the licensor will not be liable
119
- to you for any damages arising out of these terms or the use
120
- or nature of the software, under any kind of legal claim.***
162
+ MATE LABS INC. SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING FROM THE USE OF
163
+ THIS SOFTWARE UNDER ANY LEGAL THEORY.
121
164
 
122
- ## Definitions
165
+ ================================================================================
123
166
 
124
- The **licensor** is GERMAN MARIA ABAL BAZZANO (g@evvm.org),
125
- and the **software** is EVVM and related components made
126
- available under these terms.
167
+ 5. DEFINITIONS
127
168
 
128
- **You** refers to the individual or entity agreeing to these
129
- terms.
169
+ - "MATE Labs Inc." or "Licensor": MATE Labs Inc., a Delaware corporation
130
170
 
131
- **Your company** is any legal entity, sole proprietorship,
132
- or other kind of organization that you work for, plus all
133
- organizations that have control over, are under the control of,
134
- or are under common control with that organization. **Control**
135
- means ownership of substantially all the assets of an entity,
136
- or the power to direct its management and policies by vote,
137
- contract, or otherwise. Control can be direct or indirect.
171
+ - "Software": EVVM and all related components distributed under this license
138
172
 
139
- **Your licenses** are all the licenses granted to you for the
140
- software under these terms.
173
+ - "You": The individual or entity agreeing to these terms
141
174
 
142
- **Use** means anything you do with the software requiring one
143
- of your licenses.
175
+ - "Your company": Any legal entity you work for, plus all entities under
176
+ common control
144
177
 
145
- --------------------------------------------------------------------------------
178
+ - "Control": Ownership of substantially all assets or power to direct
179
+ management
146
180
 
147
- ADDITIONAL TERMS (Share-Alike Requirement):
181
+ - "Use": Any activity with the software requiring a license
148
182
 
149
- 1. Any modifications, enhancements, or derivative works created under non-commercial use
150
- must be publicly released under this same License within 90 days of creation,
151
- distribution, or other availability.
183
+ ================================================================================
152
184
 
153
- 2. "Publicly released" requires making source code freely accessible on platforms like
154
- GitHub or GitLab, with clear attribution to the original work.
185
+ 6. QUESTIONS AND COMMERCIAL LICENSING
155
186
 
156
- 3. These terms supplement and do not replace any conditions in the PolyForm
157
- Noncommercial 1.0.0 license.
187
+ For questions about this license or to obtain a commercial license:
188
+ - Email: g@evvm.org
189
+ - Include "EVVM License Inquiry" in subject line
158
190
 
159
- --------------------------------------------------------------------------------
191
+ ================================================================================
160
192
 
161
- DISCLAIMER OF WARRANTY:
162
- THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
163
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
164
- FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
165
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING
166
- FROM THE USE OF THIS SOFTWARE.
193
+ END OF LICENSE
package/README.md CHANGED
@@ -1,91 +1,214 @@
1
1
  # EVVM Testnet Contracts
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@evvm/testnet-contracts.svg)](https://www.npmjs.com/package/@evvm/testnet-contracts) [![license](https://img.shields.io/badge/license-EVVM--NONCOMMERCIAL--1.0-blue.svg)](LICENSE) [![docs](https://img.shields.io/badge/docs-evvm.info-blue.svg)](https://www.evvm.info/)[![npm downloads](https://img.shields.io/npm/dw/@evvm/testnet-contracts.svg)](https://www.npmjs.com/package/@evvm/testnet-contracts)
3
+ ![Version](https://img.shields.io/badge/version-3.0.0%20%22Ichiban%22-red.svg)
4
+ ![Solidity](https://img.shields.io/badge/Solidity-^0.8.0-363636?logo=solidity)
5
+ ![Foundry](https://img.shields.io/badge/Built%20with-Foundry-FFDB1C?logo=foundry)
6
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178C6?logo=typescript)
7
+ ![Bun](https://img.shields.io/badge/Runtime-Bun-000000?logo=bun)
8
+ [![license](https://img.shields.io/badge/license-EVVM--NONCOMMERCIAL--1.0-blue.svg)](LICENSE)
9
+ [![docs](https://img.shields.io/badge/docs-evvm.info-blue.svg)](https://www.evvm.info/)
10
+ [![npm downloads](https://img.shields.io/npm/dw/@evvm/testnet-contracts.svg)](https://www.npmjs.com/package/@evvm/testnet-contracts)
11
+ ![Status](https://img.shields.io/badge/Status-Active-brightgreen)
4
12
 
5
13
  A compact toolkit for creating virtual EVM chains on testnets.
6
14
 
7
- Quick overview
8
- - Use the Solidity packages in `src/` as a library (install via NPM or Forge).
9
- - Use the `evvm` CLI to deploy and manage EVVM instances.
15
+ Two ways to use EVVM:
16
+
17
+ 1. As a library - Import Solidity contracts in your dApp
18
+ 2. As a CLI tool - Deploy and manage EVVM instances on testnets
10
19
 
11
20
  Docs & hosted library: https://www.evvm.info/
12
21
 
22
+ ## Use as a Library (for dApp developers)
23
+
24
+ ### Install the library (1 min)
13
25
 
14
- Install the library (1 min)
26
+ **NPM (recommended):**
15
27
 
16
28
  ```bash
17
- # NPM (recommended for dApp developers)
18
29
  npm install @evvm/testnet-contracts
30
+ ```
31
+
32
+ **Or with Forge:**
19
33
 
20
- # Or with Forge
34
+ ```bash
21
35
  forge install EVVM-org/Testnet-Contracts
22
36
  ```
23
37
 
24
- Guide: How to build on top of EVVM (library): https://www.evvm.info/docs/HowToMakeAEVVMService
38
+ **Import in your contracts:**
39
+
40
+ ```solidity
41
+ import "@evvm/testnet-contracts/interfaces/ICore.sol";
42
+ ```
43
+
44
+ Guide: How to build on top of EVVM: https://www.evvm.info/docs/HowToMakeAEVVMService
45
+
46
+ ## Use as a CLI Tool (for EVVM deployment)
47
+
48
+ ### Requirements
49
+
50
+ Before deploying with the CLI, ensure you have the following installed:
51
+
52
+ - **Foundry** - [Install](https://getfoundry.sh/introduction/installation/)
53
+ - **Bun** (≥ 1.0) - [Install](https://bun.sh/)
54
+ - **Git** - [Install](https://git-scm.com/downloads)
55
+
56
+ ### Quick start (2 min)
57
+
58
+ 1. Clone & install
25
59
 
26
- Quick start (2 min)
27
- 1) Clone & install
28
60
  ```bash
29
61
  git clone --recursive https://github.com/EVVM-org/Testnet-Contracts
30
62
  cd Testnet-Contracts
31
- make install
63
+
64
+ # Option 1: Using CLI (recommended)
65
+ chmod +x ./evvm
66
+ ./evvm install
67
+
68
+ # Option 2: Manual installation
69
+ bun install
70
+ forge install
32
71
  ```
33
72
 
34
- 2) Prepare environment
73
+ 2. Prepare environment
74
+
35
75
  ```bash
36
76
  cp .env.example .env
37
77
  # Edit RPC_URL, ETHERSCAN_API, etc.
38
78
  ```
39
79
 
40
- 3) Import wallet (secure)
80
+ 3. Import wallet (secure)
81
+
41
82
  ```bash
42
83
  cast wallet import defaultKey --interactive
43
84
  ```
44
85
 
45
- 4) Deploy (interactive)
86
+ 4. Deploy (interactive)
87
+
88
+ If you are on Linux or macOS, run:
89
+
90
+ ```bash
91
+ ./evvm deploy
92
+ ```
93
+
94
+ If you are on Windows, run on PowerShell:
95
+
96
+ ```powershell
97
+ .\evvm.bat deploy
98
+ ```
99
+
100
+ Or use Bun from any directory:
101
+
46
102
  ```bash
47
- # If installed globally:
48
- evvm deploy
49
- # Or from repo:
50
103
  bun run evvm deploy
51
104
  ```
105
+
106
+ **Using CLI Scripts (Recommended for local development)**
107
+
108
+ The repository includes platform-specific wrapper scripts to easily call the CLI:
109
+
110
+ **Linux/macOS:**
111
+
112
+ ```bash
113
+ # Make script executable (first time only)
114
+ chmod +x ./evvm
115
+
116
+ # Run any EVVM CLI command
117
+ ./evvm deploy
118
+ ./evvm register --coreAddress 0x...
119
+ ./evvm developer --makeInterface
120
+ ./evvm help
121
+ ```
122
+
123
+ **Windows (PowerShell):**
124
+
125
+ ```powershell
126
+ # Run any EVVM CLI command
127
+ .\evvm.bat deploy
128
+ .\evvm.bat register --coreAddress 0x...
129
+ .\evvm.bat developer --makeInterface
130
+ .\evvm.bat help
131
+ ```
132
+
133
+ The scripts automatically detect your OS and architecture (x64, ARM64, MUSL) and execute the appropriate compiled binary from `.executables/` folder.
134
+
52
135
  Quick Start (CLI): https://www.evvm.info/docs/QuickStart
53
136
 
54
- CLI - common commands
55
- - evvm deploy # deploy EVVM (single or cross-chain)
56
- - evvm register # register EVVM in registry
57
- - evvm fulltest # run full test suite
58
- - evvm help # show CLI help
59
- - evvm version # CLI version
137
+ ## CLI - Available Commands
138
+
139
+ **Deployment & Registration:**
140
+
141
+ - `evvm deploy` # Deploy EVVM (single or cross-chain)
142
+ - `evvm deploy --skipInputConfig` # Deploy with existing config (no prompts)
143
+ - `evvm deploy --crossChain` # Deploy cross-chain EVVM instance
144
+ - `evvm register --coreAddress <addr>` # Register EVVM in registry
145
+ - `evvm register --crossChain` # Register cross-chain EVVM
146
+
147
+ **Cross-Chain Management:**
60
148
 
61
- Library usage (quick)
62
- - NPM: `npm install @evvm/testnet-contracts`
63
- - Forge: `forge install EVVM-org/Testnet-Contracts`
64
- - Import interfaces: `import "@evvm/testnet-contracts/interfaces/IEvvm.sol";`
149
+ - `evvm setUpCrossChainTreasuries` # Configure treasury station connections
65
150
 
66
- Troubleshooting (short)
67
- - RPC timeouts: CLI automatically tries fallback RPCs; set `RPC_URL` in `.env` to a reliable endpoint.
68
- - Wallet not found: import with `cast wallet import <name> --interactive`.
69
- - Bun missing: install Bun (`curl -fsSL https://bun.sh/install | bash`).
70
- - Tests: run `evvm fulltest` or `forge test`.
151
+ **Developer Utilities:**
152
+
153
+ - `evvm developer --makeInterface` # Generate Solidity interfaces from contracts
154
+ - `evvm developer --runTest` # Run test suites with custom filters
155
+ - `evvm install` # Install Bun and Foundry dependencies
156
+
157
+ **Information:**
158
+
159
+ - `evvm help` # Show comprehensive CLI help
160
+ - `evvm version` # Show CLI version
161
+
162
+ ## Library Usage (Quick Reference)
163
+
164
+ - **NPM install:** `npm install @evvm/testnet-contracts`
165
+ - **Forge install:** `forge install EVVM-org/Testnet-Contracts`
166
+ - **Import in Solidity:** `import "@evvm/testnet-contracts/interfaces/ICore.sol";`
167
+
168
+ ## Troubleshooting
169
+
170
+ - **RPC timeouts**: CLI automatically tries fallback RPCs; set `RPC_URL` in `.env` to a reliable endpoint.
171
+ - **Wallet not found**: import with `cast wallet import <name> --interactive`.
172
+ - **Bun missing**: install Bun (`curl -fsSL https://bun.sh/install | bash`).
173
+ - **Tests**: run `./evvm developer --runTest` (Linux/Mac) or `evvm.bat developer --runTest` (Windows), or `forge test`.
174
+ - **Script not executable (Linux/Mac)**: run `chmod +x ./evvm` and ensure `.executables/` binaries have execute permissions.
175
+ - **Wrong architecture detected**: The wrapper scripts auto-detect OS/architecture. If issues occur, manually run the correct binary from `.executables/`.
71
176
 
72
177
  Files & structure (short)
178
+
73
179
  - `src/contracts/` — core contracts (Evvm, NameService, Staking, Treasury, P2PSwap)
74
180
  - `cli/` — TypeScript CLI source
75
181
  - `script/` — Foundry deployment scripts
76
182
  - `input/` — optional JSON/Sol files generated by CLI
183
+ - `.executables/` — pre-compiled CLI binaries for multiple platforms
184
+ - `evvm` — Linux/macOS CLI wrapper script (auto-detects architecture)
185
+ - `evvm.bat` — Windows CLI wrapper script (auto-detects architecture)
77
186
 
78
- Security & contributing (short)
79
- - Never commit private keys. Use `cast wallet import`.
80
- - Add tests for new features and open a PR.
187
+ ## Security & Contributing
81
188
 
82
189
  ### How to Contribute
83
- 1. Fork the repository
84
- 2. Create a feature branch and make changes
85
- 3. Add tests for new features
86
- 4. Submit a PR with a detailed description
190
+
191
+ We welcome contributions from the community! Here's how you can help:
192
+
193
+ 1. **Report Issues** - Found a bug or have a suggestion? [Open an issue on GitHub](https://github.com/EVVM-org/Testnet-Contracts/issues)
194
+ 2. **Suggest Features** - Have an idea for improvement? [Create a feature request issue](https://github.com/EVVM-org/Testnet-Contracts/issues)
195
+ 3. **Submit Code Changes**:
196
+ - Fork the repository
197
+ - Create a feature branch (`git checkout -b feature/amazing-feature`)
198
+ - Make your changes and add tests
199
+ - Push to your branch (`git push origin feature/amazing-feature`)
200
+ - Submit a Pull Request with a detailed description
201
+
202
+ ### Guidelines
203
+
204
+ - **Issues**: Use [GitHub Issues](https://github.com/EVVM-org/Testnet-Contracts/issues) for bug reports, feature requests, and discussions
205
+ - **Pull Requests**: Each PR should reference a related issue
206
+ - **Tests**: All new features must include tests
207
+ - **Code Style**: Follow the existing code patterns in the repository
208
+ - **Commit Messages**: Write clear, descriptive commit messages
87
209
 
88
210
  ## Security Best Practices
211
+
89
212
  - **Never commit private keys**: Always use `cast wallet import <YOUR_ALIAS> --interactive` to securely store your keys
90
213
  - **Use test credentials only**: This repository is for testnet deployment only
91
214
  - **Environment variables**: Store sensitive data like API keys in `.env` files (not committed to git)