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(custom-rpc): add account roles and LP info to custom RPC #4089

Merged
merged 12 commits into from Oct 10, 2023

Conversation

acdibble
Copy link
Contributor

@acdibble acdibble commented Oct 9, 2023

Pull Request

Closes: WEB-478

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

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?

@acdibble acdibble requested a review from a team as a code owner October 9, 2023 14:22
@acdibble acdibble requested review from jerryafr and niklasnatter and removed request for a team October 9, 2023 14:22
@linear
Copy link

linear bot commented Oct 9, 2023

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:

  • balances of assets
  • refund addresses
  • total collected fees (or maybe this will need to be performed by the processor)

@kylezs kylezs self-requested a review October 9, 2023 14:26
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #4089 (9bfafdb) into main (6c8f435) will increase coverage by 0%.
Report is 1 commits behind head on main.
The diff coverage is 68%.

@@          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     
Files Coverage Δ
state-chain/runtime/src/runtime_apis.rs 83% <60%> (+<1%) ⬆️
state-chain/primitives/src/chains.rs 75% <0%> (-4%) ⬇️
state-chain/custom-rpc/src/lib.rs 20% <86%> (+20%) ⬆️
state-chain/runtime/src/lib.rs 35% <6%> (+<1%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@dandanlen dandanlen left a comment

Choose a reason for hiding this comment

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

Nice.

Comment on lines 32 to 33
#[serde(tag = "role")]
#[serde(rename_all = "snake_case")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

👌

@dandanlen dandanlen changed the title feat(custom-rpc): add lp info custom RPC feat(custom-rpc): add account roles and LP info to custom RPC Oct 10, 2023
@dandanlen dandanlen enabled auto-merge (squash) October 10, 2023 08:01
@dandanlen dandanlen merged commit 8a46612 into main Oct 10, 2023
44 checks passed
@dandanlen dandanlen deleted the feature/web-478 branch October 10, 2023 08:29
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

2 participants