Rpc multiquery#93
Open
juampiq6 wants to merge 27 commits into
Open
Conversation
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
Author
|
@xclud all fixes done, i dont know what could be missing |
Owner
|
Thank You @juampiq6, There are a couple of merge conflicts. |
# Conflicts: # lib/json_rpc.dart # lib/src/core/amount.dart
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
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.