@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.
Files changed (58) hide show
  1. package/common.ts +131 -0
  2. package/constants.ts +34 -0
  3. package/contracts/governance/ExecutorsRegistry.ts +1249 -0
  4. package/contracts/governance/Governance.ts +1740 -0
  5. package/contracts/governance/NeutralsRegistry.ts +1393 -0
  6. package/contracts/governance/ParameterRegistry.ts +832 -0
  7. package/contracts/governance/index.ts +7 -0
  8. package/contracts/index.ts +15 -0
  9. package/contracts/interfaces/IExecutorsRegistry.ts +601 -0
  10. package/contracts/interfaces/IGovernance.ts +215 -0
  11. package/contracts/interfaces/INeutralsRegistry.ts +624 -0
  12. package/contracts/interfaces/IQParameters.ts +109 -0
  13. package/contracts/interfaces/ISLCCore.ts +289 -0
  14. package/contracts/interfaces/ISLCCoreFactory.ts +217 -0
  15. package/contracts/interfaces/IWrappedToken.ts +272 -0
  16. package/contracts/interfaces/index.ts +10 -0
  17. package/contracts/libs/Errors.ts +71 -0
  18. package/contracts/libs/NeutralsSelection.ts +71 -0
  19. package/contracts/libs/index.ts +5 -0
  20. package/contracts/mocks/MockGovernance.ts +389 -0
  21. package/contracts/mocks/MockNeutralsRegistry.ts +791 -0
  22. package/contracts/mocks/SimpleContract.ts +110 -0
  23. package/contracts/mocks/WrappedToken.ts +334 -0
  24. package/contracts/mocks/index.ts +7 -0
  25. package/contracts/slc-core/SLCCore.ts +397 -0
  26. package/contracts/slc-core/SLCCoreFactory.ts +559 -0
  27. package/contracts/slc-core/index.ts +5 -0
  28. package/contracts/token/Token.ts +399 -0
  29. package/contracts/token/index.ts +4 -0
  30. package/factories/contracts/governance/ExecutorsRegistry__factory.ts +1240 -0
  31. package/factories/contracts/governance/Governance__factory.ts +2328 -0
  32. package/factories/contracts/governance/NeutralsRegistry__factory.ts +1491 -0
  33. package/factories/contracts/governance/ParameterRegistry__factory.ts +834 -0
  34. package/factories/contracts/governance/index.ts +7 -0
  35. package/factories/contracts/index.ts +9 -0
  36. package/factories/contracts/interfaces/IExecutorsRegistry__factory.ts +428 -0
  37. package/factories/contracts/interfaces/IGovernance__factory.ts +153 -0
  38. package/factories/contracts/interfaces/INeutralsRegistry__factory.ts +527 -0
  39. package/factories/contracts/interfaces/IQParameters__factory.ts +101 -0
  40. package/factories/contracts/interfaces/ISLCCoreFactory__factory.ts +197 -0
  41. package/factories/contracts/interfaces/ISLCCore__factory.ts +227 -0
  42. package/factories/contracts/interfaces/IWrappedToken__factory.ts +221 -0
  43. package/factories/contracts/interfaces/index.ts +10 -0
  44. package/factories/contracts/libs/Errors__factory.ts +205 -0
  45. package/factories/contracts/libs/NeutralsSelection__factory.ts +103 -0
  46. package/factories/contracts/libs/index.ts +5 -0
  47. package/factories/contracts/mocks/MockGovernance__factory.ts +353 -0
  48. package/factories/contracts/mocks/MockNeutralsRegistry__factory.ts +730 -0
  49. package/factories/contracts/mocks/SimpleContract__factory.ts +110 -0
  50. package/factories/contracts/mocks/WrappedToken__factory.ts +433 -0
  51. package/factories/contracts/mocks/index.ts +7 -0
  52. package/factories/contracts/slc-core/SLCCoreFactory__factory.ts +568 -0
  53. package/factories/contracts/slc-core/SLCCore__factory.ts +373 -0
  54. package/factories/contracts/slc-core/index.ts +5 -0
  55. package/factories/contracts/token/Token__factory.ts +505 -0
  56. package/factories/contracts/token/index.ts +4 -0
  57. package/index.ts +38 -0
  58. package/package.json +25 -0
@@ -0,0 +1,110 @@
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
+ ContractRunner,
12
+ ContractMethod,
13
+ Listener,
14
+ } from "ethers";
15
+ import type {
16
+ TypedContractEvent,
17
+ TypedDeferredTopicFilter,
18
+ TypedEventLog,
19
+ TypedListener,
20
+ TypedContractMethod,
21
+ } from "../../common";
22
+
23
+ export interface SimpleContractInterface extends Interface {
24
+ getFunction(
25
+ nameOrSignature: "getValue" | "setValue" | "value"
26
+ ): FunctionFragment;
27
+
28
+ encodeFunctionData(functionFragment: "getValue", values?: undefined): string;
29
+ encodeFunctionData(
30
+ functionFragment: "setValue",
31
+ values: [BigNumberish]
32
+ ): string;
33
+ encodeFunctionData(functionFragment: "value", values?: undefined): string;
34
+
35
+ decodeFunctionResult(functionFragment: "getValue", data: BytesLike): Result;
36
+ decodeFunctionResult(functionFragment: "setValue", data: BytesLike): Result;
37
+ decodeFunctionResult(functionFragment: "value", data: BytesLike): Result;
38
+ }
39
+
40
+ export interface SimpleContract extends BaseContract {
41
+ contractName: "SimpleContract";
42
+
43
+ connect(runner?: ContractRunner | null): SimpleContract;
44
+ waitForDeployment(): Promise<this>;
45
+
46
+ interface: SimpleContractInterface;
47
+
48
+ queryFilter<TCEvent extends TypedContractEvent>(
49
+ event: TCEvent,
50
+ fromBlockOrBlockhash?: string | number | undefined,
51
+ toBlock?: string | number | undefined
52
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
53
+ queryFilter<TCEvent extends TypedContractEvent>(
54
+ filter: TypedDeferredTopicFilter<TCEvent>,
55
+ fromBlockOrBlockhash?: string | number | undefined,
56
+ toBlock?: string | number | undefined
57
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
58
+
59
+ on<TCEvent extends TypedContractEvent>(
60
+ event: TCEvent,
61
+ listener: TypedListener<TCEvent>
62
+ ): Promise<this>;
63
+ on<TCEvent extends TypedContractEvent>(
64
+ filter: TypedDeferredTopicFilter<TCEvent>,
65
+ listener: TypedListener<TCEvent>
66
+ ): Promise<this>;
67
+
68
+ once<TCEvent extends TypedContractEvent>(
69
+ event: TCEvent,
70
+ listener: TypedListener<TCEvent>
71
+ ): Promise<this>;
72
+ once<TCEvent extends TypedContractEvent>(
73
+ filter: TypedDeferredTopicFilter<TCEvent>,
74
+ listener: TypedListener<TCEvent>
75
+ ): Promise<this>;
76
+
77
+ listeners<TCEvent extends TypedContractEvent>(
78
+ event: TCEvent
79
+ ): Promise<Array<TypedListener<TCEvent>>>;
80
+ listeners(eventName?: string): Promise<Array<Listener>>;
81
+ removeAllListeners<TCEvent extends TypedContractEvent>(
82
+ event?: TCEvent
83
+ ): Promise<this>;
84
+
85
+ getValue: TypedContractMethod<[], [bigint], "view">;
86
+
87
+ setValue: TypedContractMethod<
88
+ [newValue_: BigNumberish],
89
+ [void],
90
+ "nonpayable"
91
+ >;
92
+
93
+ value: TypedContractMethod<[], [bigint], "view">;
94
+
95
+ getFunction<T extends ContractMethod = ContractMethod>(
96
+ key: string | FunctionFragment
97
+ ): T;
98
+
99
+ getFunction(
100
+ nameOrSignature: "getValue"
101
+ ): TypedContractMethod<[], [bigint], "view">;
102
+ getFunction(
103
+ nameOrSignature: "setValue"
104
+ ): TypedContractMethod<[newValue_: BigNumberish], [void], "nonpayable">;
105
+ getFunction(
106
+ nameOrSignature: "value"
107
+ ): TypedContractMethod<[], [bigint], "view">;
108
+
109
+ filters: {};
110
+ }
@@ -0,0 +1,334 @@
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 WrappedTokenInterface extends Interface {
27
+ getFunction(
28
+ nameOrSignature:
29
+ | "allowance"
30
+ | "approve"
31
+ | "balanceOf"
32
+ | "burn"
33
+ | "decimals"
34
+ | "deposit"
35
+ | "mint"
36
+ | "name"
37
+ | "symbol"
38
+ | "totalSupply"
39
+ | "transfer"
40
+ | "transferFrom"
41
+ ): FunctionFragment;
42
+
43
+ getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment;
44
+
45
+ encodeFunctionData(
46
+ functionFragment: "allowance",
47
+ values: [AddressLike, AddressLike]
48
+ ): string;
49
+ encodeFunctionData(
50
+ functionFragment: "approve",
51
+ values: [AddressLike, BigNumberish]
52
+ ): string;
53
+ encodeFunctionData(
54
+ functionFragment: "balanceOf",
55
+ values: [AddressLike]
56
+ ): string;
57
+ encodeFunctionData(
58
+ functionFragment: "burn",
59
+ values: [AddressLike, BigNumberish]
60
+ ): string;
61
+ encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
62
+ encodeFunctionData(functionFragment: "deposit", values?: undefined): string;
63
+ encodeFunctionData(
64
+ functionFragment: "mint",
65
+ values: [AddressLike, BigNumberish]
66
+ ): string;
67
+ encodeFunctionData(functionFragment: "name", values?: undefined): string;
68
+ encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
69
+ encodeFunctionData(
70
+ functionFragment: "totalSupply",
71
+ values?: undefined
72
+ ): string;
73
+ encodeFunctionData(
74
+ functionFragment: "transfer",
75
+ values: [AddressLike, BigNumberish]
76
+ ): string;
77
+ encodeFunctionData(
78
+ functionFragment: "transferFrom",
79
+ values: [AddressLike, AddressLike, BigNumberish]
80
+ ): string;
81
+
82
+ decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
83
+ decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
84
+ decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
85
+ decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
86
+ decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
87
+ decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
88
+ decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result;
89
+ decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
90
+ decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
91
+ decodeFunctionResult(
92
+ functionFragment: "totalSupply",
93
+ data: BytesLike
94
+ ): Result;
95
+ decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
96
+ decodeFunctionResult(
97
+ functionFragment: "transferFrom",
98
+ data: BytesLike
99
+ ): Result;
100
+ }
101
+
102
+ export namespace ApprovalEvent {
103
+ export type InputTuple = [
104
+ owner: AddressLike,
105
+ spender: AddressLike,
106
+ value: BigNumberish
107
+ ];
108
+ export type OutputTuple = [owner: string, spender: string, value: bigint];
109
+ export interface OutputObject {
110
+ owner: string;
111
+ spender: string;
112
+ value: bigint;
113
+ }
114
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
115
+ export type Filter = TypedDeferredTopicFilter<Event>;
116
+ export type Log = TypedEventLog<Event>;
117
+ export type LogDescription = TypedLogDescription<Event>;
118
+ }
119
+
120
+ export namespace TransferEvent {
121
+ export type InputTuple = [
122
+ from: AddressLike,
123
+ to: AddressLike,
124
+ value: BigNumberish
125
+ ];
126
+ export type OutputTuple = [from: string, to: string, value: bigint];
127
+ export interface OutputObject {
128
+ from: string;
129
+ to: string;
130
+ value: bigint;
131
+ }
132
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
133
+ export type Filter = TypedDeferredTopicFilter<Event>;
134
+ export type Log = TypedEventLog<Event>;
135
+ export type LogDescription = TypedLogDescription<Event>;
136
+ }
137
+
138
+ export interface WrappedToken extends BaseContract {
139
+ contractName: "WrappedToken";
140
+
141
+ connect(runner?: ContractRunner | null): WrappedToken;
142
+ waitForDeployment(): Promise<this>;
143
+
144
+ interface: WrappedTokenInterface;
145
+
146
+ queryFilter<TCEvent extends TypedContractEvent>(
147
+ event: TCEvent,
148
+ fromBlockOrBlockhash?: string | number | undefined,
149
+ toBlock?: string | number | undefined
150
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
151
+ queryFilter<TCEvent extends TypedContractEvent>(
152
+ filter: TypedDeferredTopicFilter<TCEvent>,
153
+ fromBlockOrBlockhash?: string | number | undefined,
154
+ toBlock?: string | number | undefined
155
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
156
+
157
+ on<TCEvent extends TypedContractEvent>(
158
+ event: TCEvent,
159
+ listener: TypedListener<TCEvent>
160
+ ): Promise<this>;
161
+ on<TCEvent extends TypedContractEvent>(
162
+ filter: TypedDeferredTopicFilter<TCEvent>,
163
+ listener: TypedListener<TCEvent>
164
+ ): Promise<this>;
165
+
166
+ once<TCEvent extends TypedContractEvent>(
167
+ event: TCEvent,
168
+ listener: TypedListener<TCEvent>
169
+ ): Promise<this>;
170
+ once<TCEvent extends TypedContractEvent>(
171
+ filter: TypedDeferredTopicFilter<TCEvent>,
172
+ listener: TypedListener<TCEvent>
173
+ ): Promise<this>;
174
+
175
+ listeners<TCEvent extends TypedContractEvent>(
176
+ event: TCEvent
177
+ ): Promise<Array<TypedListener<TCEvent>>>;
178
+ listeners(eventName?: string): Promise<Array<Listener>>;
179
+ removeAllListeners<TCEvent extends TypedContractEvent>(
180
+ event?: TCEvent
181
+ ): Promise<this>;
182
+
183
+ allowance: TypedContractMethod<
184
+ [owner: AddressLike, spender: AddressLike],
185
+ [bigint],
186
+ "view"
187
+ >;
188
+
189
+ approve: TypedContractMethod<
190
+ [spender: AddressLike, value: BigNumberish],
191
+ [boolean],
192
+ "nonpayable"
193
+ >;
194
+
195
+ balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">;
196
+
197
+ burn: TypedContractMethod<
198
+ [to_: AddressLike, amount_: BigNumberish],
199
+ [void],
200
+ "nonpayable"
201
+ >;
202
+
203
+ decimals: TypedContractMethod<[], [bigint], "view">;
204
+
205
+ deposit: TypedContractMethod<[], [boolean], "payable">;
206
+
207
+ mint: TypedContractMethod<
208
+ [to_: AddressLike, amount_: BigNumberish],
209
+ [void],
210
+ "nonpayable"
211
+ >;
212
+
213
+ name: TypedContractMethod<[], [string], "view">;
214
+
215
+ symbol: TypedContractMethod<[], [string], "view">;
216
+
217
+ totalSupply: TypedContractMethod<[], [bigint], "view">;
218
+
219
+ transfer: TypedContractMethod<
220
+ [to: AddressLike, value: BigNumberish],
221
+ [boolean],
222
+ "nonpayable"
223
+ >;
224
+
225
+ transferFrom: TypedContractMethod<
226
+ [from: AddressLike, to: AddressLike, value: BigNumberish],
227
+ [boolean],
228
+ "nonpayable"
229
+ >;
230
+
231
+ getFunction<T extends ContractMethod = ContractMethod>(
232
+ key: string | FunctionFragment
233
+ ): T;
234
+
235
+ getFunction(
236
+ nameOrSignature: "allowance"
237
+ ): TypedContractMethod<
238
+ [owner: AddressLike, spender: AddressLike],
239
+ [bigint],
240
+ "view"
241
+ >;
242
+ getFunction(
243
+ nameOrSignature: "approve"
244
+ ): TypedContractMethod<
245
+ [spender: AddressLike, value: BigNumberish],
246
+ [boolean],
247
+ "nonpayable"
248
+ >;
249
+ getFunction(
250
+ nameOrSignature: "balanceOf"
251
+ ): TypedContractMethod<[account: AddressLike], [bigint], "view">;
252
+ getFunction(
253
+ nameOrSignature: "burn"
254
+ ): TypedContractMethod<
255
+ [to_: AddressLike, amount_: BigNumberish],
256
+ [void],
257
+ "nonpayable"
258
+ >;
259
+ getFunction(
260
+ nameOrSignature: "decimals"
261
+ ): TypedContractMethod<[], [bigint], "view">;
262
+ getFunction(
263
+ nameOrSignature: "deposit"
264
+ ): TypedContractMethod<[], [boolean], "payable">;
265
+ getFunction(
266
+ nameOrSignature: "mint"
267
+ ): TypedContractMethod<
268
+ [to_: AddressLike, amount_: BigNumberish],
269
+ [void],
270
+ "nonpayable"
271
+ >;
272
+ getFunction(
273
+ nameOrSignature: "name"
274
+ ): TypedContractMethod<[], [string], "view">;
275
+ getFunction(
276
+ nameOrSignature: "symbol"
277
+ ): TypedContractMethod<[], [string], "view">;
278
+ getFunction(
279
+ nameOrSignature: "totalSupply"
280
+ ): TypedContractMethod<[], [bigint], "view">;
281
+ getFunction(
282
+ nameOrSignature: "transfer"
283
+ ): TypedContractMethod<
284
+ [to: AddressLike, value: BigNumberish],
285
+ [boolean],
286
+ "nonpayable"
287
+ >;
288
+ getFunction(
289
+ nameOrSignature: "transferFrom"
290
+ ): TypedContractMethod<
291
+ [from: AddressLike, to: AddressLike, value: BigNumberish],
292
+ [boolean],
293
+ "nonpayable"
294
+ >;
295
+
296
+ getEvent(
297
+ key: "Approval"
298
+ ): TypedContractEvent<
299
+ ApprovalEvent.InputTuple,
300
+ ApprovalEvent.OutputTuple,
301
+ ApprovalEvent.OutputObject
302
+ >;
303
+ getEvent(
304
+ key: "Transfer"
305
+ ): TypedContractEvent<
306
+ TransferEvent.InputTuple,
307
+ TransferEvent.OutputTuple,
308
+ TransferEvent.OutputObject
309
+ >;
310
+
311
+ filters: {
312
+ "Approval(address,address,uint256)": TypedContractEvent<
313
+ ApprovalEvent.InputTuple,
314
+ ApprovalEvent.OutputTuple,
315
+ ApprovalEvent.OutputObject
316
+ >;
317
+ Approval: TypedContractEvent<
318
+ ApprovalEvent.InputTuple,
319
+ ApprovalEvent.OutputTuple,
320
+ ApprovalEvent.OutputObject
321
+ >;
322
+
323
+ "Transfer(address,address,uint256)": TypedContractEvent<
324
+ TransferEvent.InputTuple,
325
+ TransferEvent.OutputTuple,
326
+ TransferEvent.OutputObject
327
+ >;
328
+ Transfer: TypedContractEvent<
329
+ TransferEvent.InputTuple,
330
+ TransferEvent.OutputTuple,
331
+ TransferEvent.OutputObject
332
+ >;
333
+ };
334
+ }
@@ -0,0 +1,7 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export type { MockGovernance } from "./MockGovernance";
5
+ export type { MockNeutralsRegistry } from "./MockNeutralsRegistry";
6
+ export type { SimpleContract } from "./SimpleContract";
7
+ export type { WrappedToken } from "./WrappedToken";