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

Plugin system for solidity precompiles #5576

Open glitch003 opened 1 year ago

glitch003 commented 1 year ago

Component

Anvil

Describe the feature you would like

As more and more L2's come online with their own solidity precompiles, it would be nice to be able to inject those into Anvil for testing.

Does Anvil have any support or plans for this kind of thing? It would be injecting rust code with a solidity binding.

Additional context

No response

grandizzy commented 1 month ago

@glitch003 there's support added, please check https://github.com/foundry-rs/foundry/blob/15fdb2a19ee2a038f7e72523c6a0b0c3cdc6c3e4/crates/anvil/src/evm.rs#L7

Does this work for you? thank you!

zerosnacks commented 1 month ago

cc @glitch003 related PR for context: https://github.com/foundry-rs/foundry/pull/7589