@openzeppelin/confidential-contracts 0.2.0 → 0.3.0-rc.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 (33) hide show
  1. package/build/contracts/Checkpoints.json +2 -2
  2. package/build/contracts/CheckpointsConfidential.json +2 -2
  3. package/build/contracts/{ConfidentialFungibleToken.json → ERC7984.json} +28 -33
  4. package/build/contracts/{ConfidentialFungibleTokenERC20Wrapper.json → ERC7984ERC20Wrapper.json} +34 -39
  5. package/build/contracts/ERC7984Freezable.json +666 -0
  6. package/build/contracts/ERC7984ObserverAccess.json +676 -0
  7. package/build/contracts/ERC7984Omnibus.json +994 -0
  8. package/build/contracts/ERC7984Restricted.json +677 -0
  9. package/build/contracts/ERC7984Rwa.json +1370 -0
  10. package/build/contracts/{ConfidentialFungibleTokenUtils.json → ERC7984Utils.json} +4 -4
  11. package/build/contracts/{ConfidentialFungibleTokenVotes.json → ERC7984Votes.json} +76 -81
  12. package/build/contracts/FHESafeMath.json +2 -2
  13. package/build/contracts/{IConfidentialFungibleToken.json → IERC7984.json} +15 -15
  14. package/build/contracts/{IConfidentialFungibleTokenReceiver.json → IERC7984Receiver.json} +2 -2
  15. package/build/contracts/IERC7984Rwa.json +797 -0
  16. package/build/contracts/VestingWalletConfidentialFactory.json +2 -2
  17. package/finance/VestingWalletConfidential.sol +6 -9
  18. package/finance/VestingWalletConfidentialFactory.sol +7 -12
  19. package/interfaces/{IConfidentialFungibleToken.sol → IERC7984.sol} +5 -5
  20. package/interfaces/{IConfidentialFungibleTokenReceiver.sol → IERC7984Receiver.sol} +3 -3
  21. package/interfaces/IERC7984Rwa.sol +64 -0
  22. package/package.json +4 -4
  23. package/token/{ConfidentialFungibleToken.sol → ERC7984/ERC7984.sol} +68 -76
  24. package/token/{extensions/ConfidentialFungibleTokenERC20Wrapper.sol → ERC7984/extensions/ERC7984ERC20Wrapper.sol} +18 -20
  25. package/token/ERC7984/extensions/ERC7984Freezable.sol +66 -0
  26. package/token/ERC7984/extensions/ERC7984ObserverAccess.sol +63 -0
  27. package/token/ERC7984/extensions/ERC7984Omnibus.sol +209 -0
  28. package/token/ERC7984/extensions/ERC7984Restricted.sol +118 -0
  29. package/token/ERC7984/extensions/ERC7984Rwa.sol +236 -0
  30. package/token/{extensions/ConfidentialFungibleTokenVotes.sol → ERC7984/extensions/ERC7984Votes.sol} +8 -14
  31. package/token/{utils/ConfidentialFungibleTokenUtils.sol → ERC7984/utils/ERC7984Utils.sol} +12 -12
  32. package/utils/FHESafeMath.sol +42 -7
  33. package/utils/structs/temporary-Checkpoints.sol +2 -2
@@ -0,0 +1,797 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "IERC7984Rwa",
4
+ "sourceName": "contracts/interfaces/IERC7984Rwa.sol",
5
+ "abi": [
6
+ {
7
+ "anonymous": false,
8
+ "inputs": [
9
+ {
10
+ "indexed": true,
11
+ "internalType": "euint64",
12
+ "name": "encryptedAmount",
13
+ "type": "bytes32"
14
+ },
15
+ {
16
+ "indexed": false,
17
+ "internalType": "uint64",
18
+ "name": "amount",
19
+ "type": "uint64"
20
+ }
21
+ ],
22
+ "name": "AmountDisclosed",
23
+ "type": "event"
24
+ },
25
+ {
26
+ "anonymous": false,
27
+ "inputs": [
28
+ {
29
+ "indexed": true,
30
+ "internalType": "address",
31
+ "name": "from",
32
+ "type": "address"
33
+ },
34
+ {
35
+ "indexed": true,
36
+ "internalType": "address",
37
+ "name": "to",
38
+ "type": "address"
39
+ },
40
+ {
41
+ "indexed": true,
42
+ "internalType": "euint64",
43
+ "name": "amount",
44
+ "type": "bytes32"
45
+ }
46
+ ],
47
+ "name": "ConfidentialTransfer",
48
+ "type": "event"
49
+ },
50
+ {
51
+ "anonymous": false,
52
+ "inputs": [
53
+ {
54
+ "indexed": true,
55
+ "internalType": "address",
56
+ "name": "holder",
57
+ "type": "address"
58
+ },
59
+ {
60
+ "indexed": true,
61
+ "internalType": "address",
62
+ "name": "operator",
63
+ "type": "address"
64
+ },
65
+ {
66
+ "indexed": false,
67
+ "internalType": "uint48",
68
+ "name": "until",
69
+ "type": "uint48"
70
+ }
71
+ ],
72
+ "name": "OperatorSet",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "inputs": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "account",
80
+ "type": "address"
81
+ }
82
+ ],
83
+ "name": "blockUser",
84
+ "outputs": [],
85
+ "stateMutability": "nonpayable",
86
+ "type": "function"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "address",
92
+ "name": "account",
93
+ "type": "address"
94
+ }
95
+ ],
96
+ "name": "confidentialAvailable",
97
+ "outputs": [
98
+ {
99
+ "internalType": "euint64",
100
+ "name": "",
101
+ "type": "bytes32"
102
+ }
103
+ ],
104
+ "stateMutability": "nonpayable",
105
+ "type": "function"
106
+ },
107
+ {
108
+ "inputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "account",
112
+ "type": "address"
113
+ }
114
+ ],
115
+ "name": "confidentialBalanceOf",
116
+ "outputs": [
117
+ {
118
+ "internalType": "euint64",
119
+ "name": "",
120
+ "type": "bytes32"
121
+ }
122
+ ],
123
+ "stateMutability": "view",
124
+ "type": "function"
125
+ },
126
+ {
127
+ "inputs": [
128
+ {
129
+ "internalType": "address",
130
+ "name": "account",
131
+ "type": "address"
132
+ },
133
+ {
134
+ "internalType": "euint64",
135
+ "name": "encryptedAmount",
136
+ "type": "bytes32"
137
+ }
138
+ ],
139
+ "name": "confidentialBurn",
140
+ "outputs": [
141
+ {
142
+ "internalType": "euint64",
143
+ "name": "",
144
+ "type": "bytes32"
145
+ }
146
+ ],
147
+ "stateMutability": "nonpayable",
148
+ "type": "function"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address",
154
+ "name": "account",
155
+ "type": "address"
156
+ },
157
+ {
158
+ "internalType": "externalEuint64",
159
+ "name": "encryptedAmount",
160
+ "type": "bytes32"
161
+ },
162
+ {
163
+ "internalType": "bytes",
164
+ "name": "inputProof",
165
+ "type": "bytes"
166
+ }
167
+ ],
168
+ "name": "confidentialBurn",
169
+ "outputs": [
170
+ {
171
+ "internalType": "euint64",
172
+ "name": "",
173
+ "type": "bytes32"
174
+ }
175
+ ],
176
+ "stateMutability": "nonpayable",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [
181
+ {
182
+ "internalType": "address",
183
+ "name": "account",
184
+ "type": "address"
185
+ }
186
+ ],
187
+ "name": "confidentialFrozen",
188
+ "outputs": [
189
+ {
190
+ "internalType": "euint64",
191
+ "name": "",
192
+ "type": "bytes32"
193
+ }
194
+ ],
195
+ "stateMutability": "view",
196
+ "type": "function"
197
+ },
198
+ {
199
+ "inputs": [
200
+ {
201
+ "internalType": "address",
202
+ "name": "to",
203
+ "type": "address"
204
+ },
205
+ {
206
+ "internalType": "externalEuint64",
207
+ "name": "encryptedAmount",
208
+ "type": "bytes32"
209
+ },
210
+ {
211
+ "internalType": "bytes",
212
+ "name": "inputProof",
213
+ "type": "bytes"
214
+ }
215
+ ],
216
+ "name": "confidentialMint",
217
+ "outputs": [
218
+ {
219
+ "internalType": "euint64",
220
+ "name": "",
221
+ "type": "bytes32"
222
+ }
223
+ ],
224
+ "stateMutability": "nonpayable",
225
+ "type": "function"
226
+ },
227
+ {
228
+ "inputs": [
229
+ {
230
+ "internalType": "address",
231
+ "name": "to",
232
+ "type": "address"
233
+ },
234
+ {
235
+ "internalType": "euint64",
236
+ "name": "encryptedAmount",
237
+ "type": "bytes32"
238
+ }
239
+ ],
240
+ "name": "confidentialMint",
241
+ "outputs": [
242
+ {
243
+ "internalType": "euint64",
244
+ "name": "",
245
+ "type": "bytes32"
246
+ }
247
+ ],
248
+ "stateMutability": "nonpayable",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [],
253
+ "name": "confidentialTotalSupply",
254
+ "outputs": [
255
+ {
256
+ "internalType": "euint64",
257
+ "name": "",
258
+ "type": "bytes32"
259
+ }
260
+ ],
261
+ "stateMutability": "view",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [
266
+ {
267
+ "internalType": "address",
268
+ "name": "to",
269
+ "type": "address"
270
+ },
271
+ {
272
+ "internalType": "externalEuint64",
273
+ "name": "encryptedAmount",
274
+ "type": "bytes32"
275
+ },
276
+ {
277
+ "internalType": "bytes",
278
+ "name": "inputProof",
279
+ "type": "bytes"
280
+ }
281
+ ],
282
+ "name": "confidentialTransfer",
283
+ "outputs": [
284
+ {
285
+ "internalType": "euint64",
286
+ "name": "",
287
+ "type": "bytes32"
288
+ }
289
+ ],
290
+ "stateMutability": "nonpayable",
291
+ "type": "function"
292
+ },
293
+ {
294
+ "inputs": [
295
+ {
296
+ "internalType": "address",
297
+ "name": "to",
298
+ "type": "address"
299
+ },
300
+ {
301
+ "internalType": "euint64",
302
+ "name": "amount",
303
+ "type": "bytes32"
304
+ }
305
+ ],
306
+ "name": "confidentialTransfer",
307
+ "outputs": [
308
+ {
309
+ "internalType": "euint64",
310
+ "name": "transferred",
311
+ "type": "bytes32"
312
+ }
313
+ ],
314
+ "stateMutability": "nonpayable",
315
+ "type": "function"
316
+ },
317
+ {
318
+ "inputs": [
319
+ {
320
+ "internalType": "address",
321
+ "name": "to",
322
+ "type": "address"
323
+ },
324
+ {
325
+ "internalType": "euint64",
326
+ "name": "amount",
327
+ "type": "bytes32"
328
+ },
329
+ {
330
+ "internalType": "bytes",
331
+ "name": "data",
332
+ "type": "bytes"
333
+ }
334
+ ],
335
+ "name": "confidentialTransferAndCall",
336
+ "outputs": [
337
+ {
338
+ "internalType": "euint64",
339
+ "name": "transferred",
340
+ "type": "bytes32"
341
+ }
342
+ ],
343
+ "stateMutability": "nonpayable",
344
+ "type": "function"
345
+ },
346
+ {
347
+ "inputs": [
348
+ {
349
+ "internalType": "address",
350
+ "name": "to",
351
+ "type": "address"
352
+ },
353
+ {
354
+ "internalType": "externalEuint64",
355
+ "name": "encryptedAmount",
356
+ "type": "bytes32"
357
+ },
358
+ {
359
+ "internalType": "bytes",
360
+ "name": "inputProof",
361
+ "type": "bytes"
362
+ },
363
+ {
364
+ "internalType": "bytes",
365
+ "name": "data",
366
+ "type": "bytes"
367
+ }
368
+ ],
369
+ "name": "confidentialTransferAndCall",
370
+ "outputs": [
371
+ {
372
+ "internalType": "euint64",
373
+ "name": "transferred",
374
+ "type": "bytes32"
375
+ }
376
+ ],
377
+ "stateMutability": "nonpayable",
378
+ "type": "function"
379
+ },
380
+ {
381
+ "inputs": [
382
+ {
383
+ "internalType": "address",
384
+ "name": "from",
385
+ "type": "address"
386
+ },
387
+ {
388
+ "internalType": "address",
389
+ "name": "to",
390
+ "type": "address"
391
+ },
392
+ {
393
+ "internalType": "externalEuint64",
394
+ "name": "encryptedAmount",
395
+ "type": "bytes32"
396
+ },
397
+ {
398
+ "internalType": "bytes",
399
+ "name": "inputProof",
400
+ "type": "bytes"
401
+ }
402
+ ],
403
+ "name": "confidentialTransferFrom",
404
+ "outputs": [
405
+ {
406
+ "internalType": "euint64",
407
+ "name": "",
408
+ "type": "bytes32"
409
+ }
410
+ ],
411
+ "stateMutability": "nonpayable",
412
+ "type": "function"
413
+ },
414
+ {
415
+ "inputs": [
416
+ {
417
+ "internalType": "address",
418
+ "name": "from",
419
+ "type": "address"
420
+ },
421
+ {
422
+ "internalType": "address",
423
+ "name": "to",
424
+ "type": "address"
425
+ },
426
+ {
427
+ "internalType": "euint64",
428
+ "name": "amount",
429
+ "type": "bytes32"
430
+ }
431
+ ],
432
+ "name": "confidentialTransferFrom",
433
+ "outputs": [
434
+ {
435
+ "internalType": "euint64",
436
+ "name": "transferred",
437
+ "type": "bytes32"
438
+ }
439
+ ],
440
+ "stateMutability": "nonpayable",
441
+ "type": "function"
442
+ },
443
+ {
444
+ "inputs": [
445
+ {
446
+ "internalType": "address",
447
+ "name": "from",
448
+ "type": "address"
449
+ },
450
+ {
451
+ "internalType": "address",
452
+ "name": "to",
453
+ "type": "address"
454
+ },
455
+ {
456
+ "internalType": "externalEuint64",
457
+ "name": "encryptedAmount",
458
+ "type": "bytes32"
459
+ },
460
+ {
461
+ "internalType": "bytes",
462
+ "name": "inputProof",
463
+ "type": "bytes"
464
+ },
465
+ {
466
+ "internalType": "bytes",
467
+ "name": "data",
468
+ "type": "bytes"
469
+ }
470
+ ],
471
+ "name": "confidentialTransferFromAndCall",
472
+ "outputs": [
473
+ {
474
+ "internalType": "euint64",
475
+ "name": "transferred",
476
+ "type": "bytes32"
477
+ }
478
+ ],
479
+ "stateMutability": "nonpayable",
480
+ "type": "function"
481
+ },
482
+ {
483
+ "inputs": [
484
+ {
485
+ "internalType": "address",
486
+ "name": "from",
487
+ "type": "address"
488
+ },
489
+ {
490
+ "internalType": "address",
491
+ "name": "to",
492
+ "type": "address"
493
+ },
494
+ {
495
+ "internalType": "euint64",
496
+ "name": "amount",
497
+ "type": "bytes32"
498
+ },
499
+ {
500
+ "internalType": "bytes",
501
+ "name": "data",
502
+ "type": "bytes"
503
+ }
504
+ ],
505
+ "name": "confidentialTransferFromAndCall",
506
+ "outputs": [
507
+ {
508
+ "internalType": "euint64",
509
+ "name": "transferred",
510
+ "type": "bytes32"
511
+ }
512
+ ],
513
+ "stateMutability": "nonpayable",
514
+ "type": "function"
515
+ },
516
+ {
517
+ "inputs": [],
518
+ "name": "contractURI",
519
+ "outputs": [
520
+ {
521
+ "internalType": "string",
522
+ "name": "",
523
+ "type": "string"
524
+ }
525
+ ],
526
+ "stateMutability": "view",
527
+ "type": "function"
528
+ },
529
+ {
530
+ "inputs": [],
531
+ "name": "decimals",
532
+ "outputs": [
533
+ {
534
+ "internalType": "uint8",
535
+ "name": "",
536
+ "type": "uint8"
537
+ }
538
+ ],
539
+ "stateMutability": "view",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "address",
546
+ "name": "from",
547
+ "type": "address"
548
+ },
549
+ {
550
+ "internalType": "address",
551
+ "name": "to",
552
+ "type": "address"
553
+ },
554
+ {
555
+ "internalType": "euint64",
556
+ "name": "encryptedAmount",
557
+ "type": "bytes32"
558
+ }
559
+ ],
560
+ "name": "forceConfidentialTransferFrom",
561
+ "outputs": [
562
+ {
563
+ "internalType": "euint64",
564
+ "name": "",
565
+ "type": "bytes32"
566
+ }
567
+ ],
568
+ "stateMutability": "nonpayable",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [
573
+ {
574
+ "internalType": "address",
575
+ "name": "from",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "internalType": "address",
580
+ "name": "to",
581
+ "type": "address"
582
+ },
583
+ {
584
+ "internalType": "externalEuint64",
585
+ "name": "encryptedAmount",
586
+ "type": "bytes32"
587
+ },
588
+ {
589
+ "internalType": "bytes",
590
+ "name": "inputProof",
591
+ "type": "bytes"
592
+ }
593
+ ],
594
+ "name": "forceConfidentialTransferFrom",
595
+ "outputs": [
596
+ {
597
+ "internalType": "euint64",
598
+ "name": "",
599
+ "type": "bytes32"
600
+ }
601
+ ],
602
+ "stateMutability": "nonpayable",
603
+ "type": "function"
604
+ },
605
+ {
606
+ "inputs": [
607
+ {
608
+ "internalType": "address",
609
+ "name": "holder",
610
+ "type": "address"
611
+ },
612
+ {
613
+ "internalType": "address",
614
+ "name": "spender",
615
+ "type": "address"
616
+ }
617
+ ],
618
+ "name": "isOperator",
619
+ "outputs": [
620
+ {
621
+ "internalType": "bool",
622
+ "name": "",
623
+ "type": "bool"
624
+ }
625
+ ],
626
+ "stateMutability": "view",
627
+ "type": "function"
628
+ },
629
+ {
630
+ "inputs": [
631
+ {
632
+ "internalType": "address",
633
+ "name": "account",
634
+ "type": "address"
635
+ }
636
+ ],
637
+ "name": "isUserAllowed",
638
+ "outputs": [
639
+ {
640
+ "internalType": "bool",
641
+ "name": "",
642
+ "type": "bool"
643
+ }
644
+ ],
645
+ "stateMutability": "view",
646
+ "type": "function"
647
+ },
648
+ {
649
+ "inputs": [],
650
+ "name": "name",
651
+ "outputs": [
652
+ {
653
+ "internalType": "string",
654
+ "name": "",
655
+ "type": "string"
656
+ }
657
+ ],
658
+ "stateMutability": "view",
659
+ "type": "function"
660
+ },
661
+ {
662
+ "inputs": [],
663
+ "name": "pause",
664
+ "outputs": [],
665
+ "stateMutability": "nonpayable",
666
+ "type": "function"
667
+ },
668
+ {
669
+ "inputs": [],
670
+ "name": "paused",
671
+ "outputs": [
672
+ {
673
+ "internalType": "bool",
674
+ "name": "",
675
+ "type": "bool"
676
+ }
677
+ ],
678
+ "stateMutability": "view",
679
+ "type": "function"
680
+ },
681
+ {
682
+ "inputs": [
683
+ {
684
+ "internalType": "address",
685
+ "name": "account",
686
+ "type": "address"
687
+ },
688
+ {
689
+ "internalType": "externalEuint64",
690
+ "name": "encryptedAmount",
691
+ "type": "bytes32"
692
+ },
693
+ {
694
+ "internalType": "bytes",
695
+ "name": "inputProof",
696
+ "type": "bytes"
697
+ }
698
+ ],
699
+ "name": "setConfidentialFrozen",
700
+ "outputs": [],
701
+ "stateMutability": "nonpayable",
702
+ "type": "function"
703
+ },
704
+ {
705
+ "inputs": [
706
+ {
707
+ "internalType": "address",
708
+ "name": "account",
709
+ "type": "address"
710
+ },
711
+ {
712
+ "internalType": "euint64",
713
+ "name": "encryptedAmount",
714
+ "type": "bytes32"
715
+ }
716
+ ],
717
+ "name": "setConfidentialFrozen",
718
+ "outputs": [],
719
+ "stateMutability": "nonpayable",
720
+ "type": "function"
721
+ },
722
+ {
723
+ "inputs": [
724
+ {
725
+ "internalType": "address",
726
+ "name": "operator",
727
+ "type": "address"
728
+ },
729
+ {
730
+ "internalType": "uint48",
731
+ "name": "until",
732
+ "type": "uint48"
733
+ }
734
+ ],
735
+ "name": "setOperator",
736
+ "outputs": [],
737
+ "stateMutability": "nonpayable",
738
+ "type": "function"
739
+ },
740
+ {
741
+ "inputs": [
742
+ {
743
+ "internalType": "bytes4",
744
+ "name": "interfaceId",
745
+ "type": "bytes4"
746
+ }
747
+ ],
748
+ "name": "supportsInterface",
749
+ "outputs": [
750
+ {
751
+ "internalType": "bool",
752
+ "name": "",
753
+ "type": "bool"
754
+ }
755
+ ],
756
+ "stateMutability": "view",
757
+ "type": "function"
758
+ },
759
+ {
760
+ "inputs": [],
761
+ "name": "symbol",
762
+ "outputs": [
763
+ {
764
+ "internalType": "string",
765
+ "name": "",
766
+ "type": "string"
767
+ }
768
+ ],
769
+ "stateMutability": "view",
770
+ "type": "function"
771
+ },
772
+ {
773
+ "inputs": [
774
+ {
775
+ "internalType": "address",
776
+ "name": "account",
777
+ "type": "address"
778
+ }
779
+ ],
780
+ "name": "unblockUser",
781
+ "outputs": [],
782
+ "stateMutability": "nonpayable",
783
+ "type": "function"
784
+ },
785
+ {
786
+ "inputs": [],
787
+ "name": "unpause",
788
+ "outputs": [],
789
+ "stateMutability": "nonpayable",
790
+ "type": "function"
791
+ }
792
+ ],
793
+ "bytecode": "0x",
794
+ "deployedBytecode": "0x",
795
+ "linkReferences": {},
796
+ "deployedLinkReferences": {}
797
+ }