@inco/lightning 0.6.0 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/manifest.yaml +23 -0
- package/package.json +1 -1
- package/src/DeployUtils.sol +1 -1
- package/src/Errors.sol +1 -1
- package/src/Lib.alphanet.sol +25 -4
- package/src/Lib.demonet.sol +24 -3
- package/src/Lib.devnet.sol +24 -3
- package/src/Lib.sol +25 -4
- package/src/Lib.template.sol +97 -20
- package/src/Lib.testnet.sol +24 -3
- package/src/libs/incoLightning_alphanet_v0_297966649.sol +24 -3
- package/src/libs/incoLightning_alphanet_v1_725458969.sol +478 -0
- package/src/libs/incoLightning_demonet_v0_863421733.sol +24 -3
- package/src/libs/incoLightning_devnet_v0_340846814.sol +24 -3
- package/src/libs/incoLightning_devnet_v1_904635675.sol +24 -3
- package/src/libs/incoLightning_testnet_v0_183408998.sol +24 -3
- package/src/lightning-parts/AccessControl/test/TestAdvancedAccessControl.t.sol +1 -1
- package/src/lightning-parts/EncryptedInput.sol +52 -16
- package/src/lightning-parts/EncryptedOperations.sol +86 -90
- package/src/lightning-parts/TEELifecycle.sol +153 -66
- package/src/lightning-parts/TEELifecycle.types.sol +7 -0
- package/src/lightning-parts/interfaces/ITEELifecycle.sol +13 -2
- package/src/lightning-parts/primitives/HandleGeneration.sol +23 -57
- package/src/lightning-parts/primitives/interfaces/IHandleGeneration.sol +3 -34
- package/src/lightning-parts/test/HandleMetadata.t.sol +41 -4
- package/src/lightning-parts/test/InputsFee.t.sol +14 -21
- package/src/lightning-parts/test/TestDecryptionAttestationInSynchronousFlow.t.sol +6 -2
- package/src/shared/IOwnable.sol +10 -0
- package/src/shared/IUUPSUpgradable.sol +10 -0
- package/src/shared/JsonUtils.sol +16 -0
- package/src/shared/TestUtils.sol +50 -0
- package/src/shared/TypeUtils.sol +12 -0
- package/src/test/FakeIncoInfra/FakeComputeServer.sol +1 -1
- package/src/test/FakeIncoInfra/FakeDecryptionAttester.sol +36 -34
- package/src/test/FakeIncoInfra/FakeIncoInfraBase.sol +33 -18
- package/src/test/FakeIncoInfra/KVStore.sol +1 -1
- package/src/test/FakeIncoInfra/MockOpHandler.sol +5 -5
- package/src/test/FakeIncoInfra/MockRemoteAttestation.sol +1 -1
- package/src/test/IncoTest.sol +3 -3
- package/src/test/TEELifecycle/TEELifecycleMockTest.t.sol +73 -20
- package/src/test/TestAddTwo.t.sol +1 -1
- package/src/test/TestFakeInfra.t.sol +13 -3
- package/src/version/IncoLightningConfig.sol +4 -2
- package/src/version/Version.sol +4 -0
- package/src/version/interfaces/IVersion.sol +1 -0
package/CHANGELOG.md
CHANGED
package/manifest.yaml
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
incoLightning_alphanet_v1_725458969:
|
|
2
|
+
executor:
|
|
3
|
+
name: incoLightning_alphanet_v1_725458969
|
|
4
|
+
majorVersion: 1
|
|
5
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
6
|
+
pepper: alphanet
|
|
7
|
+
executorAddress: "0x28676Cd3b10b03b2FDF105Ba280425b45a674F2A"
|
|
8
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc004dfbe338c6966a22bcca19"
|
|
9
|
+
deployments:
|
|
10
|
+
- name: incoLightningPreview_1_0_2__725458969
|
|
11
|
+
chainId: "84532"
|
|
12
|
+
chainName: Base Sepolia
|
|
13
|
+
version:
|
|
14
|
+
major: 1
|
|
15
|
+
minor: 0
|
|
16
|
+
patch: 2
|
|
17
|
+
shortSalt: "725458969"
|
|
18
|
+
decryptSigner: "0x4736F8CE685760017eEc130AC3FFc6187f5A1F95"
|
|
19
|
+
eciesPublicKey: "0x038a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b84095b1"
|
|
20
|
+
blockNumber: "32124925"
|
|
21
|
+
deployDate: 2025-10-09T13:55:42.997Z
|
|
22
|
+
commit: v0.5.3-10-ga4f2312d
|
|
23
|
+
active: true
|
|
1
24
|
incoLightning_devnet_v1_904635675:
|
|
2
25
|
executor:
|
|
3
26
|
name: incoLightning_devnet_v1_904635675
|
package/package.json
CHANGED
package/src/DeployUtils.sol
CHANGED
package/src/Errors.sol
CHANGED
package/src/Lib.alphanet.sol
CHANGED
|
@@ -8,7 +8,7 @@ pragma solidity ^0.8;
|
|
|
8
8
|
import { IncoLightning } from "./IncoLightning.sol";
|
|
9
9
|
import { ebool, euint256, eaddress, ETypes } from "./Types.sol";
|
|
10
10
|
|
|
11
|
-
IncoLightning constant inco = IncoLightning(
|
|
11
|
+
IncoLightning constant inco = IncoLightning(0x28676Cd3b10b03b2FDF105Ba280425b45a674F2A);
|
|
12
12
|
address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
|
|
13
13
|
|
|
14
14
|
function typeOf(bytes32 handle) pure returns (ETypes) {
|
|
@@ -388,17 +388,38 @@ library e {
|
|
|
388
388
|
return euint256.wrap(inco.eCast(ebool.unwrap(a), ETypes.Uint256));
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
/// @
|
|
391
|
+
/// @notice Creates a new encrypted uint256 assuming msg.sender is the user
|
|
392
|
+
/// @dev costs the inco fee
|
|
393
|
+
function newEuint256(bytes memory ciphertext) internal returns (euint256) {
|
|
394
|
+
return newEuint256(ciphertext, msg.sender);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/// @notice Creates a new encrypted uint256 for the given user.
|
|
398
|
+
/// @dev costs the inco fee
|
|
392
399
|
function newEuint256(bytes memory ciphertext, address user) internal returns (euint256) {
|
|
393
400
|
return inco.newEuint256{value: inco.getFee()}(ciphertext, user);
|
|
394
401
|
}
|
|
395
402
|
|
|
396
|
-
/// @
|
|
403
|
+
/// @notice Creates a new encrypted bool assuming msg.sender is the user
|
|
404
|
+
/// @dev costs the inco fee
|
|
405
|
+
function newEbool(bytes memory ciphertext) internal returns (ebool) {
|
|
406
|
+
return newEbool(ciphertext, msg.sender);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/// @notice Creates a new encrypted bool for the given user.
|
|
410
|
+
/// @dev costs the inco fee
|
|
397
411
|
function newEbool(bytes memory ciphertext, address user) internal returns (ebool) {
|
|
398
412
|
return inco.newEbool{value: inco.getFee()}(ciphertext, user);
|
|
399
413
|
}
|
|
400
414
|
|
|
401
|
-
/// @
|
|
415
|
+
/// @notice Creates a new encrypted address assuming msg.sender is the user
|
|
416
|
+
/// @dev costs the inco fee
|
|
417
|
+
function newEaddress(bytes memory ciphertext) internal returns (eaddress) {
|
|
418
|
+
return newEaddress(ciphertext, msg.sender);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/// @notice Creates a new encrypted address for the given user.
|
|
422
|
+
/// @dev costs the inco fee
|
|
402
423
|
function newEaddress(bytes memory ciphertext, address user) internal returns (eaddress) {
|
|
403
424
|
return inco.newEaddress{value: inco.getFee()}(ciphertext, user);
|
|
404
425
|
}
|
package/src/Lib.demonet.sol
CHANGED
|
@@ -388,17 +388,38 @@ library e {
|
|
|
388
388
|
return euint256.wrap(inco.eCast(ebool.unwrap(a), ETypes.Uint256));
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
/// @
|
|
391
|
+
/// @notice Creates a new encrypted uint256 assuming msg.sender is the user
|
|
392
|
+
/// @dev costs the inco fee
|
|
393
|
+
function newEuint256(bytes memory ciphertext) internal returns (euint256) {
|
|
394
|
+
return newEuint256(ciphertext, msg.sender);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/// @notice Creates a new encrypted uint256 for the given user.
|
|
398
|
+
/// @dev costs the inco fee
|
|
392
399
|
function newEuint256(bytes memory ciphertext, address user) internal returns (euint256) {
|
|
393
400
|
return inco.newEuint256{value: inco.getFee()}(ciphertext, user);
|
|
394
401
|
}
|
|
395
402
|
|
|
396
|
-
/// @
|
|
403
|
+
/// @notice Creates a new encrypted bool assuming msg.sender is the user
|
|
404
|
+
/// @dev costs the inco fee
|
|
405
|
+
function newEbool(bytes memory ciphertext) internal returns (ebool) {
|
|
406
|
+
return newEbool(ciphertext, msg.sender);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/// @notice Creates a new encrypted bool for the given user.
|
|
410
|
+
/// @dev costs the inco fee
|
|
397
411
|
function newEbool(bytes memory ciphertext, address user) internal returns (ebool) {
|
|
398
412
|
return inco.newEbool{value: inco.getFee()}(ciphertext, user);
|
|
399
413
|
}
|
|
400
414
|
|
|
401
|
-
/// @
|
|
415
|
+
/// @notice Creates a new encrypted address assuming msg.sender is the user
|
|
416
|
+
/// @dev costs the inco fee
|
|
417
|
+
function newEaddress(bytes memory ciphertext) internal returns (eaddress) {
|
|
418
|
+
return newEaddress(ciphertext, msg.sender);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/// @notice Creates a new encrypted address for the given user.
|
|
422
|
+
/// @dev costs the inco fee
|
|
402
423
|
function newEaddress(bytes memory ciphertext, address user) internal returns (eaddress) {
|
|
403
424
|
return inco.newEaddress{value: inco.getFee()}(ciphertext, user);
|
|
404
425
|
}
|
package/src/Lib.devnet.sol
CHANGED
|
@@ -388,17 +388,38 @@ library e {
|
|
|
388
388
|
return euint256.wrap(inco.eCast(ebool.unwrap(a), ETypes.Uint256));
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
/// @
|
|
391
|
+
/// @notice Creates a new encrypted uint256 assuming msg.sender is the user
|
|
392
|
+
/// @dev costs the inco fee
|
|
393
|
+
function newEuint256(bytes memory ciphertext) internal returns (euint256) {
|
|
394
|
+
return newEuint256(ciphertext, msg.sender);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/// @notice Creates a new encrypted uint256 for the given user.
|
|
398
|
+
/// @dev costs the inco fee
|
|
392
399
|
function newEuint256(bytes memory ciphertext, address user) internal returns (euint256) {
|
|
393
400
|
return inco.newEuint256{value: inco.getFee()}(ciphertext, user);
|
|
394
401
|
}
|
|
395
402
|
|
|
396
|
-
/// @
|
|
403
|
+
/// @notice Creates a new encrypted bool assuming msg.sender is the user
|
|
404
|
+
/// @dev costs the inco fee
|
|
405
|
+
function newEbool(bytes memory ciphertext) internal returns (ebool) {
|
|
406
|
+
return newEbool(ciphertext, msg.sender);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/// @notice Creates a new encrypted bool for the given user.
|
|
410
|
+
/// @dev costs the inco fee
|
|
397
411
|
function newEbool(bytes memory ciphertext, address user) internal returns (ebool) {
|
|
398
412
|
return inco.newEbool{value: inco.getFee()}(ciphertext, user);
|
|
399
413
|
}
|
|
400
414
|
|
|
401
|
-
/// @
|
|
415
|
+
/// @notice Creates a new encrypted address assuming msg.sender is the user
|
|
416
|
+
/// @dev costs the inco fee
|
|
417
|
+
function newEaddress(bytes memory ciphertext) internal returns (eaddress) {
|
|
418
|
+
return newEaddress(ciphertext, msg.sender);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/// @notice Creates a new encrypted address for the given user.
|
|
422
|
+
/// @dev costs the inco fee
|
|
402
423
|
function newEaddress(bytes memory ciphertext, address user) internal returns (eaddress) {
|
|
403
424
|
return inco.newEaddress{value: inco.getFee()}(ciphertext, user);
|
|
404
425
|
}
|
package/src/Lib.sol
CHANGED
|
@@ -8,7 +8,7 @@ pragma solidity ^0.8;
|
|
|
8
8
|
import { IncoLightning } from "./IncoLightning.sol";
|
|
9
9
|
import { ebool, euint256, eaddress, ETypes } from "./Types.sol";
|
|
10
10
|
|
|
11
|
-
IncoLightning constant inco = IncoLightning(
|
|
11
|
+
IncoLightning constant inco = IncoLightning(0x28676Cd3b10b03b2FDF105Ba280425b45a674F2A);
|
|
12
12
|
address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
|
|
13
13
|
|
|
14
14
|
function typeOf(bytes32 handle) pure returns (ETypes) {
|
|
@@ -388,17 +388,38 @@ library e {
|
|
|
388
388
|
return euint256.wrap(inco.eCast(ebool.unwrap(a), ETypes.Uint256));
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
/// @
|
|
391
|
+
/// @notice Creates a new encrypted uint256 assuming msg.sender is the user
|
|
392
|
+
/// @dev costs the inco fee
|
|
393
|
+
function newEuint256(bytes memory ciphertext) internal returns (euint256) {
|
|
394
|
+
return newEuint256(ciphertext, msg.sender);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/// @notice Creates a new encrypted uint256 for the given user.
|
|
398
|
+
/// @dev costs the inco fee
|
|
392
399
|
function newEuint256(bytes memory ciphertext, address user) internal returns (euint256) {
|
|
393
400
|
return inco.newEuint256{value: inco.getFee()}(ciphertext, user);
|
|
394
401
|
}
|
|
395
402
|
|
|
396
|
-
/// @
|
|
403
|
+
/// @notice Creates a new encrypted bool assuming msg.sender is the user
|
|
404
|
+
/// @dev costs the inco fee
|
|
405
|
+
function newEbool(bytes memory ciphertext) internal returns (ebool) {
|
|
406
|
+
return newEbool(ciphertext, msg.sender);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/// @notice Creates a new encrypted bool for the given user.
|
|
410
|
+
/// @dev costs the inco fee
|
|
397
411
|
function newEbool(bytes memory ciphertext, address user) internal returns (ebool) {
|
|
398
412
|
return inco.newEbool{value: inco.getFee()}(ciphertext, user);
|
|
399
413
|
}
|
|
400
414
|
|
|
401
|
-
/// @
|
|
415
|
+
/// @notice Creates a new encrypted address assuming msg.sender is the user
|
|
416
|
+
/// @dev costs the inco fee
|
|
417
|
+
function newEaddress(bytes memory ciphertext) internal returns (eaddress) {
|
|
418
|
+
return newEaddress(ciphertext, msg.sender);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/// @notice Creates a new encrypted address for the given user.
|
|
422
|
+
/// @dev costs the inco fee
|
|
402
423
|
function newEaddress(bytes memory ciphertext, address user) internal returns (eaddress) {
|
|
403
424
|
return inco.newEaddress{value: inco.getFee()}(ciphertext, user);
|
|
404
425
|
}
|