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.33k stars 1.76k forks source link

feat(anvil): support resetting from forked to non forked on `anvil_reset` #7472

Open mattsse opened 8 months ago

mattsse commented 8 months ago

Component

Anvil

Describe the feature you would like

https://github.com/foundry-rs/foundry/blob/9d2125b013cbcb61dce2546379a79a4d99ba2f78/crates/anvil/src/eth/api.rs#L1600-L1600

if no args are provided then we should reinitialize the state to default in memory

ref https://hardhat.org/hardhat-network/docs/reference https://hardhat.org/hardhat-network/docs/reference#initial-state

FYI @yash-atreya

Additional context

No response

yash-atreya commented 8 months ago

Noted. Thanks for tag.

mattsse commented 8 months ago

this should be similar to reset_fork but basically, reinitialize everything to fresh instance

bauti-defi commented 8 months ago

Hello, is this issue the one from my tweet?

https://x.com/BautiDeFi/status/1771177789019873445?s=20