@web3dotorg/evm-slc-core-sdk 0.3.2
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/common.ts +131 -0
- package/constants.ts +34 -0
- package/contracts/governance/ExecutorsRegistry.ts +1249 -0
- package/contracts/governance/Governance.ts +1740 -0
- package/contracts/governance/NeutralsRegistry.ts +1393 -0
- package/contracts/governance/ParameterRegistry.ts +832 -0
- package/contracts/governance/index.ts +7 -0
- package/contracts/index.ts +15 -0
- package/contracts/interfaces/IExecutorsRegistry.ts +601 -0
- package/contracts/interfaces/IGovernance.ts +215 -0
- package/contracts/interfaces/INeutralsRegistry.ts +624 -0
- package/contracts/interfaces/IQParameters.ts +109 -0
- package/contracts/interfaces/ISLCCore.ts +289 -0
- package/contracts/interfaces/ISLCCoreFactory.ts +217 -0
- package/contracts/interfaces/IWrappedToken.ts +272 -0
- package/contracts/interfaces/index.ts +10 -0
- package/contracts/libs/Errors.ts +71 -0
- package/contracts/libs/NeutralsSelection.ts +71 -0
- package/contracts/libs/index.ts +5 -0
- package/contracts/mocks/MockGovernance.ts +389 -0
- package/contracts/mocks/MockNeutralsRegistry.ts +791 -0
- package/contracts/mocks/SimpleContract.ts +110 -0
- package/contracts/mocks/WrappedToken.ts +334 -0
- package/contracts/mocks/index.ts +7 -0
- package/contracts/slc-core/SLCCore.ts +397 -0
- package/contracts/slc-core/SLCCoreFactory.ts +559 -0
- package/contracts/slc-core/index.ts +5 -0
- package/contracts/token/Token.ts +399 -0
- package/contracts/token/index.ts +4 -0
- package/factories/contracts/governance/ExecutorsRegistry__factory.ts +1240 -0
- package/factories/contracts/governance/Governance__factory.ts +2328 -0
- package/factories/contracts/governance/NeutralsRegistry__factory.ts +1491 -0
- package/factories/contracts/governance/ParameterRegistry__factory.ts +834 -0
- package/factories/contracts/governance/index.ts +7 -0
- package/factories/contracts/index.ts +9 -0
- package/factories/contracts/interfaces/IExecutorsRegistry__factory.ts +428 -0
- package/factories/contracts/interfaces/IGovernance__factory.ts +153 -0
- package/factories/contracts/interfaces/INeutralsRegistry__factory.ts +527 -0
- package/factories/contracts/interfaces/IQParameters__factory.ts +101 -0
- package/factories/contracts/interfaces/ISLCCoreFactory__factory.ts +197 -0
- package/factories/contracts/interfaces/ISLCCore__factory.ts +227 -0
- package/factories/contracts/interfaces/IWrappedToken__factory.ts +221 -0
- package/factories/contracts/interfaces/index.ts +10 -0
- package/factories/contracts/libs/Errors__factory.ts +205 -0
- package/factories/contracts/libs/NeutralsSelection__factory.ts +103 -0
- package/factories/contracts/libs/index.ts +5 -0
- package/factories/contracts/mocks/MockGovernance__factory.ts +353 -0
- package/factories/contracts/mocks/MockNeutralsRegistry__factory.ts +730 -0
- package/factories/contracts/mocks/SimpleContract__factory.ts +110 -0
- package/factories/contracts/mocks/WrappedToken__factory.ts +433 -0
- package/factories/contracts/mocks/index.ts +7 -0
- package/factories/contracts/slc-core/SLCCoreFactory__factory.ts +568 -0
- package/factories/contracts/slc-core/SLCCore__factory.ts +373 -0
- package/factories/contracts/slc-core/index.ts +5 -0
- package/factories/contracts/token/Token__factory.ts +505 -0
- package/factories/contracts/token/index.ts +4 -0
- package/index.ts +38 -0
- package/package.json +25 -0
@@ -0,0 +1,397 @@
|
|
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 declare namespace SLCCore {
|
27
|
+
export type SLCCoreStorageStruct = {
|
28
|
+
governance: AddressLike;
|
29
|
+
slcCreator: AddressLike;
|
30
|
+
slcCreationTimestamp: BigNumberish;
|
31
|
+
legalDocumentLink: string;
|
32
|
+
data: BytesLike;
|
33
|
+
};
|
34
|
+
|
35
|
+
export type SLCCoreStorageStructOutput = [
|
36
|
+
governance: string,
|
37
|
+
slcCreator: string,
|
38
|
+
slcCreationTimestamp: bigint,
|
39
|
+
legalDocumentLink: string,
|
40
|
+
data: string
|
41
|
+
] & {
|
42
|
+
governance: string;
|
43
|
+
slcCreator: string;
|
44
|
+
slcCreationTimestamp: bigint;
|
45
|
+
legalDocumentLink: string;
|
46
|
+
data: string;
|
47
|
+
};
|
48
|
+
}
|
49
|
+
|
50
|
+
export interface SLCCoreInterface extends Interface {
|
51
|
+
getFunction(
|
52
|
+
nameOrSignature:
|
53
|
+
| "__SLCCore_init"
|
54
|
+
| "arbitraryExecute"
|
55
|
+
| "getSLCCoreStorage"
|
56
|
+
| "requestService"
|
57
|
+
| "supportsInterface"
|
58
|
+
): FunctionFragment;
|
59
|
+
|
60
|
+
getEvent(
|
61
|
+
nameOrSignatureOrTopic:
|
62
|
+
| "ArbitraryExecute"
|
63
|
+
| "Initialized"
|
64
|
+
| "SLCInitialized"
|
65
|
+
| "ServiceRequested"
|
66
|
+
): EventFragment;
|
67
|
+
|
68
|
+
encodeFunctionData(
|
69
|
+
functionFragment: "__SLCCore_init",
|
70
|
+
values: [AddressLike, AddressLike, string, BytesLike]
|
71
|
+
): string;
|
72
|
+
encodeFunctionData(
|
73
|
+
functionFragment: "arbitraryExecute",
|
74
|
+
values: [BigNumberish, AddressLike, BytesLike, BigNumberish]
|
75
|
+
): string;
|
76
|
+
encodeFunctionData(
|
77
|
+
functionFragment: "getSLCCoreStorage",
|
78
|
+
values?: undefined
|
79
|
+
): string;
|
80
|
+
encodeFunctionData(
|
81
|
+
functionFragment: "requestService",
|
82
|
+
values: [BigNumberish, BigNumberish, string, BytesLike]
|
83
|
+
): string;
|
84
|
+
encodeFunctionData(
|
85
|
+
functionFragment: "supportsInterface",
|
86
|
+
values: [BytesLike]
|
87
|
+
): string;
|
88
|
+
|
89
|
+
decodeFunctionResult(
|
90
|
+
functionFragment: "__SLCCore_init",
|
91
|
+
data: BytesLike
|
92
|
+
): Result;
|
93
|
+
decodeFunctionResult(
|
94
|
+
functionFragment: "arbitraryExecute",
|
95
|
+
data: BytesLike
|
96
|
+
): Result;
|
97
|
+
decodeFunctionResult(
|
98
|
+
functionFragment: "getSLCCoreStorage",
|
99
|
+
data: BytesLike
|
100
|
+
): Result;
|
101
|
+
decodeFunctionResult(
|
102
|
+
functionFragment: "requestService",
|
103
|
+
data: BytesLike
|
104
|
+
): Result;
|
105
|
+
decodeFunctionResult(
|
106
|
+
functionFragment: "supportsInterface",
|
107
|
+
data: BytesLike
|
108
|
+
): Result;
|
109
|
+
}
|
110
|
+
|
111
|
+
export namespace ArbitraryExecuteEvent {
|
112
|
+
export type InputTuple = [
|
113
|
+
operation: BigNumberish,
|
114
|
+
to: AddressLike,
|
115
|
+
data: BytesLike,
|
116
|
+
value: BigNumberish
|
117
|
+
];
|
118
|
+
export type OutputTuple = [
|
119
|
+
operation: bigint,
|
120
|
+
to: string,
|
121
|
+
data: string,
|
122
|
+
value: bigint
|
123
|
+
];
|
124
|
+
export interface OutputObject {
|
125
|
+
operation: bigint;
|
126
|
+
to: string;
|
127
|
+
data: string;
|
128
|
+
value: bigint;
|
129
|
+
}
|
130
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
131
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
132
|
+
export type Log = TypedEventLog<Event>;
|
133
|
+
export type LogDescription = TypedLogDescription<Event>;
|
134
|
+
}
|
135
|
+
|
136
|
+
export namespace InitializedEvent {
|
137
|
+
export type InputTuple = [version: BigNumberish];
|
138
|
+
export type OutputTuple = [version: bigint];
|
139
|
+
export interface OutputObject {
|
140
|
+
version: bigint;
|
141
|
+
}
|
142
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
143
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
144
|
+
export type Log = TypedEventLog<Event>;
|
145
|
+
export type LogDescription = TypedLogDescription<Event>;
|
146
|
+
}
|
147
|
+
|
148
|
+
export namespace SLCInitializedEvent {
|
149
|
+
export type InputTuple = [creator: AddressLike, legalDocumentLink: string];
|
150
|
+
export type OutputTuple = [creator: string, legalDocumentLink: string];
|
151
|
+
export interface OutputObject {
|
152
|
+
creator: string;
|
153
|
+
legalDocumentLink: string;
|
154
|
+
}
|
155
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
156
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
157
|
+
export type Log = TypedEventLog<Event>;
|
158
|
+
export type LogDescription = TypedLogDescription<Event>;
|
159
|
+
}
|
160
|
+
|
161
|
+
export namespace ServiceRequestedEvent {
|
162
|
+
export type InputTuple = [
|
163
|
+
requester: AddressLike,
|
164
|
+
serviceFee: BigNumberish,
|
165
|
+
neutralsNumber: BigNumberish,
|
166
|
+
additionalLink: string
|
167
|
+
];
|
168
|
+
export type OutputTuple = [
|
169
|
+
requester: string,
|
170
|
+
serviceFee: bigint,
|
171
|
+
neutralsNumber: bigint,
|
172
|
+
additionalLink: string
|
173
|
+
];
|
174
|
+
export interface OutputObject {
|
175
|
+
requester: string;
|
176
|
+
serviceFee: bigint;
|
177
|
+
neutralsNumber: bigint;
|
178
|
+
additionalLink: string;
|
179
|
+
}
|
180
|
+
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
181
|
+
export type Filter = TypedDeferredTopicFilter<Event>;
|
182
|
+
export type Log = TypedEventLog<Event>;
|
183
|
+
export type LogDescription = TypedLogDescription<Event>;
|
184
|
+
}
|
185
|
+
|
186
|
+
export interface SLCCore extends BaseContract {
|
187
|
+
contractName: "SLCCore";
|
188
|
+
|
189
|
+
connect(runner?: ContractRunner | null): SLCCore;
|
190
|
+
waitForDeployment(): Promise<this>;
|
191
|
+
|
192
|
+
interface: SLCCoreInterface;
|
193
|
+
|
194
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
195
|
+
event: TCEvent,
|
196
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
197
|
+
toBlock?: string | number | undefined
|
198
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
199
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
200
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
201
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
202
|
+
toBlock?: string | number | undefined
|
203
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
204
|
+
|
205
|
+
on<TCEvent extends TypedContractEvent>(
|
206
|
+
event: TCEvent,
|
207
|
+
listener: TypedListener<TCEvent>
|
208
|
+
): Promise<this>;
|
209
|
+
on<TCEvent extends TypedContractEvent>(
|
210
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
211
|
+
listener: TypedListener<TCEvent>
|
212
|
+
): Promise<this>;
|
213
|
+
|
214
|
+
once<TCEvent extends TypedContractEvent>(
|
215
|
+
event: TCEvent,
|
216
|
+
listener: TypedListener<TCEvent>
|
217
|
+
): Promise<this>;
|
218
|
+
once<TCEvent extends TypedContractEvent>(
|
219
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
220
|
+
listener: TypedListener<TCEvent>
|
221
|
+
): Promise<this>;
|
222
|
+
|
223
|
+
listeners<TCEvent extends TypedContractEvent>(
|
224
|
+
event: TCEvent
|
225
|
+
): Promise<Array<TypedListener<TCEvent>>>;
|
226
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
227
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(
|
228
|
+
event?: TCEvent
|
229
|
+
): Promise<this>;
|
230
|
+
|
231
|
+
__SLCCore_init: TypedContractMethod<
|
232
|
+
[
|
233
|
+
creator_: AddressLike,
|
234
|
+
governance_: AddressLike,
|
235
|
+
legalDocumentLink_: string,
|
236
|
+
data_: BytesLike
|
237
|
+
],
|
238
|
+
[void],
|
239
|
+
"nonpayable"
|
240
|
+
>;
|
241
|
+
|
242
|
+
arbitraryExecute: TypedContractMethod<
|
243
|
+
[
|
244
|
+
operation_: BigNumberish,
|
245
|
+
to_: AddressLike,
|
246
|
+
data_: BytesLike,
|
247
|
+
value_: BigNumberish
|
248
|
+
],
|
249
|
+
[boolean],
|
250
|
+
"nonpayable"
|
251
|
+
>;
|
252
|
+
|
253
|
+
getSLCCoreStorage: TypedContractMethod<
|
254
|
+
[],
|
255
|
+
[SLCCore.SLCCoreStorageStructOutput],
|
256
|
+
"view"
|
257
|
+
>;
|
258
|
+
|
259
|
+
requestService: TypedContractMethod<
|
260
|
+
[
|
261
|
+
serviceFee_: BigNumberish,
|
262
|
+
neutralsNumber_: BigNumberish,
|
263
|
+
additionalLink_: string,
|
264
|
+
data_: BytesLike
|
265
|
+
],
|
266
|
+
[boolean],
|
267
|
+
"payable"
|
268
|
+
>;
|
269
|
+
|
270
|
+
supportsInterface: TypedContractMethod<
|
271
|
+
[interfaceId: BytesLike],
|
272
|
+
[boolean],
|
273
|
+
"view"
|
274
|
+
>;
|
275
|
+
|
276
|
+
getFunction<T extends ContractMethod = ContractMethod>(
|
277
|
+
key: string | FunctionFragment
|
278
|
+
): T;
|
279
|
+
|
280
|
+
getFunction(
|
281
|
+
nameOrSignature: "__SLCCore_init"
|
282
|
+
): TypedContractMethod<
|
283
|
+
[
|
284
|
+
creator_: AddressLike,
|
285
|
+
governance_: AddressLike,
|
286
|
+
legalDocumentLink_: string,
|
287
|
+
data_: BytesLike
|
288
|
+
],
|
289
|
+
[void],
|
290
|
+
"nonpayable"
|
291
|
+
>;
|
292
|
+
getFunction(
|
293
|
+
nameOrSignature: "arbitraryExecute"
|
294
|
+
): TypedContractMethod<
|
295
|
+
[
|
296
|
+
operation_: BigNumberish,
|
297
|
+
to_: AddressLike,
|
298
|
+
data_: BytesLike,
|
299
|
+
value_: BigNumberish
|
300
|
+
],
|
301
|
+
[boolean],
|
302
|
+
"nonpayable"
|
303
|
+
>;
|
304
|
+
getFunction(
|
305
|
+
nameOrSignature: "getSLCCoreStorage"
|
306
|
+
): TypedContractMethod<[], [SLCCore.SLCCoreStorageStructOutput], "view">;
|
307
|
+
getFunction(
|
308
|
+
nameOrSignature: "requestService"
|
309
|
+
): TypedContractMethod<
|
310
|
+
[
|
311
|
+
serviceFee_: BigNumberish,
|
312
|
+
neutralsNumber_: BigNumberish,
|
313
|
+
additionalLink_: string,
|
314
|
+
data_: BytesLike
|
315
|
+
],
|
316
|
+
[boolean],
|
317
|
+
"payable"
|
318
|
+
>;
|
319
|
+
getFunction(
|
320
|
+
nameOrSignature: "supportsInterface"
|
321
|
+
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
|
322
|
+
|
323
|
+
getEvent(
|
324
|
+
key: "ArbitraryExecute"
|
325
|
+
): TypedContractEvent<
|
326
|
+
ArbitraryExecuteEvent.InputTuple,
|
327
|
+
ArbitraryExecuteEvent.OutputTuple,
|
328
|
+
ArbitraryExecuteEvent.OutputObject
|
329
|
+
>;
|
330
|
+
getEvent(
|
331
|
+
key: "Initialized"
|
332
|
+
): TypedContractEvent<
|
333
|
+
InitializedEvent.InputTuple,
|
334
|
+
InitializedEvent.OutputTuple,
|
335
|
+
InitializedEvent.OutputObject
|
336
|
+
>;
|
337
|
+
getEvent(
|
338
|
+
key: "SLCInitialized"
|
339
|
+
): TypedContractEvent<
|
340
|
+
SLCInitializedEvent.InputTuple,
|
341
|
+
SLCInitializedEvent.OutputTuple,
|
342
|
+
SLCInitializedEvent.OutputObject
|
343
|
+
>;
|
344
|
+
getEvent(
|
345
|
+
key: "ServiceRequested"
|
346
|
+
): TypedContractEvent<
|
347
|
+
ServiceRequestedEvent.InputTuple,
|
348
|
+
ServiceRequestedEvent.OutputTuple,
|
349
|
+
ServiceRequestedEvent.OutputObject
|
350
|
+
>;
|
351
|
+
|
352
|
+
filters: {
|
353
|
+
"ArbitraryExecute(uint8,address,bytes,uint256)": TypedContractEvent<
|
354
|
+
ArbitraryExecuteEvent.InputTuple,
|
355
|
+
ArbitraryExecuteEvent.OutputTuple,
|
356
|
+
ArbitraryExecuteEvent.OutputObject
|
357
|
+
>;
|
358
|
+
ArbitraryExecute: TypedContractEvent<
|
359
|
+
ArbitraryExecuteEvent.InputTuple,
|
360
|
+
ArbitraryExecuteEvent.OutputTuple,
|
361
|
+
ArbitraryExecuteEvent.OutputObject
|
362
|
+
>;
|
363
|
+
|
364
|
+
"Initialized(uint64)": TypedContractEvent<
|
365
|
+
InitializedEvent.InputTuple,
|
366
|
+
InitializedEvent.OutputTuple,
|
367
|
+
InitializedEvent.OutputObject
|
368
|
+
>;
|
369
|
+
Initialized: TypedContractEvent<
|
370
|
+
InitializedEvent.InputTuple,
|
371
|
+
InitializedEvent.OutputTuple,
|
372
|
+
InitializedEvent.OutputObject
|
373
|
+
>;
|
374
|
+
|
375
|
+
"SLCInitialized(address,string)": TypedContractEvent<
|
376
|
+
SLCInitializedEvent.InputTuple,
|
377
|
+
SLCInitializedEvent.OutputTuple,
|
378
|
+
SLCInitializedEvent.OutputObject
|
379
|
+
>;
|
380
|
+
SLCInitialized: TypedContractEvent<
|
381
|
+
SLCInitializedEvent.InputTuple,
|
382
|
+
SLCInitializedEvent.OutputTuple,
|
383
|
+
SLCInitializedEvent.OutputObject
|
384
|
+
>;
|
385
|
+
|
386
|
+
"ServiceRequested(address,uint256,uint256,string)": TypedContractEvent<
|
387
|
+
ServiceRequestedEvent.InputTuple,
|
388
|
+
ServiceRequestedEvent.OutputTuple,
|
389
|
+
ServiceRequestedEvent.OutputObject
|
390
|
+
>;
|
391
|
+
ServiceRequested: TypedContractEvent<
|
392
|
+
ServiceRequestedEvent.InputTuple,
|
393
|
+
ServiceRequestedEvent.OutputTuple,
|
394
|
+
ServiceRequestedEvent.OutputObject
|
395
|
+
>;
|
396
|
+
};
|
397
|
+
}
|