-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
76 lines (56 loc) · 1.96 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
-include .env
.PHONY: all test clean deploy-anvil
all: clean remove install update build
# Clean the repo
clean :; forge clean
# Remove modules
remove :; rm -rf lib
install :; forge install --no-commit foundry-rs/forge-std openzeppelin/openzeppelin-contracts https://github.com/Hats-Protocol/hats-protocol.git https://github.com/Hats-Protocol/hats-module https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable.git https://github.com/dmfxyz/murky.git
# Update Dependencies
update:; forge update
compile:; forge compile
build:; forge build --sizes --skip test
test :; forge test
snapshot :; forge snapshot
slither :; slither --config-file slither.config.json src/.
format :; forge fmt src/**/*.sol && forge fmt scripts/**/*.sol && forge fmt test/**/*.sol
# solhint should be installed globally
lint :; solhint "src/**/*.sol"
anvil :; anvil -m 'test test test test test test test test test test test junk'
# deploy
deploy :;
@if [ -n "${force}" ]; then \
./scripts/deploy.sh ${network} ${contract} --force --verify; \
else\
./scripts/deploy.sh ${network} ${contract} --verify; \
fi
# verify
verify :; ./scripts/verify.sh ${network} ${contract}
CONTRACTS = \
CharacterAccount \
CharacterSheetsImplementation \
ExperienceImplementation \
ItemsImplementation \
ItemsManagerImplementation \
ClassesImplementation \
MolochV2EligibilityAdaptor \
MolochV3EligibilityAdaptor \
ClassLevelAdaptor \
HatsAdaptor \
CharacterSheetsLevelEligibilityModule \
ERC6551HatsEligibilityModule \
MultiERC6551HatsEligibilityModule \
ClonesAddressStorageImplementation \
ImplementationAddressStorage \
CharacterSheetsFactory
deploy-contracts :;
@for contract in ${CONTRACTS}; do \
make deploy network=${network} force=${force} contract=$$contract; \
done
verify-contracts :;
@for contract in ${CONTRACTS}; do \
make verify network=${network} contract=$$contract; \
done
# execute commands
create-sheets :; scripts/createSheets.sh ${network}
execute :; scripts/execute.sh ${network}