Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
415 commits
Select commit Hold shift + click to select a range
ab5c11c
lint
zkzoomer Aug 22, 2025
4ce1435
fix hashes
zkzoomer Aug 22, 2025
682a5e8
bump hashes
koloz193 Aug 22, 2025
1d3efb6
update genesis
zkzoomer Aug 22, 2025
19cd015
fix force deployment
zkzoomer Aug 23, 2025
0205bd3
fix hashes
zkzoomer Aug 23, 2025
4bb12c7
update genesis
zkzoomer Aug 24, 2025
edbb95a
save to file
zkzoomer Aug 25, 2025
f4a6ede
add run
zkzoomer Aug 25, 2025
61c63fb
lint
zkzoomer Aug 25, 2025
6388439
rm unused
zkzoomer Aug 25, 2025
183b87a
add genesis upgrade addr
zkzoomer Aug 25, 2025
cc1f536
update run
zkzoomer Aug 25, 2025
e2721f4
add diamond init addr
zkzoomer Aug 25, 2025
e7ef3d8
add set new version call
zkzoomer Aug 26, 2025
9017426
add existing facets
zkzoomer Aug 26, 2025
c1a9ca6
add stage0, stage2
zkzoomer Aug 26, 2025
ba43fca
update run
zkzoomer Aug 26, 2025
1213742
bump new protocol version
zkzoomer Aug 26, 2025
c856d26
sync with base
StanislavBreadless Aug 26, 2025
0b7f57e
Merge remote-tracking branch 'origin/sma/v29.1-patch-scripts' into zk…
koloz193 Aug 26, 2025
ac0e310
bump hashes
koloz193 Aug 26, 2025
0da2020
fix getFactoryDeps
perekopskiy Aug 27, 2025
f79c9fd
feat: update Plonk verifier
dimazhornyk Aug 27, 2025
c796928
Merge pull request #1608 from matter-labs/dz-update-plonk-vk
RomanBrodetski Aug 27, 2025
c5b118a
Fix calldata decoding
0xVolosnikov Aug 27, 2025
9e222aa
fix force deployment
zkzoomer Aug 23, 2025
6b823af
Recalculate hashes
Deniallugo Aug 28, 2025
c0c232f
keep old vk
perekopskiy Aug 28, 2025
9495316
Merge pull request #1596 from matter-labs/zk/zksync-os-stable-v29
perekopskiy Aug 28, 2025
ee3fcdc
remove zkos specific changes
koloz193 Aug 28, 2025
a7d4380
remove more zkos references
koloz193 Aug 28, 2025
8a79a33
feat: Elastic verifier, that allows owner to set multiple VKs (#1599)
mm-zk Aug 28, 2025
152a047
Fix hashes
Deniallugo Aug 29, 2025
c029b98
Update vk from script (zkos wrapper v0.4.3 and zkos v0.0.20) (#1612)
mm-zk Aug 29, 2025
bfe86e4
Fix gateway vote preparation
Deniallugo Aug 29, 2025
74a9dda
fix: merge conflicts
Raid5594 Aug 29, 2025
7a53c65
make compile
StanislavBreadless Aug 29, 2025
0a13f0c
Cleanup
0xVolosnikov Aug 29, 2025
69396ab
add back onlyL2 modifier
koloz193 Sep 2, 2025
620276e
Merge branch 'draft-v29' into draft-v29.5
koloz193 Sep 2, 2025
23beee0
change L1->L2/upgrade tx type ids
itegulov Sep 3, 2025
139fac5
Merge remote-tracking branch 'origin/draft-v29' into draft-v29.5
zkzoomer Sep 3, 2025
ccbe998
support both era and zksync-os
itegulov Sep 3, 2025
704a591
address comments
itegulov Sep 3, 2025
d114f24
use correct tx type during deploy
itegulov Sep 3, 2025
fe1d560
change type id to 0x7d/0x7f
itegulov Sep 3, 2025
6699157
pure->view
itegulov Sep 3, 2025
5358b14
remove redundant force data deployment generation
Deniallugo Sep 3, 2025
339c9c2
refactor into methods
itegulov Sep 3, 2025
76aa2c4
Merge pull request #1620 from matter-labs/di/zksync-os-stable
itegulov Sep 3, 2025
3899ae0
Update era contracts - server: d62892c, wrapper: v0.4.3
itegulov Sep 4, 2025
9cbc849
Merge pull request #1622 from matter-labs/update-vk-from-script-20250…
itegulov Sep 4, 2025
481a57d
fix: small fixes/improvements (#1627)
AntonD3 Sep 4, 2025
1f8053e
Some fixes. Comments, constructor removal, lint
0xValera Sep 5, 2025
c285bbd
comment
0xValera Sep 5, 2025
0931202
Merge remote-tracking branch 'origin/draft-v29.5' into sb-adapting-co…
0xValera Sep 5, 2025
3c1cb06
lint
0xValera Sep 5, 2025
ce06092
Merge remote-tracking branch 'origin/zksync-os-stable' into sb-adapti…
0xValera Sep 5, 2025
377f9c9
some fixes on the way to compilation
0xValera Sep 7, 2025
9c4373c
make compilable
0xValera Sep 8, 2025
5302b60
some fixes, lint
0xValera Sep 8, 2025
255bf3e
more fixes
0xValera Sep 8, 2025
7efa454
fix build
0xValera Sep 8, 2025
039f531
fix links
0xValera Sep 8, 2025
83e50a6
fix deploy script
0xValera Sep 8, 2025
8c29a0a
move ComplexUpgrader and L2GenesisUpgrader tests to l1-contracts
0xValera Sep 8, 2025
e6dbffb
TO REVERT: not require lint for tests and coverage in l1-contracts
0xValera Sep 8, 2025
7d6c89c
various ci fixes (#1621)
zkzoomer Sep 8, 2025
e0def62
bump ComplexUpgrader, L2GenesisUpgrade locations
0xValera Sep 8, 2025
e6b6f4c
skip assembly in L1 slither due to slither issue
0xValera Sep 8, 2025
de359e0
slither fixes
0xValera Sep 8, 2025
760c108
slither fix
0xValera Sep 8, 2025
72a2b62
fix errors lint
0xValera Sep 8, 2025
75d0514
Revert "TO REVERT: not require lint for tests and coverage in l1-cont…
0xValera Sep 8, 2025
2530839
lint
0xValera Sep 8, 2025
2c9e6d9
fix scripts
0xValera Sep 8, 2025
5c999b3
fix link
0xValera Sep 8, 2025
a5dc308
upd links (#1632)
StanislavBreadless Sep 8, 2025
8210479
Revert "Linter wants efficient packing"
0xVolosnikov Sep 8, 2025
d457098
Revert "Add DA validation data in the chain commitment scheme"
0xVolosnikov Sep 8, 2025
3c2e89e
Merge remote-tracking branch 'origin/zksync-os-stable' into sb-adapti…
0xValera Sep 9, 2025
9577337
restore CI elements, make build
0xValera Sep 9, 2025
4ec853e
ignore L2GenesisUpgrade+L2ComplexUpgrader tests in l1 CI
0xValera Sep 9, 2025
5c9c5f4
fix test
0xValera Sep 9, 2025
bdad82f
fix foundry-zksync tests
0xValera Sep 9, 2025
6f97428
Merge remote-tracking branch 'origin/zksync-os-stable' into ra/zksync…
Raid5594 Sep 9, 2025
6e00490
feat: update scripts to enable saving calldata (#1631)
Raid5594 Sep 9, 2025
08f14a6
remove unnecessary deploy
Raid5594 Sep 9, 2025
c81ea82
resolve a few comments
Raid5594 Sep 9, 2025
a11c31d
fix: add comments
Raid5594 Sep 9, 2025
a79702e
feat: Remove custom DA (#1569)
0xVolosnikov Sep 10, 2025
90b8b5e
Merge branch 'draft-v29' of ssh://github.com/matter-labs/era-contract…
kelemeno Sep 10, 2025
2283af8
fix issues after merge
kelemeno Sep 10, 2025
7b8da3e
fix scripts
0xValera Sep 10, 2025
4ef514c
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 10, 2025
1380818
fix: refactoring
Raid5594 Sep 10, 2025
1eaa26f
add back deploy gov/admin
Raid5594 Sep 10, 2025
127f432
Revert "feat: Remove custom DA (#1569)"
kelemeno Sep 10, 2025
e6cb9f9
issues after revert
kelemeno Sep 10, 2025
8192316
typo
0xValera Sep 10, 2025
6547bdc
Delete L2VerifierPlonk.sol
0xValera Sep 10, 2025
54cbc4d
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 10, 2025
efbd008
Revert "fix scripts"
kelemeno Sep 10, 2025
89d8d84
fix build
0xValera Sep 10, 2025
81e13c5
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 10, 2025
6dbfc1b
some fixes
0xValera Sep 10, 2025
56f6779
fix link
0xValera Sep 10, 2025
de1f91d
fix link 2
0xValera Sep 10, 2025
b6de41e
Merge branch 'draft-v30' into sb-adapting-contracts-for-zksync-os-v30
0xValera Sep 10, 2025
a70efd5
lint
0xValera Sep 10, 2025
391b5ae
Remove old l2 rollup
Deniallugo Sep 10, 2025
ee9fa9f
Update contracts
Deniallugo Sep 10, 2025
5f35f09
Update AllContractsHashes.json
0xValera Sep 10, 2025
f808d2d
fix bootloader testing (bump zksync-era commit)
0xValera Sep 10, 2025
4684b45
feat(scripts): Added wallets for prove & execute (#1640)
mm-zk Sep 10, 2025
952afc6
recalculate hashes
Deniallugo Sep 10, 2025
a8137c2
lint
0xValera Sep 11, 2025
cd00919
Merge remote-tracking branch 'origin/draft-v29' into ra/zksync-os-sta…
Raid5594 Sep 12, 2025
f644f88
fix: consturctor args to message root
Raid5594 Sep 12, 2025
48d2216
fix: hashes
Raid5594 Sep 12, 2025
da4f761
feat: add helper script
Raid5594 Sep 12, 2025
dbcce37
update factorydeps
0xValera Sep 12, 2025
46fe7e6
fix: lint
Raid5594 Sep 12, 2025
fca9d97
wip
Raid5594 Sep 12, 2025
1e9580c
fix: typo + lint
Raid5594 Sep 12, 2025
c280745
Update RegisterZKChain.s.sol
0xValera Sep 12, 2025
8333778
chore: refactoring
Raid5594 Sep 12, 2025
e6b8531
Merge remote-tracking branch 'origin/draft-v29' into ra/zksync-os-sta…
Raid5594 Sep 12, 2025
2f3f756
Ra/zksync os stable split scripts for zkstack cli (#1613)
Raid5594 Sep 12, 2025
5014886
Revert "Ra/zksync os stable split scripts for zkstack cli" (#1647)
Raid5594 Sep 12, 2025
8591ff3
Merge pull request #1648 from matter-labs/ra/zksync-os-stable-split-s…
Raid5594 Sep 12, 2025
bea8f12
Update GatewayVotePreparation.s.sol
0xValera Sep 15, 2025
b1f57e4
Merge branch 'draft-v29' of https://github.com/matter-labs/era-contra…
0xValera Sep 17, 2025
e2a6537
Merge branch 'draft-v29' of https://github.com/matter-labs/era-contracts
0xValera Sep 17, 2025
26415b5
some fixes after merge
0xValera Sep 17, 2025
c8d8bcf
bump forge
0xValera Sep 17, 2025
0ee3b2f
add back deleted test,
kelemeno Sep 19, 2025
fc2abfc
Merge pull request #1656 from matter-labs/kl/add-back-deleted-test
kelemeno Sep 21, 2025
b5e3428
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 22, 2025
4cb7d0d
recalculate hashes
0xValera Sep 22, 2025
890f098
Merge pull request #1639 from matter-labs/v30/custom-da-removal
0xValera Sep 22, 2025
4638c6d
Update DeployCTM.s.sol
0xValera Sep 22, 2025
d5154e1
Update DeployCTM.s.sol
0xValera Sep 22, 2025
fba9d0a
update the anvil-zksync arguments
0xValera Sep 22, 2025
f8bbbf2
Update system-contracts-ci.yaml
0xValera Sep 22, 2025
3b2c0ac
Update system-contracts-ci.yaml
0xValera Sep 22, 2025
3266833
Update system-contracts-ci.yaml
0xValera Sep 22, 2025
386d05b
Update system-contracts-ci.yaml
0xValera Sep 22, 2025
f82c06b
Merge pull request #1659 from matter-labs/vg/custom-da-fix-ci
0xValera Sep 22, 2025
76d33b8
restore output logs, fix anvil zksync arguments
0xValera Sep 22, 2025
aa2567d
Merge remote-tracking branch 'origin/draft-v29' into draft-v30
zkzoomer Sep 24, 2025
2f467f3
merge fixes
zkzoomer Sep 24, 2025
2602993
fix hashes
zkzoomer Sep 24, 2025
ef6ab9c
Update era contracts - zkos: v0.0.25, wrapper: v0.4.6 (#1672)
mm-zk Sep 24, 2025
8289273
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 25, 2025
7aa66e8
build fixes after merge, lint, hashes
0xValera Sep 25, 2025
15a7917
Update VerifierPlonk.sol
0xValera Sep 25, 2025
c4100fe
regenerate verifier
0xValera Sep 25, 2025
ce1b113
some fixes
0xValera Sep 25, 2025
6cc9111
L2_NTV_BEACON_DEPLOYER_ADDR -> L2ContractAddresses
0xValera Sep 29, 2025
d88e9c3
OhBender -> ZKsync OS
0xValera Sep 29, 2025
834d8d6
foundry optimizer settings
0xValera Sep 29, 2025
a9f04bf
fix passing of parameters in L2NativeTokenVaultL1Test
0xValera Sep 29, 2025
af13f72
return vm.snapshotGasLastCall
0xValera Sep 29, 2025
362365e
set ZKsyncOS flag to false
0xValera Sep 29, 2025
34643da
fix typo
0xValera Sep 29, 2025
177b776
uncomment test_startMessageToL2
0xValera Sep 29, 2025
70e4918
add maxNumberOfZKChains to SystemContractsArgs
0xValera Sep 29, 2025
8d449b8
remove redundant build:foundry-fast
0xValera Sep 29, 2025
443cde3
add addChainBatchRoot to MRBase, we should have it on L1 in v30
0xValera Sep 29, 2025
35f21e1
imports script run
kelemeno Sep 29, 2025
e06fb30
Merge pull request #1678 from matter-labs/kl/imports-fix
0xValera Sep 29, 2025
c3d0dd0
better unify imports
kelemeno Sep 29, 2025
ebe449c
more cleanup
kelemeno Sep 29, 2025
a3a3875
Merge branch 'zksync-os-stable' of https://github.com/matter-labs/era…
0xValera Sep 29, 2025
7d8ef02
fixes after merge
0xValera Sep 29, 2025
3be8992
ctmChainId -> ctmRepresentativeChainId
0xValera Sep 29, 2025
0b28d7b
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 29, 2025
7123737
small fixes
kelemeno Sep 29, 2025
a3540f7
linting
kelemeno Sep 29, 2025
20b6edf
fix verifier
0xValera Sep 29, 2025
50a9bd5
fix hashes
0xValera Sep 29, 2025
116affe
Merge pull request #1680 from matter-labs/kl/better-imports
0xValera Sep 29, 2025
ee8f83a
Merge branch 'draft-v30' of https://github.com/matter-labs/era-contra…
0xValera Sep 29, 2025
a85b79a
fix imports after resolving conflicts
0xValera Sep 29, 2025
f0f99cb
lint
0xValera Sep 29, 2025
3e9bec3
fix hashes
0xValera Sep 29, 2025
348f7b9
Merge pull request #1626 from matter-labs/sb-adapting-contracts-for-z…
0xValera Sep 29, 2025
4d0d4bc
unify L1_CHAIN_ID and _l1chainId in AssetRouter contracts
0xValera Sep 30, 2025
fd2c08d
NTV -> NTVBase, unify _assetRouter and ASSET_ROUTER
0xValera Sep 30, 2025
335ccea
return L1_CHAIN_ID to IAssetRouterBase
0xValera Sep 30, 2025
6a18778
split Bridgehub into L1 and L2 versions
0xValera Sep 30, 2025
75e52ee
fix mess with immutables
0xValera Sep 30, 2025
4536454
move modifier to L2MessageRoot
0xValera Sep 30, 2025
9ac16ae
fix condition on multiple batches proof
0xValera Sep 30, 2025
92d9030
delete redundant statement
0xValera Sep 30, 2025
11ca4fa
remove old artifact
0xValera Sep 30, 2025
fafc869
MessageRoot -> L2MessageRoot in system contracts processing
0xValera Sep 30, 2025
2b74f5d
linter
0xValera Sep 30, 2025
d3681bf
reformulate comment
0xValera Sep 30, 2025
00b1ea3
L1 block.chainId fix
0xValera Sep 30, 2025
c4837d9
fix constructors in DeployUtils
0xValera Sep 30, 2025
57aca36
add only the required roles for validators
0xValera Sep 30, 2025
5fc7483
delete redundant comment
0xValera Sep 30, 2025
aaecf7a
update validator roles for committer
0xValera Oct 1, 2025
50bac31
AssetRouter contracts improve immutables codestyle
0xValera Oct 1, 2025
d1f9478
Bridgehub contracts improve immutables codestyle
0xValera Oct 1, 2025
14476d4
NTV contracts improve immutables codestyle, lint
0xValera Oct 1, 2025
91d42f5
ChainAssetHander contracts improve immutables codestyle
0xValera Oct 1, 2025
d6678dc
typos
0xValera Oct 1, 2025
de6e6f0
delete redundant contract (dependency of a moved contract)
0xValera Oct 1, 2025
922103c
linter
0xValera Oct 1, 2025
3bef145
Uncap parameters in constructor
0xValera Oct 1, 2025
8efbebe
fix naming in initL2
0xValera Oct 1, 2025
9864b8d
remove ToSet
0xValera Oct 1, 2025
9e5a678
fix build
0xValera Oct 1, 2025
500af2d
delete empty redundant file
0xValera Oct 1, 2025
71b9e64
slither
0xValera Oct 1, 2025
90aa863
remove wrong comment
0xValera Oct 1, 2025
91989c0
remove zksync os specific comment
0xValera Oct 1, 2025
1a6d272
fix test
0xValera Oct 1, 2025
343dbf5
hashes
0xValera Oct 1, 2025
919ff23
Merge pull request #1683 from matter-labs/vg/zksync-os-compatibility-…
0xValera Oct 1, 2025
6169f7c
rename, give valid name to validator variable (Discussed with Danil)
0xValera Oct 8, 2025
c690f7b
remove double/hard overrides
0xValera Oct 8, 2025
9e625d3
add support for both Era and ZKsync OS VKs
0xValera Oct 9, 2025
ae0a646
split verifier into Era and ZKsync OS versions
0xValera Oct 9, 2025
31e6bae
change verifier script generator, update verifiers
0xValera Oct 9, 2025
f37bfa9
lint
0xValera Oct 9, 2025
cb3295a
update verifiers CI
0xValera Oct 9, 2025
dd31994
fix build + some scripts changes [WIP]
0xValera Oct 9, 2025
de66f63
lint
0xValera Oct 9, 2025
e6be0a5
chore: rewrite system contract tests (#1717)
zkzoomer Oct 9, 2025
35c90e6
deploy verifiers depending on isZKsyncOS flag
0xValera Oct 13, 2025
fa05d44
split DualVerifier, fix build
0xValera Oct 13, 2025
c43fd1b
Merge branch 'draft-v30' into vg/zksync-os-comp-cleanup
0xValera Oct 13, 2025
3ec50d4
fix verifier deployment
0xValera Oct 13, 2025
8146156
lint
0xValera Oct 13, 2025
64f5a3b
fix zkfoundry test
0xValera Oct 13, 2025
345b556
gaps
0xValera Oct 13, 2025
2e8c3e7
Update TestnetVerifier.sol
0xValera Oct 13, 2025
3d0c6c8
bump zksync os verifiers
0xValera Oct 13, 2025
ae53361
fix precommitter role
0xValera Oct 13, 2025
44f9091
Merge pull request #1716 from matter-labs/vg/zksync-os-comp-cleanup
0xValera Oct 13, 2025
1d1af9e
Update l1-contracts/contracts/bridge/asset-router/L1AssetRouter.sol
0xValera Oct 15, 2025
6195bd7
Update l1-contracts/contracts/bridgehub/BridgehubBase.sol
0xValera Oct 15, 2025
11840c0
Merge branch 'draft-v29' into draft-v30
zkzoomer Oct 15, 2025
6103135
script fixes
zkzoomer Oct 16, 2025
9f698c6
chore(scripts): Remove redundant imports and old upgrades (#1735)
Deniallugo Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 12 additions & 30 deletions .github/workflows/l1-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,43 +246,25 @@ jobs:
working-directory: tools
run: rustup toolchain install

- name: Generate verifiers
- name: Generate Era verifiers
working-directory: tools
run: cargo run
run: cargo run --bin zksync_verifier_contract_generator --release -- --variant era

- name: Compare L1VerifierPlonk.sol
run: diff tools/data/VerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol
- name: Compare EraVerifierPlonk.sol
run: diff tools/data/EraVerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/EraVerifierPlonk.sol

- name: Compare VerifierFflonk.sol
run: diff tools/data/VerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol
- name: Compare EraVerifierFflonk.sol
run: diff tools/data/EraVerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/EraVerifierFflonk.sol

check-verifier-generator-l2:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.72.0

- name: Install Rust toolchain
working-directory: tools
run: rustup toolchain install

- name: Generate verifiers
- name: Generate ZKsyncOS verifiers
working-directory: tools
run: cargo run -- --l2_mode
run: cargo run --bin zksync_verifier_contract_generator --release -- --variant zksync-os

- name: Compare L2VerifierPlonk.sol
run: diff tools/data/VerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol
- name: Compare ZKsyncOSVerifierPlonk.sol
run: diff tools/data/ZKsyncOSVerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol

- name: Compare L2VerifierFflonk.sol
run: diff tools/data/VerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol
- name: Compare ZKsyncOSVerifierFflonk.sol
run: diff tools/data/ZKsyncOSVerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol

coverage:
defaults:
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/l2-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,46 +73,3 @@ jobs:

- name: Lint
run: yarn lint:check

test:
needs: [build, lint]
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install dependencies
run: yarn

- name: Restore artifacts cache
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
key: artifacts-l2-${{ github.sha }}
path: |
da-contracts/out
l1-contracts/cache-forge
l1-contracts/out
l1-contracts/zkout
l2-contracts/cache-forge
l2-contracts/zkout
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-ae913af65381734ad46c044a9495b67310bc77c4/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Run tests
run: yarn l2 test:foundry
14 changes: 4 additions & 10 deletions .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,21 @@ jobs:
run: |
rm -rf ./l1-contracts/contracts/state-transition/utils/
rm -rf ./l1-contracts/contracts/state-transition/verifiers/DualVerifier.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/VerifierPlonk.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/VerifierFflonk.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/TestnetVerifier.sol
rm -rf ./l1-contracts/contracts/state-transition/verifiers/L2TestnetVerifier.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/PlonkVerifierTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/PlonkVerifierRecursiveTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierRecursiveTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/VerifierTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/DummyPlonkVerifier.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/L2VerifierTest.sol
rm -rf ./l1-contracts/contracts/dev-contracts/test/L2VerifierRecursiveTest.sol
rm -rf ./l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol

- name: Run Slither for L1 contracts
working-directory: ./l1-contracts
# FIXME? --skip assembly because otherwise IR for DummyVerifierPlonk can't be generated (Slither issue).
run: |
slither --config ./slither.config.json .
slither --config ./slither.config.json --skip-assembly .

- name: Run Slither for L2 contracts
working-directory: ./l2-contracts
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/system-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,33 @@
- name: Print output logs of anvil-zksync
if: always()
run: cat anvil_zksync.log

test-contracts-foundry:
needs: [lint]
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install dependencies
run: yarn

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-5353a10345187933527fbad213d8c4f6500a775c/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

- name: Run tests using foundry
run: yarn sc test:foundry
Comment on lines +159 to +186

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 1 month ago

To fix the problem, the workflow should explicitly declare the least privileges needed for the GITHUB_TOKEN, in accordance with the principle of least privilege. The best fix is to add a permissions block at the top/root of the workflow file, granting only contents: read, as this suffices for checkout and read-only CI jobs. This block should be placed immediately after the workflow name: and before the on: section. This will set contents: read as the default for all jobs, implicitly restricting permissions unless overridden in a specific job.

To implement this, add the following lines after line 1 in .github/workflows/system-contracts-ci.yaml:

permissions:
  contents: read

No imports or extra definitions are needed as this is GitHub Actions workflow YAML.


Suggested changeset 1
.github/workflows/system-contracts-ci.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/system-contracts-ci.yaml b/.github/workflows/system-contracts-ci.yaml
--- a/.github/workflows/system-contracts-ci.yaml
+++ b/.github/workflows/system-contracts-ci.yaml
@@ -1,4 +1,6 @@
 name: System contracts CI
+permissions:
+  contents: read
 
 on:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: System contracts CI
permissions:
contents: read

on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
url = https://github.com/foundry-rs/forge-std
[submodule "lib/@matterlabs/zksync-contracts"]
path = lib/@matterlabs/zksync-contracts
url = https://github.com/matter-labs/v2-testnet-contracts
url = https://github.com/matter-labs/zksync-contracts
Loading
Loading