Skip to content

CSUB-1921: Check ABI on disk vs freshly generated from source #4

CSUB-1921: Check ABI on disk vs freshly generated from source

CSUB-1921: Check ABI on disk vs freshly generated from source #4

Workflow file for this run

---
name: solidity
"on":
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: read-all
jobs:
forge-build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install foundry
run: |
export FOUNDRY_DIR="$HOME/.foundry"
# first install it
curl -L https://foundry.paradigm.xyz | bash
~/.foundry/bin/foundryup
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- run: npm install -g yarn
- name: Compile smart contracts
run: |
yarn install
~/.foundry/bin/forge build
check-abi-on-disk:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install foundry
run: |
export FOUNDRY_DIR="$HOME/.foundry"
# first install it
curl -L https://foundry.paradigm.xyz | bash
~/.foundry/bin/foundryup
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- run: npm install -g yarn
- name: Regenerate the ABI
run: |
yarn install
solc --version
./contracts/abi-creator.sh
- name: Check for mismatch
run: |
echo "========== DEBUG DEBUG DEBUG =========="
git status --short
git diff
echo "======================================="
if [ -n "$(git status --short)" ]; then
echo "FAIL: found ABI mismatch on disk vs. freshly generated from source"
echo "TODO: update ABI on disk and commit the changes to git"
exit 1
else
echo "PASS: ABI on disk matches freshly generated from source"
exit 0
fi