forked from datachainlab/ethereum-ibc-relay-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 1.11 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
FORGE ?= forge
ABIGEN ?= docker run -v .:/workspace -w /workspace -it ethereum/client-go:alltools-v1.11.6 abigen
DOCKER := $(shell which docker)
protoVer=0.13.1
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --user 0 --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
.PHONY: test
test:
go test -v ./pkg/...
.PHONY: submodule
submodule:
git submodule update --init
cd ./yui-ibc-solidity && npm install
.PHONY: compile
compile:
$(FORGE) build --config-path ./yui-ibc-solidity/foundry.toml
.PHONY: abigen
abigen: compile
@mkdir -p ./build/abi ./pkg/contract/ibchandler
@jq -r '.abi' ./yui-ibc-solidity/out/IBCHandler.sol/IBCHandler.json > ./build/abi/IBCHandler.abi
@$(ABIGEN) --abi ./build/abi/IBCHandler.abi --pkg ibchandler --out ./pkg/contract/ibchandler/ibchandler.go
.PHONY: proto-gen proto-update-deps
proto-gen:
@echo "Generating Protobuf files"
@$(protoImage) sh ./scripts/protocgen.sh
proto-update-deps:
@echo "Updating Protobuf dependencies"
$(DOCKER) run --user 0 --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update