Function: validateUserOp(UserOperation userOp, byte[32] userOpHash)

Validates userOperation.

Inputs

  • userOp

    • Control: Full.

    • Constraints: Needs to contain valid selector.

    • Impact: User Operation to be validated. If invalid, the function will revert or return a failure code.

  • userOpHash

    • Control: Full.

    • Constraints: Must be a valid 32-byte--hash representation of the corresponding userOp.

    • Impact: Hash of the User Operation to be validated. Acts as a unique identifier or checksum of the User Operation.

Branches and code coverage (including function calls)

Intended branches

  • Function returns SIG_VALIDATION_SUCCESS for a valid UserOp and valid userOpHash.

  • Function returns SIG_VALIDATION_FAILED if the userOp was signed with an improper session key.

Negative behavior

  • Function reverts when userOp.sender is an unregistered smart contract.

  • Function reverts when the length of user.signature is less than 65.

Zellic © 2023Back to top ↑