Skip to content

Commit

Permalink
Merge pull request #722 from worldcoin/0xkitsune/log-tx
Browse files Browse the repository at this point in the history
chore: log transaction when simulating/broadcasting
  • Loading branch information
0xKitsune authored May 2, 2024
2 parents ba1aea1 + 7680f6b commit 6d7a789
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ethereum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ impl Ethereum {
tx: TypedTransaction,
only_once: bool,
) -> Result<TransactionId, TxError> {
tracing::info!(?tx, "Simulating transaction");
if let Err(err) = self.read_provider.call(&tx, None).await {
tracing::error!("Error simulating transaction: {:?}", err);
return Err(TxError::Simulate(anyhow::Error::new(err)));
}

tracing::info!(?tx, "Sending transaction");
self.write_provider.send_transaction(tx, only_once).await
}

Expand Down

0 comments on commit 6d7a789

Please sign in to comment.