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(custom-rpc): add account roles and LP info to custom RPC #4089
Conversation
WEB-478 LP info custom RPC
Currently, we have an account info custom RPC. However, this RPC is focused entirely on accounts with the validator role. We need to add a new custom RPC that takes an account ID and returns:
|
Codecov Report
@@ Coverage Diff @@
## main #4089 +/- ##
======================================
Coverage 71% 71%
======================================
Files 377 377
Lines 59885 60020 +135
Branches 59885 60020 +135
======================================
+ Hits 42621 42760 +139
- Misses 15018 15019 +1
+ Partials 2246 2241 -5
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Nice.
state-chain/custom-rpc/src/lib.rs
Outdated
#[serde(tag = "role")] | ||
#[serde(rename_all = "snake_case")] |
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.
👌
Pull Request
Closes: WEB-478
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
This old method was no longer used and only returned validator information.
The method has been rewritten to be role agnostic. We can no longer use a struct and have a dynamic return shape. Ideally we would have some tests of these custom RPCs to cement in the behavior. Maybe someone can help me here?