forked from simolus3/web3dart
-
Notifications
You must be signed in to change notification settings - Fork 102
Rpc multiquery #93
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
Open
juampiq6
wants to merge
27
commits into
xclud:main
Choose a base branch
from
juampiq6:rpc_multiquery
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rpc multiquery #93
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instead of throwing an RPCError, now an error is returned in the list of responses, to be handled by the receiver appropiately
created some really handy constructors to be able to create several queries easily
… them. switched back rpc query id to be int instead of string, for single type managment purpose: theorically an rpc id can be string too, but for simplicity all ids assigned will be int
…ber of responses added response sorted by request order (not id order)
juampiq6
commented
Feb 26, 2023
juampiq6
commented
Feb 26, 2023
juampiq6
commented
Feb 26, 2023
juampiq6
commented
Feb 26, 2023
xclud
reviewed
Feb 26, 2023
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.
Thank you @juampiq6. I appreciate your efforts. Please let's review and improve the code together.
@xclud all fixes done, i dont know what could be missing |
Thank You @juampiq6, There are a couple of merge conflicts. |
# Conflicts: # lib/json_rpc.dart # lib/src/core/amount.dart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multiquery RPC feature:
This PR adds functionality for making several rpc queries in one request. Handling most of the stuff internally in a separate implementation of a Web3Client for compatibility purpose.
I can add documentation for it in the main README.md file for people who need it as it can be a useful feature for a lot of people to ask once and get several responses (reducing latency times specially for dapps that make a lot of request).
I think this is a key feature.
I added some integration test but a lot more can be added (i saw the other parts of this library werent thoughly tested so i want make sense to keep a good test suite only for this feature).
Hope this helps!
Any improvement is more than welcome as any corrections or discussion about the implementation!
@xclud i hope you have time to review it, I have marked in the PR comments the part where it does actually change a little the library API, but so far the rest and the main functionality is developed in other implementation of the Web3Client.