@@ -6,12 +6,13 @@ use alloy::{
66 providers:: Provider ,
77 rpc:: types:: { PackedUserOperation , UserOperation } ,
88} ;
9+ use engine_aa_types:: VersionedUserOp ;
910use engine_core:: {
1011 chain:: Chain ,
1112 credentials:: SigningCredential ,
1213 error:: { AlloyRpcErrorToEngineError , EngineError } ,
1314 execution_options:: aa:: { EntrypointAndFactoryDetails , EntrypointVersion } ,
14- userop:: { UserOpSigner , UserOpSignerParams , UserOpVersion } ,
15+ userop:: { UserOpSigner , UserOpSignerParams } ,
1516} ;
1617
1718pub struct UserOpBuilderConfig < ' a , C : Chain > {
@@ -40,7 +41,7 @@ impl<'a, C: Chain> UserOpBuilder<'a, C> {
4041 Self { config }
4142 }
4243
43- pub async fn build ( self ) -> Result < UserOpVersion , EngineError > {
44+ pub async fn build ( self ) -> Result < VersionedUserOp , EngineError > {
4445 let mut userop = match self . config . entrypoint_and_factory . version {
4546 EntrypointVersion :: V0_6 => UserOpBuilderV0_6 :: new ( & self . config ) . build ( ) . await ?,
4647 EntrypointVersion :: V0_7 => UserOpBuilderV0_7 :: new ( & self . config ) . build ( ) . await ?,
@@ -61,10 +62,10 @@ impl<'a, C: Chain> UserOpBuilder<'a, C> {
6162 . await ?;
6263
6364 match & mut userop {
64- UserOpVersion :: V0_6 ( userop) => {
65+ VersionedUserOp :: V0_6 ( userop) => {
6566 userop. signature = signature;
6667 }
67- UserOpVersion :: V0_7 ( userop) => {
68+ VersionedUserOp :: V0_7 ( userop) => {
6869 userop. signature = signature;
6970 }
7071 }
@@ -114,7 +115,7 @@ impl<'a, C: Chain> UserOpBuilderV0_6<'a, C> {
114115 }
115116 }
116117
117- async fn build ( mut self ) -> Result < UserOpVersion , EngineError > {
118+ async fn build ( mut self ) -> Result < VersionedUserOp , EngineError > {
118119 let prices = self
119120 . chain
120121 . provider ( )
@@ -153,7 +154,7 @@ impl<'a, C: Chain> UserOpBuilderV0_6<'a, C> {
153154 . chain
154155 . bundler_client ( )
155156 . estimate_user_op_gas (
156- & UserOpVersion :: V0_6 ( self . userop . clone ( ) ) ,
157+ & VersionedUserOp :: V0_6 ( self . userop . clone ( ) ) ,
157158 self . entrypoint ,
158159 None ,
159160 )
@@ -172,7 +173,7 @@ impl<'a, C: Chain> UserOpBuilderV0_6<'a, C> {
172173 self . userop . verification_gas_limit = verification_gas_limit;
173174 self . userop . pre_verification_gas = pre_verification_gas;
174175
175- Ok ( UserOpVersion :: V0_6 ( self . userop ) )
176+ Ok ( VersionedUserOp :: V0_6 ( self . userop ) )
176177 }
177178}
178179
@@ -219,7 +220,7 @@ impl<'a, C: Chain> UserOpBuilderV0_7<'a, C> {
219220 }
220221 }
221222
222- async fn build ( mut self ) -> Result < UserOpVersion , EngineError > {
223+ async fn build ( mut self ) -> Result < VersionedUserOp , EngineError > {
223224 // Get gas prices, same as v0.6
224225 let prices = self
225226 . chain
@@ -272,7 +273,7 @@ impl<'a, C: Chain> UserOpBuilderV0_7<'a, C> {
272273 . chain
273274 . bundler_client ( )
274275 . estimate_user_op_gas (
275- & UserOpVersion :: V0_7 ( self . userop . clone ( ) ) ,
276+ & VersionedUserOp :: V0_7 ( self . userop . clone ( ) ) ,
276277 self . entrypoint ,
277278 None ,
278279 )
@@ -300,6 +301,6 @@ impl<'a, C: Chain> UserOpBuilderV0_7<'a, C> {
300301 self . userop . paymaster_verification_gas_limit = Some ( paymaster_verification_gas_limit) ;
301302 self . userop . paymaster_post_op_gas_limit = Some ( paymaster_post_op_gas_limit) ;
302303
303- Ok ( UserOpVersion :: V0_7 ( self . userop ) )
304+ Ok ( VersionedUserOp :: V0_7 ( self . userop ) )
304305 }
305306}
0 commit comments