Skip to content

Conversation

@aarmoa
Copy link
Collaborator

@aarmoa aarmoa commented Jun 16, 2025

  • Added a new AsyncClient for V2 Exchange module
  • Added a new Composer for V2 Exchange typs
  • Created an IndexerClient to contain all the logic to query Indexer, and refactored the v1 AsyncClient to use the IndexerClient
  • Created v2 version of all market types to support values conversion when the markets have human readable values
  • Updated proto definitions for chain v1.16.0-beta.3 and indexer v1.16.20
  • Updated all example scripts and unit tests

Solves CP-446

aarmoa added 2 commits June 12, 2025 14:50
…ge v2 endpoints. The original Composer and AsyncClient are still supported. Created an IndexerClient for all indexer endpoints
… Exchange module V2 queries and types. Updated examples and tests.
@aarmoa aarmoa requested a review from Copilot June 16, 2025 20:56
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

93 files out of 300 files are above the max files limit of 200.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new v2 AsyncClient and Composer for the exchange module, refactors existing clients to use the IndexerClient, and updates examples, tests, and proto definitions to support human‐readable market values.

  • Updated all example scripts to import AsyncClient from the new async_client_v2 module.
  • Refactored message constructors and composer methods to use the new v2 naming conventions.
  • Updated dependency versions and documentation to reflect v2 features.

Reviewed Changes

Copilot reviewed 349 out of 349 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
examples/chain_client/bank/query/1_BankBalance.py Updated AsyncClient import to v2
examples/chain_client/bank/query/10_SendEnabled.py Updated AsyncClient import to v2
examples/chain_client/bank/1_MsgSend.py Updated AsyncClient import and modified msg_send amount
examples/chain_client/authz/query/1_Grants.py Updated AsyncClient import to v2
examples/chain_client/authz/3_MsgRevoke.py Updated AsyncClient import and message renaming
examples/chain_client/authz/2_MsgExec.py Updated AsyncClient import and message renaming
examples/chain_client/authz/1_MsgGrant.py Updated AsyncClient import and message renaming
examples/chain_client/auth/query/1_Account.py Updated AsyncClient import to v2
examples/chain_client/auction/1_MsgBid.py Updated AsyncClient import and message renaming
examples/chain_client/9_PaginatedRequestExample.py Updated AsyncClient import to v2
examples/chain_client/7_ChainStream.py Updated chain stream filter and listener methods for v2
examples/chain_client/6_MessageBroadcasterWithGranteeAccountWithoutSimulation.py Updated AsyncClient import and message renaming
examples/chain_client/5_MessageBroadcasterWithoutSimulation.py Updated AsyncClient import and message naming (review potential double reference issue)
examples/chain_client/4_MessageBroadcasterWithGranteeAccount.py Updated AsyncClient import and message renaming
examples/chain_client/3_MessageBroadcaster.py Updated AsyncClient import and message renaming
examples/chain_client/1_LocalOrderHash.py Updated AsyncClient import and order creation method names
buf.gen.yaml Updated dependency version tags
README.md Added documentation for choosing between Exchange V1 and V2 clients
Makefile Updated clone branch for the indexer dependency
CHANGELOG.md Documented the new v2 features and removal of deprecated methods
Comments suppressed due to low confidence (1)

README.md:102

  • The new documentation refers to the import as 'injective.async_client_v2' while the code examples use 'pyinjective.async_client_v2'. Ensure that the module naming is consistent across the repository.
from injective.async_client_v2 import AsyncClient

@aarmoa aarmoa merged commit fbe418c into dev Jun 16, 2025
13 checks passed
@aarmoa aarmoa deleted the cp-446/created_v2_client_for_exchange_v2_endpoints branch June 16, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants