Skip to content

Commit 2fcd986

Browse files
authored
feat: contracts for zksync os genesis (#4399)
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent 3db09e1 commit 2fcd986

File tree

4 files changed

+47
-11
lines changed

4 files changed

+47
-11
lines changed

contracts

Submodule contracts updated 98 files

etc/env/file_based/genesis.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# note: this is not the root, but blake_hash(root, index, number, prev hashes, timestamp) -
33
# it's used in place of root in zksync os. It's called `state_commitment`
44
# (don't confuse it with `commitment` which is about pudata etc)
5-
genesis_root: "0xcc97d649ab6333df65a1ff08e76ac04fc5a80143979fae3375b35c918ef9d489"
5+
genesis_root: "0xab2e26f23f347b17136c28c45eef3628781b65cb57d39f54a6d34ef78a43f866"
66
genesis_rollup_leaf_index: 0
7-
genesis_batch_commitment: 0x753b52ab98b0062963a4b2ea1c061c4ab522f53f50b8fefe0a52760cbcc9e183
7+
genesis_batch_commitment: 0x1ab09a448e4abd0685699a356c782d82a17452c86c6adda5ccdc9e75f240dc94
88
genesis_protocol_version: 28
99
default_aa_hash: 0x010005f72e443c94460f4583fb38ef5d0c5cd9897021c41df840f91465c0392e
1010
bootloader_hash: 0x0100085f9382a7928dd83bfc529121827b5f29f18b9aa10d18aa68e1be7ddc35

yarn.lock

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,14 +2691,22 @@
26912691
dependencies:
26922692
"@opentelemetry/core" "^1.1.0"
26932693

2694-
"@openzeppelin/contracts-upgradeable-v4@npm:@openzeppelin/[email protected]", "@openzeppelin/[email protected]":
2695-
name "@openzeppelin/contracts-upgradeable-v4"
2694+
"@openzeppelin/contracts-upgradeable-v4@npm:@openzeppelin/[email protected]":
26962695
version "4.9.5"
26972696
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz#572b5da102fc9be1d73f34968e0ca56765969812"
26982697
integrity sha512-f7L1//4sLlflAN7fVzJLoRedrf5Na3Oal5PZfIq55NFcVZ90EpV1q5xOvL4lFvg3MNICSDr2hH0JUBxwlxcoPg==
26992698

2700-
"@openzeppelin/contracts-v4@npm:@openzeppelin/[email protected]", "@openzeppelin/[email protected]":
2701-
name "@openzeppelin/contracts-v4"
2699+
"@openzeppelin/[email protected]":
2700+
version "4.9.5"
2701+
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz#572b5da102fc9be1d73f34968e0ca56765969812"
2702+
integrity sha512-f7L1//4sLlflAN7fVzJLoRedrf5Na3Oal5PZfIq55NFcVZ90EpV1q5xOvL4lFvg3MNICSDr2hH0JUBxwlxcoPg==
2703+
2704+
"@openzeppelin/contracts-v4@npm:@openzeppelin/[email protected]":
2705+
version "4.9.5"
2706+
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8"
2707+
integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg==
2708+
2709+
"@openzeppelin/[email protected]":
27022710
version "4.9.5"
27032711
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8"
27042712
integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg==
@@ -4272,7 +4280,7 @@ bl@^4.0.3:
42724280
inherits "^2.0.4"
42734281
readable-stream "^3.4.0"
42744282

4275-
blakejs@^1.1.0:
4283+
blakejs@^1.1.0, blakejs@^1.2.1:
42764284
version "1.2.1"
42774285
resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814"
42784286
integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==
@@ -10822,7 +10830,7 @@ string-length@^4.0.1:
1082210830
char-regex "^1.0.2"
1082310831
strip-ansi "^6.0.0"
1082410832

10825-
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
10833+
"string-width-cjs@npm:string-width@^4.2.0":
1082610834
version "4.2.3"
1082710835
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1082810836
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -10839,6 +10847,15 @@ string-width@^2.1.0, string-width@^2.1.1:
1083910847
is-fullwidth-code-point "^2.0.0"
1084010848
strip-ansi "^4.0.0"
1084110849

10850+
string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
10851+
version "4.2.3"
10852+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
10853+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
10854+
dependencies:
10855+
emoji-regex "^8.0.0"
10856+
is-fullwidth-code-point "^3.0.0"
10857+
strip-ansi "^6.0.1"
10858+
1084210859
string-width@^5.0.1, string-width@^5.1.2:
1084310860
version "5.1.2"
1084410861
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
@@ -10905,7 +10922,7 @@ string_decoder@~1.1.1:
1090510922
dependencies:
1090610923
safe-buffer "~5.1.0"
1090710924

10908-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10925+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
1090910926
version "6.0.1"
1091010927
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1091110928
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -10926,6 +10943,13 @@ strip-ansi@^5.1.0:
1092610943
dependencies:
1092710944
ansi-regex "^4.1.0"
1092810945

10946+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10947+
version "6.0.1"
10948+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
10949+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
10950+
dependencies:
10951+
ansi-regex "^5.0.1"
10952+
1092910953
strip-ansi@^7.0.1:
1093010954
version "7.1.0"
1093110955
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -11791,7 +11815,16 @@ [email protected]:
1179111815
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
1179211816
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==
1179311817

11794-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
11818+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
11819+
version "7.0.0"
11820+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
11821+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
11822+
dependencies:
11823+
ansi-styles "^4.0.0"
11824+
string-width "^4.1.0"
11825+
strip-ansi "^6.0.0"
11826+
11827+
wrap-ansi@^7.0.0:
1179511828
version "7.0.0"
1179611829
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1179711830
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

zkstack_cli/crates/config/src/forge_interface/deploy_ecosystem/input.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ pub struct DeployL1Config {
140140
pub owner_address: Address,
141141
pub testnet_verifier: bool,
142142
pub support_l2_legacy_shared_bridge_test: bool,
143+
pub is_zk_sync_os: bool,
143144
pub contracts: ContractsDeployL1Config,
144145
pub tokens: TokensDeployL1Config,
145146
}
@@ -161,6 +162,8 @@ impl DeployL1Config {
161162
testnet_verifier,
162163
owner_address: wallets_config.governor.address,
163164
support_l2_legacy_shared_bridge_test,
165+
// TODO: make it configurable
166+
is_zk_sync_os: true,
164167
contracts: ContractsDeployL1Config {
165168
create2_factory_addr: initial_deployment_config.create2_factory_addr,
166169
create2_factory_salt: initial_deployment_config.create2_factory_salt,

0 commit comments

Comments
 (0)