-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (59 loc) · 1.52 KB
/
Copy pathMakefile
File metadata and controls
68 lines (59 loc) · 1.52 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
# lint
lint:
@echo "linting main contracts..."
@npx solhint src/*.sol
.PHONY: lint
# docs
gen-docs:
@echo "generating docs..."
@echo forge doc
.PHONY: gen-docs
build-docs:
@echo "building docs..."
@echo forge doc --build
.PHONY: build-docs
serve-docs:
@echo "serving docs..."
@forge doc --serve --port 4000
.PHONY: serve-docs
# testing
test-watch-verbose-optimize:
@echo "forge testing"
@forge test -vvvvv --fork-url ${MAINNET_RPC_URL} --optimize --watch
.PHONY: test-watch-verbose
# use like `make test-watch-verbose verbose=-vv`
# we're testing just before the block where not enough stake was available
# 16376810 - 1, see the following tx which staked RPL
# https://etherscan.io/tx/0x944093ca45dd60ea392a7a28afa14c76f0341535f66184f178dbafb19bac6fc3
test-watch-verbose:
@echo "forge testing"
@forge test \
--watch \
$(verbose) \
--fork-url ${MAINNET_RPC_URL} \
--fork-block-number 16376809
.PHONY: test-watch-verbose
test-verbose:
@echo "forge testing"
@forge test \
$(verbose) \
--fork-url ${MAINNET_RPC_URL} \
--fork-block-number 16376809
.PHONY: test-verbose
test-coverage:
@echo "forge coverage"
@forge coverage \
--fork-url ${MAINNET_RPC_URL} \
--fork-block-number 16376809
.PHONY: test-coverage
coverage-report:
@echo "forge coverage with lcov report"
@forge coverage \
--fork-url ${MAINNET_RPC_URL} \
--fork-block-number 16376809
--report lcov
.PHONY: coverage-report
gen-report-html:
@echo "generating report html files"
@genhtml -o report --branch-coverage lcov.info
.PHONY: gen-report-html