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 --from-rlp & --to-rlp #1465
Conversation
I don't think a flag to add it makes a lot of sense since you can just do |
Should it always return $ cast --to-uint256 0
0x0000000000000000000000000000000000000000000000000000000000000000 Definitely would like if |
e6c3477
to
47dcb39
Compare
thx for this @0xvv, wonder what your plans are for getting this over the line :D |
lil update, encoding is working but i still have quite a lot of work on decoding and arguments parsing |
e4cdc0a
to
8112635
Compare
I'm still gonna add some finishing touches but most of the code is here, any feedback welcome. Also what is the better way to handle string or hex input in the cli ? i don't think having 4 flags is the best, is the --from-rlp even useful ? I kinda mindlessly added it but is there really a use case ? Here are some usage examples for reference |
d7c62db
to
f8988bc
Compare
ℹ️ Just renamed |
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.
thanks for this,
couple of smol nits
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.
Some minor nits (feel free to skip) but also some questions about the functionality
aa5c5fc
to
0b7b24e
Compare
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
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.
thanks!
this looks complete, mind adding casttest!
to test these?
see https://github.com/foundry-rs/foundry/blob/master/cli/tests/it/cast.rs
dd03912
to
3766796
Compare
Added a couple, i can add some more cases if needed |
Implementation of feature #1433