@coti-io/coti-contracts 0.1.0 → 1.0.2
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/.github/workflows/npm-publish.yml +2 -1
- package/CONTRIBUTING.md +2 -2
- package/LICENSE +1 -1
- package/README.md +18 -35
- package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +3 -115
- package/contracts/mocks/README.md +1 -1
- package/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol +257 -280
- package/contracts/mocks/utils/mpc/BitwiseTestsContract.sol +93 -187
- package/contracts/mocks/utils/mpc/{Comparison1Tests.Contract.sol → Comparison1TestsContract.sol} +67 -115
- package/contracts/mocks/utils/mpc/Comparison2TestsContract.sol +76 -116
- package/contracts/mocks/utils/mpc/MinMaxTestsContract.sol +69 -164
- package/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.sol +103 -56
- package/contracts/mocks/utils/mpc/MiscellaneousTestsContract.sol +270 -0
- package/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract.sol +127 -0
- package/contracts/mocks/utils/mpc/README.md +12 -12
- package/contracts/mocks/utils/mpc/TransferScalarTestsContract.sol +54 -211
- package/contracts/mocks/utils/mpc/TransferTestsContract.sol +165 -640
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract.sol +222 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract.sol +222 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol +223 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract.sol +222 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract.sol +265 -0
- package/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol +281 -0
- package/contracts/onboard/AccountOnboard.sol +3 -3
- package/contracts/token/PrivateERC20/PrivateERC20.sol +1 -1
- package/contracts/token/PrivateERC721/IERC721Errors.sol +57 -0
- package/contracts/token/PrivateERC721/PrivateERC721.sol +1 -1
- package/contracts/utils/mpc/MpcCore.sol +2835 -988
- package/contracts/utils/mpc/MpcInterface.sol +6 -4
- package/hardhat.config.ts +17 -6
- package/package.json +20 -4
- package/test/token/PrivateERC20/PrivateERC20.test.ts +2 -2
- package/test/utils/accounts.ts +1 -1
- package/test/utils/mpc/Precompile.test.ts +42 -39
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/ArithmeticTestsContract.ts +374 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/PrecompilesArythmeticTestsContract.ts +374 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.ts +96 -10
- package/typechain-types/contracts/mocks/utils/mpc/BitwiseTestsContract.ts +45 -5
- package/typechain-types/contracts/mocks/utils/mpc/Comparison1TestsContract.ts +374 -0
- package/typechain-types/contracts/mocks/utils/mpc/Comparison2TestsContract.ts +45 -5
- package/typechain-types/contracts/mocks/utils/mpc/MinMaxTestsContract.ts +25 -5
- package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.ts +62 -0
- package/typechain-types/contracts/mocks/utils/mpc/MiscellaneousTestsContract.ts +396 -0
- package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract.ts +251 -0
- package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract.ts +11 -8
- package/typechain-types/contracts/mocks/utils/mpc/TransferScalarTestsContract.ts +15 -15
- package/typechain-types/contracts/mocks/utils/mpc/TransferTestsContract.ts +15 -15
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowance64TestsContract.ts +251 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowanceTestsContract.ts +250 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.ts +389 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_64TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_8TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract.ts +391 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract.ts +306 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferTestsContract.ts +125 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferWithAllowanceTestsContract.ts +125 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/index.ts +5 -0
- package/typechain-types/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.ts +296 -0
- package/typechain-types/contracts/mocks/utils/mpc/index.ts +9 -6
- package/typechain-types/contracts/onboard/AccountOnboard.ts +9 -4
- package/typechain-types/contracts/token/PrivateERC721/IERC721Errors.ts +69 -0
- package/typechain-types/contracts/token/PrivateERC721/index.ts +1 -0
- package/typechain-types/contracts/utils/mpc/MpcCore.ts +84 -0
- package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +81 -40
- package/typechain-types/contracts/utils/mpc/index.ts +1 -0
- package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/ArithmeticTestsContract__factory.ts +387 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/PrecompilesArythmeticTestsContract__factory.ts +388 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +92 -7
- package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +38 -2
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1TestsContract__factory.ts +387 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +38 -2
- package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +15 -2
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +66 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous2TestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory.ts +424 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory.ts +285 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract__factory.ts +19 -3
- package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +1 -1
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +4 -4
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +4 -4
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowance64TestsContract__factory.ts +294 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/TransferWithAllowanceTestsContract__factory.ts +292 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64TestsContract__factory.ts +720 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_64TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/TransferWithAllowance64_8TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract__factory.ts +724 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract__factory.ts +507 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferTestsContract__factory.ts +150 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/TransferWithAllowanceTestsContract__factory.ts +150 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract.sol/index.ts +5 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract__factory.ts +434 -0
- package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +9 -4
- package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +1 -1
- package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +8 -2
- package/typechain-types/factories/contracts/token/PrivateERC721/IERC721Errors__factory.ts +128 -0
- package/typechain-types/factories/contracts/token/PrivateERC721/index.ts +1 -0
- package/typechain-types/factories/contracts/utils/mpc/MpcCore__factory.ts +77 -0
- package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +124 -61
- package/typechain-types/factories/contracts/utils/mpc/index.ts +1 -0
- package/typechain-types/hardhat.d.ts +152 -26
- package/typechain-types/index.ts +20 -8
- package/contracts/access/DataPrivacyFramework/README.md +0 -68
- package/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.sol +0 -448
- package/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol +0 -81
- package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +0 -311
- package/contracts/token/PrivateERC20/README.md +0 -104
- package/contracts/token/PrivateERC721/README.md +0 -282
- package/contracts/utils/mpc/README.md +0 -82
|
@@ -90,17 +90,13 @@ declare module "hardhat/types/runtime" {
|
|
|
90
90
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
91
91
|
): Promise<Contracts.Miscellaneous1TestsContract__factory>;
|
|
92
92
|
getContractFactory(
|
|
93
|
-
name: "
|
|
93
|
+
name: "MiscellaneousTestsContract",
|
|
94
94
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
95
|
-
): Promise<Contracts.
|
|
95
|
+
): Promise<Contracts.MiscellaneousTestsContract__factory>;
|
|
96
96
|
getContractFactory(
|
|
97
97
|
name: "OffboardToUserKeyTestContract",
|
|
98
98
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
99
99
|
): Promise<Contracts.OffboardToUserKeyTestContract__factory>;
|
|
100
|
-
getContractFactory(
|
|
101
|
-
name: "ShiftTestsContract",
|
|
102
|
-
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
103
|
-
): Promise<Contracts.ShiftTestsContract__factory>;
|
|
104
100
|
getContractFactory(
|
|
105
101
|
name: "StringTestsContract",
|
|
106
102
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -113,6 +109,30 @@ declare module "hardhat/types/runtime" {
|
|
|
113
109
|
name: "TransferTestsContract",
|
|
114
110
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
115
111
|
): Promise<Contracts.TransferTestsContract__factory>;
|
|
112
|
+
getContractFactory(
|
|
113
|
+
name: "TransferWithAllowance64_16TestsContract",
|
|
114
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
115
|
+
): Promise<Contracts.TransferWithAllowance64_16TestsContract__factory>;
|
|
116
|
+
getContractFactory(
|
|
117
|
+
name: "TransferWithAllowance64_32TestsContract",
|
|
118
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
119
|
+
): Promise<Contracts.TransferWithAllowance64_32TestsContract__factory>;
|
|
120
|
+
getContractFactory(
|
|
121
|
+
name: "TransferWithAllowance64_64TestsContract",
|
|
122
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
123
|
+
): Promise<Contracts.TransferWithAllowance64_64TestsContract__factory>;
|
|
124
|
+
getContractFactory(
|
|
125
|
+
name: "TransferWithAllowance64_8TestsContract",
|
|
126
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
127
|
+
): Promise<Contracts.TransferWithAllowance64_8TestsContract__factory>;
|
|
128
|
+
getContractFactory(
|
|
129
|
+
name: "TransferWithAllowanceScalarTestsContract",
|
|
130
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
131
|
+
): Promise<Contracts.TransferWithAllowanceScalarTestsContract__factory>;
|
|
132
|
+
getContractFactory(
|
|
133
|
+
name: "TransferWithAllowanceTestsContract",
|
|
134
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
135
|
+
): Promise<Contracts.TransferWithAllowanceTestsContract__factory>;
|
|
116
136
|
getContractFactory(
|
|
117
137
|
name: "PrivateERC20WalletMock",
|
|
118
138
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -133,10 +153,18 @@ declare module "hardhat/types/runtime" {
|
|
|
133
153
|
name: "PrivateERC721URIStorage",
|
|
134
154
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
135
155
|
): Promise<Contracts.PrivateERC721URIStorage__factory>;
|
|
156
|
+
getContractFactory(
|
|
157
|
+
name: "IERC721Errors",
|
|
158
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
159
|
+
): Promise<Contracts.IERC721Errors__factory>;
|
|
136
160
|
getContractFactory(
|
|
137
161
|
name: "PrivateERC721",
|
|
138
162
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
139
163
|
): Promise<Contracts.PrivateERC721__factory>;
|
|
164
|
+
getContractFactory(
|
|
165
|
+
name: "MpcCore",
|
|
166
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
167
|
+
): Promise<Contracts.MpcCore__factory>;
|
|
140
168
|
getContractFactory(
|
|
141
169
|
name: "ExtendedOperations",
|
|
142
170
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -238,20 +266,15 @@ declare module "hardhat/types/runtime" {
|
|
|
238
266
|
signer?: ethers.Signer
|
|
239
267
|
): Promise<Contracts.Miscellaneous1TestsContract>;
|
|
240
268
|
getContractAt(
|
|
241
|
-
name: "
|
|
269
|
+
name: "MiscellaneousTestsContract",
|
|
242
270
|
address: string | ethers.Addressable,
|
|
243
271
|
signer?: ethers.Signer
|
|
244
|
-
): Promise<Contracts.
|
|
272
|
+
): Promise<Contracts.MiscellaneousTestsContract>;
|
|
245
273
|
getContractAt(
|
|
246
274
|
name: "OffboardToUserKeyTestContract",
|
|
247
275
|
address: string | ethers.Addressable,
|
|
248
276
|
signer?: ethers.Signer
|
|
249
277
|
): Promise<Contracts.OffboardToUserKeyTestContract>;
|
|
250
|
-
getContractAt(
|
|
251
|
-
name: "ShiftTestsContract",
|
|
252
|
-
address: string | ethers.Addressable,
|
|
253
|
-
signer?: ethers.Signer
|
|
254
|
-
): Promise<Contracts.ShiftTestsContract>;
|
|
255
278
|
getContractAt(
|
|
256
279
|
name: "StringTestsContract",
|
|
257
280
|
address: string | ethers.Addressable,
|
|
@@ -267,6 +290,36 @@ declare module "hardhat/types/runtime" {
|
|
|
267
290
|
address: string | ethers.Addressable,
|
|
268
291
|
signer?: ethers.Signer
|
|
269
292
|
): Promise<Contracts.TransferTestsContract>;
|
|
293
|
+
getContractAt(
|
|
294
|
+
name: "TransferWithAllowance64_16TestsContract",
|
|
295
|
+
address: string | ethers.Addressable,
|
|
296
|
+
signer?: ethers.Signer
|
|
297
|
+
): Promise<Contracts.TransferWithAllowance64_16TestsContract>;
|
|
298
|
+
getContractAt(
|
|
299
|
+
name: "TransferWithAllowance64_32TestsContract",
|
|
300
|
+
address: string | ethers.Addressable,
|
|
301
|
+
signer?: ethers.Signer
|
|
302
|
+
): Promise<Contracts.TransferWithAllowance64_32TestsContract>;
|
|
303
|
+
getContractAt(
|
|
304
|
+
name: "TransferWithAllowance64_64TestsContract",
|
|
305
|
+
address: string | ethers.Addressable,
|
|
306
|
+
signer?: ethers.Signer
|
|
307
|
+
): Promise<Contracts.TransferWithAllowance64_64TestsContract>;
|
|
308
|
+
getContractAt(
|
|
309
|
+
name: "TransferWithAllowance64_8TestsContract",
|
|
310
|
+
address: string | ethers.Addressable,
|
|
311
|
+
signer?: ethers.Signer
|
|
312
|
+
): Promise<Contracts.TransferWithAllowance64_8TestsContract>;
|
|
313
|
+
getContractAt(
|
|
314
|
+
name: "TransferWithAllowanceScalarTestsContract",
|
|
315
|
+
address: string | ethers.Addressable,
|
|
316
|
+
signer?: ethers.Signer
|
|
317
|
+
): Promise<Contracts.TransferWithAllowanceScalarTestsContract>;
|
|
318
|
+
getContractAt(
|
|
319
|
+
name: "TransferWithAllowanceTestsContract",
|
|
320
|
+
address: string | ethers.Addressable,
|
|
321
|
+
signer?: ethers.Signer
|
|
322
|
+
): Promise<Contracts.TransferWithAllowanceTestsContract>;
|
|
270
323
|
getContractAt(
|
|
271
324
|
name: "PrivateERC20WalletMock",
|
|
272
325
|
address: string | ethers.Addressable,
|
|
@@ -292,11 +345,21 @@ declare module "hardhat/types/runtime" {
|
|
|
292
345
|
address: string | ethers.Addressable,
|
|
293
346
|
signer?: ethers.Signer
|
|
294
347
|
): Promise<Contracts.PrivateERC721URIStorage>;
|
|
348
|
+
getContractAt(
|
|
349
|
+
name: "IERC721Errors",
|
|
350
|
+
address: string | ethers.Addressable,
|
|
351
|
+
signer?: ethers.Signer
|
|
352
|
+
): Promise<Contracts.IERC721Errors>;
|
|
295
353
|
getContractAt(
|
|
296
354
|
name: "PrivateERC721",
|
|
297
355
|
address: string | ethers.Addressable,
|
|
298
356
|
signer?: ethers.Signer
|
|
299
357
|
): Promise<Contracts.PrivateERC721>;
|
|
358
|
+
getContractAt(
|
|
359
|
+
name: "MpcCore",
|
|
360
|
+
address: string | ethers.Addressable,
|
|
361
|
+
signer?: ethers.Signer
|
|
362
|
+
): Promise<Contracts.MpcCore>;
|
|
300
363
|
getContractAt(
|
|
301
364
|
name: "ExtendedOperations",
|
|
302
365
|
address: string | ethers.Addressable,
|
|
@@ -380,17 +443,13 @@ declare module "hardhat/types/runtime" {
|
|
|
380
443
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
381
444
|
): Promise<Contracts.Miscellaneous1TestsContract>;
|
|
382
445
|
deployContract(
|
|
383
|
-
name: "
|
|
446
|
+
name: "MiscellaneousTestsContract",
|
|
384
447
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
385
|
-
): Promise<Contracts.
|
|
448
|
+
): Promise<Contracts.MiscellaneousTestsContract>;
|
|
386
449
|
deployContract(
|
|
387
450
|
name: "OffboardToUserKeyTestContract",
|
|
388
451
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
389
452
|
): Promise<Contracts.OffboardToUserKeyTestContract>;
|
|
390
|
-
deployContract(
|
|
391
|
-
name: "ShiftTestsContract",
|
|
392
|
-
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
393
|
-
): Promise<Contracts.ShiftTestsContract>;
|
|
394
453
|
deployContract(
|
|
395
454
|
name: "StringTestsContract",
|
|
396
455
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
@@ -403,6 +462,30 @@ declare module "hardhat/types/runtime" {
|
|
|
403
462
|
name: "TransferTestsContract",
|
|
404
463
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
405
464
|
): Promise<Contracts.TransferTestsContract>;
|
|
465
|
+
deployContract(
|
|
466
|
+
name: "TransferWithAllowance64_16TestsContract",
|
|
467
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
468
|
+
): Promise<Contracts.TransferWithAllowance64_16TestsContract>;
|
|
469
|
+
deployContract(
|
|
470
|
+
name: "TransferWithAllowance64_32TestsContract",
|
|
471
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
472
|
+
): Promise<Contracts.TransferWithAllowance64_32TestsContract>;
|
|
473
|
+
deployContract(
|
|
474
|
+
name: "TransferWithAllowance64_64TestsContract",
|
|
475
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
476
|
+
): Promise<Contracts.TransferWithAllowance64_64TestsContract>;
|
|
477
|
+
deployContract(
|
|
478
|
+
name: "TransferWithAllowance64_8TestsContract",
|
|
479
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
480
|
+
): Promise<Contracts.TransferWithAllowance64_8TestsContract>;
|
|
481
|
+
deployContract(
|
|
482
|
+
name: "TransferWithAllowanceScalarTestsContract",
|
|
483
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
484
|
+
): Promise<Contracts.TransferWithAllowanceScalarTestsContract>;
|
|
485
|
+
deployContract(
|
|
486
|
+
name: "TransferWithAllowanceTestsContract",
|
|
487
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
488
|
+
): Promise<Contracts.TransferWithAllowanceTestsContract>;
|
|
406
489
|
deployContract(
|
|
407
490
|
name: "PrivateERC20WalletMock",
|
|
408
491
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
@@ -423,10 +506,18 @@ declare module "hardhat/types/runtime" {
|
|
|
423
506
|
name: "PrivateERC721URIStorage",
|
|
424
507
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
425
508
|
): Promise<Contracts.PrivateERC721URIStorage>;
|
|
509
|
+
deployContract(
|
|
510
|
+
name: "IERC721Errors",
|
|
511
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
512
|
+
): Promise<Contracts.IERC721Errors>;
|
|
426
513
|
deployContract(
|
|
427
514
|
name: "PrivateERC721",
|
|
428
515
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
429
516
|
): Promise<Contracts.PrivateERC721>;
|
|
517
|
+
deployContract(
|
|
518
|
+
name: "MpcCore",
|
|
519
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
520
|
+
): Promise<Contracts.MpcCore>;
|
|
430
521
|
deployContract(
|
|
431
522
|
name: "ExtendedOperations",
|
|
432
523
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
@@ -528,20 +619,15 @@ declare module "hardhat/types/runtime" {
|
|
|
528
619
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
529
620
|
): Promise<Contracts.Miscellaneous1TestsContract>;
|
|
530
621
|
deployContract(
|
|
531
|
-
name: "
|
|
622
|
+
name: "MiscellaneousTestsContract",
|
|
532
623
|
args: any[],
|
|
533
624
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
534
|
-
): Promise<Contracts.
|
|
625
|
+
): Promise<Contracts.MiscellaneousTestsContract>;
|
|
535
626
|
deployContract(
|
|
536
627
|
name: "OffboardToUserKeyTestContract",
|
|
537
628
|
args: any[],
|
|
538
629
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
539
630
|
): Promise<Contracts.OffboardToUserKeyTestContract>;
|
|
540
|
-
deployContract(
|
|
541
|
-
name: "ShiftTestsContract",
|
|
542
|
-
args: any[],
|
|
543
|
-
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
544
|
-
): Promise<Contracts.ShiftTestsContract>;
|
|
545
631
|
deployContract(
|
|
546
632
|
name: "StringTestsContract",
|
|
547
633
|
args: any[],
|
|
@@ -557,6 +643,36 @@ declare module "hardhat/types/runtime" {
|
|
|
557
643
|
args: any[],
|
|
558
644
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
559
645
|
): Promise<Contracts.TransferTestsContract>;
|
|
646
|
+
deployContract(
|
|
647
|
+
name: "TransferWithAllowance64_16TestsContract",
|
|
648
|
+
args: any[],
|
|
649
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
650
|
+
): Promise<Contracts.TransferWithAllowance64_16TestsContract>;
|
|
651
|
+
deployContract(
|
|
652
|
+
name: "TransferWithAllowance64_32TestsContract",
|
|
653
|
+
args: any[],
|
|
654
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
655
|
+
): Promise<Contracts.TransferWithAllowance64_32TestsContract>;
|
|
656
|
+
deployContract(
|
|
657
|
+
name: "TransferWithAllowance64_64TestsContract",
|
|
658
|
+
args: any[],
|
|
659
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
660
|
+
): Promise<Contracts.TransferWithAllowance64_64TestsContract>;
|
|
661
|
+
deployContract(
|
|
662
|
+
name: "TransferWithAllowance64_8TestsContract",
|
|
663
|
+
args: any[],
|
|
664
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
665
|
+
): Promise<Contracts.TransferWithAllowance64_8TestsContract>;
|
|
666
|
+
deployContract(
|
|
667
|
+
name: "TransferWithAllowanceScalarTestsContract",
|
|
668
|
+
args: any[],
|
|
669
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
670
|
+
): Promise<Contracts.TransferWithAllowanceScalarTestsContract>;
|
|
671
|
+
deployContract(
|
|
672
|
+
name: "TransferWithAllowanceTestsContract",
|
|
673
|
+
args: any[],
|
|
674
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
675
|
+
): Promise<Contracts.TransferWithAllowanceTestsContract>;
|
|
560
676
|
deployContract(
|
|
561
677
|
name: "PrivateERC20WalletMock",
|
|
562
678
|
args: any[],
|
|
@@ -582,11 +698,21 @@ declare module "hardhat/types/runtime" {
|
|
|
582
698
|
args: any[],
|
|
583
699
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
584
700
|
): Promise<Contracts.PrivateERC721URIStorage>;
|
|
701
|
+
deployContract(
|
|
702
|
+
name: "IERC721Errors",
|
|
703
|
+
args: any[],
|
|
704
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
705
|
+
): Promise<Contracts.IERC721Errors>;
|
|
585
706
|
deployContract(
|
|
586
707
|
name: "PrivateERC721",
|
|
587
708
|
args: any[],
|
|
588
709
|
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
589
710
|
): Promise<Contracts.PrivateERC721>;
|
|
711
|
+
deployContract(
|
|
712
|
+
name: "MpcCore",
|
|
713
|
+
args: any[],
|
|
714
|
+
signerOrOptions?: ethers.Signer | DeployContractOptions
|
|
715
|
+
): Promise<Contracts.MpcCore>;
|
|
590
716
|
deployContract(
|
|
591
717
|
name: "ExtendedOperations",
|
|
592
718
|
args: any[],
|
package/typechain-types/index.ts
CHANGED
|
@@ -36,26 +36,36 @@ export type { ArithmeticTestsContract } from "./contracts/mocks/utils/mpc/Arithm
|
|
|
36
36
|
export { ArithmeticTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory";
|
|
37
37
|
export type { BitwiseTestsContract } from "./contracts/mocks/utils/mpc/BitwiseTestsContract";
|
|
38
38
|
export { BitwiseTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory";
|
|
39
|
-
export type { Comparison1TestsContract } from "./contracts/mocks/utils/mpc/
|
|
40
|
-
export { Comparison1TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/
|
|
39
|
+
export type { Comparison1TestsContract } from "./contracts/mocks/utils/mpc/Comparison1TestsContract";
|
|
40
|
+
export { Comparison1TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/Comparison1TestsContract__factory";
|
|
41
41
|
export type { Comparison2TestsContract } from "./contracts/mocks/utils/mpc/Comparison2TestsContract";
|
|
42
42
|
export { Comparison2TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory";
|
|
43
43
|
export type { MinMaxTestsContract } from "./contracts/mocks/utils/mpc/MinMaxTestsContract";
|
|
44
44
|
export { MinMaxTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory";
|
|
45
45
|
export type { Miscellaneous1TestsContract } from "./contracts/mocks/utils/mpc/Miscellaneous1TestsContract";
|
|
46
46
|
export { Miscellaneous1TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory";
|
|
47
|
-
export type {
|
|
48
|
-
export {
|
|
49
|
-
export type { OffboardToUserKeyTestContract } from "./contracts/mocks/utils/mpc/
|
|
50
|
-
export { OffboardToUserKeyTestContract__factory } from "./factories/contracts/mocks/utils/mpc/
|
|
51
|
-
export type { ShiftTestsContract } from "./contracts/mocks/utils/mpc/ShiftTestsContract";
|
|
52
|
-
export { ShiftTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory";
|
|
47
|
+
export type { MiscellaneousTestsContract } from "./contracts/mocks/utils/mpc/MiscellaneousTestsContract";
|
|
48
|
+
export { MiscellaneousTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory";
|
|
49
|
+
export type { OffboardToUserKeyTestContract } from "./contracts/mocks/utils/mpc/OffboardToUserKeyTestContract";
|
|
50
|
+
export { OffboardToUserKeyTestContract__factory } from "./factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory";
|
|
53
51
|
export type { StringTestsContract } from "./contracts/mocks/utils/mpc/StringTestsContract";
|
|
54
52
|
export { StringTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/StringTestsContract__factory";
|
|
55
53
|
export type { TransferScalarTestsContract } from "./contracts/mocks/utils/mpc/TransferScalarTestsContract";
|
|
56
54
|
export { TransferScalarTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory";
|
|
57
55
|
export type { TransferTestsContract } from "./contracts/mocks/utils/mpc/TransferTestsContract";
|
|
58
56
|
export { TransferTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferTestsContract__factory";
|
|
57
|
+
export type { TransferWithAllowance64_16TestsContract } from "./contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract";
|
|
58
|
+
export { TransferWithAllowance64_16TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract__factory";
|
|
59
|
+
export type { TransferWithAllowance64_32TestsContract } from "./contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract";
|
|
60
|
+
export { TransferWithAllowance64_32TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract__factory";
|
|
61
|
+
export type { TransferWithAllowance64_64TestsContract } from "./contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract";
|
|
62
|
+
export { TransferWithAllowance64_64TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract__factory";
|
|
63
|
+
export type { TransferWithAllowance64_8TestsContract } from "./contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract";
|
|
64
|
+
export { TransferWithAllowance64_8TestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract__factory";
|
|
65
|
+
export type { TransferWithAllowanceScalarTestsContract } from "./contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract";
|
|
66
|
+
export { TransferWithAllowanceScalarTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract__factory";
|
|
67
|
+
export type { TransferWithAllowanceTestsContract } from "./contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract";
|
|
68
|
+
export { TransferWithAllowanceTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract__factory";
|
|
59
69
|
export type { PrivateERC20WalletMock } from "./contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock";
|
|
60
70
|
export { PrivateERC20WalletMock__factory } from "./factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory";
|
|
61
71
|
export type { AccountOnboard } from "./contracts/onboard/AccountOnboard";
|
|
@@ -68,5 +78,7 @@ export type { PrivateERC721URIStorage } from "./contracts/token/PrivateERC721/ex
|
|
|
68
78
|
export { PrivateERC721URIStorage__factory } from "./factories/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage__factory";
|
|
69
79
|
export type { PrivateERC721 } from "./contracts/token/PrivateERC721/PrivateERC721";
|
|
70
80
|
export { PrivateERC721__factory } from "./factories/contracts/token/PrivateERC721/PrivateERC721__factory";
|
|
81
|
+
export type { MpcCore } from "./contracts/utils/mpc/MpcCore";
|
|
82
|
+
export { MpcCore__factory } from "./factories/contracts/utils/mpc/MpcCore__factory";
|
|
71
83
|
export type { ExtendedOperations } from "./contracts/utils/mpc/MpcInterface.sol/ExtendedOperations";
|
|
72
84
|
export { ExtendedOperations__factory } from "./factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory";
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# DataPrivacyFramework
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The `DataPrivacyFramework` is an abstract Solidity contract designed to manage conditions and operations related to data privacy. The contract handles operations such as user permissions, time-bound constraints, and condition validation based on various keys and parameters.
|
|
6
|
-
|
|
7
|
-
## Prerequisites
|
|
8
|
-
|
|
9
|
-
- **Solidity Version:** `^0.8.19`
|
|
10
|
-
- **License:** MIT
|
|
11
|
-
|
|
12
|
-
## Table of Contents
|
|
13
|
-
- [Data Structures](#data-structures)
|
|
14
|
-
- [InputData Struct](#inputdata-struct)
|
|
15
|
-
- [Condition Struct](#condition-struct)
|
|
16
|
-
- [Functions](#functions)
|
|
17
|
-
- [Abstract Functions](#abstract-functions)
|
|
18
|
-
|
|
19
|
-
## Data Structures
|
|
20
|
-
|
|
21
|
-
### InputData Struct
|
|
22
|
-
|
|
23
|
-
The `InputData` struct is a data holder that encapsulates the details of a particular operation or action requested by the caller. This struct helps in preventing the "stack too deep" error, which occurs when a function has too many local variables.
|
|
24
|
-
|
|
25
|
-
#### Fields:
|
|
26
|
-
- **`caller`**: (`address`) The address of the user or contract initiating the operation.
|
|
27
|
-
- **`operation`**: (`string`) The name or type of the operation being executed.
|
|
28
|
-
- **`active`**: (`bool`) A boolean flag indicating whether the operation is currently active.
|
|
29
|
-
- **`timestampBefore`**: (`uint256`) The operation must be executed before this timestamp.
|
|
30
|
-
- **`timestampAfter`**: (`uint256`) The operation must be executed after this timestamp.
|
|
31
|
-
- **`falseKey`**: (`bool`) A boolean flag that, if true, makes the condition unsatisfiable.
|
|
32
|
-
- **`trueKey`**: (`bool`) A boolean flag that, if true, makes the condition always satisfied (unless `falseKey` is true).
|
|
33
|
-
- **`uintParameter`**: (`uint256`) A numerical parameter relevant to the operation.
|
|
34
|
-
- **`addressParameter`**: (`address`) An address that may be used as a parameter for the operation.
|
|
35
|
-
- **`stringParameter`**: (`string`) A string-based parameter used for additional details in the operation.
|
|
36
|
-
|
|
37
|
-
### Condition Struct
|
|
38
|
-
|
|
39
|
-
The `Condition` struct represents a privacy-related condition that can either permit or deny an operation based on various factors, such as the caller, timing constraints, and control flags (`falseKey`, `trueKey`).
|
|
40
|
-
|
|
41
|
-
#### Fields:
|
|
42
|
-
- **`id`**: (`uint256`) A unique identifier for the condition.
|
|
43
|
-
- **`caller`**: (`address`) The address associated with the condition.
|
|
44
|
-
- **`operation`**: (`string`) The type of operation the condition governs.
|
|
45
|
-
- **`active`**: (`bool`) Indicates if the condition is currently valid or active.
|
|
46
|
-
- **`falseKey`**: (`bool`) If set to `true`, the condition will never be satisfied.
|
|
47
|
-
- **`trueKey`**: (`bool`) If set to `true`, the condition will always be satisfied (unless `falseKey` is also true).
|
|
48
|
-
- **`timestampBefore`**: (`uint256`) The condition is only valid before this timestamp.
|
|
49
|
-
- **`timestampAfter`**: (`uint256`) The condition is only valid after this timestamp.
|
|
50
|
-
|
|
51
|
-
## Functions
|
|
52
|
-
|
|
53
|
-
### Abstract Functions
|
|
54
|
-
|
|
55
|
-
The contract is abstract, so the following functions are likely declared but not implemented within this contract. They need to be implemented in derived contracts.
|
|
56
|
-
|
|
57
|
-
#### `checkCondition`
|
|
58
|
-
This function checks whether the conditions of a specific operation are met, based on the values in the `Condition` struct.
|
|
59
|
-
|
|
60
|
-
```solidity
|
|
61
|
-
function checkCondition(uint256 conditionId) public view virtual returns (bool);
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
- **Parameters**:
|
|
65
|
-
- `conditionId`: The unique ID of the condition to check.
|
|
66
|
-
|
|
67
|
-
- **Returns**:
|
|
68
|
-
- `bool`: `true` if the condition is satisfied, `false` otherwise.
|