@evvm/testnet-contracts 2.2.2 → 2.3.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.
- package/LICENSE +145 -118
- package/README.md +135 -42
- package/contracts/evvm/Evvm.sol +154 -181
- package/contracts/evvm/lib/ErrorsLib.sol +119 -6
- package/contracts/evvm/lib/EvvmStorage.sol +164 -9
- package/contracts/evvm/lib/EvvmStructs.sol +124 -6
- package/contracts/evvm/lib/SignatureUtils.sol +103 -61
- package/contracts/nameService/NameService.sol +165 -155
- package/contracts/nameService/lib/ErrorsLib.sol +142 -8
- package/contracts/nameService/lib/IdentityValidation.sol +21 -0
- package/contracts/nameService/lib/NameServiceStructs.sol +75 -19
- package/contracts/nameService/lib/SignatureUtils.sol +235 -60
- package/contracts/p2pSwap/P2PSwap.sol +205 -164
- package/contracts/staking/Estimator.sol +131 -24
- package/contracts/staking/Staking.sol +98 -113
- package/contracts/staking/lib/ErrorsLib.sol +79 -3
- package/contracts/staking/lib/SignatureUtils.sol +82 -16
- package/contracts/staking/lib/StakingStructs.sol +12 -0
- package/contracts/treasury/Treasury.sol +30 -12
- package/contracts/treasury/lib/ErrorsLib.sol +30 -0
- package/contracts/treasuryTwoChains/TreasuryHostChainStation.sol +3 -3
- package/interfaces/IEvvm.sol +9 -4
- package/interfaces/INameService.sol +12 -3
- package/interfaces/IStaking.sol +2 -1
- package/library/Erc191TestBuilder.sol +188 -0
- package/library/EvvmService.sol +55 -0
- package/library/primitives/SignatureRecover.sol +33 -0
- package/library/utils/AdvancedStrings.sol +61 -0
- package/library/utils/SignatureUtil.sol +34 -0
- package/library/utils/nonces/AsyncNonce.sol +42 -0
- package/library/utils/nonces/SyncNonce.sol +44 -0
- package/library/utils/service/EvvmPayments.sol +68 -1
- package/library/utils/service/StakingServiceUtils.sol +44 -0
- package/package.json +2 -1
package/LICENSE
CHANGED
|
@@ -1,166 +1,193 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
================================================================================
|
|
2
|
+
EVVM NONCOMMERCIAL LICENSE v1.0
|
|
3
|
+
================================================================================
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
72
|
+
- Noncommercial organizations: Use by charitable, educational, research,
|
|
73
|
+
public safety, health, environmental, or government institutions
|
|
14
74
|
|
|
15
|
-
|
|
75
|
+
2.8 Fair Use
|
|
16
76
|
|
|
17
|
-
|
|
77
|
+
These terms do not limit your fair use rights under applicable law.
|
|
18
78
|
|
|
19
|
-
|
|
20
|
-
to them as both strict obligations and conditions to all
|
|
21
|
-
your licenses.
|
|
79
|
+
2.9 No Sublicensing
|
|
22
80
|
|
|
23
|
-
|
|
81
|
+
You may not sublicense or transfer your licenses to others.
|
|
24
82
|
|
|
25
|
-
|
|
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
|
-
|
|
85
|
+
If you or your company claims the software infringes any patent, all your
|
|
86
|
+
licenses terminate immediately.
|
|
35
87
|
|
|
36
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
96
|
+
================================================================================
|
|
51
97
|
|
|
52
|
-
|
|
98
|
+
3. SHARE-ALIKE REQUIREMENTS
|
|
53
99
|
|
|
54
|
-
|
|
55
|
-
make changes and new works based on the software for any
|
|
56
|
-
permitted purpose.
|
|
100
|
+
3.1 Scope
|
|
57
101
|
|
|
58
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
129
|
+
Within 90 days of first Triggering Distribution, you must:
|
|
77
130
|
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
134
|
+
2. Include this license with the published code
|
|
86
135
|
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
141
|
+
4. Ensure accessibility - the code must remain publicly available for at
|
|
142
|
+
least 3 years
|
|
91
143
|
|
|
92
|
-
|
|
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
|
-
|
|
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
|
-
|
|
100
|
-
|
|
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
|
-
|
|
154
|
+
================================================================================
|
|
106
155
|
|
|
107
|
-
|
|
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
|
-
|
|
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
|
-
|
|
118
|
-
|
|
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
|
-
|
|
165
|
+
================================================================================
|
|
123
166
|
|
|
124
|
-
|
|
125
|
-
and the **software** is EVVM and related components made
|
|
126
|
-
available under these terms.
|
|
167
|
+
5. DEFINITIONS
|
|
127
168
|
|
|
128
|
-
|
|
129
|
-
terms.
|
|
169
|
+
- "MATE Labs Inc." or "Licensor": MATE Labs Inc., a Delaware corporation
|
|
130
170
|
|
|
131
|
-
|
|
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
|
-
|
|
140
|
-
software under these terms.
|
|
173
|
+
- "You": The individual or entity agreeing to these terms
|
|
141
174
|
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
181
|
+
- "Use": Any activity with the software requiring a license
|
|
148
182
|
|
|
149
|
-
|
|
150
|
-
must be publicly released under this same License within 90 days of creation,
|
|
151
|
-
distribution, or other availability.
|
|
183
|
+
================================================================================
|
|
152
184
|
|
|
153
|
-
|
|
154
|
-
GitHub or GitLab, with clear attribution to the original work.
|
|
185
|
+
6. QUESTIONS AND COMMERCIAL LICENSING
|
|
155
186
|
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
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,34 +1,67 @@
|
|
|
1
1
|
# EVVM Testnet Contracts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
[](https://www.npmjs.com/package/@evvm/testnet-contracts)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://www.evvm.info/)
|
|
10
|
+
[](https://www.npmjs.com/package/@evvm/testnet-contracts)
|
|
11
|
+

|
|
4
12
|
|
|
5
13
|
A compact toolkit for creating virtual EVM chains on testnets.
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
Two ways to use EVVM:
|
|
16
|
+
1. As a library - Import Solidity contracts in your dApp
|
|
17
|
+
2. As a CLI tool - Deploy and manage EVVM instances on testnets
|
|
10
18
|
|
|
11
19
|
Docs & hosted library: https://www.evvm.info/
|
|
12
20
|
|
|
21
|
+
## Use as a Library (for dApp developers)
|
|
13
22
|
|
|
14
|
-
Install the library (1 min)
|
|
23
|
+
### Install the library (1 min)
|
|
15
24
|
|
|
25
|
+
**NPM (recommended):**
|
|
16
26
|
```bash
|
|
17
|
-
# NPM (recommended for dApp developers)
|
|
18
27
|
npm install @evvm/testnet-contracts
|
|
28
|
+
```
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
**Or with Forge:**
|
|
31
|
+
```bash
|
|
21
32
|
forge install EVVM-org/Testnet-Contracts
|
|
22
33
|
```
|
|
23
34
|
|
|
24
|
-
|
|
35
|
+
**Import in your contracts:**
|
|
36
|
+
```solidity
|
|
37
|
+
import "@evvm/testnet-contracts/interfaces/IEvvm.sol";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Guide: How to build on top of EVVM: https://www.evvm.info/docs/HowToMakeAEVVMService
|
|
41
|
+
|
|
42
|
+
## Use as a CLI Tool (for EVVM deployment)
|
|
43
|
+
|
|
44
|
+
### Requirements
|
|
45
|
+
|
|
46
|
+
Before deploying with the CLI, ensure you have the following installed:
|
|
47
|
+
|
|
48
|
+
- **Foundry** - [Install](https://getfoundry.sh/introduction/installation/)
|
|
49
|
+
- **Bun** (≥ 1.0) - [Install](https://bun.sh/)
|
|
50
|
+
- **Git** - [Install](https://git-scm.com/downloads)
|
|
25
51
|
|
|
26
|
-
Quick start (2 min)
|
|
52
|
+
### Quick start (2 min)
|
|
27
53
|
1) Clone & install
|
|
28
54
|
```bash
|
|
29
55
|
git clone --recursive https://github.com/EVVM-org/Testnet-Contracts
|
|
30
56
|
cd Testnet-Contracts
|
|
31
|
-
|
|
57
|
+
|
|
58
|
+
# Option 1: Using CLI (recommended)
|
|
59
|
+
chmod +x ./evvm
|
|
60
|
+
./evvm install
|
|
61
|
+
|
|
62
|
+
# Option 2: Manual installation
|
|
63
|
+
bun install
|
|
64
|
+
forge install
|
|
32
65
|
```
|
|
33
66
|
|
|
34
67
|
2) Prepare environment
|
|
@@ -43,57 +76,117 @@ cast wallet import defaultKey --interactive
|
|
|
43
76
|
```
|
|
44
77
|
|
|
45
78
|
4) Deploy (interactive)
|
|
79
|
+
|
|
80
|
+
If you are on Linux or macOS, run:
|
|
81
|
+
```bash
|
|
82
|
+
./evvm deploy
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If you are on Windows, run on PowerShell:
|
|
86
|
+
```powershell
|
|
87
|
+
.\evvm.bat deploy
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or use Bun from any directory:
|
|
46
91
|
```bash
|
|
47
|
-
# If installed globally:
|
|
48
|
-
evvm deploy
|
|
49
|
-
# Or from repo:
|
|
50
92
|
bun run evvm deploy
|
|
51
93
|
```
|
|
94
|
+
|
|
95
|
+
**Using CLI Scripts (Recommended for local development)**
|
|
96
|
+
|
|
97
|
+
The repository includes platform-specific wrapper scripts to easily call the CLI:
|
|
98
|
+
|
|
99
|
+
**Linux/macOS:**
|
|
100
|
+
```bash
|
|
101
|
+
# Make script executable (first time only)
|
|
102
|
+
chmod +x ./evvm
|
|
103
|
+
|
|
104
|
+
# Run any EVVM CLI command
|
|
105
|
+
./evvm deploy
|
|
106
|
+
./evvm register --evvmAddress 0x...
|
|
107
|
+
./evvm developer --makeInterface
|
|
108
|
+
./evvm help
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Windows (PowerShell):**
|
|
112
|
+
```powershell
|
|
113
|
+
# Run any EVVM CLI command
|
|
114
|
+
.\evvm.bat deploy
|
|
115
|
+
.\evvm.bat register --evvmAddress 0x...
|
|
116
|
+
.\evvm.bat developer --makeInterface
|
|
117
|
+
.\evvm.bat help
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The scripts automatically detect your OS and architecture (x64, ARM64, MUSL) and execute the appropriate compiled binary from `.executables/` folder.
|
|
121
|
+
|
|
52
122
|
Quick Start (CLI): https://www.evvm.info/docs/QuickStart
|
|
53
123
|
|
|
54
|
-
CLI -
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- evvm
|
|
58
|
-
- evvm
|
|
59
|
-
- evvm
|
|
124
|
+
## CLI - Available Commands
|
|
125
|
+
|
|
126
|
+
**Deployment & Registration:**
|
|
127
|
+
- `evvm deploy` # Deploy EVVM (single or cross-chain)
|
|
128
|
+
- `evvm deploy --skipInputConfig` # Deploy with existing config (no prompts)
|
|
129
|
+
- `evvm deploy --crossChain` # Deploy cross-chain EVVM instance
|
|
130
|
+
- `evvm register --evvmAddress <addr>` # Register EVVM in registry
|
|
131
|
+
- `evvm register --crossChain` # Register cross-chain EVVM
|
|
132
|
+
|
|
133
|
+
**Cross-Chain Management:**
|
|
134
|
+
- `evvm setUpCrossChainTreasuries` # Configure treasury station connections
|
|
135
|
+
|
|
136
|
+
**Developer Utilities:**
|
|
137
|
+
- `evvm developer --makeInterface` # Generate Solidity interfaces from contracts
|
|
138
|
+
- `evvm developer --runTest` # Run test suites with custom filters
|
|
139
|
+
- `evvm install` # Install Bun and Foundry dependencies
|
|
60
140
|
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
- Import interfaces: `import "@evvm/testnet-contracts/interfaces/IEvvm.sol";`
|
|
141
|
+
**Information:**
|
|
142
|
+
- `evvm help` # Show comprehensive CLI help
|
|
143
|
+
- `evvm version` # Show CLI version
|
|
65
144
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
145
|
+
## Library Usage (Quick Reference)
|
|
146
|
+
|
|
147
|
+
- **NPM install:** `npm install @evvm/testnet-contracts`
|
|
148
|
+
- **Forge install:** `forge install EVVM-org/Testnet-Contracts`
|
|
149
|
+
- **Import in Solidity:** `import "@evvm/testnet-contracts/interfaces/IEvvm.sol";`
|
|
150
|
+
|
|
151
|
+
## Troubleshooting
|
|
152
|
+
- **RPC timeouts**: CLI automatically tries fallback RPCs; set `RPC_URL` in `.env` to a reliable endpoint.
|
|
153
|
+
- **Wallet not found**: import with `cast wallet import <name> --interactive`.
|
|
154
|
+
- **Bun missing**: install Bun (`curl -fsSL https://bun.sh/install | bash`).
|
|
155
|
+
- **Tests**: run `./evvm developer --runTest` (Linux/Mac) or `evvm.bat developer --runTest` (Windows), or `forge test`.
|
|
156
|
+
- **Script not executable (Linux/Mac)**: run `chmod +x ./evvm` and ensure `.executables/` binaries have execute permissions.
|
|
157
|
+
- **Wrong architecture detected**: The wrapper scripts auto-detect OS/architecture. If issues occur, manually run the correct binary from `.executables/`.
|
|
71
158
|
|
|
72
159
|
Files & structure (short)
|
|
73
160
|
- `src/contracts/` — core contracts (Evvm, NameService, Staking, Treasury, P2PSwap)
|
|
74
161
|
- `cli/` — TypeScript CLI source
|
|
75
162
|
- `script/` — Foundry deployment scripts
|
|
76
163
|
- `input/` — optional JSON/Sol files generated by CLI
|
|
164
|
+
- `.executables/` — pre-compiled CLI binaries for multiple platforms
|
|
165
|
+
- `evvm` — Linux/macOS CLI wrapper script (auto-detects architecture)
|
|
166
|
+
- `evvm.bat` — Windows CLI wrapper script (auto-detects architecture)
|
|
77
167
|
|
|
78
|
-
Security &
|
|
79
|
-
- Never commit private keys. Use `cast wallet import`.
|
|
80
|
-
- Add tests for new features and open a PR.
|
|
168
|
+
## Security & Contributing
|
|
81
169
|
|
|
82
|
-
|
|
170
|
+
### How to Contribute
|
|
83
171
|
|
|
172
|
+
We welcome contributions from the community! Here's how you can help:
|
|
84
173
|
|
|
85
|
-
**
|
|
174
|
+
1. **Report Issues** - Found a bug or have a suggestion? [Open an issue on GitHub](https://github.com/EVVM-org/Testnet-Contracts/issues)
|
|
175
|
+
2. **Suggest Features** - Have an idea for improvement? [Create a feature request issue](https://github.com/EVVM-org/Testnet-Contracts/issues)
|
|
176
|
+
3. **Submit Code Changes**:
|
|
177
|
+
- Fork the repository
|
|
178
|
+
- Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
179
|
+
- Make your changes and add tests
|
|
180
|
+
- Push to your branch (`git push origin feature/amazing-feature`)
|
|
181
|
+
- Submit a Pull Request with a detailed description
|
|
86
182
|
|
|
87
|
-
###
|
|
88
|
-
1. **Playground**: Prototype and experiment with new features in the playground repo.
|
|
89
|
-
2. **Testnet (this repo)**: Integrate, test, and validate on public testnets.
|
|
90
|
-
3. **Mainnet**: After successful testnet validation, proceed to mainnet deployment.
|
|
183
|
+
### Guidelines
|
|
91
184
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
185
|
+
- **Issues**: Use [GitHub Issues](https://github.com/EVVM-org/Testnet-Contracts/issues) for bug reports, feature requests, and discussions
|
|
186
|
+
- **Pull Requests**: Each PR should reference a related issue
|
|
187
|
+
- **Tests**: All new features must include tests
|
|
188
|
+
- **Code Style**: Follow the existing code patterns in the repository
|
|
189
|
+
- **Commit Messages**: Write clear, descriptive commit messages
|
|
97
190
|
|
|
98
191
|
## Security Best Practices
|
|
99
192
|
- **Never commit private keys**: Always use `cast wallet import <YOUR_ALIAS> --interactive` to securely store your keys
|