Skip to content

Commit

Permalink
obs: send_raw_transaction (#1480)
Browse files Browse the repository at this point in the history
add observability in send_raw_transaction

Signed-off-by: Gregory Edison <[email protected]>
  • Loading branch information
greged93 authored Oct 22, 2024
1 parent ec203ad commit a8117ee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ where

// Recover the signer from the transaction
let signer = transaction_signed.recover_signer().ok_or(SignatureError::Recovery)?;
let hash = transaction_signed.hash();
let to = transaction_signed.to();

let transaction_signed_ec_recovered =
TransactionSignedEcRecovered::from_signed_transaction(transaction_signed.clone(), signer);

Expand All @@ -116,7 +119,11 @@ where
self.eth_provider.deploy_evm_transaction_signer(signer).await?;

// Add the transaction to the pool and wait for it to be picked up by a relayer
let hash = self.pool.add_transaction(TransactionOrigin::Local, pool_transaction).await?;
let hash = self
.pool
.add_transaction(TransactionOrigin::Local, pool_transaction)
.await
.inspect_err(|err| tracing::error!(?err, ?hash, ?to, from = ?signer))?;

Ok(hash)
}
Expand Down

0 comments on commit a8117ee

Please sign in to comment.