-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (35 loc) · 982 Bytes
/
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
-include .env
.EXPORT_ALL_VARIABLES:
MAKEFLAGS += --no-print-directory
ETHERSCAN_API_KEY=$(ETHERSCAN_KEY)
default:
forge fmt && forge build
# Always keep Forge up to date
install:
foundryup
forge install
snapshot:
@forge snapshot
test:
@forge test
test-f-%:
@FOUNDRY_MATCH_TEST=$* make test
test-c-%:
@FOUNDRY_MATCH_CONTRACT=$* make test
test-%:
@FOUNDRY_TEST=test/$* make test
coverage:
@forge coverage --report lcov
@lcov --ignore-errors unused --remove ./lcov.info -o ./lcov.info.pruned "test/*" "script/*"
@rm ./lcov.info*
coverage-html:
@make coverage
@genhtml ./lcov.info.pruned -o report --branch-coverage --output-dir ./coverage
@rm ./lcov.info*
simulate-%:
@forge script script/$*.s.sol -vvvvv --fork-url $(RPC_URL_MAINNET)
run-%:
@forge script script/$*.s.sol --broadcast --slow -vvvvv --private-key $(PRIVATE_KEY)
deploy-%:
@forge script script/$*.s.sol --broadcast --slow -vvvvv --verify --private-key ${PRIVATE_KEY}
.PHONY: test coverage