File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,7 @@ impl CallGasEstimatorSpecialization for CallGasEstimatorSpecializationV06 {
433
433
434
434
fn get_op_with_no_call_gas ( & self , op : Self :: UO ) -> Self :: UO {
435
435
UserOperationBuilder :: from_uo ( op, & self . chain_spec )
436
+ . clear_paymaster ( )
436
437
. call_gas_limit ( 0 )
437
438
. max_fee_per_gas ( 0 )
438
439
. build ( )
Original file line number Diff line number Diff line change @@ -508,6 +508,7 @@ impl CallGasEstimatorSpecialization for CallGasEstimatorSpecializationV07 {
508
508
509
509
fn get_op_with_no_call_gas ( & self , op : Self :: UO ) -> Self :: UO {
510
510
UserOperationBuilder :: from_uo ( op, & self . chain_spec )
511
+ . clear_paymaster ( )
511
512
. call_gas_limit ( 0 )
512
513
. max_fee_per_gas ( 0 )
513
514
. build ( )
Original file line number Diff line number Diff line change @@ -884,6 +884,12 @@ impl<'a> UserOperationBuilder<'a> {
884
884
self
885
885
}
886
886
887
+ /// Clears the paymaster and data
888
+ pub fn clear_paymaster ( mut self ) -> Self {
889
+ self . required . paymaster_and_data = Bytes :: new ( ) ;
890
+ self
891
+ }
892
+
887
893
/// Build the user operation
888
894
pub fn build ( self ) -> UserOperation {
889
895
let mut uo = UserOperation {
Original file line number Diff line number Diff line change @@ -900,6 +900,15 @@ impl<'a> UserOperationBuilder<'a> {
900
900
self
901
901
}
902
902
903
+ /// Clears the paymaster and associated fields
904
+ pub fn clear_paymaster ( mut self ) -> Self {
905
+ self . paymaster = None ;
906
+ self . paymaster_verification_gas_limit = 0 ;
907
+ self . paymaster_post_op_gas_limit = 0 ;
908
+ self . paymaster_data = Bytes :: new ( ) ;
909
+ self
910
+ }
911
+
903
912
/// Sets the pre-verification gas
904
913
pub fn pre_verification_gas ( mut self , pre_verification_gas : u128 ) -> Self {
905
914
self . required . pre_verification_gas = pre_verification_gas;
You can’t perform that action at this time.
0 commit comments