-
Notifications
You must be signed in to change notification settings - Fork 452
Define eth_account #329
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
Define eth_account #329
Changes from 3 commits
63e8d7b
8ffc721
9a33c6a
83732ee
bd11a2b
457560e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,24 @@ StorageProof: | |
type: array | ||
items: | ||
$ref: '#/components/schemas/bytes' | ||
Account: | ||
title: Account | ||
type: object | ||
required: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Propose including the blockHash this was resolved from to the return value to support the case that a tag was the block param passed in. If the EL is providing the account state as of the "latest" block, the caller likely has no idea what block that is. This api is not in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Myeah, that makes sense... but IMO it doesn't belong in the Account object, but rather as a metadata along with the account. {
"blockHash": "0x...",
"stateRoot": "...",
"account": { ... }
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, much better. agreed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we already have this issue with all the other state reading methods, such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I agree with @lightclient |
||
- root | ||
holiman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- balance | ||
- nonce | ||
- codeHash | ||
properties: | ||
root: | ||
holiman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
title: storage root | ||
$ref: '#/components/schemas/hash32' | ||
balance: | ||
title: balance | ||
$ref: '#/components/schemas/uint256' | ||
codeHash: | ||
title: codeHash | ||
$ref: '#/components/schemas/hash32' | ||
nonce: | ||
title: nonce | ||
$ref: '#/components/schemas/uint64' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
>> {"jsonrpc":"2.0","id":9,"method":"eth_getAccount","params":["0x000000000000000000000000000000000000dead","latest"]} | ||
<< {"jsonrpc":"2.0","id":9,"result": null} | ||
>> {"jsonrpc":"2.0","id":10,"method":"eth_getAccount","params":["0xaa00000000000000000000000000000000000000","latest"]} | ||
<< {"jsonrpc":"2.0","id":10,"result": { "codeHash": "0xce92c756baff35fa740c3557c1a971fd24d2d35b7c8e067880d50cd86bb0bc99", "root": "0x8afc95b7d18a226944b9c2070b6bda1c3a36afcc3730429d47579c94b9fe5850", "balance": "0x1", "nonce": "0x1"}} | ||
holiman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
>> {"jsonrpc":"2.0","id":11,"method":"eth_getAccount","params":["0xaa00000000000000000000000000000000000000","0xffff"]} | ||
<< {"jsonrpc":"2.0","id":11,"error":{"code":-32000,"message":"header not found"}} |
Uh oh!
There was an error while loading. Please reload this page.