@coti-io/coti-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 (180) hide show
  1. package/.github/workflows/npm-publish.yml +52 -0
  2. package/CODE_OF_CONDUCT.md +44 -0
  3. package/CONTRIBUTING.md +101 -0
  4. package/LICENSE +201 -0
  5. package/README.md +48 -0
  6. package/contracts/access/DataPrivacyFramework/DataPrivacyFramework.sol +480 -0
  7. package/contracts/access/DataPrivacyFramework/README.md +68 -0
  8. package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +1139 -0
  9. package/contracts/mocks/README.md +5 -0
  10. package/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock.sol +9 -0
  11. package/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.sol +17 -0
  12. package/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock.sol +34 -0
  13. package/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol +431 -0
  14. package/contracts/mocks/utils/mpc/BitwiseTestsContract.sol +361 -0
  15. package/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol +307 -0
  16. package/contracts/mocks/utils/mpc/Comparison2TestsContract.sol +307 -0
  17. package/contracts/mocks/utils/mpc/MinMaxTestsContract.sol +297 -0
  18. package/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.sol +185 -0
  19. package/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.sol +448 -0
  20. package/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol +81 -0
  21. package/contracts/mocks/utils/mpc/README.md +486 -0
  22. package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +311 -0
  23. package/contracts/mocks/utils/mpc/StringTestsContract.sol +59 -0
  24. package/contracts/mocks/utils/mpc/TransferScalarTestsContract.sol +271 -0
  25. package/contracts/mocks/utils/mpc/TransferTestsContract.sol +715 -0
  26. package/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.sol +25 -0
  27. package/contracts/onboard/AccountOnboard.sol +21 -0
  28. package/contracts/onboard/README.md +65 -0
  29. package/contracts/package.json +11 -0
  30. package/contracts/token/PrivateERC20/IPrivateERC20.sol +142 -0
  31. package/contracts/token/PrivateERC20/PrivateERC20.sol +478 -0
  32. package/contracts/token/PrivateERC20/README.md +104 -0
  33. package/contracts/token/PrivateERC721/PrivateERC721.sol +458 -0
  34. package/contracts/token/PrivateERC721/README.md +282 -0
  35. package/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.sol +87 -0
  36. package/contracts/utils/mpc/MpcCore.sol +3215 -0
  37. package/contracts/utils/mpc/MpcInterface.sol +41 -0
  38. package/contracts/utils/mpc/README.md +82 -0
  39. package/hardhat.config.ts +18 -0
  40. package/package.json +14 -0
  41. package/test/access/DataPrivacyFramework/DataPrivacyFramework.test.ts +780 -0
  42. package/test/onboard/AccountOnboard.test.ts +45 -0
  43. package/test/token/PrivateERC20/PrivateERC20.test.ts +546 -0
  44. package/test/token/PrivateERC721/PrivateERC721.test.ts +223 -0
  45. package/test/utils/accounts.ts +55 -0
  46. package/test/utils/mpc/Precompile.test.ts +113 -0
  47. package/test/utils/mpc/String.test.ts +227 -0
  48. package/tsconfig.json +11 -0
  49. package/typechain-types/@openzeppelin/contracts/index.ts +9 -0
  50. package/typechain-types/@openzeppelin/contracts/interfaces/IERC4906.ts +462 -0
  51. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts +69 -0
  52. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts +69 -0
  53. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts +69 -0
  54. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
  55. package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +6 -0
  56. package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721.ts +393 -0
  57. package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts +110 -0
  58. package/typechain-types/@openzeppelin/contracts/token/ERC721/index.ts +5 -0
  59. package/typechain-types/@openzeppelin/contracts/token/index.ts +5 -0
  60. package/typechain-types/@openzeppelin/contracts/utils/index.ts +5 -0
  61. package/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.ts +94 -0
  62. package/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts +94 -0
  63. package/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
  64. package/typechain-types/@openzeppelin/index.ts +5 -0
  65. package/typechain-types/common.ts +131 -0
  66. package/typechain-types/contracts/access/DataPrivacyFramework/DataPrivacyFramework.ts +598 -0
  67. package/typechain-types/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.ts +598 -0
  68. package/typechain-types/contracts/access/DataPrivacyFramework/extensions/index.ts +4 -0
  69. package/typechain-types/contracts/access/DataPrivacyFramework/index.ts +6 -0
  70. package/typechain-types/contracts/access/index.ts +5 -0
  71. package/typechain-types/contracts/index.ts +13 -0
  72. package/typechain-types/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock.ts +598 -0
  73. package/typechain-types/contracts/mocks/access/DataPrivacyFramework/index.ts +4 -0
  74. package/typechain-types/contracts/mocks/access/index.ts +5 -0
  75. package/typechain-types/contracts/mocks/index.ts +11 -0
  76. package/typechain-types/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.ts +543 -0
  77. package/typechain-types/contracts/mocks/token/PrivateERC20/index.ts +4 -0
  78. package/typechain-types/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock.ts +576 -0
  79. package/typechain-types/contracts/mocks/token/PrivateERC721/index.ts +4 -0
  80. package/typechain-types/contracts/mocks/token/index.ts +7 -0
  81. package/typechain-types/contracts/mocks/utils/index.ts +5 -0
  82. package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.ts +354 -0
  83. package/typechain-types/contracts/mocks/utils/mpc/BitwiseTestsContract.ts +340 -0
  84. package/typechain-types/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract.ts +340 -0
  85. package/typechain-types/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/index.ts +4 -0
  86. package/typechain-types/contracts/mocks/utils/mpc/Comparison2TestsContract.ts +340 -0
  87. package/typechain-types/contracts/mocks/utils/mpc/MinMaxTestsContract.ts +321 -0
  88. package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.ts +199 -0
  89. package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.ts +384 -0
  90. package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract.ts +218 -0
  91. package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/index.ts +4 -0
  92. package/typechain-types/contracts/mocks/utils/mpc/ShiftTestsContract.ts +339 -0
  93. package/typechain-types/contracts/mocks/utils/mpc/StringTestsContract.ts +211 -0
  94. package/typechain-types/contracts/mocks/utils/mpc/TransferScalarTestsContract.ts +266 -0
  95. package/typechain-types/contracts/mocks/utils/mpc/TransferTestsContract.ts +288 -0
  96. package/typechain-types/contracts/mocks/utils/mpc/index.ts +17 -0
  97. package/typechain-types/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.ts +173 -0
  98. package/typechain-types/contracts/mocks/wallet/PrivateERC20Wallet/index.ts +4 -0
  99. package/typechain-types/contracts/mocks/wallet/index.ts +5 -0
  100. package/typechain-types/contracts/onboard/AccountOnboard.ts +135 -0
  101. package/typechain-types/contracts/onboard/index.ts +4 -0
  102. package/typechain-types/contracts/token/PrivateERC20/IPrivateERC20.ts +437 -0
  103. package/typechain-types/contracts/token/PrivateERC20/PrivateERC20.ts +505 -0
  104. package/typechain-types/contracts/token/PrivateERC20/index.ts +5 -0
  105. package/typechain-types/contracts/token/PrivateERC721/PrivateERC721.ts +409 -0
  106. package/typechain-types/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.ts +501 -0
  107. package/typechain-types/contracts/token/PrivateERC721/extensions/index.ts +4 -0
  108. package/typechain-types/contracts/token/PrivateERC721/index.ts +6 -0
  109. package/typechain-types/contracts/token/index.ts +7 -0
  110. package/typechain-types/contracts/utils/index.ts +5 -0
  111. package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +698 -0
  112. package/typechain-types/contracts/utils/mpc/MpcInterface.sol/index.ts +4 -0
  113. package/typechain-types/contracts/utils/mpc/index.ts +5 -0
  114. package/typechain-types/factories/@openzeppelin/contracts/index.ts +6 -0
  115. package/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC4906__factory.ts +339 -0
  116. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts +127 -0
  117. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts +111 -0
  118. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts +128 -0
  119. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
  120. package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +5 -0
  121. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts +59 -0
  122. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts +307 -0
  123. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/index.ts +5 -0
  124. package/typechain-types/factories/@openzeppelin/contracts/token/index.ts +4 -0
  125. package/typechain-types/factories/@openzeppelin/contracts/utils/index.ts +4 -0
  126. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.ts +41 -0
  127. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts +41 -0
  128. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
  129. package/typechain-types/factories/@openzeppelin/index.ts +4 -0
  130. package/typechain-types/factories/contracts/access/DataPrivacyFramework/DataPrivacyFramework__factory.ts +621 -0
  131. package/typechain-types/factories/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc__factory.ts +621 -0
  132. package/typechain-types/factories/contracts/access/DataPrivacyFramework/extensions/index.ts +4 -0
  133. package/typechain-types/factories/contracts/access/DataPrivacyFramework/index.ts +5 -0
  134. package/typechain-types/factories/contracts/access/index.ts +4 -0
  135. package/typechain-types/factories/contracts/index.ts +8 -0
  136. package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +670 -0
  137. package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/index.ts +4 -0
  138. package/typechain-types/factories/contracts/mocks/access/index.ts +4 -0
  139. package/typechain-types/factories/contracts/mocks/index.ts +7 -0
  140. package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +615 -0
  141. package/typechain-types/factories/contracts/mocks/token/PrivateERC20/index.ts +4 -0
  142. package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +630 -0
  143. package/typechain-types/factories/contracts/mocks/token/PrivateERC721/index.ts +4 -0
  144. package/typechain-types/factories/contracts/mocks/token/index.ts +5 -0
  145. package/typechain-types/factories/contracts/mocks/utils/index.ts +4 -0
  146. package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +374 -0
  147. package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +361 -0
  148. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract__factory.ts +361 -0
  149. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/index.ts +4 -0
  150. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +361 -0
  151. package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +337 -0
  152. package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +236 -0
  153. package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous2TestsContract__factory.ts +432 -0
  154. package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract__factory.ts +245 -0
  155. package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/index.ts +4 -0
  156. package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +374 -0
  157. package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +264 -0
  158. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +360 -0
  159. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +441 -0
  160. package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +15 -0
  161. package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +194 -0
  162. package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/index.ts +4 -0
  163. package/typechain-types/factories/contracts/mocks/wallet/index.ts +4 -0
  164. package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +104 -0
  165. package/typechain-types/factories/contracts/onboard/index.ts +4 -0
  166. package/typechain-types/factories/contracts/token/PrivateERC20/IPrivateERC20__factory.ts +406 -0
  167. package/typechain-types/factories/contracts/token/PrivateERC20/PrivateERC20__factory.ts +532 -0
  168. package/typechain-types/factories/contracts/token/PrivateERC20/index.ts +5 -0
  169. package/typechain-types/factories/contracts/token/PrivateERC721/PrivateERC721__factory.ts +439 -0
  170. package/typechain-types/factories/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage__factory.ts +512 -0
  171. package/typechain-types/factories/contracts/token/PrivateERC721/extensions/index.ts +4 -0
  172. package/typechain-types/factories/contracts/token/PrivateERC721/index.ts +5 -0
  173. package/typechain-types/factories/contracts/token/index.ts +5 -0
  174. package/typechain-types/factories/contracts/utils/index.ts +4 -0
  175. package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +919 -0
  176. package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/index.ts +4 -0
  177. package/typechain-types/factories/contracts/utils/mpc/index.ts +4 -0
  178. package/typechain-types/factories/index.ts +5 -0
  179. package/typechain-types/hardhat.d.ts +621 -0
  180. package/typechain-types/index.ts +72 -0
@@ -0,0 +1,621 @@
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
+ DataPrivacyFramework,
8
+ DataPrivacyFrameworkInterface,
9
+ } from "../../../../contracts/access/DataPrivacyFramework/DataPrivacyFramework";
10
+
11
+ const _abi = [
12
+ {
13
+ inputs: [],
14
+ name: "ADDRESS_ALL",
15
+ outputs: [
16
+ {
17
+ internalType: "address",
18
+ name: "",
19
+ type: "address",
20
+ },
21
+ ],
22
+ stateMutability: "view",
23
+ type: "function",
24
+ },
25
+ {
26
+ inputs: [],
27
+ name: "STRING_ALL",
28
+ outputs: [
29
+ {
30
+ internalType: "string",
31
+ name: "",
32
+ type: "string",
33
+ },
34
+ ],
35
+ stateMutability: "view",
36
+ type: "function",
37
+ },
38
+ {
39
+ inputs: [
40
+ {
41
+ internalType: "address",
42
+ name: "",
43
+ type: "address",
44
+ },
45
+ ],
46
+ name: "activePermissions",
47
+ outputs: [
48
+ {
49
+ internalType: "uint256",
50
+ name: "",
51
+ type: "uint256",
52
+ },
53
+ ],
54
+ stateMutability: "view",
55
+ type: "function",
56
+ },
57
+ {
58
+ inputs: [
59
+ {
60
+ internalType: "string",
61
+ name: "operation",
62
+ type: "string",
63
+ },
64
+ ],
65
+ name: "addAllowedOperation",
66
+ outputs: [
67
+ {
68
+ internalType: "bool",
69
+ name: "",
70
+ type: "bool",
71
+ },
72
+ ],
73
+ stateMutability: "nonpayable",
74
+ type: "function",
75
+ },
76
+ {
77
+ inputs: [
78
+ {
79
+ internalType: "string",
80
+ name: "operation",
81
+ type: "string",
82
+ },
83
+ ],
84
+ name: "addRestrictedOperation",
85
+ outputs: [
86
+ {
87
+ internalType: "bool",
88
+ name: "",
89
+ type: "bool",
90
+ },
91
+ ],
92
+ stateMutability: "nonpayable",
93
+ type: "function",
94
+ },
95
+ {
96
+ inputs: [],
97
+ name: "addressDefaultPermission",
98
+ outputs: [
99
+ {
100
+ internalType: "bool",
101
+ name: "",
102
+ type: "bool",
103
+ },
104
+ ],
105
+ stateMutability: "view",
106
+ type: "function",
107
+ },
108
+ {
109
+ inputs: [
110
+ {
111
+ internalType: "string",
112
+ name: "",
113
+ type: "string",
114
+ },
115
+ ],
116
+ name: "allowedOperations",
117
+ outputs: [
118
+ {
119
+ internalType: "bool",
120
+ name: "",
121
+ type: "bool",
122
+ },
123
+ ],
124
+ stateMutability: "view",
125
+ type: "function",
126
+ },
127
+ {
128
+ inputs: [
129
+ {
130
+ internalType: "uint256",
131
+ name: "",
132
+ type: "uint256",
133
+ },
134
+ ],
135
+ name: "conditions",
136
+ outputs: [
137
+ {
138
+ internalType: "uint256",
139
+ name: "id",
140
+ type: "uint256",
141
+ },
142
+ {
143
+ internalType: "address",
144
+ name: "caller",
145
+ type: "address",
146
+ },
147
+ {
148
+ internalType: "string",
149
+ name: "operation",
150
+ type: "string",
151
+ },
152
+ {
153
+ internalType: "bool",
154
+ name: "active",
155
+ type: "bool",
156
+ },
157
+ {
158
+ internalType: "bool",
159
+ name: "falseKey",
160
+ type: "bool",
161
+ },
162
+ {
163
+ internalType: "bool",
164
+ name: "trueKey",
165
+ type: "bool",
166
+ },
167
+ {
168
+ internalType: "uint256",
169
+ name: "timestampBefore",
170
+ type: "uint256",
171
+ },
172
+ {
173
+ internalType: "uint256",
174
+ name: "timestampAfter",
175
+ type: "uint256",
176
+ },
177
+ {
178
+ internalType: "uint256",
179
+ name: "uintParameter",
180
+ type: "uint256",
181
+ },
182
+ {
183
+ internalType: "address",
184
+ name: "addressParameter",
185
+ type: "address",
186
+ },
187
+ {
188
+ internalType: "string",
189
+ name: "stringParameter",
190
+ type: "string",
191
+ },
192
+ ],
193
+ stateMutability: "view",
194
+ type: "function",
195
+ },
196
+ {
197
+ inputs: [
198
+ {
199
+ internalType: "uint256",
200
+ name: "startIdx",
201
+ type: "uint256",
202
+ },
203
+ {
204
+ internalType: "uint256",
205
+ name: "chunkSize",
206
+ type: "uint256",
207
+ },
208
+ ],
209
+ name: "getConditions",
210
+ outputs: [
211
+ {
212
+ components: [
213
+ {
214
+ internalType: "uint256",
215
+ name: "id",
216
+ type: "uint256",
217
+ },
218
+ {
219
+ internalType: "address",
220
+ name: "caller",
221
+ type: "address",
222
+ },
223
+ {
224
+ internalType: "string",
225
+ name: "operation",
226
+ type: "string",
227
+ },
228
+ {
229
+ internalType: "bool",
230
+ name: "active",
231
+ type: "bool",
232
+ },
233
+ {
234
+ internalType: "bool",
235
+ name: "falseKey",
236
+ type: "bool",
237
+ },
238
+ {
239
+ internalType: "bool",
240
+ name: "trueKey",
241
+ type: "bool",
242
+ },
243
+ {
244
+ internalType: "uint256",
245
+ name: "timestampBefore",
246
+ type: "uint256",
247
+ },
248
+ {
249
+ internalType: "uint256",
250
+ name: "timestampAfter",
251
+ type: "uint256",
252
+ },
253
+ {
254
+ internalType: "uint256",
255
+ name: "uintParameter",
256
+ type: "uint256",
257
+ },
258
+ {
259
+ internalType: "address",
260
+ name: "addressParameter",
261
+ type: "address",
262
+ },
263
+ {
264
+ internalType: "string",
265
+ name: "stringParameter",
266
+ type: "string",
267
+ },
268
+ ],
269
+ internalType: "struct DataPrivacyFramework.Condition[]",
270
+ name: "",
271
+ type: "tuple[]",
272
+ },
273
+ ],
274
+ stateMutability: "view",
275
+ type: "function",
276
+ },
277
+ {
278
+ inputs: [],
279
+ name: "getConditionsCount",
280
+ outputs: [
281
+ {
282
+ internalType: "uint256",
283
+ name: "",
284
+ type: "uint256",
285
+ },
286
+ ],
287
+ stateMutability: "view",
288
+ type: "function",
289
+ },
290
+ {
291
+ inputs: [
292
+ {
293
+ internalType: "address",
294
+ name: "caller",
295
+ type: "address",
296
+ },
297
+ {
298
+ internalType: "string",
299
+ name: "operation",
300
+ type: "string",
301
+ },
302
+ {
303
+ internalType: "uint256",
304
+ name: "uintParameter",
305
+ type: "uint256",
306
+ },
307
+ ],
308
+ name: "isOperationAllowed",
309
+ outputs: [
310
+ {
311
+ internalType: "bool",
312
+ name: "",
313
+ type: "bool",
314
+ },
315
+ ],
316
+ stateMutability: "view",
317
+ type: "function",
318
+ },
319
+ {
320
+ inputs: [
321
+ {
322
+ internalType: "address",
323
+ name: "caller",
324
+ type: "address",
325
+ },
326
+ {
327
+ internalType: "string",
328
+ name: "operation",
329
+ type: "string",
330
+ },
331
+ ],
332
+ name: "isOperationAllowed",
333
+ outputs: [
334
+ {
335
+ internalType: "bool",
336
+ name: "",
337
+ type: "bool",
338
+ },
339
+ ],
340
+ stateMutability: "view",
341
+ type: "function",
342
+ },
343
+ {
344
+ inputs: [
345
+ {
346
+ internalType: "address",
347
+ name: "caller",
348
+ type: "address",
349
+ },
350
+ {
351
+ internalType: "string",
352
+ name: "operation",
353
+ type: "string",
354
+ },
355
+ {
356
+ internalType: "string",
357
+ name: "stringParameter",
358
+ type: "string",
359
+ },
360
+ ],
361
+ name: "isOperationAllowed",
362
+ outputs: [
363
+ {
364
+ internalType: "bool",
365
+ name: "",
366
+ type: "bool",
367
+ },
368
+ ],
369
+ stateMutability: "view",
370
+ type: "function",
371
+ },
372
+ {
373
+ inputs: [
374
+ {
375
+ internalType: "address",
376
+ name: "caller",
377
+ type: "address",
378
+ },
379
+ {
380
+ internalType: "string",
381
+ name: "operation",
382
+ type: "string",
383
+ },
384
+ {
385
+ internalType: "address",
386
+ name: "addressParameter",
387
+ type: "address",
388
+ },
389
+ ],
390
+ name: "isOperationAllowed",
391
+ outputs: [
392
+ {
393
+ internalType: "bool",
394
+ name: "",
395
+ type: "bool",
396
+ },
397
+ ],
398
+ stateMutability: "view",
399
+ type: "function",
400
+ },
401
+ {
402
+ inputs: [],
403
+ name: "operationDefaultPermission",
404
+ outputs: [
405
+ {
406
+ internalType: "bool",
407
+ name: "",
408
+ type: "bool",
409
+ },
410
+ ],
411
+ stateMutability: "view",
412
+ type: "function",
413
+ },
414
+ {
415
+ inputs: [
416
+ {
417
+ internalType: "address",
418
+ name: "",
419
+ type: "address",
420
+ },
421
+ {
422
+ internalType: "string",
423
+ name: "",
424
+ type: "string",
425
+ },
426
+ ],
427
+ name: "permissions",
428
+ outputs: [
429
+ {
430
+ internalType: "uint256",
431
+ name: "",
432
+ type: "uint256",
433
+ },
434
+ ],
435
+ stateMutability: "view",
436
+ type: "function",
437
+ },
438
+ {
439
+ inputs: [
440
+ {
441
+ internalType: "string",
442
+ name: "operation",
443
+ type: "string",
444
+ },
445
+ ],
446
+ name: "removeAllowedOperation",
447
+ outputs: [
448
+ {
449
+ internalType: "bool",
450
+ name: "",
451
+ type: "bool",
452
+ },
453
+ ],
454
+ stateMutability: "nonpayable",
455
+ type: "function",
456
+ },
457
+ {
458
+ inputs: [
459
+ {
460
+ internalType: "string",
461
+ name: "operation",
462
+ type: "string",
463
+ },
464
+ ],
465
+ name: "removeRestrictedOperation",
466
+ outputs: [
467
+ {
468
+ internalType: "bool",
469
+ name: "",
470
+ type: "bool",
471
+ },
472
+ ],
473
+ stateMutability: "nonpayable",
474
+ type: "function",
475
+ },
476
+ {
477
+ inputs: [
478
+ {
479
+ internalType: "string",
480
+ name: "",
481
+ type: "string",
482
+ },
483
+ ],
484
+ name: "restrictedOperations",
485
+ outputs: [
486
+ {
487
+ internalType: "bool",
488
+ name: "",
489
+ type: "bool",
490
+ },
491
+ ],
492
+ stateMutability: "view",
493
+ type: "function",
494
+ },
495
+ {
496
+ inputs: [
497
+ {
498
+ internalType: "bool",
499
+ name: "defaultPermission",
500
+ type: "bool",
501
+ },
502
+ ],
503
+ name: "setAddressDefaultPermission",
504
+ outputs: [
505
+ {
506
+ internalType: "bool",
507
+ name: "",
508
+ type: "bool",
509
+ },
510
+ ],
511
+ stateMutability: "nonpayable",
512
+ type: "function",
513
+ },
514
+ {
515
+ inputs: [
516
+ {
517
+ internalType: "bool",
518
+ name: "defaultPermission",
519
+ type: "bool",
520
+ },
521
+ ],
522
+ name: "setOperationDefaultPermission",
523
+ outputs: [
524
+ {
525
+ internalType: "bool",
526
+ name: "",
527
+ type: "bool",
528
+ },
529
+ ],
530
+ stateMutability: "nonpayable",
531
+ type: "function",
532
+ },
533
+ {
534
+ inputs: [
535
+ {
536
+ components: [
537
+ {
538
+ internalType: "address",
539
+ name: "caller",
540
+ type: "address",
541
+ },
542
+ {
543
+ internalType: "string",
544
+ name: "operation",
545
+ type: "string",
546
+ },
547
+ {
548
+ internalType: "bool",
549
+ name: "active",
550
+ type: "bool",
551
+ },
552
+ {
553
+ internalType: "uint256",
554
+ name: "timestampBefore",
555
+ type: "uint256",
556
+ },
557
+ {
558
+ internalType: "uint256",
559
+ name: "timestampAfter",
560
+ type: "uint256",
561
+ },
562
+ {
563
+ internalType: "bool",
564
+ name: "falseKey",
565
+ type: "bool",
566
+ },
567
+ {
568
+ internalType: "bool",
569
+ name: "trueKey",
570
+ type: "bool",
571
+ },
572
+ {
573
+ internalType: "uint256",
574
+ name: "uintParameter",
575
+ type: "uint256",
576
+ },
577
+ {
578
+ internalType: "address",
579
+ name: "addressParameter",
580
+ type: "address",
581
+ },
582
+ {
583
+ internalType: "string",
584
+ name: "stringParameter",
585
+ type: "string",
586
+ },
587
+ ],
588
+ internalType: "struct DataPrivacyFramework.InputData",
589
+ name: "inputData",
590
+ type: "tuple",
591
+ },
592
+ ],
593
+ name: "setPermission",
594
+ outputs: [
595
+ {
596
+ internalType: "bool",
597
+ name: "",
598
+ type: "bool",
599
+ },
600
+ ],
601
+ stateMutability: "nonpayable",
602
+ type: "function",
603
+ },
604
+ ] as const;
605
+
606
+ export class DataPrivacyFramework__factory {
607
+ static readonly abi = _abi;
608
+ static createInterface(): DataPrivacyFrameworkInterface {
609
+ return new Interface(_abi) as DataPrivacyFrameworkInterface;
610
+ }
611
+ static connect(
612
+ address: string,
613
+ runner?: ContractRunner | null
614
+ ): DataPrivacyFramework {
615
+ return new Contract(
616
+ address,
617
+ _abi,
618
+ runner
619
+ ) as unknown as DataPrivacyFramework;
620
+ }
621
+ }