@@ -12,10 +12,14 @@ contract TestAsyncDecrypt is E2EFHEVMConfig {
1212 euint8 xUint8;
1313 euint16 xUint16;
1414 euint32 xUint32;
15+ euint32 xUint32_2;
16+ euint32 xUint32_3;
1517 euint64 xUint64;
1618 euint64 xUint64_2;
1719 euint64 xUint64_3;
1820 euint128 xUint128;
21+ euint128 xUint128_2;
22+ euint128 xUint128_3;
1923 eaddress xAddress;
2024 eaddress xAddress2;
2125 euint256 xUint256;
@@ -25,10 +29,14 @@ contract TestAsyncDecrypt is E2EFHEVMConfig {
2529 uint8 public yUint8;
2630 uint16 public yUint16;
2731 uint32 public yUint32;
32+ uint32 public yUint32_2;
33+ uint32 public yUint32_3;
2834 uint64 public yUint64;
2935 uint64 public yUint64_2;
3036 uint64 public yUint64_3;
3137 uint128 public yUint128;
38+ uint128 public yUint128_2;
39+ uint128 public yUint128_3;
3240 address public yAddress;
3341 address public yAddress2;
3442 uint256 public yUint256;
@@ -44,13 +52,16 @@ contract TestAsyncDecrypt is E2EFHEVMConfig {
4452 /// @dev Initialize encrypted variables with sample values
4553 xBool = FHE.asEbool (true );
4654 FHE.allowThis (xBool);
47-
4855 xUint8 = FHE.asEuint8 (42 );
4956 FHE.allowThis (xUint8);
5057 xUint16 = FHE.asEuint16 (16 );
5158 FHE.allowThis (xUint16);
5259 xUint32 = FHE.asEuint32 (32 );
5360 FHE.allowThis (xUint32);
61+ xUint32_2 = FHE.asEuint32 (1000 );
62+ FHE.allowThis (xUint32_2);
63+ xUint32_3 = FHE.asEuint32 (2000 );
64+ FHE.allowThis (xUint32_3);
5465 xUint64 = FHE.asEuint64 (18446744073709551600 );
5566 FHE.allowThis (xUint64);
5667 xUint64_2 = FHE.asEuint64 (76575465786 );
@@ -59,6 +70,10 @@ contract TestAsyncDecrypt is E2EFHEVMConfig {
5970 FHE.allowThis (xUint64_3);
6071 xUint128 = FHE.asEuint128 (1267650600228229401496703205443 );
6172 FHE.allowThis (xUint128);
73+ xUint128_2 = FHE.asEuint128 (10000 );
74+ FHE.allowThis (xUint128_2);
75+ xUint128_3 = FHE.asEuint128 (20000 );
76+ FHE.allowThis (xUint128_3);
6277 xUint256 = FHE.asEuint256 (27606985387162255149739023449108101809804435888681546220650096895197251 );
6378 FHE.allowThis (xUint256);
6479 xAddress = FHE.asEaddress (0x8ba1f109551bD432803012645Ac136ddd64DBA72 );
@@ -200,6 +215,38 @@ contract TestAsyncDecrypt is E2EFHEVMConfig {
200215 }
201216 }
202217
218+ /// @notice Request decryption of a 32-bit unsigned integer
219+ function requestUint32_2 () public {
220+ bytes32 [] memory cts = new bytes32 [](1 );
221+ cts[0 ] = FHE.toBytes32 (xUint32_2);
222+ FHE.requestDecryption (cts, this .callbackUint32_2.selector );
223+ }
224+
225+ function callbackUint32_2 (
226+ uint256 requestID ,
227+ uint32 decryptedInput ,
228+ bytes [] memory signatures
229+ ) public {
230+ FHE.checkSignatures (requestID, signatures);
231+ yUint32_2 = decryptedInput;
232+ }
233+
234+ /// @notice Request decryption of a 32-bit unsigned integer
235+ function requestUint32_3 () public {
236+ bytes32 [] memory cts = new bytes32 [](1 );
237+ cts[0 ] = FHE.toBytes32 (xUint32_3);
238+ FHE.requestDecryption (cts, this .callbackUint32_3.selector );
239+ }
240+
241+ function callbackUint32_3 (
242+ uint256 requestID ,
243+ uint32 decryptedInput ,
244+ bytes [] memory signatures
245+ ) public {
246+ FHE.checkSignatures (requestID, signatures);
247+ yUint32_3 = decryptedInput;
248+ }
249+
203250 /// @notice Request decryption of a 64-bit unsigned integer
204251 function requestUint64 () public {
205252 bytes32 [] memory cts = new bytes32 [](1 );
@@ -261,6 +308,33 @@ contract TestAsyncDecrypt is E2EFHEVMConfig {
261308 return decryptedInput;
262309 }
263310
311+ function requestUint128_Many () public {
312+ bytes32 [] memory cts = new bytes32 [](1 );
313+ cts[0 ] = FHE.toBytes32 (xUint128_2);
314+ FHE.requestDecryption (cts, this .callbackUint128_2.selector );
315+ bytes32 [] memory cts_2 = new bytes32 [](1 );
316+ cts_2[0 ] = FHE.toBytes32 (xUint128_3);
317+ FHE.requestDecryption (cts_2, this .callbackUint128_3.selector );
318+ }
319+
320+ function callbackUint128_2 (
321+ uint256 requestID ,
322+ uint128 decryptedInput ,
323+ bytes [] memory signatures
324+ ) public {
325+ FHE.checkSignatures (requestID, signatures);
326+ yUint128_2 = decryptedInput;
327+ }
328+
329+ function callbackUint128_3 (
330+ uint256 requestID ,
331+ uint128 decryptedInput ,
332+ bytes [] memory signatures
333+ ) public {
334+ FHE.checkSignatures (requestID, signatures);
335+ yUint128_3 = decryptedInput;
336+ }
337+
264338 function requestUint256 () public {
265339 bytes32 [] memory cts = new bytes32 [](1 );
266340 cts[0 ] = FHE.toBytes32 (xUint256);
0 commit comments