refactor(cheatcodes): BroadcastableTransaction network-agnostic#13849
Merged
zerosnacks merged 1 commit intofoundry-rs:masterfrom Mar 19, 2026
Merged
Conversation
Remove the `Network` type parameter from `BroadcastableTransaction` by storing raw EVM data (from, to, value, input, nonce, gas) as primitive fields instead of wrapping `TransactionMaybeSigned<N>`. This prevents the `Network` generic from leaking through `Cheatcodes`, `RawCallResult`, and `ScriptResult`. The conversion to network-specific types (`TransactionMaybeSigned<Ethereum>`) now happens in the script layer (`simulate.rs`) at the point where transactions are handed off to `ScriptTransactionBuilder`.
8e188c6 to
d2a5810
Compare
figtracer
added a commit
to figtracer/foundry
that referenced
this pull request
Mar 19, 2026
Replace Ethereum-specific struct construction with `TransactionBuilder` and `FoundryTransactionBuilder` trait methods, allowing the conversion from `BroadcastableTransaction` to `TransactionMaybeSigned<N>` to work for any network. Also remove dead `TransactionMaybeSigned::new` and `new_signed` constructors that are no longer used after foundry-rs#13849.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the
Networktype parameter fromBroadcastableTransactionby storing raw EVM data (from, to, value, input, nonce, gas) as primitive fields instead of wrappingTransactionMaybeSigned<N>.This prevents the
Networkgeneric from leaking throughCheatcodes,RawCallResult, andScriptResult. The conversion to network-specific types (TransactionMaybeSigned<Ethereum>) now happens in the script layer (simulate.rs) at the point where transactions are handed off toScriptTransactionBuilder.This will need a follow-up to take care of making this
into_maybe_signed()generic.