Function: _validatePaymasterUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 requiredPreFund)
This function is used to verify that the UserOperation's Paymaster data were signed by the external signer.
Inputs
userOpControl: Fully controlled by user.
Constraints: All fields are used in signature validation and thus must be valid.
Impact: This is the
UserOperationbeing validated.
requiredPreFundControl: Partially controlled by user.
Constraints: Must be sufficient to pay for the gas fees for this user operation.
Impact: This is the required amount of prefunding for the Paymaster, calculated using the
userOpargument.
Branches and code coverage (including function calls)
Intended branches
Succeeds with valid gas limit,
userOp, andrequiredPrefund.
Negative behavior
Invalid signature causes error to be returned.
Insufficient
requiredPrefundcauses revert.Insufficient
userOp.verificationGasLimitcauses revert.Parsing invalid Paymaster data causes revert.