-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
70 lines (51 loc) · 1.41 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
GITCOMMIT := $(shell git rev-parse HEAD)
GITDATE := $(shell git show -s --format='%ct')
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT)
LDFLAGSSTRING +=-X main.GitDate=$(GITDATE)
LDFLAGS := -ldflags "$(LDFLAGSSTRING)"
FinalityRelayerManagerAbiPath := ./l2fp-contracts/out/FinalityRelayerManager.sol/FinalityRelayerManager.json
BLSApkRegistryAbiPath := ./l2fp-contracts/out/BLSApkRegistry.sol/BLSApkRegistry.json
build:
env GO111MODULE=on go build -o manta-fp-aggregator ./cmd
clean:
rm manta-fp-aggregator
test:
go test -v ./...
lint:
golangci-lint run ./...
compile:
cd ./l2fp-contracts && forge install && forge build && cd ../
bindings: binding-bls binding-finality
binding-bls:
$(eval temp := $(shell mktemp))
cat $(BLSApkRegistryAbiPath) \
| jq -r .bytecode.object > $(temp)
cat $(BLSApkRegistryAbiPath) \
| jq .abi \
| abigen --pkg bls \
--abi - \
--out bindings/bls/bls_apk_registry.go \
--type BLSApkRegistry \
--bin $(temp)
rm $(temp)
binding-finality:
$(eval temp := $(shell mktemp))
cat $(FinalityRelayerManagerAbiPath) \
| jq -r .bytecode.object > $(temp)
cat $(FinalityRelayerManagerAbiPath) \
| jq .abi \
| abigen --pkg finality \
--abi - \
--out bindings/finality/finality_relayer_manager.go \
--type FinalityRelayerManager \
--bin $(temp)
rm $(temp)
.PHONY: \
build \
compile \
bindings \
binding-bls \
binding-finality \
clean \
test \
lint \