Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
remedcu committed Jul 5, 2024
1 parent d016ac1 commit f84b3dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Add new chain

Template to provide information about the new chain. Only add extra information in the bottom section. Ensure that the contracts are deployed on the chain, if not deploy with [safe-contracts](https://github.com/safe-global/safe-contracts). This entire paragraph can be deleted.
> Template to provide information about the new chain. Only add extra information in the bottom section. Ensure that the contracts are deployed on the chain, if not deploy with [safe-contracts](https://github.com/safe-global/safe-contracts). This entire paragraph can be deleted.
Please fill the following form:

Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,9 @@ jobs:
id: review-check-result
run: |
script_result=$(bash bin/github-review.sh ${PR_NUMBER} | tail -1)
echo "script_result=$script_result" >> $GITHUB_OUTPUT;
review-result:
runs-on: ubuntu-latest
needs: [review-check]
steps:
- uses: actions/checkout@v4
- name: Post Success Comment to the PR
if: needs.review-check.outputs.review-result == 'Network addresses & Code hashes are correct'
run: |
gh pr comment "$PR_NUMBER" --repo "$REPO" --body "✅ Success: Network addresses & Code hashes are correct"
- name: Post Failure Comment to the PR
if: needs.review-check.outputs.review-result != 'Network addresses & Code hashes are correct'
run: |
gh pr comment "$PR_NUMBER" --repo "$REPO" --body "⛔️ Error: Check the 'review-check::Check PR' log for more details"
exit 1
if [ "$script_result" != "Network addresses & Code hashes are correct" ]; then
echo "⛔️ Error: $script_result"
exit 1
else
echo "✅ Success: $script_result"
fi
4 changes: 1 addition & 3 deletions bin/github-review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ for file in "${versionFiles[@]}"; do
for deploymentType in "${deploymentTypes[@]}"; do
defaultAddress=$(jq -r --arg t "$deploymentType" '.addresses[$t]' "$file")
defaultCodeHash=$(jq -r --arg t "$deploymentType" '.codeHash[$t]' "$file")
DEFAULTADDRESS=$defaultAddress RPCURL=$rpc npm run codehash
networkCodeHash=$(cat codehash.txt)
rm codehash.txt
networkCodeHash=$(cast code $defaultAddress --rpc-url $rpc | tr -d '\n' | cast keccak)
if [[ $defaultCodeHash != $networkCodeHash ]]; then
echo "ERROR: "$file" ("$defaultAddress") code hash ("$defaultCodeHash") is not the same as the one created for the chain id ("$networkCodeHash")" 1>&2
exit 1
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
],
"scripts": {
"build": "rimraf dist && tsc",
"codehash": "node scripts/codehash.js",
"lint": "npm run lint:ts && npm run lint:json",
"lint:ts": "eslint --max-warnings 0 src/",
"lint:json": "prettier -c src/assets/*/*.json",
Expand Down
6 changes: 0 additions & 6 deletions scripts/codehash.js

This file was deleted.

0 comments on commit f84b3dd

Please sign in to comment.