@inco/lightning 0.9.0-devnet-test-4 → 0.10.0-devnet-1
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/manifest.yaml +150 -0
- package/package.json +8 -8
- package/src/CreateXHelper.sol +1 -1
- package/src/DeployUtils.sol +22 -28
- package/src/IncoLightning.sol +27 -18
- package/src/IncoVerifier.sol +1 -1
- package/src/Lib.alphanet.sol +294 -13
- package/src/Lib.demonet.sol +294 -13
- package/src/Lib.devnet.sol +294 -13
- package/src/Lib.sol +294 -13
- package/src/Lib.template.sol +357 -13
- package/src/Lib.testnet.sol +294 -13
- package/src/Types.sol +44 -0
- package/src/interfaces/IIncoLightning.sol +8 -12
- package/src/interfaces/automata-interfaces/BELE.sol +1 -1
- package/src/interfaces/automata-interfaces/IPCCSRouter.sol +1 -1
- package/src/interfaces/automata-interfaces/IPcsDao.sol +1 -1
- package/src/interfaces/automata-interfaces/IQuoteVerifier.sol +1 -1
- package/src/interfaces/automata-interfaces/Types.sol +1 -1
- package/src/libs/incoLightning_alphanet_v0_297966649.sol +294 -13
- package/src/libs/incoLightning_alphanet_v1_725458969.sol +294 -13
- package/src/libs/incoLightning_alphanet_v2_976644394.sol +294 -13
- package/src/libs/incoLightning_demonet_v0_863421733.sol +294 -13
- package/src/libs/incoLightning_demonet_v2_467437523.sol +294 -13
- package/src/libs/incoLightning_devnet_v0_340846814.sol +294 -13
- package/src/libs/incoLightning_devnet_v10_266391127.sol +1223 -0
- package/src/libs/incoLightning_devnet_v1_904635675.sol +294 -13
- package/src/libs/incoLightning_devnet_v2_295237520.sol +294 -13
- package/src/libs/incoLightning_devnet_v3_976859633.sol +294 -13
- package/src/libs/incoLightning_devnet_v4_409204766.sol +294 -13
- package/src/libs/incoLightning_devnet_v5_203964628.sol +1223 -0
- package/src/libs/incoLightning_devnet_v6_281949651.sol +1223 -0
- package/src/libs/incoLightning_devnet_v7_24560427.sol +1223 -0
- package/src/libs/incoLightning_devnet_v8_985328058.sol +1223 -0
- package/src/libs/incoLightning_devnet_v9_269218568.sol +1223 -0
- package/src/libs/incoLightning_testnet_v0_183408998.sol +294 -13
- package/src/libs/incoLightning_testnet_v2_889158349.sol +294 -13
- package/src/lightning-parts/AccessControl/AdvancedAccessControl.sol +8 -3
- package/src/lightning-parts/AccessControl/BaseAccessControlList.sol +0 -16
- package/src/lightning-parts/AccessControl/interfaces/IAdvancedAccessControl.sol +1 -1
- package/src/lightning-parts/AccessControl/interfaces/IBaseAccessControlList.sol +3 -2
- package/src/lightning-parts/AccessControl/test/TestAdvancedAccessControl.t.sol +18 -1
- package/src/lightning-parts/AccessControl/test/TestBaseAccessControl.t.sol +0 -43
- package/src/lightning-parts/DecryptionAttester.sol +124 -2
- package/src/lightning-parts/DecryptionAttester.types.sol +20 -0
- package/src/lightning-parts/EList.sol +397 -0
- package/src/lightning-parts/EncryptedInput.sol +78 -8
- package/src/lightning-parts/EncryptedOperations.sol +40 -34
- package/src/lightning-parts/Fee.sol +29 -0
- package/src/lightning-parts/TEELifecycle.sol +38 -30
- package/src/lightning-parts/TEELifecycle.types.sol +1 -1
- package/src/lightning-parts/TrivialEncryption.sol +1 -2
- package/src/lightning-parts/interfaces/IDecryptionAttester.sol +16 -1
- package/src/lightning-parts/interfaces/IEList.sol +38 -0
- package/src/lightning-parts/interfaces/IEncryptedInput.sol +9 -1
- package/src/lightning-parts/interfaces/IEncryptedOperations.sol +3 -2
- package/src/lightning-parts/interfaces/ITEELifecycle.sol +1 -1
- package/src/lightning-parts/interfaces/ITrivialEncryption.sol +3 -1
- package/src/lightning-parts/primitives/EListHandleGeneration.sol +66 -0
- package/src/lightning-parts/primitives/EListHandleMetadata.sol +67 -0
- package/src/lightning-parts/primitives/HandleGeneration.sol +31 -8
- package/src/lightning-parts/primitives/HandleMetadata.sol +10 -3
- package/src/lightning-parts/primitives/interfaces/IEListHandleMetadata.sol +8 -0
- package/src/lightning-parts/primitives/test/SignatureVerifier.t.sol +1 -1
- package/src/lightning-parts/test/Elist.t.sol +218 -0
- package/src/lightning-parts/test/HandleMetadata.t.sol +66 -23
- package/src/lightning-parts/test/TestDecryptionAttestationInSynchronousFlow.t.sol +41 -13
- package/src/misc/ABIHelper.sol +15 -0
- package/src/pasted-dependencies/ICreateX.sol +1 -1
- package/src/periphery/IncoUtils.sol +1 -1
- package/src/periphery/SessionVerifier.sol +4 -4
- package/src/shared/IOwnable.sol +1 -1
- package/src/shared/IUUPSUpgradable.sol +1 -1
- package/src/shared/TestUtils.sol +8 -1
- package/src/test/EListTester.sol +171 -0
- package/src/test/FakeIncoInfra/FakeComputeServer.sol +2 -2
- package/src/test/FakeIncoInfra/FakeIncoInfraBase.sol +3 -3
- package/src/test/FakeIncoInfra/MockOpHandler.sol +7 -9
- package/src/test/FakeIncoInfra/MockRemoteAttestation.sol +2 -1
- package/src/test/FakeIncoInfra/getOpForSelector.sol +0 -2
- package/src/test/IncoTest.sol +17 -5
- package/src/test/OpsTest.sol +3 -2
- package/src/test/TEELifecycle/TEELifecycleMockTest.t.sol +85 -57
- package/src/test/TestDeploy.t.sol +73 -1
- package/src/test/TestFakeInfra.t.sol +32 -6
- package/src/test/TestLib.t.sol +986 -19
- package/src/test/TestReceive.t.sol +42 -0
- package/src/test/TestUpgrade.t.sol +34 -63
- package/src/version/IncoLightningConfig.sol +1 -1
package/manifest.yaml
CHANGED
|
@@ -1,8 +1,147 @@
|
|
|
1
|
+
incoLightning_devnet_v10_266391127:
|
|
2
|
+
executor:
|
|
3
|
+
name: incoLightning_devnet_v10_266391127
|
|
4
|
+
majorVersion: 10
|
|
5
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
6
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
7
|
+
pepper: devnet
|
|
8
|
+
executorAddress: "0x9C6b74dff47644956e712B301aa3701b3141fF9C"
|
|
9
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc0012dea2b242c4d3b620c657"
|
|
10
|
+
deployments:
|
|
11
|
+
- name: incoLightning_10_0_0__266391127
|
|
12
|
+
chainId: "84532"
|
|
13
|
+
chainName: Base Sepolia
|
|
14
|
+
version:
|
|
15
|
+
major: 10
|
|
16
|
+
minor: 0
|
|
17
|
+
patch: 0
|
|
18
|
+
shortSalt: "266391127"
|
|
19
|
+
blockNumber: "40291413"
|
|
20
|
+
deployDate: 2026-04-16T14:51:55.586Z
|
|
21
|
+
commit: v0.8.0-devnet-32-6-ge1e857cf0-dirty
|
|
22
|
+
active: true
|
|
23
|
+
includesPreviewFeatures: false
|
|
24
|
+
incoLightning_devnet_v9_269218568:
|
|
25
|
+
executor:
|
|
26
|
+
name: incoLightning_devnet_v9_269218568
|
|
27
|
+
majorVersion: 9
|
|
28
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
29
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
30
|
+
pepper: devnet
|
|
31
|
+
executorAddress: "0x6c9132D324231D2F68a1491686b0d4c10ee7d257"
|
|
32
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc007202d6e9ea2805def71308"
|
|
33
|
+
deployments:
|
|
34
|
+
- name: incoLightning_9_0_0__269218568
|
|
35
|
+
chainId: "84532"
|
|
36
|
+
chainName: Base Sepolia
|
|
37
|
+
version:
|
|
38
|
+
major: 9
|
|
39
|
+
minor: 0
|
|
40
|
+
patch: 0
|
|
41
|
+
shortSalt: "269218568"
|
|
42
|
+
blockNumber: "39033718"
|
|
43
|
+
deployDate: 2026-03-18T12:08:48.915Z
|
|
44
|
+
commit: v0.8.0-devnet-13-40-gc1ceef103-dirty
|
|
45
|
+
active: true
|
|
46
|
+
includesPreviewFeatures: false
|
|
47
|
+
incoLightning_devnet_v8_985328058:
|
|
48
|
+
executor:
|
|
49
|
+
name: incoLightning_devnet_v8_985328058
|
|
50
|
+
majorVersion: 8
|
|
51
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
52
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
53
|
+
pepper: devnet
|
|
54
|
+
executorAddress: "0x43119Ad1F673E998CE4f3BB305bB92Bd5ab97E3B"
|
|
55
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc009045f766b38e5a773da9ba"
|
|
56
|
+
deployments:
|
|
57
|
+
- name: incoLightning_8_0_0__985328058
|
|
58
|
+
chainId: "84532"
|
|
59
|
+
chainName: Base Sepolia
|
|
60
|
+
version:
|
|
61
|
+
major: 8
|
|
62
|
+
minor: 0
|
|
63
|
+
patch: 0
|
|
64
|
+
shortSalt: "985328058"
|
|
65
|
+
blockNumber: "39028741"
|
|
66
|
+
deployDate: 2026-03-18T09:22:53.919Z
|
|
67
|
+
commit: v0.8.0-devnet-13-40-gc1ceef103-dirty
|
|
68
|
+
active: true
|
|
69
|
+
includesPreviewFeatures: false
|
|
70
|
+
incoLightning_devnet_v7_24560427:
|
|
71
|
+
executor:
|
|
72
|
+
name: incoLightning_devnet_v7_24560427
|
|
73
|
+
majorVersion: 7
|
|
74
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
75
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
76
|
+
pepper: devnet
|
|
77
|
+
executorAddress: "0xA2275E60cCEd081fFD7373593c44ebc30E6Efe66"
|
|
78
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc0057b7694d1492d2775d132b"
|
|
79
|
+
deployments:
|
|
80
|
+
- name: incoLightning_7_0_0__24560427
|
|
81
|
+
chainId: "84532"
|
|
82
|
+
chainName: Base Sepolia
|
|
83
|
+
version:
|
|
84
|
+
major: 7
|
|
85
|
+
minor: 0
|
|
86
|
+
patch: 0
|
|
87
|
+
shortSalt: "24560427"
|
|
88
|
+
blockNumber: "38991058"
|
|
89
|
+
deployDate: 2026-03-17T12:26:47.504Z
|
|
90
|
+
commit: v0.8.0-devnet-13-38-g52b1dfef3
|
|
91
|
+
active: true
|
|
92
|
+
includesPreviewFeatures: false
|
|
93
|
+
incoLightning_devnet_v6_281949651:
|
|
94
|
+
executor:
|
|
95
|
+
name: incoLightning_devnet_v6_281949651
|
|
96
|
+
majorVersion: 6
|
|
97
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
98
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
99
|
+
pepper: devnet
|
|
100
|
+
executorAddress: "0xDF3830489208461f72Df6E45D0e6cbF9DBB74fe1"
|
|
101
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc009531587de02194b1b7a9d3"
|
|
102
|
+
deployments:
|
|
103
|
+
- name: incoLightning_6_0_0__281949651
|
|
104
|
+
chainId: "84532"
|
|
105
|
+
chainName: Base Sepolia
|
|
106
|
+
version:
|
|
107
|
+
major: 6
|
|
108
|
+
minor: 0
|
|
109
|
+
patch: 0
|
|
110
|
+
shortSalt: "281949651"
|
|
111
|
+
blockNumber: "37516200"
|
|
112
|
+
deployDate: 2026-02-11T09:04:51.931Z
|
|
113
|
+
commit: v0.8.0-devnet-9-13-ge2ba2377
|
|
114
|
+
active: true
|
|
115
|
+
includesPreviewFeatures: false
|
|
116
|
+
incoLightning_devnet_v5_203964628:
|
|
117
|
+
executor:
|
|
118
|
+
name: incoLightning_devnet_v5_203964628
|
|
119
|
+
majorVersion: 5
|
|
120
|
+
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
121
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
122
|
+
pepper: devnet
|
|
123
|
+
executorAddress: "0x8D5D75CC00E2Fc84ec4dE085aE1708223591c6b6"
|
|
124
|
+
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00c573fb2bf617e75b6210d4"
|
|
125
|
+
deployments:
|
|
126
|
+
- name: incoLightningPreview_5_0_0__203964628
|
|
127
|
+
chainId: "84532"
|
|
128
|
+
chainName: Base Sepolia
|
|
129
|
+
version:
|
|
130
|
+
major: 5
|
|
131
|
+
minor: 0
|
|
132
|
+
patch: 0
|
|
133
|
+
shortSalt: "203964628"
|
|
134
|
+
blockNumber: "37431152"
|
|
135
|
+
deployDate: 2026-02-09T09:49:55.326Z
|
|
136
|
+
commit: v0.8.0-devnet-8-8-ge2e37e00
|
|
137
|
+
active: true
|
|
138
|
+
includesPreviewFeatures: true
|
|
1
139
|
incoLightning_devnet_v4_409204766:
|
|
2
140
|
executor:
|
|
3
141
|
name: incoLightning_devnet_v4_409204766
|
|
4
142
|
majorVersion: 4
|
|
5
143
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
144
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
6
145
|
pepper: devnet
|
|
7
146
|
executorAddress: "0x4046b737B454b0430FBF29cea070e3337AdE95aD"
|
|
8
147
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc003b3f2c4caeb6f787dcce1e"
|
|
@@ -25,6 +164,7 @@ incoLightning_devnet_v3_976859633:
|
|
|
25
164
|
name: incoLightning_devnet_v3_976859633
|
|
26
165
|
majorVersion: 3
|
|
27
166
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
167
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
28
168
|
pepper: devnet
|
|
29
169
|
executorAddress: "0x4732520194584a04Cac0224e067658619F4086bD"
|
|
30
170
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00ef1fab551c72a93b0637f1"
|
|
@@ -47,6 +187,7 @@ incoLightning_testnet_v2_889158349:
|
|
|
47
187
|
name: incoLightning_testnet_v2_889158349
|
|
48
188
|
majorVersion: 2
|
|
49
189
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
190
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
50
191
|
pepper: testnet
|
|
51
192
|
executorAddress: "0x168FDc3Ae19A5d5b03614578C58974FF30FCBe92"
|
|
52
193
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc005e0f44aac1a914b715cecd"
|
|
@@ -69,6 +210,7 @@ incoLightning_demonet_v2_467437523:
|
|
|
69
210
|
name: incoLightning_demonet_v2_467437523
|
|
70
211
|
majorVersion: 2
|
|
71
212
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
213
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
72
214
|
pepper: demonet
|
|
73
215
|
executorAddress: "0xA95EAbCE575f5f1e52605358Ee893F6536166378"
|
|
74
216
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc0071f74686446f14c7b469d3"
|
|
@@ -91,6 +233,7 @@ incoLightning_alphanet_v2_976644394:
|
|
|
91
233
|
name: incoLightning_alphanet_v2_976644394
|
|
92
234
|
majorVersion: 2
|
|
93
235
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
236
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
94
237
|
pepper: alphanet
|
|
95
238
|
executorAddress: "0xc0d693DeEF0A91CE39208676b6da09B822abd199"
|
|
96
239
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc000822f11f6e30f933e76d2a"
|
|
@@ -113,6 +256,7 @@ incoLightning_devnet_v2_295237520:
|
|
|
113
256
|
name: incoLightning_devnet_v2_295237520
|
|
114
257
|
majorVersion: 2
|
|
115
258
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
259
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
116
260
|
pepper: devnet
|
|
117
261
|
executorAddress: "0xC64BB070D6F5aa796e79fA19c1008647ffF736ED"
|
|
118
262
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc008d5a963bd519d8493f5190"
|
|
@@ -148,6 +292,7 @@ incoLightning_alphanet_v1_725458969:
|
|
|
148
292
|
name: incoLightning_alphanet_v1_725458969
|
|
149
293
|
majorVersion: 1
|
|
150
294
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
295
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
151
296
|
pepper: alphanet
|
|
152
297
|
executorAddress: "0x28676Cd3b10b03b2FDF105Ba280425b45a674F2A"
|
|
153
298
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc004dfbe338c6966a22bcca19"
|
|
@@ -182,6 +327,7 @@ incoLightning_devnet_v1_904635675:
|
|
|
182
327
|
name: incoLightning_devnet_v1_904635675
|
|
183
328
|
majorVersion: 1
|
|
184
329
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
330
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
185
331
|
pepper: devnet
|
|
186
332
|
executorAddress: "0x3473820DcAa71Af8157b93C7f2bf1c676A2A39A6"
|
|
187
333
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc007d63c0fdca6698ac7cc51b"
|
|
@@ -215,6 +361,7 @@ incoLightning_testnet_v0_183408998:
|
|
|
215
361
|
name: incoLightning_testnet_v0_183408998
|
|
216
362
|
majorVersion: 0
|
|
217
363
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
364
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
218
365
|
pepper: testnet
|
|
219
366
|
executorAddress: "0x63D8135aF4D393B1dB43B649010c8D3EE19FC9fd"
|
|
220
367
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00d75ffa0caf0797c3f12d66"
|
|
@@ -260,6 +407,7 @@ incoLightning_demonet_v0_863421733:
|
|
|
260
407
|
name: incoLightning_demonet_v0_863421733
|
|
261
408
|
majorVersion: 0
|
|
262
409
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
410
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
263
411
|
pepper: demonet
|
|
264
412
|
executorAddress: "0xeBAFF6D578733E4603b99CBdbb221482F29a78E1"
|
|
265
413
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00834654f6d289ccc7e5ab25"
|
|
@@ -293,6 +441,7 @@ incoLightning_alphanet_v0_297966649:
|
|
|
293
441
|
name: incoLightning_alphanet_v0_297966649
|
|
294
442
|
majorVersion: 0
|
|
295
443
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
444
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
296
445
|
pepper: alphanet
|
|
297
446
|
executorAddress: "0x4651DfD7729aE5568092E7351fAaD872266d4CBd"
|
|
298
447
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc0023f7798f470fdf5e9da639"
|
|
@@ -326,6 +475,7 @@ incoLightning_devnet_v0_340846814:
|
|
|
326
475
|
name: incoLightning_devnet_v0_340846814
|
|
327
476
|
majorVersion: 0
|
|
328
477
|
deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
478
|
+
owner: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
|
|
329
479
|
pepper: devnet
|
|
330
480
|
executorAddress: "0x3B22be60Ae699933959CA3cE147C96caa88Ccd3D"
|
|
331
481
|
salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00b001d6742fded0dd599ede"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inco/lightning",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-devnet-1",
|
|
4
4
|
"repository": "https://github.com/Inco-fhevm/inco-monorepo",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"publish:npm": "npm publish --tag ${NPM_DIST_TAG:-alpha} --access public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@inco/shared": "
|
|
21
|
-
"@openzeppelin/contracts": "
|
|
22
|
-
"@openzeppelin/contracts-upgradeable": "
|
|
23
|
-
"@safe-global/safe-smart-account": "https://github.com/safe-global/safe-smart-account.git#
|
|
24
|
-
"ds-test": "https://github.com/dapphub/ds-test",
|
|
25
|
-
"forge-std": "https://github.com/foundry-rs/forge-std",
|
|
26
|
-
"tsx": "
|
|
20
|
+
"@inco/shared": "0.1.0",
|
|
21
|
+
"@openzeppelin/contracts": "5.4.0",
|
|
22
|
+
"@openzeppelin/contracts-upgradeable": "5.4.0",
|
|
23
|
+
"@safe-global/safe-smart-account": "https://github.com/safe-global/safe-smart-account.git#dc437e8",
|
|
24
|
+
"ds-test": "https://github.com/dapphub/ds-test#e282159",
|
|
25
|
+
"forge-std": "https://github.com/foundry-rs/forge-std#2f05b30",
|
|
26
|
+
"tsx": "4.20.6"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/bun": "latest",
|
package/src/CreateXHelper.sol
CHANGED
package/src/DeployUtils.sol
CHANGED
|
@@ -90,29 +90,32 @@ contract DeployUtils is Script {
|
|
|
90
90
|
/// @notice Full deployment of IncoLightning and IncoVerifier using configuration
|
|
91
91
|
/// @dev Computes salts from deployer and pepper, then deploys both contracts.
|
|
92
92
|
/// Should be wrapped in prank (testing) or broadcast (production).
|
|
93
|
-
/// @param deployer The address
|
|
93
|
+
/// @param deployer The deployer address used in salt for CreateX permissioned deploy protection
|
|
94
|
+
/// @param owner The address that will own both deployed proxies (can be a multisig)
|
|
94
95
|
/// @param pepper Entropy string to avoid address collision with previous deployments
|
|
95
96
|
/// @param quoteVerifier The Automata quote verifier for TEE attestation validation
|
|
96
97
|
/// @return lightningProxy The deployed IncoLightning proxy
|
|
97
98
|
/// @return verifierProxy The deployed IncoVerifier proxy
|
|
98
|
-
function deployIncoLightningUsingConfig(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
function deployIncoLightningUsingConfig(
|
|
100
|
+
address deployer,
|
|
101
|
+
address owner,
|
|
102
|
+
string memory pepper,
|
|
103
|
+
IQuoteVerifier quoteVerifier
|
|
104
|
+
) internal returns (IIncoLightning lightningProxy, IIncoVerifier verifierProxy) {
|
|
102
105
|
(bytes32 lightningSalt, bytes32 verifierSalt) = getIncoSalts(deployer, pepper);
|
|
103
|
-
lightningProxy = deployLightning(lightningSalt, verifierSalt,
|
|
104
|
-
verifierProxy = deployVerifier(verifierSalt, lightningProxy,
|
|
106
|
+
lightningProxy = deployLightning(lightningSalt, verifierSalt, owner);
|
|
107
|
+
verifierProxy = deployVerifier(verifierSalt, lightningProxy, owner, quoteVerifier);
|
|
105
108
|
console.log(
|
|
106
|
-
"Deploying Inco with executor: %s,
|
|
109
|
+
"Deploying Inco with executor: %s, owner: %s, lightning salt: %s",
|
|
107
110
|
vm.toString(address(lightningProxy)),
|
|
108
|
-
vm.toString(
|
|
111
|
+
vm.toString(owner),
|
|
109
112
|
vm.toString(lightningSalt)
|
|
110
113
|
);
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
/// @notice Computes the standard salts for IncoLightning and IncoVerifier
|
|
114
117
|
/// @dev Uses the contract names and major version from IncoLightningConfig
|
|
115
|
-
/// @param deployer The deployer address
|
|
118
|
+
/// @param deployer The deployer address mixed into the salt for CreateX permissioned deploy protection
|
|
116
119
|
/// @param pepper The pepper string for salt generation
|
|
117
120
|
/// @return lightningSalt Salt for IncoLightning deployment
|
|
118
121
|
/// @return verifierSalt Salt for IncoVerifier deployment
|
|
@@ -130,9 +133,9 @@ contract DeployUtils is Script {
|
|
|
130
133
|
/// computed from salt since it may not be deployed yet.
|
|
131
134
|
/// @param lightningSalt The salt for CreateX deployment
|
|
132
135
|
/// @param verifierSalt The salt used to compute the verifier address
|
|
133
|
-
/// @param
|
|
136
|
+
/// @param owner The address that will own the proxy
|
|
134
137
|
/// @return lightningProxy The deployed proxy cast to IIncoLightning
|
|
135
|
-
function deployLightning(bytes32 lightningSalt, bytes32 verifierSalt, address
|
|
138
|
+
function deployLightning(bytes32 lightningSalt, bytes32 verifierSalt, address owner)
|
|
136
139
|
internal
|
|
137
140
|
returns (IIncoLightning lightningProxy)
|
|
138
141
|
{
|
|
@@ -142,10 +145,7 @@ contract DeployUtils is Script {
|
|
|
142
145
|
deployProxy({
|
|
143
146
|
salt: lightningSalt,
|
|
144
147
|
implem: address(lightningImplem),
|
|
145
|
-
initCall: abi.encodeWithSelector(
|
|
146
|
-
IIncoLightning.initialize.selector,
|
|
147
|
-
deployer // owner
|
|
148
|
-
)
|
|
148
|
+
initCall: abi.encodeWithSelector(IIncoLightning.initialize.selector, owner)
|
|
149
149
|
})
|
|
150
150
|
);
|
|
151
151
|
}
|
|
@@ -155,26 +155,20 @@ contract DeployUtils is Script {
|
|
|
155
155
|
/// so it can be referenced in the verifier.
|
|
156
156
|
/// @param verifierSalt The salt for CreateX deployment
|
|
157
157
|
/// @param lightning The previously deployed IncoLightning proxy
|
|
158
|
-
/// @param
|
|
158
|
+
/// @param owner The address that will own the proxy
|
|
159
159
|
/// @param quoteVerifier The Automata quote verifier for TEE attestation
|
|
160
160
|
/// @return verifierProxy The deployed proxy cast to IIncoVerifier
|
|
161
|
-
function deployVerifier(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
IQuoteVerifier quoteVerifier
|
|
166
|
-
) internal returns (IIncoVerifier verifierProxy) {
|
|
161
|
+
function deployVerifier(bytes32 verifierSalt, IIncoLightning lightning, address owner, IQuoteVerifier quoteVerifier)
|
|
162
|
+
internal
|
|
163
|
+
returns (IIncoVerifier verifierProxy)
|
|
164
|
+
{
|
|
167
165
|
IncoVerifier verifierImplem = new IncoVerifier(address(lightning));
|
|
168
166
|
verifierProxy = IIncoVerifier(
|
|
169
167
|
deployProxy({
|
|
170
168
|
salt: verifierSalt,
|
|
171
169
|
implem: address(verifierImplem),
|
|
172
170
|
initCall: abi.encodeWithSelector(
|
|
173
|
-
IIncoVerifier.initialize.selector,
|
|
174
|
-
deployer, // owner
|
|
175
|
-
VERIFIER_NAME,
|
|
176
|
-
lightning.getMajorVersion(),
|
|
177
|
-
quoteVerifier
|
|
171
|
+
IIncoVerifier.initialize.selector, owner, VERIFIER_NAME, lightning.getMajorVersion(), quoteVerifier
|
|
178
172
|
)
|
|
179
173
|
})
|
|
180
174
|
);
|
package/src/IncoLightning.sol
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: No License
|
|
2
|
-
pragma solidity ^0.8;
|
|
2
|
+
pragma solidity ^0.8.29;
|
|
3
3
|
|
|
4
4
|
import {IIncoLightning} from "./interfaces/IIncoLightning.sol";
|
|
5
5
|
import {CONTRACT_NAME, MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION} from "./version/IncoLightningConfig.sol";
|
|
6
|
-
import {EncryptedInput} from "./lightning-parts/EncryptedInput.sol";
|
|
7
|
-
import {EncryptedOperations} from "./lightning-parts/EncryptedOperations.sol";
|
|
8
6
|
import {TrivialEncryption} from "./lightning-parts/TrivialEncryption.sol";
|
|
7
|
+
import {EList} from "./lightning-parts/EList.sol";
|
|
9
8
|
import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
10
9
|
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
|
|
11
10
|
import {Version} from "./version/Version.sol";
|
|
@@ -22,23 +21,15 @@ import {VerifierAddressGetter} from "./lightning-parts/primitives/VerifierAddres
|
|
|
22
21
|
///
|
|
23
22
|
/// The contract is deployed as a UUPS upgradeable proxy and uses CreateX for deterministic deployment.
|
|
24
23
|
/// All encrypted values are represented as bytes32 handles that reference ciphertexts stored off-chain.
|
|
25
|
-
contract IncoLightning is
|
|
26
|
-
IIncoLightning,
|
|
27
|
-
EncryptedOperations,
|
|
28
|
-
TrivialEncryption,
|
|
29
|
-
UUPSUpgradeable,
|
|
30
|
-
EncryptedInput,
|
|
31
|
-
OwnableUpgradeable,
|
|
32
|
-
Version
|
|
33
|
-
{
|
|
24
|
+
contract IncoLightning is IIncoLightning, TrivialEncryption, EList, UUPSUpgradeable, OwnableUpgradeable, Version {
|
|
34
25
|
|
|
35
26
|
/// @notice Initializes the IncoLightning contract with deployment configuration
|
|
36
27
|
/// @dev The salt embeds the deployer address, contract name, version, and pepper for deterministic deployment.
|
|
37
28
|
/// This constructor is called once during proxy implementation deployment.
|
|
38
|
-
/// @param
|
|
29
|
+
/// @param _salt Unique salt used for deterministic deployment via CreateX
|
|
39
30
|
/// @param _incoVerifier The verifier contract address for attestation validation
|
|
40
|
-
constructor(bytes32
|
|
41
|
-
Version(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION,
|
|
31
|
+
constructor(bytes32 _salt, IIncoVerifier _incoVerifier)
|
|
32
|
+
Version(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, _salt, CONTRACT_NAME)
|
|
42
33
|
VerifierAddressGetter(address(_incoVerifier))
|
|
43
34
|
{}
|
|
44
35
|
|
|
@@ -51,9 +42,10 @@ contract IncoLightning is
|
|
|
51
42
|
/// @notice Initializes the proxy with an owner address
|
|
52
43
|
/// @dev Must be called immediately after proxy deployment. Can only be called once.
|
|
53
44
|
/// This sets up the Ownable state for the proxy instance.
|
|
54
|
-
/// @param
|
|
55
|
-
function initialize(address
|
|
56
|
-
__Ownable_init(
|
|
45
|
+
/// @param _owner The address that will own this contract and can authorize upgrades
|
|
46
|
+
function initialize(address _owner) public initializer {
|
|
47
|
+
__Ownable_init(_owner);
|
|
48
|
+
_setAcceptedVersion(2, true);
|
|
57
49
|
}
|
|
58
50
|
|
|
59
51
|
/// @notice Withdraws accumulated protocol fees to the owner
|
|
@@ -63,8 +55,25 @@ contract IncoLightning is
|
|
|
63
55
|
_withdrawFeesTo(owner());
|
|
64
56
|
}
|
|
65
57
|
|
|
58
|
+
/// @notice Adds a version to the accepted input versions whitelist.
|
|
59
|
+
/// @param version The version number to accept (must be non-negative).
|
|
60
|
+
function addAcceptedVersion(uint16 version) external onlyOwner {
|
|
61
|
+
_setAcceptedVersion(version, true);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// @notice Removes a version from the accepted input versions whitelist.
|
|
65
|
+
/// @param version The version number to remove.
|
|
66
|
+
function removeAcceptedVersion(uint16 version) external onlyOwner {
|
|
67
|
+
_setAcceptedVersion(version, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
/// @notice Required for CreateX deterministic deployment
|
|
67
71
|
/// @dev Empty fallback allows the contract to be deployed via CreateX's create2 mechanism
|
|
68
72
|
fallback() external {}
|
|
69
73
|
|
|
74
|
+
/// @dev Reject any incoming ETH transfers, as the contract is not designed to handle ETH and does not have a payable fallback.
|
|
75
|
+
receive() external payable {
|
|
76
|
+
revert EthInboundTransferUnsupported();
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
}
|
package/src/IncoVerifier.sol
CHANGED