Skip to content

Commit

Permalink
feat: add TransactionBuilder::apply (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jun 6, 2024
1 parent bedc442 commit 0b0bcf3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/network/src/transaction/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,14 @@ pub trait TransactionBuilder<N: Network>: Default + Sized + Send + Sync + 'stati
self
}

/// Apply a function to the builder, returning the modified builder.
fn apply<F>(self, f: F) -> Self
where
F: FnOnce(Self) -> Self,
{
f(self)
}

/// True if the builder contains all necessary information to be submitted
/// to the `eth_sendTransaction` endpoint.
fn can_submit(&self) -> bool;
Expand Down

0 comments on commit 0b0bcf3

Please sign in to comment.