forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'matter-labs:main' into main
- Loading branch information
Showing
1,390 changed files
with
60,713 additions
and
55,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"sdk/zksync-rs": "0.4.0", | ||
"core": "18.12.0", | ||
"prover": "10.0.2" | ||
"core": "20.5.2", | ||
"prover": "11.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Build contracts | ||
on: | ||
workflow_call: | ||
inputs: | ||
compilers: | ||
description: 'JSON of required compilers and their versions' | ||
type: string | ||
required: false | ||
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19", "1.3.21"] } , { "zkvyper": ["1.3.13"] }]' | ||
|
||
jobs: | ||
build-images: | ||
name: Build and upload contracts | ||
runs-on: [matterlabs-ci-runner] | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||
with: | ||
submodules: "recursive" | ||
- name: setup-env | ||
run: | | ||
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV | ||
echo CI=1 >> $GITHUB_ENV | ||
echo $(pwd)/bin >> $GITHUB_PATH | ||
echo CI=1 >> .env | ||
echo IN_DOCKER=1 >> .env | ||
# TODO: Remove after when we can upgrade hardhat-plugins | ||
- name: pre-download compiilers | ||
run: | | ||
# Download needed versions of vyper compiler | ||
# Not sanitized due to unconventional path and tags | ||
mkdir -p ./hardhat-nodejs/compilers-v2/vyper/linux | ||
wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 https://github.com/vyperlang/vyper/releases/download/v0.3.10/vyper.0.3.10+commit.91361694.linux | ||
wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 https://github.com/vyperlang/vyper/releases/download/v0.3.3/vyper.0.3.3+commit.48e326f0.linux | ||
chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 | ||
chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 | ||
COMPILERS_JSON='${{ inputs.compilers }}' | ||
echo "$COMPILERS_JSON" | jq -r '.[] | to_entries[] | .key as $compiler | .value[] | "\(.),\($compiler)"' | while IFS=, read -r version compiler; do | ||
mkdir -p "./hardhat-nodejs/compilers-v2/$compiler" | ||
wget -nv -O "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" "https://github.com/matter-labs/${compiler}-bin/releases/download/v${version}/${compiler}-linux-amd64-musl-v${version}" | ||
chmod +x "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" | ||
done | ||
- name: start-services | ||
run: | | ||
echo "IMAGE_TAG_SUFFIX=${{ env.IMAGE_TAG_SUFFIX }}" >> .env | ||
mkdir -p ./volumes/postgres | ||
docker compose up -d zk postgres | ||
ci_run sccache --start-server | ||
- name: build contracts | ||
run: | | ||
ci_run git config --global --add safe.directory /usr/src/zksync | ||
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen | ||
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts | ||
ci_run git config --global --add safe.directory /usr/src/zksync/contracts | ||
ci_run zk | ||
ci_run zk clean --all | ||
ci_run zk run yarn | ||
ci_run cp etc/tokens/{test,localhost}.json | ||
ci_run zk compiler all | ||
ci_run zk contract build | ||
ci_run zk f yarn run l2-contracts build | ||
- name: upload contracts | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 | ||
with: | ||
name: contracts | ||
path: | | ||
./contracts/system-contracts/**/artifacts/ | ||
./contracts/system-contracts/**/artifacts-zk/ | ||
./contracts/l1-contracts/**/artifacts/ | ||
./contracts/l1-contracts/**/artifacts-zk/ | ||
./contracts/l2-contracts/**/artifacts/ | ||
./contracts/l2-contracts/**/artifacts-zk/ | ||
compression-level: 0 | ||
|
||
- name: Show sccache stats | ||
if: always() | ||
run: | | ||
ci_run sccache --show-stats | ||
ci_run cat /tmp/sccache_log.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.