@@ -674,7 +674,7 @@ contract FHEVMExecutor is UUPSUpgradeableEmptyProxy, FHEEvents, ACLOwnable {
674674
675675 /// @dev It must not cast to same type.
676676 if (typeCt == toType) revert InvalidType ();
677- result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, Operators.cast, ct, toType, acl, block .chainid ));
677+ result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, Operators.cast, ct, toType, acl, block .chainid , blockhash ( block . number - 1 ) ));
678678 result = _appendMetadataToPrehandle (result, toType);
679679 hcuLimit.checkHCUForCast (toType, ct, result, msg .sender );
680680 acl.allowTransient (result, msg .sender );
@@ -698,7 +698,7 @@ contract FHEVMExecutor is UUPSUpgradeableEmptyProxy, FHEEvents, ACLOwnable {
698698 (1 << uint8 (FheType.Uint256));
699699
700700 if ((1 << uint8 (toType)) & supportedTypes == 0 ) revert UnsupportedType ();
701- result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, Operators.trivialEncrypt, pt, toType, acl, block .chainid ));
701+ result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, Operators.trivialEncrypt, pt, toType, acl, block .chainid , blockhash ( block . number - 1 ) ));
702702 result = _appendMetadataToPrehandle (result, toType);
703703 hcuLimit.checkHCUForTrivialEncrypt (toType, result, msg .sender );
704704 acl.allowTransient (result, msg .sender );
@@ -815,7 +815,7 @@ contract FHEVMExecutor is UUPSUpgradeableEmptyProxy, FHEEvents, ACLOwnable {
815815
816816 function _unaryOp (Operators op , bytes32 ct ) internal virtual returns (bytes32 result ) {
817817 if (! acl.isAllowed (ct, msg .sender )) revert ACLNotAllowed (ct, msg .sender );
818- result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, op, ct, acl, block .chainid ));
818+ result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, op, ct, acl, block .chainid , blockhash ( block . number - 1 ) ));
819819 FheType typeCt = _typeOf (ct);
820820 result = _appendMetadataToPrehandle (result, typeCt);
821821 acl.allowTransient (result, msg .sender );
@@ -839,7 +839,7 @@ contract FHEVMExecutor is UUPSUpgradeableEmptyProxy, FHEEvents, ACLOwnable {
839839 FheType lhsType = _typeOf (lhs);
840840 if (lhsType != rhsType) revert IncompatibleTypes ();
841841 }
842- result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, op, lhs, rhs, scalar, acl, block .chainid ));
842+ result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, op, lhs, rhs, scalar, acl, block .chainid , blockhash ( block . number - 1 ) ));
843843 result = _appendMetadataToPrehandle (result, resultType);
844844 acl.allowTransient (result, msg .sender );
845845 }
@@ -862,7 +862,7 @@ contract FHEVMExecutor is UUPSUpgradeableEmptyProxy, FHEEvents, ACLOwnable {
862862 if (lhsType != FheType.Bool) revert UnsupportedType ();
863863 if (middleType != rhsType) revert IncompatibleTypes ();
864864
865- result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, op, lhs, middle, rhs, acl, block .chainid ));
865+ result = keccak256 (abi.encodePacked (COMPUTATION_DOMAIN_SEPARATOR, op, lhs, middle, rhs, acl, block .chainid , blockhash ( block . number - 1 ) ));
866866 result = _appendMetadataToPrehandle (result, middleType);
867867 acl.allowTransient (result, msg .sender );
868868 }
0 commit comments