-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (61 loc) · 1.96 KB
/
Makefile
File metadata and controls
81 lines (61 loc) · 1.96 KB
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
77
78
79
80
81
# include .env file and export its env vars
# (-include to ignore error if it does not exist)
-include .env
all: clean install build foundry-test
# Clean the repo
clean :; forge clean
# Install the Modules
install :; forge install --no-commit
# Update Dependencies
update:; forge update
# Builds
build :; forge build
bindings :
@echo " > \033[32mCreate go bindings...\033[0m"
./tools/createBindings.sh
# Tests
# --ffi # enable if you need the `ffi` cheat code on HEVM
foundry-test :; forge clean && forge test --optimize --optimizer-runs 200 -v
# Run solhint
# npm install -g solhint
solhint :; solhint -f table "{src,test,script}/**/*.sol"
# slither
# to install slither, visit [https://github.com/crytic/slither]
slither :; slither . --fail-low #--triage-mode
# mythril
mythril :
@echo " > \033[32mChecking contracts with mythril...\033[0m"
./tools/mythril.sh
mythx :
@echo " > \033[32mChecking contracts with mythx...\033[0m"
mythx analyze
# cargo install aderyn
aderyn :; aderyn .
# upgradeable check
upgradeable:
@echo " > \033[32mChecking upgradeable...\033[0m"
./tools/checkUpgradeable.sh
# check upgradeable contract storage layout
storage-layout:
@echo " > \033[32mChecking contract storage layout...\033[0m"
./tools/checkStorageLayout.sh
# [DANGEROUS] regenerate upgradeable contract storage layout
regenerate-storage-layout:
@echo " > \033[32m[DANGEROUS]Regenerating storage layout...\033[0m"
rm ./tools/storageLayout/* && ./tools/checkStorageLayout.sh
# Lints
lint :; forge fmt
abi:
@echo " > \033[32mGenerating abi...\033[0m"
./tools/generateABI.sh
# Generate Gas Snapshots
snapshot :; forge clean && forge snapshot
# set testnet network param
set-param-dev:
@NETWORK_PARAMS_ADDRESS=$(DEV_NETWORK_PARAMS_ADDRESS) forge script script/SetParams.s.sol:SetParams --chain-id $(CHAIN_ID) \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--broadcast --ffi
# compress network params
compress-param:
forge script script/CompressParams.s.sol:CompressParams