feat(`cast`): consolidate conversion commands
Component
Cast
Describe the feature you would like
Motivation
Cast is getting bloated with excessive conversion commands, increasing cognitive load when trying to remember/find the right one.
Proposal
Create a cast convert subcommand to group all conversion-related commands, similar to how cast wallet groups wallet operations.
Before:
cast to-wei 1 ether
cast from-utf8 "hello"
After:
cast convert to-wei 1 ether
cast convert from-utf8 "hello"
Additional context
Proposed (26) commands to consolidate under cast convert
from-wei,to-wei,to-unitfrom-fixed-point,to-fixed-pointformat-units,parse-unitsto-hex,to-dec,to-baseto-int256,to-uint256from-utf8,to-utf8,to-ascii,from-binto-bytes32,to-hexdataformat-bytes32-string,parse-bytes32-string,parse-bytes32-addressto-check-sum-address,concat-hex,padto-rlp,from-rlp
Happy to work on this if approved
makes sense to group them, would be nice to avoid breaking change if possible, @dipanshuhappy going to assign this to you if still up to implement it, thanks!
makes sense to group them, would be nice to avoid breaking change if possible, @dipanshuhappy going to assign this to you if still up to implement it, thanks!
Yep I am still up to take it
makes sense to group them, would be nice to avoid breaking change if possible, @dipanshuhappy going to assign this to you if still up to implement it, thanks!
Was kinda hoping for a breaking change here, cast as-is has a ton of commands and they're only growing - hence the point on cognitive load. Another good reason is LLM prompting, much easier for an LLM to reason about using a single cast command as opposed to 30.
https://github.com/0xClandestine/foundry-mcp-rs
Was kinda hoping for a breaking change here, cast as-is has a ton of commands and they're only growing - hence the point on cognitive load. Another good reason is LLM prompting, much easier for an LLM to reason about using a single cast command as opposed to 30.
👍 yeah, can do that
Was kinda hoping for a breaking change here, cast as-is has a ton of commands and they're only growing - hence the point on cognitive load. Another good reason is LLM prompting, much easier for an LLM to reason about using a single cast command as opposed to 30.
👍 yeah, can do that
Thank you, thank you. May also be a good idea to see if this could be applied elsewhere to further consolidate other similar commands.
@dipanshuhappy thanks for taking this on, any updates ser?
@dipanshuhappy thanks for taking this on, any updates ser?
Hey, Yes gonna push in the next few hours
@dipanshuhappy friendly bump