diff --git a/apps/fortuna/Cargo.lock b/apps/fortuna/Cargo.lock index c6c249061a..e13d7bb117 100644 --- a/apps/fortuna/Cargo.lock +++ b/apps/fortuna/Cargo.lock @@ -1502,7 +1502,7 @@ dependencies = [ [[package]] name = "fortuna" -version = "6.2.0" +version = "6.2.1" dependencies = [ "anyhow", "axum", diff --git a/apps/fortuna/Cargo.toml b/apps/fortuna/Cargo.toml index 7da40ba3db..8657147cfe 100644 --- a/apps/fortuna/Cargo.toml +++ b/apps/fortuna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fortuna" -version = "6.2.0" +version = "6.2.1" edition = "2021" [dependencies] diff --git a/apps/fortuna/src/keeper.rs b/apps/fortuna/src/keeper.rs index a34867fa94..3d556edbe3 100644 --- a/apps/fortuna/src/keeper.rs +++ b/apps/fortuna/src/keeper.rs @@ -414,19 +414,39 @@ pub async fn process_event( ) .gas(gas_estimate); - - let pending_tx = contract_call.send().await.map_err(|e| { - backoff::Error::transient(anyhow!("Error submitting the reveal transaction: {:?}", e)) - })?; + let client = contract.client(); + let mut transaction = contract_call.tx.clone(); + // manually fill the tx with the gas info, so we can log the details in case of error + client + .fill_transaction(&mut transaction, None) + .await + .map_err(|e| { + backoff::Error::transient(anyhow!("Error filling the reveal transaction: {:?}", e)) + })?; + let pending_tx = client + .send_transaction(transaction.clone(), None) + .await + .map_err(|e| { + backoff::Error::transient(anyhow!( + "Error submitting the reveal transaction. Tx:{:?}, Error:{:?}", + transaction, + e + )) + })?; let receipt = pending_tx .await .map_err(|e| { - backoff::Error::transient(anyhow!("Error waiting for transaction receipt {:?}", e)) + backoff::Error::transient(anyhow!( + "Error waiting for transaction receipt. Tx:{:?} Error:{:?}", + transaction, + e + )) })? .ok_or_else(|| { backoff::Error::transient(anyhow!( - "Can't verify the reveal, probably dropped from mempool" + "Can't verify the reveal, probably dropped from mempool Tx:{:?}", + transaction )) })?; @@ -444,8 +464,7 @@ pub async fn process_event( .total_gas_spent .get_or_create(&AccountLabel { chain_id: chain_config.id.clone(), - address: contract - .client() + address: client .inner() .inner() .inner()