Skip to content

Commit

Permalink
feat: update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
iavl committed Oct 12, 2024
1 parent 69a9c7e commit 235cbeb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
10 changes: 8 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ yarn solhint
echo "Running test"
yarn test

echo "Running pre-commit"
yarn pre-commit
echo "Checking if ABI files have changed"
yarn abi
if git diff --name-only | grep -q -E '\.abi$'; then
echo "ABI files have been updated. Please add these changes and commit again."
echo "You can do this by running:"
echo "git add . && git commit -m 'Your commit message'"
exit 1
fi
37 changes: 24 additions & 13 deletions deployments/PowerToken.abi
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
[
{
"type": "constructor",
"inputs": [
{
"name": "admin_",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "ADMIN",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "APP_ADMIN_ROLE",
Expand Down Expand Up @@ -77,19 +101,6 @@
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "admin",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "airdrop",
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"upgradeable": "make upgradeable",
"mythril": "make mythril",
"storage-layout": "make storage-layout",
"prepare": "husky install",
"pre-commit": "yarn abi && git diff --cached --name-only --diff-filter=ACM | grep -E '\\.abi\\.json$' | xargs -r git add"
"prepare": "husky install"
}
}

0 comments on commit 235cbeb

Please sign in to comment.