@openzeppelin/confidential-contracts 0.3.1 → 0.4.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.
- package/README.md +36 -7
- package/build/contracts/BatcherConfidential.json +544 -0
- package/build/contracts/CheckpointsConfidential.json +2 -2
- package/build/contracts/ERC7984.json +16 -0
- package/build/contracts/ERC7984ERC20Wrapper.json +93 -9
- package/build/contracts/ERC7984Freezable.json +16 -0
- package/build/contracts/ERC7984ObserverAccess.json +16 -0
- package/build/contracts/ERC7984Omnibus.json +16 -0
- package/build/contracts/ERC7984Restricted.json +35 -19
- package/build/contracts/ERC7984Rwa.json +35 -19
- package/build/contracts/ERC7984Utils.json +2 -2
- package/build/contracts/ERC7984Votes.json +32 -0
- package/build/contracts/FHESafeMath.json +2 -2
- package/build/contracts/HandleAccessManager.json +16 -0
- package/build/contracts/IERC7984ERC20Wrapper.json +659 -0
- package/build/contracts/IERC7984Rwa.json +19 -19
- package/build/contracts/VestingWalletConfidentialFactory.json +16 -0
- package/build/contracts/VotesConfidential.json +16 -0
- package/finance/BatcherConfidential.sol +450 -0
- package/finance/VestingWalletConfidential.sol +3 -3
- package/governance/utils/VotesConfidential.sol +5 -4
- package/interfaces/IERC7984ERC20Wrapper.sol +62 -0
- package/interfaces/IERC7984Receiver.sol +4 -2
- package/interfaces/IERC7984Rwa.sol +2 -2
- package/package.json +4 -4
- package/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol +81 -55
- package/token/ERC7984/extensions/ERC7984Freezable.sol +4 -5
- package/token/ERC7984/extensions/ERC7984ObserverAccess.sol +3 -3
- package/token/ERC7984/extensions/ERC7984Restricted.sol +8 -8
- package/token/ERC7984/extensions/ERC7984Rwa.sol +5 -7
- package/token/ERC7984/extensions/ERC7984Votes.sol +2 -2
- package/utils/FHESafeMath.sol +2 -2
- package/utils/HandleAccessManager.sol +8 -7
- package/utils/structs/CheckpointsConfidential.sol +2 -2
- package/build/contracts/Checkpoints.json +0 -16
- package/utils/structs/temporary-Checkpoints.sol +0 -835
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
{
|
|
104
104
|
"inputs": [
|
|
105
105
|
{
|
|
106
|
-
"internalType": "
|
|
107
|
-
"name": "
|
|
106
|
+
"internalType": "bytes32",
|
|
107
|
+
"name": "unwrapRequestId",
|
|
108
108
|
"type": "bytes32"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
@@ -138,6 +138,22 @@
|
|
|
138
138
|
"name": "SafeERC20FailedOperation",
|
|
139
139
|
"type": "error"
|
|
140
140
|
},
|
|
141
|
+
{
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"internalType": "bytes32",
|
|
145
|
+
"name": "handle",
|
|
146
|
+
"type": "bytes32"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"internalType": "address",
|
|
150
|
+
"name": "sender",
|
|
151
|
+
"type": "address"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
155
|
+
"type": "error"
|
|
156
|
+
},
|
|
141
157
|
{
|
|
142
158
|
"anonymous": false,
|
|
143
159
|
"inputs": [
|
|
@@ -254,6 +270,12 @@
|
|
|
254
270
|
"name": "receiver",
|
|
255
271
|
"type": "address"
|
|
256
272
|
},
|
|
273
|
+
{
|
|
274
|
+
"indexed": true,
|
|
275
|
+
"internalType": "bytes32",
|
|
276
|
+
"name": "unwrapRequestId",
|
|
277
|
+
"type": "bytes32"
|
|
278
|
+
},
|
|
257
279
|
{
|
|
258
280
|
"indexed": false,
|
|
259
281
|
"internalType": "euint64",
|
|
@@ -279,6 +301,12 @@
|
|
|
279
301
|
"name": "receiver",
|
|
280
302
|
"type": "address"
|
|
281
303
|
},
|
|
304
|
+
{
|
|
305
|
+
"indexed": true,
|
|
306
|
+
"internalType": "bytes32",
|
|
307
|
+
"name": "unwrapRequestId",
|
|
308
|
+
"type": "bytes32"
|
|
309
|
+
},
|
|
282
310
|
{
|
|
283
311
|
"indexed": false,
|
|
284
312
|
"internalType": "euint64",
|
|
@@ -625,13 +653,13 @@
|
|
|
625
653
|
{
|
|
626
654
|
"inputs": [
|
|
627
655
|
{
|
|
628
|
-
"internalType": "
|
|
629
|
-
"name": "
|
|
656
|
+
"internalType": "bytes32",
|
|
657
|
+
"name": "unwrapRequestId",
|
|
630
658
|
"type": "bytes32"
|
|
631
659
|
},
|
|
632
660
|
{
|
|
633
661
|
"internalType": "uint64",
|
|
634
|
-
"name": "
|
|
662
|
+
"name": "unwrapAmountCleartext",
|
|
635
663
|
"type": "uint64"
|
|
636
664
|
},
|
|
637
665
|
{
|
|
@@ -823,7 +851,7 @@
|
|
|
823
851
|
"name": "underlying",
|
|
824
852
|
"outputs": [
|
|
825
853
|
{
|
|
826
|
-
"internalType": "
|
|
854
|
+
"internalType": "address",
|
|
827
855
|
"name": "",
|
|
828
856
|
"type": "address"
|
|
829
857
|
}
|
|
@@ -855,7 +883,13 @@
|
|
|
855
883
|
}
|
|
856
884
|
],
|
|
857
885
|
"name": "unwrap",
|
|
858
|
-
"outputs": [
|
|
886
|
+
"outputs": [
|
|
887
|
+
{
|
|
888
|
+
"internalType": "bytes32",
|
|
889
|
+
"name": "",
|
|
890
|
+
"type": "bytes32"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
859
893
|
"stateMutability": "nonpayable",
|
|
860
894
|
"type": "function"
|
|
861
895
|
},
|
|
@@ -878,10 +912,54 @@
|
|
|
878
912
|
}
|
|
879
913
|
],
|
|
880
914
|
"name": "unwrap",
|
|
881
|
-
"outputs": [
|
|
915
|
+
"outputs": [
|
|
916
|
+
{
|
|
917
|
+
"internalType": "bytes32",
|
|
918
|
+
"name": "",
|
|
919
|
+
"type": "bytes32"
|
|
920
|
+
}
|
|
921
|
+
],
|
|
882
922
|
"stateMutability": "nonpayable",
|
|
883
923
|
"type": "function"
|
|
884
924
|
},
|
|
925
|
+
{
|
|
926
|
+
"inputs": [
|
|
927
|
+
{
|
|
928
|
+
"internalType": "bytes32",
|
|
929
|
+
"name": "unwrapRequestId",
|
|
930
|
+
"type": "bytes32"
|
|
931
|
+
}
|
|
932
|
+
],
|
|
933
|
+
"name": "unwrapAmount",
|
|
934
|
+
"outputs": [
|
|
935
|
+
{
|
|
936
|
+
"internalType": "euint64",
|
|
937
|
+
"name": "",
|
|
938
|
+
"type": "bytes32"
|
|
939
|
+
}
|
|
940
|
+
],
|
|
941
|
+
"stateMutability": "view",
|
|
942
|
+
"type": "function"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"inputs": [
|
|
946
|
+
{
|
|
947
|
+
"internalType": "bytes32",
|
|
948
|
+
"name": "unwrapRequestId",
|
|
949
|
+
"type": "bytes32"
|
|
950
|
+
}
|
|
951
|
+
],
|
|
952
|
+
"name": "unwrapRequester",
|
|
953
|
+
"outputs": [
|
|
954
|
+
{
|
|
955
|
+
"internalType": "address",
|
|
956
|
+
"name": "",
|
|
957
|
+
"type": "address"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
"stateMutability": "view",
|
|
961
|
+
"type": "function"
|
|
962
|
+
},
|
|
885
963
|
{
|
|
886
964
|
"inputs": [
|
|
887
965
|
{
|
|
@@ -896,7 +974,13 @@
|
|
|
896
974
|
}
|
|
897
975
|
],
|
|
898
976
|
"name": "wrap",
|
|
899
|
-
"outputs": [
|
|
977
|
+
"outputs": [
|
|
978
|
+
{
|
|
979
|
+
"internalType": "euint64",
|
|
980
|
+
"name": "",
|
|
981
|
+
"type": "bytes32"
|
|
982
|
+
}
|
|
983
|
+
],
|
|
900
984
|
"stateMutability": "nonpayable",
|
|
901
985
|
"type": "function"
|
|
902
986
|
}
|
|
@@ -95,6 +95,22 @@
|
|
|
95
95
|
"name": "InvalidKMSSignatures",
|
|
96
96
|
"type": "error"
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"inputs": [
|
|
100
|
+
{
|
|
101
|
+
"internalType": "bytes32",
|
|
102
|
+
"name": "handle",
|
|
103
|
+
"type": "bytes32"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"internalType": "address",
|
|
107
|
+
"name": "sender",
|
|
108
|
+
"type": "address"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
112
|
+
"type": "error"
|
|
113
|
+
},
|
|
98
114
|
{
|
|
99
115
|
"anonymous": false,
|
|
100
116
|
"inputs": [
|
|
@@ -95,6 +95,22 @@
|
|
|
95
95
|
"name": "InvalidKMSSignatures",
|
|
96
96
|
"type": "error"
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"inputs": [
|
|
100
|
+
{
|
|
101
|
+
"internalType": "bytes32",
|
|
102
|
+
"name": "handle",
|
|
103
|
+
"type": "bytes32"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"internalType": "address",
|
|
107
|
+
"name": "sender",
|
|
108
|
+
"type": "address"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
112
|
+
"type": "error"
|
|
113
|
+
},
|
|
98
114
|
{
|
|
99
115
|
"inputs": [],
|
|
100
116
|
"name": "Unauthorized",
|
|
@@ -111,6 +111,22 @@
|
|
|
111
111
|
"name": "InvalidKMSSignatures",
|
|
112
112
|
"type": "error"
|
|
113
113
|
},
|
|
114
|
+
{
|
|
115
|
+
"inputs": [
|
|
116
|
+
{
|
|
117
|
+
"internalType": "bytes32",
|
|
118
|
+
"name": "handle",
|
|
119
|
+
"type": "bytes32"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"internalType": "address",
|
|
123
|
+
"name": "sender",
|
|
124
|
+
"type": "address"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
128
|
+
"type": "error"
|
|
129
|
+
},
|
|
114
130
|
{
|
|
115
131
|
"anonymous": false,
|
|
116
132
|
"inputs": [
|
|
@@ -95,6 +95,22 @@
|
|
|
95
95
|
"name": "InvalidKMSSignatures",
|
|
96
96
|
"type": "error"
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"inputs": [
|
|
100
|
+
{
|
|
101
|
+
"internalType": "bytes32",
|
|
102
|
+
"name": "handle",
|
|
103
|
+
"type": "bytes32"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"internalType": "address",
|
|
107
|
+
"name": "sender",
|
|
108
|
+
"type": "address"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
112
|
+
"type": "error"
|
|
113
|
+
},
|
|
98
114
|
{
|
|
99
115
|
"inputs": [
|
|
100
116
|
{
|
|
@@ -232,6 +248,25 @@
|
|
|
232
248
|
"name": "UserRestrictionUpdated",
|
|
233
249
|
"type": "event"
|
|
234
250
|
},
|
|
251
|
+
{
|
|
252
|
+
"inputs": [
|
|
253
|
+
{
|
|
254
|
+
"internalType": "address",
|
|
255
|
+
"name": "account",
|
|
256
|
+
"type": "address"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"name": "canTransact",
|
|
260
|
+
"outputs": [
|
|
261
|
+
{
|
|
262
|
+
"internalType": "bool",
|
|
263
|
+
"name": "",
|
|
264
|
+
"type": "bool"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"stateMutability": "view",
|
|
268
|
+
"type": "function"
|
|
269
|
+
},
|
|
235
270
|
{
|
|
236
271
|
"inputs": [
|
|
237
272
|
{
|
|
@@ -608,25 +643,6 @@
|
|
|
608
643
|
"stateMutability": "view",
|
|
609
644
|
"type": "function"
|
|
610
645
|
},
|
|
611
|
-
{
|
|
612
|
-
"inputs": [
|
|
613
|
-
{
|
|
614
|
-
"internalType": "address",
|
|
615
|
-
"name": "account",
|
|
616
|
-
"type": "address"
|
|
617
|
-
}
|
|
618
|
-
],
|
|
619
|
-
"name": "isUserAllowed",
|
|
620
|
-
"outputs": [
|
|
621
|
-
{
|
|
622
|
-
"internalType": "bool",
|
|
623
|
-
"name": "",
|
|
624
|
-
"type": "bool"
|
|
625
|
-
}
|
|
626
|
-
],
|
|
627
|
-
"stateMutability": "view",
|
|
628
|
-
"type": "function"
|
|
629
|
-
},
|
|
630
646
|
{
|
|
631
647
|
"inputs": [],
|
|
632
648
|
"name": "name",
|
|
@@ -142,6 +142,22 @@
|
|
|
142
142
|
"name": "InvalidKMSSignatures",
|
|
143
143
|
"type": "error"
|
|
144
144
|
},
|
|
145
|
+
{
|
|
146
|
+
"inputs": [
|
|
147
|
+
{
|
|
148
|
+
"internalType": "bytes32",
|
|
149
|
+
"name": "handle",
|
|
150
|
+
"type": "bytes32"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"internalType": "address",
|
|
154
|
+
"name": "sender",
|
|
155
|
+
"type": "address"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
159
|
+
"type": "error"
|
|
160
|
+
},
|
|
145
161
|
{
|
|
146
162
|
"inputs": [
|
|
147
163
|
{
|
|
@@ -451,6 +467,25 @@
|
|
|
451
467
|
"stateMutability": "nonpayable",
|
|
452
468
|
"type": "function"
|
|
453
469
|
},
|
|
470
|
+
{
|
|
471
|
+
"inputs": [
|
|
472
|
+
{
|
|
473
|
+
"internalType": "address",
|
|
474
|
+
"name": "account",
|
|
475
|
+
"type": "address"
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
"name": "canTransact",
|
|
479
|
+
"outputs": [
|
|
480
|
+
{
|
|
481
|
+
"internalType": "bool",
|
|
482
|
+
"name": "",
|
|
483
|
+
"type": "bool"
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
"stateMutability": "view",
|
|
487
|
+
"type": "function"
|
|
488
|
+
},
|
|
454
489
|
{
|
|
455
490
|
"inputs": [
|
|
456
491
|
{
|
|
@@ -1133,25 +1168,6 @@
|
|
|
1133
1168
|
"stateMutability": "view",
|
|
1134
1169
|
"type": "function"
|
|
1135
1170
|
},
|
|
1136
|
-
{
|
|
1137
|
-
"inputs": [
|
|
1138
|
-
{
|
|
1139
|
-
"internalType": "address",
|
|
1140
|
-
"name": "account",
|
|
1141
|
-
"type": "address"
|
|
1142
|
-
}
|
|
1143
|
-
],
|
|
1144
|
-
"name": "isUserAllowed",
|
|
1145
|
-
"outputs": [
|
|
1146
|
-
{
|
|
1147
|
-
"internalType": "bool",
|
|
1148
|
-
"name": "",
|
|
1149
|
-
"type": "bool"
|
|
1150
|
-
}
|
|
1151
|
-
],
|
|
1152
|
-
"stateMutability": "view",
|
|
1153
|
-
"type": "function"
|
|
1154
|
-
},
|
|
1155
1171
|
{
|
|
1156
1172
|
"inputs": [
|
|
1157
1173
|
{
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "ERC7984Utils",
|
|
4
4
|
"sourceName": "contracts/token/ERC7984/utils/ERC7984Utils.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212207b8de4614ab482f3c8c911c9ff53ca24acda2b6c8d33c20075e2b237fb945aba64736f6c634300081b0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212207b8de4614ab482f3c8c911c9ff53ca24acda2b6c8d33c20075e2b237fb945aba64736f6c634300081b0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -143,6 +143,22 @@
|
|
|
143
143
|
"name": "ERC7984ZeroBalance",
|
|
144
144
|
"type": "error"
|
|
145
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"inputs": [
|
|
148
|
+
{
|
|
149
|
+
"internalType": "bytes32",
|
|
150
|
+
"name": "handle",
|
|
151
|
+
"type": "bytes32"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"internalType": "address",
|
|
155
|
+
"name": "account",
|
|
156
|
+
"type": "address"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"name": "HandleAccessManagerNotAllowed",
|
|
160
|
+
"type": "error"
|
|
161
|
+
},
|
|
146
162
|
{
|
|
147
163
|
"inputs": [
|
|
148
164
|
{
|
|
@@ -185,6 +201,22 @@
|
|
|
185
201
|
"name": "SafeCastOverflowedUintDowncast",
|
|
186
202
|
"type": "error"
|
|
187
203
|
},
|
|
204
|
+
{
|
|
205
|
+
"inputs": [
|
|
206
|
+
{
|
|
207
|
+
"internalType": "bytes32",
|
|
208
|
+
"name": "handle",
|
|
209
|
+
"type": "bytes32"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"internalType": "address",
|
|
213
|
+
"name": "sender",
|
|
214
|
+
"type": "address"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"name": "SenderNotAllowedToUseHandle",
|
|
218
|
+
"type": "error"
|
|
219
|
+
},
|
|
188
220
|
{
|
|
189
221
|
"inputs": [
|
|
190
222
|
{
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "FHESafeMath",
|
|
4
4
|
"sourceName": "contracts/utils/FHESafeMath.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209556b594a0cc945f18748c5096d91f5909617d9b7c4d4fa922efa53fb713fda964736f6c634300081b0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209556b594a0cc945f18748c5096d91f5909617d9b7c4d4fa922efa53fb713fda964736f6c634300081b0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
"contractName": "HandleAccessManager",
|
|
4
4
|
"sourceName": "contracts/utils/HandleAccessManager.sol",
|
|
5
5
|
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "bytes32",
|
|
10
|
+
"name": "handle",
|
|
11
|
+
"type": "bytes32"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address",
|
|
15
|
+
"name": "account",
|
|
16
|
+
"type": "address"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"name": "HandleAccessManagerNotAllowed",
|
|
20
|
+
"type": "error"
|
|
21
|
+
},
|
|
6
22
|
{
|
|
7
23
|
"inputs": [
|
|
8
24
|
{
|