@zentity/fhevm-contracts 0.1.0

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.
Files changed (83) hide show
  1. package/README.md +160 -0
  2. package/abi/ComplianceRules.json +352 -0
  3. package/abi/CompliantERC20.json +493 -0
  4. package/abi/IdentityRegistry.json +712 -0
  5. package/abi/index.d.ts +3 -0
  6. package/abi/index.js +9 -0
  7. package/contracts/ARCHITECTURE.md +66 -0
  8. package/contracts/ARCHITECTURE_EXPLAINER.md +77 -0
  9. package/contracts/compliance/ComplianceRules.sol +255 -0
  10. package/contracts/core/IdentityRegistry.sol +352 -0
  11. package/contracts/interfaces/IIdentityRegistry.sol +226 -0
  12. package/contracts/mocks/.gitkeep +0 -0
  13. package/contracts/tokens/CompliantERC20.sol +379 -0
  14. package/deployments/hardhat/addresses.json +20 -0
  15. package/deployments/localhost/.chainId +1 -0
  16. package/deployments/localhost/ComplianceRules.json +662 -0
  17. package/deployments/localhost/CompliantERC20.json +888 -0
  18. package/deployments/localhost/IdentityRegistry.json +1093 -0
  19. package/deployments/localhost/solcInputs/e36969353329df673b4fae03d39e01c4.json +60 -0
  20. package/deployments/sepolia/.chainId +1 -0
  21. package/deployments/sepolia/.gitkeep +0 -0
  22. package/deployments/sepolia/ComplianceRules.json +662 -0
  23. package/deployments/sepolia/CompliantERC20.json +888 -0
  24. package/deployments/sepolia/IdentityRegistry.json +1093 -0
  25. package/deployments/sepolia/solcInputs/93d280ff0d4e798a18947a9ed6015031.json +60 -0
  26. package/dist/index.d.ts +459 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +135 -0
  29. package/package.json +110 -0
  30. package/typechain-types/@fhevm/index.ts +5 -0
  31. package/typechain-types/@fhevm/solidity/config/ZamaConfig.sol/ZamaConfig.ts +69 -0
  32. package/typechain-types/@fhevm/solidity/config/ZamaConfig.sol/ZamaEthereumConfig.ts +90 -0
  33. package/typechain-types/@fhevm/solidity/config/ZamaConfig.sol/index.ts +5 -0
  34. package/typechain-types/@fhevm/solidity/config/index.ts +5 -0
  35. package/typechain-types/@fhevm/solidity/index.ts +7 -0
  36. package/typechain-types/@fhevm/solidity/lib/FHE.sol/FHE.ts +112 -0
  37. package/typechain-types/@fhevm/solidity/lib/FHE.sol/IKMSVerifier.ts +108 -0
  38. package/typechain-types/@fhevm/solidity/lib/FHE.sol/index.ts +5 -0
  39. package/typechain-types/@fhevm/solidity/lib/Impl.sol/IACL.ts +190 -0
  40. package/typechain-types/@fhevm/solidity/lib/Impl.sol/IFHEVMExecutor.ts +623 -0
  41. package/typechain-types/@fhevm/solidity/lib/Impl.sol/IInputVerifier.ts +90 -0
  42. package/typechain-types/@fhevm/solidity/lib/Impl.sol/index.ts +6 -0
  43. package/typechain-types/@fhevm/solidity/lib/index.ts +7 -0
  44. package/typechain-types/common.ts +131 -0
  45. package/typechain-types/contracts/compliance/ComplianceRules.ts +479 -0
  46. package/typechain-types/contracts/compliance/index.ts +4 -0
  47. package/typechain-types/contracts/core/IdentityRegistry.ts +874 -0
  48. package/typechain-types/contracts/core/index.ts +4 -0
  49. package/typechain-types/contracts/index.ts +11 -0
  50. package/typechain-types/contracts/interfaces/IIdentityRegistry.ts +798 -0
  51. package/typechain-types/contracts/interfaces/index.ts +4 -0
  52. package/typechain-types/contracts/tokens/CompliantERC20.sol/CompliantERC20.ts +572 -0
  53. package/typechain-types/contracts/tokens/CompliantERC20.sol/IComplianceChecker.ts +95 -0
  54. package/typechain-types/contracts/tokens/CompliantERC20.sol/index.ts +5 -0
  55. package/typechain-types/contracts/tokens/index.ts +5 -0
  56. package/typechain-types/factories/@fhevm/index.ts +4 -0
  57. package/typechain-types/factories/@fhevm/solidity/config/ZamaConfig.sol/ZamaConfig__factory.ts +69 -0
  58. package/typechain-types/factories/@fhevm/solidity/config/ZamaConfig.sol/ZamaEthereumConfig__factory.ts +43 -0
  59. package/typechain-types/factories/@fhevm/solidity/config/ZamaConfig.sol/index.ts +5 -0
  60. package/typechain-types/factories/@fhevm/solidity/config/index.ts +4 -0
  61. package/typechain-types/factories/@fhevm/solidity/index.ts +5 -0
  62. package/typechain-types/factories/@fhevm/solidity/lib/FHE.sol/FHE__factory.ts +88 -0
  63. package/typechain-types/factories/@fhevm/solidity/lib/FHE.sol/IKMSVerifier__factory.ts +54 -0
  64. package/typechain-types/factories/@fhevm/solidity/lib/FHE.sol/index.ts +5 -0
  65. package/typechain-types/factories/@fhevm/solidity/lib/Impl.sol/IACL__factory.ts +121 -0
  66. package/typechain-types/factories/@fhevm/solidity/lib/Impl.sol/IFHEVMExecutor__factory.ts +810 -0
  67. package/typechain-types/factories/@fhevm/solidity/lib/Impl.sol/IInputVerifier__factory.ts +32 -0
  68. package/typechain-types/factories/@fhevm/solidity/lib/Impl.sol/index.ts +6 -0
  69. package/typechain-types/factories/@fhevm/solidity/lib/index.ts +5 -0
  70. package/typechain-types/factories/contracts/compliance/ComplianceRules__factory.ts +437 -0
  71. package/typechain-types/factories/contracts/compliance/index.ts +4 -0
  72. package/typechain-types/factories/contracts/core/IdentityRegistry__factory.ts +777 -0
  73. package/typechain-types/factories/contracts/core/index.ts +4 -0
  74. package/typechain-types/factories/contracts/index.ts +7 -0
  75. package/typechain-types/factories/contracts/interfaces/IIdentityRegistry__factory.ts +640 -0
  76. package/typechain-types/factories/contracts/interfaces/index.ts +4 -0
  77. package/typechain-types/factories/contracts/tokens/CompliantERC20.sol/CompliantERC20__factory.ts +581 -0
  78. package/typechain-types/factories/contracts/tokens/CompliantERC20.sol/IComplianceChecker__factory.ts +44 -0
  79. package/typechain-types/factories/contracts/tokens/CompliantERC20.sol/index.ts +5 -0
  80. package/typechain-types/factories/contracts/tokens/index.ts +4 -0
  81. package/typechain-types/factories/index.ts +5 -0
  82. package/typechain-types/hardhat.d.ts +261 -0
  83. package/typechain-types/index.ts +32 -0
@@ -0,0 +1,493 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "string",
6
+ "name": "tokenName",
7
+ "type": "string"
8
+ },
9
+ {
10
+ "internalType": "string",
11
+ "name": "tokenSymbol",
12
+ "type": "string"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "checker",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "ComplianceCheckerNotSet",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [],
30
+ "name": "InvalidOwner",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [],
35
+ "name": "OnlyOwner",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [],
40
+ "name": "OnlyPendingOwner",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "TotalSupplyOverflow",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "UnauthorizedCiphertext",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [],
55
+ "name": "ZamaProtocolUnsupported",
56
+ "type": "error"
57
+ },
58
+ {
59
+ "anonymous": false,
60
+ "inputs": [
61
+ {
62
+ "indexed": true,
63
+ "internalType": "address",
64
+ "name": "owner",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "indexed": true,
69
+ "internalType": "address",
70
+ "name": "spender",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "Approval",
75
+ "type": "event"
76
+ },
77
+ {
78
+ "anonymous": false,
79
+ "inputs": [
80
+ {
81
+ "indexed": true,
82
+ "internalType": "address",
83
+ "name": "newChecker",
84
+ "type": "address"
85
+ }
86
+ ],
87
+ "name": "ComplianceCheckerUpdated",
88
+ "type": "event"
89
+ },
90
+ {
91
+ "anonymous": false,
92
+ "inputs": [
93
+ {
94
+ "indexed": true,
95
+ "internalType": "address",
96
+ "name": "to",
97
+ "type": "address"
98
+ },
99
+ {
100
+ "indexed": true,
101
+ "internalType": "uint256",
102
+ "name": "amount",
103
+ "type": "uint256"
104
+ }
105
+ ],
106
+ "name": "Mint",
107
+ "type": "event"
108
+ },
109
+ {
110
+ "anonymous": false,
111
+ "inputs": [
112
+ {
113
+ "indexed": true,
114
+ "internalType": "address",
115
+ "name": "currentOwner",
116
+ "type": "address"
117
+ },
118
+ {
119
+ "indexed": true,
120
+ "internalType": "address",
121
+ "name": "pendingOwner",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "name": "OwnershipTransferStarted",
126
+ "type": "event"
127
+ },
128
+ {
129
+ "anonymous": false,
130
+ "inputs": [
131
+ {
132
+ "indexed": true,
133
+ "internalType": "address",
134
+ "name": "previousOwner",
135
+ "type": "address"
136
+ },
137
+ {
138
+ "indexed": true,
139
+ "internalType": "address",
140
+ "name": "newOwner",
141
+ "type": "address"
142
+ }
143
+ ],
144
+ "name": "OwnershipTransferred",
145
+ "type": "event"
146
+ },
147
+ {
148
+ "anonymous": false,
149
+ "inputs": [
150
+ {
151
+ "indexed": true,
152
+ "internalType": "address",
153
+ "name": "from",
154
+ "type": "address"
155
+ },
156
+ {
157
+ "indexed": true,
158
+ "internalType": "address",
159
+ "name": "to",
160
+ "type": "address"
161
+ }
162
+ ],
163
+ "name": "Transfer",
164
+ "type": "event"
165
+ },
166
+ {
167
+ "inputs": [],
168
+ "name": "DECIMALS",
169
+ "outputs": [
170
+ {
171
+ "internalType": "uint8",
172
+ "name": "",
173
+ "type": "uint8"
174
+ }
175
+ ],
176
+ "stateMutability": "view",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [],
181
+ "name": "acceptOwnership",
182
+ "outputs": [],
183
+ "stateMutability": "nonpayable",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "inputs": [
188
+ {
189
+ "internalType": "address",
190
+ "name": "account",
191
+ "type": "address"
192
+ },
193
+ {
194
+ "internalType": "address",
195
+ "name": "spender",
196
+ "type": "address"
197
+ }
198
+ ],
199
+ "name": "allowance",
200
+ "outputs": [
201
+ {
202
+ "internalType": "euint64",
203
+ "name": "",
204
+ "type": "bytes32"
205
+ }
206
+ ],
207
+ "stateMutability": "view",
208
+ "type": "function"
209
+ },
210
+ {
211
+ "inputs": [
212
+ {
213
+ "internalType": "address",
214
+ "name": "spender",
215
+ "type": "address"
216
+ },
217
+ {
218
+ "internalType": "externalEuint64",
219
+ "name": "encryptedAmount",
220
+ "type": "bytes32"
221
+ },
222
+ {
223
+ "internalType": "bytes",
224
+ "name": "inputProof",
225
+ "type": "bytes"
226
+ }
227
+ ],
228
+ "name": "approve",
229
+ "outputs": [
230
+ {
231
+ "internalType": "bool",
232
+ "name": "success",
233
+ "type": "bool"
234
+ }
235
+ ],
236
+ "stateMutability": "nonpayable",
237
+ "type": "function"
238
+ },
239
+ {
240
+ "inputs": [
241
+ {
242
+ "internalType": "address",
243
+ "name": "account",
244
+ "type": "address"
245
+ }
246
+ ],
247
+ "name": "balanceOf",
248
+ "outputs": [
249
+ {
250
+ "internalType": "euint64",
251
+ "name": "",
252
+ "type": "bytes32"
253
+ }
254
+ ],
255
+ "stateMutability": "view",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [],
260
+ "name": "complianceChecker",
261
+ "outputs": [
262
+ {
263
+ "internalType": "contract IComplianceChecker",
264
+ "name": "",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "stateMutability": "view",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "inputs": [],
273
+ "name": "confidentialProtocolId",
274
+ "outputs": [
275
+ {
276
+ "internalType": "uint256",
277
+ "name": "",
278
+ "type": "uint256"
279
+ }
280
+ ],
281
+ "stateMutability": "view",
282
+ "type": "function"
283
+ },
284
+ {
285
+ "inputs": [],
286
+ "name": "decimals",
287
+ "outputs": [
288
+ {
289
+ "internalType": "uint8",
290
+ "name": "",
291
+ "type": "uint8"
292
+ }
293
+ ],
294
+ "stateMutability": "pure",
295
+ "type": "function"
296
+ },
297
+ {
298
+ "inputs": [
299
+ {
300
+ "internalType": "address",
301
+ "name": "to",
302
+ "type": "address"
303
+ },
304
+ {
305
+ "internalType": "uint256",
306
+ "name": "amount",
307
+ "type": "uint256"
308
+ }
309
+ ],
310
+ "name": "mint",
311
+ "outputs": [],
312
+ "stateMutability": "nonpayable",
313
+ "type": "function"
314
+ },
315
+ {
316
+ "inputs": [],
317
+ "name": "name",
318
+ "outputs": [
319
+ {
320
+ "internalType": "string",
321
+ "name": "",
322
+ "type": "string"
323
+ }
324
+ ],
325
+ "stateMutability": "view",
326
+ "type": "function"
327
+ },
328
+ {
329
+ "inputs": [],
330
+ "name": "owner",
331
+ "outputs": [
332
+ {
333
+ "internalType": "address",
334
+ "name": "",
335
+ "type": "address"
336
+ }
337
+ ],
338
+ "stateMutability": "view",
339
+ "type": "function"
340
+ },
341
+ {
342
+ "inputs": [],
343
+ "name": "pendingOwner",
344
+ "outputs": [
345
+ {
346
+ "internalType": "address",
347
+ "name": "",
348
+ "type": "address"
349
+ }
350
+ ],
351
+ "stateMutability": "view",
352
+ "type": "function"
353
+ },
354
+ {
355
+ "inputs": [
356
+ {
357
+ "internalType": "address",
358
+ "name": "checker",
359
+ "type": "address"
360
+ }
361
+ ],
362
+ "name": "setComplianceChecker",
363
+ "outputs": [],
364
+ "stateMutability": "nonpayable",
365
+ "type": "function"
366
+ },
367
+ {
368
+ "inputs": [],
369
+ "name": "symbol",
370
+ "outputs": [
371
+ {
372
+ "internalType": "string",
373
+ "name": "",
374
+ "type": "string"
375
+ }
376
+ ],
377
+ "stateMutability": "view",
378
+ "type": "function"
379
+ },
380
+ {
381
+ "inputs": [],
382
+ "name": "totalSupply",
383
+ "outputs": [
384
+ {
385
+ "internalType": "uint256",
386
+ "name": "",
387
+ "type": "uint256"
388
+ }
389
+ ],
390
+ "stateMutability": "view",
391
+ "type": "function"
392
+ },
393
+ {
394
+ "inputs": [
395
+ {
396
+ "internalType": "address",
397
+ "name": "to",
398
+ "type": "address"
399
+ },
400
+ {
401
+ "internalType": "externalEuint64",
402
+ "name": "encryptedAmount",
403
+ "type": "bytes32"
404
+ },
405
+ {
406
+ "internalType": "bytes",
407
+ "name": "inputProof",
408
+ "type": "bytes"
409
+ }
410
+ ],
411
+ "name": "transfer",
412
+ "outputs": [
413
+ {
414
+ "internalType": "bool",
415
+ "name": "success",
416
+ "type": "bool"
417
+ }
418
+ ],
419
+ "stateMutability": "nonpayable",
420
+ "type": "function"
421
+ },
422
+ {
423
+ "inputs": [
424
+ {
425
+ "internalType": "address",
426
+ "name": "to",
427
+ "type": "address"
428
+ },
429
+ {
430
+ "internalType": "euint64",
431
+ "name": "amount",
432
+ "type": "bytes32"
433
+ }
434
+ ],
435
+ "name": "transfer",
436
+ "outputs": [
437
+ {
438
+ "internalType": "bool",
439
+ "name": "success",
440
+ "type": "bool"
441
+ }
442
+ ],
443
+ "stateMutability": "nonpayable",
444
+ "type": "function"
445
+ },
446
+ {
447
+ "inputs": [
448
+ {
449
+ "internalType": "address",
450
+ "name": "from",
451
+ "type": "address"
452
+ },
453
+ {
454
+ "internalType": "address",
455
+ "name": "to",
456
+ "type": "address"
457
+ },
458
+ {
459
+ "internalType": "externalEuint64",
460
+ "name": "encryptedAmount",
461
+ "type": "bytes32"
462
+ },
463
+ {
464
+ "internalType": "bytes",
465
+ "name": "inputProof",
466
+ "type": "bytes"
467
+ }
468
+ ],
469
+ "name": "transferFrom",
470
+ "outputs": [
471
+ {
472
+ "internalType": "bool",
473
+ "name": "success",
474
+ "type": "bool"
475
+ }
476
+ ],
477
+ "stateMutability": "nonpayable",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [
482
+ {
483
+ "internalType": "address",
484
+ "name": "newOwner",
485
+ "type": "address"
486
+ }
487
+ ],
488
+ "name": "transferOwnership",
489
+ "outputs": [],
490
+ "stateMutability": "nonpayable",
491
+ "type": "function"
492
+ }
493
+ ]