@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,197 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Interface, type ContractRunner } from "ethers";
6
+ import type {
7
+ ISLCCoreFactory,
8
+ ISLCCoreFactoryInterface,
9
+ } from "../../../contracts/interfaces/ISLCCoreFactory";
10
+
11
+ const _abi = [
12
+ {
13
+ inputs: [
14
+ {
15
+ internalType: "string",
16
+ name: "legalDocumentLink_",
17
+ type: "string",
18
+ },
19
+ ],
20
+ name: "deploySLC",
21
+ outputs: [
22
+ {
23
+ internalType: "address",
24
+ name: "",
25
+ type: "address",
26
+ },
27
+ ],
28
+ stateMutability: "nonpayable",
29
+ type: "function",
30
+ },
31
+ {
32
+ inputs: [
33
+ {
34
+ internalType: "address",
35
+ name: "governance_",
36
+ type: "address",
37
+ },
38
+ {
39
+ internalType: "string",
40
+ name: "legalDocumentLink_",
41
+ type: "string",
42
+ },
43
+ ],
44
+ name: "deploySLCWithGovernance",
45
+ outputs: [
46
+ {
47
+ internalType: "address",
48
+ name: "",
49
+ type: "address",
50
+ },
51
+ ],
52
+ stateMutability: "nonpayable",
53
+ type: "function",
54
+ },
55
+ {
56
+ inputs: [
57
+ {
58
+ internalType: "uint256",
59
+ name: "offset_",
60
+ type: "uint256",
61
+ },
62
+ {
63
+ internalType: "uint256",
64
+ name: "limit_",
65
+ type: "uint256",
66
+ },
67
+ ],
68
+ name: "getDeployedSLCs",
69
+ outputs: [
70
+ {
71
+ internalType: "address[]",
72
+ name: "",
73
+ type: "address[]",
74
+ },
75
+ ],
76
+ stateMutability: "view",
77
+ type: "function",
78
+ },
79
+ {
80
+ inputs: [
81
+ {
82
+ internalType: "address",
83
+ name: "slcDeployer_",
84
+ type: "address",
85
+ },
86
+ {
87
+ internalType: "uint256",
88
+ name: "nonce_",
89
+ type: "uint256",
90
+ },
91
+ ],
92
+ name: "getSalt",
93
+ outputs: [
94
+ {
95
+ internalType: "bytes32",
96
+ name: "",
97
+ type: "bytes32",
98
+ },
99
+ ],
100
+ stateMutability: "pure",
101
+ type: "function",
102
+ },
103
+ {
104
+ inputs: [
105
+ {
106
+ internalType: "address",
107
+ name: "toCheck_",
108
+ type: "address",
109
+ },
110
+ ],
111
+ name: "isSLCCore",
112
+ outputs: [
113
+ {
114
+ internalType: "bool",
115
+ name: "",
116
+ type: "bool",
117
+ },
118
+ ],
119
+ stateMutability: "view",
120
+ type: "function",
121
+ },
122
+ {
123
+ inputs: [
124
+ {
125
+ internalType: "address",
126
+ name: "owner_",
127
+ type: "address",
128
+ },
129
+ ],
130
+ name: "nonces",
131
+ outputs: [
132
+ {
133
+ internalType: "uint256",
134
+ name: "",
135
+ type: "uint256",
136
+ },
137
+ ],
138
+ stateMutability: "view",
139
+ type: "function",
140
+ },
141
+ {
142
+ inputs: [
143
+ {
144
+ internalType: "address",
145
+ name: "slcDeployer_",
146
+ type: "address",
147
+ },
148
+ {
149
+ internalType: "uint256",
150
+ name: "nonce_",
151
+ type: "uint256",
152
+ },
153
+ ],
154
+ name: "predictSLCAddress",
155
+ outputs: [
156
+ {
157
+ internalType: "address",
158
+ name: "",
159
+ type: "address",
160
+ },
161
+ ],
162
+ stateMutability: "view",
163
+ type: "function",
164
+ },
165
+ {
166
+ inputs: [
167
+ {
168
+ internalType: "bytes4",
169
+ name: "interfaceId",
170
+ type: "bytes4",
171
+ },
172
+ ],
173
+ name: "supportsInterface",
174
+ outputs: [
175
+ {
176
+ internalType: "bool",
177
+ name: "",
178
+ type: "bool",
179
+ },
180
+ ],
181
+ stateMutability: "view",
182
+ type: "function",
183
+ },
184
+ ] as const;
185
+
186
+ export class ISLCCoreFactory__factory {
187
+ static readonly abi = _abi;
188
+ static createInterface(): ISLCCoreFactoryInterface {
189
+ return new Interface(_abi) as ISLCCoreFactoryInterface;
190
+ }
191
+ static connect(
192
+ address: string,
193
+ runner?: ContractRunner | null
194
+ ): ISLCCoreFactory {
195
+ return new Contract(address, _abi, runner) as unknown as ISLCCoreFactory;
196
+ }
197
+ }
@@ -0,0 +1,227 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Interface, type ContractRunner } from "ethers";
6
+ import type {
7
+ ISLCCore,
8
+ ISLCCoreInterface,
9
+ } from "../../../contracts/interfaces/ISLCCore";
10
+
11
+ const _abi = [
12
+ {
13
+ inputs: [
14
+ {
15
+ internalType: "enum IGovernance.OperationType",
16
+ name: "operation",
17
+ type: "uint8",
18
+ },
19
+ {
20
+ internalType: "address",
21
+ name: "to",
22
+ type: "address",
23
+ },
24
+ {
25
+ internalType: "bytes",
26
+ name: "data",
27
+ type: "bytes",
28
+ },
29
+ {
30
+ internalType: "uint256",
31
+ name: "value",
32
+ type: "uint256",
33
+ },
34
+ ],
35
+ name: "FailedToExecuteArbitraryCall",
36
+ type: "error",
37
+ },
38
+ {
39
+ inputs: [
40
+ {
41
+ internalType: "address",
42
+ name: "sender",
43
+ type: "address",
44
+ },
45
+ ],
46
+ name: "NotGovernance",
47
+ type: "error",
48
+ },
49
+ {
50
+ anonymous: false,
51
+ inputs: [
52
+ {
53
+ indexed: false,
54
+ internalType: "enum IGovernance.OperationType",
55
+ name: "operation",
56
+ type: "uint8",
57
+ },
58
+ {
59
+ indexed: false,
60
+ internalType: "address",
61
+ name: "to",
62
+ type: "address",
63
+ },
64
+ {
65
+ indexed: false,
66
+ internalType: "bytes",
67
+ name: "data",
68
+ type: "bytes",
69
+ },
70
+ {
71
+ indexed: false,
72
+ internalType: "uint256",
73
+ name: "value",
74
+ type: "uint256",
75
+ },
76
+ ],
77
+ name: "ArbitraryExecute",
78
+ type: "event",
79
+ },
80
+ {
81
+ anonymous: false,
82
+ inputs: [
83
+ {
84
+ indexed: true,
85
+ internalType: "address",
86
+ name: "creator",
87
+ type: "address",
88
+ },
89
+ {
90
+ indexed: false,
91
+ internalType: "string",
92
+ name: "legalDocumentLink",
93
+ type: "string",
94
+ },
95
+ ],
96
+ name: "SLCInitialized",
97
+ type: "event",
98
+ },
99
+ {
100
+ anonymous: false,
101
+ inputs: [
102
+ {
103
+ indexed: true,
104
+ internalType: "address",
105
+ name: "requester",
106
+ type: "address",
107
+ },
108
+ {
109
+ indexed: true,
110
+ internalType: "uint256",
111
+ name: "serviceFee",
112
+ type: "uint256",
113
+ },
114
+ {
115
+ indexed: true,
116
+ internalType: "uint256",
117
+ name: "neutralsNumber",
118
+ type: "uint256",
119
+ },
120
+ {
121
+ indexed: false,
122
+ internalType: "string",
123
+ name: "additionalLink",
124
+ type: "string",
125
+ },
126
+ ],
127
+ name: "ServiceRequested",
128
+ type: "event",
129
+ },
130
+ {
131
+ inputs: [
132
+ {
133
+ internalType: "enum IGovernance.OperationType",
134
+ name: "operation_",
135
+ type: "uint8",
136
+ },
137
+ {
138
+ internalType: "address",
139
+ name: "to_",
140
+ type: "address",
141
+ },
142
+ {
143
+ internalType: "bytes",
144
+ name: "data_",
145
+ type: "bytes",
146
+ },
147
+ {
148
+ internalType: "uint256",
149
+ name: "value_",
150
+ type: "uint256",
151
+ },
152
+ ],
153
+ name: "arbitraryExecute",
154
+ outputs: [
155
+ {
156
+ internalType: "bool",
157
+ name: "",
158
+ type: "bool",
159
+ },
160
+ ],
161
+ stateMutability: "nonpayable",
162
+ type: "function",
163
+ },
164
+ {
165
+ inputs: [
166
+ {
167
+ internalType: "uint256",
168
+ name: "serviceFee_",
169
+ type: "uint256",
170
+ },
171
+ {
172
+ internalType: "uint256",
173
+ name: "neutralsNumber_",
174
+ type: "uint256",
175
+ },
176
+ {
177
+ internalType: "string",
178
+ name: "additionalLink_",
179
+ type: "string",
180
+ },
181
+ {
182
+ internalType: "bytes",
183
+ name: "data_",
184
+ type: "bytes",
185
+ },
186
+ ],
187
+ name: "requestService",
188
+ outputs: [
189
+ {
190
+ internalType: "bool",
191
+ name: "",
192
+ type: "bool",
193
+ },
194
+ ],
195
+ stateMutability: "payable",
196
+ type: "function",
197
+ },
198
+ {
199
+ inputs: [
200
+ {
201
+ internalType: "bytes4",
202
+ name: "interfaceId",
203
+ type: "bytes4",
204
+ },
205
+ ],
206
+ name: "supportsInterface",
207
+ outputs: [
208
+ {
209
+ internalType: "bool",
210
+ name: "",
211
+ type: "bool",
212
+ },
213
+ ],
214
+ stateMutability: "view",
215
+ type: "function",
216
+ },
217
+ ] as const;
218
+
219
+ export class ISLCCore__factory {
220
+ static readonly abi = _abi;
221
+ static createInterface(): ISLCCoreInterface {
222
+ return new Interface(_abi) as ISLCCoreInterface;
223
+ }
224
+ static connect(address: string, runner?: ContractRunner | null): ISLCCore {
225
+ return new Contract(address, _abi, runner) as unknown as ISLCCore;
226
+ }
227
+ }
@@ -0,0 +1,221 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Interface, type ContractRunner } from "ethers";
6
+ import type {
7
+ IWrappedToken,
8
+ IWrappedTokenInterface,
9
+ } from "../../../contracts/interfaces/IWrappedToken";
10
+
11
+ const _abi = [
12
+ {
13
+ anonymous: false,
14
+ inputs: [
15
+ {
16
+ indexed: true,
17
+ internalType: "address",
18
+ name: "owner",
19
+ type: "address",
20
+ },
21
+ {
22
+ indexed: true,
23
+ internalType: "address",
24
+ name: "spender",
25
+ type: "address",
26
+ },
27
+ {
28
+ indexed: false,
29
+ internalType: "uint256",
30
+ name: "value",
31
+ type: "uint256",
32
+ },
33
+ ],
34
+ name: "Approval",
35
+ type: "event",
36
+ },
37
+ {
38
+ anonymous: false,
39
+ inputs: [
40
+ {
41
+ indexed: true,
42
+ internalType: "address",
43
+ name: "from",
44
+ type: "address",
45
+ },
46
+ {
47
+ indexed: true,
48
+ internalType: "address",
49
+ name: "to",
50
+ type: "address",
51
+ },
52
+ {
53
+ indexed: false,
54
+ internalType: "uint256",
55
+ name: "value",
56
+ type: "uint256",
57
+ },
58
+ ],
59
+ name: "Transfer",
60
+ type: "event",
61
+ },
62
+ {
63
+ inputs: [
64
+ {
65
+ internalType: "address",
66
+ name: "owner",
67
+ type: "address",
68
+ },
69
+ {
70
+ internalType: "address",
71
+ name: "spender",
72
+ type: "address",
73
+ },
74
+ ],
75
+ name: "allowance",
76
+ outputs: [
77
+ {
78
+ internalType: "uint256",
79
+ name: "",
80
+ type: "uint256",
81
+ },
82
+ ],
83
+ stateMutability: "view",
84
+ type: "function",
85
+ },
86
+ {
87
+ inputs: [
88
+ {
89
+ internalType: "address",
90
+ name: "spender",
91
+ type: "address",
92
+ },
93
+ {
94
+ internalType: "uint256",
95
+ name: "value",
96
+ type: "uint256",
97
+ },
98
+ ],
99
+ name: "approve",
100
+ outputs: [
101
+ {
102
+ internalType: "bool",
103
+ name: "",
104
+ type: "bool",
105
+ },
106
+ ],
107
+ stateMutability: "nonpayable",
108
+ type: "function",
109
+ },
110
+ {
111
+ inputs: [
112
+ {
113
+ internalType: "address",
114
+ name: "account",
115
+ type: "address",
116
+ },
117
+ ],
118
+ name: "balanceOf",
119
+ outputs: [
120
+ {
121
+ internalType: "uint256",
122
+ name: "",
123
+ type: "uint256",
124
+ },
125
+ ],
126
+ stateMutability: "view",
127
+ type: "function",
128
+ },
129
+ {
130
+ inputs: [],
131
+ name: "deposit",
132
+ outputs: [
133
+ {
134
+ internalType: "bool",
135
+ name: "",
136
+ type: "bool",
137
+ },
138
+ ],
139
+ stateMutability: "payable",
140
+ type: "function",
141
+ },
142
+ {
143
+ inputs: [],
144
+ name: "totalSupply",
145
+ outputs: [
146
+ {
147
+ internalType: "uint256",
148
+ name: "",
149
+ type: "uint256",
150
+ },
151
+ ],
152
+ stateMutability: "view",
153
+ type: "function",
154
+ },
155
+ {
156
+ inputs: [
157
+ {
158
+ internalType: "address",
159
+ name: "to",
160
+ type: "address",
161
+ },
162
+ {
163
+ internalType: "uint256",
164
+ name: "value",
165
+ type: "uint256",
166
+ },
167
+ ],
168
+ name: "transfer",
169
+ outputs: [
170
+ {
171
+ internalType: "bool",
172
+ name: "",
173
+ type: "bool",
174
+ },
175
+ ],
176
+ stateMutability: "nonpayable",
177
+ type: "function",
178
+ },
179
+ {
180
+ inputs: [
181
+ {
182
+ internalType: "address",
183
+ name: "from",
184
+ type: "address",
185
+ },
186
+ {
187
+ internalType: "address",
188
+ name: "to",
189
+ type: "address",
190
+ },
191
+ {
192
+ internalType: "uint256",
193
+ name: "value",
194
+ type: "uint256",
195
+ },
196
+ ],
197
+ name: "transferFrom",
198
+ outputs: [
199
+ {
200
+ internalType: "bool",
201
+ name: "",
202
+ type: "bool",
203
+ },
204
+ ],
205
+ stateMutability: "nonpayable",
206
+ type: "function",
207
+ },
208
+ ] as const;
209
+
210
+ export class IWrappedToken__factory {
211
+ static readonly abi = _abi;
212
+ static createInterface(): IWrappedTokenInterface {
213
+ return new Interface(_abi) as IWrappedTokenInterface;
214
+ }
215
+ static connect(
216
+ address: string,
217
+ runner?: ContractRunner | null
218
+ ): IWrappedToken {
219
+ return new Contract(address, _abi, runner) as unknown as IWrappedToken;
220
+ }
221
+ }
@@ -0,0 +1,10 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export { IExecutorsRegistry__factory } from "./IExecutorsRegistry__factory";
5
+ export { IGovernance__factory } from "./IGovernance__factory";
6
+ export { INeutralsRegistry__factory } from "./INeutralsRegistry__factory";
7
+ export { IQParameters__factory } from "./IQParameters__factory";
8
+ export { ISLCCore__factory } from "./ISLCCore__factory";
9
+ export { ISLCCoreFactory__factory } from "./ISLCCoreFactory__factory";
10
+ export { IWrappedToken__factory } from "./IWrappedToken__factory";