foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.09k stars 1.66k forks source link

feat(cast): support forking and debugging at transaction level #5568

Open llllvvuu opened 1 year ago

llllvvuu commented 1 year ago

Component

Cast

Describe the feature you would like

Like forge debug, but instead of running as a script can run against a live contract with live state. Similar to the Truffle debugger

Additional context

No response

Evalir commented 1 year ago

hmmm, wondering—does the new cast call --trace --debug work here?

llllvvuu commented 1 year ago

It could work, yeah. Looks like --trace takes a block height, technically replaying a tx depends on not only the block height but also the tx's index within the block. Also syntactic sugar for replaying a txhash would be very dank although could be tricky to hook up the source map

zerosnacks commented 2 months ago

Would the expected command look like: cast call --trace --debug --rpc-url <RPC_URL> <TX_HASH>?