Skip to content

feat(consensus): add L2 registry contract (BFT-434) (#555) #2985

feat(consensus): add L2 registry contract (BFT-434) (#555)

feat(consensus): add L2 registry contract (BFT-434) (#555) #2985

name: L1 contracts CI
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn
- name: Install dependencies
run: yarn
- name: Build artifacts
run: yarn l1 build
- name: Build L2 artifacts
run: yarn l2 build
- name: Create cache
uses: actions/cache/save@v3
with:
key: artifacts-l1-${{ github.sha }}
path: |
l1-contracts/artifacts
l1-contracts/cache
l1-contracts/typechain
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn
- name: Install dependencies
run: yarn
- name: Lint
run: yarn lint:check
test-foundry:
needs: [build, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Use Foundry
uses: foundry-rs/foundry-toolchain@v1
- 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-l1-${{ github.sha }}
path: |
l1-contracts/artifacts
l1-contracts/cache
l1-contracts/typechain
- name: Run tests
run: yarn l1 test:foundry
test-hardhat:
needs: [build, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- 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-l1-${{ github.sha }}
path: |
l1-contracts/artifacts
l1-contracts/cache
l1-contracts/typechain
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
- name: Run tests
run: yarn l1 test --no-compile
check-verifier-generator:
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: Generate Verifier.sol
working-directory: tools
run: cargo run
- name: Compare
run: diff tools/data/Verifier.sol l1-contracts/contracts/state-transition/Verifier.sol