Skip to content

Commit

Permalink
Merge branch 'main' into fix-total-gas-query
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Aug 28, 2024
2 parents 242cbd9 + 437eccd commit 1829d16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/automation_scripts/update_cosmos_spec_from_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def parse_endpoints_from_grpcurl(grpc_url: str) -> dict[str, list[str]]:
print("### Parsing endpoints from gRPC service")

endpoints: dict[str, list[str]] = {"grpc": [], "rest": []}
content = os.popen(f"grpcurl -plaintext {grpc_url} describe").read()
content = os.popen(f"grpcurl {grpc_url} describe").read()

# Regex pattern to find services starting with their corresponding rpc and rest paths
grpc_pattern = re.compile(
Expand All @@ -48,7 +48,7 @@ def parse_endpoints_from_grpcurl(grpc_url: str) -> dict[str, list[str]]:
)

rpc_pattern = re.compile(r"rpc (\w+) \(")
rest_pattern = re.compile(r'option\s*\(\s*.*?\s*\)\s*=\s*{\s*get:\s*"(.*?)"\s*}', re.DOTALL)
rest_pattern = re.compile(r'get:\s*"(.*?)"', re.DOTALL)

# Finding all services that start with 'lavanet'
for service_match in grpc_pattern.finditer(content):
Expand Down

0 comments on commit 1829d16

Please sign in to comment.