@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.
Files changed (83) hide show
  1. package/package.json +17 -0
  2. package/scripts/generate-artifacts.ts +178 -0
  3. package/src/codec/entry-input.test.ts +198 -0
  4. package/src/codec/entry-input.ts +959 -0
  5. package/src/codec/index.ts +8 -0
  6. package/src/generated/contracts/CCF.registry.json +741 -0
  7. package/src/generated/contracts/CCF.types.ts +307 -0
  8. package/src/generated/contracts/GQMPROP.registry.json +518 -0
  9. package/src/generated/contracts/GQMPROP.types.ts +238 -0
  10. package/src/generated/contracts/MLM.registry.json +8 -0
  11. package/src/generated/contracts/MLM.types.ts +42 -0
  12. package/src/generated/contracts/MSVAULT.registry.json +1162 -0
  13. package/src/generated/contracts/MSVAULT.types.ts +598 -0
  14. package/src/generated/contracts/NOST.registry.json +1131 -0
  15. package/src/generated/contracts/NOST.types.ts +515 -0
  16. package/src/generated/contracts/QBAY.registry.json +1492 -0
  17. package/src/generated/contracts/QBAY.types.ts +681 -0
  18. package/src/generated/contracts/QBOND.registry.json +734 -0
  19. package/src/generated/contracts/QBOND.types.ts +397 -0
  20. package/src/generated/contracts/QDRAW.registry.json +112 -0
  21. package/src/generated/contracts/QDRAW.types.ts +110 -0
  22. package/src/generated/contracts/QDUEL.registry.json +466 -0
  23. package/src/generated/contracts/QDUEL.types.ts +265 -0
  24. package/src/generated/contracts/QEARN.registry.json +458 -0
  25. package/src/generated/contracts/QEARN.types.ts +265 -0
  26. package/src/generated/contracts/QIP.registry.json +483 -0
  27. package/src/generated/contracts/QIP.types.ts +194 -0
  28. package/src/generated/contracts/QRAFFLE.registry.json +916 -0
  29. package/src/generated/contracts/QRAFFLE.types.ts +446 -0
  30. package/src/generated/contracts/QRP.registry.json +139 -0
  31. package/src/generated/contracts/QRP.types.ts +144 -0
  32. package/src/generated/contracts/QRWA.registry.json +765 -0
  33. package/src/generated/contracts/QRWA.types.ts +402 -0
  34. package/src/generated/contracts/QSWAP.registry.json +941 -0
  35. package/src/generated/contracts/QSWAP.types.ts +479 -0
  36. package/src/generated/contracts/QTF.registry.json +480 -0
  37. package/src/generated/contracts/QTF.types.ts +346 -0
  38. package/src/generated/contracts/QUOTTERY.registry.json +530 -0
  39. package/src/generated/contracts/QUOTTERY.types.ts +262 -0
  40. package/src/generated/contracts/QUTIL.registry.json +1378 -0
  41. package/src/generated/contracts/QUTIL.types.ts +612 -0
  42. package/src/generated/contracts/QVAULT.registry.json +527 -0
  43. package/src/generated/contracts/QVAULT.types.ts +309 -0
  44. package/src/generated/contracts/QX.registry.json +610 -0
  45. package/src/generated/contracts/QX.types.ts +323 -0
  46. package/src/generated/contracts/RANDOM.registry.json +51 -0
  47. package/src/generated/contracts/RANDOM.types.ts +65 -0
  48. package/src/generated/contracts/RL.registry.json +490 -0
  49. package/src/generated/contracts/RL.types.ts +304 -0
  50. package/src/generated/contracts/SWATCH.registry.json +8 -0
  51. package/src/generated/contracts/SWATCH.types.ts +42 -0
  52. package/src/generated/core-registry.codecs.ts +6622 -0
  53. package/src/generated/core-registry.source.json +14342 -0
  54. package/src/generated/core-registry.ts +14349 -0
  55. package/src/generated/core-registry.types.ts +100 -0
  56. package/src/generator/contract-codecs.fixture.test.ts +17 -0
  57. package/src/generator/contract-codecs.test.ts +115 -0
  58. package/src/generator/contract-codecs.ts +416 -0
  59. package/src/generator/index.ts +14 -0
  60. package/src/generator/per-contract-files.test.ts +70 -0
  61. package/src/generator/per-contract-files.ts +122 -0
  62. package/src/generator/registry-runtime.fixture.test.ts +17 -0
  63. package/src/generator/registry-runtime.test.ts +55 -0
  64. package/src/generator/registry-runtime.ts +28 -0
  65. package/src/generator/registry-types.fixture.test.ts +17 -0
  66. package/src/generator/registry-types.test.ts +55 -0
  67. package/src/generator/registry-types.ts +75 -0
  68. package/src/index.test.ts +29 -0
  69. package/src/index.ts +49 -0
  70. package/src/registry/index.ts +17 -0
  71. package/src/registry/io-layout.fixture.test.ts +24 -0
  72. package/src/registry/io-layout.test.ts +93 -0
  73. package/src/registry/io-layout.ts +57 -0
  74. package/src/registry/normalize.ts +61 -0
  75. package/src/registry/schema.fixture.test.ts +21 -0
  76. package/src/registry/schema.ts +97 -0
  77. package/src/registry/types.ts +98 -0
  78. package/test/fixtures/io-layout.contracts.json +32 -0
  79. package/test/fixtures/io-layout.layouts.json +14 -0
  80. package/test/fixtures/registry.sample.codecs.ts +100 -0
  81. package/test/fixtures/registry.sample.json +27 -0
  82. package/test/fixtures/registry.sample.runtime.ts +54 -0
  83. package/test/fixtures/registry.sample.types.ts +16 -0
@@ -0,0 +1,612 @@
1
+ /* eslint-disable */
2
+ /* This file is generated. Do not edit manually. */
3
+
4
+ export type QUTIL_Asset = {
5
+ readonly issuer: string;
6
+ readonly assetName: bigint;
7
+ };
8
+ export type QUTIL_BurnQubic_input = {
9
+ readonly amount: bigint;
10
+ };
11
+ export type QUTIL_BurnQubic_output = {
12
+ readonly amount: bigint;
13
+ };
14
+ export type QUTIL_BurnQubicForContract_input = {
15
+ readonly contractIndexBurnedFor: number;
16
+ };
17
+ export type QUTIL_BurnQubicForContract_output = {
18
+ readonly amount: bigint;
19
+ };
20
+ export type QUTIL_CancelPoll_input = {
21
+ readonly poll_id: bigint;
22
+ };
23
+ export type QUTIL_CancelPoll_output = {
24
+ readonly success: boolean;
25
+ };
26
+ export type QUTIL_CreatePoll_input = {
27
+ readonly poll_name: string;
28
+ readonly poll_type: bigint;
29
+ readonly min_amount: bigint;
30
+ readonly github_link: ReadonlyArray<number>;
31
+ readonly allowed_assets: ReadonlyArray<QUTIL_Asset>;
32
+ readonly num_assets: bigint;
33
+ };
34
+ export type QUTIL_CreatePoll_output = {
35
+ readonly poll_id: bigint;
36
+ };
37
+ export type QUTIL_DistributeQuToShareholders_input = {
38
+ readonly asset: QUTIL_Asset;
39
+ };
40
+ export type QUTIL_DistributeQuToShareholders_output = {
41
+ readonly shareholders: bigint;
42
+ readonly totalShares: bigint;
43
+ readonly amountPerShare: bigint;
44
+ readonly fees: bigint;
45
+ };
46
+ export type QUTIL_GetCurrentPollId_input = Record<string, never>;
47
+ export type QUTIL_GetCurrentPollId_output = {
48
+ readonly current_poll_id: bigint;
49
+ readonly active_poll_ids: ReadonlyArray<bigint>;
50
+ readonly active_count: bigint;
51
+ };
52
+ export type QUTIL_GetCurrentResult_input = {
53
+ readonly poll_id: bigint;
54
+ };
55
+ export type QUTIL_GetCurrentResult_output = {
56
+ readonly result: ReadonlyArray<bigint>;
57
+ readonly voter_count: ReadonlyArray<bigint>;
58
+ readonly is_active: bigint;
59
+ };
60
+ export type QUTIL_GetFees_output = {
61
+ readonly smt1InvocationFee: bigint;
62
+ readonly pollCreationFee: bigint;
63
+ readonly pollVoteFee: bigint;
64
+ readonly distributeQuToShareholderFeePerShareholder: bigint;
65
+ readonly shareholderProposalFee: bigint;
66
+ readonly _futureFeePlaceholder0: bigint;
67
+ readonly _futureFeePlaceholder1: bigint;
68
+ readonly _futureFeePlaceholder2: bigint;
69
+ readonly _futureFeePlaceholder3: bigint;
70
+ readonly _futureFeePlaceholder4: bigint;
71
+ readonly _futureFeePlaceholder5: bigint;
72
+ };
73
+ export type QUTIL_GetPollInfo_input = {
74
+ readonly poll_id: bigint;
75
+ };
76
+ export type QUTIL_GetPollInfo_output = {
77
+ readonly found: bigint;
78
+ readonly poll_info: QUTIL_QUTILPoll;
79
+ readonly poll_link: ReadonlyArray<number>;
80
+ };
81
+ export type QUTIL_GetPollsByCreator_input = {
82
+ readonly creator: string;
83
+ };
84
+ export type QUTIL_GetPollsByCreator_output = {
85
+ readonly poll_ids: ReadonlyArray<bigint>;
86
+ readonly count: bigint;
87
+ };
88
+ export type QUTIL_GetSendToManyV1Fee_input = Record<string, never>;
89
+ export type QUTIL_GetSendToManyV1Fee_output = {
90
+ readonly fee: bigint;
91
+ };
92
+ export type QUTIL_GetShareholderProposal_input = {
93
+ readonly proposalIndex: number;
94
+ };
95
+ export type QUTIL_GetShareholderProposal_output = {
96
+ readonly proposal: QUTIL_ProposalDataT;
97
+ readonly proposerPubicKey: string;
98
+ };
99
+ export type QUTIL_GetShareholderProposalFees_output = {
100
+ readonly setProposalFee: bigint;
101
+ readonly setVoteFee: bigint;
102
+ };
103
+ export type QUTIL_GetShareholderProposalIndices_input = {
104
+ readonly activeProposals: boolean;
105
+ readonly prevProposalIndex: number;
106
+ };
107
+ export type QUTIL_GetShareholderProposalIndices_output = {
108
+ readonly numOfIndices: number;
109
+ readonly indices: ReadonlyArray<number>;
110
+ };
111
+ export type QUTIL_GetShareholderVotes_input = {
112
+ readonly voter: string;
113
+ readonly proposalIndex: number;
114
+ };
115
+ export type QUTIL_GetShareholderVotingResults_input = {
116
+ readonly proposalIndex: number;
117
+ };
118
+ export type QUTIL_ProposalDataYesNo = {
119
+ readonly url: ReadonlyArray<number>;
120
+ readonly epoch: number;
121
+ readonly type: number;
122
+ readonly tick: number;
123
+ readonly data: QUTIL_Data;
124
+ };
125
+ export type QUTIL_ProposalMultiVoteDataV1 = {
126
+ readonly proposalIndex: number;
127
+ readonly proposalType: number;
128
+ readonly proposalTick: number;
129
+ readonly voteValues: ReadonlyArray<bigint>;
130
+ readonly voteCounts: ReadonlyArray<number>;
131
+ };
132
+ export type QUTIL_ProposalSummarizedVotingDataV1 = {
133
+ readonly proposalIndex: number;
134
+ readonly optionCount: number;
135
+ readonly proposalTick: number;
136
+ readonly totalVotesAuthorized: number;
137
+ readonly totalVotesCasted: number;
138
+ };
139
+ export type QUTIL_QueryFeeReserve_input = {
140
+ readonly contractIndex: number;
141
+ };
142
+ export type QUTIL_QueryFeeReserve_output = {
143
+ readonly reserveAmount: bigint;
144
+ };
145
+ export type QUTIL_QUTILPoll = {
146
+ readonly poll_name: string;
147
+ readonly poll_type: bigint;
148
+ readonly min_amount: bigint;
149
+ readonly is_active: bigint;
150
+ readonly creator: string;
151
+ readonly allowed_assets: ReadonlyArray<QUTIL_Asset>;
152
+ readonly num_assets: bigint;
153
+ };
154
+ export type QUTIL_SendToManyBenchmark_input = {
155
+ readonly dstCount: bigint;
156
+ readonly numTransfersEach: bigint;
157
+ };
158
+ export type QUTIL_SendToManyBenchmark_output = {
159
+ readonly dstCount: bigint;
160
+ readonly returnCode: number;
161
+ readonly total: bigint;
162
+ };
163
+ export type QUTIL_SendToManyV1_input = {
164
+ readonly dst0: string;
165
+ readonly dst1: string;
166
+ readonly dst2: string;
167
+ readonly dst3: string;
168
+ readonly dst4: string;
169
+ readonly dst5: string;
170
+ readonly dst6: string;
171
+ readonly dst7: string;
172
+ readonly dst8: string;
173
+ readonly dst9: string;
174
+ readonly dst10: string;
175
+ readonly dst11: string;
176
+ readonly dst12: string;
177
+ readonly dst13: string;
178
+ readonly dst14: string;
179
+ readonly dst15: string;
180
+ readonly dst16: string;
181
+ readonly dst17: string;
182
+ readonly dst18: string;
183
+ readonly dst19: string;
184
+ readonly dst20: string;
185
+ readonly dst21: string;
186
+ readonly dst22: string;
187
+ readonly dst23: string;
188
+ readonly dst24: string;
189
+ readonly amt0: bigint;
190
+ readonly amt1: bigint;
191
+ readonly amt2: bigint;
192
+ readonly amt3: bigint;
193
+ readonly amt4: bigint;
194
+ readonly amt5: bigint;
195
+ readonly amt6: bigint;
196
+ readonly amt7: bigint;
197
+ readonly amt8: bigint;
198
+ readonly amt9: bigint;
199
+ readonly amt10: bigint;
200
+ readonly amt11: bigint;
201
+ readonly amt12: bigint;
202
+ readonly amt13: bigint;
203
+ readonly amt14: bigint;
204
+ readonly amt15: bigint;
205
+ readonly amt16: bigint;
206
+ readonly amt17: bigint;
207
+ readonly amt18: bigint;
208
+ readonly amt19: bigint;
209
+ readonly amt20: bigint;
210
+ readonly amt21: bigint;
211
+ readonly amt22: bigint;
212
+ readonly amt23: bigint;
213
+ readonly amt24: bigint;
214
+ };
215
+ export type QUTIL_SendToManyV1_output = {
216
+ readonly returnCode: number;
217
+ };
218
+ export type QUTIL_Transfer = {
219
+ readonly destination: string;
220
+ readonly amount: bigint;
221
+ };
222
+ export type QUTIL_VariableOptions = {
223
+ readonly variable: bigint;
224
+ readonly value: bigint;
225
+ };
226
+ export type QUTIL_Vote_input = {
227
+ readonly poll_id: bigint;
228
+ readonly address: string;
229
+ readonly amount: bigint;
230
+ readonly chosen_option: bigint;
231
+ };
232
+ export type QUTIL_Vote_output = {
233
+ readonly success: boolean;
234
+ };
235
+ export type QUTIL_Data = ReadonlyArray<number>;
236
+ export type QUTIL_GetFees_input = Record<string, never>;
237
+ export type QUTIL_GetShareholderProposalFees_input = Record<string, never>;
238
+ export type QUTIL_GetShareholderVotes_output = QUTIL_ProposalMultiVoteDataV1;
239
+ export type QUTIL_GetShareholderVotingResults_output = QUTIL_ProposalSummarizedVotingDataV1;
240
+ export type QUTIL_GetTotalNumberOfAssetShares_input = QUTIL_Asset;
241
+ export type QUTIL_GetTotalNumberOfAssetShares_output = bigint;
242
+ export type QUTIL_ProposalDataT = QUTIL_ProposalDataYesNo;
243
+ export type QUTIL_SetShareholderProposal_input = QUTIL_ProposalDataT;
244
+ export type QUTIL_SetShareholderProposal_output = number;
245
+ export type QUTIL_SetShareholderVotes_input = QUTIL_ProposalMultiVoteDataV1;
246
+ export type QUTIL_SetShareholderVotes_output = boolean;
247
+
248
+ export interface ContractTypeMap {
249
+ QUTIL: {
250
+ readonly contractIndex: 4;
251
+ readonly functions: {
252
+ GetSendToManyV1Fee: {
253
+ readonly kind: "function";
254
+ readonly inputType: 1;
255
+ readonly inputTypeName: "GetSendToManyV1Fee_input";
256
+ readonly outputTypeName: "GetSendToManyV1Fee_output";
257
+ readonly input: QUTIL_GetSendToManyV1Fee_input;
258
+ readonly output: QUTIL_GetSendToManyV1Fee_output;
259
+ };
260
+ GetTotalNumberOfAssetShares: {
261
+ readonly kind: "function";
262
+ readonly inputType: 2;
263
+ readonly inputTypeName: "GetTotalNumberOfAssetShares_input";
264
+ readonly outputTypeName: "GetTotalNumberOfAssetShares_output";
265
+ readonly input: QUTIL_GetTotalNumberOfAssetShares_input;
266
+ readonly output: QUTIL_GetTotalNumberOfAssetShares_output;
267
+ };
268
+ GetCurrentResult: {
269
+ readonly kind: "function";
270
+ readonly inputType: 3;
271
+ readonly inputTypeName: "GetCurrentResult_input";
272
+ readonly outputTypeName: "GetCurrentResult_output";
273
+ readonly input: QUTIL_GetCurrentResult_input;
274
+ readonly output: QUTIL_GetCurrentResult_output;
275
+ };
276
+ GetPollsByCreator: {
277
+ readonly kind: "function";
278
+ readonly inputType: 4;
279
+ readonly inputTypeName: "GetPollsByCreator_input";
280
+ readonly outputTypeName: "GetPollsByCreator_output";
281
+ readonly input: QUTIL_GetPollsByCreator_input;
282
+ readonly output: QUTIL_GetPollsByCreator_output;
283
+ };
284
+ GetCurrentPollId: {
285
+ readonly kind: "function";
286
+ readonly inputType: 5;
287
+ readonly inputTypeName: "GetCurrentPollId_input";
288
+ readonly outputTypeName: "GetCurrentPollId_output";
289
+ readonly input: QUTIL_GetCurrentPollId_input;
290
+ readonly output: QUTIL_GetCurrentPollId_output;
291
+ };
292
+ GetPollInfo: {
293
+ readonly kind: "function";
294
+ readonly inputType: 6;
295
+ readonly inputTypeName: "GetPollInfo_input";
296
+ readonly outputTypeName: "GetPollInfo_output";
297
+ readonly input: QUTIL_GetPollInfo_input;
298
+ readonly output: QUTIL_GetPollInfo_output;
299
+ };
300
+ GetFees: {
301
+ readonly kind: "function";
302
+ readonly inputType: 7;
303
+ readonly inputTypeName: "GetFees_input";
304
+ readonly outputTypeName: "GetFees_output";
305
+ readonly input: QUTIL_GetFees_input;
306
+ readonly output: QUTIL_GetFees_output;
307
+ };
308
+ QueryFeeReserve: {
309
+ readonly kind: "function";
310
+ readonly inputType: 8;
311
+ readonly inputTypeName: "QueryFeeReserve_input";
312
+ readonly outputTypeName: "QueryFeeReserve_output";
313
+ readonly input: QUTIL_QueryFeeReserve_input;
314
+ readonly output: QUTIL_QueryFeeReserve_output;
315
+ };
316
+ GetShareholderProposalFees: {
317
+ readonly kind: "function";
318
+ readonly inputType: 65531;
319
+ readonly inputTypeName: "GetShareholderProposalFees_input";
320
+ readonly outputTypeName: "GetShareholderProposalFees_output";
321
+ readonly input: QUTIL_GetShareholderProposalFees_input;
322
+ readonly output: QUTIL_GetShareholderProposalFees_output;
323
+ };
324
+ GetShareholderProposalIndices: {
325
+ readonly kind: "function";
326
+ readonly inputType: 65532;
327
+ readonly inputTypeName: "GetShareholderProposalIndices_input";
328
+ readonly outputTypeName: "GetShareholderProposalIndices_output";
329
+ readonly input: QUTIL_GetShareholderProposalIndices_input;
330
+ readonly output: QUTIL_GetShareholderProposalIndices_output;
331
+ };
332
+ GetShareholderProposal: {
333
+ readonly kind: "function";
334
+ readonly inputType: 65533;
335
+ readonly inputTypeName: "GetShareholderProposal_input";
336
+ readonly outputTypeName: "GetShareholderProposal_output";
337
+ readonly input: QUTIL_GetShareholderProposal_input;
338
+ readonly output: QUTIL_GetShareholderProposal_output;
339
+ };
340
+ GetShareholderVotes: {
341
+ readonly kind: "function";
342
+ readonly inputType: 65534;
343
+ readonly inputTypeName: "GetShareholderVotes_input";
344
+ readonly outputTypeName: "GetShareholderVotes_output";
345
+ readonly input: QUTIL_GetShareholderVotes_input;
346
+ readonly output: QUTIL_GetShareholderVotes_output;
347
+ };
348
+ GetShareholderVotingResults: {
349
+ readonly kind: "function";
350
+ readonly inputType: 65535;
351
+ readonly inputTypeName: "GetShareholderVotingResults_input";
352
+ readonly outputTypeName: "GetShareholderVotingResults_output";
353
+ readonly input: QUTIL_GetShareholderVotingResults_input;
354
+ readonly output: QUTIL_GetShareholderVotingResults_output;
355
+ };
356
+ };
357
+ readonly procedures: {
358
+ SendToManyV1: {
359
+ readonly kind: "procedure";
360
+ readonly inputType: 1;
361
+ readonly inputTypeName: "SendToManyV1_input";
362
+ readonly outputTypeName: "SendToManyV1_output";
363
+ readonly input: QUTIL_SendToManyV1_input;
364
+ readonly output: QUTIL_SendToManyV1_output;
365
+ };
366
+ BurnQubic: {
367
+ readonly kind: "procedure";
368
+ readonly inputType: 2;
369
+ readonly inputTypeName: "BurnQubic_input";
370
+ readonly outputTypeName: "BurnQubic_output";
371
+ readonly input: QUTIL_BurnQubic_input;
372
+ readonly output: QUTIL_BurnQubic_output;
373
+ };
374
+ SendToManyBenchmark: {
375
+ readonly kind: "procedure";
376
+ readonly inputType: 3;
377
+ readonly inputTypeName: "SendToManyBenchmark_input";
378
+ readonly outputTypeName: "SendToManyBenchmark_output";
379
+ readonly input: QUTIL_SendToManyBenchmark_input;
380
+ readonly output: QUTIL_SendToManyBenchmark_output;
381
+ };
382
+ CreatePoll: {
383
+ readonly kind: "procedure";
384
+ readonly inputType: 4;
385
+ readonly inputTypeName: "CreatePoll_input";
386
+ readonly outputTypeName: "CreatePoll_output";
387
+ readonly input: QUTIL_CreatePoll_input;
388
+ readonly output: QUTIL_CreatePoll_output;
389
+ };
390
+ Vote: {
391
+ readonly kind: "procedure";
392
+ readonly inputType: 5;
393
+ readonly inputTypeName: "Vote_input";
394
+ readonly outputTypeName: "Vote_output";
395
+ readonly input: QUTIL_Vote_input;
396
+ readonly output: QUTIL_Vote_output;
397
+ };
398
+ CancelPoll: {
399
+ readonly kind: "procedure";
400
+ readonly inputType: 6;
401
+ readonly inputTypeName: "CancelPoll_input";
402
+ readonly outputTypeName: "CancelPoll_output";
403
+ readonly input: QUTIL_CancelPoll_input;
404
+ readonly output: QUTIL_CancelPoll_output;
405
+ };
406
+ DistributeQuToShareholders: {
407
+ readonly kind: "procedure";
408
+ readonly inputType: 7;
409
+ readonly inputTypeName: "DistributeQuToShareholders_input";
410
+ readonly outputTypeName: "DistributeQuToShareholders_output";
411
+ readonly input: QUTIL_DistributeQuToShareholders_input;
412
+ readonly output: QUTIL_DistributeQuToShareholders_output;
413
+ };
414
+ BurnQubicForContract: {
415
+ readonly kind: "procedure";
416
+ readonly inputType: 8;
417
+ readonly inputTypeName: "BurnQubicForContract_input";
418
+ readonly outputTypeName: "BurnQubicForContract_output";
419
+ readonly input: QUTIL_BurnQubicForContract_input;
420
+ readonly output: QUTIL_BurnQubicForContract_output;
421
+ };
422
+ SetShareholderProposal: {
423
+ readonly kind: "procedure";
424
+ readonly inputType: 65534;
425
+ readonly inputTypeName: "SetShareholderProposal_input";
426
+ readonly outputTypeName: "SetShareholderProposal_output";
427
+ readonly input: QUTIL_SetShareholderProposal_input;
428
+ readonly output: QUTIL_SetShareholderProposal_output;
429
+ };
430
+ SetShareholderVotes: {
431
+ readonly kind: "procedure";
432
+ readonly inputType: 65535;
433
+ readonly inputTypeName: "SetShareholderVotes_input";
434
+ readonly outputTypeName: "SetShareholderVotes_output";
435
+ readonly input: QUTIL_SetShareholderVotes_input;
436
+ readonly output: QUTIL_SetShareholderVotes_output;
437
+ };
438
+ };
439
+ };
440
+ }
441
+
442
+ export type ContractName = keyof ContractTypeMap & string;
443
+ export type FunctionName<C extends ContractName> = keyof ContractTypeMap[C]["functions"] & string;
444
+ export type ProcedureName<C extends ContractName> = keyof ContractTypeMap[C]["procedures"] & string;
445
+
446
+ export type FunctionInput<
447
+ C extends ContractName,
448
+ F extends FunctionName<C>,
449
+ > = ContractTypeMap[C]["functions"][F]["input"];
450
+ export type FunctionOutput<
451
+ C extends ContractName,
452
+ F extends FunctionName<C>,
453
+ > = ContractTypeMap[C]["functions"][F]["output"];
454
+
455
+ export type ProcedureInput<
456
+ C extends ContractName,
457
+ P extends ProcedureName<C>,
458
+ > = ContractTypeMap[C]["procedures"][P]["input"];
459
+ export type ProcedureOutput<
460
+ C extends ContractName,
461
+ P extends ProcedureName<C>,
462
+ > = ContractTypeMap[C]["procedures"][P]["output"];
463
+
464
+ export const contractCodecRegistry = {
465
+ QUTIL: {
466
+ contractIndex: 4,
467
+ functions: {
468
+ GetSendToManyV1Fee: {
469
+ kind: "function",
470
+ inputType: 1,
471
+ inputTypeName: "GetSendToManyV1Fee_input",
472
+ outputTypeName: "GetSendToManyV1Fee_output",
473
+ },
474
+ GetTotalNumberOfAssetShares: {
475
+ kind: "function",
476
+ inputType: 2,
477
+ inputTypeName: "GetTotalNumberOfAssetShares_input",
478
+ outputTypeName: "GetTotalNumberOfAssetShares_output",
479
+ },
480
+ GetCurrentResult: {
481
+ kind: "function",
482
+ inputType: 3,
483
+ inputTypeName: "GetCurrentResult_input",
484
+ outputTypeName: "GetCurrentResult_output",
485
+ },
486
+ GetPollsByCreator: {
487
+ kind: "function",
488
+ inputType: 4,
489
+ inputTypeName: "GetPollsByCreator_input",
490
+ outputTypeName: "GetPollsByCreator_output",
491
+ },
492
+ GetCurrentPollId: {
493
+ kind: "function",
494
+ inputType: 5,
495
+ inputTypeName: "GetCurrentPollId_input",
496
+ outputTypeName: "GetCurrentPollId_output",
497
+ },
498
+ GetPollInfo: {
499
+ kind: "function",
500
+ inputType: 6,
501
+ inputTypeName: "GetPollInfo_input",
502
+ outputTypeName: "GetPollInfo_output",
503
+ },
504
+ GetFees: {
505
+ kind: "function",
506
+ inputType: 7,
507
+ inputTypeName: "GetFees_input",
508
+ outputTypeName: "GetFees_output",
509
+ },
510
+ QueryFeeReserve: {
511
+ kind: "function",
512
+ inputType: 8,
513
+ inputTypeName: "QueryFeeReserve_input",
514
+ outputTypeName: "QueryFeeReserve_output",
515
+ },
516
+ GetShareholderProposalFees: {
517
+ kind: "function",
518
+ inputType: 65531,
519
+ inputTypeName: "GetShareholderProposalFees_input",
520
+ outputTypeName: "GetShareholderProposalFees_output",
521
+ },
522
+ GetShareholderProposalIndices: {
523
+ kind: "function",
524
+ inputType: 65532,
525
+ inputTypeName: "GetShareholderProposalIndices_input",
526
+ outputTypeName: "GetShareholderProposalIndices_output",
527
+ },
528
+ GetShareholderProposal: {
529
+ kind: "function",
530
+ inputType: 65533,
531
+ inputTypeName: "GetShareholderProposal_input",
532
+ outputTypeName: "GetShareholderProposal_output",
533
+ },
534
+ GetShareholderVotes: {
535
+ kind: "function",
536
+ inputType: 65534,
537
+ inputTypeName: "GetShareholderVotes_input",
538
+ outputTypeName: "GetShareholderVotes_output",
539
+ },
540
+ GetShareholderVotingResults: {
541
+ kind: "function",
542
+ inputType: 65535,
543
+ inputTypeName: "GetShareholderVotingResults_input",
544
+ outputTypeName: "GetShareholderVotingResults_output",
545
+ },
546
+ },
547
+ procedures: {
548
+ SendToManyV1: {
549
+ kind: "procedure",
550
+ inputType: 1,
551
+ inputTypeName: "SendToManyV1_input",
552
+ outputTypeName: "SendToManyV1_output",
553
+ },
554
+ BurnQubic: {
555
+ kind: "procedure",
556
+ inputType: 2,
557
+ inputTypeName: "BurnQubic_input",
558
+ outputTypeName: "BurnQubic_output",
559
+ },
560
+ SendToManyBenchmark: {
561
+ kind: "procedure",
562
+ inputType: 3,
563
+ inputTypeName: "SendToManyBenchmark_input",
564
+ outputTypeName: "SendToManyBenchmark_output",
565
+ },
566
+ CreatePoll: {
567
+ kind: "procedure",
568
+ inputType: 4,
569
+ inputTypeName: "CreatePoll_input",
570
+ outputTypeName: "CreatePoll_output",
571
+ },
572
+ Vote: {
573
+ kind: "procedure",
574
+ inputType: 5,
575
+ inputTypeName: "Vote_input",
576
+ outputTypeName: "Vote_output",
577
+ },
578
+ CancelPoll: {
579
+ kind: "procedure",
580
+ inputType: 6,
581
+ inputTypeName: "CancelPoll_input",
582
+ outputTypeName: "CancelPoll_output",
583
+ },
584
+ DistributeQuToShareholders: {
585
+ kind: "procedure",
586
+ inputType: 7,
587
+ inputTypeName: "DistributeQuToShareholders_input",
588
+ outputTypeName: "DistributeQuToShareholders_output",
589
+ },
590
+ BurnQubicForContract: {
591
+ kind: "procedure",
592
+ inputType: 8,
593
+ inputTypeName: "BurnQubicForContract_input",
594
+ outputTypeName: "BurnQubicForContract_output",
595
+ },
596
+ SetShareholderProposal: {
597
+ kind: "procedure",
598
+ inputType: 65534,
599
+ inputTypeName: "SetShareholderProposal_input",
600
+ outputTypeName: "SetShareholderProposal_output",
601
+ },
602
+ SetShareholderVotes: {
603
+ kind: "procedure",
604
+ inputType: 65535,
605
+ inputTypeName: "SetShareholderVotes_input",
606
+ outputTypeName: "SetShareholderVotes_output",
607
+ },
608
+ },
609
+ },
610
+ } as const satisfies Readonly<Record<ContractName, unknown>>;
611
+
612
+ export type RuntimeContractCodecRegistry = typeof contractCodecRegistry;