@cofhe/mock-contracts 0.7.1 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/MockACL.ts CHANGED
@@ -10,19 +10,6 @@ export const MockACLArtifact = {
10
10
  inputs: [],
11
11
  stateMutability: 'nonpayable',
12
12
  },
13
- {
14
- type: 'function',
15
- name: 'TASK_MANAGER_ADDRESS_',
16
- inputs: [],
17
- outputs: [
18
- {
19
- name: '',
20
- type: 'address',
21
- internalType: 'address',
22
- },
23
- ],
24
- stateMutability: 'view',
25
- },
26
13
  {
27
14
  type: 'function',
28
15
  name: 'allow',
@@ -594,6 +581,19 @@ export const MockACLArtifact = {
594
581
  outputs: [],
595
582
  stateMutability: 'nonpayable',
596
583
  },
584
+ {
585
+ type: 'function',
586
+ name: 'setTaskManager',
587
+ inputs: [
588
+ {
589
+ name: 'newAddress',
590
+ type: 'address',
591
+ internalType: 'address',
592
+ },
593
+ ],
594
+ outputs: [],
595
+ stateMutability: 'nonpayable',
596
+ },
597
597
  {
598
598
  type: 'function',
599
599
  name: 'shareCtHash',
@@ -668,6 +668,19 @@ export const MockACLArtifact = {
668
668
  inputs: [],
669
669
  anonymous: false,
670
670
  },
671
+ {
672
+ type: 'event',
673
+ name: 'Initialized',
674
+ inputs: [
675
+ {
676
+ name: 'version',
677
+ type: 'uint64',
678
+ indexed: false,
679
+ internalType: 'uint64',
680
+ },
681
+ ],
682
+ anonymous: false,
683
+ },
671
684
  {
672
685
  type: 'event',
673
686
  name: 'NewDelegation',
@@ -712,6 +725,25 @@ export const MockACLArtifact = {
712
725
  ],
713
726
  anonymous: false,
714
727
  },
728
+ {
729
+ type: 'event',
730
+ name: 'TaskManagerUpdated',
731
+ inputs: [
732
+ {
733
+ name: 'oldAddress',
734
+ type: 'address',
735
+ indexed: false,
736
+ internalType: 'address',
737
+ },
738
+ {
739
+ name: 'newAddress',
740
+ type: 'address',
741
+ indexed: false,
742
+ internalType: 'address',
743
+ },
744
+ ],
745
+ anonymous: false,
746
+ },
715
747
  {
716
748
  type: 'error',
717
749
  name: 'AlreadyDelegated',
@@ -730,7 +762,17 @@ export const MockACLArtifact = {
730
762
  },
731
763
  {
732
764
  type: 'error',
733
- name: 'InvalidShortString',
765
+ name: 'InvalidInitialization',
766
+ inputs: [],
767
+ },
768
+ {
769
+ type: 'error',
770
+ name: 'InvalidTaskManagerAddress',
771
+ inputs: [],
772
+ },
773
+ {
774
+ type: 'error',
775
+ name: 'NotInitializing',
734
776
  inputs: [],
735
777
  },
736
778
  {
@@ -785,17 +827,6 @@ export const MockACLArtifact = {
785
827
  },
786
828
  ],
787
829
  },
788
- {
789
- type: 'error',
790
- name: 'StringTooLong',
791
- inputs: [
792
- {
793
- name: 'str',
794
- type: 'string',
795
- internalType: 'string',
796
- },
797
- ],
798
- },
799
830
  {
800
831
  type: 'error',
801
832
  name: 'UnexpectedSharer',
@@ -0,0 +1,114 @@
1
+ // This file is auto-generated by build-artifacts.ts
2
+ import { type MockArtifact } from './types';
3
+
4
+ export const MockCoFHEAddressBookArtifact = {
5
+ contractName: 'MockCoFHEAddressBook',
6
+ isFixed: true,
7
+ fixedAddress: '0xC0F4e00E531a2B086492Ae3DCC1515038307196b',
8
+ abi: [
9
+ {
10
+ type: 'function',
11
+ name: 'exists',
12
+ inputs: [],
13
+ outputs: [
14
+ {
15
+ name: '',
16
+ type: 'bool',
17
+ internalType: 'bool',
18
+ },
19
+ ],
20
+ stateMutability: 'pure',
21
+ },
22
+ {
23
+ type: 'function',
24
+ name: 'getTm',
25
+ inputs: [
26
+ {
27
+ name: 'id',
28
+ type: 'uint256',
29
+ internalType: 'uint256',
30
+ },
31
+ ],
32
+ outputs: [
33
+ {
34
+ name: 'tm',
35
+ type: 'address',
36
+ internalType: 'address',
37
+ },
38
+ ],
39
+ stateMutability: 'view',
40
+ },
41
+ {
42
+ type: 'function',
43
+ name: 'setTm',
44
+ inputs: [
45
+ {
46
+ name: 'id',
47
+ type: 'uint256',
48
+ internalType: 'uint256',
49
+ },
50
+ {
51
+ name: 'tm',
52
+ type: 'address',
53
+ internalType: 'address',
54
+ },
55
+ ],
56
+ outputs: [],
57
+ stateMutability: 'nonpayable',
58
+ },
59
+ {
60
+ type: 'function',
61
+ name: 'unsetTm',
62
+ inputs: [
63
+ {
64
+ name: 'id',
65
+ type: 'uint256',
66
+ internalType: 'uint256',
67
+ },
68
+ ],
69
+ outputs: [],
70
+ stateMutability: 'nonpayable',
71
+ },
72
+ {
73
+ type: 'event',
74
+ name: 'TaskManagerSet',
75
+ inputs: [
76
+ {
77
+ name: 'id',
78
+ type: 'uint256',
79
+ indexed: true,
80
+ internalType: 'uint256',
81
+ },
82
+ {
83
+ name: 'previous',
84
+ type: 'address',
85
+ indexed: true,
86
+ internalType: 'address',
87
+ },
88
+ {
89
+ name: 'current',
90
+ type: 'address',
91
+ indexed: true,
92
+ internalType: 'address',
93
+ },
94
+ ],
95
+ anonymous: false,
96
+ },
97
+ {
98
+ type: 'error',
99
+ name: 'InvalidAddress',
100
+ inputs: [],
101
+ },
102
+ {
103
+ type: 'error',
104
+ name: 'TaskManagerNotSet',
105
+ inputs: [
106
+ {
107
+ name: 'id',
108
+ type: 'uint256',
109
+ internalType: 'uint256',
110
+ },
111
+ ],
112
+ },
113
+ ],
114
+ } as const satisfies MockArtifact;
@@ -0,0 +1,74 @@
1
+ // This file is auto-generated by build-artifacts.ts
2
+ import { type MockArtifact } from './types';
3
+
4
+ export const MockERC1967ProxyArtifact = {
5
+ contractName: 'MockERC1967Proxy',
6
+ isFixed: false,
7
+ abi: [
8
+ {
9
+ type: 'constructor',
10
+ inputs: [
11
+ {
12
+ name: 'implementation',
13
+ type: 'address',
14
+ internalType: 'address',
15
+ },
16
+ {
17
+ name: 'data',
18
+ type: 'bytes',
19
+ internalType: 'bytes',
20
+ },
21
+ ],
22
+ stateMutability: 'payable',
23
+ },
24
+ {
25
+ type: 'fallback',
26
+ stateMutability: 'payable',
27
+ },
28
+ {
29
+ type: 'event',
30
+ name: 'Upgraded',
31
+ inputs: [
32
+ {
33
+ name: 'implementation',
34
+ type: 'address',
35
+ indexed: true,
36
+ internalType: 'address',
37
+ },
38
+ ],
39
+ anonymous: false,
40
+ },
41
+ {
42
+ type: 'error',
43
+ name: 'AddressEmptyCode',
44
+ inputs: [
45
+ {
46
+ name: 'target',
47
+ type: 'address',
48
+ internalType: 'address',
49
+ },
50
+ ],
51
+ },
52
+ {
53
+ type: 'error',
54
+ name: 'ERC1967InvalidImplementation',
55
+ inputs: [
56
+ {
57
+ name: 'implementation',
58
+ type: 'address',
59
+ internalType: 'address',
60
+ },
61
+ ],
62
+ },
63
+ {
64
+ type: 'error',
65
+ name: 'ERC1967NonPayable',
66
+ inputs: [],
67
+ },
68
+ {
69
+ type: 'error',
70
+ name: 'FailedCall',
71
+ inputs: [],
72
+ },
73
+ ],
74
+ } as const satisfies MockArtifact;
@@ -4,13 +4,41 @@ import { type MockArtifact } from './types';
4
4
  export const MockTaskManagerArtifact = {
5
5
  contractName: 'MockTaskManager',
6
6
  isFixed: true,
7
- fixedAddress: '0xeA30c4B8b44078Bbf8a6ef5b9f1eC1626C7848D9',
7
+ fixedAddress: '0x0000000000000000000000000000000000005000',
8
8
  abi: [
9
9
  {
10
10
  type: 'constructor',
11
11
  inputs: [],
12
12
  stateMutability: 'nonpayable',
13
13
  },
14
+ {
15
+ type: 'function',
16
+ name: 'MOCK_dispatchOperation',
17
+ inputs: [
18
+ {
19
+ name: 'ctHash',
20
+ type: 'uint256',
21
+ internalType: 'uint256',
22
+ },
23
+ {
24
+ name: 'funcId',
25
+ type: 'uint8',
26
+ internalType: 'enum FunctionId',
27
+ },
28
+ {
29
+ name: 'inputs',
30
+ type: 'uint256[]',
31
+ internalType: 'uint256[]',
32
+ },
33
+ {
34
+ name: 'arity',
35
+ type: 'uint8',
36
+ internalType: 'uint8',
37
+ },
38
+ ],
39
+ outputs: [],
40
+ stateMutability: 'nonpayable',
41
+ },
14
42
  {
15
43
  type: 'function',
16
44
  name: 'MOCK_logAllow',
@@ -564,6 +592,19 @@ export const MockTaskManagerArtifact = {
564
592
  ],
565
593
  stateMutability: 'view',
566
594
  },
595
+ {
596
+ type: 'function',
597
+ name: 'mockGasExcluded',
598
+ inputs: [],
599
+ outputs: [
600
+ {
601
+ name: '',
602
+ type: 'bool',
603
+ internalType: 'bool',
604
+ },
605
+ ],
606
+ stateMutability: 'view',
607
+ },
567
608
  {
568
609
  type: 'function',
569
610
  name: 'mockStorage',
@@ -718,6 +759,19 @@ export const MockTaskManagerArtifact = {
718
759
  outputs: [],
719
760
  stateMutability: 'nonpayable',
720
761
  },
762
+ {
763
+ type: 'function',
764
+ name: 'setMockGasExcluded',
765
+ inputs: [
766
+ {
767
+ name: '_mockGasExcluded',
768
+ type: 'bool',
769
+ internalType: 'bool',
770
+ },
771
+ ],
772
+ outputs: [],
773
+ stateMutability: 'nonpayable',
774
+ },
721
775
  {
722
776
  type: 'function',
723
777
  name: 'setSecurityZoneMax',
@@ -963,6 +1017,19 @@ export const MockTaskManagerArtifact = {
963
1017
  ],
964
1018
  anonymous: false,
965
1019
  },
1020
+ {
1021
+ type: 'event',
1022
+ name: 'MockGasConsumed',
1023
+ inputs: [
1024
+ {
1025
+ name: 'gas',
1026
+ type: 'uint256',
1027
+ indexed: false,
1028
+ internalType: 'uint256',
1029
+ },
1030
+ ],
1031
+ anonymous: false,
1032
+ },
966
1033
  {
967
1034
  type: 'event',
968
1035
  name: 'ProtocolNotification',
@@ -1245,11 +1312,6 @@ export const MockTaskManagerArtifact = {
1245
1312
  },
1246
1313
  ],
1247
1314
  },
1248
- {
1249
- type: 'error',
1250
- name: 'NotImplemented',
1251
- inputs: [],
1252
- },
1253
1315
  {
1254
1316
  type: 'error',
1255
1317
  name: 'OnlyAggregatorAllowed',
@@ -1272,6 +1334,11 @@ export const MockTaskManagerArtifact = {
1272
1334
  },
1273
1335
  ],
1274
1336
  },
1337
+ {
1338
+ type: 'error',
1339
+ name: 'OnlySelf',
1340
+ inputs: [],
1341
+ },
1275
1342
  {
1276
1343
  type: 'error',
1277
1344
  name: 'RandomFunctionNotSupported',
package/src/index.ts CHANGED
@@ -1,15 +1,19 @@
1
1
  export * from './types';
2
+ export * from './MockCoFHEAddressBook';
2
3
  export * from './MockTaskManager';
3
4
  export * from './MockACL';
4
5
  export * from './ACPTimestampRevoker';
5
6
  export * from './ACPShareRegistry';
7
+ export * from './MockERC1967Proxy';
6
8
  export * from './MockZkVerifier';
7
9
  export * from './MockThresholdNetwork';
8
10
  export type {
9
11
  MockACL,
12
+ MockCoFHEAddressBook,
10
13
  MockTaskManager,
11
14
  MockThresholdNetwork,
12
15
  MockZkVerifier,
13
16
  ACPTimestampRevoker,
14
17
  ACPShareRegistry,
18
+ MockERC1967Proxy,
15
19
  } from './typechain-types';