@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cofhe/mock-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Mock smart contracts for testing CoFHE with FHE primitives locally",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"cofhe"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fhenixprotocol/cofhe-contracts": "0.
|
|
36
|
+
"@fhenixprotocol/cofhe-contracts": "1.0.0",
|
|
37
37
|
"@openzeppelin/contracts": "5.4.0",
|
|
38
38
|
"@openzeppelin/contracts-upgradeable": "5.4.0"
|
|
39
39
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tsx": "4.21.0",
|
|
47
47
|
"tsup": "8.5.0",
|
|
48
48
|
"typechain": "8.3.2",
|
|
49
|
-
"@cofhe/sdk": "0.
|
|
49
|
+
"@cofhe/sdk": "0.8.0",
|
|
50
50
|
"@cofhe/tsconfig": "0.1.2"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
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',
|
|
@@ -712,6 +712,25 @@ export const MockACLArtifact = {
|
|
|
712
712
|
],
|
|
713
713
|
anonymous: false,
|
|
714
714
|
},
|
|
715
|
+
{
|
|
716
|
+
type: 'event',
|
|
717
|
+
name: 'TaskManagerUpdated',
|
|
718
|
+
inputs: [
|
|
719
|
+
{
|
|
720
|
+
name: 'oldAddress',
|
|
721
|
+
type: 'address',
|
|
722
|
+
indexed: false,
|
|
723
|
+
internalType: 'address',
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
name: 'newAddress',
|
|
727
|
+
type: 'address',
|
|
728
|
+
indexed: false,
|
|
729
|
+
internalType: 'address',
|
|
730
|
+
},
|
|
731
|
+
],
|
|
732
|
+
anonymous: false,
|
|
733
|
+
},
|
|
715
734
|
{
|
|
716
735
|
type: 'error',
|
|
717
736
|
name: 'AlreadyDelegated',
|
|
@@ -733,6 +752,11 @@ export const MockACLArtifact = {
|
|
|
733
752
|
name: 'InvalidShortString',
|
|
734
753
|
inputs: [],
|
|
735
754
|
},
|
|
755
|
+
{
|
|
756
|
+
type: 'error',
|
|
757
|
+
name: 'InvalidTaskManagerAddress',
|
|
758
|
+
inputs: [],
|
|
759
|
+
},
|
|
736
760
|
{
|
|
737
761
|
type: 'error',
|
|
738
762
|
name: 'NotShared',
|
|
@@ -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;
|
package/src/MockTaskManager.ts
CHANGED
|
@@ -4,13 +4,41 @@ import { type MockArtifact } from './types';
|
|
|
4
4
|
export const MockTaskManagerArtifact = {
|
|
5
5
|
contractName: 'MockTaskManager',
|
|
6
6
|
isFixed: true,
|
|
7
|
-
fixedAddress: '
|
|
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',
|
|
@@ -1272,6 +1339,11 @@ export const MockTaskManagerArtifact = {
|
|
|
1272
1339
|
},
|
|
1273
1340
|
],
|
|
1274
1341
|
},
|
|
1342
|
+
{
|
|
1343
|
+
type: 'error',
|
|
1344
|
+
name: 'OnlySelf',
|
|
1345
|
+
inputs: [],
|
|
1346
|
+
},
|
|
1275
1347
|
{
|
|
1276
1348
|
type: 'error',
|
|
1277
1349
|
name: 'RandomFunctionNotSupported',
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
+
export * from './MockCoFHEAddressBook';
|
|
2
3
|
export * from './MockTaskManager';
|
|
3
4
|
export * from './MockACL';
|
|
4
5
|
export * from './ACPTimestampRevoker';
|
|
@@ -7,6 +8,7 @@ export * from './MockZkVerifier';
|
|
|
7
8
|
export * from './MockThresholdNetwork';
|
|
8
9
|
export type {
|
|
9
10
|
MockACL,
|
|
11
|
+
MockCoFHEAddressBook,
|
|
10
12
|
MockTaskManager,
|
|
11
13
|
MockThresholdNetwork,
|
|
12
14
|
MockZkVerifier,
|
|
@@ -66,7 +66,6 @@ export type ACPStructOutput = [
|
|
|
66
66
|
export interface MockACLInterface extends Interface {
|
|
67
67
|
getFunction(
|
|
68
68
|
nameOrSignature:
|
|
69
|
-
| 'TASK_MANAGER_ADDRESS_'
|
|
70
69
|
| 'allow'
|
|
71
70
|
| 'allowForDecryption'
|
|
72
71
|
| 'allowGlobal'
|
|
@@ -90,6 +89,7 @@ export interface MockACLInterface extends Interface {
|
|
|
90
89
|
| 'receiveCtHash'
|
|
91
90
|
| 'setDefaultRevokerContract'
|
|
92
91
|
| 'setShareRegistry'
|
|
92
|
+
| 'setTaskManager'
|
|
93
93
|
| 'shareCtHash'
|
|
94
94
|
| 'shareRegistry'
|
|
95
95
|
): FunctionFragment;
|
|
@@ -101,9 +101,9 @@ export interface MockACLInterface extends Interface {
|
|
|
101
101
|
| 'EIP712DomainChanged'
|
|
102
102
|
| 'NewDelegation'
|
|
103
103
|
| 'ShareRegistryUpdated'
|
|
104
|
+
| 'TaskManagerUpdated'
|
|
104
105
|
): EventFragment;
|
|
105
106
|
|
|
106
|
-
encodeFunctionData(functionFragment: 'TASK_MANAGER_ADDRESS_', values?: undefined): string;
|
|
107
107
|
encodeFunctionData(functionFragment: 'allow', values: [BigNumberish, AddressLike, AddressLike]): string;
|
|
108
108
|
encodeFunctionData(functionFragment: 'allowForDecryption', values: [BigNumberish[], AddressLike]): string;
|
|
109
109
|
encodeFunctionData(functionFragment: 'allowGlobal', values: [BigNumberish, AddressLike]): string;
|
|
@@ -130,10 +130,10 @@ export interface MockACLInterface extends Interface {
|
|
|
130
130
|
encodeFunctionData(functionFragment: 'receiveCtHash', values: [BigNumberish, AddressLike, AddressLike]): string;
|
|
131
131
|
encodeFunctionData(functionFragment: 'setDefaultRevokerContract', values: [AddressLike]): string;
|
|
132
132
|
encodeFunctionData(functionFragment: 'setShareRegistry', values: [AddressLike]): string;
|
|
133
|
+
encodeFunctionData(functionFragment: 'setTaskManager', values: [AddressLike]): string;
|
|
133
134
|
encodeFunctionData(functionFragment: 'shareCtHash', values: [BigNumberish, AddressLike, AddressLike]): string;
|
|
134
135
|
encodeFunctionData(functionFragment: 'shareRegistry', values?: undefined): string;
|
|
135
136
|
|
|
136
|
-
decodeFunctionResult(functionFragment: 'TASK_MANAGER_ADDRESS_', data: BytesLike): Result;
|
|
137
137
|
decodeFunctionResult(functionFragment: 'allow', data: BytesLike): Result;
|
|
138
138
|
decodeFunctionResult(functionFragment: 'allowForDecryption', data: BytesLike): Result;
|
|
139
139
|
decodeFunctionResult(functionFragment: 'allowGlobal', data: BytesLike): Result;
|
|
@@ -157,6 +157,7 @@ export interface MockACLInterface extends Interface {
|
|
|
157
157
|
decodeFunctionResult(functionFragment: 'receiveCtHash', data: BytesLike): Result;
|
|
158
158
|
decodeFunctionResult(functionFragment: 'setDefaultRevokerContract', data: BytesLike): Result;
|
|
159
159
|
decodeFunctionResult(functionFragment: 'setShareRegistry', data: BytesLike): Result;
|
|
160
|
+
decodeFunctionResult(functionFragment: 'setTaskManager', data: BytesLike): Result;
|
|
160
161
|
decodeFunctionResult(functionFragment: 'shareCtHash', data: BytesLike): Result;
|
|
161
162
|
decodeFunctionResult(functionFragment: 'shareRegistry', data: BytesLike): Result;
|
|
162
163
|
}
|
|
@@ -223,6 +224,19 @@ export namespace ShareRegistryUpdatedEvent {
|
|
|
223
224
|
export type LogDescription = TypedLogDescription<Event>;
|
|
224
225
|
}
|
|
225
226
|
|
|
227
|
+
export namespace TaskManagerUpdatedEvent {
|
|
228
|
+
export type InputTuple = [oldAddress: AddressLike, newAddress: AddressLike];
|
|
229
|
+
export type OutputTuple = [oldAddress: string, newAddress: string];
|
|
230
|
+
export interface OutputObject {
|
|
231
|
+
oldAddress: string;
|
|
232
|
+
newAddress: string;
|
|
233
|
+
}
|
|
234
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
235
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
|
236
|
+
export type Log = TypedEventLog<Event>;
|
|
237
|
+
export type LogDescription = TypedLogDescription<Event>;
|
|
238
|
+
}
|
|
239
|
+
|
|
226
240
|
export interface MockACL extends BaseContract {
|
|
227
241
|
connect(runner?: ContractRunner | null): MockACL;
|
|
228
242
|
waitForDeployment(): Promise<this>;
|
|
@@ -256,8 +270,6 @@ export interface MockACL extends BaseContract {
|
|
|
256
270
|
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
257
271
|
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
258
272
|
|
|
259
|
-
TASK_MANAGER_ADDRESS_: TypedContractMethod<[], [string], 'view'>;
|
|
260
|
-
|
|
261
273
|
allow: TypedContractMethod<
|
|
262
274
|
[handle: BigNumberish, account: AddressLike, requester: AddressLike],
|
|
263
275
|
[void],
|
|
@@ -334,6 +346,8 @@ export interface MockACL extends BaseContract {
|
|
|
334
346
|
|
|
335
347
|
setShareRegistry: TypedContractMethod<[newAddress: AddressLike], [void], 'nonpayable'>;
|
|
336
348
|
|
|
349
|
+
setTaskManager: TypedContractMethod<[newAddress: AddressLike], [void], 'nonpayable'>;
|
|
350
|
+
|
|
337
351
|
shareCtHash: TypedContractMethod<
|
|
338
352
|
[handle: BigNumberish, sharer: AddressLike, receiver: AddressLike],
|
|
339
353
|
[void],
|
|
@@ -344,7 +358,6 @@ export interface MockACL extends BaseContract {
|
|
|
344
358
|
|
|
345
359
|
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
346
360
|
|
|
347
|
-
getFunction(nameOrSignature: 'TASK_MANAGER_ADDRESS_'): TypedContractMethod<[], [string], 'view'>;
|
|
348
361
|
getFunction(
|
|
349
362
|
nameOrSignature: 'allow'
|
|
350
363
|
): TypedContractMethod<[handle: BigNumberish, account: AddressLike, requester: AddressLike], [void], 'nonpayable'>;
|
|
@@ -418,6 +431,7 @@ export interface MockACL extends BaseContract {
|
|
|
418
431
|
getFunction(
|
|
419
432
|
nameOrSignature: 'setShareRegistry'
|
|
420
433
|
): TypedContractMethod<[newAddress: AddressLike], [void], 'nonpayable'>;
|
|
434
|
+
getFunction(nameOrSignature: 'setTaskManager'): TypedContractMethod<[newAddress: AddressLike], [void], 'nonpayable'>;
|
|
421
435
|
getFunction(
|
|
422
436
|
nameOrSignature: 'shareCtHash'
|
|
423
437
|
): TypedContractMethod<[handle: BigNumberish, sharer: AddressLike, receiver: AddressLike], [void], 'nonpayable'>;
|
|
@@ -454,6 +468,13 @@ export interface MockACL extends BaseContract {
|
|
|
454
468
|
ShareRegistryUpdatedEvent.OutputTuple,
|
|
455
469
|
ShareRegistryUpdatedEvent.OutputObject
|
|
456
470
|
>;
|
|
471
|
+
getEvent(
|
|
472
|
+
key: 'TaskManagerUpdated'
|
|
473
|
+
): TypedContractEvent<
|
|
474
|
+
TaskManagerUpdatedEvent.InputTuple,
|
|
475
|
+
TaskManagerUpdatedEvent.OutputTuple,
|
|
476
|
+
TaskManagerUpdatedEvent.OutputObject
|
|
477
|
+
>;
|
|
457
478
|
|
|
458
479
|
filters: {
|
|
459
480
|
'AllowedForDecryption(uint256[])': TypedContractEvent<
|
|
@@ -510,5 +531,16 @@ export interface MockACL extends BaseContract {
|
|
|
510
531
|
ShareRegistryUpdatedEvent.OutputTuple,
|
|
511
532
|
ShareRegistryUpdatedEvent.OutputObject
|
|
512
533
|
>;
|
|
534
|
+
|
|
535
|
+
'TaskManagerUpdated(address,address)': TypedContractEvent<
|
|
536
|
+
TaskManagerUpdatedEvent.InputTuple,
|
|
537
|
+
TaskManagerUpdatedEvent.OutputTuple,
|
|
538
|
+
TaskManagerUpdatedEvent.OutputObject
|
|
539
|
+
>;
|
|
540
|
+
TaskManagerUpdated: TypedContractEvent<
|
|
541
|
+
TaskManagerUpdatedEvent.InputTuple,
|
|
542
|
+
TaskManagerUpdatedEvent.OutputTuple,
|
|
543
|
+
TaskManagerUpdatedEvent.OutputObject
|
|
544
|
+
>;
|
|
513
545
|
};
|
|
514
546
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumberish,
|
|
7
|
+
BytesLike,
|
|
8
|
+
FunctionFragment,
|
|
9
|
+
Result,
|
|
10
|
+
Interface,
|
|
11
|
+
EventFragment,
|
|
12
|
+
AddressLike,
|
|
13
|
+
ContractRunner,
|
|
14
|
+
ContractMethod,
|
|
15
|
+
Listener,
|
|
16
|
+
} from 'ethers';
|
|
17
|
+
import type {
|
|
18
|
+
TypedContractEvent,
|
|
19
|
+
TypedDeferredTopicFilter,
|
|
20
|
+
TypedEventLog,
|
|
21
|
+
TypedLogDescription,
|
|
22
|
+
TypedListener,
|
|
23
|
+
TypedContractMethod,
|
|
24
|
+
} from './common';
|
|
25
|
+
|
|
26
|
+
export interface MockCoFHEAddressBookInterface extends Interface {
|
|
27
|
+
getFunction(nameOrSignature: 'exists' | 'getTm' | 'setTm' | 'unsetTm'): FunctionFragment;
|
|
28
|
+
|
|
29
|
+
getEvent(nameOrSignatureOrTopic: 'TaskManagerSet'): EventFragment;
|
|
30
|
+
|
|
31
|
+
encodeFunctionData(functionFragment: 'exists', values?: undefined): string;
|
|
32
|
+
encodeFunctionData(functionFragment: 'getTm', values: [BigNumberish]): string;
|
|
33
|
+
encodeFunctionData(functionFragment: 'setTm', values: [BigNumberish, AddressLike]): string;
|
|
34
|
+
encodeFunctionData(functionFragment: 'unsetTm', values: [BigNumberish]): string;
|
|
35
|
+
|
|
36
|
+
decodeFunctionResult(functionFragment: 'exists', data: BytesLike): Result;
|
|
37
|
+
decodeFunctionResult(functionFragment: 'getTm', data: BytesLike): Result;
|
|
38
|
+
decodeFunctionResult(functionFragment: 'setTm', data: BytesLike): Result;
|
|
39
|
+
decodeFunctionResult(functionFragment: 'unsetTm', data: BytesLike): Result;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export namespace TaskManagerSetEvent {
|
|
43
|
+
export type InputTuple = [id: BigNumberish, previous: AddressLike, current: AddressLike];
|
|
44
|
+
export type OutputTuple = [id: bigint, previous: string, current: string];
|
|
45
|
+
export interface OutputObject {
|
|
46
|
+
id: bigint;
|
|
47
|
+
previous: string;
|
|
48
|
+
current: string;
|
|
49
|
+
}
|
|
50
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
51
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
|
52
|
+
export type Log = TypedEventLog<Event>;
|
|
53
|
+
export type LogDescription = TypedLogDescription<Event>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface MockCoFHEAddressBook extends BaseContract {
|
|
57
|
+
connect(runner?: ContractRunner | null): MockCoFHEAddressBook;
|
|
58
|
+
waitForDeployment(): Promise<this>;
|
|
59
|
+
|
|
60
|
+
interface: MockCoFHEAddressBookInterface;
|
|
61
|
+
|
|
62
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
63
|
+
event: TCEvent,
|
|
64
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
65
|
+
toBlock?: string | number | undefined
|
|
66
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
67
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
68
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
69
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
70
|
+
toBlock?: string | number | undefined
|
|
71
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
72
|
+
|
|
73
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
74
|
+
on<TCEvent extends TypedContractEvent>(
|
|
75
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
76
|
+
listener: TypedListener<TCEvent>
|
|
77
|
+
): Promise<this>;
|
|
78
|
+
|
|
79
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
80
|
+
once<TCEvent extends TypedContractEvent>(
|
|
81
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
82
|
+
listener: TypedListener<TCEvent>
|
|
83
|
+
): Promise<this>;
|
|
84
|
+
|
|
85
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
86
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
87
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
88
|
+
|
|
89
|
+
exists: TypedContractMethod<[], [boolean], 'view'>;
|
|
90
|
+
|
|
91
|
+
getTm: TypedContractMethod<[id: BigNumberish], [string], 'view'>;
|
|
92
|
+
|
|
93
|
+
setTm: TypedContractMethod<[id: BigNumberish, tm: AddressLike], [void], 'nonpayable'>;
|
|
94
|
+
|
|
95
|
+
unsetTm: TypedContractMethod<[id: BigNumberish], [void], 'nonpayable'>;
|
|
96
|
+
|
|
97
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
98
|
+
|
|
99
|
+
getFunction(nameOrSignature: 'exists'): TypedContractMethod<[], [boolean], 'view'>;
|
|
100
|
+
getFunction(nameOrSignature: 'getTm'): TypedContractMethod<[id: BigNumberish], [string], 'view'>;
|
|
101
|
+
getFunction(nameOrSignature: 'setTm'): TypedContractMethod<[id: BigNumberish, tm: AddressLike], [void], 'nonpayable'>;
|
|
102
|
+
getFunction(nameOrSignature: 'unsetTm'): TypedContractMethod<[id: BigNumberish], [void], 'nonpayable'>;
|
|
103
|
+
|
|
104
|
+
getEvent(
|
|
105
|
+
key: 'TaskManagerSet'
|
|
106
|
+
): TypedContractEvent<
|
|
107
|
+
TaskManagerSetEvent.InputTuple,
|
|
108
|
+
TaskManagerSetEvent.OutputTuple,
|
|
109
|
+
TaskManagerSetEvent.OutputObject
|
|
110
|
+
>;
|
|
111
|
+
|
|
112
|
+
filters: {
|
|
113
|
+
'TaskManagerSet(uint256,address,address)': TypedContractEvent<
|
|
114
|
+
TaskManagerSetEvent.InputTuple,
|
|
115
|
+
TaskManagerSetEvent.OutputTuple,
|
|
116
|
+
TaskManagerSetEvent.OutputObject
|
|
117
|
+
>;
|
|
118
|
+
TaskManagerSet: TypedContractEvent<
|
|
119
|
+
TaskManagerSetEvent.InputTuple,
|
|
120
|
+
TaskManagerSetEvent.OutputTuple,
|
|
121
|
+
TaskManagerSetEvent.OutputObject
|
|
122
|
+
>;
|
|
123
|
+
};
|
|
124
|
+
}
|