@@ -36,6 +36,9 @@ use crate::{
3636
3737use super :: confirm:: { Eip7702ConfirmationHandler , Eip7702ConfirmationJobData } ;
3838
39+ const EIP7702_SEND_QUEUE_ID : & str = "eip7702_send" ;
40+ const EIP7702_CONFIRM_QUEUE_ID : & str = "eip7702_confirm" ;
41+
3942// --- Job Payload ---
4043#[ derive( Serialize , Deserialize , Debug , Clone ) ]
4144#[ serde( rename_all = "camelCase" ) ]
@@ -175,7 +178,7 @@ where
175178 type ErrorData = Eip7702SendError ;
176179 type JobData = Eip7702SendJobData ;
177180
178- #[ tracing:: instrument( skip( self , job) , fields( transaction_id = job. job. id, stage = Self :: stage_name( ) , executor = Self :: executor_name( ) ) ) ]
181+ #[ tracing:: instrument( skip( self , job) , fields( transaction_id = job. job. id, chain_id = job . job . data . chain_id , client_id = ?job . job . data . rpc_credentials . client_id_for_logs ( ) , queue_id = EIP7702_SEND_QUEUE_ID , stage = Self :: stage_name( ) , executor = Self :: executor_name( ) ) ) ]
179182 async fn process (
180183 & self ,
181184 job : & BorrowedJob < Self :: JobData > ,
@@ -386,7 +389,15 @@ where
386389
387390 if let Err ( e) = tx. queue_job ( confirmation_job) {
388391 tracing:: error!(
389- transaction_id = job. job. data. transaction_id,
392+ transaction_id = %job. job. data. transaction_id,
393+ chain_id = job. job. data. chain_id,
394+ client_id = job
395+ . job
396+ . data
397+ . rpc_credentials
398+ . client_id_for_logs( )
399+ . unwrap_or( "unknown" ) ,
400+ queue_id = EIP7702_CONFIRM_QUEUE_ID ,
390401 error = ?e,
391402 "Failed to enqueue confirmation job"
392403 ) ;
@@ -395,7 +406,15 @@ where
395406 // Send webhook
396407 if let Err ( e) = self . queue_success_webhook ( job, success_data, tx) {
397408 tracing:: error!(
398- transaction_id = job. job. data. transaction_id,
409+ transaction_id = %job. job. data. transaction_id,
410+ chain_id = job. job. data. chain_id,
411+ client_id = job
412+ . job
413+ . data
414+ . rpc_credentials
415+ . client_id_for_logs( )
416+ . unwrap_or( "unknown" ) ,
417+ queue_id = EIP7702_SEND_QUEUE_ID ,
399418 error = ?e,
400419 "Failed to queue success webhook"
401420 ) ;
@@ -411,7 +430,15 @@ where
411430 // Don't modify transaction registry on NACK - job will be retried
412431 if let Err ( e) = self . queue_nack_webhook ( job, nack_data, tx) {
413432 tracing:: error!(
414- transaction_id = job. job. data. transaction_id,
433+ transaction_id = %job. job. data. transaction_id,
434+ chain_id = job. job. data. chain_id,
435+ client_id = job
436+ . job
437+ . data
438+ . rpc_credentials
439+ . client_id_for_logs( )
440+ . unwrap_or( "unknown" ) ,
441+ queue_id = EIP7702_SEND_QUEUE_ID ,
415442 error = ?e,
416443 "Failed to queue nack webhook"
417444 ) ;
@@ -429,14 +456,30 @@ where
429456 . add_remove_command ( tx. pipeline ( ) , & job. job . data . transaction_id ) ;
430457
431458 tracing:: error!(
432- transaction_id = job. job. data. transaction_id,
459+ transaction_id = %job. job. data. transaction_id,
460+ chain_id = job. job. data. chain_id,
461+ client_id = job
462+ . job
463+ . data
464+ . rpc_credentials
465+ . client_id_for_logs( )
466+ . unwrap_or( "unknown" ) ,
467+ queue_id = EIP7702_SEND_QUEUE_ID ,
433468 error = ?fail_data. error,
434469 "EIP-7702 send job failed"
435470 ) ;
436471
437472 if let Err ( e) = self . queue_fail_webhook ( job, fail_data, tx) {
438473 tracing:: error!(
439- transaction_id = job. job. data. transaction_id,
474+ transaction_id = %job. job. data. transaction_id,
475+ chain_id = job. job. data. chain_id,
476+ client_id = job
477+ . job
478+ . data
479+ . rpc_credentials
480+ . client_id_for_logs( )
481+ . unwrap_or( "unknown" ) ,
482+ queue_id = EIP7702_SEND_QUEUE_ID ,
440483 error = ?e,
441484 "Failed to queue fail webhook"
442485 ) ;
0 commit comments