-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
109 lines (93 loc) · 2.3 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
-include .env
.PHONY: env
env:
@cp ./.env.tmpl ./.env
.PHONY: infra
infra:
@cd third_party/cartesi-coprocessor; docker compose -f docker-compose-devnet.yaml --profile explorer up --build
.PHONY: anvil
anvil:
@cd third_party/cartesi-coprocessor; docker compose -f docker-compose-devnet.yaml up anvil --build
.PHONY: clean
clean:
@rm -rf ./contracts/out
@rm -rf ./contracts/cache
@rm -rf ./contracts/broadcast
@rm -rf ./third_party/cartesi-coprocessor/operator1-data
@rm -rf ./third_party/cartesi-coprocessor/env/eigenlayer/anvil/devnet-operators-ready.flag
@rm -rf ./output.car
@rm -rf ./output.car.json
@rm -rf ./output.cid
@rm -rf ./output.size
.PHONY: test
test:
@go test -p=1 ./... -coverprofile=./coverage.md -v
@forge test --root contracts
.PHONY: coverage
coverage: test
@go tool cover -html=./coverage.md
.PHONY: fmt
fmt:
@go fmt ./...
@forge fmt --root contracts
.PHONY: gen
gen:
@go generate ./...
.PHONY: slot
slot:
@rm -rf storage-layout
@forge inspect ./src/SwapXHook.sol:SwapXHook storage-layout --root contracts >> storage-layout
.PHONY: v4
v4:
@cd contracts; forge script ./script/V4Deployer.s.sol --broadcast \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--verify \
--verifier sourcify \
--verifier-url http://localhost:5555 \
-vvvv
.PHONY: hook
hook:
@cd contracts; forge script ./script/HookDeployer.s.sol --broadcast \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--verify \
--verifier sourcify \
--verifier-url http://localhost:5555 \
-vvvv
.PHONY: demo01
demo01:
@forge script ./contracts/script/demo/01_demo.s.sol --broadcast \
--root contracts \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--slow \
-vvvv
.PHONY: demo02
demo02:
@forge script ./contracts/script/demo/02_demo.s.sol --broadcast \
--root contracts \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--slow \
-vvvv
.PHONY: demo03
demo03:
@forge script ./contracts/script/demo/03_demo.s.sol --broadcast \
--root contracts \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--slow \
-vvvv
.PHONY: demo04
demo04:
@forge script ./contracts/script/demo/04_demo.s.sol --broadcast \
--root contracts \
--rpc-url $(RPC_URL) \
--private-key $(PRIVATE_KEY) \
--slow \
-vvvv
demo: demo01
@$(MAKE) demo02
@$(MAKE) demo03
@$(MAKE) demo04