Skip to content

feat(primitives): add FoundryTransactionBuilder trait#13512

Merged
mattsse merged 3 commits intofoundry-rs:masterfrom
mablr:feature/FoundryTransactionBuilder
Feb 25, 2026
Merged

feat(primitives): add FoundryTransactionBuilder trait#13512
mattsse merged 3 commits intofoundry-rs:masterfrom
mablr:feature/FoundryTransactionBuilder

Conversation

@mablr
Copy link
Copy Markdown
Collaborator

@mablr mablr commented Feb 22, 2026

Motivation

This enables seamless handling of tx requests for all Network impls supported by Foundry. This basically unlocks the last blocker for fully Network generic Cast ! 🚀

It may seem a bit "boilerplate", but I really think this is simplest solution to tackle the specific needs of Cast - don't require tx building/signing pipelines refactor at all. Moreover once integrated we'll be a able to get rid of FoundryTransactionRequest hacky impl, so the net code diff will be negative.

With the new design adding support a new Network simply consist in wiring the supported methods, ie if the network supports EIP-7702, simply re-implement:

  • authorization_list()
  • set_authorization_list()

Crediting @figtracer as co-author for blob_versioned_hashes methods proposed here : alloy-rs/alloy#3730

Once Alloy 2.0 will be released with new unified eip4844 builder trait alloy-rs/alloy#3600, and Tempo will have it's own TransactionBuilderTempo, the FoundryTransactionBuilder impls will be even simpler i.e per-trait bound blanket impls (TransactionBuilder7702/TransactionBuilder4844/TransactionBuilderTempo). In the meantime let's iterate with this.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

This enables seamless handling of tx requests for all `Network` impls supported by Foundry

Co-authored-by: figtracer <1gusredo@gmail.com>
Copy link
Copy Markdown
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Makes sense, pending one more review @onbjerg / @mattsse

@mattsse mattsse merged commit 970f6f6 into foundry-rs:master Feb 25, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Foundry Feb 25, 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