Skip to content

refactor(evm): use FoundryEvmFactory in Backend/CowBackend#14062

Merged
zerosnacks merged 2 commits intofoundry-rs:masterfrom
mablr:refactor/use_evm_factory_in_backend
Apr 2, 2026
Merged

refactor(evm): use FoundryEvmFactory in Backend/CowBackend#14062
zerosnacks merged 2 commits intofoundry-rs:masterfrom
mablr:refactor/use_evm_factory_in_backend

Conversation

@mablr
Copy link
Copy Markdown
Collaborator

@mablr mablr commented Apr 1, 2026

Motivation

Fully generic Backend/CowBackend over Network and EvmFactory.

Introduced FoundryEvmFactory::transact_with_dyn_inspector workaround to handle dyn inspector dispatch through CowBackend->Backend.

OP support is not guaranteed yet since DatabaseExt::{transact,transact_from_tx} need to use concrete Context. To provide we'll need to add CHAIN generic to DatabaseExt but it's a huge diff, let's do it later (after tempo upstream).

@mablr mablr changed the title refactor(evm): use FoundryEvmFactory in Backend refactor(evm): use FoundryEvmFactory in Backend/CowBackend Apr 1, 2026
/// setup.
#[derive(Clone, Debug)]
pub struct CowBackend<'a> {
pub struct CowBackend<'a, N: Network, F: FoundryEvmFactory> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice

@zerosnacks zerosnacks merged commit 8f35511 into foundry-rs:master Apr 2, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Foundry Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants