Skip to content
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

feat(helix-57): add stream account data rpc #221

Closed
wants to merge 10 commits into from

Conversation

proofofze
Copy link

@proofofze proofofze commented May 16, 2024

Summary by CodeRabbit

  • New Features

    • Introduced new account-related functionalities, including portfolio details, order states, balances, history, rewards, and live data streaming.
    • Added a new RPC method to retrieve insurance fund information for specific tokens.
    • Introduced a new RPC method to list token holders.
    • Added a new RPC method for enhanced contract transaction tracking.
  • Updates

    • Updated code generation tools to version goa v3.7.0.
    • Deprecated the sequence field in transaction preparation requests.
  • Enhancements

    • Improved message structures for various RPC methods.
    • Added new fields for better filtering and configuration in trading strategies.

Copy link

coderabbitai bot commented May 16, 2024

Walkthrough

The recent updates span multiple proto files, introducing new functionalities and refining existing ones. Key highlights include a comprehensive InjectiveAccountsRPC service, addition of new RPC methods like GetContractTxsV2 in InjectiveExplorerRPC, and several field adjustments. Many files have also been updated to a newer version of the code generation tool (goa v3.7.0).

Changes

Files Change Summary
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto Added InjectiveAccountsRPC service and multiple message types for account-related RPC methods.
exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.proto Updated code generation version from goa v3.5.2 to goa v3.7.0.
exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.proto Renamed and added fields in Campaign and CampaignsResponse messages, updated generated code version.
exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.proto Modified comment in StreamPositionsResponse message.
exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.proto Deprecated sequence field in PrepareTxRequest, updated code generation version.
exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.proto Added GetContractTxsV2 RPC method, updated message structures for GetContractTxsV2Request and GetContractTxsV2Response, and updated generated code version.
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.proto Added Fund RPC method and new message types FundRequest and FundResponse, updated code generation version.
exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.proto Updated code generation version to goa v3.7.0.
exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.proto Updated code generation version to goa v3.7.0.
exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.proto Added TokenHolders RPC method and messages TokenHoldersRequest, TokenHoldersResponse, and Holder, updated code generation version.
exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.proto Updated code generation version to goa v3.7.0.
exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.proto Added fields in ListTradingStrategiesRequest, TradingStrategy, added ExitConfig message, and updated code generation version.

Poem

In the garden of code, changes bloom,
New methods and fields, they dispel the gloom.
RPCs grow strong, with each update,
Accounts and portfolios, intricate and great.
🌸 Tools evolve, from v3.5 to 3.7 ascend,
In a world of bytes, innovation has no end. 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 8a251c5 and c78b7db.
Files ignored due to path filters (40)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/accounts_rpc/pb/injective_accounts_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/accounts_rpc/pb/injective_accounts_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/auction_rpc/pb/injective_auction_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/campaign_rpc/pb/injective_campaign_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/exchange_rpc/pb/injective_exchange_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/explorer_rpc/pb/injective_explorer_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/insurance_rpc/pb/injective_insurance_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/insurance_rpc/pb/injective_insurance_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/meta_rpc/pb/injective_meta_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/oracle_rpc/pb/injective_oracle_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/portfolio_rpc/pb/injective_portfolio_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/portfolio_rpc/pb/injective_portfolio_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
  • exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/trading_rpc/pb/injective_trading_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/trading_rpc/pb/injective_trading_rpc.pb.gw.go is excluded by !**/*.pb.gw.go
Files selected for processing (13)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (1 hunks)
  • exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.proto (1 hunks)
  • exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.proto (5 hunks)
  • exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.proto (2 hunks)
  • exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.proto (2 hunks)
  • exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.proto (3 hunks)
  • exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.proto (3 hunks)
  • exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.proto (1 hunks)
  • exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.proto (1 hunks)
  • exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.proto (3 hunks)
  • exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.proto (1 hunks)
  • exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.proto (3 hunks)
  • exchange/trading_rpc/pb/injective_trading_rpc_grpc.pb_mock.go (1 hunks)
Files not reviewed due to errors (1)
  • exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.proto (no review received)
Files skipped from review due to trivial changes (7)
  • exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.proto
  • exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.proto
  • exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.proto
  • exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.proto
  • exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.proto
  • exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.proto
  • exchange/trading_rpc/pb/injective_trading_rpc_grpc.pb_mock.go
Additional comments not posted (19)
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.proto (3)

18-19: Addition of the Fund RPC method looks good.


71-74: The FundRequest message is well-defined.


76-79: The FundResponse message is well-defined.

exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.proto (3)

16-17: Addition of the TokenHolders RPC method looks good.


26-32: The TokenHoldersRequest message is well-defined.


34-45: The TokenHoldersResponse and Holder messages are well-defined.

exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.proto (3)

39-42: The new fields in the ListTradingStrategiesRequest message are well-defined.


103-117: The new fields in the TradingStrategy message are well-defined.


120-124: The ExitConfig message is well-defined.

exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.proto (4)

37-38: The new field in the RankingRequest message is well-defined.


66-80: The new fields in the Campaign message are well-defined.


108-109: The new field in the CampaignUser message is well-defined.


139-140: The new field in the CampaignsResponse message is well-defined.

exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (6)

1-38: The file header and service definition look good. The new RPC methods are well-documented and comprehensive.


40-48: The PortfolioRequest and PortfolioResponse message types are well-defined and include all necessary fields.


74-83: The OrderStatesRequest and OrderStatesResponse message types are well-defined and include all necessary fields.


113-120: The SubaccountsListRequest and SubaccountsListResponse message types are well-defined and include all necessary fields.


162-174: The StreamSubaccountBalance RPC method and related message types are well-defined and include all necessary fields.


278-289: The StreamAccountData RPC method and related message types are well-defined and include all necessary fields.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between c78b7db and d60b13f.
Files ignored due to path filters (1)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go is excluded by !**/*.pb.go
Files selected for processing (1)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between d60b13f and a2e0188.
Files ignored due to path filters (1)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go is excluded by !**/*.pb.go
Files selected for processing (1)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto

@aarmoa
Copy link
Collaborator

aarmoa commented May 31, 2024

@proofofze Is there an urgent issue or other reason to create a PR pointing to master instead of dev?

Copy link
Contributor

@hmoragrega hmoragrega left a comment

Choose a reason for hiding this comment

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

LGTM

@hmoragrega hmoragrega requested a review from aarmoa June 13, 2024 13:58
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a2e0188 and b88c582.

Files ignored due to path filters (24)
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc_grpc.pb.go is excluded by !**/*.pb.go
  • exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.pb.go is excluded by !**/*.pb.go
  • exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc_grpc.pb.go is excluded by !**/*.pb.go
Files selected for processing (12)
  • exchange/accounts_rpc/pb/injective_accounts_rpc.proto (3 hunks)
  • exchange/auction_rpc/pb/injective_auction_rpc.proto (1 hunks)
  • exchange/campaign_rpc/pb/injective_campaign_rpc.proto (5 hunks)
  • exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto (2 hunks)
  • exchange/exchange_rpc/pb/injective_exchange_rpc.proto (2 hunks)
  • exchange/explorer_rpc/pb/injective_explorer_rpc.proto (3 hunks)
  • exchange/insurance_rpc/pb/injective_insurance_rpc.proto (3 hunks)
  • exchange/meta_rpc/pb/injective_meta_rpc.proto (1 hunks)
  • exchange/oracle_rpc/pb/injective_oracle_rpc.proto (1 hunks)
  • exchange/portfolio_rpc/pb/injective_portfolio_rpc.proto (3 hunks)
  • exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto (1 hunks)
  • exchange/trading_rpc/pb/injective_trading_rpc.proto (3 hunks)
Files not summarized due to errors (1)
  • exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto: Error: Server error. Please try again later.
Files not reviewed due to errors (2)
  • exchange/accounts_rpc/pb/injective_accounts_rpc.proto (Error: Server error. Please try again later.)
  • exchange/explorer_rpc/pb/injective_explorer_rpc.proto (Error: Server error. Please try again later.)
Files skipped from review due to trivial changes (5)
  • exchange/auction_rpc/pb/injective_auction_rpc.proto
  • exchange/exchange_rpc/pb/injective_exchange_rpc.proto
  • exchange/meta_rpc/pb/injective_meta_rpc.proto
  • exchange/oracle_rpc/pb/injective_oracle_rpc.proto
  • exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto
Additional comments not posted (9)
exchange/insurance_rpc/pb/injective_insurance_rpc.proto (2)

1-1: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.


71-79: New message types FundRequest and FundResponse introduced for the Fund RPC method. Verify that these types are properly handled in the backend logic and unit tests.

exchange/portfolio_rpc/pb/injective_portfolio_rpc.proto (2)

1-1: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.


26-45: New message types TokenHoldersRequest, TokenHoldersResponse, and Holder introduced for the TokenHolders RPC method. Verify these are properly implemented and tested.

exchange/trading_rpc/pb/injective_trading_rpc.proto (2)

1-1: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.


103-118: Introduced new fields and message types in TradingStrategy to handle exit strategies and configurations. This is a significant change; ensure all related components are updated and tested.

exchange/campaign_rpc/pb/injective_campaign_rpc.proto (2)

1-1: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.


66-80: Significant changes in the Campaign message with new fields and renaming. This requires careful integration to ensure data consistency and correct functionality.

exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto (1)

673-673: Updated the comment for clarity and consistency.

Comment on lines +18 to +19
// Funds returns an insurance fund for a given insurance fund token denom.
rpc Fund (FundRequest) returns (FundResponse);
Copy link

Choose a reason for hiding this comment

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

New RPC method Fund introduced to retrieve insurance funds for specific tokens. Ensure corresponding backend logic and unit tests are implemented.

Comment on lines +16 to +17
// Provide a list of addresses holding a specific token
rpc TokenHolders (TokenHoldersRequest) returns (TokenHoldersResponse);
Copy link

Choose a reason for hiding this comment

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

Introduced new RPC method TokenHolders to provide a list of addresses holding specific tokens. Ensure backend logic and unit tests are updated accordingly.

Comment on lines +39 to +42
// Filter by strategy type
repeated string strategy_type = 10;
// Filter by market type
string market_type = 11;
Copy link

Choose a reason for hiding this comment

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

Introduced new fields in ListTradingStrategiesRequest to filter by strategy type and market type. Ensure these fields are utilized correctly in the backend logic.

Comment on lines +37 to +38
// Contract address that manages the round and reward
string contract_address = 6;
Copy link

Choose a reason for hiding this comment

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

Introduced a new field contract_address in RankingRequest to specify the contract managing the round and reward. Confirm this field is utilized correctly in the backend.

Comment on lines +126 to +134
// Round ID, if not specified, it will return latest roundId
sint64 round_id = 1;
// Address of login account, if not specified it will return no user rewards
string account_address = 2;
// This will return campaign x where x.roundId <= toRoundId. Useful for listing
// multiple rounds
sint32 to_round_id = 3;
// Contract address that manages the round and reward
string contract_address = 4;
Copy link

Choose a reason for hiding this comment

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

New fields introduced in CampaignsRequest to handle multiple rounds and rewards management. Ensure these fields are correctly implemented and integrated.

Comment on lines +139 to +140
repeated Coin accumulated_rewards = 2;
sint32 reward_count = 3;
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The renaming from account_rewards to accumulated_rewards in CampaignsResponse has been implemented correctly in the exchange/campaign_rpc/pb/injective_campaign_rpc.proto file. However, there is still a reference to account_rewards in proto/injective/exchange/v1beta1/events.proto.

  • exchange/campaign_rpc/pb/injective_campaign_rpc.proto: repeated Coin accumulated_rewards = 2;
  • proto/injective/exchange/v1beta1/events.proto: repeated AccountRewards account_rewards = 1;

Please ensure that the reference in proto/injective/exchange/v1beta1/events.proto is reviewed and updated if necessary.

Analysis chain

Renamed field account_rewards to accumulated_rewards in CampaignsResponse. Verify that this change is reflected in all relevant parts of the application.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the renaming from `account_rewards` to `accumulated_rewards` in `CampaignsResponse`.

# Test: Search for the use of `accumulated_rewards`.
rg --type proto $'accumulated_rewards'

Length of output: 67



Script:

#!/bin/bash
# Description: Verify the renaming from `account_rewards` to `accumulated_rewards` in `CampaignsResponse`.

# Test: Search for the use of `accumulated_rewards`.
rg 'accumulated_rewards' --glob '*.proto'

# Test: Search for the use of `account_rewards` to ensure it has been fully replaced.
rg 'account_rewards' --glob '*.proto'

Length of output: 266

@proofofze proofofze closed this Jun 17, 2024
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.

None yet

3 participants