-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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(cast): Add --parse-bytes32-address #4746
Conversation
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.
ty, smol nit.
would appreciate a book pr once merged
Perhaps a more generic type to type converter would be more useful? Going from |
Yea I had the same thought as @tynes, I'd suggest
|
Also just noting you can achieve this currently using the
|
Definitely prefer adding this to the docs and making it the "canonical" solution to this problem, or |
I thought about doing something like this, as I knew about specifying output types (e.g. "totalSupply()(uint)") but couldn't figure out a way to do it. The Should we open a new issue and close this PR (or merge it while the I'll try to implement |
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'm fine with this, if we want a more generic converter this can be extra
Motivation
Add the
--parse-bytes32-address
option tocast
. Earlier today, I was reading storage values and couldn't find a way to parse them into a checksummed address, i.e. go from this :0x000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
to this :0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
.Solution
Implemented it
Other
I'm new to Rust and contributing (and quite proud of this PR actually), so feel free to provide any feedback.