@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,581 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import {
5
+ Contract,
6
+ ContractFactory,
7
+ ContractTransactionResponse,
8
+ Interface,
9
+ } from "ethers";
10
+ import type {
11
+ Signer,
12
+ AddressLike,
13
+ ContractDeployTransaction,
14
+ ContractRunner,
15
+ } from "ethers";
16
+ import type { NonPayableOverrides } from "../../../../common";
17
+ import type {
18
+ CompliantERC20,
19
+ CompliantERC20Interface,
20
+ } from "../../../../contracts/tokens/CompliantERC20.sol/CompliantERC20";
21
+
22
+ const _abi = [
23
+ {
24
+ inputs: [
25
+ {
26
+ internalType: "string",
27
+ name: "tokenName",
28
+ type: "string",
29
+ },
30
+ {
31
+ internalType: "string",
32
+ name: "tokenSymbol",
33
+ type: "string",
34
+ },
35
+ {
36
+ internalType: "address",
37
+ name: "checker",
38
+ type: "address",
39
+ },
40
+ ],
41
+ stateMutability: "nonpayable",
42
+ type: "constructor",
43
+ },
44
+ {
45
+ inputs: [],
46
+ name: "ComplianceCheckerNotSet",
47
+ type: "error",
48
+ },
49
+ {
50
+ inputs: [],
51
+ name: "InvalidOwner",
52
+ type: "error",
53
+ },
54
+ {
55
+ inputs: [],
56
+ name: "OnlyOwner",
57
+ type: "error",
58
+ },
59
+ {
60
+ inputs: [],
61
+ name: "OnlyPendingOwner",
62
+ type: "error",
63
+ },
64
+ {
65
+ inputs: [],
66
+ name: "TotalSupplyOverflow",
67
+ type: "error",
68
+ },
69
+ {
70
+ inputs: [],
71
+ name: "UnauthorizedCiphertext",
72
+ type: "error",
73
+ },
74
+ {
75
+ inputs: [],
76
+ name: "ZamaProtocolUnsupported",
77
+ type: "error",
78
+ },
79
+ {
80
+ anonymous: false,
81
+ inputs: [
82
+ {
83
+ indexed: true,
84
+ internalType: "address",
85
+ name: "owner",
86
+ type: "address",
87
+ },
88
+ {
89
+ indexed: true,
90
+ internalType: "address",
91
+ name: "spender",
92
+ type: "address",
93
+ },
94
+ ],
95
+ name: "Approval",
96
+ type: "event",
97
+ },
98
+ {
99
+ anonymous: false,
100
+ inputs: [
101
+ {
102
+ indexed: true,
103
+ internalType: "address",
104
+ name: "newChecker",
105
+ type: "address",
106
+ },
107
+ ],
108
+ name: "ComplianceCheckerUpdated",
109
+ type: "event",
110
+ },
111
+ {
112
+ anonymous: false,
113
+ inputs: [
114
+ {
115
+ indexed: true,
116
+ internalType: "address",
117
+ name: "to",
118
+ type: "address",
119
+ },
120
+ {
121
+ indexed: true,
122
+ internalType: "uint256",
123
+ name: "amount",
124
+ type: "uint256",
125
+ },
126
+ ],
127
+ name: "Mint",
128
+ type: "event",
129
+ },
130
+ {
131
+ anonymous: false,
132
+ inputs: [
133
+ {
134
+ indexed: true,
135
+ internalType: "address",
136
+ name: "currentOwner",
137
+ type: "address",
138
+ },
139
+ {
140
+ indexed: true,
141
+ internalType: "address",
142
+ name: "pendingOwner",
143
+ type: "address",
144
+ },
145
+ ],
146
+ name: "OwnershipTransferStarted",
147
+ type: "event",
148
+ },
149
+ {
150
+ anonymous: false,
151
+ inputs: [
152
+ {
153
+ indexed: true,
154
+ internalType: "address",
155
+ name: "previousOwner",
156
+ type: "address",
157
+ },
158
+ {
159
+ indexed: true,
160
+ internalType: "address",
161
+ name: "newOwner",
162
+ type: "address",
163
+ },
164
+ ],
165
+ name: "OwnershipTransferred",
166
+ type: "event",
167
+ },
168
+ {
169
+ anonymous: false,
170
+ inputs: [
171
+ {
172
+ indexed: true,
173
+ internalType: "address",
174
+ name: "from",
175
+ type: "address",
176
+ },
177
+ {
178
+ indexed: true,
179
+ internalType: "address",
180
+ name: "to",
181
+ type: "address",
182
+ },
183
+ ],
184
+ name: "Transfer",
185
+ type: "event",
186
+ },
187
+ {
188
+ inputs: [],
189
+ name: "DECIMALS",
190
+ outputs: [
191
+ {
192
+ internalType: "uint8",
193
+ name: "",
194
+ type: "uint8",
195
+ },
196
+ ],
197
+ stateMutability: "view",
198
+ type: "function",
199
+ },
200
+ {
201
+ inputs: [],
202
+ name: "acceptOwnership",
203
+ outputs: [],
204
+ stateMutability: "nonpayable",
205
+ type: "function",
206
+ },
207
+ {
208
+ inputs: [
209
+ {
210
+ internalType: "address",
211
+ name: "account",
212
+ type: "address",
213
+ },
214
+ {
215
+ internalType: "address",
216
+ name: "spender",
217
+ type: "address",
218
+ },
219
+ ],
220
+ name: "allowance",
221
+ outputs: [
222
+ {
223
+ internalType: "euint64",
224
+ name: "",
225
+ type: "bytes32",
226
+ },
227
+ ],
228
+ stateMutability: "view",
229
+ type: "function",
230
+ },
231
+ {
232
+ inputs: [
233
+ {
234
+ internalType: "address",
235
+ name: "spender",
236
+ type: "address",
237
+ },
238
+ {
239
+ internalType: "externalEuint64",
240
+ name: "encryptedAmount",
241
+ type: "bytes32",
242
+ },
243
+ {
244
+ internalType: "bytes",
245
+ name: "inputProof",
246
+ type: "bytes",
247
+ },
248
+ ],
249
+ name: "approve",
250
+ outputs: [
251
+ {
252
+ internalType: "bool",
253
+ name: "success",
254
+ type: "bool",
255
+ },
256
+ ],
257
+ stateMutability: "nonpayable",
258
+ type: "function",
259
+ },
260
+ {
261
+ inputs: [
262
+ {
263
+ internalType: "address",
264
+ name: "account",
265
+ type: "address",
266
+ },
267
+ ],
268
+ name: "balanceOf",
269
+ outputs: [
270
+ {
271
+ internalType: "euint64",
272
+ name: "",
273
+ type: "bytes32",
274
+ },
275
+ ],
276
+ stateMutability: "view",
277
+ type: "function",
278
+ },
279
+ {
280
+ inputs: [],
281
+ name: "complianceChecker",
282
+ outputs: [
283
+ {
284
+ internalType: "contract IComplianceChecker",
285
+ name: "",
286
+ type: "address",
287
+ },
288
+ ],
289
+ stateMutability: "view",
290
+ type: "function",
291
+ },
292
+ {
293
+ inputs: [],
294
+ name: "confidentialProtocolId",
295
+ outputs: [
296
+ {
297
+ internalType: "uint256",
298
+ name: "",
299
+ type: "uint256",
300
+ },
301
+ ],
302
+ stateMutability: "view",
303
+ type: "function",
304
+ },
305
+ {
306
+ inputs: [],
307
+ name: "decimals",
308
+ outputs: [
309
+ {
310
+ internalType: "uint8",
311
+ name: "",
312
+ type: "uint8",
313
+ },
314
+ ],
315
+ stateMutability: "pure",
316
+ type: "function",
317
+ },
318
+ {
319
+ inputs: [
320
+ {
321
+ internalType: "address",
322
+ name: "to",
323
+ type: "address",
324
+ },
325
+ {
326
+ internalType: "uint256",
327
+ name: "amount",
328
+ type: "uint256",
329
+ },
330
+ ],
331
+ name: "mint",
332
+ outputs: [],
333
+ stateMutability: "nonpayable",
334
+ type: "function",
335
+ },
336
+ {
337
+ inputs: [],
338
+ name: "name",
339
+ outputs: [
340
+ {
341
+ internalType: "string",
342
+ name: "",
343
+ type: "string",
344
+ },
345
+ ],
346
+ stateMutability: "view",
347
+ type: "function",
348
+ },
349
+ {
350
+ inputs: [],
351
+ name: "owner",
352
+ outputs: [
353
+ {
354
+ internalType: "address",
355
+ name: "",
356
+ type: "address",
357
+ },
358
+ ],
359
+ stateMutability: "view",
360
+ type: "function",
361
+ },
362
+ {
363
+ inputs: [],
364
+ name: "pendingOwner",
365
+ outputs: [
366
+ {
367
+ internalType: "address",
368
+ name: "",
369
+ type: "address",
370
+ },
371
+ ],
372
+ stateMutability: "view",
373
+ type: "function",
374
+ },
375
+ {
376
+ inputs: [
377
+ {
378
+ internalType: "address",
379
+ name: "checker",
380
+ type: "address",
381
+ },
382
+ ],
383
+ name: "setComplianceChecker",
384
+ outputs: [],
385
+ stateMutability: "nonpayable",
386
+ type: "function",
387
+ },
388
+ {
389
+ inputs: [],
390
+ name: "symbol",
391
+ outputs: [
392
+ {
393
+ internalType: "string",
394
+ name: "",
395
+ type: "string",
396
+ },
397
+ ],
398
+ stateMutability: "view",
399
+ type: "function",
400
+ },
401
+ {
402
+ inputs: [],
403
+ name: "totalSupply",
404
+ outputs: [
405
+ {
406
+ internalType: "uint256",
407
+ name: "",
408
+ type: "uint256",
409
+ },
410
+ ],
411
+ stateMutability: "view",
412
+ type: "function",
413
+ },
414
+ {
415
+ inputs: [
416
+ {
417
+ internalType: "address",
418
+ name: "to",
419
+ type: "address",
420
+ },
421
+ {
422
+ internalType: "externalEuint64",
423
+ name: "encryptedAmount",
424
+ type: "bytes32",
425
+ },
426
+ {
427
+ internalType: "bytes",
428
+ name: "inputProof",
429
+ type: "bytes",
430
+ },
431
+ ],
432
+ name: "transfer",
433
+ outputs: [
434
+ {
435
+ internalType: "bool",
436
+ name: "success",
437
+ type: "bool",
438
+ },
439
+ ],
440
+ stateMutability: "nonpayable",
441
+ type: "function",
442
+ },
443
+ {
444
+ inputs: [
445
+ {
446
+ internalType: "address",
447
+ name: "to",
448
+ type: "address",
449
+ },
450
+ {
451
+ internalType: "euint64",
452
+ name: "amount",
453
+ type: "bytes32",
454
+ },
455
+ ],
456
+ name: "transfer",
457
+ outputs: [
458
+ {
459
+ internalType: "bool",
460
+ name: "success",
461
+ type: "bool",
462
+ },
463
+ ],
464
+ stateMutability: "nonpayable",
465
+ type: "function",
466
+ },
467
+ {
468
+ inputs: [
469
+ {
470
+ internalType: "address",
471
+ name: "from",
472
+ type: "address",
473
+ },
474
+ {
475
+ internalType: "address",
476
+ name: "to",
477
+ type: "address",
478
+ },
479
+ {
480
+ internalType: "externalEuint64",
481
+ name: "encryptedAmount",
482
+ type: "bytes32",
483
+ },
484
+ {
485
+ internalType: "bytes",
486
+ name: "inputProof",
487
+ type: "bytes",
488
+ },
489
+ ],
490
+ name: "transferFrom",
491
+ outputs: [
492
+ {
493
+ internalType: "bool",
494
+ name: "success",
495
+ type: "bool",
496
+ },
497
+ ],
498
+ stateMutability: "nonpayable",
499
+ type: "function",
500
+ },
501
+ {
502
+ inputs: [
503
+ {
504
+ internalType: "address",
505
+ name: "newOwner",
506
+ type: "address",
507
+ },
508
+ ],
509
+ name: "transferOwnership",
510
+ outputs: [],
511
+ stateMutability: "nonpayable",
512
+ type: "function",
513
+ },
514
+ ] as const;
515
+
516
+ const _bytecode =
517
+ "0x608060405234801561000f575f5ffd5b50604051611a68380380611a6883398101604081905261002e9161034c565b6100e2610039610140565b80517f9e7b61f58c47dc699ac88507c4f5bb9f121c03808c5676a8078fe583e464970080546001600160a01b03199081166001600160a01b039384161790915560208301517f9e7b61f58c47dc699ac88507c4f5bb9f121c03808c5676a8078fe583e46497018054831691841691909117905560408301517f9e7b61f58c47dc699ac88507c4f5bb9f121c03808c5676a8078fe583e46497028054909216921691909117905550565b5f6100ed8482610455565b5060016100fa8382610455565b50600680546001600160a01b031916331790556001600160a01b0381161561013857600580546001600160a01b0319166001600160a01b0383161790555b50505061050f565b604080516060810182525f808252602082018190529181019190915246600103610199575060408051606080820183525f8083526020808401829052928401819052835191820184528082529181018290529182015290565b4662aa36a703610218575060408051606080820183525f8083526020808401829052928401528251908101835273f0ffdc93b7e186bc2f8cb3daa75d86d1930a433d81527392c920834ec8941d2c77d188936e1f7a6f49c1279181019190915273be0e383937d564d7ff0bc3b46c51f0bf8d5c311a9181019190915290565b46617a6903610296575060408051606080820183525f808352602080840182905292840152825190810183527350157cffd6bbfa2dece204a89ec419c23ef5755d815273e3a9105a3a932253a70f126eb1e3b589c643dd249181019190915273be0e383937d564d7ff0bc3b46c51f0bf8d5c311a9181019190915290565b6040516373cac13b60e01b815260040160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126102d2575f5ffd5b81516001600160401b038111156102eb576102eb6102af565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610319576103196102af565b604052818152838201602001851015610330575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f6060848603121561035e575f5ffd5b83516001600160401b03811115610373575f5ffd5b61037f868287016102c3565b602086015190945090506001600160401b0381111561039c575f5ffd5b6103a8868287016102c3565b604086015190935090506001600160a01b03811681146103c6575f5ffd5b809150509250925092565b600181811c908216806103e557607f821691505b60208210810361040357634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561045057805f5260205f20601f840160051c8101602085101561042e5750805b601f840160051c820191505b8181101561044d575f815560010161043a565b50505b505050565b81516001600160401b0381111561046e5761046e6102af565b6104828161047c84546103d1565b84610409565b6020601f8211600181146104b4575f831561049d5750848201515b5f19600385901b1c1916600184901b17845561044d565b5f84815260208120601f198516915b828110156104e357878501518255602094850194600190920191016104c3565b508482101561050057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b61154c8061051c5f395ff3fe608060405234801561000f575f5ffd5b506004361061011c575f3560e01c80637d32e7bd116100a9578063b32c10011161006e578063b32c100114610252578063c8fbd4b314610265578063dd62ed3e14610278578063e30c3978146102b0578063f2fde38b146102c3575f5ffd5b80637d32e7bd146101f15780638927b030146102045780638da5cb5b1461020c57806395d89b41146102375780639a0943521461023f575f5ffd5b806340c10f19116100ef57806340c10f19146101765780636015992b1461018b57806370a082311461019e57806379ba5097146101c65780637b7e0a5a146101ce575f5ffd5b806306fdde031461012057806318160ddd1461013e5780632e0f262514610155578063313ce5671461016f575b5f5ffd5b6101286102d6565b6040516101359190611219565b60405180910390f35b61014760025481565b604051908152602001610135565b61015d601281565b60405160ff9091168152602001610135565b601261015d565b610189610184366004611246565b610361565b005b61018961019936600461126e565b6104b2565b6101476101ac36600461126e565b6001600160a01b03165f9081526003602052604090205490565b610189610526565b6101e16101dc3660046112cc565b6105ad565b6040519015158152602001610135565b6101e16101ff366004611246565b610605565b610147610640565b60065461021f906001600160a01b031681565b6040516001600160a01b039091168152602001610135565b61012861064e565b6101e161024d366004611322565b61065b565b6101e16102603660046112cc565b6107a5565b60055461021f906001600160a01b031681565b61014761028636600461138c565b6001600160a01b039182165f90815260046020908152604080832093909416825291909152205490565b60075461021f906001600160a01b031681565b6101896102d136600461126e565b61086e565b5f80546102e2906113bd565b80601f016020809104026020016040519081016040528092919081815260200182805461030e906113bd565b80156103595780601f1061033057610100808354040283529160200191610359565b820191905f5260205f20905b81548152906001019060200180831161033c57829003601f168201915b505050505081565b6006546001600160a01b0316331461038c57604051635fc483c560e01b815260040160405180910390fd5b67ffffffffffffffff8111156103b55760405163e5cfe95760e01b815260040160405180910390fd5b60025467ffffffffffffffff906103cd9083906113f5565b11156103ec5760405163e5cfe95760e01b815260040160405180910390fd5b5f6103f682610911565b6001600160a01b0384165f9081526003602052604090205490915061041b9082610927565b6001600160a01b0384165f90815260036020526040902081905561043e90610955565b506001600160a01b0383165f908152600360205260409020546104619084610964565b508160025f82825461047391906113f5565b909155505060405182906001600160a01b038516907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885905f90a3505050565b6006546001600160a01b031633146104dd57604051635fc483c560e01b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040517f7c1403a777cb1caaa0258a821061f56fd1e6bc77b3d5f81c0f5630a299947d16905f90a250565b6007546001600160a01b03163314610551576040516303c25d1960e61b815260040160405180910390fd5b60068054600780546001600160a01b03198084166001600160a01b038381169182179096559116909155604051929091169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a350565b5f5f6105ee8585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061097692505050565b90506105fb338783610983565b9695505050505050565b5f61060f82610be4565b61062c57604051631a93b31b60e31b815260040160405180910390fd5b610637338484610983565b90505b92915050565b5f610649610bef565b905090565b600180546102e2906113bd565b5f5f61069c8585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061097692505050565b6001600160a01b0388165f908152600460209081526040808320338452909152812054919250906106ce908390610c23565b6001600160a01b0389165f9081526004602090815260408083203384529091528120549192509061072d9083906107059086610c51565b6001600160a01b038c165f908152600460209081526040808320338452909152902054610c7f565b6001600160a01b038a165f9081526004602090815260408083203384529091529020819055905061075d81610955565b50610768818a610964565b506107738133610964565b505f61078883856107835f610911565b610c7f565b90506107958a8a83610983565b9450505050505b95945050505050565b5f5f6107e68585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061097692505050565b335f9081526004602090815260408083206001600160a01b038b1684529091529020819055905061081681610955565b506108218133610964565b5061082c8187610964565b506040516001600160a01b0387169033907ff37f546c25e850257cc0c94f92bec94a17e2f0e884ddda268a25d8144b70eb6a905f90a350600195945050505050565b6006546001600160a01b0316331461089957604051635fc483c560e01b815260040160405180910390fd5b6001600160a01b0381166108c0576040516349e27cff60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b03838116918217909255600654604051919216907f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700905f90a350565b5f61063a8267ffffffffffffffff166005610cc6565b5f82610939576109365f610911565b92505b8161094a576109475f610911565b91505b61063783835f610d55565b5f6109608230610df8565b5090565b5f61096f8383610df8565b5090919050565b5f61063783836005610e6e565b6005545f9081906001600160a01b031615610ac257600554604051632c289dcf60e01b81526001600160a01b0387811660048301525f921690632c289dcf906024016020604051808303815f875af11580156109e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a059190611414565b600554604051632c289dcf60e01b81526001600160a01b0388811660048301529293505f9290911690632c289dcf906024016020604051808303815f875af1158015610a53573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a779190611414565b90505f610a848383610f68565b6001600160a01b0389165f9081526003602052604081205491925090610aab908890610c23565b9050610ab78282610f68565b945050505050610ae8565b6001600160a01b0385165f90815260036020526040902054610ae5908490610c23565b90505b5f610af782856107835f610911565b6001600160a01b0387165f9081526003602052604081205491925090610b1d9083610c51565b6001600160a01b0387165f9081526003602052604081205491925090610b439084610927565b6001600160a01b03808a165f90815260036020526040808220869055918a168152208190559050610b7382610955565b50610b7d81610955565b50610b888289610964565b50610b938188610964565b50866001600160a01b0316886001600160a01b03167f4853ae1b4d437c4255ac16cd3ceda3465975023f27cb141584cd9d44440fed8260405160405180910390a360019450505050505b9392505050565b5f61063a8233610f96565b5f46600103610bfe5750600190565b4662aa36a703610c0f575061271190565b46617a6903610c1e57505f1990565b505f90565b5f82610c3557610c325f610911565b92505b81610c4657610c435f610911565b91505b61063783835f61101a565b5f82610c6357610c605f610911565b92505b81610c7457610c715f610911565b91505b61063783835f61107d565b5f83610c9157610c8e5f6110e0565b93505b82610ca257610c9f5f610911565b92505b81610cb357610cb05f610911565b91505b610cbe8484846110fb565b949350505050565b5f5160206114d75f395f51905f5254604051639cd07acb60e01b81525f915f5160206114f75f395f51905f52916001600160a01b0390911690639cd07acb90610d15908790879060040161144b565b6020604051808303815f875af1158015610d31573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cbe9190611414565b5f5f8215610d685750600160f81b610d6b565b505f5b5f5160206114d75f395f51905f525460405163022f65e760e31b81525f5160206114f75f395f51905f52916001600160a01b03169063117b2f3890610db89089908990879060040161145f565b6020604051808303815f875af1158015610dd4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105fb9190611414565b5f5f5160206114f75f395f51905f528054604051635ca4b5b160e11b8152600481018690526001600160a01b03858116602483015292935091169063b9496b62906044015f604051808303815f87803b158015610e53575f5ffd5b505af1158015610e65573d5f5f3e3d5ffd5b50505050505050565b5f5160206114d75f395f51905f525460405163045fc19560e11b81525f915f5160206114f75f395f51905f52916001600160a01b03909116906308bf832a90610ec190889033908990899060040161147f565b6020604051808303815f875af1158015610edd573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f019190611414565b8154604051630f8e573b60e21b8152600481018390523360248201529193506001600160a01b031690633e395cec906044015f604051808303815f87803b158015610f4a575f5ffd5b505af1158015610f5c573d5f5f3e3d5ffd5b50505050509392505050565b5f82610f7a57610f775f6110e0565b92505b81610f8b57610f885f6110e0565b91505b61063783835f611188565b5f805f5160206114f75f395f51905f5280546040516382027b6d60e01b8152600481018790526001600160a01b0386811660248301529293509116906382027b6d90604401602060405180830381865afa158015610ff6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cbe91906114b7565b5f5f821561102d5750600160f81b611030565b505f5b5f5160206114d75f395f51905f5254604051631d44e90160e21b81525f5160206114f75f395f51905f52916001600160a01b031690637513a40490610db89089908990879060040161145f565b5f5f82156110905750600160f81b611093565b505f5b5f5160206114d75f395f51905f52546040516303056db360e31b81525f5160206114f75f395f51905f52916001600160a01b03169063182b6d9890610db89089908990879060040161145f565b5f61063a826110ef575f6110f2565b60015b60ff165f610cc6565b5f805f5160206114f75f395f51905f526001810154604051637702dcff60e01b81526004810188905260248101879052604481018690529192506001600160a01b031690637702dcff906064016020604051808303815f875af1158015611164573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061079c9190611414565b5f5f821561119b5750600160f81b61119e565b505f5b5f5160206114d75f395f51905f525460405163d99882d560e01b81525f5160206114f75f395f51905f52916001600160a01b03169063d99882d590610db89089908990879060040161145f565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61063760208301846111eb565b80356001600160a01b0381168114611241575f5ffd5b919050565b5f5f60408385031215611257575f5ffd5b6112608361122b565b946020939093013593505050565b5f6020828403121561127e575f5ffd5b6106378261122b565b5f5f83601f840112611297575f5ffd5b50813567ffffffffffffffff8111156112ae575f5ffd5b6020830191508360208285010111156112c5575f5ffd5b9250929050565b5f5f5f5f606085870312156112df575f5ffd5b6112e88561122b565b935060208501359250604085013567ffffffffffffffff81111561130a575f5ffd5b61131687828801611287565b95989497509550505050565b5f5f5f5f5f60808688031215611336575f5ffd5b61133f8661122b565b945061134d6020870161122b565b935060408601359250606086013567ffffffffffffffff81111561136f575f5ffd5b61137b88828901611287565b969995985093965092949392505050565b5f5f6040838503121561139d575f5ffd5b6113a68361122b565b91506113b46020840161122b565b90509250929050565b600181811c908216806113d157607f821691505b6020821081036113ef57634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561063a57634e487b7160e01b5f52601160045260245ffd5b5f60208284031215611424575f5ffd5b5051919050565b6054811061144757634e487b7160e01b5f52602160045260245ffd5b9052565b82815260408101610bdd602083018461142b565b92835260208301919091526001600160f81b031916604082015260600190565b8481526001600160a01b03841660208201526080604082018190525f906114a8908301856111eb565b905061079c606083018461142b565b5f602082840312156114c7575f5ffd5b81518015158114610bdd575f5ffdfe9e7b61f58c47dc699ac88507c4f5bb9f121c03808c5676a8078fe583e46497019e7b61f58c47dc699ac88507c4f5bb9f121c03808c5676a8078fe583e4649700a2646970667358221220a2d9c9ce48b3e74fe82099952bcb8374a2ada88f507a320784baa325ec8ca63964736f6c634300081b0033";
518
+
519
+ type CompliantERC20ConstructorParams =
520
+ | [signer?: Signer]
521
+ | ConstructorParameters<typeof ContractFactory>;
522
+
523
+ const isSuperArgs = (
524
+ xs: CompliantERC20ConstructorParams
525
+ ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
526
+
527
+ export class CompliantERC20__factory extends ContractFactory {
528
+ constructor(...args: CompliantERC20ConstructorParams) {
529
+ if (isSuperArgs(args)) {
530
+ super(...args);
531
+ } else {
532
+ super(_abi, _bytecode, args[0]);
533
+ }
534
+ }
535
+
536
+ override getDeployTransaction(
537
+ tokenName: string,
538
+ tokenSymbol: string,
539
+ checker: AddressLike,
540
+ overrides?: NonPayableOverrides & { from?: string }
541
+ ): Promise<ContractDeployTransaction> {
542
+ return super.getDeployTransaction(
543
+ tokenName,
544
+ tokenSymbol,
545
+ checker,
546
+ overrides || {}
547
+ );
548
+ }
549
+ override deploy(
550
+ tokenName: string,
551
+ tokenSymbol: string,
552
+ checker: AddressLike,
553
+ overrides?: NonPayableOverrides & { from?: string }
554
+ ) {
555
+ return super.deploy(
556
+ tokenName,
557
+ tokenSymbol,
558
+ checker,
559
+ overrides || {}
560
+ ) as Promise<
561
+ CompliantERC20 & {
562
+ deploymentTransaction(): ContractTransactionResponse;
563
+ }
564
+ >;
565
+ }
566
+ override connect(runner: ContractRunner | null): CompliantERC20__factory {
567
+ return super.connect(runner) as CompliantERC20__factory;
568
+ }
569
+
570
+ static readonly bytecode = _bytecode;
571
+ static readonly abi = _abi;
572
+ static createInterface(): CompliantERC20Interface {
573
+ return new Interface(_abi) as CompliantERC20Interface;
574
+ }
575
+ static connect(
576
+ address: string,
577
+ runner?: ContractRunner | null
578
+ ): CompliantERC20 {
579
+ return new Contract(address, _abi, runner) as unknown as CompliantERC20;
580
+ }
581
+ }
@@ -0,0 +1,44 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Interface, type ContractRunner } from "ethers";
6
+ import type {
7
+ IComplianceChecker,
8
+ IComplianceCheckerInterface,
9
+ } from "../../../../contracts/tokens/CompliantERC20.sol/IComplianceChecker";
10
+
11
+ const _abi = [
12
+ {
13
+ inputs: [
14
+ {
15
+ internalType: "address",
16
+ name: "user",
17
+ type: "address",
18
+ },
19
+ ],
20
+ name: "checkCompliance",
21
+ outputs: [
22
+ {
23
+ internalType: "ebool",
24
+ name: "",
25
+ type: "bytes32",
26
+ },
27
+ ],
28
+ stateMutability: "nonpayable",
29
+ type: "function",
30
+ },
31
+ ] as const;
32
+
33
+ export class IComplianceChecker__factory {
34
+ static readonly abi = _abi;
35
+ static createInterface(): IComplianceCheckerInterface {
36
+ return new Interface(_abi) as IComplianceCheckerInterface;
37
+ }
38
+ static connect(
39
+ address: string,
40
+ runner?: ContractRunner | null
41
+ ): IComplianceChecker {
42
+ return new Contract(address, _abi, runner) as unknown as IComplianceChecker;
43
+ }
44
+ }
@@ -0,0 +1,5 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export { CompliantERC20__factory } from "./CompliantERC20__factory";
5
+ export { IComplianceChecker__factory } from "./IComplianceChecker__factory";
@@ -0,0 +1,4 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export * as compliantErc20Sol from "./CompliantERC20.sol";
@@ -0,0 +1,5 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export * as fhevm from "./@fhevm";
5
+ export * as contracts from "./contracts";