-
Notifications
You must be signed in to change notification settings - Fork 70
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(call): Add eth_getBlockByNumber support to /call endpoint #69
feat(call): Add eth_getBlockByNumber support to /call endpoint #69
Conversation
Updated - all passing now. Do you think it's worth adding any more tests? |
I just realized that the other method in |
Also all the commits will need to be GPG signed and verified before I can merge that it. |
601b867
to
d5a13b8
Compare
This should be done now - squashed the commits into 1 and using |
@akramhussein Can you also refactor and add a test for Invalid args? |
Working on this now. When I started the PR I tried to use existing functions like: This parses the response into a different structure with additional calls. This drops some data fields - if you look at the The first isn't right since Do you have any thoughts on best way forward? |
Maybe a best way is to have a separate function for |
Ok - will do that. Thanks! For the
Or should we just add another call and assert in |
Let's make them separate. Easy to maintain and if we add more methods in call, it's easy to write. |
@shrimalmadhur I've added the test and split out the function. Also not that experienced with |
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. Thanks!
Motivation
This PR adds support for
eth_getBlockByNumber
being called via the/call
endpoint.Solution
eth_getBlockByNumber
toCallMethods
intypes.go
case
block foreth_getBlockByNumber
Open questions
None