Skip to content

feat(chisel): Chisel dispatch by EVM network#14813

Open
haythemsellami wants to merge 4 commits into
foundry-rs:masterfrom
haythemsellami:chisel-network-dispatch
Open

feat(chisel): Chisel dispatch by EVM network#14813
haythemsellami wants to merge 4 commits into
foundry-rs:masterfrom
haythemsellami:chisel-network-dispatch

Conversation

@haythemsellami
Copy link
Copy Markdown
Contributor

Closes #14812.

This makes Chisel's session/source/runner execution path generic over FoundryEvmNetwork and dispatches from the loaded NetworkConfigs at the command boundary.

It also adds a Tempo regression test that exercises chisel --network tempo against a Tempo-only precompile.

@figtracer figtracer changed the title Make Chisel dispatch by EVM network feat(chisel): Chisel dispatch by EVM network May 18, 2026
Comment thread crates/chisel/src/source.rs Outdated
"latest" => ChiselSession::latest(),
id => ChiselSession::load(id),
"latest" => ChiselSession::<FEN>::latest(),
id => ChiselSession::<FEN>::load(id),
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.

a Tempo session saved with --network tempo can later be loaded as ChiselSession<EthEvmNetwork> if the user runs chisel load <id> without --network tempo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I added a load-time network check before rebuilding the saved session. Chisel now compares
the current config network against the network persisted in the saved session config and errors if they
differ.

#[derive(Debug)]
pub struct ChiselDispatcher {
pub session: ChiselSession,
pub struct ChiselDispatcher<FEN: FoundryEvmNetwork = EthEvmNetwork> {
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.

I think this shouldn't default to EthEvmNetwork, dispatch must be explicit to avoid misrouting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Make Chisel execution dispatch through FoundryEvmNetwork instead of EthEvmNetwork

4 participants