Skip to content

Commit 2a63051

Browse files
committed
(fix) Updated proto definitions
1 parent bb76bad commit 2a63051

File tree

366 files changed

+2699
-7411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

366 files changed

+2699
-7411
lines changed

Makefile

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ gen: gen-client
44

55
gen-client: clone-all copy-proto
66
mkdir -p ./pyinjective/proto
7-
cd ./proto && buf generate --template ../buf.gen.yaml
7+
buf generate --template buf.gen.yaml
88
rm -rf proto
99
$(call clean_repos)
10-
touch pyinjective/proto/__init__.py
11-
$(MAKE) fix-proto-imports
10+
$(MAKE) fix-generated-proto-imports
1211

1312
PROTO_MODULES := cosmwasm exchange gogoproto cosmos_proto cosmos testpb ibc amino tendermint injective
14-
fix-proto-imports:
13+
14+
fix-generated-proto-imports:
15+
@touch pyinjective/proto/__init__.py
1516
@for module in $(PROTO_MODULES); do \
1617
find ./pyinjective/proto -type f -name "*.py" -exec sed -i "" -e "s/from $${module}/from pyinjective.proto.$${module}/g" {} \; ; \
1718
done
@@ -37,16 +38,6 @@ clone-all: clone-injective-indexer
3738
copy-proto:
3839
rm -rf pyinjective/proto
3940
mkdir -p proto/exchange
40-
buf export ./cosmos-sdk --output=third_party
41-
buf export ./ibc-go --exclude-imports --output=third_party
42-
buf export ./cometbft --exclude-imports --output=third_party
43-
buf export ./wasmd --exclude-imports --output=third_party
44-
buf export https://github.com/cosmos/ics23.git --exclude-imports --output=third_party
45-
cp -r injective-core/proto/injective proto/
46-
cp -r third_party/* proto/
47-
48-
rm -rf ./third_party
49-
5041
find ./injective-indexer/api/gen/grpc -type f -name "*.proto" -exec cp {} ./proto/exchange/ \;
5142

5243
tests:

buf.gen.yaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ managed:
33
enabled: true
44
plugins:
55
- remote: buf.build/protocolbuffers/python
6-
out: ../pyinjective/proto/
6+
out: ./pyinjective/proto/
77
- remote: buf.build/grpc/python
8-
out: ../pyinjective/proto/
8+
out: ./pyinjective/proto/
9+
inputs:
10+
- module: buf.build/cosmos/cosmos-proto
11+
- module: buf.build/cosmos/gogo-proto
12+
- module: buf.build/googleapis/googleapis
13+
- module: buf.build/cosmos/ics23
14+
- git_repo: https://github.com/InjectiveLabs/cosmos-sdk
15+
branch: v0.50.x-inj
16+
- git_repo: https://github.com/InjectiveLabs/ibc-go
17+
branch: v8.3.x-inj
18+
subdir: proto
19+
# - git_repo: https://github.com/InjectiveLabs/wasmd
20+
# tag: v0.45.0-inj
21+
# subdir: proto
22+
- git_repo: https://github.com/InjectiveLabs/wasmd
23+
branch: v0.51.x-inj
24+
subdir: proto
25+
- git_repo: https://github.com/InjectiveLabs/injective-core
26+
tag: v1.12.1
27+
subdir: proto
28+
- git_repo: https://github.com/InjectiveLabs/injective-core
29+
branch: dev
30+
subdir: proto
31+
- directory: proto
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in amino/amino_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in cosmos/app/runtime/v1alpha1/module_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in cosmos/app/v1alpha1/config_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in cosmos/app/v1alpha1/module_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)

pyinjective/proto/cosmos/app/v1alpha1/query_pb2_grpc.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,9 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

65
from pyinjective.proto.cosmos.app.v1alpha1 import query_pb2 as cosmos_dot_app_dot_v1alpha1_dot_query__pb2
76

8-
GRPC_GENERATED_VERSION = '1.64.1'
9-
GRPC_VERSION = grpc.__version__
10-
EXPECTED_ERROR_RELEASE = '1.65.0'
11-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
12-
_version_not_supported = False
13-
14-
try:
15-
from grpc._utilities import first_version_is_lower
16-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
17-
except ImportError:
18-
_version_not_supported = True
19-
20-
if _version_not_supported:
21-
warnings.warn(
22-
f'The grpc package installed is at version {GRPC_VERSION},'
23-
+ f' but the generated code in cosmos/app/v1alpha1/query_pb2_grpc.py depends on'
24-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
25-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
26-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
27-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
28-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
29-
RuntimeWarning
30-
)
31-
327

338
class QueryStub(object):
349
"""Query is the app module query service.
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in cosmos/auth/module/v1/module_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in cosmos/auth/v1beta1/auth_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4-
import warnings
54

6-
7-
GRPC_GENERATED_VERSION = '1.64.1'
8-
GRPC_VERSION = grpc.__version__
9-
EXPECTED_ERROR_RELEASE = '1.65.0'
10-
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
11-
_version_not_supported = False
12-
13-
try:
14-
from grpc._utilities import first_version_is_lower
15-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16-
except ImportError:
17-
_version_not_supported = True
18-
19-
if _version_not_supported:
20-
warnings.warn(
21-
f'The grpc package installed is at version {GRPC_VERSION},'
22-
+ f' but the generated code in cosmos/auth/v1beta1/genesis_pb2_grpc.py depends on'
23-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
24-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26-
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
27-
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
28-
RuntimeWarning
29-
)

0 commit comments

Comments
 (0)