Skip to content

Commit

Permalink
Allow to convert CallBuilderTo TransactionRequest (#981)
Browse files Browse the repository at this point in the history
feat: allow to convert CallBuilderTo TransactionRequest
  • Loading branch information
leruaa authored Jun 27, 2024
1 parent 60cd429 commit 097e21a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/contract/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ pub struct CallBuilder<T, P, D, N: Network = Ethereum> {
transport: PhantomData<T>,
}

impl<T, P, D, N: Network> CallBuilder<T, P, D, N> {
/// Converts the call builder to the inner transaction request
pub fn into_transaction_request(self) -> N::TransactionRequest {
self.request
}
}

impl<T, P, D, N: Network> AsRef<N::TransactionRequest> for CallBuilder<T, P, D, N> {
fn as_ref(&self) -> &N::TransactionRequest {
&self.request
Expand Down

0 comments on commit 097e21a

Please sign in to comment.