@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
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "_format": "hh-sol-artifact-1",
3
- "contractName": "ConfidentialFungibleTokenUtils",
4
- "sourceName": "contracts/token/utils/ConfidentialFungibleTokenUtils.sol",
3
+ "contractName": "ERC7984Utils",
4
+ "sourceName": "contracts/token/ERC7984/utils/ERC7984Utils.sol",
5
5
  "abi": [],
6
- "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b16578e84785381452ea9c7ec4dfc058f69cc926edb04fddadfe0ed26ee6f7d264736f6c634300081d0033",
7
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b16578e84785381452ea9c7ec4dfc058f69cc926edb04fddadfe0ed26ee6f7d264736f6c634300081d0033",
6
+ "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b4891dcde8aaacec3327be515359ef9cc33c1d928ec5c294f483d2d0ed31407a64736f6c634300081d0033",
7
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b4891dcde8aaacec3327be515359ef9cc33c1d928ec5c294f483d2d0ed31407a64736f6c634300081d0033",
8
8
  "linkReferences": {},
9
9
  "deployedLinkReferences": {}
10
10
  }
@@ -1,13 +1,61 @@
1
1
  {
2
2
  "_format": "hh-sol-artifact-1",
3
- "contractName": "ConfidentialFungibleTokenVotes",
4
- "sourceName": "contracts/token/extensions/ConfidentialFungibleTokenVotes.sol",
3
+ "contractName": "ERC7984Votes",
4
+ "sourceName": "contracts/token/ERC7984/extensions/ERC7984Votes.sol",
5
5
  "abi": [
6
6
  {
7
7
  "inputs": [],
8
8
  "name": "CheckpointUnorderedInsertion",
9
9
  "type": "error"
10
10
  },
11
+ {
12
+ "inputs": [],
13
+ "name": "ECDSAInvalidSignature",
14
+ "type": "error"
15
+ },
16
+ {
17
+ "inputs": [
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "length",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "name": "ECDSAInvalidSignatureLength",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "bytes32",
31
+ "name": "s",
32
+ "type": "bytes32"
33
+ }
34
+ ],
35
+ "name": "ECDSAInvalidSignatureS",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [
40
+ {
41
+ "internalType": "uint256",
42
+ "name": "timepoint",
43
+ "type": "uint256"
44
+ },
45
+ {
46
+ "internalType": "uint48",
47
+ "name": "clock",
48
+ "type": "uint48"
49
+ }
50
+ ],
51
+ "name": "ERC5805FutureLookup",
52
+ "type": "error"
53
+ },
54
+ {
55
+ "inputs": [],
56
+ "name": "ERC6372InconsistentClock",
57
+ "type": "error"
58
+ },
11
59
  {
12
60
  "inputs": [
13
61
  {
@@ -16,7 +64,7 @@
16
64
  "type": "uint256"
17
65
  }
18
66
  ],
19
- "name": "ConfidentialFungibleTokenInvalidGatewayRequest",
67
+ "name": "ERC7984InvalidGatewayRequest",
20
68
  "type": "error"
21
69
  },
22
70
  {
@@ -27,7 +75,7 @@
27
75
  "type": "address"
28
76
  }
29
77
  ],
30
- "name": "ConfidentialFungibleTokenInvalidReceiver",
78
+ "name": "ERC7984InvalidReceiver",
31
79
  "type": "error"
32
80
  },
33
81
  {
@@ -38,7 +86,7 @@
38
86
  "type": "address"
39
87
  }
40
88
  ],
41
- "name": "ConfidentialFungibleTokenInvalidSender",
89
+ "name": "ERC7984InvalidSender",
42
90
  "type": "error"
43
91
  },
44
92
  {
@@ -49,7 +97,7 @@
49
97
  "type": "address"
50
98
  }
51
99
  ],
52
- "name": "ConfidentialFungibleTokenUnauthorizedCaller",
100
+ "name": "ERC7984UnauthorizedCaller",
53
101
  "type": "error"
54
102
  },
55
103
  {
@@ -65,7 +113,7 @@
65
113
  "type": "address"
66
114
  }
67
115
  ],
68
- "name": "ConfidentialFungibleTokenUnauthorizedSpender",
116
+ "name": "ERC7984UnauthorizedSpender",
69
117
  "type": "error"
70
118
  },
71
119
  {
@@ -81,7 +129,7 @@
81
129
  "type": "address"
82
130
  }
83
131
  ],
84
- "name": "ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount",
132
+ "name": "ERC7984UnauthorizedUseOfEncryptedAmount",
85
133
  "type": "error"
86
134
  },
87
135
  {
@@ -92,55 +140,7 @@
92
140
  "type": "address"
93
141
  }
94
142
  ],
95
- "name": "ConfidentialFungibleTokenZeroBalance",
96
- "type": "error"
97
- },
98
- {
99
- "inputs": [],
100
- "name": "ECDSAInvalidSignature",
101
- "type": "error"
102
- },
103
- {
104
- "inputs": [
105
- {
106
- "internalType": "uint256",
107
- "name": "length",
108
- "type": "uint256"
109
- }
110
- ],
111
- "name": "ECDSAInvalidSignatureLength",
112
- "type": "error"
113
- },
114
- {
115
- "inputs": [
116
- {
117
- "internalType": "bytes32",
118
- "name": "s",
119
- "type": "bytes32"
120
- }
121
- ],
122
- "name": "ECDSAInvalidSignatureS",
123
- "type": "error"
124
- },
125
- {
126
- "inputs": [
127
- {
128
- "internalType": "uint256",
129
- "name": "timepoint",
130
- "type": "uint256"
131
- },
132
- {
133
- "internalType": "uint48",
134
- "name": "clock",
135
- "type": "uint48"
136
- }
137
- ],
138
- "name": "ERC5805FutureLookup",
139
- "type": "error"
140
- },
141
- {
142
- "inputs": [],
143
- "name": "ERC6372InconsistentClock",
143
+ "name": "ERC7984ZeroBalance",
144
144
  "type": "error"
145
145
  },
146
146
  {
@@ -206,11 +206,6 @@
206
206
  "name": "StringTooLong",
207
207
  "type": "error"
208
208
  },
209
- {
210
- "inputs": [],
211
- "name": "UnsupportedHandleType",
212
- "type": "error"
213
- },
214
209
  {
215
210
  "inputs": [
216
211
  {
@@ -670,6 +665,19 @@
670
665
  "stateMutability": "nonpayable",
671
666
  "type": "function"
672
667
  },
668
+ {
669
+ "inputs": [],
670
+ "name": "contractURI",
671
+ "outputs": [
672
+ {
673
+ "internalType": "string",
674
+ "name": "",
675
+ "type": "string"
676
+ }
677
+ ],
678
+ "stateMutability": "view",
679
+ "type": "function"
680
+ },
673
681
  {
674
682
  "inputs": [],
675
683
  "name": "decimals",
@@ -817,14 +825,14 @@
817
825
  "type": "uint256"
818
826
  },
819
827
  {
820
- "internalType": "uint64",
821
- "name": "amount",
822
- "type": "uint64"
828
+ "internalType": "bytes",
829
+ "name": "cleartexts",
830
+ "type": "bytes"
823
831
  },
824
832
  {
825
- "internalType": "bytes[]",
826
- "name": "signatures",
827
- "type": "bytes[]"
833
+ "internalType": "bytes",
834
+ "name": "decryptionProof",
835
+ "type": "bytes"
828
836
  }
829
837
  ],
830
838
  "name": "finalizeDiscloseEncryptedAmount",
@@ -1003,19 +1011,6 @@
1003
1011
  ],
1004
1012
  "stateMutability": "view",
1005
1013
  "type": "function"
1006
- },
1007
- {
1008
- "inputs": [],
1009
- "name": "tokenURI",
1010
- "outputs": [
1011
- {
1012
- "internalType": "string",
1013
- "name": "",
1014
- "type": "string"
1015
- }
1016
- ],
1017
- "stateMutability": "view",
1018
- "type": "function"
1019
1014
  }
1020
1015
  ],
1021
1016
  "bytecode": "0x",
@@ -3,8 +3,8 @@
3
3
  "contractName": "FHESafeMath",
4
4
  "sourceName": "contracts/utils/FHESafeMath.sol",
5
5
  "abi": [],
6
- "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220169c9cbdfb2791e1d96b54361ac4446969846b7a58a8da1f7dba5af4fa757c7564736f6c634300081d0033",
7
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220169c9cbdfb2791e1d96b54361ac4446969846b7a58a8da1f7dba5af4fa757c7564736f6c634300081d0033",
6
+ "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220df78653c6284cdfbf02af47c7f879419dceafac61e80399ebb542433d66a52b464736f6c634300081d0033",
7
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220df78653c6284cdfbf02af47c7f879419dceafac61e80399ebb542433d66a52b464736f6c634300081d0033",
8
8
  "linkReferences": {},
9
9
  "deployedLinkReferences": {}
10
10
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_format": "hh-sol-artifact-1",
3
- "contractName": "IConfidentialFungibleToken",
4
- "sourceName": "contracts/interfaces/IConfidentialFungibleToken.sol",
3
+ "contractName": "IERC7984",
4
+ "sourceName": "contracts/interfaces/IERC7984.sol",
5
5
  "abi": [
6
6
  {
7
7
  "anonymous": false,
@@ -356,6 +356,19 @@
356
356
  "stateMutability": "nonpayable",
357
357
  "type": "function"
358
358
  },
359
+ {
360
+ "inputs": [],
361
+ "name": "contractURI",
362
+ "outputs": [
363
+ {
364
+ "internalType": "string",
365
+ "name": "",
366
+ "type": "string"
367
+ }
368
+ ],
369
+ "stateMutability": "view",
370
+ "type": "function"
371
+ },
359
372
  {
360
373
  "inputs": [],
361
374
  "name": "decimals",
@@ -436,19 +449,6 @@
436
449
  ],
437
450
  "stateMutability": "view",
438
451
  "type": "function"
439
- },
440
- {
441
- "inputs": [],
442
- "name": "tokenURI",
443
- "outputs": [
444
- {
445
- "internalType": "string",
446
- "name": "",
447
- "type": "string"
448
- }
449
- ],
450
- "stateMutability": "view",
451
- "type": "function"
452
452
  }
453
453
  ],
454
454
  "bytecode": "0x",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_format": "hh-sol-artifact-1",
3
- "contractName": "IConfidentialFungibleTokenReceiver",
4
- "sourceName": "contracts/interfaces/IConfidentialFungibleTokenReceiver.sol",
3
+ "contractName": "IERC7984Receiver",
4
+ "sourceName": "contracts/interfaces/IERC7984Receiver.sol",
5
5
  "abi": [
6
6
  {
7
7
  "inputs": [