-
Notifications
You must be signed in to change notification settings - Fork 228
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: add total delegation balance of a delegator query #352
Conversation
Warning Rate limit exceeded@beer-1 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 39 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request adds a new query functionality to the staking module. A new route is introduced in the query whitelist to handle requests for the total delegation balances of a specific delegator. The changes include the addition of a corresponding RPC method in the proto file, its implementation in the gRPC query handler, and unit tests to verify the functionality. Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant Q as Querier
participant K as Keeper
participant DB as Delegations Database
C->>Q: DelegatorSumDelegationBalances Request
Q->>K: GetAllDelegatorDelegations(delegator_addr)
K->>DB: Query delegations for delegator_addr
DB-->>K: Return list of delegations
K-->>Q: Return aggregated delegation responses
Q->>C: QueryDelegatorSumDelegationBalancesResponse (total balance)
Possibly related PRs
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #352 +/- ##
==========================================
+ Coverage 41.15% 41.18% +0.03%
==========================================
Files 269 269
Lines 25741 25769 +28
==========================================
+ Hits 10593 10613 +20
- Misses 13504 13507 +3
- Partials 1644 1649 +5
|
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.
LGTM
Description
This PR introduces a query endpoint to return total staking balance of a delegator.
Also add this query endpoint to the whitelist of move contract query.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...