@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,446 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* This file is generated. Do not edit manually. */
|
|
3
|
+
|
|
4
|
+
export type QRAFFLE_depositInQuRaffle_input = Record<string, never>;
|
|
5
|
+
export type QRAFFLE_depositInQuRaffle_output = {
|
|
6
|
+
readonly returnCode: number;
|
|
7
|
+
};
|
|
8
|
+
export type QRAFFLE_depositInTokenRaffle_input = {
|
|
9
|
+
readonly indexOfTokenRaffle: number;
|
|
10
|
+
};
|
|
11
|
+
export type QRAFFLE_depositInTokenRaffle_output = {
|
|
12
|
+
readonly returnCode: number;
|
|
13
|
+
};
|
|
14
|
+
export type QRAFFLE_getActiveProposal_input = {
|
|
15
|
+
readonly indexOfProposal: number;
|
|
16
|
+
};
|
|
17
|
+
export type QRAFFLE_getActiveProposal_output = {
|
|
18
|
+
readonly tokenIssuer: string;
|
|
19
|
+
readonly proposer: string;
|
|
20
|
+
readonly tokenName: bigint;
|
|
21
|
+
readonly entryAmount: bigint;
|
|
22
|
+
readonly nYes: number;
|
|
23
|
+
readonly nNo: number;
|
|
24
|
+
readonly returnCode: number;
|
|
25
|
+
};
|
|
26
|
+
export type QRAFFLE_getActiveTokenRaffle_input = {
|
|
27
|
+
readonly indexOfTokenRaffle: number;
|
|
28
|
+
};
|
|
29
|
+
export type QRAFFLE_getActiveTokenRaffle_output = {
|
|
30
|
+
readonly tokenIssuer: string;
|
|
31
|
+
readonly tokenName: bigint;
|
|
32
|
+
readonly entryAmount: bigint;
|
|
33
|
+
readonly numberOfMembers: number;
|
|
34
|
+
readonly returnCode: number;
|
|
35
|
+
};
|
|
36
|
+
export type QRAFFLE_getAnalytics_input = Record<string, never>;
|
|
37
|
+
export type QRAFFLE_getAnalytics_output = {
|
|
38
|
+
readonly currentQuRaffleAmount: bigint;
|
|
39
|
+
readonly totalBurnAmount: bigint;
|
|
40
|
+
readonly totalCharityAmount: bigint;
|
|
41
|
+
readonly totalShareholderAmount: bigint;
|
|
42
|
+
readonly totalRegisterAmount: bigint;
|
|
43
|
+
readonly totalFeeAmount: bigint;
|
|
44
|
+
readonly totalWinnerAmount: bigint;
|
|
45
|
+
readonly largestWinnerAmount: bigint;
|
|
46
|
+
readonly numberOfRegisters: number;
|
|
47
|
+
readonly numberOfProposals: number;
|
|
48
|
+
readonly numberOfQuRaffleMembers: number;
|
|
49
|
+
readonly numberOfActiveTokenRaffle: number;
|
|
50
|
+
readonly numberOfEndedTokenRaffle: number;
|
|
51
|
+
readonly numberOfEntryAmountSubmitted: number;
|
|
52
|
+
readonly returnCode: number;
|
|
53
|
+
};
|
|
54
|
+
export type QRAFFLE_getEndedQuRaffle_input = {
|
|
55
|
+
readonly epoch: number;
|
|
56
|
+
};
|
|
57
|
+
export type QRAFFLE_getEndedQuRaffle_output = {
|
|
58
|
+
readonly epochWinner: string;
|
|
59
|
+
readonly receivedAmount: bigint;
|
|
60
|
+
readonly entryAmount: bigint;
|
|
61
|
+
readonly numberOfMembers: number;
|
|
62
|
+
readonly winnerIndex: number;
|
|
63
|
+
readonly returnCode: number;
|
|
64
|
+
};
|
|
65
|
+
export type QRAFFLE_getEndedTokenRaffle_input = {
|
|
66
|
+
readonly indexOfRaffle: number;
|
|
67
|
+
};
|
|
68
|
+
export type QRAFFLE_getEndedTokenRaffle_output = {
|
|
69
|
+
readonly epochWinner: string;
|
|
70
|
+
readonly tokenIssuer: string;
|
|
71
|
+
readonly tokenName: bigint;
|
|
72
|
+
readonly entryAmount: bigint;
|
|
73
|
+
readonly numberOfMembers: number;
|
|
74
|
+
readonly winnerIndex: number;
|
|
75
|
+
readonly epoch: number;
|
|
76
|
+
readonly returnCode: number;
|
|
77
|
+
};
|
|
78
|
+
export type QRAFFLE_getEpochRaffleIndexes_input = {
|
|
79
|
+
readonly epoch: number;
|
|
80
|
+
};
|
|
81
|
+
export type QRAFFLE_getEpochRaffleIndexes_output = {
|
|
82
|
+
readonly StartIndex: number;
|
|
83
|
+
readonly EndIndex: number;
|
|
84
|
+
readonly returnCode: number;
|
|
85
|
+
};
|
|
86
|
+
export type QRAFFLE_getQuRaffleEntryAmountPerUser_input = {
|
|
87
|
+
readonly user: string;
|
|
88
|
+
};
|
|
89
|
+
export type QRAFFLE_getQuRaffleEntryAmountPerUser_output = {
|
|
90
|
+
readonly entryAmount: bigint;
|
|
91
|
+
readonly returnCode: number;
|
|
92
|
+
};
|
|
93
|
+
export type QRAFFLE_getQuRaffleEntryAverageAmount_input = Record<string, never>;
|
|
94
|
+
export type QRAFFLE_getQuRaffleEntryAverageAmount_output = {
|
|
95
|
+
readonly entryAverageAmount: bigint;
|
|
96
|
+
readonly returnCode: number;
|
|
97
|
+
};
|
|
98
|
+
export type QRAFFLE_getRegisters_input = {
|
|
99
|
+
readonly offset: number;
|
|
100
|
+
readonly limit: number;
|
|
101
|
+
};
|
|
102
|
+
export type QRAFFLE_getRegisters_output = {
|
|
103
|
+
readonly register1: string;
|
|
104
|
+
readonly register2: string;
|
|
105
|
+
readonly register3: string;
|
|
106
|
+
readonly register4: string;
|
|
107
|
+
readonly register5: string;
|
|
108
|
+
readonly register6: string;
|
|
109
|
+
readonly register7: string;
|
|
110
|
+
readonly register8: string;
|
|
111
|
+
readonly register9: string;
|
|
112
|
+
readonly register10: string;
|
|
113
|
+
readonly register11: string;
|
|
114
|
+
readonly register12: string;
|
|
115
|
+
readonly register13: string;
|
|
116
|
+
readonly register14: string;
|
|
117
|
+
readonly register15: string;
|
|
118
|
+
readonly register16: string;
|
|
119
|
+
readonly register17: string;
|
|
120
|
+
readonly register18: string;
|
|
121
|
+
readonly register19: string;
|
|
122
|
+
readonly register20: string;
|
|
123
|
+
readonly returnCode: number;
|
|
124
|
+
};
|
|
125
|
+
export type QRAFFLE_logoutInSystem_input = Record<string, never>;
|
|
126
|
+
export type QRAFFLE_logoutInSystem_output = {
|
|
127
|
+
readonly returnCode: number;
|
|
128
|
+
};
|
|
129
|
+
export type QRAFFLE_registerInSystem_input = {
|
|
130
|
+
readonly useQXMR: boolean;
|
|
131
|
+
};
|
|
132
|
+
export type QRAFFLE_registerInSystem_output = {
|
|
133
|
+
readonly returnCode: number;
|
|
134
|
+
};
|
|
135
|
+
export type QRAFFLE_submitEntryAmount_input = {
|
|
136
|
+
readonly amount: bigint;
|
|
137
|
+
};
|
|
138
|
+
export type QRAFFLE_submitEntryAmount_output = {
|
|
139
|
+
readonly returnCode: number;
|
|
140
|
+
};
|
|
141
|
+
export type QRAFFLE_submitProposal_input = {
|
|
142
|
+
readonly tokenIssuer: string;
|
|
143
|
+
readonly tokenName: bigint;
|
|
144
|
+
readonly entryAmount: bigint;
|
|
145
|
+
};
|
|
146
|
+
export type QRAFFLE_submitProposal_output = {
|
|
147
|
+
readonly returnCode: number;
|
|
148
|
+
};
|
|
149
|
+
export type QRAFFLE_TransferShareManagementRights_input = {
|
|
150
|
+
readonly tokenIssuer: string;
|
|
151
|
+
readonly tokenName: bigint;
|
|
152
|
+
readonly numberOfShares: bigint;
|
|
153
|
+
readonly newManagingContractIndex: number;
|
|
154
|
+
};
|
|
155
|
+
export type QRAFFLE_TransferShareManagementRights_output = {
|
|
156
|
+
readonly transferredNumberOfShares: bigint;
|
|
157
|
+
};
|
|
158
|
+
export type QRAFFLE_voteInProposal_input = {
|
|
159
|
+
readonly indexOfProposal: number;
|
|
160
|
+
readonly yes: boolean;
|
|
161
|
+
};
|
|
162
|
+
export type QRAFFLE_voteInProposal_output = {
|
|
163
|
+
readonly returnCode: number;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export interface ContractTypeMap {
|
|
167
|
+
QRAFFLE: {
|
|
168
|
+
readonly contractIndex: 19;
|
|
169
|
+
readonly functions: {
|
|
170
|
+
getRegisters: {
|
|
171
|
+
readonly kind: "function";
|
|
172
|
+
readonly inputType: 1;
|
|
173
|
+
readonly inputTypeName: "getRegisters_input";
|
|
174
|
+
readonly outputTypeName: "getRegisters_output";
|
|
175
|
+
readonly input: QRAFFLE_getRegisters_input;
|
|
176
|
+
readonly output: QRAFFLE_getRegisters_output;
|
|
177
|
+
};
|
|
178
|
+
getAnalytics: {
|
|
179
|
+
readonly kind: "function";
|
|
180
|
+
readonly inputType: 2;
|
|
181
|
+
readonly inputTypeName: "getAnalytics_input";
|
|
182
|
+
readonly outputTypeName: "getAnalytics_output";
|
|
183
|
+
readonly input: QRAFFLE_getAnalytics_input;
|
|
184
|
+
readonly output: QRAFFLE_getAnalytics_output;
|
|
185
|
+
};
|
|
186
|
+
getActiveProposal: {
|
|
187
|
+
readonly kind: "function";
|
|
188
|
+
readonly inputType: 3;
|
|
189
|
+
readonly inputTypeName: "getActiveProposal_input";
|
|
190
|
+
readonly outputTypeName: "getActiveProposal_output";
|
|
191
|
+
readonly input: QRAFFLE_getActiveProposal_input;
|
|
192
|
+
readonly output: QRAFFLE_getActiveProposal_output;
|
|
193
|
+
};
|
|
194
|
+
getEndedTokenRaffle: {
|
|
195
|
+
readonly kind: "function";
|
|
196
|
+
readonly inputType: 4;
|
|
197
|
+
readonly inputTypeName: "getEndedTokenRaffle_input";
|
|
198
|
+
readonly outputTypeName: "getEndedTokenRaffle_output";
|
|
199
|
+
readonly input: QRAFFLE_getEndedTokenRaffle_input;
|
|
200
|
+
readonly output: QRAFFLE_getEndedTokenRaffle_output;
|
|
201
|
+
};
|
|
202
|
+
getEndedQuRaffle: {
|
|
203
|
+
readonly kind: "function";
|
|
204
|
+
readonly inputType: 5;
|
|
205
|
+
readonly inputTypeName: "getEndedQuRaffle_input";
|
|
206
|
+
readonly outputTypeName: "getEndedQuRaffle_output";
|
|
207
|
+
readonly input: QRAFFLE_getEndedQuRaffle_input;
|
|
208
|
+
readonly output: QRAFFLE_getEndedQuRaffle_output;
|
|
209
|
+
};
|
|
210
|
+
getActiveTokenRaffle: {
|
|
211
|
+
readonly kind: "function";
|
|
212
|
+
readonly inputType: 6;
|
|
213
|
+
readonly inputTypeName: "getActiveTokenRaffle_input";
|
|
214
|
+
readonly outputTypeName: "getActiveTokenRaffle_output";
|
|
215
|
+
readonly input: QRAFFLE_getActiveTokenRaffle_input;
|
|
216
|
+
readonly output: QRAFFLE_getActiveTokenRaffle_output;
|
|
217
|
+
};
|
|
218
|
+
getEpochRaffleIndexes: {
|
|
219
|
+
readonly kind: "function";
|
|
220
|
+
readonly inputType: 7;
|
|
221
|
+
readonly inputTypeName: "getEpochRaffleIndexes_input";
|
|
222
|
+
readonly outputTypeName: "getEpochRaffleIndexes_output";
|
|
223
|
+
readonly input: QRAFFLE_getEpochRaffleIndexes_input;
|
|
224
|
+
readonly output: QRAFFLE_getEpochRaffleIndexes_output;
|
|
225
|
+
};
|
|
226
|
+
getQuRaffleEntryAmountPerUser: {
|
|
227
|
+
readonly kind: "function";
|
|
228
|
+
readonly inputType: 8;
|
|
229
|
+
readonly inputTypeName: "getQuRaffleEntryAmountPerUser_input";
|
|
230
|
+
readonly outputTypeName: "getQuRaffleEntryAmountPerUser_output";
|
|
231
|
+
readonly input: QRAFFLE_getQuRaffleEntryAmountPerUser_input;
|
|
232
|
+
readonly output: QRAFFLE_getQuRaffleEntryAmountPerUser_output;
|
|
233
|
+
};
|
|
234
|
+
getQuRaffleEntryAverageAmount: {
|
|
235
|
+
readonly kind: "function";
|
|
236
|
+
readonly inputType: 9;
|
|
237
|
+
readonly inputTypeName: "getQuRaffleEntryAverageAmount_input";
|
|
238
|
+
readonly outputTypeName: "getQuRaffleEntryAverageAmount_output";
|
|
239
|
+
readonly input: QRAFFLE_getQuRaffleEntryAverageAmount_input;
|
|
240
|
+
readonly output: QRAFFLE_getQuRaffleEntryAverageAmount_output;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly procedures: {
|
|
244
|
+
registerInSystem: {
|
|
245
|
+
readonly kind: "procedure";
|
|
246
|
+
readonly inputType: 1;
|
|
247
|
+
readonly inputTypeName: "registerInSystem_input";
|
|
248
|
+
readonly outputTypeName: "registerInSystem_output";
|
|
249
|
+
readonly input: QRAFFLE_registerInSystem_input;
|
|
250
|
+
readonly output: QRAFFLE_registerInSystem_output;
|
|
251
|
+
};
|
|
252
|
+
logoutInSystem: {
|
|
253
|
+
readonly kind: "procedure";
|
|
254
|
+
readonly inputType: 2;
|
|
255
|
+
readonly inputTypeName: "logoutInSystem_input";
|
|
256
|
+
readonly outputTypeName: "logoutInSystem_output";
|
|
257
|
+
readonly input: QRAFFLE_logoutInSystem_input;
|
|
258
|
+
readonly output: QRAFFLE_logoutInSystem_output;
|
|
259
|
+
};
|
|
260
|
+
submitEntryAmount: {
|
|
261
|
+
readonly kind: "procedure";
|
|
262
|
+
readonly inputType: 3;
|
|
263
|
+
readonly inputTypeName: "submitEntryAmount_input";
|
|
264
|
+
readonly outputTypeName: "submitEntryAmount_output";
|
|
265
|
+
readonly input: QRAFFLE_submitEntryAmount_input;
|
|
266
|
+
readonly output: QRAFFLE_submitEntryAmount_output;
|
|
267
|
+
};
|
|
268
|
+
submitProposal: {
|
|
269
|
+
readonly kind: "procedure";
|
|
270
|
+
readonly inputType: 4;
|
|
271
|
+
readonly inputTypeName: "submitProposal_input";
|
|
272
|
+
readonly outputTypeName: "submitProposal_output";
|
|
273
|
+
readonly input: QRAFFLE_submitProposal_input;
|
|
274
|
+
readonly output: QRAFFLE_submitProposal_output;
|
|
275
|
+
};
|
|
276
|
+
voteInProposal: {
|
|
277
|
+
readonly kind: "procedure";
|
|
278
|
+
readonly inputType: 5;
|
|
279
|
+
readonly inputTypeName: "voteInProposal_input";
|
|
280
|
+
readonly outputTypeName: "voteInProposal_output";
|
|
281
|
+
readonly input: QRAFFLE_voteInProposal_input;
|
|
282
|
+
readonly output: QRAFFLE_voteInProposal_output;
|
|
283
|
+
};
|
|
284
|
+
depositInQuRaffle: {
|
|
285
|
+
readonly kind: "procedure";
|
|
286
|
+
readonly inputType: 6;
|
|
287
|
+
readonly inputTypeName: "depositInQuRaffle_input";
|
|
288
|
+
readonly outputTypeName: "depositInQuRaffle_output";
|
|
289
|
+
readonly input: QRAFFLE_depositInQuRaffle_input;
|
|
290
|
+
readonly output: QRAFFLE_depositInQuRaffle_output;
|
|
291
|
+
};
|
|
292
|
+
depositInTokenRaffle: {
|
|
293
|
+
readonly kind: "procedure";
|
|
294
|
+
readonly inputType: 7;
|
|
295
|
+
readonly inputTypeName: "depositInTokenRaffle_input";
|
|
296
|
+
readonly outputTypeName: "depositInTokenRaffle_output";
|
|
297
|
+
readonly input: QRAFFLE_depositInTokenRaffle_input;
|
|
298
|
+
readonly output: QRAFFLE_depositInTokenRaffle_output;
|
|
299
|
+
};
|
|
300
|
+
TransferShareManagementRights: {
|
|
301
|
+
readonly kind: "procedure";
|
|
302
|
+
readonly inputType: 8;
|
|
303
|
+
readonly inputTypeName: "TransferShareManagementRights_input";
|
|
304
|
+
readonly outputTypeName: "TransferShareManagementRights_output";
|
|
305
|
+
readonly input: QRAFFLE_TransferShareManagementRights_input;
|
|
306
|
+
readonly output: QRAFFLE_TransferShareManagementRights_output;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export type ContractName = keyof ContractTypeMap & string;
|
|
313
|
+
export type FunctionName<C extends ContractName> = keyof ContractTypeMap[C]["functions"] & string;
|
|
314
|
+
export type ProcedureName<C extends ContractName> = keyof ContractTypeMap[C]["procedures"] & string;
|
|
315
|
+
|
|
316
|
+
export type FunctionInput<
|
|
317
|
+
C extends ContractName,
|
|
318
|
+
F extends FunctionName<C>,
|
|
319
|
+
> = ContractTypeMap[C]["functions"][F]["input"];
|
|
320
|
+
export type FunctionOutput<
|
|
321
|
+
C extends ContractName,
|
|
322
|
+
F extends FunctionName<C>,
|
|
323
|
+
> = ContractTypeMap[C]["functions"][F]["output"];
|
|
324
|
+
|
|
325
|
+
export type ProcedureInput<
|
|
326
|
+
C extends ContractName,
|
|
327
|
+
P extends ProcedureName<C>,
|
|
328
|
+
> = ContractTypeMap[C]["procedures"][P]["input"];
|
|
329
|
+
export type ProcedureOutput<
|
|
330
|
+
C extends ContractName,
|
|
331
|
+
P extends ProcedureName<C>,
|
|
332
|
+
> = ContractTypeMap[C]["procedures"][P]["output"];
|
|
333
|
+
|
|
334
|
+
export const contractCodecRegistry = {
|
|
335
|
+
QRAFFLE: {
|
|
336
|
+
contractIndex: 19,
|
|
337
|
+
functions: {
|
|
338
|
+
getRegisters: {
|
|
339
|
+
kind: "function",
|
|
340
|
+
inputType: 1,
|
|
341
|
+
inputTypeName: "getRegisters_input",
|
|
342
|
+
outputTypeName: "getRegisters_output",
|
|
343
|
+
},
|
|
344
|
+
getAnalytics: {
|
|
345
|
+
kind: "function",
|
|
346
|
+
inputType: 2,
|
|
347
|
+
inputTypeName: "getAnalytics_input",
|
|
348
|
+
outputTypeName: "getAnalytics_output",
|
|
349
|
+
},
|
|
350
|
+
getActiveProposal: {
|
|
351
|
+
kind: "function",
|
|
352
|
+
inputType: 3,
|
|
353
|
+
inputTypeName: "getActiveProposal_input",
|
|
354
|
+
outputTypeName: "getActiveProposal_output",
|
|
355
|
+
},
|
|
356
|
+
getEndedTokenRaffle: {
|
|
357
|
+
kind: "function",
|
|
358
|
+
inputType: 4,
|
|
359
|
+
inputTypeName: "getEndedTokenRaffle_input",
|
|
360
|
+
outputTypeName: "getEndedTokenRaffle_output",
|
|
361
|
+
},
|
|
362
|
+
getEndedQuRaffle: {
|
|
363
|
+
kind: "function",
|
|
364
|
+
inputType: 5,
|
|
365
|
+
inputTypeName: "getEndedQuRaffle_input",
|
|
366
|
+
outputTypeName: "getEndedQuRaffle_output",
|
|
367
|
+
},
|
|
368
|
+
getActiveTokenRaffle: {
|
|
369
|
+
kind: "function",
|
|
370
|
+
inputType: 6,
|
|
371
|
+
inputTypeName: "getActiveTokenRaffle_input",
|
|
372
|
+
outputTypeName: "getActiveTokenRaffle_output",
|
|
373
|
+
},
|
|
374
|
+
getEpochRaffleIndexes: {
|
|
375
|
+
kind: "function",
|
|
376
|
+
inputType: 7,
|
|
377
|
+
inputTypeName: "getEpochRaffleIndexes_input",
|
|
378
|
+
outputTypeName: "getEpochRaffleIndexes_output",
|
|
379
|
+
},
|
|
380
|
+
getQuRaffleEntryAmountPerUser: {
|
|
381
|
+
kind: "function",
|
|
382
|
+
inputType: 8,
|
|
383
|
+
inputTypeName: "getQuRaffleEntryAmountPerUser_input",
|
|
384
|
+
outputTypeName: "getQuRaffleEntryAmountPerUser_output",
|
|
385
|
+
},
|
|
386
|
+
getQuRaffleEntryAverageAmount: {
|
|
387
|
+
kind: "function",
|
|
388
|
+
inputType: 9,
|
|
389
|
+
inputTypeName: "getQuRaffleEntryAverageAmount_input",
|
|
390
|
+
outputTypeName: "getQuRaffleEntryAverageAmount_output",
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
procedures: {
|
|
394
|
+
registerInSystem: {
|
|
395
|
+
kind: "procedure",
|
|
396
|
+
inputType: 1,
|
|
397
|
+
inputTypeName: "registerInSystem_input",
|
|
398
|
+
outputTypeName: "registerInSystem_output",
|
|
399
|
+
},
|
|
400
|
+
logoutInSystem: {
|
|
401
|
+
kind: "procedure",
|
|
402
|
+
inputType: 2,
|
|
403
|
+
inputTypeName: "logoutInSystem_input",
|
|
404
|
+
outputTypeName: "logoutInSystem_output",
|
|
405
|
+
},
|
|
406
|
+
submitEntryAmount: {
|
|
407
|
+
kind: "procedure",
|
|
408
|
+
inputType: 3,
|
|
409
|
+
inputTypeName: "submitEntryAmount_input",
|
|
410
|
+
outputTypeName: "submitEntryAmount_output",
|
|
411
|
+
},
|
|
412
|
+
submitProposal: {
|
|
413
|
+
kind: "procedure",
|
|
414
|
+
inputType: 4,
|
|
415
|
+
inputTypeName: "submitProposal_input",
|
|
416
|
+
outputTypeName: "submitProposal_output",
|
|
417
|
+
},
|
|
418
|
+
voteInProposal: {
|
|
419
|
+
kind: "procedure",
|
|
420
|
+
inputType: 5,
|
|
421
|
+
inputTypeName: "voteInProposal_input",
|
|
422
|
+
outputTypeName: "voteInProposal_output",
|
|
423
|
+
},
|
|
424
|
+
depositInQuRaffle: {
|
|
425
|
+
kind: "procedure",
|
|
426
|
+
inputType: 6,
|
|
427
|
+
inputTypeName: "depositInQuRaffle_input",
|
|
428
|
+
outputTypeName: "depositInQuRaffle_output",
|
|
429
|
+
},
|
|
430
|
+
depositInTokenRaffle: {
|
|
431
|
+
kind: "procedure",
|
|
432
|
+
inputType: 7,
|
|
433
|
+
inputTypeName: "depositInTokenRaffle_input",
|
|
434
|
+
outputTypeName: "depositInTokenRaffle_output",
|
|
435
|
+
},
|
|
436
|
+
TransferShareManagementRights: {
|
|
437
|
+
kind: "procedure",
|
|
438
|
+
inputType: 8,
|
|
439
|
+
inputTypeName: "TransferShareManagementRights_input",
|
|
440
|
+
outputTypeName: "TransferShareManagementRights_output",
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
} as const satisfies Readonly<Record<ContractName, unknown>>;
|
|
445
|
+
|
|
446
|
+
export type RuntimeContractCodecRegistry = typeof contractCodecRegistry;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "QRP",
|
|
3
|
+
"contractIndex": 21,
|
|
4
|
+
"filename": "QReservePool.h",
|
|
5
|
+
"address": "VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAILLJ",
|
|
6
|
+
"entries": [
|
|
7
|
+
{
|
|
8
|
+
"kind": "function",
|
|
9
|
+
"name": "GetAvailableReserve",
|
|
10
|
+
"inputType": 1,
|
|
11
|
+
"inputTypeName": "GetAvailableReserve_input",
|
|
12
|
+
"outputTypeName": "GetAvailableReserve_output"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "function",
|
|
16
|
+
"name": "GetAllowedSC",
|
|
17
|
+
"inputType": 2,
|
|
18
|
+
"inputTypeName": "GetAllowedSC_input",
|
|
19
|
+
"outputTypeName": "GetAllowedSC_output"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"kind": "procedure",
|
|
23
|
+
"name": "WithdrawReserve",
|
|
24
|
+
"inputType": 1,
|
|
25
|
+
"inputTypeName": "WithdrawReserve_input",
|
|
26
|
+
"outputTypeName": "WithdrawReserve_output"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "procedure",
|
|
30
|
+
"name": "AddAllowedSC",
|
|
31
|
+
"inputType": 2,
|
|
32
|
+
"inputTypeName": "AddAllowedSC_input",
|
|
33
|
+
"outputTypeName": "AddAllowedSC_output"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"kind": "procedure",
|
|
37
|
+
"name": "RemoveAllowedSC",
|
|
38
|
+
"inputType": 3,
|
|
39
|
+
"inputTypeName": "RemoveAllowedSC_input",
|
|
40
|
+
"outputTypeName": "RemoveAllowedSC_output"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"ioTypes": [
|
|
44
|
+
{
|
|
45
|
+
"kind": "struct",
|
|
46
|
+
"name": "AddAllowedSC_input",
|
|
47
|
+
"fields": [
|
|
48
|
+
{
|
|
49
|
+
"name": "scIndex",
|
|
50
|
+
"type": "uint64"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "struct",
|
|
56
|
+
"name": "AddAllowedSC_output",
|
|
57
|
+
"fields": [
|
|
58
|
+
{
|
|
59
|
+
"name": "returnCode",
|
|
60
|
+
"type": "uint8"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "struct",
|
|
66
|
+
"name": "GetAllowedSC_input",
|
|
67
|
+
"fields": []
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"kind": "struct",
|
|
71
|
+
"name": "GetAllowedSC_output",
|
|
72
|
+
"fields": [
|
|
73
|
+
{
|
|
74
|
+
"name": "allowedSC",
|
|
75
|
+
"type": "Array<id, QRP_ALLOWED_SC_NUM>"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"kind": "struct",
|
|
81
|
+
"name": "GetAvailableReserve_input",
|
|
82
|
+
"fields": []
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"kind": "struct",
|
|
86
|
+
"name": "GetAvailableReserve_output",
|
|
87
|
+
"fields": [
|
|
88
|
+
{
|
|
89
|
+
"name": "availableReserve",
|
|
90
|
+
"type": "uint64"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"kind": "struct",
|
|
96
|
+
"name": "RemoveAllowedSC_input",
|
|
97
|
+
"fields": [
|
|
98
|
+
{
|
|
99
|
+
"name": "scIndex",
|
|
100
|
+
"type": "uint64"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "struct",
|
|
106
|
+
"name": "RemoveAllowedSC_output",
|
|
107
|
+
"fields": [
|
|
108
|
+
{
|
|
109
|
+
"name": "returnCode",
|
|
110
|
+
"type": "uint8"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "struct",
|
|
116
|
+
"name": "WithdrawReserve_input",
|
|
117
|
+
"fields": [
|
|
118
|
+
{
|
|
119
|
+
"name": "revenue",
|
|
120
|
+
"type": "uint64"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"kind": "struct",
|
|
126
|
+
"name": "WithdrawReserve_output",
|
|
127
|
+
"fields": [
|
|
128
|
+
{
|
|
129
|
+
"name": "allocatedRevenue",
|
|
130
|
+
"type": "uint64"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "returnCode",
|
|
134
|
+
"type": "uint8"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|