foundry
foundry copied to clipboard
feat(`anvil`): support better debugging flows when using `anvil` programmatically via `EthApi`
Component
Anvil
Describe the feature you would like
There are several features which would be useful to support out of the box with anvil when using it via EthApi
that already have some level of support within forge:
- [ ] Ability to query for transaction exit reason/revert message given transaction hash
- [ ] Ability to get some form of stack trace from a reverted transaction given transaction hash
- [ ] Ability to programmatically access transaction traces as offered with logging and within forge
- [ ] Ability to get console.log outputs (as returned data, not logged) from a transaction given the transaction hash
Probably there are even more features available in forge that would be useful to expose here that I am not thinking of!
Additional context
Some of this data is available internally already e.g. here https://github.com/foundry-rs/foundry/blob/63c71b4f3e162c5ab7da696b865a74ba8eda80c1/anvil/src/eth/backend/executor.rs#L156-L171 but it is not forwarded to be easily accessible via EthApi