Skip to content

Fix TS issues after breaking changes in ABI types #1199

Fix TS issues after breaking changes in ABI types

Fix TS issues after breaking changes in ABI types #1199

name: Static checks
on: [push, merge_group]
jobs:
test:
name: Static checks
runs-on: ubuntu-latest
environment: CI
env:
ETHEREUM_JSON_RPC_API_URL: ${{ secrets.ETHEREUM_JSON_RPC_API_URL }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Enable Corepack and Install Yarn 4
run: |
corepack enable
yarn set version latest
- name: Install Dependencies
run: yarn install
# We don't store circuit and smart contract compilation artefacts in the repo,
# but typecheck fails on import without them so we just create fake files here
- name: Create fake circuit compilation artefacts
working-directory: .
run: |
mkdir -p target
echo '{ "abi": [] }' > target/get_storage.json
echo '{ "abi": [] }' > target/get_account.json
echo '{ "abi": [] }' > target/get_header.json
echo '{ "abi": [] }' > target/get_receipt.json
echo '{ "abi": [] }' > target/get_transaction.json
echo '{ "abi": [] }' > target/get_log.json
- name: Create fake smart contract build artefacts
working-directory: .
run: |
mkdir -p ethereum/contracts/out/GetStorageUltraPLONKVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum/contracts/out/GetStorageUltraPLONKVerifier.sol/UltraVerifier.json
mkdir -p ethereum/contracts/out/GetAccountUltraPLONKVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum/contracts/out/GetAccountUltraPLONKVerifier.sol/UltraVerifier.json
mkdir -p ethereum/contracts/out/GetHeaderUltraPLONKVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum/contracts/out/GetHeaderUltraPLONKVerifier.sol/UltraVerifier.json
mkdir -p ethereum/contracts/out/GetReceiptUltraPLONKVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum/contracts/out/GetReceiptUltraPLONKVerifier.sol/UltraVerifier.json
mkdir -p ethereum/contracts/out/GetTransactionUltraPLONKVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum/contracts/out/GetTransactionUltraPLONKVerifier.sol/UltraVerifier.json
mkdir -p ethereum/contracts/out/GetLogUltraPLONKVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum/contracts/out/GetLogUltraPLONKVerifier.sol/UltraVerifier.json
- name: Run TypeScript Build
run: yarn build
- name: Run TypeScript format check
run: yarn format:all:ci
# It's important to run lint after build as eslint does not support project references yet
# https://github.com/typescript-eslint/typescript-eslint/issues/2094
- name: Run TypeScript Linter
run: yarn lint:all
- name: Check if fixtures are up to date
run: |
cd ./ethereum/oracles
yarn prepare-js-fixtures
yarn prepare-noir-fixtures
cd ..
git diff --exit-code ./oracles/fixtures
git diff --exit-code ./circuits/lib/src/fixtures
- name: Install Nargo
uses: noir-lang/noirup@v0.1.3
with:
toolchain: 0.31.0
- name: Run nargo format check
run: nargo fmt --check