@inco/lightning 0.1.21 → 0.1.30

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.
@@ -0,0 +1,14 @@
1
+ DEPLOYER_ADDRESS=0x8202D2D747784Cb7D48868E44C42C4bf162a70BC
2
+ STATE_DUMP=incoLightning_0_1_29__340846814.dump.json
3
+ ADD_TWO_ADDRESS=0x974BE82A144E3d1F8F9f13b8436eA16aB5044B89
4
+ EXECUTOR_ADDRESS=0x3B22be60Ae699933959CA3cE147C96caa88Ccd3D
5
+ ECIES_PUBLIC_KEY=0x03dd6c92eae96934c5a4a0d653b79d0e4366f40c562f2f8751fd5a130fa6c7ceba
6
+ CALLBACK_ADDRESS=0xd3851617feBf3174D8F469CA93dee9F177D74ae6
7
+ SENDER_ADDRESS=0xDa28fDD933999185611183c5442d9d2eA4908Ec7
8
+ SENDER_PRIVATE_KEY=0x23856416fc7d1035e9c10a97cf62d032a69d51f63846f54c86983fc4b8784d2c
9
+ COVALIDATOR_ECIES_PRIVATE_KEY=0x03420130f4a37fc1c1f26e0c66560badefe5022922d8c6587df07c5f86908da5
10
+ COVALIDATOR_CALLBACK_PRIVATE_KEY=0x8077e893434f3119ec0bd29eb4c7fbf27e13e70eb6c07b46e76cc06d5f0086a9
11
+ COVALIDATOR_ACL_ADDR=0x3B22be60Ae699933959CA3cE147C96caa88Ccd3D
12
+ COVALIDATOR_INCO_EXECUTOR_ADDR=0x3B22be60Ae699933959CA3cE147C96caa88Ccd3D
13
+ COVALIDATOR_DECRYPTION_HANDLER_ADDR=0x3B22be60Ae699933959CA3cE147C96caa88Ccd3D
14
+
package/manifest.yaml CHANGED
@@ -1,3 +1,175 @@
1
+ incoLightning_0_1_29__183408998:
2
+ release:
3
+ name: incoLightning_0_1_29__183408998
4
+ executorAddress: "0x63D8135aF4D393B1dB43B649010c8D3EE19FC9fd"
5
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
6
+ pepper: testnet
7
+ version:
8
+ major: 0
9
+ minor: 1
10
+ patch: 29
11
+ shortSalt: "183408998"
12
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00d75ffa0caf0797c3f12d66"
13
+ deployments:
14
+ - decryptSigner: "0x000000000000000000000000000000000000baBe"
15
+ eciesPublicKey: "0x000000000000000000000000000000000000000000000000000000000000\
16
+ 000000000000000000000000000000000000000000000000000000000000000000babe"
17
+ chainId: "7311099111"
18
+ blockNumber: "1"
19
+ chainName: Inco Release Chain
20
+ active: true
21
+ deployDate: 2025-04-22T16:02:38.372Z
22
+ commit: v3-28-g93c05a49-dirty
23
+ addTwoAddress: "0x04461CD161001BC484C55D253F744462A6eADc10"
24
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
25
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
26
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
27
+ chainId: "10143"
28
+ blockNumber: "13464615"
29
+ chainName: Monad Testnet
30
+ active: true
31
+ deployDate: 2025-04-22T16:01:14.380Z
32
+ commit: v3-28-g93c05a49-dirty
33
+ addTwoAddress: "0x3E0Aa45e4BD7E86093460A302803298a0EE7155a"
34
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
35
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
36
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
37
+ chainId: "84532"
38
+ blockNumber: "24784654"
39
+ chainName: Base Sepolia
40
+ active: true
41
+ deployDate: 2025-04-22T16:00:02.028Z
42
+ commit: v3-28-g93c05a49-dirty
43
+ addTwoAddress: "0xF10E6B2ddd168D105546f39E1Ba64004E4FbeF10"
44
+ incoLightning_0_1_29__340846814:
45
+ release:
46
+ name: incoLightning_0_1_29__340846814
47
+ executorAddress: "0x3B22be60Ae699933959CA3cE147C96caa88Ccd3D"
48
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
49
+ pepper: devnet
50
+ version:
51
+ major: 0
52
+ minor: 1
53
+ patch: 29
54
+ shortSalt: "340846814"
55
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00b001d6742fded0dd599ede"
56
+ deployments:
57
+ - decryptSigner: "0x000000000000000000000000000000000000baBe"
58
+ eciesPublicKey: "0x000000000000000000000000000000000000000000000000000000000000\
59
+ 000000000000000000000000000000000000000000000000000000000000000000babe"
60
+ chainId: "7311099111"
61
+ blockNumber: "1"
62
+ chainName: Inco Release Chain
63
+ active: true
64
+ deployDate: 2025-04-22T15:59:01.071Z
65
+ commit: v3-28-g93c05a49-dirty
66
+ addTwoAddress: "0x04461CD161001BC484C55D253F744462A6eADc10"
67
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
68
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
69
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
70
+ chainId: "10143"
71
+ blockNumber: "13464197"
72
+ chainName: Monad Testnet
73
+ active: true
74
+ deployDate: 2025-04-22T15:57:26.862Z
75
+ commit: v3-28-g93c05a49-dirty
76
+ addTwoAddress: "0x6A23b79203F1Db95947423291C8177B144DDE372"
77
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
78
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
79
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
80
+ chainId: "84532"
81
+ blockNumber: "24784527"
82
+ chainName: Base Sepolia
83
+ active: true
84
+ deployDate: 2025-04-22T15:55:47.828Z
85
+ commit: v3-28-g93c05a49-dirty
86
+ addTwoAddress: "0x1A98fB1f7E57C0648b1d2A7DEA6e126C302A7e93"
87
+ incoLightning_0_1_27__558243565:
88
+ release:
89
+ name: incoLightning_0_1_27__558243565
90
+ executorAddress: "0x595dc0fA68e7847aC1b1d52a56A1551ad0e38472"
91
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
92
+ pepper: testnet
93
+ version:
94
+ major: 0
95
+ minor: 1
96
+ patch: 27
97
+ shortSalt: "558243565"
98
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc008f0e1b154a58f3ce49d6ed"
99
+ deployments:
100
+ - decryptSigner: "0x000000000000000000000000000000000000baBe"
101
+ eciesPublicKey: "0x000000000000000000000000000000000000000000000000000000000000\
102
+ 000000000000000000000000000000000000000000000000000000000000000000babe"
103
+ chainId: "7311099111"
104
+ blockNumber: "1"
105
+ chainName: Inco Release Chain
106
+ active: true
107
+ deployDate: 2025-04-22T14:57:24.620Z
108
+ commit: v3-28-g652cc4a1-dirty
109
+ addTwoAddress: "0x04461CD161001BC484C55D253F744462A6eADc10"
110
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
111
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
112
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
113
+ chainId: "10143"
114
+ blockNumber: "13457424"
115
+ chainName: Monad Testnet
116
+ active: true
117
+ deployDate: 2025-04-22T14:57:15.486Z
118
+ commit: v3-28-g652cc4a1-dirty
119
+ addTwoAddress: "0xbbf1f797b5e132b72f4a45E1923cBb0BFeca80FA"
120
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
121
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
122
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
123
+ chainId: "84532"
124
+ blockNumber: "24782764"
125
+ chainName: Base Sepolia
126
+ active: true
127
+ deployDate: 2025-04-22T14:57:02.375Z
128
+ commit: v3-28-g652cc4a1
129
+ addTwoAddress: "0x0c6320A91ec6BA7d42B4f079132fD71A90C12e22"
130
+ incoLightning_0_1_27__125335042:
131
+ release:
132
+ name: incoLightning_0_1_27__125335042
133
+ executorAddress: "0x902B77583C7C5df71C95114707C4974A8d5Dff9D"
134
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
135
+ pepper: devnet
136
+ version:
137
+ major: 0
138
+ minor: 1
139
+ patch: 27
140
+ shortSalt: "125335042"
141
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc003343825a7e951afb24c202"
142
+ deployments:
143
+ - decryptSigner: "0x000000000000000000000000000000000000baBe"
144
+ eciesPublicKey: "0x000000000000000000000000000000000000000000000000000000000000\
145
+ 000000000000000000000000000000000000000000000000000000000000000000babe"
146
+ chainId: "7311099111"
147
+ blockNumber: "1"
148
+ chainName: Inco Release Chain
149
+ active: true
150
+ deployDate: 2025-04-22T14:35:10.281Z
151
+ commit: v3-27-ge3d04b6a-dirty
152
+ addTwoAddress: "0x04461CD161001BC484C55D253F744462A6eADc10"
153
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
154
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
155
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
156
+ chainId: "10143"
157
+ blockNumber: "13454931"
158
+ chainName: Monad Testnet
159
+ active: true
160
+ deployDate: 2025-04-22T14:35:02.958Z
161
+ commit: v3-27-ge3d04b6a-dirty
162
+ addTwoAddress: "0xC1ee708D522B8b0743B5C5309AeD6b6b4C4102a6"
163
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
164
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
165
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
166
+ chainId: "84532"
167
+ blockNumber: "24782097"
168
+ chainName: Base Sepolia
169
+ active: true
170
+ deployDate: 2025-04-22T14:34:47.565Z
171
+ commit: v3-27-ge3d04b6a-dirty
172
+ addTwoAddress: "0xAac318ca07FCA665c4d27A7e9e8FB65B89AfAC83"
1
173
  incoLightning_0_1_26__18043964:
2
174
  release:
3
175
  name: incoLightning_0_1_26__18043964
@@ -20,7 +192,6 @@ incoLightning_0_1_26__18043964:
20
192
  active: true
21
193
  deployDate: 2025-04-22T12:14:50.447Z
22
194
  commit: v3-26-g623cec72-dirty
23
- sessionVerifierAddress: "0x0F508B0Fb940595046AB0eceB7A4C8b3e20Cb674"
24
195
  addTwoAddress: "0x70fC34B18B12E945cb2204FA77E5f8e1581890C3"
25
196
  - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
26
197
  eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
@@ -31,7 +202,6 @@ incoLightning_0_1_26__18043964:
31
202
  active: true
32
203
  deployDate: 2025-04-22T12:14:42.391Z
33
204
  commit: v3-26-g623cec72-dirty
34
- sessionVerifierAddress: "0x0F508B0Fb940595046AB0eceB7A4C8b3e20Cb674"
35
205
  addTwoAddress: "0x4A49112FB866F6d5D05845D264b430cD3bbAb9f6"
36
206
  - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
37
207
  eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
@@ -42,7 +212,6 @@ incoLightning_0_1_26__18043964:
42
212
  active: true
43
213
  deployDate: 2025-04-22T12:14:25.354Z
44
214
  commit: v3-26-g623cec72-dirty
45
- sessionVerifierAddress: "0x0F508B0Fb940595046AB0eceB7A4C8b3e20Cb674"
46
215
  addTwoAddress: "0x2b5E34844997681168049783D30CD84B5962cb50"
47
216
  incoLightning_0_1_26__444235330:
48
217
  release:
@@ -66,7 +235,6 @@ incoLightning_0_1_26__444235330:
66
235
  active: true
67
236
  deployDate: 2025-04-22T09:11:15.398Z
68
237
  commit: v3-24-gc9716e6c-dirty
69
- sessionVerifierAddress: "0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F"
70
238
  addTwoAddress: "0x70fC34B18B12E945cb2204FA77E5f8e1581890C3"
71
239
  - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
72
240
  eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
@@ -77,7 +245,6 @@ incoLightning_0_1_26__444235330:
77
245
  active: true
78
246
  deployDate: 2025-04-22T09:11:06.223Z
79
247
  commit: v3-24-gc9716e6c-dirty
80
- sessionVerifierAddress: "0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F"
81
248
  addTwoAddress: "0xfeE9C1E41b2268a4ad8EaDA35f510b8d89Cd041c"
82
249
  - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
83
250
  eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
@@ -88,5 +255,4 @@ incoLightning_0_1_26__444235330:
88
255
  active: true
89
256
  deployDate: 2025-04-22T09:10:33.275Z
90
257
  commit: v3-24-gc9716e6c-dirty
91
- sessionVerifierAddress: "0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F"
92
258
  addTwoAddress: "0xeEa387f7c866A81c2AF532D9ed48c60F179C9827"
package/package.json CHANGED
@@ -1,22 +1,20 @@
1
1
  {
2
2
  "name": "@inco/lightning",
3
- "version": "0.1.21",
3
+ "version": "0.1.30",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "files": [
6
6
  "src/",
7
- "foundry.toml",
8
7
  "dumps/",
9
8
  "CHANGELOG.md",
10
- "remappings.txt",
11
- "foundry.toml",
12
9
  "manifest.yaml"
13
10
  ],
14
11
  "scripts": {
12
+ "generate:libraries": "bun run ../pega/lib/deployment/cmd/generate-libraries.ts",
15
13
  "publish:github": "bun publish --registry=https://npm.pkg.github.com",
16
- "publish:npm": "bun publish",
17
- "generate:libraries": "bun run ../pega/lib/deployment/cmd/generate-libraries.ts"
14
+ "publish:npm": "bun publish --access public"
18
15
  },
19
16
  "dependencies": {
17
+ "@inco/shared": "^0.1.0",
20
18
  "@openzeppelin/contracts": "^5.2.0",
21
19
  "@openzeppelin/contracts-upgradeable": "^5.2.0",
22
20
  "ds-test": "https://github.com/dapphub/ds-test",
package/src/Lib.sol CHANGED
@@ -6,9 +6,11 @@
6
6
  pragma solidity ^0.8;
7
7
 
8
8
  import "./IncoLightning.sol";
9
- import { ebool, euint256, ETypes } from "./Types.sol";
9
+ import {ebool, euint256, ETypes} from "./Types.sol";
10
10
 
11
- IncoLightning constant inco = IncoLightning(0x69Ef6a59f9eE2d6f3b49eA3F79bcF1553512DF0e);
11
+ IncoLightning constant inco = IncoLightning(
12
+ 0x63D8135aF4D393B1dB43B649010c8D3EE19FC9fd
13
+ );
12
14
  address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
13
15
  uint256 constant defaultDecryptionDelayLimit = 2 hours;
14
16
 
@@ -96,15 +98,30 @@ library e {
96
98
  }
97
99
 
98
100
  function and(euint256 a, euint256 b) internal returns (euint256) {
99
- return euint256.wrap(inco.eBitAnd(euint256.unwrap(s(a)), euint256.unwrap(s(b))));
101
+ return
102
+ euint256.wrap(
103
+ inco.eBitAnd(euint256.unwrap(s(a)), euint256.unwrap(s(b)))
104
+ );
100
105
  }
101
106
 
102
107
  function and(euint256 a, uint256 b) internal returns (euint256) {
103
- return euint256.wrap(inco.eBitAnd(euint256.unwrap(s(a)), euint256.unwrap(asEuint256(b))));
108
+ return
109
+ euint256.wrap(
110
+ inco.eBitAnd(
111
+ euint256.unwrap(s(a)),
112
+ euint256.unwrap(asEuint256(b))
113
+ )
114
+ );
104
115
  }
105
116
 
106
117
  function and(uint256 a, euint256 b) internal returns (euint256) {
107
- return euint256.wrap(inco.eBitAnd(euint256.unwrap(asEuint256(a)), euint256.unwrap(s(b))));
118
+ return
119
+ euint256.wrap(
120
+ inco.eBitAnd(
121
+ euint256.unwrap(asEuint256(a)),
122
+ euint256.unwrap(s(b))
123
+ )
124
+ );
108
125
  }
109
126
 
110
127
  function and(ebool a, ebool b) internal returns (ebool) {
@@ -112,23 +129,44 @@ library e {
112
129
  }
113
130
 
114
131
  function and(ebool a, bool b) internal returns (ebool) {
115
- return ebool.wrap(inco.eBitAnd(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b))));
132
+ return
133
+ ebool.wrap(
134
+ inco.eBitAnd(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b)))
135
+ );
116
136
  }
117
137
 
118
138
  function and(bool a, ebool b) internal returns (ebool) {
119
- return ebool.wrap(inco.eBitAnd(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b))));
139
+ return
140
+ ebool.wrap(
141
+ inco.eBitAnd(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b)))
142
+ );
120
143
  }
121
144
 
122
145
  function or(euint256 a, euint256 b) internal returns (euint256) {
123
- return euint256.wrap(inco.eBitOr(euint256.unwrap(s(a)), euint256.unwrap(s(b))));
146
+ return
147
+ euint256.wrap(
148
+ inco.eBitOr(euint256.unwrap(s(a)), euint256.unwrap(s(b)))
149
+ );
124
150
  }
125
151
 
126
152
  function or(euint256 a, uint256 b) internal returns (euint256) {
127
- return euint256.wrap(inco.eBitOr(euint256.unwrap(s(a)), euint256.unwrap(asEuint256(b))));
153
+ return
154
+ euint256.wrap(
155
+ inco.eBitOr(
156
+ euint256.unwrap(s(a)),
157
+ euint256.unwrap(asEuint256(b))
158
+ )
159
+ );
128
160
  }
129
161
 
130
162
  function or(uint256 a, euint256 b) internal returns (euint256) {
131
- return euint256.wrap(inco.eBitOr(euint256.unwrap(asEuint256(a)), euint256.unwrap(s(b))));
163
+ return
164
+ euint256.wrap(
165
+ inco.eBitOr(
166
+ euint256.unwrap(asEuint256(a)),
167
+ euint256.unwrap(s(b))
168
+ )
169
+ );
132
170
  }
133
171
 
134
172
  function or(ebool a, ebool b) internal returns (ebool) {
@@ -136,23 +174,44 @@ library e {
136
174
  }
137
175
 
138
176
  function or(ebool a, bool b) internal returns (ebool) {
139
- return ebool.wrap(inco.eBitOr(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b))));
177
+ return
178
+ ebool.wrap(
179
+ inco.eBitOr(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b)))
180
+ );
140
181
  }
141
182
 
142
183
  function or(bool a, ebool b) internal returns (ebool) {
143
- return ebool.wrap(inco.eBitOr(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b))));
184
+ return
185
+ ebool.wrap(
186
+ inco.eBitOr(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b)))
187
+ );
144
188
  }
145
189
 
146
190
  function xor(euint256 a, euint256 b) internal returns (euint256) {
147
- return euint256.wrap(inco.eBitXor(euint256.unwrap(s(a)), euint256.unwrap(s(b))));
191
+ return
192
+ euint256.wrap(
193
+ inco.eBitXor(euint256.unwrap(s(a)), euint256.unwrap(s(b)))
194
+ );
148
195
  }
149
196
 
150
197
  function xor(euint256 a, uint256 b) internal returns (euint256) {
151
- return euint256.wrap(inco.eBitXor(euint256.unwrap(s(a)), euint256.unwrap(asEuint256(b))));
198
+ return
199
+ euint256.wrap(
200
+ inco.eBitXor(
201
+ euint256.unwrap(s(a)),
202
+ euint256.unwrap(asEuint256(b))
203
+ )
204
+ );
152
205
  }
153
206
 
154
207
  function xor(uint256 a, euint256 b) internal returns (euint256) {
155
- return euint256.wrap(inco.eBitXor(euint256.unwrap(asEuint256(a)), euint256.unwrap(s(b))));
208
+ return
209
+ euint256.wrap(
210
+ inco.eBitXor(
211
+ euint256.unwrap(asEuint256(a)),
212
+ euint256.unwrap(s(b))
213
+ )
214
+ );
156
215
  }
157
216
 
158
217
  function xor(ebool a, ebool b) internal returns (ebool) {
@@ -160,11 +219,17 @@ library e {
160
219
  }
161
220
 
162
221
  function xor(ebool a, bool b) internal returns (ebool) {
163
- return ebool.wrap(inco.eBitXor(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b))));
222
+ return
223
+ ebool.wrap(
224
+ inco.eBitXor(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b)))
225
+ );
164
226
  }
165
227
 
166
228
  function xor(bool a, ebool b) internal returns (ebool) {
167
- return ebool.wrap(inco.eBitXor(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b))));
229
+ return
230
+ ebool.wrap(
231
+ inco.eBitXor(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b)))
232
+ );
168
233
  }
169
234
 
170
235
  function shl(euint256 a, euint256 b) internal returns (euint256) {
@@ -320,11 +385,23 @@ library e {
320
385
  }
321
386
 
322
387
  function randBounded(uint256 upperBound) internal returns (euint256) {
323
- return euint256.wrap(inco.eRandBounded(euint256.unwrap(asEuint256(upperBound)), ETypes.Uint256));
388
+ return
389
+ euint256.wrap(
390
+ inco.eRandBounded(
391
+ euint256.unwrap(asEuint256(upperBound)),
392
+ ETypes.Uint256
393
+ )
394
+ );
324
395
  }
325
396
 
326
397
  function randBounded(euint256 upperBound) internal returns (euint256) {
327
- return euint256.wrap(inco.eRandBounded(euint256.unwrap(s(upperBound)), ETypes.Uint256));
398
+ return
399
+ euint256.wrap(
400
+ inco.eRandBounded(
401
+ euint256.unwrap(s(upperBound)),
402
+ ETypes.Uint256
403
+ )
404
+ );
328
405
  }
329
406
 
330
407
  function asEuint256(uint256 a) internal returns (euint256) {
@@ -343,11 +420,17 @@ library e {
343
420
  return euint256.wrap(inco.eCast(ebool.unwrap(a), ETypes.Uint256));
344
421
  }
345
422
 
346
- function newEuint256(bytes memory ciphertext, address user) internal returns (euint256) {
423
+ function newEuint256(
424
+ bytes memory ciphertext,
425
+ address user
426
+ ) internal returns (euint256) {
347
427
  return inco.newEuint256(ciphertext, user);
348
428
  }
349
429
 
350
- function newEbool(bytes memory ciphertext, address user) internal returns (ebool) {
430
+ function newEbool(
431
+ bytes memory ciphertext,
432
+ address user
433
+ ) internal returns (ebool) {
351
434
  return inco.newEbool(ciphertext, user);
352
435
  }
353
436
 
@@ -371,19 +454,59 @@ library e {
371
454
  return inco.isAllowed(euint256.unwrap(a), user);
372
455
  }
373
456
 
374
- function select(ebool control, euint256 ifTrue, euint256 ifFalse) internal returns (euint256) {
375
- return euint256.wrap(inco.eIfThenElse(s(control), euint256.unwrap(s(ifTrue)), euint256.unwrap(s(ifFalse))));
376
- }
377
-
378
- function select(ebool control, ebool ifTrue, ebool ifFalse) internal returns (ebool) {
379
- return ebool.wrap(inco.eIfThenElse(s(control), ebool.unwrap(s(ifTrue)), ebool.unwrap(s(ifFalse))));
380
- }
381
-
382
- function requestDecryption(euint256 a, bytes4 callbackSelector, bytes memory callbackData) internal returns (uint256 requestId) {
383
- requestId = inco.requestDecryption(callbackSelector, block.timestamp + defaultDecryptionDelayLimit, euint256.unwrap(s(a)), callbackData);
384
- }
385
-
386
- function requestDecryption(ebool a, bytes4 callbackSelector, bytes memory callbackData) internal returns (uint256 requestId) {
387
- requestId = inco.requestDecryption(callbackSelector, block.timestamp + defaultDecryptionDelayLimit, ebool.unwrap(s(a)), callbackData);
388
- }
389
- }
457
+ function select(
458
+ ebool control,
459
+ euint256 ifTrue,
460
+ euint256 ifFalse
461
+ ) internal returns (euint256) {
462
+ return
463
+ euint256.wrap(
464
+ inco.eIfThenElse(
465
+ s(control),
466
+ euint256.unwrap(s(ifTrue)),
467
+ euint256.unwrap(s(ifFalse))
468
+ )
469
+ );
470
+ }
471
+
472
+ function select(
473
+ ebool control,
474
+ ebool ifTrue,
475
+ ebool ifFalse
476
+ ) internal returns (ebool) {
477
+ return
478
+ ebool.wrap(
479
+ inco.eIfThenElse(
480
+ s(control),
481
+ ebool.unwrap(s(ifTrue)),
482
+ ebool.unwrap(s(ifFalse))
483
+ )
484
+ );
485
+ }
486
+
487
+ function requestDecryption(
488
+ euint256 a,
489
+ bytes4 callbackSelector,
490
+ bytes memory callbackData
491
+ ) internal returns (uint256 requestId) {
492
+ requestId = inco.requestDecryption(
493
+ callbackSelector,
494
+ block.timestamp + defaultDecryptionDelayLimit,
495
+ euint256.unwrap(s(a)),
496
+ callbackData
497
+ );
498
+ }
499
+
500
+ function requestDecryption(
501
+ ebool a,
502
+ bytes4 callbackSelector,
503
+ bytes memory callbackData
504
+ ) internal returns (uint256 requestId) {
505
+ requestId = inco.requestDecryption(
506
+ callbackSelector,
507
+ block.timestamp + defaultDecryptionDelayLimit,
508
+ ebool.unwrap(s(a)),
509
+ callbackData
510
+ );
511
+ }
512
+ }