feat(`anvil`): modify `--hardfork` flag to support Optimism specific hardforks
Component
Anvil
Describe the feature you would like
Problem
There's currently a --hardfork flag which allows you to specify which ethereum hardfork to use. When running with optimism the flag still accepts an ethereum hardfork, not an optimism one.
Solution
Create a new flag (maybe --optimism-hardfork or perhaps adapt the current one to allow setting the optimism hardfork.
We're currently using anvil for optimism/tests work and we need this feature, so if there are no objections I'll probably start working on it right away.
Given there already exists an --optimism flag could we check against the existence of it in --hardfork <name>? This allows for further flexibility when other projects require custom hardforks
See: https://github.com/foundry-rs/foundry/blob/master/crates/anvil/src/hardfork.rs
@zerosnacks let me know if this looks good to you: https://github.com/foundry-rs/foundry/pull/8749
Hi @ewoolsey this looks good! Pending reviews from others