@cofhe/mock-contracts 0.3.1 → 0.4.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.
@@ -0,0 +1,382 @@
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 type PermissionStruct = {
27
+ issuer: AddressLike;
28
+ expiration: BigNumberish;
29
+ recipient: AddressLike;
30
+ validatorId: BigNumberish;
31
+ validatorContract: AddressLike;
32
+ sealingKey: BytesLike;
33
+ issuerSignature: BytesLike;
34
+ recipientSignature: BytesLike;
35
+ };
36
+
37
+ export type PermissionStructOutput = [
38
+ issuer: string,
39
+ expiration: bigint,
40
+ recipient: string,
41
+ validatorId: bigint,
42
+ validatorContract: string,
43
+ sealingKey: string,
44
+ issuerSignature: string,
45
+ recipientSignature: string,
46
+ ] & {
47
+ issuer: string;
48
+ expiration: bigint;
49
+ recipient: string;
50
+ validatorId: bigint;
51
+ validatorContract: string;
52
+ sealingKey: string;
53
+ issuerSignature: string;
54
+ recipientSignature: string;
55
+ };
56
+
57
+ export interface MockACLInterface extends Interface {
58
+ getFunction(
59
+ nameOrSignature:
60
+ | 'TASK_MANAGER_ADDRESS_'
61
+ | 'allow'
62
+ | 'allowForDecryption'
63
+ | 'allowGlobal'
64
+ | 'allowTransient'
65
+ | 'allowedOnBehalf'
66
+ | 'allowedTransient'
67
+ | 'checkPermitValidity'
68
+ | 'cleanTransientStorage'
69
+ | 'delegateAccount'
70
+ | 'eip712Domain'
71
+ | 'exists'
72
+ | 'getTaskManagerAddress'
73
+ | 'getVersion'
74
+ | 'globalAllowed'
75
+ | 'hashTypedDataV4'
76
+ | 'isAllowed'
77
+ | 'isAllowedForDecryption'
78
+ | 'isAllowedWithPermission'
79
+ | 'persistAllowed'
80
+ ): FunctionFragment;
81
+
82
+ getEvent(nameOrSignatureOrTopic: 'AllowedForDecryption' | 'EIP712DomainChanged' | 'NewDelegation'): EventFragment;
83
+
84
+ encodeFunctionData(functionFragment: 'TASK_MANAGER_ADDRESS_', values?: undefined): string;
85
+ encodeFunctionData(functionFragment: 'allow', values: [BigNumberish, AddressLike, AddressLike]): string;
86
+ encodeFunctionData(functionFragment: 'allowForDecryption', values: [BigNumberish[], AddressLike]): string;
87
+ encodeFunctionData(functionFragment: 'allowGlobal', values: [BigNumberish, AddressLike]): string;
88
+ encodeFunctionData(functionFragment: 'allowTransient', values: [BigNumberish, AddressLike, AddressLike]): string;
89
+ encodeFunctionData(
90
+ functionFragment: 'allowedOnBehalf',
91
+ values: [AddressLike, BigNumberish, AddressLike, AddressLike]
92
+ ): string;
93
+ encodeFunctionData(functionFragment: 'allowedTransient', values: [BigNumberish, AddressLike]): string;
94
+ encodeFunctionData(functionFragment: 'checkPermitValidity', values: [PermissionStruct]): string;
95
+ encodeFunctionData(functionFragment: 'cleanTransientStorage', values?: undefined): string;
96
+ encodeFunctionData(functionFragment: 'delegateAccount', values: [AddressLike, AddressLike]): string;
97
+ encodeFunctionData(functionFragment: 'eip712Domain', values?: undefined): string;
98
+ encodeFunctionData(functionFragment: 'exists', values?: undefined): string;
99
+ encodeFunctionData(functionFragment: 'getTaskManagerAddress', values?: undefined): string;
100
+ encodeFunctionData(functionFragment: 'getVersion', values?: undefined): string;
101
+ encodeFunctionData(functionFragment: 'globalAllowed', values: [BigNumberish]): string;
102
+ encodeFunctionData(functionFragment: 'hashTypedDataV4', values: [BytesLike]): string;
103
+ encodeFunctionData(functionFragment: 'isAllowed', values: [BigNumberish, AddressLike]): string;
104
+ encodeFunctionData(functionFragment: 'isAllowedForDecryption', values: [BigNumberish]): string;
105
+ encodeFunctionData(functionFragment: 'isAllowedWithPermission', values: [PermissionStruct, BigNumberish]): string;
106
+ encodeFunctionData(functionFragment: 'persistAllowed', values: [BigNumberish, AddressLike]): string;
107
+
108
+ decodeFunctionResult(functionFragment: 'TASK_MANAGER_ADDRESS_', data: BytesLike): Result;
109
+ decodeFunctionResult(functionFragment: 'allow', data: BytesLike): Result;
110
+ decodeFunctionResult(functionFragment: 'allowForDecryption', data: BytesLike): Result;
111
+ decodeFunctionResult(functionFragment: 'allowGlobal', data: BytesLike): Result;
112
+ decodeFunctionResult(functionFragment: 'allowTransient', data: BytesLike): Result;
113
+ decodeFunctionResult(functionFragment: 'allowedOnBehalf', data: BytesLike): Result;
114
+ decodeFunctionResult(functionFragment: 'allowedTransient', data: BytesLike): Result;
115
+ decodeFunctionResult(functionFragment: 'checkPermitValidity', data: BytesLike): Result;
116
+ decodeFunctionResult(functionFragment: 'cleanTransientStorage', data: BytesLike): Result;
117
+ decodeFunctionResult(functionFragment: 'delegateAccount', data: BytesLike): Result;
118
+ decodeFunctionResult(functionFragment: 'eip712Domain', data: BytesLike): Result;
119
+ decodeFunctionResult(functionFragment: 'exists', data: BytesLike): Result;
120
+ decodeFunctionResult(functionFragment: 'getTaskManagerAddress', data: BytesLike): Result;
121
+ decodeFunctionResult(functionFragment: 'getVersion', data: BytesLike): Result;
122
+ decodeFunctionResult(functionFragment: 'globalAllowed', data: BytesLike): Result;
123
+ decodeFunctionResult(functionFragment: 'hashTypedDataV4', data: BytesLike): Result;
124
+ decodeFunctionResult(functionFragment: 'isAllowed', data: BytesLike): Result;
125
+ decodeFunctionResult(functionFragment: 'isAllowedForDecryption', data: BytesLike): Result;
126
+ decodeFunctionResult(functionFragment: 'isAllowedWithPermission', data: BytesLike): Result;
127
+ decodeFunctionResult(functionFragment: 'persistAllowed', data: BytesLike): Result;
128
+ }
129
+
130
+ export namespace AllowedForDecryptionEvent {
131
+ export type InputTuple = [handlesList: BigNumberish[]];
132
+ export type OutputTuple = [handlesList: bigint[]];
133
+ export interface OutputObject {
134
+ handlesList: bigint[];
135
+ }
136
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
137
+ export type Filter = TypedDeferredTopicFilter<Event>;
138
+ export type Log = TypedEventLog<Event>;
139
+ export type LogDescription = TypedLogDescription<Event>;
140
+ }
141
+
142
+ export namespace EIP712DomainChangedEvent {
143
+ export type InputTuple = [];
144
+ export type OutputTuple = [];
145
+ export interface OutputObject {}
146
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
147
+ export type Filter = TypedDeferredTopicFilter<Event>;
148
+ export type Log = TypedEventLog<Event>;
149
+ export type LogDescription = TypedLogDescription<Event>;
150
+ }
151
+
152
+ export namespace NewDelegationEvent {
153
+ export type InputTuple = [sender: AddressLike, delegatee: AddressLike, contractAddress: AddressLike];
154
+ export type OutputTuple = [sender: string, delegatee: string, contractAddress: string];
155
+ export interface OutputObject {
156
+ sender: string;
157
+ delegatee: string;
158
+ contractAddress: string;
159
+ }
160
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
161
+ export type Filter = TypedDeferredTopicFilter<Event>;
162
+ export type Log = TypedEventLog<Event>;
163
+ export type LogDescription = TypedLogDescription<Event>;
164
+ }
165
+
166
+ export interface MockACL extends BaseContract {
167
+ connect(runner?: ContractRunner | null): MockACL;
168
+ waitForDeployment(): Promise<this>;
169
+
170
+ interface: MockACLInterface;
171
+
172
+ queryFilter<TCEvent extends TypedContractEvent>(
173
+ event: TCEvent,
174
+ fromBlockOrBlockhash?: string | number | undefined,
175
+ toBlock?: string | number | undefined
176
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
177
+ queryFilter<TCEvent extends TypedContractEvent>(
178
+ filter: TypedDeferredTopicFilter<TCEvent>,
179
+ fromBlockOrBlockhash?: string | number | undefined,
180
+ toBlock?: string | number | undefined
181
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
182
+
183
+ on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
184
+ on<TCEvent extends TypedContractEvent>(
185
+ filter: TypedDeferredTopicFilter<TCEvent>,
186
+ listener: TypedListener<TCEvent>
187
+ ): Promise<this>;
188
+
189
+ once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
190
+ once<TCEvent extends TypedContractEvent>(
191
+ filter: TypedDeferredTopicFilter<TCEvent>,
192
+ listener: TypedListener<TCEvent>
193
+ ): Promise<this>;
194
+
195
+ listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
196
+ listeners(eventName?: string): Promise<Array<Listener>>;
197
+ removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
198
+
199
+ TASK_MANAGER_ADDRESS_: TypedContractMethod<[], [string], 'view'>;
200
+
201
+ allow: TypedContractMethod<
202
+ [handle: BigNumberish, account: AddressLike, requester: AddressLike],
203
+ [void],
204
+ 'nonpayable'
205
+ >;
206
+
207
+ allowForDecryption: TypedContractMethod<[handlesList: BigNumberish[], requester: AddressLike], [void], 'nonpayable'>;
208
+
209
+ allowGlobal: TypedContractMethod<[handle: BigNumberish, requester: AddressLike], [void], 'nonpayable'>;
210
+
211
+ allowTransient: TypedContractMethod<
212
+ [handle: BigNumberish, account: AddressLike, requester: AddressLike],
213
+ [void],
214
+ 'nonpayable'
215
+ >;
216
+
217
+ allowedOnBehalf: TypedContractMethod<
218
+ [delegatee: AddressLike, handle: BigNumberish, contractAddress: AddressLike, account: AddressLike],
219
+ [boolean],
220
+ 'view'
221
+ >;
222
+
223
+ allowedTransient: TypedContractMethod<[handle: BigNumberish, account: AddressLike], [boolean], 'view'>;
224
+
225
+ checkPermitValidity: TypedContractMethod<[permission: PermissionStruct], [boolean], 'view'>;
226
+
227
+ cleanTransientStorage: TypedContractMethod<[], [void], 'nonpayable'>;
228
+
229
+ delegateAccount: TypedContractMethod<[delegatee: AddressLike, delegateeContract: AddressLike], [void], 'nonpayable'>;
230
+
231
+ eip712Domain: TypedContractMethod<
232
+ [],
233
+ [
234
+ [string, string, string, bigint, string, string, bigint[]] & {
235
+ fields: string;
236
+ name: string;
237
+ version: string;
238
+ chainId: bigint;
239
+ verifyingContract: string;
240
+ salt: string;
241
+ extensions: bigint[];
242
+ },
243
+ ],
244
+ 'view'
245
+ >;
246
+
247
+ exists: TypedContractMethod<[], [boolean], 'view'>;
248
+
249
+ getTaskManagerAddress: TypedContractMethod<[], [string], 'view'>;
250
+
251
+ getVersion: TypedContractMethod<[], [string], 'view'>;
252
+
253
+ globalAllowed: TypedContractMethod<[handle: BigNumberish], [boolean], 'view'>;
254
+
255
+ hashTypedDataV4: TypedContractMethod<[structHash: BytesLike], [string], 'view'>;
256
+
257
+ isAllowed: TypedContractMethod<[handle: BigNumberish, account: AddressLike], [boolean], 'view'>;
258
+
259
+ isAllowedForDecryption: TypedContractMethod<[handle: BigNumberish], [boolean], 'view'>;
260
+
261
+ isAllowedWithPermission: TypedContractMethod<[permission: PermissionStruct, handle: BigNumberish], [boolean], 'view'>;
262
+
263
+ persistAllowed: TypedContractMethod<[handle: BigNumberish, account: AddressLike], [boolean], 'view'>;
264
+
265
+ getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
266
+
267
+ getFunction(nameOrSignature: 'TASK_MANAGER_ADDRESS_'): TypedContractMethod<[], [string], 'view'>;
268
+ getFunction(
269
+ nameOrSignature: 'allow'
270
+ ): TypedContractMethod<[handle: BigNumberish, account: AddressLike, requester: AddressLike], [void], 'nonpayable'>;
271
+ getFunction(
272
+ nameOrSignature: 'allowForDecryption'
273
+ ): TypedContractMethod<[handlesList: BigNumberish[], requester: AddressLike], [void], 'nonpayable'>;
274
+ getFunction(
275
+ nameOrSignature: 'allowGlobal'
276
+ ): TypedContractMethod<[handle: BigNumberish, requester: AddressLike], [void], 'nonpayable'>;
277
+ getFunction(
278
+ nameOrSignature: 'allowTransient'
279
+ ): TypedContractMethod<[handle: BigNumberish, account: AddressLike, requester: AddressLike], [void], 'nonpayable'>;
280
+ getFunction(
281
+ nameOrSignature: 'allowedOnBehalf'
282
+ ): TypedContractMethod<
283
+ [delegatee: AddressLike, handle: BigNumberish, contractAddress: AddressLike, account: AddressLike],
284
+ [boolean],
285
+ 'view'
286
+ >;
287
+ getFunction(
288
+ nameOrSignature: 'allowedTransient'
289
+ ): TypedContractMethod<[handle: BigNumberish, account: AddressLike], [boolean], 'view'>;
290
+ getFunction(
291
+ nameOrSignature: 'checkPermitValidity'
292
+ ): TypedContractMethod<[permission: PermissionStruct], [boolean], 'view'>;
293
+ getFunction(nameOrSignature: 'cleanTransientStorage'): TypedContractMethod<[], [void], 'nonpayable'>;
294
+ getFunction(
295
+ nameOrSignature: 'delegateAccount'
296
+ ): TypedContractMethod<[delegatee: AddressLike, delegateeContract: AddressLike], [void], 'nonpayable'>;
297
+ getFunction(nameOrSignature: 'eip712Domain'): TypedContractMethod<
298
+ [],
299
+ [
300
+ [string, string, string, bigint, string, string, bigint[]] & {
301
+ fields: string;
302
+ name: string;
303
+ version: string;
304
+ chainId: bigint;
305
+ verifyingContract: string;
306
+ salt: string;
307
+ extensions: bigint[];
308
+ },
309
+ ],
310
+ 'view'
311
+ >;
312
+ getFunction(nameOrSignature: 'exists'): TypedContractMethod<[], [boolean], 'view'>;
313
+ getFunction(nameOrSignature: 'getTaskManagerAddress'): TypedContractMethod<[], [string], 'view'>;
314
+ getFunction(nameOrSignature: 'getVersion'): TypedContractMethod<[], [string], 'view'>;
315
+ getFunction(nameOrSignature: 'globalAllowed'): TypedContractMethod<[handle: BigNumberish], [boolean], 'view'>;
316
+ getFunction(nameOrSignature: 'hashTypedDataV4'): TypedContractMethod<[structHash: BytesLike], [string], 'view'>;
317
+ getFunction(
318
+ nameOrSignature: 'isAllowed'
319
+ ): TypedContractMethod<[handle: BigNumberish, account: AddressLike], [boolean], 'view'>;
320
+ getFunction(
321
+ nameOrSignature: 'isAllowedForDecryption'
322
+ ): TypedContractMethod<[handle: BigNumberish], [boolean], 'view'>;
323
+ getFunction(
324
+ nameOrSignature: 'isAllowedWithPermission'
325
+ ): TypedContractMethod<[permission: PermissionStruct, handle: BigNumberish], [boolean], 'view'>;
326
+ getFunction(
327
+ nameOrSignature: 'persistAllowed'
328
+ ): TypedContractMethod<[handle: BigNumberish, account: AddressLike], [boolean], 'view'>;
329
+
330
+ getEvent(
331
+ key: 'AllowedForDecryption'
332
+ ): TypedContractEvent<
333
+ AllowedForDecryptionEvent.InputTuple,
334
+ AllowedForDecryptionEvent.OutputTuple,
335
+ AllowedForDecryptionEvent.OutputObject
336
+ >;
337
+ getEvent(
338
+ key: 'EIP712DomainChanged'
339
+ ): TypedContractEvent<
340
+ EIP712DomainChangedEvent.InputTuple,
341
+ EIP712DomainChangedEvent.OutputTuple,
342
+ EIP712DomainChangedEvent.OutputObject
343
+ >;
344
+ getEvent(
345
+ key: 'NewDelegation'
346
+ ): TypedContractEvent<NewDelegationEvent.InputTuple, NewDelegationEvent.OutputTuple, NewDelegationEvent.OutputObject>;
347
+
348
+ filters: {
349
+ 'AllowedForDecryption(uint256[])': TypedContractEvent<
350
+ AllowedForDecryptionEvent.InputTuple,
351
+ AllowedForDecryptionEvent.OutputTuple,
352
+ AllowedForDecryptionEvent.OutputObject
353
+ >;
354
+ AllowedForDecryption: TypedContractEvent<
355
+ AllowedForDecryptionEvent.InputTuple,
356
+ AllowedForDecryptionEvent.OutputTuple,
357
+ AllowedForDecryptionEvent.OutputObject
358
+ >;
359
+
360
+ 'EIP712DomainChanged()': TypedContractEvent<
361
+ EIP712DomainChangedEvent.InputTuple,
362
+ EIP712DomainChangedEvent.OutputTuple,
363
+ EIP712DomainChangedEvent.OutputObject
364
+ >;
365
+ EIP712DomainChanged: TypedContractEvent<
366
+ EIP712DomainChangedEvent.InputTuple,
367
+ EIP712DomainChangedEvent.OutputTuple,
368
+ EIP712DomainChangedEvent.OutputObject
369
+ >;
370
+
371
+ 'NewDelegation(address,address,address)': TypedContractEvent<
372
+ NewDelegationEvent.InputTuple,
373
+ NewDelegationEvent.OutputTuple,
374
+ NewDelegationEvent.OutputObject
375
+ >;
376
+ NewDelegation: TypedContractEvent<
377
+ NewDelegationEvent.InputTuple,
378
+ NewDelegationEvent.OutputTuple,
379
+ NewDelegationEvent.OutputObject
380
+ >;
381
+ };
382
+ }