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
Snake case the remaining camels #3353
Conversation
- some remaining cases of ``blockHash`` - ``fromBlock`` - ``toBlock`` ... add newsfragment for ethereum#3353
cdf5d67
to
b6dec86
Compare
- some remaining cases of ``blockHash`` - ``fromBlock`` - ``toBlock`` ... add newsfragment for ethereum#3353
b6dec86
to
7e6f384
Compare
- some remaining cases of ``blockHash`` - ``fromBlock`` - ``toBlock`` ... add newsfragment for ethereum#3353
7e6f384
to
653b8cd
Compare
- some remaining cases of ``blockHash`` - ``fromBlock`` - ``toBlock`` ... add newsfragment for ethereum#3353
653b8cd
to
9f86289
Compare
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.
🐑
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!
- some remaining cases of ``blockHash`` - ``fromBlock`` - ``toBlock`` ... add newsfragment for #3353
|
||
Note that if a dictionary is used instead, say to a call such as `eth_getLogs`, the | ||
keys in the dictionary should be camelCase. This is because the dictionary is passed | ||
directly to the JSON-RPC request, where the keys are expected to be in camelCase. |
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.
What do you think about adding a formatter for the case of getLogs
and friends? Basically it would look at the TxDict and flip any snake_case to camelCase to be passed on to the node. Then on the way back out it would do the same.
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'd be good with that if the user experience would benefit from it. The way it is now, users are aware the transactions need to have camelCase arguments as well i.e. {"maxFeePerGas": 10**9, ...}
. I think this is a similar case to that but I do think it's a touch more confusing because of the way it can be used by passing in kwargs which are snake-cased. I could go either way.
What was wrong?
Closes #3085
How was it fixed?
fromBlock
,toBlock
, andblockHash
Todo:
Cute Animal Picture