forked from mantlenetworkio/mantle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (50 loc) · 1.47 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
GITCOMMIT := $(shell git rev-parse HEAD)
GITDATE := $(shell git show -s --format='%ct')
GITVERSION := $(shell cat package.json | jq .version)
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT)
LDFLAGSSTRING +=-X main.GitDate=$(GITDATE)
LDFLAGSSTRING +=-X main.GitVersion=$(GITVERSION)
LDFLAGS := -ldflags "$(LDFLAGSSTRING)"
EDLC_ABI_ARTIFACT := ../packages/contracts/artifacts/contracts/da/BVM_EigenDataLayrChain.sol/BVM_EigenDataLayrChain.json
EDLF_ABI_ARTIFACT := ../packages/contracts/artifacts/contracts/da/BVM_EigenDataLayrFee.sol/BVM_EigenDataLayrFee.json
mt-batcher:
go mod tidy
env GO111MODULE=on go build -v $(LDFLAGS) ./cmd/mt-batcher
datalayr:
cd ../datalayr/contracts && ./compile.sh compile-el && ./compile.sh compile-dl
clean:
rm mt-batcher
test:
go test -v ./...
lint:
golangci-lint run ./...
binding-edc:
$(eval temp := $(shell mktemp))
cat $(EDLC_ABI_ARTIFACT) \
| jq -r .bytecode > $(temp)
cat $(EDLC_ABI_ARTIFACT) \
| jq .abi \
| abigen --pkg bindings \
--abi - \
--out bindings/bvm_eigen_datalayr_chain.go \
--type BVM_EigenDataLayrChain \
--bin $(temp)
rm $(temp)
binding-edf:
$(eval temp := $(shell mktemp))
cat $(EDLF_ABI_ARTIFACT) \
| jq -r .bytecode > $(temp)
cat $(EDLF_ABI_ARTIFACT) \
| jq .abi \
| abigen --pkg bindings \
--abi - \
--out bindings/bvm_eigen_datalayr_fee.go \
--type BVM_EigenDataLayrFee \
--bin $(temp)
rm $(temp)
.PHONY: \
mt-batcher \
binding \
clean \
test \
lint