feat: cast decode-error
Motivation
When debugging eth integrations across platforms sometimes the only thing you can work with is the revert data, this can turn into searching thru forge inspect or manually checking if its an error that can be decoded as a string
Solution
Introduce forge decode-error, which searches the project (if any), checks against revert/panic types and prints any results
This seems like it would be better as a cast command
Hi @nhtyy thanks for your PR! I can see how this feature could be useful. Would you be interested in porting your changes to cast as cast decode-error?
Hey @zerosnacks.
Apologies for the delay but will give this a shot in the next week or two
@zerosnacks
Im going to work on this during this upcoming week, just wanted your opinion because cast doesn't have any "project awareness" in the since that it doesn't ever look for a foundry.toml
my thinking is either if were in a foundry project we search there, or if not we search the .foundry cache?
do you think either of these approaches is ok?