-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (26 loc) · 844 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
-include .env
.PHONY: format format-fix compile deploy test-forge test-escrow test-factory clean
# Variables:
VERBOSITY ?=
TEST ?=
GREP ?=
TAGS ?=
# Formatting commands:
format-check :; npx prettier --check '**/**/*.{ts,json}' 'src/**/*.sol' 'test-forge/**/*.sol'
format-fix :; npx prettier --write '**/**/*.{ts,json}' 'src/**/*.sol' 'test-forge/**/*.sol'
# Clean cache and artifacts:
clean :; yarn hardhat clean
# Compile command:
build :; yarn hardhat compile
# Deploy commands:
deploy:
ifdef network
yarn hardhat deploy --network $(network)
else
yarn hardhat deploy
endif
# Launch Hardhat's local chain:
chain :; yarn hardhat node
# Test commands:
test-forge :; forge test $(VERBOSITY) $(TEST)
test-hardhat :; yarn hardhat test test/unit/escrow_factory.t.ts test/unit/erc20_escrow.t.ts test/unit/native_escrow.t.ts $(GREP) $(TEST)