diff --git a/crates/mempool/src/uopool.rs b/crates/mempool/src/uopool.rs index 63206b44..8664d54e 100644 --- a/crates/mempool/src/uopool.rs +++ b/crates/mempool/src/uopool.rs @@ -454,9 +454,12 @@ impl UoPool { &self, uo: &UserOperation, ) -> Result { - let pre_verification_gas = Overhead::default() - .calculate_pre_verification_gas(uo) - .saturating_add(PRE_VERIFICATION_SAFE_RESERVE.into()); + let pre_verification_gas = div_ceil( + Overhead::default().calculate_pre_verification_gas(uo).saturating_mul( + U256::from(100).saturating_add(PRE_VERIFICATION_SAFE_RESERVE_PERC.into()), + ), + U256::from(100), + ); let (verification_gas_limit, call_gas_limit) = match self.mode { UoPoolMode::Standard => estimate_user_op_gas(&uo.user_operation, &self.entry_point) @@ -529,13 +532,6 @@ impl UoPool { } }; - let pre_verification_gas = div_ceil( - Overhead::default().calculate_pre_verification_gas(uo).saturating_mul( - U256::from(100).saturating_add(PRE_VERIFICATION_SAFE_RESERVE_PERC.into()), - ), - U256::from(100), - ); - Ok(UserOperationGasEstimation { pre_verification_gas, verification_gas_limit,