Skip to content

Commit 086f18f

Browse files
committed
[C-655] Updated proto definitions to chain v1.18.0 and indexer v1.17.81. Includes support for the new Chainlink oracle messages.
1 parent 82b8ddb commit 086f18f

24 files changed

Lines changed: 442 additions & 453 deletions

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ dmypy.json
140140
cython_debug/
141141

142142
.idea
143-
144143
.chain_cookie
145144
.exchange_cookie
146-
147145
.flakeheaven_cache
148146
.vscode/settings.json
147+
.python-version

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ clean-all:
2626
$(call clean_repos)
2727

2828
clone-injective-indexer:
29-
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.17.71 --depth 1 --single-branch
29+
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.17.81 --depth 1 --single-branch
3030

3131
clone-all: clone-injective-indexer
3232

buf.gen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ inputs:
2525
- git_repo: https://github.com/InjectiveLabs/hyperlane-cosmos
2626
tag: v1.0.1-inj
2727
subdir: proto
28-
# - git_repo: https://github.com/InjectiveLabs/injective-core
29-
# tag: v1.17.0
30-
# subdir: proto
3128
- git_repo: https://github.com/InjectiveLabs/injective-core
32-
branch: c-655/add_chainlink_data_streams_oracle
29+
tag: v1.18.0-alpha.3
3330
subdir: proto
31+
# - git_repo: https://github.com/InjectiveLabs/injective-core
32+
# branch: c-655/add_chainlink_data_streams_oracle
33+
# subdir: proto
3434
- directory: proto

pyinjective/async_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,9 +1295,13 @@ async def fetch_oracle_price(
12951295
)
12961296

12971297
async def fetch_oracle_list(
1298-
self, symbol: Optional[str] = None, oracle_type: Optional[str] = None
1298+
self,
1299+
symbol: Optional[str] = None,
1300+
oracle_type: Optional[str] = None,
1301+
per_page: Optional[int] = None,
1302+
token: Optional[str] = None,
12991303
) -> Dict[str, Any]:
1300-
return await self.indexer_client.fetch_oracle_list(symbol=symbol, oracle_type=oracle_type)
1304+
return await self.indexer_client.fetch_oracle_list(symbol=symbol, oracle_type=oracle_type, per_page=per_page, token=token)
13011305

13021306
# InsuranceRPC
13031307

pyinjective/client/indexer/grpc/indexer_grpc_oracle_api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ def __init__(self, channel: Channel, cookie_assistant: CookieAssistant):
1616
self._assistant = GrpcApiRequestAssistant(cookie_assistant=cookie_assistant)
1717

1818
async def fetch_oracle_list(
19-
self, symbol: Optional[str] = None, oracle_type: Optional[str] = None
19+
self,
20+
symbol: Optional[str] = None,
21+
oracle_type: Optional[str] = None,
22+
per_page: Optional[int] = None,
23+
token: Optional[str] = None,
2024
) -> Dict[str, Any]:
2125
request = exchange_oracle_pb.OracleListRequest(
2226
symbol=symbol,
2327
oracle_type=oracle_type,
28+
per_page=per_page,
29+
token=token,
2430
)
2531
response = await self._execute_call(call=self._stub.OracleList, request=request)
2632

pyinjective/indexer_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,13 @@ async def fetch_oracle_price_v2(self, filters: List[exchange_oracle_pb.PricePayl
660660
return await self.oracle_api.fetch_oracle_price_v2(filters=filters)
661661

662662
async def fetch_oracle_list(
663-
self, symbol: Optional[str] = None, oracle_type: Optional[str] = None
663+
self,
664+
symbol: Optional[str] = None,
665+
oracle_type: Optional[str] = None,
666+
per_page: Optional[int] = None,
667+
token: Optional[str] = None,
664668
) -> Dict[str, Any]:
665-
return await self.oracle_api.fetch_oracle_list(symbol=symbol, oracle_type=oracle_type)
669+
return await self.oracle_api.fetch_oracle_list(symbol=symbol, oracle_type=oracle_type, per_page=per_page, token=token)
666670

667671
async def listen_oracle_prices_updates(
668672
self,

pyinjective/proto/exchange/injective_oracle_rpc_pb2.py

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)