-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (28 loc) · 1.28 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
-include .env
# Installation commands
install:; make forge-install && npm install
forge-install:
rm -rfv lib \
&& forge install --no-git foundry-rs/[email protected] \
&& forge install --no-git OpenZeppelin/[email protected] \
&& forge install --no-git OpenZeppelin/[email protected] \
&& forge install --no-git dl-solarity/[email protected]
# Developement commands
compile:; forge build
test:; forge test -vv
coverage:; forge coverage
coverage-lcov:; forge coverage --report lcov
gas:; forge test --gas-report
clean:; forge clean
# Network commands
private-network:; anvil
private-network-fork:; anvil --fork-url https://mainnet.infura.io/v3/${INFURA_KEY}
deploy-localhost:; forge script scripts/deploy.s.sol --fork-url http://localhost:8545 --broadcast
deploy-goerli:; forge script scripts/deploy.s.sol --rpc-url https://goerli.infura.io/v3/${INFURA_KEY} --private-key ${PRIVATE_KEY} --broadcast --verify -vvvv
# Types and docs commands
generate-types:; typechain --discriminate-types --target ethers-v6 --out-dir generated-types "out/**/*.json"
generate-docs:; forge doc
# Linting commands
lint-fix:; make lint-sol-fix && make lint-json-fix
lint-json-fix:; npx prettier --write "./**/*.json"
lint-sol-fix:; npx prettier --write "contracts/**/*.sol"