-
Notifications
You must be signed in to change notification settings - Fork 33
Release/chain v1.17.0 support to master #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…er_v1_11 [CHORE] sync with master after v1.11
…le positions example script
…le positions example script
…ons_example_script Feat/add liquidable positions example script
…after_v1_11_2 Feat/sync dev with master after v1.11.2
…_v1_11_2 [CHORE] sync dev with master v1.11.2
… indexer v1.17.0-beta
…1_17_0 [CP-652] update protos for v1.17.0 upgrade
|
Caution Review failedThe pull request is closed. WalkthroughUpdated generated protos and client APIs for Injective core v1.17.x and indexer v1.17.16: added OpenNotionalCap to markets, market-order support in MsgBatchUpdateOrders, new chain-stream failure filters, auction/transfer denom RPC renames, fetch_open_interest, many regenerated Hyperlane proto modules, and example scripts. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant AsyncClient
participant ChainStreamAPI
participant StreamV2
participant Filters as "OrderFailures\n& ConditionalTriggerFailures"
Client->>AsyncClient: listen_chain_stream_updates(..., order_failures_filter, conditional_order_trigger_failures_filter)
AsyncClient->>ChainStreamAPI: stream_v2(StreamRequest with filters)
ChainStreamAPI->>StreamV2: call StreamV2(request)
StreamV2->>Filters: apply filters
Filters-->>StreamV2: matched events
StreamV2-->>ChainStreamAPI: streamed responses
ChainStreamAPI-->>AsyncClient: yields filtered updates
AsyncClient-->>Client: delivers events
sequenceDiagram
participant Script
participant Composer
participant MsgBatch
Script->>Composer: build orders + market_orders_to_create
Composer->>Composer: msg_batch_update_orders(..., derivative_market_orders_to_create, spot_market_orders_to_create)
Composer->>MsgBatch: assemble MsgBatchUpdateOrders with market-order lists
MsgBatch-->>Script: MsgBatchUpdateOrders
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Areas to focus review on:
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pyinjective/client/chain/grpc_stream/chain_grpc_chain_stream.py (1)
93-95: Fix v2 stub invocationLine 93:
StreamStubexposes RPC methods using their protobuf names, and the v2 proto service still defines the RPC asStream. Switching this call toself._stub_v2.StreamV2will raise anAttributeErrorat runtime, breaking every v2 stream listener. Keep invoking the existingStreammethod; only the additional filters need to be added to the request.Apply this diff to restore the correct call:
- await self._assistant.listen_stream( - call=self._stub_v2.StreamV2, + await self._assistant.listen_stream( + call=self._stub_v2.Stream,
🧹 Nitpick comments (1)
examples/chain_client/exchange/30_MsgOffsetPosition.py (1)
43-54: Use a list to match the expected repeated-field type.
offsetting_subaccount_idsis annotated asList[str]in the composer and protobuf repeated fields serialize in-order. Asetintroduces non-deterministic ordering and diverges from the declared type. Switching to a list keeps ordering explicit and avoids surprises.- offsetting_subaccount_ids = { - "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", - "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", - } + offsetting_subaccount_ids = [ + "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", + "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", + ]
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (83)
CHANGELOG.md(1 hunks)Makefile(1 hunks)buf.gen.yaml(1 hunks)examples/chain_client/10_SearchLiquidablePositions.py(1 hunks)examples/chain_client/7_ChainStream.py(2 hunks)examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py(1 hunks)examples/chain_client/exchange/25_MsgUpdateDerivativeMarket.py(1 hunks)examples/chain_client/exchange/30_MsgOffsetPosition.py(1 hunks)examples/chain_client/exchange/4_MsgInstantPerpetualMarketLaunch.py(1 hunks)examples/chain_client/exchange/5_MsgInstantExpiryFuturesMarketLaunch.py(1 hunks)examples/chain_client/exchange/9_MsgBatchUpdateOrders.py(2 hunks)examples/chain_client/exchange/query/66_OpenInterest.py(1 hunks)examples/chain_client/exchange/query/8_AuctionExchangeTransferDenomDecimal.py(1 hunks)examples/chain_client/exchange/query/9_AuctionExchangeTransferDenomDecimals.py(1 hunks)pyinjective/async_client_v2.py(5 hunks)pyinjective/client/chain/grpc/chain_grpc_exchange_v2_api.py(2 hunks)pyinjective/client/chain/grpc_stream/chain_grpc_chain_stream.py(2 hunks)pyinjective/composer_v2.py(13 hunks)pyinjective/proto/exchange/injective_accounts_rpc_pb2.py(2 hunks)pyinjective/proto/exchange/injective_archiver_rpc_pb2.py(2 hunks)pyinjective/proto/exchange/injective_archiver_rpc_pb2_grpc.py(4 hunks)pyinjective/proto/exchange/injective_auction_rpc_pb2.py(2 hunks)pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py(4 hunks)pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py(2 hunks)pyinjective/proto/exchange/injective_explorer_rpc_pb2.py(2 hunks)pyinjective/proto/exchange/injective_explorer_rpc_pb2_grpc.py(4 hunks)pyinjective/proto/exchange/injective_megavault_rpc_pb2.py(2 hunks)pyinjective/proto/exchange/injective_portfolio_rpc_pb2.py(2 hunks)pyinjective/proto/google/longrunning/operations_pb2.py(2 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/events_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/events_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/genesis_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/genesis_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/query_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/query_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/tx_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/tx_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/types_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/interchain_security/v1/types_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/module/v1/module_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/module/v1/module_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/events_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/events_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/genesis_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/genesis_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/query_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/query_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/tx_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/tx_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/types_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/post_dispatch/v1/types_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/v1/events_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/v1/events_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/v1/genesis_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/v1/genesis_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/v1/query_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/v1/query_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/v1/tx_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/v1/tx_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/core/v1/types_pb2.py(1 hunks)pyinjective/proto/hyperlane/core/v1/types_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/warp/module/v1/module_pb2.py(1 hunks)pyinjective/proto/hyperlane/warp/module/v1/module_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/events_pb2.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/events_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/genesis_pb2.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/genesis_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/query_pb2.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/query_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/tx_pb2.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/tx_pb2_grpc.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/types_pb2.py(1 hunks)pyinjective/proto/hyperlane/warp/v1/types_pb2_grpc.py(1 hunks)pyinjective/proto/injective/exchange/v1beta1/exchange_pb2.py(4 hunks)pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py(1 hunks)pyinjective/proto/injective/exchange/v1beta1/tx_pb2.py(4 hunks)pyinjective/proto/injective/exchange/v1beta1/tx_pb2_grpc.py(0 hunks)pyinjective/proto/injective/exchange/v2/events_pb2.py(2 hunks)pyinjective/proto/injective/exchange/v2/exchange_pb2.py(2 hunks)pyinjective/proto/injective/exchange/v2/genesis_pb2.py(3 hunks)pyinjective/proto/injective/exchange/v2/market_pb2.py(4 hunks)pyinjective/proto/injective/exchange/v2/proposal_pb2.py(7 hunks)pyinjective/proto/injective/exchange/v2/query_pb2_grpc.py(12 hunks)
💤 Files with no reviewable changes (1)
- pyinjective/proto/injective/exchange/v1beta1/tx_pb2_grpc.py
🧰 Additional context used
🧬 Code graph analysis (23)
examples/chain_client/exchange/query/66_OpenInterest.py (3)
pyinjective/async_client_v2.py (1)
fetch_open_interest(845-846)pyinjective/core/network.py (1)
testnet(165-219)pyinjective/client/chain/grpc/chain_grpc_exchange_v2_api.py (1)
fetch_open_interest(656-660)
examples/chain_client/exchange/25_MsgUpdateDerivativeMarket.py (2)
pyinjective/async_client_v2.py (1)
composer(1267-1270)pyinjective/composer_v2.py (1)
uncapped_open_notional_cap(1228-1229)
examples/chain_client/10_SearchLiquidablePositions.py (1)
pyinjective/core/network.py (1)
mainnet(222-263)
examples/chain_client/exchange/5_MsgInstantExpiryFuturesMarketLaunch.py (2)
pyinjective/composer_v2.py (2)
open_notional_cap(1220-1226)uncapped_open_notional_cap(1228-1229)pyinjective/async_client_v2.py (1)
composer(1267-1270)
examples/chain_client/exchange/query/9_AuctionExchangeTransferDenomDecimals.py (2)
pyinjective/async_client_v2.py (1)
fetch_auction_exchange_transfer_denom_decimals(447-450)pyinjective/client/chain/grpc/chain_grpc_exchange_v2_api.py (1)
fetch_auction_exchange_transfer_denom_decimals(96-102)
pyinjective/client/chain/grpc/chain_grpc_exchange_v2_api.py (4)
pyinjective/async_client_v2.py (3)
fetch_auction_exchange_transfer_denom_decimal(444-445)fetch_auction_exchange_transfer_denom_decimals(447-450)fetch_open_interest(845-846)pyinjective/client/chain/grpc/chain_grpc_exchange_api.py (1)
_execute_call(638-639)pyinjective/proto/injective/exchange/v2/query_pb2_grpc.py (6)
AuctionExchangeTransferDenomDecimal(432-437)AuctionExchangeTransferDenomDecimal(1468-1492)AuctionExchangeTransferDenomDecimals(439-445)AuctionExchangeTransferDenomDecimals(1495-1519)OpenInterest(835-840)OpenInterest(3007-3031)tests/client/chain/grpc/configurable_exchange_v2_query_servicer.py (3)
AuctionExchangeTransferDenomDecimal(120-123)AuctionExchangeTransferDenomDecimals(125-128)OpenInterest(394-395)
examples/chain_client/exchange/query/8_AuctionExchangeTransferDenomDecimal.py (2)
pyinjective/async_client_v2.py (1)
fetch_auction_exchange_transfer_denom_decimal(444-445)pyinjective/client/chain/grpc/chain_grpc_exchange_v2_api.py (1)
fetch_auction_exchange_transfer_denom_decimal(90-94)
examples/chain_client/exchange/30_MsgOffsetPosition.py (5)
pyinjective/async_client_v2.py (5)
AsyncClient(54-1524)initialize_tokens_from_chain_denoms(1286-1329)composer(1267-1270)current_chain_gas_price(1272-1284)fetch_account(228-243)pyinjective/core/broadcaster.py (2)
MsgBroadcasterWithPk(64-402)new_using_simulation(82-113)pyinjective/core/network.py (2)
Network(105-378)testnet(165-219)pyinjective/wallet.py (5)
PrivateKey(28-103)from_hex(73-76)to_public_key(84-92)to_address(175-181)get_subaccount_id(263-266)pyinjective/composer_v2.py (1)
msg_offset_position(1210-1218)
pyinjective/proto/hyperlane/core/post_dispatch/v1/tx_pb2_grpc.py (2)
pyinjective/proto/hyperlane/core/interchain_security/v1/tx_pb2_grpc.py (4)
MsgStub(8-57)MsgServicer(60-118)add_MsgServicer_to_server(121-167)Msg(171-389)pyinjective/proto/hyperlane/core/v1/tx_pb2_grpc.py (4)
MsgStub(8-32)MsgServicer(35-58)add_MsgServicer_to_server(61-82)Msg(86-169)
pyinjective/proto/hyperlane/core/post_dispatch/v1/query_pb2_grpc.py (1)
pyinjective/proto/hyperlane/core/v1/query_pb2_grpc.py (4)
QueryStub(8-57)QueryServicer(60-122)add_QueryServicer_to_server(125-171)Query(175-393)
pyinjective/proto/hyperlane/core/interchain_security/v1/tx_pb2_grpc.py (2)
pyinjective/proto/hyperlane/core/post_dispatch/v1/tx_pb2_grpc.py (4)
MsgStub(8-52)MsgServicer(55-106)add_MsgServicer_to_server(109-150)Msg(154-345)pyinjective/proto/hyperlane/core/v1/tx_pb2_grpc.py (4)
MsgStub(8-32)MsgServicer(35-58)add_MsgServicer_to_server(61-82)Msg(86-169)
pyinjective/proto/hyperlane/core/v1/tx_pb2_grpc.py (2)
pyinjective/proto/hyperlane/core/interchain_security/v1/tx_pb2_grpc.py (4)
MsgStub(8-57)MsgServicer(60-118)add_MsgServicer_to_server(121-167)Msg(171-389)pyinjective/proto/hyperlane/core/post_dispatch/v1/tx_pb2_grpc.py (4)
MsgStub(8-52)MsgServicer(55-106)add_MsgServicer_to_server(109-150)Msg(154-345)
pyinjective/proto/hyperlane/core/interchain_security/v1/query_pb2_grpc.py (1)
pyinjective/proto/hyperlane/core/v1/query_pb2_grpc.py (4)
QueryStub(8-57)QueryServicer(60-122)add_QueryServicer_to_server(125-171)Query(175-393)
pyinjective/proto/injective/exchange/v2/query_pb2_grpc.py (1)
tests/client/chain/grpc/configurable_exchange_v2_query_servicer.py (3)
AuctionExchangeTransferDenomDecimal(120-123)AuctionExchangeTransferDenomDecimals(125-128)OpenInterest(394-395)
examples/chain_client/7_ChainStream.py (1)
pyinjective/composer_v2.py (2)
chain_stream_order_failures_filter(1586-1591)chain_stream_conditional_order_trigger_failures_filter(1593-1602)
pyinjective/proto/hyperlane/core/v1/query_pb2_grpc.py (1)
pyinjective/proto/hyperlane/core/interchain_security/v1/query_pb2_grpc.py (4)
QueryStub(8-37)QueryServicer(40-70)add_QueryServicer_to_server(73-99)Query(103-213)
pyinjective/proto/hyperlane/warp/v1/tx_pb2_grpc.py (1)
pyinjective/proto/hyperlane/core/v1/tx_pb2_grpc.py (4)
MsgStub(8-32)MsgServicer(35-58)add_MsgServicer_to_server(61-82)Msg(86-169)
pyinjective/proto/hyperlane/warp/v1/query_pb2_grpc.py (1)
pyinjective/proto/hyperlane/core/v1/query_pb2_grpc.py (4)
QueryStub(8-57)QueryServicer(60-122)add_QueryServicer_to_server(125-171)Query(175-393)
pyinjective/async_client_v2.py (2)
pyinjective/client/chain/grpc/chain_grpc_exchange_v2_api.py (3)
fetch_auction_exchange_transfer_denom_decimal(90-94)fetch_auction_exchange_transfer_denom_decimals(96-102)fetch_open_interest(656-660)pyinjective/indexer_client.py (1)
fetch_open_interest(395-396)
examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py (2)
pyinjective/composer_v2.py (2)
open_notional_cap(1220-1226)uncapped_open_notional_cap(1228-1229)pyinjective/async_client_v2.py (1)
composer(1267-1270)
examples/chain_client/exchange/9_MsgBatchUpdateOrders.py (1)
pyinjective/composer_v2.py (4)
derivative_order(403-427)calculate_margin(393-401)spot_order(360-391)msg_batch_update_orders(757-789)
examples/chain_client/exchange/4_MsgInstantPerpetualMarketLaunch.py (2)
pyinjective/composer_v2.py (2)
open_notional_cap(1220-1226)uncapped_open_notional_cap(1228-1229)pyinjective/async_client_v2.py (1)
composer(1267-1270)
pyinjective/composer_v2.py (1)
pyinjective/core/token.py (1)
convert_value_to_extended_decimal_format(19-20)
🪛 GitHub Actions: pre-commit
CHANGELOG.md
[error] 1-1: Trailing whitespace check failed; pre-commit hook modified files (CHANGELOG.md). Process completed with exit code 1.
🪛 LanguageTool
CHANGELOG.md
[grammar] ~10-~10: Ensure spelling is correct
Context: ...ditional orders trigger failures in the chainstrem updates ## [1.11.2] - 2025-09-24 ### A...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~10-~10: Ensure spelling is correct
Context: ...igger failures in the chainstrem updates ## [1.11.2] - 2025-09-24 ### Added - Added ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 Ruff (0.14.3)
pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py
113-113: Unused method argument: request
(ARG002)
pyinjective/proto/exchange/injective_archiver_rpc_pb2_grpc.py
149-149: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/core/post_dispatch/v1/tx_pb2_grpc.py
59-59: Unused method argument: request
(ARG002)
66-66: Unused method argument: request
(ARG002)
73-73: Unused method argument: request
(ARG002)
80-80: Unused method argument: request
(ARG002)
87-87: Unused method argument: request
(ARG002)
94-94: Unused method argument: request
(ARG002)
101-101: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/core/post_dispatch/v1/query_pb2_grpc.py
64-64: Unused method argument: request
(ARG002)
71-71: Unused method argument: request
(ARG002)
78-78: Unused method argument: request
(ARG002)
85-85: Unused method argument: request
(ARG002)
92-92: Unused method argument: request
(ARG002)
99-99: Unused method argument: request
(ARG002)
106-106: Unused method argument: request
(ARG002)
113-113: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/core/interchain_security/v1/tx_pb2_grpc.py
64-64: Unused method argument: request
(ARG002)
71-71: Unused method argument: request
(ARG002)
78-78: Unused method argument: request
(ARG002)
85-85: Unused method argument: request
(ARG002)
92-92: Unused method argument: request
(ARG002)
99-99: Unused method argument: request
(ARG002)
106-106: Unused method argument: request
(ARG002)
113-113: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/core/v1/tx_pb2_grpc.py
39-39: Unused method argument: request
(ARG002)
46-46: Unused method argument: request
(ARG002)
53-53: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/core/interchain_security/v1/query_pb2_grpc.py
44-44: Unused method argument: request
(ARG002)
51-51: Unused method argument: request
(ARG002)
58-58: Unused method argument: request
(ARG002)
65-65: Unused method argument: request
(ARG002)
pyinjective/proto/injective/exchange/v2/query_pb2_grpc.py
432-432: Unused method argument: request
(ARG002)
439-439: Unused method argument: request
(ARG002)
835-835: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/core/v1/query_pb2_grpc.py
64-64: Unused method argument: request
(ARG002)
71-71: Unused method argument: request
(ARG002)
78-78: Unused method argument: request
(ARG002)
85-85: Unused method argument: request
(ARG002)
96-96: Unused method argument: request
(ARG002)
103-103: Unused method argument: request
(ARG002)
110-110: Unused method argument: request
(ARG002)
117-117: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/warp/v1/tx_pb2_grpc.py
59-59: Unused method argument: request
(ARG002)
66-66: Unused method argument: request
(ARG002)
73-73: Unused method argument: request
(ARG002)
80-80: Unused method argument: request
(ARG002)
87-87: Unused method argument: request
(ARG002)
94-94: Unused method argument: request
(ARG002)
101-101: Unused method argument: request
(ARG002)
pyinjective/proto/hyperlane/warp/v1/query_pb2_grpc.py
49-49: Unused method argument: request
(ARG002)
56-56: Unused method argument: request
(ARG002)
63-63: Unused method argument: request
(ARG002)
70-70: Unused method argument: request
(ARG002)
77-77: Unused method argument: request
(ARG002)
examples/chain_client/exchange/9_MsgBatchUpdateOrders.py
113-113: Decimal() called with float literal argument
Replace with string literal
(RUF032)
115-115: Decimal() called with float literal argument
Replace with string literal
(RUF032)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: run-tests (3.11, macos-latest)
🔇 Additional comments (43)
pyinjective/proto/hyperlane/core/v1/genesis_pb2_grpc.py (1)
1-4: Auto-generated protobuf stub file.This file is auto-generated by the protobuf compiler and contains only boilerplate scaffolding. No service, client, or server implementations are present in this diff. As part of the chain v1.17.0 upgrade, this is an expected artifact.
Please verify that:
- The protobuf compilation process completed successfully across all Hyperlane modules.
- Generated files were regenerated in their entirety (not manually edited).
- No hand-written code exists in other
*_pb2_grpc.pyfiles that would clash with regeneration.pyinjective/proto/exchange/injective_megavault_rpc_pb2.py (1)
1-95: Auto-generated protobuf descriptor update for chain v1.17.0.This file is auto-generated by the protobuf compiler and reflects the recompilation of proto definitions as part of the chain upgrade. The DESCRIPTOR binary (line 17) and all serialized index boundaries (lines 25–94) have been updated to reflect changes in the underlying protocol buffer definitions mentioned in the PR objectives.
Since this is a routine regeneration of compiled proto code, there are no manual changes to review for correctness. The file correctly retains the header warning not to edit it manually.
pyinjective/proto/hyperlane/warp/module/v1/module_pb2_grpc.py (1)
1-4: LGTM! Properly generated gRPC stub file.This is a correctly generated gRPC stub file. The minimal content (no service definitions) is expected for a module proto that defines only message types without RPC services.
pyinjective/proto/hyperlane/warp/module/v1/module_pb2.py (1)
1-30: LGTM! Properly generated protobuf module.This is a correctly generated protobuf Python module (protobuf version 5.26.1) for the Hyperlane Warp Module v1. The file structure follows standard protobuf generation patterns with proper descriptor serialization, message building, and option handling.
pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py (1)
17-178: Auto-generated protobuf file—changes are expected.This file is generated by the Protocol Buffer compiler (as noted in line 2). The updated descriptor offsets and serialized bytes reflect changes to the underlying
.protosource file, which introduced new message types (e.g.,OpenNotionalCap) and fields as part of the chain v1.17.0 upgrade. The changes are internal to the protobuf runtime and do not affect public APIs or application logic.pyinjective/proto/hyperlane/core/post_dispatch/v1/events_pb2.py (1)
1-70: LGTM! Generated protobuf file structure is correct.This is a properly generated protobuf Python module for Hyperlane PostDispatch v1 events. The file structure follows standard protobuf generation patterns with correct imports, descriptor serialization, field metadata configuration, and message boundaries.
pyinjective/proto/hyperlane/core/post_dispatch/v1/events_pb2_grpc.py (1)
1-4: LGTM! Minimal gRPC stub is expected for message-only proto files.This file is intentionally minimal because the corresponding proto file defines only message types (events), not RPC services. The gRPC plugin generates this skeleton module as a placeholder, which is standard behavior.
pyinjective/proto/exchange/injective_explorer_rpc_pb2.py (1)
1-197: LGTM! Auto-generated protobuf code with descriptor offset updates.This file is auto-generated by the protocol buffer compiler. The changes consist solely of updated
serialized_startandserialized_endoffsets in the descriptor metadata, which is expected when proto definitions are regenerated for the v1.17.0 chain upgrade.pyinjective/proto/exchange/injective_explorer_rpc_pb2_grpc.py (1)
155-156: LGTM! Deprecation notices properly document API migration path.This auto-generated gRPC file now includes deprecation notices for
GetAccountTxs,GetContractTxs,GetBlocks, andGetTxs, directing users to their respective V2 equivalents. The changes are backward compatible since the deprecated methods remain available.Also applies to: 170-171, 185-186, 228-229
pyinjective/proto/exchange/injective_portfolio_rpc_pb2.py (2)
17-17: Generated protobuf descriptor updated correctly.This line contains the serialized protobuf descriptor generated from the source
.protofile. Since this is auto-generated code, manual review is limited. The update appears consistent with protobuf regeneration for v1.17.0 support.
46-58: Let me search for the source.protofiles to verify the v1.17.0 specification claim:Based on my analysis of the script output and web search, I can now provide a comprehensive rewritten review comment.Protobuf regeneration confirmed—descriptor offsets correctly updated for modified message serialization.
All generated proto files in the codebase consistently use Protobuf Python Version 5.26.1, confirming proper compiler version alignment. The descriptor offset changes across lines 46-58 are expected and correct:
_DERIVATIVEPOSITIONincreased by 68 bytes (from 1813 to 1881), with cascading shifts applied to all subsequent message descriptors. These changes are automatically calculated by protoc during compilation and indicate that the underlying exchange proto message definitions were modified. The Makefile includes afix-generated-proto-importstarget that properly maintains import paths post-compilation.No action required—generated code changes align with standard protobuf regeneration practices.
pyinjective/proto/exchange/injective_archiver_rpc_pb2_grpc.py (1)
68-72: Stub wiring matches server streaming contract.
The unary_stream stub is correctly wired to the new request/response types and aligns with the service definition.pyinjective/proto/hyperlane/core/v1/types_pb2_grpc.py (1)
1-4: LGTM! Auto-generated gRPC stub file.This is a standard auto-generated gRPC stub file with no service definitions yet. The scaffolding is correct for future protobuf service bindings.
Makefile (2)
21-23: LGTM! Cleanup simplified appropriately.The
clean_reposfunction now only removesinjective-indexer, which aligns with theclone-alltarget that only clones this repository. The removal of cleanup commands for cosmos-sdk, ibc-go, cometbft, wasmd, and injective-core is consistent with the workflow.
29-29: Version update aligns with PR objectives.The indexer version bump from v1.16.91 to v1.17.16 correctly supports the chain upgrade to v1.17.0 as stated in the PR objectives.
pyinjective/proto/hyperlane/core/interchain_security/v1/genesis_pb2_grpc.py (1)
1-4: LGTM! Auto-generated gRPC stub file.Standard auto-generated gRPC stub scaffolding with no service definitions. The file structure is correct.
pyinjective/proto/hyperlane/core/module/v1/module_pb2_grpc.py (1)
1-4: LGTM! Auto-generated gRPC stub file.Standard auto-generated gRPC stub scaffolding. The file structure is appropriate for future service bindings.
buf.gen.yaml (2)
15-21: Dependency version updates align with chain upgrade.The repository tag updates for ibc-go, wasmd, cometbft, and cosmos-sdk are consistent with the chain upgrade to v1.17.0. The version progression appears appropriate.
25-30: LGTM! New Hyperlane integration and core version update.The addition of the hyperlane-cosmos repository and the injective-core version update from v1.16.4 to v1.17.0 correctly support the chain upgrade and new Hyperlane integration features mentioned in the changelog.
pyinjective/proto/exchange/injective_accounts_rpc_pb2.py (1)
90-118: LGTM! Auto-generated descriptor boundary updates.These changes are internal protobuf descriptor offset adjustments generated during proto recompilation. No public API signatures or functional logic have been modified—only serialized boundary metadata has been updated to accommodate upstream proto changes.
pyinjective/proto/injective/exchange/v2/events_pb2.py (1)
184-190: LGTM! Auto-generated descriptor boundary updates.These are internal protobuf descriptor offset adjustments from proto recompilation. The changes only affect serialized boundary metadata with no impact on public API signatures or functional behavior.
examples/chain_client/exchange/25_MsgUpdateDerivativeMarket.py (1)
55-55: LGTM! OpenNotionalCap parameter addition is correct.The addition of the
new_open_notional_capparameter usingcomposer.uncapped_open_notional_cap()correctly integrates the new OpenNotionalCap feature for derivative market updates introduced in chain v1.17.0.pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py (1)
750-750: LGTM! Docstring correction is accurate.The updated docstring correctly describes the
BinaryOptionsMarketsmethod's purpose. The previous docstring incorrectly referenced "a spot market's orderbook by marketID" which was misleading.examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py (1)
60-60: LGTM! OpenNotionalCap integration is correct.The addition of the
open_notional_capparameter usingcomposer.uncapped_open_notional_cap()properly extends binary options market launch to support the new OpenNotionalCap feature in chain v1.17.0.pyinjective/proto/hyperlane/warp/v1/events_pb2_grpc.py (1)
1-4: Generated gRPC stub file - no review needed.This is an auto-generated boilerplate file for Hyperlane Warp v1 events gRPC bindings. No substantive code review is necessary for generated protocol buffer files.
pyinjective/proto/hyperlane/warp/v1/types_pb2_grpc.py (1)
1-4: Generated gRPC stub file - no review needed.This is an auto-generated boilerplate file for Hyperlane Warp v1 types gRPC bindings. No substantive code review is necessary for generated protocol buffer files.
pyinjective/proto/hyperlane/core/interchain_security/v1/types_pb2_grpc.py (1)
1-4: Generated gRPC stub file - no review needed.This is an auto-generated boilerplate file for Hyperlane interchain security v1 types gRPC bindings. No substantive code review is necessary for generated protocol buffer files.
examples/chain_client/exchange/query/8_AuctionExchangeTransferDenomDecimal.py (1)
14-16: LGTM! Method rename is correctly applied.The update from
fetch_denom_decimaltofetch_auction_exchange_transfer_denom_decimalcorrectly reflects the API refactoring. The new method name is more descriptive and accurately represents the operation's purpose.examples/chain_client/7_ChainStream.py (2)
53-58: LGTM! Chain stream failure filters added correctly.The addition of
order_failures_filterandconditional_order_trigger_failures_filterproperly extends the chain stream observability capabilities to include order failure and conditional order trigger failure events, following the established filter pattern.
75-76: LGTM! New filters properly integrated.The new failure filters are correctly passed to
listen_chain_stream_updates, enabling the stream to emit order failure and conditional order trigger failure events as part of the chain v1.17.0 upgrade.pyinjective/proto/hyperlane/core/post_dispatch/v1/types_pb2_grpc.py (1)
1-4: LGTM! Standard autogenerated gRPC boilerplate.This is a standard autogenerated gRPC Python stub file with the expected header and imports.
pyinjective/proto/hyperlane/core/interchain_security/v1/events_pb2_grpc.py (1)
1-4: LGTM! Standard autogenerated gRPC boilerplate.This is a standard autogenerated gRPC Python stub file with the expected header and imports.
examples/chain_client/exchange/query/66_OpenInterest.py (1)
12-24: LGTM! Implementation follows the standard pattern.The code correctly demonstrates fetching open interest from the chain using AsyncClient.
pyinjective/proto/hyperlane/warp/v1/genesis_pb2_grpc.py (1)
1-4: LGTM! Standard autogenerated gRPC boilerplate.This is a standard autogenerated gRPC Python stub file with the expected header and imports.
pyinjective/proto/hyperlane/core/post_dispatch/v1/genesis_pb2_grpc.py (1)
1-4: LGTM! Standard autogenerated gRPC boilerplate.This is a standard autogenerated gRPC Python stub file with the expected header and imports.
examples/chain_client/exchange/5_MsgInstantExpiryFuturesMarketLaunch.py (1)
61-61: LGTM! Correctly adds OpenNotionalCap support.The addition of
open_notional_cap=composer.uncapped_open_notional_cap()aligns with the v1.17.0 chain upgrade requirements and uses the appropriate helper method.pyinjective/proto/hyperlane/core/v1/events_pb2_grpc.py (1)
1-4: LGTM! Standard autogenerated gRPC boilerplate.This is a standard autogenerated gRPC Python stub file with the expected header and imports.
examples/chain_client/exchange/9_MsgBatchUpdateOrders.py (3)
107-120: LGTM! Correctly demonstrates market orders for derivatives.The new
derivative_market_orders_to_createlist properly exercises the market order functionality added in v1.17.0.
143-153: LGTM! Correctly demonstrates market orders for spot trading.The new
spot_market_orders_to_createlist properly exercises the market order functionality added in v1.17.0.
162-163: LGTM! Correctly passes market orders to the batch update.The integration of
spot_market_orders_to_createandderivative_market_orders_to_createparameters properly demonstrates the new batch update capabilities.examples/chain_client/exchange/query/9_AuctionExchangeTransferDenomDecimals.py (1)
14-16: LGTM on the renamed denom-decimal query.Matches the updated AsyncClient API; no further action needed.
examples/chain_client/exchange/4_MsgInstantPerpetualMarketLaunch.py (1)
45-62: Open notional cap wiring looks good.The message now opts into the new OpenNotionalCap field via the uncapped helper; this aligns with the composer updates.
pyinjective/async_client_v2.py (1)
418-443: Good call on emittingDeprecationWarning.Forwarding the legacy methods to the new auction/exchange endpoints while surfacing a
DeprecationWarninglets existing clients keep working yet nudges them onto the updated API surface—nice balance between compatibility and guidance.
CHANGELOG.md
Outdated
| ## [1.12.0] - 2025-11-10 | ||
| ### Changed | ||
| - Updated all compiled protos for compatibility with Injective core v1.17.0 and Indexer v1.17.16 | ||
| - Included the OpenNotionalCap in derivative markets | ||
| - Added support for market orders creation with the MsgBatchUpdateOrders message | ||
| - Support for order failure events and conditional orders trigger failures in the chainstrem updates | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo and trailing whitespace.
Line 10 contains a typo: "chainstrem" should be "chainstream". Additionally, the pre-commit hook detected trailing whitespace that must be removed.
Apply this diff to fix both issues:
## [1.12.0] - 2025-11-10
### Changed
- Updated all compiled protos for compatibility with Injective core v1.17.0 and Indexer v1.17.16
- Included the OpenNotionalCap in derivative markets
- Added support for market orders creation with the MsgBatchUpdateOrders message
-- Support for order failure events and conditional orders trigger failures in the chainstrem updates
+- Support for order failure events and conditional orders trigger failures in the chainstream updates
-📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## [1.12.0] - 2025-11-10 | |
| ### Changed | |
| - Updated all compiled protos for compatibility with Injective core v1.17.0 and Indexer v1.17.16 | |
| - Included the OpenNotionalCap in derivative markets | |
| - Added support for market orders creation with the MsgBatchUpdateOrders message | |
| - Support for order failure events and conditional orders trigger failures in the chainstrem updates | |
| ## [1.12.0] - 2025-11-10 | |
| ### Changed | |
| - Updated all compiled protos for compatibility with Injective core v1.17.0 and Indexer v1.17.16 | |
| - Included the OpenNotionalCap in derivative markets | |
| - Added support for market orders creation with the MsgBatchUpdateOrders message | |
| - Support for order failure events and conditional orders trigger failures in the chainstream updates |
🧰 Tools
🪛 LanguageTool
[grammar] ~10-~10: Ensure spelling is correct
Context: ...ditional orders trigger failures in the chainstrem updates ## [1.11.2] - 2025-09-24 ### A...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~10-~10: Ensure spelling is correct
Context: ...igger failures in the chainstrem updates ## [1.11.2] - 2025-09-24 ### Added - Added ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
In CHANGELOG.md around lines 5 to 11, fix the typo "chainstrem" to "chainstream"
on line 10 and remove any trailing whitespace on that line (and any other lines
flagged by the pre-commit hook); update the text to read "Support for order
failure events and conditional orders trigger failures in the chainstream
updates" and ensure no trailing spaces remain at end-of-line.
| market_cumulative_funding = client_market._from_extended_chain_format( | ||
| Decimal(market["perpetualInfo"]["fundingInfo"]["cumulativeFunding"]) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard against missing funding info on non‑perpetual markets
market["perpetualInfo"] is absent for expiry futures and other non‑perpetual derivative markets. This line will throw a KeyError, crashing the example as soon as such a market is encountered—even though the script targets all active derivative markets. Please gate the funding-derived calculations so we either skip non‑perpetual markets or fall back to a safe default.
Apply something along these lines to avoid the crash:
- market_cumulative_funding = client_market._from_extended_chain_format(
- Decimal(market["perpetualInfo"]["fundingInfo"]["cumulativeFunding"])
- )
+ perpetual_info = market.get("perpetualInfo")
+ if not perpetual_info or "fundingInfo" not in perpetual_info:
+ continue # no funding data available for this market type
+
+ market_cumulative_funding = client_market._from_extended_chain_format(
+ Decimal(perpetual_info["fundingInfo"]["cumulativeFunding"])
+ )📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| market_cumulative_funding = client_market._from_extended_chain_format( | |
| Decimal(market["perpetualInfo"]["fundingInfo"]["cumulativeFunding"]) | |
| ) | |
| perpetual_info = market.get("perpetualInfo") | |
| if not perpetual_info or "fundingInfo" not in perpetual_info: | |
| continue # no funding data available for this market type | |
| market_cumulative_funding = client_market._from_extended_chain_format( | |
| Decimal(perpetual_info["fundingInfo"]["cumulativeFunding"]) | |
| ) |
🤖 Prompt for AI Agents
In examples/chain_client/10_SearchLiquidablePositions.py around lines 48 to 50,
the code assumes market["perpetualInfo"] exists and will KeyError on
non‑perpetual markets; guard that access by checking for "perpetualInfo" and its
"fundingInfo"/"cumulativeFunding" keys (or use market.get(...)) before
converting to Decimal, and either skip non‑perpetual markets (continue) or fall
back to a safe default like Decimal(0) so the example no longer crashes when
encountering expiry futures.
| """ | ||
| Demonstrate fetching denom min notionals using AsyncClient. | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the docstring to match the actual functionality.
The docstring states "Demonstrate fetching denom min notionals" but the code actually fetches open interest using client.fetch_open_interest().
Apply this diff to correct the docstring:
- """
- Demonstrate fetching denom min notionals using AsyncClient.
- """
+ """
+ Demonstrate fetching open interest using AsyncClient.
+ """📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| """ | |
| Demonstrate fetching denom min notionals using AsyncClient. | |
| """ | |
| """ | |
| Demonstrate fetching open interest using AsyncClient. | |
| """ |
🤖 Prompt for AI Agents
In examples/chain_client/exchange/query/66_OpenInterest.py around lines 9 to 11,
the docstring incorrectly says "Demonstrate fetching denom min notionals" but
the code calls client.fetch_open_interest(); update the docstring to accurately
describe that this example demonstrates fetching open interest using AsyncClient
(e.g., "Demonstrate fetching open interest using AsyncClient.") so the comment
matches the implemented functionality.
| def msg_offset_position( | ||
| self, sender: str, subaccount_id: str, market_id: str, offsetting_subaccount_ids: List[str] | ||
| ) -> injective_exchange_tx_v2_pb.MsgOffsetPosition: | ||
| return injective_exchange_tx_v2_pb.MsgOffsetPosition( | ||
| sender=sender, | ||
| subaccount_id=subaccount_id, | ||
| market_id=market_id, | ||
| offsetting_subaccount_ids=offsetting_subaccount_ids, | ||
| ) | ||
|
|
||
| def open_notional_cap(self, value: Decimal) -> injective_market_v2_pb.OpenNotionalCap: | ||
| chain_value = Token.convert_value_to_extended_decimal_format(value=value) | ||
| return injective_market_v2_pb.OpenNotionalCap( | ||
| capped=injective_market_v2_pb.OpenNotionalCapCapped( | ||
| value=f"{chain_value.normalize():f}", | ||
| ), | ||
| ) | ||
|
|
||
| def uncapped_open_notional_cap(self) -> injective_market_v2_pb.OpenNotionalCap: | ||
| return injective_market_v2_pb.OpenNotionalCap(uncapped=injective_market_v2_pb.OpenNotionalCapUncapped()) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wire MsgOffsetPosition into the composer maps.
Composer.msg_offset_position constructs the new message, but we never registered it in REQUEST_TO_RESPONSE_TYPE_MAP, GRPC_MESSAGE_TYPE_TO_CLASS_MAP, or GRPC_RESPONSE_TYPE_TO_CLASS_MAP. As soon as a tx/MsgExec result contains MsgOffsetPosition(Message|Response), helper routines such as Composer.MsgResponses, Composer.unpack_transaction_messages, or Composer.UnpackMsgExecResponse will raise KeyError. Please add the corresponding entries so these helpers can serialize/deserialize the new RPC cleanly.
Apply this diff near the existing MsgBatchUpdateOrders entries:
"MsgInstantBinaryOptionsMarketLaunch":
injective_exchange_tx_v2_pb.MsgInstantBinaryOptionsMarketLaunchResponse,
+ "MsgOffsetPosition":
+ injective_exchange_tx_v2_pb.MsgOffsetPositionResponse,
}
@@
"/injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunchResponse":
injective_exchange_tx_v2_pb.MsgInstantBinaryOptionsMarketLaunchResponse,
+ "/injective.exchange.v2.MsgOffsetPosition":
+ injective_exchange_tx_v2_pb.MsgOffsetPosition,
+ "/injective.exchange.v2.MsgOffsetPositionResponse":
+ injective_exchange_tx_v2_pb.MsgOffsetPositionResponse,Committable suggestion skipped: line range outside the PR's diff.
Summary by CodeRabbit
New Features
Bug Fixes & Updates
Documentation