@@ -70,8 +70,8 @@ contract ACL is
7070 uint256 expirationDate
7171 );
7272
73- /// @notice Returned if the requested expiration date for user decryption delegation is before the next hour .
74- error ExpirationDateBeforeOneHour ();
73+ /// @notice Returned if the requested expiration date for user decryption delegation is in the past .
74+ error ExpirationDateInThePast ();
7575
7676 /// @notice Returned if the handlesList array is empty.
7777 error HandlesListIsEmpty ();
@@ -143,7 +143,7 @@ contract ACL is
143143 uint256 private constant MAJOR_VERSION = 0 ;
144144
145145 /// @notice Minor version of the contract.
146- uint256 private constant MINOR_VERSION = 2 ;
146+ uint256 private constant MINOR_VERSION = 3 ;
147147
148148 /// @notice Patch version of the contract.
149149 uint256 private constant PATCH_VERSION = 0 ;
@@ -156,7 +156,7 @@ contract ACL is
156156
157157 /// Constant used for making sure the version number used in the `reinitializer` modifier is
158158 /// identical between `initializeFromEmptyProxy` and the `reinitializeVX` method
159- uint64 private constant REINITIALIZER_VERSION = 3 ;
159+ uint64 private constant REINITIALIZER_VERSION = 4 ;
160160
161161 /// keccak256(abi.encode(uint256(keccak256("fhevm.storage.ACL")) - 1)) & ~bytes32(uint256(0xff))
162162 bytes32 private constant ACLStorageLocation = 0xa688f31953c2015baaf8c0a488ee1ee22eb0e05273cc1fd31ea4cbee42febc00 ;
@@ -176,11 +176,11 @@ contract ACL is
176176 }
177177
178178 /**
179- * @notice Re-initializes the contract from V1 .
179+ * @notice Re-initializes the contract from V2 .
180180 */
181181 /// @custom:oz-upgrades-unsafe-allow missing-initializer-call
182182 /// @custom:oz-upgrades-validate-as-initializer
183- function reinitializeV2 () public virtual reinitializer (REINITIALIZER_VERSION) {}
183+ function reinitializeV3 () public virtual reinitializer (REINITIALIZER_VERSION) {}
184184
185185 /**
186186 * @notice Allows the use of `handle` for the address `account`.
@@ -290,6 +290,9 @@ contract ACL is
290290 if (delegate == contractAddress) {
291291 revert DelegateCannotBeContractAddress (contractAddress);
292292 }
293+ if (expirationDate <= block .timestamp ) {
294+ revert ExpirationDateInThePast ();
295+ }
293296
294297 uint64 oldExpirationDate = userDecryptionDelegation.expirationDate;
295298 uint64 newExpirationDate = expirationDate;
0 commit comments