@coti-io/coti-contracts 1.0.2 → 1.0.4

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 (48) hide show
  1. package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +112 -0
  2. package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +126 -0
  3. package/contracts/token/PrivateERC721/extensions/IPrivateERC721URIStorage.sol +15 -0
  4. package/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.sol +27 -1
  5. package/contracts/utils/mpc/MpcCore.sol +40 -0
  6. package/contracts/utils/mpc/MpcInterface.sol +2 -0
  7. package/package.json +1 -1
  8. package/test/onboard/AccountOnboard.test.ts +2 -2
  9. package/test/utils/accounts.ts +2 -2
  10. package/test/utils/mpc/Precompile.test.ts +8 -0
  11. package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +0 -2
  12. package/typechain-types/contracts/GasTest.ts +91 -0
  13. package/typechain-types/contracts/mocks/utils/mpc/index.ts +1 -0
  14. package/typechain-types/contracts/token/PrivateERC721/extensions/IPrivateERC721URIStorage.ts +100 -0
  15. package/typechain-types/contracts/token/PrivateERC721/extensions/index.ts +1 -0
  16. package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +38 -0
  17. package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +0 -1
  18. package/typechain-types/factories/contracts/GasTest__factory.ts +75 -0
  19. package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +1 -1
  20. package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +1 -1
  21. package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +1 -1
  22. package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +1 -1
  23. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1TestsContract__factory.ts +1 -1
  24. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +1 -1
  25. package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +1 -1
  26. package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +1 -1
  27. package/typechain-types/factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory.ts +1 -1
  28. package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory.ts +1 -1
  29. package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +1 -1
  30. package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +1 -1
  31. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +1 -1
  32. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +1 -1
  33. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_16TestsContract__factory.ts +1 -1
  34. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_32TestsContract__factory.ts +1 -1
  35. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_64TestsContract__factory.ts +1 -1
  36. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowance64_8TestsContract__factory.ts +1 -1
  37. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceScalarTestsContract__factory.ts +1 -1
  38. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferWithAllowanceTestsContract__factory.ts +1 -1
  39. package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +1 -0
  40. package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +1 -1
  41. package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +1 -1
  42. package/typechain-types/factories/contracts/token/PrivateERC721/extensions/IPrivateERC721URIStorage__factory.ts +55 -0
  43. package/typechain-types/factories/contracts/token/PrivateERC721/extensions/index.ts +1 -0
  44. package/typechain-types/factories/contracts/utils/mpc/MpcCore__factory.ts +1 -1
  45. package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +58 -0
  46. package/typechain-types/hardhat.d.ts +36 -54
  47. package/typechain-types/index.ts +6 -6
  48. package/contracts/onboard/README.md +0 -65
@@ -61,7 +61,7 @@ const _abi = [
61
61
  ] as const;
62
62
 
63
63
  const _bytecode =
64
- "0x608060405234801561001057600080fd5b50610771806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063afaea1bd14610030575b600080fd5b61004361003e366004610470565b610045565b005b600080610054868686866100b0565b915091503373ffffffffffffffffffffffffffffffffffffffff167ffc83efa19b7c2bc399a672494bb0af52f9bbd678357edf30e55b5ac4e65878ba83836040516100a092919061054a565b60405180910390a2505050505050565b60608060006100bf86856105a7565b67ffffffffffffffff8111156100d7576100d76105c0565b6040519080825280601f01601f191660200182016040528015610101576020820181803683370190505b50905060005b8481101561017e57858582818110610121576101216105ef565b9050013560f81c60f81b82828151811061013d5761013d6105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806101768161061e565b915050610107565b5060005b868110156102205787878281811061019c5761019c6105ef565b909101357fff00000000000000000000000000000000000000000000000000000000000000169050826101cf83886105a7565b815181106101df576101df6105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806102188161061e565b915050610182565b506040517fa85f0ca200000000000000000000000000000000000000000000000000000000815260009060649063a85f0ca290610261908590600401610656565b6000604051808303816000875af1158015610280573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526102c69190810190610670565b604080516101008082526101208201909252919250600091906020820181803683375050604080516101008082526101208201909252929350600092915060208201818036833701905050905060005b825181101561038f57838181518110610331576103316105ef565b602001015160f81c60f81b83828151811061034e5761034e6105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806103878161061e565b915050610316565b5060005b815181101561041757836103a9610100836105a7565b815181106103b9576103b96105ef565b602001015160f81c60f81b8282815181106103d6576103d66105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061040f8161061e565b915050610393565b5090999098509650505050505050565b60008083601f84011261043957600080fd5b50813567ffffffffffffffff81111561045157600080fd5b60208301915083602082850101111561046957600080fd5b9250929050565b6000806000806040858703121561048657600080fd5b843567ffffffffffffffff8082111561049e57600080fd5b6104aa88838901610427565b909650945060208701359150808211156104c357600080fd5b506104d087828801610427565b95989497509550505050565b60005b838110156104f75781810151838201526020016104df565b50506000910152565b600081518084526105188160208601602086016104dc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60408152600061055d6040830185610500565b828103602084015261056f8185610500565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105ba576105ba610578565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361064f5761064f610578565b5060010190565b6020815260006106696020830184610500565b9392505050565b60006020828403121561068257600080fd5b815167ffffffffffffffff8082111561069a57600080fd5b818401915084601f8301126106ae57600080fd5b8151818111156106c0576106c06105c0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610706576107066105c0565b8160405282815287602084870101111561071f57600080fd5b6107308360208301602088016104dc565b97965050505050505056fea2646970667358221220f8025941570d10e94a7fb76e7a3c5c6f85322f12979faa47e59b2affb5944d9a64736f6c63430008130033";
64
+ "0x608060405234801561001057600080fd5b50610771806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063afaea1bd14610030575b600080fd5b61004361003e366004610470565b610045565b005b600080610054868686866100b0565b915091503373ffffffffffffffffffffffffffffffffffffffff167ffc83efa19b7c2bc399a672494bb0af52f9bbd678357edf30e55b5ac4e65878ba83836040516100a092919061054a565b60405180910390a2505050505050565b60608060006100bf86856105a7565b67ffffffffffffffff8111156100d7576100d76105c0565b6040519080825280601f01601f191660200182016040528015610101576020820181803683370190505b50905060005b8481101561017e57858582818110610121576101216105ef565b9050013560f81c60f81b82828151811061013d5761013d6105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806101768161061e565b915050610107565b5060005b868110156102205787878281811061019c5761019c6105ef565b909101357fff00000000000000000000000000000000000000000000000000000000000000169050826101cf83886105a7565b815181106101df576101df6105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806102188161061e565b915050610182565b506040517fa85f0ca200000000000000000000000000000000000000000000000000000000815260009060649063a85f0ca290610261908590600401610656565b6000604051808303816000875af1158015610280573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526102c69190810190610670565b604080516101008082526101208201909252919250600091906020820181803683375050604080516101008082526101208201909252929350600092915060208201818036833701905050905060005b825181101561038f57838181518110610331576103316105ef565b602001015160f81c60f81b83828151811061034e5761034e6105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806103878161061e565b915050610316565b5060005b815181101561041757836103a9610100836105a7565b815181106103b9576103b96105ef565b602001015160f81c60f81b8282815181106103d6576103d66105ef565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061040f8161061e565b915050610393565b5090999098509650505050505050565b60008083601f84011261043957600080fd5b50813567ffffffffffffffff81111561045157600080fd5b60208301915083602082850101111561046957600080fd5b9250929050565b6000806000806040858703121561048657600080fd5b843567ffffffffffffffff8082111561049e57600080fd5b6104aa88838901610427565b909650945060208701359150808211156104c357600080fd5b506104d087828801610427565b95989497509550505050565b60005b838110156104f75781810151838201526020016104df565b50506000910152565b600081518084526105188160208601602086016104dc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60408152600061055d6040830185610500565b828103602084015261056f8185610500565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105ba576105ba610578565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361064f5761064f610578565b5060010190565b6020815260006106696020830184610500565b9392505050565b60006020828403121561068257600080fd5b815167ffffffffffffffff8082111561069a57600080fd5b818401915084601f8301126106ae57600080fd5b8151818111156106c0576106c06105c0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610706576107066105c0565b8160405282815287602084870101111561071f57600080fd5b6107308360208301602088016104dc565b97965050505050505056fea2646970667358221220123514bb215718c2077f5f9efca341ca8fa8a4f043992d372e612602716a314064736f6c63430008130033";
65
65
 
66
66
  type AccountOnboardConstructorParams =
67
67
  | [signer?: Signer]
@@ -0,0 +1,55 @@
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
+ IPrivateERC721URIStorage,
8
+ IPrivateERC721URIStorageInterface,
9
+ } from "../../../../../contracts/token/PrivateERC721/extensions/IPrivateERC721URIStorage";
10
+
11
+ const _abi = [
12
+ {
13
+ inputs: [
14
+ {
15
+ internalType: "uint256",
16
+ name: "tokenId",
17
+ type: "uint256",
18
+ },
19
+ ],
20
+ name: "tokenURI",
21
+ outputs: [
22
+ {
23
+ components: [
24
+ {
25
+ internalType: "ctUint64[]",
26
+ name: "value",
27
+ type: "uint256[]",
28
+ },
29
+ ],
30
+ internalType: "struct ctString",
31
+ name: "",
32
+ type: "tuple",
33
+ },
34
+ ],
35
+ stateMutability: "view",
36
+ type: "function",
37
+ },
38
+ ] as const;
39
+
40
+ export class IPrivateERC721URIStorage__factory {
41
+ static readonly abi = _abi;
42
+ static createInterface(): IPrivateERC721URIStorageInterface {
43
+ return new Interface(_abi) as IPrivateERC721URIStorageInterface;
44
+ }
45
+ static connect(
46
+ address: string,
47
+ runner?: ContractRunner | null
48
+ ): IPrivateERC721URIStorage {
49
+ return new Contract(
50
+ address,
51
+ _abi,
52
+ runner
53
+ ) as unknown as IPrivateERC721URIStorage;
54
+ }
55
+ }
@@ -1,4 +1,5 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ export { IPrivateERC721URIStorage__factory } from "./IPrivateERC721URIStorage__factory";
4
5
  export { PrivateERC721URIStorage__factory } from "./PrivateERC721URIStorage__factory";
@@ -31,7 +31,7 @@ const _abi = [
31
31
  ] as const;
32
32
 
33
33
  const _bytecode =
34
- "0x6088610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c806331b943d5146038575b600080fd5b604061010081565b60405190815260200160405180910390f3fea26469706673582212206dadde1d79710197e10197637f9b02aadeabab1cb2acdebea5688b628b867a0464736f6c63430008130033";
34
+ "0x6088610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c806331b943d5146038575b600080fd5b604061010081565b60405190815260200160405180910390f3fea264697066735822122040c65ea5afa96eff66cf350fb22ea880d56d7562c3beff5ff995e04971be8f4664736f6c63430008130033";
35
35
 
36
36
  type MpcCoreConstructorParams =
37
37
  | [signer?: Signer]
@@ -781,6 +781,64 @@ const _abi = [
781
781
  stateMutability: "nonpayable",
782
782
  type: "function",
783
783
  },
784
+ {
785
+ inputs: [
786
+ {
787
+ internalType: "bytes3",
788
+ name: "metaData",
789
+ type: "bytes3",
790
+ },
791
+ {
792
+ internalType: "uint256",
793
+ name: "lhs",
794
+ type: "uint256",
795
+ },
796
+ {
797
+ internalType: "uint256",
798
+ name: "rhs",
799
+ type: "uint256",
800
+ },
801
+ ],
802
+ name: "Shl",
803
+ outputs: [
804
+ {
805
+ internalType: "uint256",
806
+ name: "result",
807
+ type: "uint256",
808
+ },
809
+ ],
810
+ stateMutability: "nonpayable",
811
+ type: "function",
812
+ },
813
+ {
814
+ inputs: [
815
+ {
816
+ internalType: "bytes3",
817
+ name: "metaData",
818
+ type: "bytes3",
819
+ },
820
+ {
821
+ internalType: "uint256",
822
+ name: "lhs",
823
+ type: "uint256",
824
+ },
825
+ {
826
+ internalType: "uint256",
827
+ name: "rhs",
828
+ type: "uint256",
829
+ },
830
+ ],
831
+ name: "Shr",
832
+ outputs: [
833
+ {
834
+ internalType: "uint256",
835
+ name: "result",
836
+ type: "uint256",
837
+ },
838
+ ],
839
+ stateMutability: "nonpayable",
840
+ type: "function",
841
+ },
784
842
  {
785
843
  inputs: [
786
844
  {
@@ -13,18 +13,6 @@ import * as Contracts from ".";
13
13
 
14
14
  declare module "hardhat/types/runtime" {
15
15
  interface HardhatEthersHelpers extends HardhatEthersHelpersBase {
16
- getContractFactory(
17
- name: "IERC1155Errors",
18
- signerOrOptions?: ethers.Signer | FactoryOptions
19
- ): Promise<Contracts.IERC1155Errors__factory>;
20
- getContractFactory(
21
- name: "IERC20Errors",
22
- signerOrOptions?: ethers.Signer | FactoryOptions
23
- ): Promise<Contracts.IERC20Errors__factory>;
24
- getContractFactory(
25
- name: "IERC721Errors",
26
- signerOrOptions?: ethers.Signer | FactoryOptions
27
- ): Promise<Contracts.IERC721Errors__factory>;
28
16
  getContractFactory(
29
17
  name: "IERC4906",
30
18
  signerOrOptions?: ethers.Signer | FactoryOptions
@@ -97,6 +85,10 @@ declare module "hardhat/types/runtime" {
97
85
  name: "OffboardToUserKeyTestContract",
98
86
  signerOrOptions?: ethers.Signer | FactoryOptions
99
87
  ): Promise<Contracts.OffboardToUserKeyTestContract__factory>;
88
+ getContractFactory(
89
+ name: "ShiftTestsContract",
90
+ signerOrOptions?: ethers.Signer | FactoryOptions
91
+ ): Promise<Contracts.ShiftTestsContract__factory>;
100
92
  getContractFactory(
101
93
  name: "StringTestsContract",
102
94
  signerOrOptions?: ethers.Signer | FactoryOptions
@@ -149,6 +141,10 @@ declare module "hardhat/types/runtime" {
149
141
  name: "PrivateERC20",
150
142
  signerOrOptions?: ethers.Signer | FactoryOptions
151
143
  ): Promise<Contracts.PrivateERC20__factory>;
144
+ getContractFactory(
145
+ name: "IPrivateERC721URIStorage",
146
+ signerOrOptions?: ethers.Signer | FactoryOptions
147
+ ): Promise<Contracts.IPrivateERC721URIStorage__factory>;
152
148
  getContractFactory(
153
149
  name: "PrivateERC721URIStorage",
154
150
  signerOrOptions?: ethers.Signer | FactoryOptions
@@ -170,21 +166,6 @@ declare module "hardhat/types/runtime" {
170
166
  signerOrOptions?: ethers.Signer | FactoryOptions
171
167
  ): Promise<Contracts.ExtendedOperations__factory>;
172
168
 
173
- getContractAt(
174
- name: "IERC1155Errors",
175
- address: string | ethers.Addressable,
176
- signer?: ethers.Signer
177
- ): Promise<Contracts.IERC1155Errors>;
178
- getContractAt(
179
- name: "IERC20Errors",
180
- address: string | ethers.Addressable,
181
- signer?: ethers.Signer
182
- ): Promise<Contracts.IERC20Errors>;
183
- getContractAt(
184
- name: "IERC721Errors",
185
- address: string | ethers.Addressable,
186
- signer?: ethers.Signer
187
- ): Promise<Contracts.IERC721Errors>;
188
169
  getContractAt(
189
170
  name: "IERC4906",
190
171
  address: string | ethers.Addressable,
@@ -275,6 +256,11 @@ declare module "hardhat/types/runtime" {
275
256
  address: string | ethers.Addressable,
276
257
  signer?: ethers.Signer
277
258
  ): Promise<Contracts.OffboardToUserKeyTestContract>;
259
+ getContractAt(
260
+ name: "ShiftTestsContract",
261
+ address: string | ethers.Addressable,
262
+ signer?: ethers.Signer
263
+ ): Promise<Contracts.ShiftTestsContract>;
278
264
  getContractAt(
279
265
  name: "StringTestsContract",
280
266
  address: string | ethers.Addressable,
@@ -340,6 +326,11 @@ declare module "hardhat/types/runtime" {
340
326
  address: string | ethers.Addressable,
341
327
  signer?: ethers.Signer
342
328
  ): Promise<Contracts.PrivateERC20>;
329
+ getContractAt(
330
+ name: "IPrivateERC721URIStorage",
331
+ address: string | ethers.Addressable,
332
+ signer?: ethers.Signer
333
+ ): Promise<Contracts.IPrivateERC721URIStorage>;
343
334
  getContractAt(
344
335
  name: "PrivateERC721URIStorage",
345
336
  address: string | ethers.Addressable,
@@ -366,18 +357,6 @@ declare module "hardhat/types/runtime" {
366
357
  signer?: ethers.Signer
367
358
  ): Promise<Contracts.ExtendedOperations>;
368
359
 
369
- deployContract(
370
- name: "IERC1155Errors",
371
- signerOrOptions?: ethers.Signer | DeployContractOptions
372
- ): Promise<Contracts.IERC1155Errors>;
373
- deployContract(
374
- name: "IERC20Errors",
375
- signerOrOptions?: ethers.Signer | DeployContractOptions
376
- ): Promise<Contracts.IERC20Errors>;
377
- deployContract(
378
- name: "IERC721Errors",
379
- signerOrOptions?: ethers.Signer | DeployContractOptions
380
- ): Promise<Contracts.IERC721Errors>;
381
360
  deployContract(
382
361
  name: "IERC4906",
383
362
  signerOrOptions?: ethers.Signer | DeployContractOptions
@@ -450,6 +429,10 @@ declare module "hardhat/types/runtime" {
450
429
  name: "OffboardToUserKeyTestContract",
451
430
  signerOrOptions?: ethers.Signer | DeployContractOptions
452
431
  ): Promise<Contracts.OffboardToUserKeyTestContract>;
432
+ deployContract(
433
+ name: "ShiftTestsContract",
434
+ signerOrOptions?: ethers.Signer | DeployContractOptions
435
+ ): Promise<Contracts.ShiftTestsContract>;
453
436
  deployContract(
454
437
  name: "StringTestsContract",
455
438
  signerOrOptions?: ethers.Signer | DeployContractOptions
@@ -502,6 +485,10 @@ declare module "hardhat/types/runtime" {
502
485
  name: "PrivateERC20",
503
486
  signerOrOptions?: ethers.Signer | DeployContractOptions
504
487
  ): Promise<Contracts.PrivateERC20>;
488
+ deployContract(
489
+ name: "IPrivateERC721URIStorage",
490
+ signerOrOptions?: ethers.Signer | DeployContractOptions
491
+ ): Promise<Contracts.IPrivateERC721URIStorage>;
505
492
  deployContract(
506
493
  name: "PrivateERC721URIStorage",
507
494
  signerOrOptions?: ethers.Signer | DeployContractOptions
@@ -523,21 +510,6 @@ declare module "hardhat/types/runtime" {
523
510
  signerOrOptions?: ethers.Signer | DeployContractOptions
524
511
  ): Promise<Contracts.ExtendedOperations>;
525
512
 
526
- deployContract(
527
- name: "IERC1155Errors",
528
- args: any[],
529
- signerOrOptions?: ethers.Signer | DeployContractOptions
530
- ): Promise<Contracts.IERC1155Errors>;
531
- deployContract(
532
- name: "IERC20Errors",
533
- args: any[],
534
- signerOrOptions?: ethers.Signer | DeployContractOptions
535
- ): Promise<Contracts.IERC20Errors>;
536
- deployContract(
537
- name: "IERC721Errors",
538
- args: any[],
539
- signerOrOptions?: ethers.Signer | DeployContractOptions
540
- ): Promise<Contracts.IERC721Errors>;
541
513
  deployContract(
542
514
  name: "IERC4906",
543
515
  args: any[],
@@ -628,6 +600,11 @@ declare module "hardhat/types/runtime" {
628
600
  args: any[],
629
601
  signerOrOptions?: ethers.Signer | DeployContractOptions
630
602
  ): Promise<Contracts.OffboardToUserKeyTestContract>;
603
+ deployContract(
604
+ name: "ShiftTestsContract",
605
+ args: any[],
606
+ signerOrOptions?: ethers.Signer | DeployContractOptions
607
+ ): Promise<Contracts.ShiftTestsContract>;
631
608
  deployContract(
632
609
  name: "StringTestsContract",
633
610
  args: any[],
@@ -693,6 +670,11 @@ declare module "hardhat/types/runtime" {
693
670
  args: any[],
694
671
  signerOrOptions?: ethers.Signer | DeployContractOptions
695
672
  ): Promise<Contracts.PrivateERC20>;
673
+ deployContract(
674
+ name: "IPrivateERC721URIStorage",
675
+ args: any[],
676
+ signerOrOptions?: ethers.Signer | DeployContractOptions
677
+ ): Promise<Contracts.IPrivateERC721URIStorage>;
696
678
  deployContract(
697
679
  name: "PrivateERC721URIStorage",
698
680
  args: any[],
@@ -6,12 +6,6 @@ export type { openzeppelin };
6
6
  import type * as contracts from "./contracts";
7
7
  export type { contracts };
8
8
  export * as factories from "./factories";
9
- export type { IERC1155Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors";
10
- export { IERC1155Errors__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory";
11
- export type { IERC20Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors";
12
- export { IERC20Errors__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory";
13
- export type { IERC721Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors";
14
- export { IERC721Errors__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory";
15
9
  export type { IERC4906 } from "./@openzeppelin/contracts/interfaces/IERC4906";
16
10
  export { IERC4906__factory } from "./factories/@openzeppelin/contracts/interfaces/IERC4906__factory";
17
11
  export type { IERC721 } from "./@openzeppelin/contracts/token/ERC721/IERC721";
@@ -48,6 +42,8 @@ export type { MiscellaneousTestsContract } from "./contracts/mocks/utils/mpc/Mis
48
42
  export { MiscellaneousTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/MiscellaneousTestsContract__factory";
49
43
  export type { OffboardToUserKeyTestContract } from "./contracts/mocks/utils/mpc/OffboardToUserKeyTestContract";
50
44
  export { OffboardToUserKeyTestContract__factory } from "./factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestContract__factory";
45
+ export type { ShiftTestsContract } from "./contracts/mocks/utils/mpc/ShiftTestsContract";
46
+ export { ShiftTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory";
51
47
  export type { StringTestsContract } from "./contracts/mocks/utils/mpc/StringTestsContract";
52
48
  export { StringTestsContract__factory } from "./factories/contracts/mocks/utils/mpc/StringTestsContract__factory";
53
49
  export type { TransferScalarTestsContract } from "./contracts/mocks/utils/mpc/TransferScalarTestsContract";
@@ -74,8 +70,12 @@ export type { IPrivateERC20 } from "./contracts/token/PrivateERC20/IPrivateERC20
74
70
  export { IPrivateERC20__factory } from "./factories/contracts/token/PrivateERC20/IPrivateERC20__factory";
75
71
  export type { PrivateERC20 } from "./contracts/token/PrivateERC20/PrivateERC20";
76
72
  export { PrivateERC20__factory } from "./factories/contracts/token/PrivateERC20/PrivateERC20__factory";
73
+ export type { IPrivateERC721URIStorage } from "./contracts/token/PrivateERC721/extensions/IPrivateERC721URIStorage";
74
+ export { IPrivateERC721URIStorage__factory } from "./factories/contracts/token/PrivateERC721/extensions/IPrivateERC721URIStorage__factory";
77
75
  export type { PrivateERC721URIStorage } from "./contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage";
78
76
  export { PrivateERC721URIStorage__factory } from "./factories/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage__factory";
77
+ export type { IERC721Errors } from "./contracts/token/PrivateERC721/IERC721Errors";
78
+ export { IERC721Errors__factory } from "./factories/contracts/token/PrivateERC721/IERC721Errors__factory";
79
79
  export type { PrivateERC721 } from "./contracts/token/PrivateERC721/PrivateERC721";
80
80
  export { PrivateERC721__factory } from "./factories/contracts/token/PrivateERC721/PrivateERC721__factory";
81
81
  export type { MpcCore } from "./contracts/utils/mpc/MpcCore";
@@ -1,65 +0,0 @@
1
- # AccountOnboard
2
-
3
- ## Overview
4
-
5
- The `AccountOnboard` contract is responsible for onboarding user accounts to the system, leveraging RSA public keys and AES encryption. During onboarding, the user's AES encryption key is emitted in an encrypted form. This contract interacts with a utility contract `MpcCore` to retrieve the user key.
6
-
7
- ## Prerequisites
8
-
9
- - **Solidity Version**: `^0.8.19`
10
- - **License**: MIT
11
- - **Dependencies**:
12
- - Imports from `../utils/mpc/MpcCore.sol`.
13
-
14
- ## Table of Contents
15
- - [Events](#events)
16
- - [AccountOnboarded](#accountonboarded)
17
- - [Functions](#functions)
18
- - [onboardAccount](#onboardaccount)
19
-
20
- ## Events
21
-
22
- ### AccountOnboarded
23
-
24
- This event is triggered when a new account is successfully onboarded. It logs the user's account information, including the sender's address and the AES encryption key in its encrypted form.
25
-
26
- #### Parameters:
27
- - **`_from`**: (`address`) The address of the account that initiated the onboarding process.
28
- - **`userKey`**: (`bytes`) The user's AES encryption key, encrypted using RSA. This key must be decrypted before use.
29
-
30
- ```solidity
31
- event AccountOnboarded(address indexed _from, bytes userKey);
32
- ```
33
-
34
- ## Functions
35
-
36
- ### onboardAccount
37
-
38
- The `onboardAccount` function is responsible for onboarding a new user account. It takes an RSA public key and a signed hash of the key, verifies the credentials, and emits the encrypted AES key.
39
-
40
- #### Function Definition:
41
-
42
- ```solidity
43
- function onboardAccount(bytes calldata publicKey, bytes calldata signedEK) public;
44
- ```
45
-
46
- #### Parameters:
47
- - **`publicKey`**: (`bytes`) The RSA public key of the user. This is used to verify and generate the AES encryption key.
48
- - **`signedEK`**: (`bytes`) A signed hash of the RSA public key, used to ensure the authenticity of the public key.
49
-
50
- #### Logic:
51
- 1. Calls the external `MpcCore.getUserKey()` function to retrieve the user's AES encryption key using the provided RSA public key and its signed hash.
52
- 2. Emits the `AccountOnboarded` event, logging the caller's address and the encrypted AES key.
53
-
54
- #### Example Usage:
55
-
56
- ```solidity
57
- function onboardAccount(bytes calldata publicKey, bytes calldata signedEK) public {
58
- bytes memory accountKey = MpcCore.getUserKey(publicKey, signedEK);
59
- emit AccountOnboarded(msg.sender, accountKey);
60
- }
61
- ```
62
-
63
- ### External Function Calls:
64
- - **`MpcCore.getUserKey(publicKey, signedEK)`**:
65
- - Retrieves the user's AES encryption key, based on the RSA public key and signed hash.