Commit cddb4a8
committed
feat(zkstack): Deploy 2 ctms and deploy chain for each of them (#4458)
## What ❔
**Support for deploying and managing multiple CTM (Contract Template
Manager) contracts, and allowing selection between them when creating
chains.**
### Flow of execution
#### 1. Create a new ecosystem
```bash
zkstack ecosystem create
```
This command creates a **new ecosystem**.
You’ll specify the link to the code repository (by default, this points
to the **Era** codebase).
Contracts will be used as a submodule within this repository.
After creating the ecosystem, initialize it:
```bash
zkstack ecosystem init
```
This command deploys a **new ecosystem** and **one default Era chain**.
---
#### 2. Initialize another CTM
Once everything is deployed, you can deploy an additional CTM:
```bash
zkstack ctm init-new-ctm --zksync-os --contracts-src-path <path> --default-configs-src-path <path>
```
**Parameters:**
* `--contracts-src-path` — Path to the **Era contracts** (you must clone
and manage this repository manually).
Use a branch or tag matching the desired **zkSync OS** or **Era**
version.
* `--default-configs-src-path` — Path to **default configs** (in Era
this is typically `etc/env/file_based`).
Only one file is required: `genesis.yaml` (in the old format).
The data from these paths will be used during CTM deployment.
---
#### 3. Register the CTM
Once deployed, register the CTM within the ecosystem:
```bash
zkstack ecosystem register-ctm --zksync-os
```
> 1 parent 265d16c commit cddb4a8
File tree
77 files changed
+1750
-1274
lines changed- .github/workflows
- core/tests/highlevel-test-tools/src
- docs/src/guides
- infrastructure/scripts
- zkstack_cli/crates
- common/src
- config/src
- forge_interface
- deploy_ecosystem
- deploy_l2_contracts
- gateway_preparation
- gateway_vote_preparation
- register_chain
- upgrade_ecosystem
- types/src
- zkstack/src
- commands
- args
- chain
- args
- init
- gateway
- init
- contract_verifier
- ctm
- args
- commands
- dev/commands
- test
- upgrades
- args
- ecosystem
- args
- prover
- args
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
77 files changed
+1750
-1274
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | 182 | | |
185 | 183 | | |
186 | 184 | | |
| |||
228 | 226 | | |
229 | 227 | | |
230 | 228 | | |
231 | | - | |
232 | | - | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | | - | |
| 124 | + | |
| 125 | + | |
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
| |||
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
140 | | - | |
| 146 | + | |
| 147 | + | |
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
| |||
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
242 | | - | |
| 249 | + | |
| 250 | + | |
243 | 251 | | |
244 | 252 | | |
245 | 253 | | |
| |||
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
276 | | - | |
| 284 | + | |
| 285 | + | |
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
| |||
316 | 325 | | |
317 | 326 | | |
318 | 327 | | |
319 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
320 | 333 | | |
321 | 334 | | |
322 | 335 | | |
| |||
0 commit comments