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

Validates userOperation.

Inputs

  • userOp

    • Control: Full.

    • Constraints: N/A.

    • Impact: User Operation to be validated.

  • 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.

Branches and code coverage (including function calls)

Intended branches

  • Function is successfully invoked.

Negative behavior

  • Function reverts with SIG_VALIDATION_FAILED.

  • Should revert with wrong session key data.

  • Should revert with the wrong session validation module address.

  • Should revert if session key is already expired.

  • Should revert if session key is not yet valid.

  • Should revert with wrong validAfter.

  • Should revert with wrong validUntil.

  • Should revert if signed with the session key that is not in the Merkle tree.

Function call analysis

  • rootFunction -> _getSessionData(address)

    • What is controllable?: N/A.

    • If return value controllable, how is it used and how can it go wrong?: N/A.

    • What happens if it reverts, reenters, or does other unusual control flow?: N/A.

  • rootFunction -> validateSessionKey(address, uint48, uint48, address, byte[], byte[32][])

    • What is controllable?: userOp.

    • If return value controllable, how is it used and how can it go wrong?: N/A.

    • What happens if it reverts, reenters, or does other unusual control flow?: N/A.

  • rootFunction -> _packValidationData(bool, unit48, uint48)

    • What is controllable?: userOp and userOpHash.

    • If return value controllable, how is it used and how can it go wrong?: True for signature failure, false for success.

    • What happens if it reverts, reenters, or does other unusual control flow?: N/A.

Zellic © 2024Back to top ↑