foundry: feat(`forge script`): add ability to replay failed transaction on a local anvil fork
Component
Forge, Cast
Describe the feature you would like
As described here https://github.com/mds1/forge-trace-and-script-issue#issue-1-more-verbose-failure-messages-in-scripts
the tx failure error could be more verbose, we already have cast run which we could use to get the revert reason with some refactoring
- refactor cast
RunArgsso it can be used as a standalone function - use it to retrieve script errors in https://github.com/foundry-rs/foundry/blob/57d28db4d03a379823ba8a24d6ac6e2bdd227a9b/cli/src/cmd/forge/script/receipts.rs#L46-L62
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (4 by maintainers)
Marking as
not planned, we feel that this is largely covered by traces available at higher verbosity levels (>-vvv) and one can relatively easily take the transaction hash and run it withcast run` to debug against a forked block with traces. If any of you feel strongly about this feature please leave a comment and we may reconsider / re-evaluate the approach.This is still a valuable feature to have
checking in, is anyone currently working on this or started working on this and has a draft?
@joaquinlpereyra yes I am working on it
@mattsse Hello, could I pick up this issue, please? If on one is working on this
@fahimahmedx
RunArgsis an internal struct in our code base, it’s not user facing, it defines the arguments for the commandcast run