Skip to content

Comments

feat(rpc-types-eth): add TransactionRequest::create() builder method#3704

Merged
onbjerg merged 1 commit intomainfrom
matt/tx-request-with-create
Feb 17, 2026
Merged

feat(rpc-types-eth): add TransactionRequest::create() builder method#3704
onbjerg merged 1 commit intomainfrom
matt/tx-request-with-create

Conversation

@mattsse
Copy link
Member

@mattsse mattsse commented Feb 16, 2026

Adds a builder method to mark a TransactionRequest as a contract creation (deploy) transaction. This sets to = Some(TxKind::Create), which is required by the wallet filler middleware to distinguish deployments from incomplete transactions (where to is None).

Previously, users had to break the builder chain:

let mut tx = TransactionRequest::default().input(bytecode.into());
tx.to = Some(TxKind::Create);

Now:

TransactionRequest::default().create().input(bytecode.into())

Adds a builder method to mark a TransactionRequest as a contract
creation (deploy) transaction. This sets to = Some(TxKind::Create),
which is required by the wallet filler middleware to distinguish
deployments from incomplete transactions (where to is None).

Previously, users had to break the builder chain:
    let mut tx = TransactionRequest::default().input(bytecode.into());
    tx.to = Some(TxKind::Create);

Now: TransactionRequest::default().create().input(bytecode.into())
Amp-Thread-ID: https://ampcode.com/threads/T-019c684c-a510-71d9-9af0-af8ecdcdef21
Co-authored-by: Amp <[email protected]>
@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Feb 17, 2026
@onbjerg onbjerg merged commit 3ebfbc0 into main Feb 17, 2026
30 checks passed
@onbjerg onbjerg deleted the matt/tx-request-with-create branch February 17, 2026 00:29
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Feb 17, 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.

2 participants