File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 16
16
"verify:arbitrum" : " hardhat --network arbitrum etherscan-verify" ,
17
17
"gen:addresses" : " ts-node ./script/genAddressesJson.ts"
18
18
},
19
+ "husky" : {
20
+ "hooks" : {
21
+ "pre-commit" : " ./script/preCommitGenAddresses.sh"
22
+ }
23
+ },
19
24
"devDependencies" : {
20
25
"@ethersproject/units" : " ^5.7.0" ,
21
26
"@nomicfoundation/hardhat-foundry" : " ^1.0.0" ,
34
39
"hardhat-deploy" : " ^0.11.22" ,
35
40
"hardhat-deploy-ethers" : " 0.3.0-beta.13" ,
36
41
"hardhat-tracer" : " ^1.0.0-alpha.6" ,
37
- "husky" : " ^8.0.0 " ,
42
+ "husky" : " ^8.0.3 " ,
38
43
"prettier" : " ^2.4.1" ,
39
44
"prettier-plugin-solidity" : " ^1.0.0-beta.18" ,
40
45
"ts-node" : " ^10.8.0" ,
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Check if any files in 'deployments' folder are staged for commit
4
+ if git diff --cached --name-only | grep -q ' deployments/'
5
+ then
6
+ echo " Changes detected in 'deployments' folder. Running 'yarn gen:addresses'..."
7
+ yarn gen:addresses
8
+
9
+ # Check if the script was successful
10
+ if [ $? -ne 0 ]; then
11
+ echo " Script failed. Aborting commit."
12
+ exit 1
13
+ fi
14
+
15
+ echo " Adding updated address.json to the commit..."
16
+ git add addresses.json
17
+
18
+ echo " Continuing with commit..."
19
+ fi
Original file line number Diff line number Diff line change @@ -4639,7 +4639,7 @@ https-proxy-agent@^5.0.0:
4639
4639
agent-base "6"
4640
4640
debug "4"
4641
4641
4642
- husky@^8.0.0 :
4642
+ husky@^8.0.3 :
4643
4643
version "8.0.3"
4644
4644
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
4645
4645
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
You can’t perform that action at this time.
0 commit comments