/
Makefile
68 lines (53 loc) · 1.62 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-include ./.env
install:
@echo "Installing"
@yarn install
hardhat.init:
@echo "Initializing hardhat project..."
@yarn hardhat init
lint:
@echo "Reformatting smart contract..."
@yarn prettier
@echo "Linting check smart contract..."
@solhint "contracts/**/*.sol"
compile:
@echo "Compiling..."
@yarn hardhat compile
test.contract:
@echo "Running tests..."
@yarn hardhat test
deploy-contract:
@if [ "$(network)" = "" ]; then \
echo "Must provide 'network' argument"; \
exit 1; \
fi
@echo "Deploying..."
@yarn hardhat deploy --network $(network)
deploy-contract.reset:
@if [ "$(network)" = "" ]; then \
echo "Must provide 'network' argument"; \
exit 1; \
fi
@echo "Deploying with reset..."
@yarn hardhat deploy --reset --network $(network)
deploy-contract.local: network=localhost
deploy-contract.local: deploy-contract
deploy-contract.local.reset: network=localhost
deploy-contract.local.reset: deploy-contract.reset
deploy-contract.linea.testnet: network=linea_testnet
deploy-contract.linea.testnet: deploy-contract
deploy-contract.linea.testnet.reset: network=linea_testnet
deploy-contract.linea.testnet.reset: deploy-contract.reset
deploy-contract.polygon_zk.testnet: network=polygon_zk_testnet
deploy-contract.polygon_zk.testnet: deploy-contract
deploy-contract.polygon_zk.testnet.reset: network=polygon_zk_testnet
deploy-contract.polygon_zk.testnet.reset: deploy-contract.reset
run.local-node:
@echo "Running local node..."
@yarn hardhat node --no-deploy
sync-laika:
@if [ "$(contract)" = "" ]; then \
echo "Must provide 'contract' argument"; \
exit 1; \
fi
@yarn hardhat laika-sync --contract $(contract)