@@ -6,12 +6,13 @@ use alloy::{
6
6
providers:: Provider ,
7
7
rpc:: types:: { PackedUserOperation , UserOperation } ,
8
8
} ;
9
+ use engine_aa_types:: VersionedUserOp ;
9
10
use engine_core:: {
10
11
chain:: Chain ,
11
12
credentials:: SigningCredential ,
12
13
error:: { AlloyRpcErrorToEngineError , EngineError } ,
13
14
execution_options:: aa:: { EntrypointAndFactoryDetails , EntrypointVersion } ,
14
- userop:: { UserOpSigner , UserOpSignerParams , UserOpVersion } ,
15
+ userop:: { UserOpSigner , UserOpSignerParams } ,
15
16
} ;
16
17
17
18
pub struct UserOpBuilderConfig < ' a , C : Chain > {
@@ -40,7 +41,7 @@ impl<'a, C: Chain> UserOpBuilder<'a, C> {
40
41
Self { config }
41
42
}
42
43
43
- pub async fn build ( self ) -> Result < UserOpVersion , EngineError > {
44
+ pub async fn build ( self ) -> Result < VersionedUserOp , EngineError > {
44
45
let mut userop = match self . config . entrypoint_and_factory . version {
45
46
EntrypointVersion :: V0_6 => UserOpBuilderV0_6 :: new ( & self . config ) . build ( ) . await ?,
46
47
EntrypointVersion :: V0_7 => UserOpBuilderV0_7 :: new ( & self . config ) . build ( ) . await ?,
@@ -61,10 +62,10 @@ impl<'a, C: Chain> UserOpBuilder<'a, C> {
61
62
. await ?;
62
63
63
64
match & mut userop {
64
- UserOpVersion :: V0_6 ( userop) => {
65
+ VersionedUserOp :: V0_6 ( userop) => {
65
66
userop. signature = signature;
66
67
}
67
- UserOpVersion :: V0_7 ( userop) => {
68
+ VersionedUserOp :: V0_7 ( userop) => {
68
69
userop. signature = signature;
69
70
}
70
71
}
@@ -114,7 +115,7 @@ impl<'a, C: Chain> UserOpBuilderV0_6<'a, C> {
114
115
}
115
116
}
116
117
117
- async fn build ( mut self ) -> Result < UserOpVersion , EngineError > {
118
+ async fn build ( mut self ) -> Result < VersionedUserOp , EngineError > {
118
119
let prices = self
119
120
. chain
120
121
. provider ( )
@@ -153,7 +154,7 @@ impl<'a, C: Chain> UserOpBuilderV0_6<'a, C> {
153
154
. chain
154
155
. bundler_client ( )
155
156
. estimate_user_op_gas (
156
- & UserOpVersion :: V0_6 ( self . userop . clone ( ) ) ,
157
+ & VersionedUserOp :: V0_6 ( self . userop . clone ( ) ) ,
157
158
self . entrypoint ,
158
159
None ,
159
160
)
@@ -172,7 +173,7 @@ impl<'a, C: Chain> UserOpBuilderV0_6<'a, C> {
172
173
self . userop . verification_gas_limit = verification_gas_limit;
173
174
self . userop . pre_verification_gas = pre_verification_gas;
174
175
175
- Ok ( UserOpVersion :: V0_6 ( self . userop ) )
176
+ Ok ( VersionedUserOp :: V0_6 ( self . userop ) )
176
177
}
177
178
}
178
179
@@ -219,7 +220,7 @@ impl<'a, C: Chain> UserOpBuilderV0_7<'a, C> {
219
220
}
220
221
}
221
222
222
- async fn build ( mut self ) -> Result < UserOpVersion , EngineError > {
223
+ async fn build ( mut self ) -> Result < VersionedUserOp , EngineError > {
223
224
// Get gas prices, same as v0.6
224
225
let prices = self
225
226
. chain
@@ -272,7 +273,7 @@ impl<'a, C: Chain> UserOpBuilderV0_7<'a, C> {
272
273
. chain
273
274
. bundler_client ( )
274
275
. estimate_user_op_gas (
275
- & UserOpVersion :: V0_7 ( self . userop . clone ( ) ) ,
276
+ & VersionedUserOp :: V0_7 ( self . userop . clone ( ) ) ,
276
277
self . entrypoint ,
277
278
None ,
278
279
)
@@ -300,6 +301,6 @@ impl<'a, C: Chain> UserOpBuilderV0_7<'a, C> {
300
301
self . userop . paymaster_verification_gas_limit = Some ( paymaster_verification_gas_limit) ;
301
302
self . userop . paymaster_post_op_gas_limit = Some ( paymaster_post_op_gas_limit) ;
302
303
303
- Ok ( UserOpVersion :: V0_7 ( self . userop ) )
304
+ Ok ( VersionedUserOp :: V0_7 ( self . userop ) )
304
305
}
305
306
}
0 commit comments