foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat: support traces and debugging in `cast call`

Open mds1 opened this issue 3 years ago • 1 comments

Component

Forge

Describe the feature you would like

Sometimes a call can revert, and being able to see a trace or use the debugger to understand why is useful. The UX here would be adding --trace or --debug flags to cast call

Right now you can probably work around this by starting anvil from a fork, using cast send to send a tx to anvil, then inspecting the failed tx with cast run

Additional context

No response

mds1 avatar Aug 31 '22 15:08 mds1

imo this is what cast run is for

edit: nvm I see cast run just reruns a tx. Should be fairly simple to move the cast run logic into cast call and make cast run just "prefill" the arguments for you from a tx hash

onbjerg avatar Sep 01 '22 10:09 onbjerg

it would be cool to also do this for cast send, since sometimes when it fails, it refuses to send on chain.

Divide-By-0 avatar Feb 22 '24 03:02 Divide-By-0

@onbjerg I suppose this can be closed. Ref: #5477

yash-atreya avatar Feb 22 '24 08:02 yash-atreya