@@ -414,19 +414,39 @@ pub async fn process_event(
414
414
)
415
415
. gas ( gas_estimate) ;
416
416
417
-
418
- let pending_tx = contract_call. send ( ) . await . map_err ( |e| {
419
- backoff:: Error :: transient ( anyhow ! ( "Error submitting the reveal transaction: {:?}" , e) )
420
- } ) ?;
417
+ let client = contract. client ( ) ;
418
+ let mut transaction = contract_call. tx . clone ( ) ;
419
+ // manually fill the tx with the gas info, so we can log the details in case of error
420
+ client
421
+ . fill_transaction ( & mut transaction, None )
422
+ . await
423
+ . map_err ( |e| {
424
+ backoff:: Error :: transient ( anyhow ! ( "Error filling the reveal transaction: {:?}" , e) )
425
+ } ) ?;
426
+ let pending_tx = client
427
+ . send_transaction ( transaction. clone ( ) , None )
428
+ . await
429
+ . map_err ( |e| {
430
+ backoff:: Error :: transient ( anyhow ! (
431
+ "Error submitting the reveal transaction. Tx:{:?}, Error:{:?}" ,
432
+ transaction,
433
+ e
434
+ ) )
435
+ } ) ?;
421
436
422
437
let receipt = pending_tx
423
438
. await
424
439
. map_err ( |e| {
425
- backoff:: Error :: transient ( anyhow ! ( "Error waiting for transaction receipt {:?}" , e) )
440
+ backoff:: Error :: transient ( anyhow ! (
441
+ "Error waiting for transaction receipt. Tx:{:?} Error:{:?}" ,
442
+ transaction,
443
+ e
444
+ ) )
426
445
} ) ?
427
446
. ok_or_else ( || {
428
447
backoff:: Error :: transient ( anyhow ! (
429
- "Can't verify the reveal, probably dropped from mempool"
448
+ "Can't verify the reveal, probably dropped from mempool Tx:{:?}" ,
449
+ transaction
430
450
) )
431
451
} ) ?;
432
452
@@ -444,8 +464,7 @@ pub async fn process_event(
444
464
. total_gas_spent
445
465
. get_or_create ( & AccountLabel {
446
466
chain_id : chain_config. id . clone ( ) ,
447
- address : contract
448
- . client ( )
467
+ address : client
449
468
. inner ( )
450
469
. inner ( )
451
470
. inner ( )
0 commit comments