@cofhe/mock-contracts 0.7.0 → 0.8.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/CHANGELOG.md +23 -0
- package/README.md +10 -0
- package/contracts/MockACL.sol +33 -15
- package/contracts/MockCoFHE.sol +165 -74
- package/contracts/MockCoFHEAddressBook.sol +64 -0
- package/contracts/MockTaskManager.sol +74 -24
- package/contracts/MockZkVerifier.sol +2 -2
- package/dist/index.d.mts +291 -20
- package/dist/index.d.ts +291 -20
- package/dist/index.js +224 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +224 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/MockACL.ts +37 -13
- package/src/MockCoFHEAddressBook.ts +114 -0
- package/src/MockTaskManager.ts +73 -1
- package/src/index.ts +2 -0
- package/src/typechain-types/MockACL.ts +38 -6
- package/src/typechain-types/MockCoFHEAddressBook.ts +124 -0
- package/src/typechain-types/MockTaskManager.ts +66 -1
- package/src/typechain-types/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,155 @@
|
|
|
1
|
+
// src/MockCoFHEAddressBook.ts
|
|
2
|
+
var MockCoFHEAddressBookArtifact = {
|
|
3
|
+
contractName: "MockCoFHEAddressBook",
|
|
4
|
+
isFixed: true,
|
|
5
|
+
fixedAddress: "0xC0F4e00E531a2B086492Ae3DCC1515038307196b",
|
|
6
|
+
abi: [
|
|
7
|
+
{
|
|
8
|
+
type: "function",
|
|
9
|
+
name: "exists",
|
|
10
|
+
inputs: [],
|
|
11
|
+
outputs: [
|
|
12
|
+
{
|
|
13
|
+
name: "",
|
|
14
|
+
type: "bool",
|
|
15
|
+
internalType: "bool"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
stateMutability: "pure"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "function",
|
|
22
|
+
name: "getTm",
|
|
23
|
+
inputs: [
|
|
24
|
+
{
|
|
25
|
+
name: "id",
|
|
26
|
+
type: "uint256",
|
|
27
|
+
internalType: "uint256"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
outputs: [
|
|
31
|
+
{
|
|
32
|
+
name: "tm",
|
|
33
|
+
type: "address",
|
|
34
|
+
internalType: "address"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
stateMutability: "view"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: "function",
|
|
41
|
+
name: "setTm",
|
|
42
|
+
inputs: [
|
|
43
|
+
{
|
|
44
|
+
name: "id",
|
|
45
|
+
type: "uint256",
|
|
46
|
+
internalType: "uint256"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "tm",
|
|
50
|
+
type: "address",
|
|
51
|
+
internalType: "address"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
outputs: [],
|
|
55
|
+
stateMutability: "nonpayable"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "function",
|
|
59
|
+
name: "unsetTm",
|
|
60
|
+
inputs: [
|
|
61
|
+
{
|
|
62
|
+
name: "id",
|
|
63
|
+
type: "uint256",
|
|
64
|
+
internalType: "uint256"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
outputs: [],
|
|
68
|
+
stateMutability: "nonpayable"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: "event",
|
|
72
|
+
name: "TaskManagerSet",
|
|
73
|
+
inputs: [
|
|
74
|
+
{
|
|
75
|
+
name: "id",
|
|
76
|
+
type: "uint256",
|
|
77
|
+
indexed: true,
|
|
78
|
+
internalType: "uint256"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "previous",
|
|
82
|
+
type: "address",
|
|
83
|
+
indexed: true,
|
|
84
|
+
internalType: "address"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "current",
|
|
88
|
+
type: "address",
|
|
89
|
+
indexed: true,
|
|
90
|
+
internalType: "address"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
anonymous: false
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: "error",
|
|
97
|
+
name: "InvalidAddress",
|
|
98
|
+
inputs: []
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "error",
|
|
102
|
+
name: "TaskManagerNotSet",
|
|
103
|
+
inputs: [
|
|
104
|
+
{
|
|
105
|
+
name: "id",
|
|
106
|
+
type: "uint256",
|
|
107
|
+
internalType: "uint256"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
};
|
|
113
|
+
|
|
1
114
|
// src/MockTaskManager.ts
|
|
2
115
|
var MockTaskManagerArtifact = {
|
|
3
116
|
contractName: "MockTaskManager",
|
|
4
117
|
isFixed: true,
|
|
5
|
-
fixedAddress: "
|
|
118
|
+
fixedAddress: "0x0000000000000000000000000000000000005000",
|
|
6
119
|
abi: [
|
|
7
120
|
{
|
|
8
121
|
type: "constructor",
|
|
9
122
|
inputs: [],
|
|
10
123
|
stateMutability: "nonpayable"
|
|
11
124
|
},
|
|
125
|
+
{
|
|
126
|
+
type: "function",
|
|
127
|
+
name: "MOCK_dispatchOperation",
|
|
128
|
+
inputs: [
|
|
129
|
+
{
|
|
130
|
+
name: "ctHash",
|
|
131
|
+
type: "uint256",
|
|
132
|
+
internalType: "uint256"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "funcId",
|
|
136
|
+
type: "uint8",
|
|
137
|
+
internalType: "enum FunctionId"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "inputs",
|
|
141
|
+
type: "uint256[]",
|
|
142
|
+
internalType: "uint256[]"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "arity",
|
|
146
|
+
type: "uint8",
|
|
147
|
+
internalType: "uint8"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
outputs: [],
|
|
151
|
+
stateMutability: "nonpayable"
|
|
152
|
+
},
|
|
12
153
|
{
|
|
13
154
|
type: "function",
|
|
14
155
|
name: "MOCK_logAllow",
|
|
@@ -562,6 +703,19 @@ var MockTaskManagerArtifact = {
|
|
|
562
703
|
],
|
|
563
704
|
stateMutability: "view"
|
|
564
705
|
},
|
|
706
|
+
{
|
|
707
|
+
type: "function",
|
|
708
|
+
name: "mockGasExcluded",
|
|
709
|
+
inputs: [],
|
|
710
|
+
outputs: [
|
|
711
|
+
{
|
|
712
|
+
name: "",
|
|
713
|
+
type: "bool",
|
|
714
|
+
internalType: "bool"
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
stateMutability: "view"
|
|
718
|
+
},
|
|
565
719
|
{
|
|
566
720
|
type: "function",
|
|
567
721
|
name: "mockStorage",
|
|
@@ -716,6 +870,19 @@ var MockTaskManagerArtifact = {
|
|
|
716
870
|
outputs: [],
|
|
717
871
|
stateMutability: "nonpayable"
|
|
718
872
|
},
|
|
873
|
+
{
|
|
874
|
+
type: "function",
|
|
875
|
+
name: "setMockGasExcluded",
|
|
876
|
+
inputs: [
|
|
877
|
+
{
|
|
878
|
+
name: "_mockGasExcluded",
|
|
879
|
+
type: "bool",
|
|
880
|
+
internalType: "bool"
|
|
881
|
+
}
|
|
882
|
+
],
|
|
883
|
+
outputs: [],
|
|
884
|
+
stateMutability: "nonpayable"
|
|
885
|
+
},
|
|
719
886
|
{
|
|
720
887
|
type: "function",
|
|
721
888
|
name: "setSecurityZoneMax",
|
|
@@ -961,6 +1128,19 @@ var MockTaskManagerArtifact = {
|
|
|
961
1128
|
],
|
|
962
1129
|
anonymous: false
|
|
963
1130
|
},
|
|
1131
|
+
{
|
|
1132
|
+
type: "event",
|
|
1133
|
+
name: "MockGasConsumed",
|
|
1134
|
+
inputs: [
|
|
1135
|
+
{
|
|
1136
|
+
name: "gas",
|
|
1137
|
+
type: "uint256",
|
|
1138
|
+
indexed: false,
|
|
1139
|
+
internalType: "uint256"
|
|
1140
|
+
}
|
|
1141
|
+
],
|
|
1142
|
+
anonymous: false
|
|
1143
|
+
},
|
|
964
1144
|
{
|
|
965
1145
|
type: "event",
|
|
966
1146
|
name: "ProtocolNotification",
|
|
@@ -1270,6 +1450,11 @@ var MockTaskManagerArtifact = {
|
|
|
1270
1450
|
}
|
|
1271
1451
|
]
|
|
1272
1452
|
},
|
|
1453
|
+
{
|
|
1454
|
+
type: "error",
|
|
1455
|
+
name: "OnlySelf",
|
|
1456
|
+
inputs: []
|
|
1457
|
+
},
|
|
1273
1458
|
{
|
|
1274
1459
|
type: "error",
|
|
1275
1460
|
name: "RandomFunctionNotSupported",
|
|
@@ -1325,19 +1510,6 @@ var MockACLArtifact = {
|
|
|
1325
1510
|
inputs: [],
|
|
1326
1511
|
stateMutability: "nonpayable"
|
|
1327
1512
|
},
|
|
1328
|
-
{
|
|
1329
|
-
type: "function",
|
|
1330
|
-
name: "TASK_MANAGER_ADDRESS_",
|
|
1331
|
-
inputs: [],
|
|
1332
|
-
outputs: [
|
|
1333
|
-
{
|
|
1334
|
-
name: "",
|
|
1335
|
-
type: "address",
|
|
1336
|
-
internalType: "address"
|
|
1337
|
-
}
|
|
1338
|
-
],
|
|
1339
|
-
stateMutability: "view"
|
|
1340
|
-
},
|
|
1341
1513
|
{
|
|
1342
1514
|
type: "function",
|
|
1343
1515
|
name: "allow",
|
|
@@ -1909,6 +2081,19 @@ var MockACLArtifact = {
|
|
|
1909
2081
|
outputs: [],
|
|
1910
2082
|
stateMutability: "nonpayable"
|
|
1911
2083
|
},
|
|
2084
|
+
{
|
|
2085
|
+
type: "function",
|
|
2086
|
+
name: "setTaskManager",
|
|
2087
|
+
inputs: [
|
|
2088
|
+
{
|
|
2089
|
+
name: "newAddress",
|
|
2090
|
+
type: "address",
|
|
2091
|
+
internalType: "address"
|
|
2092
|
+
}
|
|
2093
|
+
],
|
|
2094
|
+
outputs: [],
|
|
2095
|
+
stateMutability: "nonpayable"
|
|
2096
|
+
},
|
|
1912
2097
|
{
|
|
1913
2098
|
type: "function",
|
|
1914
2099
|
name: "shareCtHash",
|
|
@@ -2027,6 +2212,25 @@ var MockACLArtifact = {
|
|
|
2027
2212
|
],
|
|
2028
2213
|
anonymous: false
|
|
2029
2214
|
},
|
|
2215
|
+
{
|
|
2216
|
+
type: "event",
|
|
2217
|
+
name: "TaskManagerUpdated",
|
|
2218
|
+
inputs: [
|
|
2219
|
+
{
|
|
2220
|
+
name: "oldAddress",
|
|
2221
|
+
type: "address",
|
|
2222
|
+
indexed: false,
|
|
2223
|
+
internalType: "address"
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
name: "newAddress",
|
|
2227
|
+
type: "address",
|
|
2228
|
+
indexed: false,
|
|
2229
|
+
internalType: "address"
|
|
2230
|
+
}
|
|
2231
|
+
],
|
|
2232
|
+
anonymous: false
|
|
2233
|
+
},
|
|
2030
2234
|
{
|
|
2031
2235
|
type: "error",
|
|
2032
2236
|
name: "AlreadyDelegated",
|
|
@@ -2048,6 +2252,11 @@ var MockACLArtifact = {
|
|
|
2048
2252
|
name: "InvalidShortString",
|
|
2049
2253
|
inputs: []
|
|
2050
2254
|
},
|
|
2255
|
+
{
|
|
2256
|
+
type: "error",
|
|
2257
|
+
name: "InvalidTaskManagerAddress",
|
|
2258
|
+
inputs: []
|
|
2259
|
+
},
|
|
2051
2260
|
{
|
|
2052
2261
|
type: "error",
|
|
2053
2262
|
name: "NotShared",
|
|
@@ -3383,6 +3592,6 @@ var MockThresholdNetworkArtifact = {
|
|
|
3383
3592
|
]
|
|
3384
3593
|
};
|
|
3385
3594
|
|
|
3386
|
-
export { ACPShareRegistryArtifact, ACPTimestampRevokerArtifact, MockACLArtifact, MockTaskManagerArtifact, MockThresholdNetworkArtifact, MockZkVerifierArtifact };
|
|
3595
|
+
export { ACPShareRegistryArtifact, ACPTimestampRevokerArtifact, MockACLArtifact, MockCoFHEAddressBookArtifact, MockTaskManagerArtifact, MockThresholdNetworkArtifact, MockZkVerifierArtifact };
|
|
3387
3596
|
//# sourceMappingURL=index.mjs.map
|
|
3388
3597
|
//# sourceMappingURL=index.mjs.map
|