Skip to content

Commit

Permalink
chore: recompile solidity with version 1.12 abigen (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code committed Mar 21, 2024
1 parent 894fbb6 commit 91b796e
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 702 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/solhint.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: solidity

on:
push:
branches:
- main
paths:
- "solidity/**"
pull_request:
paths:
- "solidity/**"

permissions:
contents: read

concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
check-latest: false
cache: "yarn"
cache-dependency-path: solidity/yarn.lock
- run: cd solidity && yarn install && yarn lint:sol && yarn compile

abigen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install abigen
run: |
wget -q https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.12.0-e501b3b0.tar.gz
tar -zxvf geth-alltools-linux-amd64-1.12.0-e501b3b0.tar.gz
sudo mv geth-alltools-linux-amd64-1.12.0-e501b3b0/abigen /usr/local/bin
- name: Run abigen
run: make contract-abigen
- name: Check diff
run: git diff --exit-code
2 changes: 1 addition & 1 deletion contract/ERC1967Proxy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contract/FIP20Upgradable.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contract/WFXUpgradable.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions contract/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ for cmd in "${commands[@]}"; do
fi
done

abigen_version=$(abigen --version | awk '{print $3}')
if ! [[ "$abigen_version" =~ ^1.12.0-stable.* ]]; then
echo "expected abigen version 1.12.0, but got $abigen_version, please upgrade abigen first" && exit 1
fi

project_dir="$(git rev-parse --show-toplevel)"
if [ ! -d "$project_dir/solidity/contracts/node_modules" ]; then
echo "===> Installing node modules"
Expand Down
Loading

0 comments on commit 91b796e

Please sign in to comment.