-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Make the return value of account()
optional
#2262
Conversation
Suppose I run `block { account(address: "0x...") { balance, code, address }` with a valid but unknown address. I find it clearer to get back null for the account than some default values for each field.
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.
Sounds fair to me; will let @Arachnid approve for auto-merge.
Ping @Arachnid |
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.
I think this is a reasonable expectation. JSONRPC returns null
for not found ids (i.e. getBlockByNumber with a future block). An empty result set seems like a reasonable equivalent.
…tore * 'bls_keystore' of github.com:CarlBeek/EIPs: (47 commits) fix link to heading Fix spelling Fix email address Draft EIP: BLS12-381 Deterministic Account Hierarchy (ethereum#2334) Fix some URLs and require 2333 too Add name to metadata title (ethereum#2370) Draft: BLS12-381 Key Generation (ethereum#2333) Automatically merged updates to draft EIP(s) (ethereum#2397) Hard fork proposal to address the Ice age (ethereum#2387) Automatically merged updates to draft EIP(s) 1767 (ethereum#2262) EIP-2021: Payoutable Token (ethereum#2021) EIP-2009: Compliance Service (ethereum#2009) EIP-2019: Fundable Token (ethereum#2019) Use solidity/javascript highlighting in various EIPs (ethereum#2372) EIP-2018: Clearable Token (ethereum#2018) EIP-1996: Holdable token (ethereum#1996) Fix the username of @pizza-r0b in EIP-2309 (ethereum#2389) Clarify that empty accounts also return 0 in EIP-1052 (ethereum#2388) dType Functions Extension - Decentralized Type System for EVM (ethereum#2267) Fix spelling of GitHub [R4R] (ethereum#2369) ...
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
Suppose I run
block { account(address: "0x...") { balance, code, address }
with a valid but unknown address. I find it clearer to get back null for the account than some default values for each field.