feat: add rpc endpoint eth_getBalance#160
Merged
Merged
Conversation
…-block-number-table
…-block-number-table
…_block_by_number
…_block_by_number
mpaulucci
reviewed
Jul 18, 2024
| } | ||
|
|
||
| impl GetBalanceRequest { | ||
| pub fn parse(params: &Option<Vec<Value>>) -> Option<GetBalanceRequest> { |
Collaborator
There was a problem hiding this comment.
any reason why this returns Option instead of Result? Not against it, just curious
Contributor
Author
There was a problem hiding this comment.
All failure cases lead to a RpcError::BadParams error, by returning an Option we can omit all the repeated error mapping and just map once where the function is called. We could also use an internal function and make parse return the RpcError::BadParams
mpaulucci
approved these changes
Jul 18, 2024
fmoletta
added a commit
that referenced
this pull request
Jul 18, 2024
Based on #160 **Motivation** Support rpc endpoint `eth_getCode` **Description** * Add rpc endpoint `eth_getCode` * Add methods to obtain account code to `Store` api <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> Closes #38
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.
Based on #145
Motivation
Support rpc endpoint
eth_getBalanceDescription
Add rpc endpoint
eth_getBalanceCloses #36