Skip to content

Commit b09710b

Browse files
committed
Merge draft-v31 and resolve conflicts
Merged latest draft-v31 changes including: - foundry fixes (matter-labs#1981) - ZKsyncOSDualVerifier (matter-labs#1980) - zksync-foundry v0.1.5 (matter-labs#1959) - zkstack-out CI check (matter-labs#1977) Resolved conflicts in L2 integration tests by keeping both: - vm.etch-based deployL2Weth() and setUpInner() overrides - New getChainCreationParamsConfig() override
2 parents 74fcd7b + 3fb1b28 commit b09710b

File tree

140 files changed

+21335
-2245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+21335
-2245
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Install zksync-foundry"
2+
3+
description: "Installs zksync-foundry with specified version."
4+
5+
inputs:
6+
version:
7+
type: string
8+
description: "Version of zksync-foundry to install."
9+
required: false
10+
default: "v0.1.5"
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Install zksync-foundry
16+
shell: "bash -ex {0}"
17+
env:
18+
ZKSYNC_FOUNDRY_URL: "https://github.com/matter-labs/foundry-zksync/releases/download"
19+
VERSION: "${{ inputs.version }}"
20+
INSTALL_DIR: "foundry-zksync"
21+
run: |
22+
mkdir "${INSTALL_DIR}"
23+
curl -LO ${ZKSYNC_FOUNDRY_URL}/foundry-zksync-${VERSION}/foundry_zksync_${VERSION}_linux_amd64.tar.gz
24+
tar zxf foundry_zksync_${VERSION}_linux_amd64.tar.gz -C ./${INSTALL_DIR}
25+
chmod +x ./${INSTALL_DIR}/forge ./${INSTALL_DIR}/cast
26+
echo "${PWD}/${INSTALL_DIR}" >> "${GITHUB_PATH}"
27+
./${INSTALL_DIR}/forge --version
28+
./${INSTALL_DIR}/cast --version
29+
echo "Installed zksync-foundry version: ${VERSION}"

.github/workflows/build-release.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ jobs:
3535
submodules: recursive
3636

3737
- name: Install foundry-zksync
38-
run: |
39-
mkdir ./foundry-zksync
40-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
41-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
42-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
43-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
38+
uses: ./.github/actions/install-zksync-foundry
4439

4540
- name: Use Node.js
4641
uses: actions/setup-node@v3

.github/workflows/l1-contracts-ci.yaml

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ jobs:
1919
submodules: recursive
2020

2121
- name: Install foundry-zksync
22-
run: |
23-
mkdir ./foundry-zksync
24-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
25-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
26-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
27-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
22+
uses: ./.github/actions/install-zksync-foundry
2823

2924
- name: Use Node.js
3025
uses: actions/setup-node@v3
@@ -43,8 +38,17 @@ jobs:
4338
- name: Build l1 contracts
4439
working-directory: l1-contracts
4540
run: |
41+
rm -rf zkstack-out
4642
yarn build:foundry
4743
44+
# Fail if regenerated zkstack-out differs from what was committed
45+
if [ -n "$(git status --porcelain -- zkstack-out)" ]; then
46+
echo "::error::l1-contracts/zkstack-out is out of date. Run 'cd l1-contracts && yarn build:foundry' and commit the changes."
47+
git --no-pager status --porcelain -- zkstack-out
48+
git --no-pager diff -- zkstack-out || true
49+
exit 1
50+
fi
51+
4852
- name: Build l2 contracts
4953
working-directory: l2-contracts
5054
run: |
@@ -175,12 +179,7 @@ jobs:
175179
l1-contracts/zkout
176180
177181
- name: Install foundry-zksync
178-
run: |
179-
mkdir ./foundry-zksync
180-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
181-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
182-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
183-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
182+
uses: ./.github/actions/install-zksync-foundry
184183

185184
- name: Check selectors
186185
run: yarn l1 selectors --check
@@ -202,12 +201,7 @@ jobs:
202201
cache: yarn
203202

204203
- name: Install foundry-zksync
205-
run: |
206-
mkdir ./foundry-zksync
207-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
208-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
209-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
210-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
204+
uses: ./.github/actions/install-zksync-foundry
211205

212206
- name: Install dependencies
213207
run: yarn
@@ -257,12 +251,7 @@ jobs:
257251
cache: yarn
258252

259253
- name: Install foundry-zksync
260-
run: |
261-
mkdir ./foundry-zksync
262-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
263-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
264-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
265-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
254+
uses: ./.github/actions/install-zksync-foundry
266255

267256
- name: Install dependencies
268257
run: yarn
@@ -346,12 +335,7 @@ jobs:
346335
cache: yarn
347336

348337
- name: Install foundry-zksync
349-
run: |
350-
mkdir ./foundry-zksync
351-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
352-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
353-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
354-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
338+
uses: ./.github/actions/install-zksync-foundry
355339

356340
- name: Install dependencies
357341
run: yarn

.github/workflows/l1-contracts-foundry-ci.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ jobs:
1717
submodules: true
1818

1919
- name: Install foundry-zksync
20-
run: |
21-
mkdir ./foundry-zksync
22-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
23-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
24-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
25-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
20+
uses: ./.github/actions/install-zksync-foundry
2621

2722
- name: Use Node.js
2823
uses: actions/setup-node@v4

.github/workflows/l2-contracts-ci.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ jobs:
1414
submodules: recursive
1515

1616
- name: Install foundry-zksync
17-
run: |
18-
mkdir ./foundry-zksync
19-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
20-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
21-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
22-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
17+
uses: ./.github/actions/install-zksync-foundry
2318

2419
- name: Use Node.js
2520
uses: actions/setup-node@v3

.github/workflows/slither.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ jobs:
2828
python-version: 3.8
2929

3030
- name: Install foundry-zksync
31-
run: |
32-
mkdir ./foundry-zksync
33-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
34-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
35-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
36-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
31+
uses: ./.github/actions/install-zksync-foundry
3732

3833
- name: Install Slither
3934
run: |

.github/workflows/system-contracts-ci.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ jobs:
1414
submodules: recursive
1515

1616
- name: Install foundry-zksync
17-
run: |
18-
mkdir ./foundry-zksync
19-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
20-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
21-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
22-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
17+
uses: ./.github/actions/install-zksync-foundry
2318

2419
- name: Use Node.js
2520
uses: actions/setup-node@v3
@@ -178,12 +173,7 @@ jobs:
178173
run: yarn
179174

180175
- name: Install foundry-zksync
181-
run: |
182-
mkdir ./foundry-zksync
183-
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.30/foundry_zksync_v0.0.30_linux_amd64.tar.gz
184-
tar zxf foundry_zksync_v0.0.30_linux_amd64.tar.gz -C ./foundry-zksync
185-
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
186-
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
176+
uses: ./.github/actions/install-zksync-foundry
187177

188178
- name: Run tests using foundry
189179
run: yarn sc test:foundry

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ yarn-debug.log*
1919
yarn-error.log*
2020
l1-contracts/yarn-error.log*
2121
l1-contracts/lcov.info
22+
l1-contracts/UNTESTED_LINES_REPORT.md
2223
l1-contracts/report/*
2324
l1-contracts/coverage/*
2425
l1-contracts/out/*
@@ -37,4 +38,7 @@ l1-contracts/test/foundry/integration/deploy-scripts/script-out/*
3738
l1-contracts/test/foundry/l1/integration/upgrade-envs/script-out/*.toml
3839
l1-contracts/zkout/*
3940
.lycheecache
41+
42+
# Foundry binary
4043
foundry-zksync/
44+
l1-contracts/foundry-zksync/

0 commit comments

Comments
 (0)