generated from m0-foundation/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (30 loc) · 1.27 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
# include .env file and export its env vars
# (-include to ignore error if it does not exist)
-include .env
# dapp deps
update:; forge update
# Deployment helpers
deploy-local :; FOUNDRY_PROFILE=production forge script script/CompotaToken.s.sol --rpc-url localhost --broadcast -v
deploy-sepolia :; FOUNDRY_PROFILE=production forge script script/CompotaToken.s.sol --rpc-url sepolia --broadcast -vvv
# Run slither
slither :; FOUNDRY_PROFILE=production forge build --build-info --skip '*/test/**' --skip '*/script/**' --force && slither --compile-force-framework foundry --ignore-compile --sarif results.sarif --config-file slither.config.json .
# Common tasks
profile ?=default
build:
@./build.sh -p production
test:
@./test.sh -p $(profile)
fuzz:
@./test.sh -t testFuzz -p $(profile)
integration:
@./test.sh -d test/integration -p $(profile)
invariant:
@./test.sh -d test/invariant -p $(profile)
coverage:
FOUNDRY_PROFILE=$(profile) forge coverage --no-match-path 'test/invariant/**/*.sol' --report lcov && lcov --extract lcov.info -o lcov.info 'src/*' && genhtml lcov.info -o coverage
gas-report:
FOUNDRY_PROFILE=$(profile) forge test --gas-report > gasreport.ansi
sizes:
@./build.sh -p production -s
clean:
forge clean && rm -rf ./abi && rm -rf ./bytecode && rm -rf ./types