-
Notifications
You must be signed in to change notification settings - Fork 41
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: add rpc endpoint eth_getBalance
#160
Conversation
…-block-number-table
…-block-number-table
} | ||
|
||
impl GetBalanceRequest { | ||
pub fn parse(params: &Option<Vec<Value>>) -> Option<GetBalanceRequest> { |
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.
any reason why this returns Option
instead of Result
? Not against it, just curious
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.
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
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
Based on lambdaclass#145 **Motivation** Support rpc endpoint `eth_getBalance` **Description** Add rpc endpoint `eth_getBalance` <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 --> Closes lambdaclass#36
Based on lambdaclass#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 lambdaclass#111, Resolves lambdaclass#222 --> Closes lambdaclass#38
Based on #145
Motivation
Support rpc endpoint
eth_getBalance
Description
Add rpc endpoint
eth_getBalance
Closes #36