Skip to content

Commit ca819e0

Browse files
authored
[FIX] Add uint256 cast in allowPublic functions (#49)
1 parent c6ad9ab commit ca819e0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

contracts/FHE.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,49 +3051,49 @@ library FHE {
30513051
/// @dev Allows all accounts to access the ciphertext
30523052
/// @param ctHash The encrypted boolean value to grant public access to
30533053
function allowPublic(ebool ctHash) internal {
3054-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(ebool.unwrap(ctHash));
3054+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(ebool.unwrap(ctHash)));
30553055
}
30563056

30573057
/// @notice Grants public permission to operate on the encrypted 8-bit unsigned integer
30583058
/// @dev Allows all accounts to access the ciphertext
30593059
/// @param ctHash The encrypted uint8 value to grant public access to
30603060
function allowPublic(euint8 ctHash) internal {
3061-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(euint8.unwrap(ctHash));
3061+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(euint8.unwrap(ctHash)));
30623062
}
30633063

30643064
/// @notice Grants public permission to operate on the encrypted 16-bit unsigned integer
30653065
/// @dev Allows all accounts to access the ciphertext
30663066
/// @param ctHash The encrypted uint16 value to grant public access to
30673067
function allowPublic(euint16 ctHash) internal {
3068-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(euint16.unwrap(ctHash));
3068+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(euint16.unwrap(ctHash)));
30693069
}
30703070

30713071
/// @notice Grants public permission to operate on the encrypted 32-bit unsigned integer
30723072
/// @dev Allows all accounts to access the ciphertext
30733073
/// @param ctHash The encrypted uint32 value to grant public access to
30743074
function allowPublic(euint32 ctHash) internal {
3075-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(euint32.unwrap(ctHash));
3075+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(euint32.unwrap(ctHash)));
30763076
}
30773077

30783078
/// @notice Grants public permission to operate on the encrypted 64-bit unsigned integer
30793079
/// @dev Allows all accounts to access the ciphertext
30803080
/// @param ctHash The encrypted uint64 value to grant public access to
30813081
function allowPublic(euint64 ctHash) internal {
3082-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(euint64.unwrap(ctHash));
3082+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(euint64.unwrap(ctHash)));
30833083
}
30843084

30853085
/// @notice Grants public permission to operate on the encrypted 128-bit unsigned integer
30863086
/// @dev Allows all accounts to access the ciphertext
30873087
/// @param ctHash The encrypted uint128 value to grant public access to
30883088
function allowPublic(euint128 ctHash) internal {
3089-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(euint128.unwrap(ctHash));
3089+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(euint128.unwrap(ctHash)));
30903090
}
30913091

30923092
/// @notice Grants public permission to operate on the encrypted address
30933093
/// @dev Allows all accounts to access the ciphertext
30943094
/// @param ctHash The encrypted address value to grant public access to
30953095
function allowPublic(eaddress ctHash) internal {
3096-
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(eaddress.unwrap(ctHash));
3096+
ITaskManager(TASK_MANAGER_ADDRESS).allowGlobal(uint256(eaddress.unwrap(ctHash)));
30973097
}
30983098

30993099
/// @notice Checks if an account has permission to operate on the encrypted boolean value

0 commit comments

Comments
 (0)