Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IERC7579Validator

Inherits: IERC7579Module

ERC-7579 Validation module (type 1). A module that implements logic to validate user operations and signatures.

Functions

validateUserOp

Validates a UserOperation

function validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash) external returns (uint256);

Parameters

NameTypeDescription
userOpPackedUserOperationthe ERC-4337 PackedUserOperation
userOpHashbytes32the hash of the ERC-4337 PackedUserOperation MUST validate that the signature is a valid signature of the userOpHash SHOULD return ERC-4337's SIG_VALIDATION_FAILED (and not revert) on signature mismatch See {IAccount-validateUserOp} for additional information on the return value

isValidSignatureWithSender

Validates a signature using ERC-1271

function isValidSignatureWithSender(address sender, bytes32 hash, bytes calldata signature)
    external
    view
    returns (bytes4);

Parameters

NameTypeDescription
senderaddressthe address that sent the ERC-1271 request to the smart account
hashbytes32the hash of the ERC-1271 request
signaturebytesthe signature of the ERC-1271 request MUST return the ERC-1271 MAGIC_VALUE if the signature is valid MUST NOT modify state