From 36c90e686472a1814b241091161eda2fff160de9 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Wed, 6 Dec 2023 11:35:08 +0000 Subject: [PATCH 1/3] Fix `_validateSignatures` NatSpec Documentation --- 4337/contracts/Safe4337Module.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4337/contracts/Safe4337Module.sol b/4337/contracts/Safe4337Module.sol index 72814591..a2f4fd50 100644 --- a/4337/contracts/Safe4337Module.sol +++ b/4337/contracts/Safe4337Module.sol @@ -167,7 +167,7 @@ contract Safe4337Module is IAccount, HandlerContext, CompatibilityFallbackHandle } /** - * @dev Validates that the user operation is correctly signed. Reverts if signatures are invalid. + * @dev Validates that the user operation is correctly signed and returns an ERC-4337 packed validation data. * @param userOp User operation struct. * @return validationData An integer indicating the result of the validation. */ From 8ed5b32101ecb25114fb036c4c198e2b83d5b4b2 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Wed, 6 Dec 2023 12:02:52 +0000 Subject: [PATCH 2/3] Details of packed validation data --- 4337/contracts/Safe4337Module.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/4337/contracts/Safe4337Module.sol b/4337/contracts/Safe4337Module.sol index a2f4fd50..b79f0b94 100644 --- a/4337/contracts/Safe4337Module.sol +++ b/4337/contracts/Safe4337Module.sol @@ -167,7 +167,11 @@ contract Safe4337Module is IAccount, HandlerContext, CompatibilityFallbackHandle } /** - * @dev Validates that the user operation is correctly signed and returns an ERC-4337 packed validation data. + * @dev Validates that the user operation is correctly signed and returns an ERC-4337 packed validation data + * of `validAfter || validUntil || authorizer`: + * - `authorizer`: 20-byte address, 0 for valid signature or 1 to mark signature failure (this module does not make use of signature aggregators). + * - `validUntil`: 6-byte timestamp value, or zero for “infinite”. The user operation is valid only up to this time. + * - `validAfter`: 6-byte timestamp. The user operation is valid only after this time. * @param userOp User operation struct. * @return validationData An integer indicating the result of the validation. */ From 43d9b6f85d9af40679f96fbd656f8d24140f18b4 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Wed, 6 Dec 2023 12:06:00 +0000 Subject: [PATCH 3/3] Use regular double quotes --- 4337/contracts/Safe4337Module.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4337/contracts/Safe4337Module.sol b/4337/contracts/Safe4337Module.sol index b79f0b94..37e732b7 100644 --- a/4337/contracts/Safe4337Module.sol +++ b/4337/contracts/Safe4337Module.sol @@ -170,7 +170,7 @@ contract Safe4337Module is IAccount, HandlerContext, CompatibilityFallbackHandle * @dev Validates that the user operation is correctly signed and returns an ERC-4337 packed validation data * of `validAfter || validUntil || authorizer`: * - `authorizer`: 20-byte address, 0 for valid signature or 1 to mark signature failure (this module does not make use of signature aggregators). - * - `validUntil`: 6-byte timestamp value, or zero for “infinite”. The user operation is valid only up to this time. + * - `validUntil`: 6-byte timestamp value, or zero for "infinite". The user operation is valid only up to this time. * - `validAfter`: 6-byte timestamp. The user operation is valid only after this time. * @param userOp User operation struct. * @return validationData An integer indicating the result of the validation.