@@ -4,20 +4,15 @@ gen: gen-client
44
55gen-client : clone-all copy-proto
66 mkdir -p ./pyinjective/proto
7- @for dir in $(shell find ./proto -path -prune -o -name '* .proto' -print0 | xargs -0 -n1 dirname | sort | uniq) ; do \
8- python3 -m grpc_tools.protoc \
9- --proto_path=./proto \
10- --python_out=./pyinjective/proto \
11- --grpc_python_out=./pyinjective/proto \
12- $$(find ./$${dir} -type f -name '*.proto' ) ; \
13- done
7+ buf generate --template buf.gen.yaml
148 rm -rf proto
159 $(call clean_repos)
16- touch pyinjective/proto/__init__.py
17- $(MAKE ) fix-proto-imports
10+ $(MAKE ) fix-generated-proto-imports
1811
1912PROTO_MODULES := cosmwasm exchange gogoproto cosmos_proto cosmos testpb ibc amino tendermint injective
20- fix-proto-imports :
13+
14+ fix-generated-proto-imports :
15+ @touch pyinjective/proto/__init__.py
2116 @for module in $(PROTO_MODULES ) ; do \
2217 find ./pyinjective/proto -type f -name "*.py" -exec sed -i "" -e "s/from $${module}/from pyinjective.proto.$${module}/g" {} \; ; \
2318 done
@@ -35,39 +30,14 @@ endef
3530clean-all :
3631 $(call clean_repos)
3732
38- clone-injective-core :
39- git clone https://github.com/InjectiveLabs/injective-core.git -b v1.12.1 --depth 1 --single-branch
40-
4133clone-injective-indexer :
42- git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.12.79.1 --depth 1 --single-branch
43-
44- clone-cometbft :
45- git clone https://github.com/InjectiveLabs/cometbft.git -b v0.37.2-inj --depth 1 --single-branch
46-
47- clone-wasmd :
48- git clone https://github.com/InjectiveLabs/wasmd.git -b v0.45.0-inj --depth 1 --single-branch
34+ git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.13.4 --depth 1 --single-branch
4935
50- clone-cosmos-sdk :
51- git clone https://github.com/InjectiveLabs/cosmos-sdk.git -b v0.47.3-inj-9 --depth 1 --single-branch
52-
53- clone-ibc-go :
54- git clone https://github.com/InjectiveLabs/ibc-go.git -b v7.2.0-inj --depth 1 --single-branch
55-
56- clone-all : clone-cosmos-sdk clone-cometbft clone-ibc-go clone-wasmd clone-injective-core clone-injective-indexer
36+ clone-all : clone-injective-indexer
5737
5838copy-proto :
5939 rm -rf pyinjective/proto
6040 mkdir -p proto/exchange
61- buf export ./cosmos-sdk --output=third_party
62- buf export ./ibc-go --exclude-imports --output=third_party
63- buf export ./cometbft --exclude-imports --output=third_party
64- buf export ./wasmd --exclude-imports --output=third_party
65- buf export https://github.com/cosmos/ics23.git --exclude-imports --output=third_party
66- cp -r injective-core/proto/injective proto/
67- cp -r third_party/* proto/
68-
69- rm -rf ./third_party
70-
7141 find ./injective-indexer/api/gen/grpc -type f -name " *.proto" -exec cp {} ./proto/exchange/ \;
7242
7343tests :
0 commit comments