@qubic.ts/contracts 0.1.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/package.json +17 -0
- package/scripts/generate-artifacts.ts +178 -0
- package/src/codec/entry-input.test.ts +198 -0
- package/src/codec/entry-input.ts +959 -0
- package/src/codec/index.ts +8 -0
- package/src/generated/contracts/CCF.registry.json +741 -0
- package/src/generated/contracts/CCF.types.ts +307 -0
- package/src/generated/contracts/GQMPROP.registry.json +518 -0
- package/src/generated/contracts/GQMPROP.types.ts +238 -0
- package/src/generated/contracts/MLM.registry.json +8 -0
- package/src/generated/contracts/MLM.types.ts +42 -0
- package/src/generated/contracts/MSVAULT.registry.json +1162 -0
- package/src/generated/contracts/MSVAULT.types.ts +598 -0
- package/src/generated/contracts/NOST.registry.json +1131 -0
- package/src/generated/contracts/NOST.types.ts +515 -0
- package/src/generated/contracts/QBAY.registry.json +1492 -0
- package/src/generated/contracts/QBAY.types.ts +681 -0
- package/src/generated/contracts/QBOND.registry.json +734 -0
- package/src/generated/contracts/QBOND.types.ts +397 -0
- package/src/generated/contracts/QDRAW.registry.json +112 -0
- package/src/generated/contracts/QDRAW.types.ts +110 -0
- package/src/generated/contracts/QDUEL.registry.json +466 -0
- package/src/generated/contracts/QDUEL.types.ts +265 -0
- package/src/generated/contracts/QEARN.registry.json +458 -0
- package/src/generated/contracts/QEARN.types.ts +265 -0
- package/src/generated/contracts/QIP.registry.json +483 -0
- package/src/generated/contracts/QIP.types.ts +194 -0
- package/src/generated/contracts/QRAFFLE.registry.json +916 -0
- package/src/generated/contracts/QRAFFLE.types.ts +446 -0
- package/src/generated/contracts/QRP.registry.json +139 -0
- package/src/generated/contracts/QRP.types.ts +144 -0
- package/src/generated/contracts/QRWA.registry.json +765 -0
- package/src/generated/contracts/QRWA.types.ts +402 -0
- package/src/generated/contracts/QSWAP.registry.json +941 -0
- package/src/generated/contracts/QSWAP.types.ts +479 -0
- package/src/generated/contracts/QTF.registry.json +480 -0
- package/src/generated/contracts/QTF.types.ts +346 -0
- package/src/generated/contracts/QUOTTERY.registry.json +530 -0
- package/src/generated/contracts/QUOTTERY.types.ts +262 -0
- package/src/generated/contracts/QUTIL.registry.json +1378 -0
- package/src/generated/contracts/QUTIL.types.ts +612 -0
- package/src/generated/contracts/QVAULT.registry.json +527 -0
- package/src/generated/contracts/QVAULT.types.ts +309 -0
- package/src/generated/contracts/QX.registry.json +610 -0
- package/src/generated/contracts/QX.types.ts +323 -0
- package/src/generated/contracts/RANDOM.registry.json +51 -0
- package/src/generated/contracts/RANDOM.types.ts +65 -0
- package/src/generated/contracts/RL.registry.json +490 -0
- package/src/generated/contracts/RL.types.ts +304 -0
- package/src/generated/contracts/SWATCH.registry.json +8 -0
- package/src/generated/contracts/SWATCH.types.ts +42 -0
- package/src/generated/core-registry.codecs.ts +6622 -0
- package/src/generated/core-registry.source.json +14342 -0
- package/src/generated/core-registry.ts +14349 -0
- package/src/generated/core-registry.types.ts +100 -0
- package/src/generator/contract-codecs.fixture.test.ts +17 -0
- package/src/generator/contract-codecs.test.ts +115 -0
- package/src/generator/contract-codecs.ts +416 -0
- package/src/generator/index.ts +14 -0
- package/src/generator/per-contract-files.test.ts +70 -0
- package/src/generator/per-contract-files.ts +122 -0
- package/src/generator/registry-runtime.fixture.test.ts +17 -0
- package/src/generator/registry-runtime.test.ts +55 -0
- package/src/generator/registry-runtime.ts +28 -0
- package/src/generator/registry-types.fixture.test.ts +17 -0
- package/src/generator/registry-types.test.ts +55 -0
- package/src/generator/registry-types.ts +75 -0
- package/src/index.test.ts +29 -0
- package/src/index.ts +49 -0
- package/src/registry/index.ts +17 -0
- package/src/registry/io-layout.fixture.test.ts +24 -0
- package/src/registry/io-layout.test.ts +93 -0
- package/src/registry/io-layout.ts +57 -0
- package/src/registry/normalize.ts +61 -0
- package/src/registry/schema.fixture.test.ts +21 -0
- package/src/registry/schema.ts +97 -0
- package/src/registry/types.ts +98 -0
- package/test/fixtures/io-layout.contracts.json +32 -0
- package/test/fixtures/io-layout.layouts.json +14 -0
- package/test/fixtures/registry.sample.codecs.ts +100 -0
- package/test/fixtures/registry.sample.json +27 -0
- package/test/fixtures/registry.sample.runtime.ts +54 -0
- package/test/fixtures/registry.sample.types.ts +16 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "QIP",
|
|
3
|
+
"contractIndex": 18,
|
|
4
|
+
"filename": "QIP.h",
|
|
5
|
+
"address": "SAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABNI",
|
|
6
|
+
"entries": [
|
|
7
|
+
{
|
|
8
|
+
"kind": "function",
|
|
9
|
+
"name": "getICOInfo",
|
|
10
|
+
"inputType": 1,
|
|
11
|
+
"inputTypeName": "getICOInfo_input",
|
|
12
|
+
"outputTypeName": "getICOInfo_output",
|
|
13
|
+
"inputSize": 4,
|
|
14
|
+
"outputSize": 512
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"kind": "procedure",
|
|
18
|
+
"name": "createICO",
|
|
19
|
+
"inputType": 1,
|
|
20
|
+
"inputTypeName": "createICO_input",
|
|
21
|
+
"outputTypeName": "createICO_output",
|
|
22
|
+
"inputSize": 456,
|
|
23
|
+
"outputSize": 4
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"kind": "procedure",
|
|
27
|
+
"name": "buyToken",
|
|
28
|
+
"inputType": 2,
|
|
29
|
+
"inputTypeName": "buyToken_input",
|
|
30
|
+
"outputTypeName": "buyToken_output",
|
|
31
|
+
"inputSize": 16,
|
|
32
|
+
"outputSize": 4
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "procedure",
|
|
36
|
+
"name": "TransferShareManagementRights",
|
|
37
|
+
"inputType": 3,
|
|
38
|
+
"inputTypeName": "TransferShareManagementRights_input",
|
|
39
|
+
"outputTypeName": "TransferShareManagementRights_output",
|
|
40
|
+
"inputSize": 56,
|
|
41
|
+
"outputSize": 8
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"ioTypes": [
|
|
45
|
+
{
|
|
46
|
+
"kind": "struct",
|
|
47
|
+
"name": "Asset",
|
|
48
|
+
"fields": [
|
|
49
|
+
{
|
|
50
|
+
"name": "issuer",
|
|
51
|
+
"type": "id",
|
|
52
|
+
"byteOffset": 0
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "assetName",
|
|
56
|
+
"type": "uint64",
|
|
57
|
+
"byteOffset": 32
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"byteSize": 40,
|
|
61
|
+
"byteAlign": 8
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"kind": "struct",
|
|
65
|
+
"name": "buyToken_input",
|
|
66
|
+
"fields": [
|
|
67
|
+
{
|
|
68
|
+
"name": "indexOfICO",
|
|
69
|
+
"type": "uint32",
|
|
70
|
+
"byteOffset": 0
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "amount",
|
|
74
|
+
"type": "uint64",
|
|
75
|
+
"byteOffset": 8
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"byteSize": 16,
|
|
79
|
+
"byteAlign": 8
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"kind": "struct",
|
|
83
|
+
"name": "buyToken_output",
|
|
84
|
+
"fields": [
|
|
85
|
+
{
|
|
86
|
+
"name": "returnCode",
|
|
87
|
+
"type": "sint32",
|
|
88
|
+
"byteOffset": 0
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"byteSize": 4,
|
|
92
|
+
"byteAlign": 4
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"kind": "struct",
|
|
96
|
+
"name": "createICO_input",
|
|
97
|
+
"fields": [
|
|
98
|
+
{
|
|
99
|
+
"name": "issuer",
|
|
100
|
+
"type": "id",
|
|
101
|
+
"byteOffset": 0
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "address1",
|
|
105
|
+
"type": "id",
|
|
106
|
+
"byteOffset": 32
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "address2",
|
|
110
|
+
"type": "id",
|
|
111
|
+
"byteOffset": 64
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "address3",
|
|
115
|
+
"type": "id",
|
|
116
|
+
"byteOffset": 96
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "address4",
|
|
120
|
+
"type": "id",
|
|
121
|
+
"byteOffset": 128
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "address5",
|
|
125
|
+
"type": "id",
|
|
126
|
+
"byteOffset": 160
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "address6",
|
|
130
|
+
"type": "id",
|
|
131
|
+
"byteOffset": 192
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "address7",
|
|
135
|
+
"type": "id",
|
|
136
|
+
"byteOffset": 224
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "address8",
|
|
140
|
+
"type": "id",
|
|
141
|
+
"byteOffset": 256
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "address9",
|
|
145
|
+
"type": "id",
|
|
146
|
+
"byteOffset": 288
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "address10",
|
|
150
|
+
"type": "id",
|
|
151
|
+
"byteOffset": 320
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "assetName",
|
|
155
|
+
"type": "uint64",
|
|
156
|
+
"byteOffset": 352
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "price1",
|
|
160
|
+
"type": "uint64",
|
|
161
|
+
"byteOffset": 360
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "price2",
|
|
165
|
+
"type": "uint64",
|
|
166
|
+
"byteOffset": 368
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "price3",
|
|
170
|
+
"type": "uint64",
|
|
171
|
+
"byteOffset": 376
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "saleAmountForPhase1",
|
|
175
|
+
"type": "uint64",
|
|
176
|
+
"byteOffset": 384
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "saleAmountForPhase2",
|
|
180
|
+
"type": "uint64",
|
|
181
|
+
"byteOffset": 392
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "saleAmountForPhase3",
|
|
185
|
+
"type": "uint64",
|
|
186
|
+
"byteOffset": 400
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "percent1",
|
|
190
|
+
"type": "uint32",
|
|
191
|
+
"byteOffset": 408
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "percent2",
|
|
195
|
+
"type": "uint32",
|
|
196
|
+
"byteOffset": 412
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "percent3",
|
|
200
|
+
"type": "uint32",
|
|
201
|
+
"byteOffset": 416
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "percent4",
|
|
205
|
+
"type": "uint32",
|
|
206
|
+
"byteOffset": 420
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "percent5",
|
|
210
|
+
"type": "uint32",
|
|
211
|
+
"byteOffset": 424
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "percent6",
|
|
215
|
+
"type": "uint32",
|
|
216
|
+
"byteOffset": 428
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "percent7",
|
|
220
|
+
"type": "uint32",
|
|
221
|
+
"byteOffset": 432
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "percent8",
|
|
225
|
+
"type": "uint32",
|
|
226
|
+
"byteOffset": 436
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "percent9",
|
|
230
|
+
"type": "uint32",
|
|
231
|
+
"byteOffset": 440
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "percent10",
|
|
235
|
+
"type": "uint32",
|
|
236
|
+
"byteOffset": 444
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "startEpoch",
|
|
240
|
+
"type": "uint32",
|
|
241
|
+
"byteOffset": 448
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"byteSize": 456,
|
|
245
|
+
"byteAlign": 8
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"kind": "struct",
|
|
249
|
+
"name": "createICO_output",
|
|
250
|
+
"fields": [
|
|
251
|
+
{
|
|
252
|
+
"name": "returnCode",
|
|
253
|
+
"type": "sint32",
|
|
254
|
+
"byteOffset": 0
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"byteSize": 4,
|
|
258
|
+
"byteAlign": 4
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"kind": "struct",
|
|
262
|
+
"name": "getICOInfo_input",
|
|
263
|
+
"fields": [
|
|
264
|
+
{
|
|
265
|
+
"name": "indexOfICO",
|
|
266
|
+
"type": "uint32",
|
|
267
|
+
"byteOffset": 0
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"byteSize": 4,
|
|
271
|
+
"byteAlign": 4
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"kind": "struct",
|
|
275
|
+
"name": "getICOInfo_output",
|
|
276
|
+
"fields": [
|
|
277
|
+
{
|
|
278
|
+
"name": "creatorOfICO",
|
|
279
|
+
"type": "id",
|
|
280
|
+
"byteOffset": 0
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "issuer",
|
|
284
|
+
"type": "id",
|
|
285
|
+
"byteOffset": 32
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "address1",
|
|
289
|
+
"type": "id",
|
|
290
|
+
"byteOffset": 64
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "address2",
|
|
294
|
+
"type": "id",
|
|
295
|
+
"byteOffset": 96
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "address3",
|
|
299
|
+
"type": "id",
|
|
300
|
+
"byteOffset": 128
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "address4",
|
|
304
|
+
"type": "id",
|
|
305
|
+
"byteOffset": 160
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "address5",
|
|
309
|
+
"type": "id",
|
|
310
|
+
"byteOffset": 192
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "address6",
|
|
314
|
+
"type": "id",
|
|
315
|
+
"byteOffset": 224
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "address7",
|
|
319
|
+
"type": "id",
|
|
320
|
+
"byteOffset": 256
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "address8",
|
|
324
|
+
"type": "id",
|
|
325
|
+
"byteOffset": 288
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "address9",
|
|
329
|
+
"type": "id",
|
|
330
|
+
"byteOffset": 320
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "address10",
|
|
334
|
+
"type": "id",
|
|
335
|
+
"byteOffset": 352
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "assetName",
|
|
339
|
+
"type": "uint64",
|
|
340
|
+
"byteOffset": 384
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"name": "price1",
|
|
344
|
+
"type": "uint64",
|
|
345
|
+
"byteOffset": 392
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "price2",
|
|
349
|
+
"type": "uint64",
|
|
350
|
+
"byteOffset": 400
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"name": "price3",
|
|
354
|
+
"type": "uint64",
|
|
355
|
+
"byteOffset": 408
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "saleAmountForPhase1",
|
|
359
|
+
"type": "uint64",
|
|
360
|
+
"byteOffset": 416
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "saleAmountForPhase2",
|
|
364
|
+
"type": "uint64",
|
|
365
|
+
"byteOffset": 424
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "saleAmountForPhase3",
|
|
369
|
+
"type": "uint64",
|
|
370
|
+
"byteOffset": 432
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "remainingAmountForPhase1",
|
|
374
|
+
"type": "uint64",
|
|
375
|
+
"byteOffset": 440
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "remainingAmountForPhase2",
|
|
379
|
+
"type": "uint64",
|
|
380
|
+
"byteOffset": 448
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "remainingAmountForPhase3",
|
|
384
|
+
"type": "uint64",
|
|
385
|
+
"byteOffset": 456
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "percent1",
|
|
389
|
+
"type": "uint32",
|
|
390
|
+
"byteOffset": 464
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "percent2",
|
|
394
|
+
"type": "uint32",
|
|
395
|
+
"byteOffset": 468
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "percent3",
|
|
399
|
+
"type": "uint32",
|
|
400
|
+
"byteOffset": 472
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "percent4",
|
|
404
|
+
"type": "uint32",
|
|
405
|
+
"byteOffset": 476
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "percent5",
|
|
409
|
+
"type": "uint32",
|
|
410
|
+
"byteOffset": 480
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "percent6",
|
|
414
|
+
"type": "uint32",
|
|
415
|
+
"byteOffset": 484
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "percent7",
|
|
419
|
+
"type": "uint32",
|
|
420
|
+
"byteOffset": 488
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "percent8",
|
|
424
|
+
"type": "uint32",
|
|
425
|
+
"byteOffset": 492
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "percent9",
|
|
429
|
+
"type": "uint32",
|
|
430
|
+
"byteOffset": 496
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"name": "percent10",
|
|
434
|
+
"type": "uint32",
|
|
435
|
+
"byteOffset": 500
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "startEpoch",
|
|
439
|
+
"type": "uint32",
|
|
440
|
+
"byteOffset": 504
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
"byteSize": 512,
|
|
444
|
+
"byteAlign": 8
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"kind": "struct",
|
|
448
|
+
"name": "TransferShareManagementRights_input",
|
|
449
|
+
"fields": [
|
|
450
|
+
{
|
|
451
|
+
"name": "asset",
|
|
452
|
+
"type": "Asset",
|
|
453
|
+
"byteOffset": 0
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "numberOfShares",
|
|
457
|
+
"type": "sint64",
|
|
458
|
+
"byteOffset": 40
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"name": "newManagingContractIndex",
|
|
462
|
+
"type": "uint32",
|
|
463
|
+
"byteOffset": 48
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
"byteSize": 56,
|
|
467
|
+
"byteAlign": 8
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"kind": "struct",
|
|
471
|
+
"name": "TransferShareManagementRights_output",
|
|
472
|
+
"fields": [
|
|
473
|
+
{
|
|
474
|
+
"name": "transferredNumberOfShares",
|
|
475
|
+
"type": "sint64",
|
|
476
|
+
"byteOffset": 0
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"byteSize": 8,
|
|
480
|
+
"byteAlign": 8
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* This file is generated. Do not edit manually. */
|
|
3
|
+
|
|
4
|
+
export type QIP_Asset = {
|
|
5
|
+
readonly issuer: string;
|
|
6
|
+
readonly assetName: bigint;
|
|
7
|
+
};
|
|
8
|
+
export type QIP_buyToken_input = {
|
|
9
|
+
readonly indexOfICO: number;
|
|
10
|
+
readonly amount: bigint;
|
|
11
|
+
};
|
|
12
|
+
export type QIP_buyToken_output = {
|
|
13
|
+
readonly returnCode: number;
|
|
14
|
+
};
|
|
15
|
+
export type QIP_createICO_input = {
|
|
16
|
+
readonly issuer: string;
|
|
17
|
+
readonly address1: string;
|
|
18
|
+
readonly address2: string;
|
|
19
|
+
readonly address3: string;
|
|
20
|
+
readonly address4: string;
|
|
21
|
+
readonly address5: string;
|
|
22
|
+
readonly address6: string;
|
|
23
|
+
readonly address7: string;
|
|
24
|
+
readonly address8: string;
|
|
25
|
+
readonly address9: string;
|
|
26
|
+
readonly address10: string;
|
|
27
|
+
readonly assetName: bigint;
|
|
28
|
+
readonly price1: bigint;
|
|
29
|
+
readonly price2: bigint;
|
|
30
|
+
readonly price3: bigint;
|
|
31
|
+
readonly saleAmountForPhase1: bigint;
|
|
32
|
+
readonly saleAmountForPhase2: bigint;
|
|
33
|
+
readonly saleAmountForPhase3: bigint;
|
|
34
|
+
readonly percent1: number;
|
|
35
|
+
readonly percent2: number;
|
|
36
|
+
readonly percent3: number;
|
|
37
|
+
readonly percent4: number;
|
|
38
|
+
readonly percent5: number;
|
|
39
|
+
readonly percent6: number;
|
|
40
|
+
readonly percent7: number;
|
|
41
|
+
readonly percent8: number;
|
|
42
|
+
readonly percent9: number;
|
|
43
|
+
readonly percent10: number;
|
|
44
|
+
readonly startEpoch: number;
|
|
45
|
+
};
|
|
46
|
+
export type QIP_createICO_output = {
|
|
47
|
+
readonly returnCode: number;
|
|
48
|
+
};
|
|
49
|
+
export type QIP_getICOInfo_input = {
|
|
50
|
+
readonly indexOfICO: number;
|
|
51
|
+
};
|
|
52
|
+
export type QIP_getICOInfo_output = {
|
|
53
|
+
readonly creatorOfICO: string;
|
|
54
|
+
readonly issuer: string;
|
|
55
|
+
readonly address1: string;
|
|
56
|
+
readonly address2: string;
|
|
57
|
+
readonly address3: string;
|
|
58
|
+
readonly address4: string;
|
|
59
|
+
readonly address5: string;
|
|
60
|
+
readonly address6: string;
|
|
61
|
+
readonly address7: string;
|
|
62
|
+
readonly address8: string;
|
|
63
|
+
readonly address9: string;
|
|
64
|
+
readonly address10: string;
|
|
65
|
+
readonly assetName: bigint;
|
|
66
|
+
readonly price1: bigint;
|
|
67
|
+
readonly price2: bigint;
|
|
68
|
+
readonly price3: bigint;
|
|
69
|
+
readonly saleAmountForPhase1: bigint;
|
|
70
|
+
readonly saleAmountForPhase2: bigint;
|
|
71
|
+
readonly saleAmountForPhase3: bigint;
|
|
72
|
+
readonly remainingAmountForPhase1: bigint;
|
|
73
|
+
readonly remainingAmountForPhase2: bigint;
|
|
74
|
+
readonly remainingAmountForPhase3: bigint;
|
|
75
|
+
readonly percent1: number;
|
|
76
|
+
readonly percent2: number;
|
|
77
|
+
readonly percent3: number;
|
|
78
|
+
readonly percent4: number;
|
|
79
|
+
readonly percent5: number;
|
|
80
|
+
readonly percent6: number;
|
|
81
|
+
readonly percent7: number;
|
|
82
|
+
readonly percent8: number;
|
|
83
|
+
readonly percent9: number;
|
|
84
|
+
readonly percent10: number;
|
|
85
|
+
readonly startEpoch: number;
|
|
86
|
+
};
|
|
87
|
+
export type QIP_TransferShareManagementRights_input = {
|
|
88
|
+
readonly asset: QIP_Asset;
|
|
89
|
+
readonly numberOfShares: bigint;
|
|
90
|
+
readonly newManagingContractIndex: number;
|
|
91
|
+
};
|
|
92
|
+
export type QIP_TransferShareManagementRights_output = {
|
|
93
|
+
readonly transferredNumberOfShares: bigint;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export interface ContractTypeMap {
|
|
97
|
+
QIP: {
|
|
98
|
+
readonly contractIndex: 18;
|
|
99
|
+
readonly functions: {
|
|
100
|
+
getICOInfo: {
|
|
101
|
+
readonly kind: "function";
|
|
102
|
+
readonly inputType: 1;
|
|
103
|
+
readonly inputTypeName: "getICOInfo_input";
|
|
104
|
+
readonly outputTypeName: "getICOInfo_output";
|
|
105
|
+
readonly input: QIP_getICOInfo_input;
|
|
106
|
+
readonly output: QIP_getICOInfo_output;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly procedures: {
|
|
110
|
+
createICO: {
|
|
111
|
+
readonly kind: "procedure";
|
|
112
|
+
readonly inputType: 1;
|
|
113
|
+
readonly inputTypeName: "createICO_input";
|
|
114
|
+
readonly outputTypeName: "createICO_output";
|
|
115
|
+
readonly input: QIP_createICO_input;
|
|
116
|
+
readonly output: QIP_createICO_output;
|
|
117
|
+
};
|
|
118
|
+
buyToken: {
|
|
119
|
+
readonly kind: "procedure";
|
|
120
|
+
readonly inputType: 2;
|
|
121
|
+
readonly inputTypeName: "buyToken_input";
|
|
122
|
+
readonly outputTypeName: "buyToken_output";
|
|
123
|
+
readonly input: QIP_buyToken_input;
|
|
124
|
+
readonly output: QIP_buyToken_output;
|
|
125
|
+
};
|
|
126
|
+
TransferShareManagementRights: {
|
|
127
|
+
readonly kind: "procedure";
|
|
128
|
+
readonly inputType: 3;
|
|
129
|
+
readonly inputTypeName: "TransferShareManagementRights_input";
|
|
130
|
+
readonly outputTypeName: "TransferShareManagementRights_output";
|
|
131
|
+
readonly input: QIP_TransferShareManagementRights_input;
|
|
132
|
+
readonly output: QIP_TransferShareManagementRights_output;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type ContractName = keyof ContractTypeMap & string;
|
|
139
|
+
export type FunctionName<C extends ContractName> = keyof ContractTypeMap[C]["functions"] & string;
|
|
140
|
+
export type ProcedureName<C extends ContractName> = keyof ContractTypeMap[C]["procedures"] & string;
|
|
141
|
+
|
|
142
|
+
export type FunctionInput<
|
|
143
|
+
C extends ContractName,
|
|
144
|
+
F extends FunctionName<C>,
|
|
145
|
+
> = ContractTypeMap[C]["functions"][F]["input"];
|
|
146
|
+
export type FunctionOutput<
|
|
147
|
+
C extends ContractName,
|
|
148
|
+
F extends FunctionName<C>,
|
|
149
|
+
> = ContractTypeMap[C]["functions"][F]["output"];
|
|
150
|
+
|
|
151
|
+
export type ProcedureInput<
|
|
152
|
+
C extends ContractName,
|
|
153
|
+
P extends ProcedureName<C>,
|
|
154
|
+
> = ContractTypeMap[C]["procedures"][P]["input"];
|
|
155
|
+
export type ProcedureOutput<
|
|
156
|
+
C extends ContractName,
|
|
157
|
+
P extends ProcedureName<C>,
|
|
158
|
+
> = ContractTypeMap[C]["procedures"][P]["output"];
|
|
159
|
+
|
|
160
|
+
export const contractCodecRegistry = {
|
|
161
|
+
QIP: {
|
|
162
|
+
contractIndex: 18,
|
|
163
|
+
functions: {
|
|
164
|
+
getICOInfo: {
|
|
165
|
+
kind: "function",
|
|
166
|
+
inputType: 1,
|
|
167
|
+
inputTypeName: "getICOInfo_input",
|
|
168
|
+
outputTypeName: "getICOInfo_output",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
procedures: {
|
|
172
|
+
createICO: {
|
|
173
|
+
kind: "procedure",
|
|
174
|
+
inputType: 1,
|
|
175
|
+
inputTypeName: "createICO_input",
|
|
176
|
+
outputTypeName: "createICO_output",
|
|
177
|
+
},
|
|
178
|
+
buyToken: {
|
|
179
|
+
kind: "procedure",
|
|
180
|
+
inputType: 2,
|
|
181
|
+
inputTypeName: "buyToken_input",
|
|
182
|
+
outputTypeName: "buyToken_output",
|
|
183
|
+
},
|
|
184
|
+
TransferShareManagementRights: {
|
|
185
|
+
kind: "procedure",
|
|
186
|
+
inputType: 3,
|
|
187
|
+
inputTypeName: "TransferShareManagementRights_input",
|
|
188
|
+
outputTypeName: "TransferShareManagementRights_output",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
} as const satisfies Readonly<Record<ContractName, unknown>>;
|
|
193
|
+
|
|
194
|
+
export type RuntimeContractCodecRegistry = typeof contractCodecRegistry;
|