1
1
use alloy:: primitives:: { Address , TxHash } ;
2
2
use alloy:: providers:: Provider ;
3
+ use alloy:: rpc:: types:: TransactionReceipt ;
3
4
use engine_core:: error:: { AlloyRpcErrorToEngineError , EngineError } ;
4
5
use engine_core:: {
5
6
chain:: { Chain , ChainService , RpcCredentials } ,
@@ -52,10 +53,8 @@ impl HasTransactionMetadata for Eip7702ConfirmationJobData {
52
53
pub struct Eip7702ConfirmationResult {
53
54
pub transaction_id : String ,
54
55
pub transaction_hash : TxHash ,
56
+ pub receipt : TransactionReceipt ,
55
57
pub eoa_address : Address ,
56
- pub block_number : Option < u64 > ,
57
- pub gas_used : Option < u64 > ,
58
- pub status : bool ,
59
58
}
60
59
61
60
// --- Error Types ---
@@ -84,7 +83,10 @@ pub enum Eip7702ConfirmationError {
84
83
} ,
85
84
86
85
#[ error( "Transaction failed: {message}" ) ]
87
- TransactionFailed { message : String } ,
86
+ TransactionFailed {
87
+ message : String ,
88
+ receipt : TransactionReceipt ,
89
+ } ,
88
90
89
91
#[ error( "Invalid RPC Credentials: {message}" ) ]
90
92
InvalidRpcCredentials { message : String } ,
@@ -239,6 +241,7 @@ where
239
241
if !success {
240
242
return Err ( Eip7702ConfirmationError :: TransactionFailed {
241
243
message : "Transaction reverted" . to_string ( ) ,
244
+ receipt,
242
245
} )
243
246
. map_err_fail ( ) ;
244
247
}
@@ -253,10 +256,8 @@ where
253
256
Ok ( Eip7702ConfirmationResult {
254
257
transaction_id : job_data. transaction_id . clone ( ) ,
255
258
transaction_hash,
259
+ receipt,
256
260
eoa_address : job_data. eoa_address ,
257
- block_number : receipt. block_number ,
258
- gas_used : Some ( receipt. gas_used ) ,
259
- status : success,
260
261
} )
261
262
}
262
263
0 commit comments