@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,479 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* This file is generated. Do not edit manually. */
|
|
3
|
+
|
|
4
|
+
export type QSWAP_AddLiquidity_input = {
|
|
5
|
+
readonly assetIssuer: string;
|
|
6
|
+
readonly assetName: bigint;
|
|
7
|
+
readonly assetAmountDesired: bigint;
|
|
8
|
+
readonly quAmountMin: bigint;
|
|
9
|
+
readonly assetAmountMin: bigint;
|
|
10
|
+
};
|
|
11
|
+
export type QSWAP_AddLiquidity_output = {
|
|
12
|
+
readonly userIncreaseLiquidity: bigint;
|
|
13
|
+
readonly quAmount: bigint;
|
|
14
|
+
readonly assetAmount: bigint;
|
|
15
|
+
};
|
|
16
|
+
export type QSWAP_Asset = {
|
|
17
|
+
readonly issuer: string;
|
|
18
|
+
readonly assetName: bigint;
|
|
19
|
+
};
|
|
20
|
+
export type QSWAP_CreatePool_input = {
|
|
21
|
+
readonly assetIssuer: string;
|
|
22
|
+
readonly assetName: bigint;
|
|
23
|
+
};
|
|
24
|
+
export type QSWAP_CreatePool_output = {
|
|
25
|
+
readonly success: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type QSWAP_Fees_input = Record<string, never>;
|
|
28
|
+
export type QSWAP_Fees_output = {
|
|
29
|
+
readonly assetIssuanceFee: number;
|
|
30
|
+
readonly poolCreationFee: number;
|
|
31
|
+
readonly transferFee: number;
|
|
32
|
+
readonly swapFee: number;
|
|
33
|
+
readonly shareholderFee: number;
|
|
34
|
+
readonly investRewardsFee: number;
|
|
35
|
+
readonly qxFee: number;
|
|
36
|
+
readonly burnFee: number;
|
|
37
|
+
};
|
|
38
|
+
export type QSWAP_GetLiquidityOf_input = {
|
|
39
|
+
readonly assetIssuer: string;
|
|
40
|
+
readonly assetName: bigint;
|
|
41
|
+
readonly account: string;
|
|
42
|
+
};
|
|
43
|
+
export type QSWAP_GetLiquidityOf_output = {
|
|
44
|
+
readonly liquidity: bigint;
|
|
45
|
+
};
|
|
46
|
+
export type QSWAP_GetPoolBasicState_input = {
|
|
47
|
+
readonly assetIssuer: string;
|
|
48
|
+
readonly assetName: bigint;
|
|
49
|
+
};
|
|
50
|
+
export type QSWAP_GetPoolBasicState_output = {
|
|
51
|
+
readonly poolExists: bigint;
|
|
52
|
+
readonly reservedQuAmount: bigint;
|
|
53
|
+
readonly reservedAssetAmount: bigint;
|
|
54
|
+
readonly totalLiquidity: bigint;
|
|
55
|
+
};
|
|
56
|
+
export type QSWAP_InvestRewardsInfo_input = Record<string, never>;
|
|
57
|
+
export type QSWAP_InvestRewardsInfo_output = {
|
|
58
|
+
readonly investRewardsFee: number;
|
|
59
|
+
readonly investRewardsId: string;
|
|
60
|
+
};
|
|
61
|
+
export type QSWAP_IssueAsset_input = {
|
|
62
|
+
readonly assetName: bigint;
|
|
63
|
+
readonly numberOfShares: bigint;
|
|
64
|
+
readonly unitOfMeasurement: bigint;
|
|
65
|
+
readonly numberOfDecimalPlaces: number;
|
|
66
|
+
};
|
|
67
|
+
export type QSWAP_IssueAsset_output = {
|
|
68
|
+
readonly issuedNumberOfShares: bigint;
|
|
69
|
+
};
|
|
70
|
+
export type QSWAP_QuoteExactAssetInput_input = {
|
|
71
|
+
readonly assetIssuer: string;
|
|
72
|
+
readonly assetName: bigint;
|
|
73
|
+
readonly assetAmountIn: bigint;
|
|
74
|
+
};
|
|
75
|
+
export type QSWAP_QuoteExactAssetInput_output = {
|
|
76
|
+
readonly quAmountOut: bigint;
|
|
77
|
+
};
|
|
78
|
+
export type QSWAP_QuoteExactAssetOutput_input = {
|
|
79
|
+
readonly assetIssuer: string;
|
|
80
|
+
readonly assetName: bigint;
|
|
81
|
+
readonly assetAmountOut: bigint;
|
|
82
|
+
};
|
|
83
|
+
export type QSWAP_QuoteExactAssetOutput_output = {
|
|
84
|
+
readonly quAmountIn: bigint;
|
|
85
|
+
};
|
|
86
|
+
export type QSWAP_QuoteExactQuInput_input = {
|
|
87
|
+
readonly assetIssuer: string;
|
|
88
|
+
readonly assetName: bigint;
|
|
89
|
+
readonly quAmountIn: bigint;
|
|
90
|
+
};
|
|
91
|
+
export type QSWAP_QuoteExactQuInput_output = {
|
|
92
|
+
readonly assetAmountOut: bigint;
|
|
93
|
+
};
|
|
94
|
+
export type QSWAP_QuoteExactQuOutput_input = {
|
|
95
|
+
readonly assetIssuer: string;
|
|
96
|
+
readonly assetName: bigint;
|
|
97
|
+
readonly quAmountOut: bigint;
|
|
98
|
+
};
|
|
99
|
+
export type QSWAP_QuoteExactQuOutput_output = {
|
|
100
|
+
readonly assetAmountIn: bigint;
|
|
101
|
+
};
|
|
102
|
+
export type QSWAP_RemoveLiquidity_input = {
|
|
103
|
+
readonly assetIssuer: string;
|
|
104
|
+
readonly assetName: bigint;
|
|
105
|
+
readonly burnLiquidity: bigint;
|
|
106
|
+
readonly quAmountMin: bigint;
|
|
107
|
+
readonly assetAmountMin: bigint;
|
|
108
|
+
};
|
|
109
|
+
export type QSWAP_RemoveLiquidity_output = {
|
|
110
|
+
readonly quAmount: bigint;
|
|
111
|
+
readonly assetAmount: bigint;
|
|
112
|
+
};
|
|
113
|
+
export type QSWAP_SetInvestRewardsInfo_input = {
|
|
114
|
+
readonly newInvestRewardsId: string;
|
|
115
|
+
};
|
|
116
|
+
export type QSWAP_SetInvestRewardsInfo_output = {
|
|
117
|
+
readonly success: boolean;
|
|
118
|
+
};
|
|
119
|
+
export type QSWAP_SwapAssetForExactQu_input = {
|
|
120
|
+
readonly assetIssuer: string;
|
|
121
|
+
readonly assetName: bigint;
|
|
122
|
+
readonly assetAmountInMax: bigint;
|
|
123
|
+
readonly quAmountOut: bigint;
|
|
124
|
+
};
|
|
125
|
+
export type QSWAP_SwapAssetForExactQu_output = {
|
|
126
|
+
readonly assetAmountIn: bigint;
|
|
127
|
+
};
|
|
128
|
+
export type QSWAP_SwapExactAssetForQu_input = {
|
|
129
|
+
readonly assetIssuer: string;
|
|
130
|
+
readonly assetName: bigint;
|
|
131
|
+
readonly assetAmountIn: bigint;
|
|
132
|
+
readonly quAmountOutMin: bigint;
|
|
133
|
+
};
|
|
134
|
+
export type QSWAP_SwapExactAssetForQu_output = {
|
|
135
|
+
readonly quAmountOut: bigint;
|
|
136
|
+
};
|
|
137
|
+
export type QSWAP_SwapExactQuForAsset_input = {
|
|
138
|
+
readonly assetIssuer: string;
|
|
139
|
+
readonly assetName: bigint;
|
|
140
|
+
readonly assetAmountOutMin: bigint;
|
|
141
|
+
};
|
|
142
|
+
export type QSWAP_SwapExactQuForAsset_output = {
|
|
143
|
+
readonly assetAmountOut: bigint;
|
|
144
|
+
};
|
|
145
|
+
export type QSWAP_SwapQuForExactAsset_input = {
|
|
146
|
+
readonly assetIssuer: string;
|
|
147
|
+
readonly assetName: bigint;
|
|
148
|
+
readonly assetAmountOut: bigint;
|
|
149
|
+
};
|
|
150
|
+
export type QSWAP_SwapQuForExactAsset_output = {
|
|
151
|
+
readonly quAmountIn: bigint;
|
|
152
|
+
};
|
|
153
|
+
export type QSWAP_TransferShareManagementRights_input = {
|
|
154
|
+
readonly asset: QSWAP_Asset;
|
|
155
|
+
readonly numberOfShares: bigint;
|
|
156
|
+
readonly newManagingContractIndex: number;
|
|
157
|
+
};
|
|
158
|
+
export type QSWAP_TransferShareManagementRights_output = {
|
|
159
|
+
readonly transferredNumberOfShares: bigint;
|
|
160
|
+
};
|
|
161
|
+
export type QSWAP_TransferShareOwnershipAndPossession_input = {
|
|
162
|
+
readonly assetIssuer: string;
|
|
163
|
+
readonly assetName: bigint;
|
|
164
|
+
readonly newOwnerAndPossessor: string;
|
|
165
|
+
readonly amount: bigint;
|
|
166
|
+
};
|
|
167
|
+
export type QSWAP_TransferShareOwnershipAndPossession_output = {
|
|
168
|
+
readonly transferredAmount: bigint;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export interface ContractTypeMap {
|
|
172
|
+
QSWAP: {
|
|
173
|
+
readonly contractIndex: 13;
|
|
174
|
+
readonly functions: {
|
|
175
|
+
Fees: {
|
|
176
|
+
readonly kind: "function";
|
|
177
|
+
readonly inputType: 1;
|
|
178
|
+
readonly inputTypeName: "Fees_input";
|
|
179
|
+
readonly outputTypeName: "Fees_output";
|
|
180
|
+
readonly input: QSWAP_Fees_input;
|
|
181
|
+
readonly output: QSWAP_Fees_output;
|
|
182
|
+
};
|
|
183
|
+
GetPoolBasicState: {
|
|
184
|
+
readonly kind: "function";
|
|
185
|
+
readonly inputType: 2;
|
|
186
|
+
readonly inputTypeName: "GetPoolBasicState_input";
|
|
187
|
+
readonly outputTypeName: "GetPoolBasicState_output";
|
|
188
|
+
readonly input: QSWAP_GetPoolBasicState_input;
|
|
189
|
+
readonly output: QSWAP_GetPoolBasicState_output;
|
|
190
|
+
};
|
|
191
|
+
GetLiquidityOf: {
|
|
192
|
+
readonly kind: "function";
|
|
193
|
+
readonly inputType: 3;
|
|
194
|
+
readonly inputTypeName: "GetLiquidityOf_input";
|
|
195
|
+
readonly outputTypeName: "GetLiquidityOf_output";
|
|
196
|
+
readonly input: QSWAP_GetLiquidityOf_input;
|
|
197
|
+
readonly output: QSWAP_GetLiquidityOf_output;
|
|
198
|
+
};
|
|
199
|
+
QuoteExactQuInput: {
|
|
200
|
+
readonly kind: "function";
|
|
201
|
+
readonly inputType: 4;
|
|
202
|
+
readonly inputTypeName: "QuoteExactQuInput_input";
|
|
203
|
+
readonly outputTypeName: "QuoteExactQuInput_output";
|
|
204
|
+
readonly input: QSWAP_QuoteExactQuInput_input;
|
|
205
|
+
readonly output: QSWAP_QuoteExactQuInput_output;
|
|
206
|
+
};
|
|
207
|
+
QuoteExactQuOutput: {
|
|
208
|
+
readonly kind: "function";
|
|
209
|
+
readonly inputType: 5;
|
|
210
|
+
readonly inputTypeName: "QuoteExactQuOutput_input";
|
|
211
|
+
readonly outputTypeName: "QuoteExactQuOutput_output";
|
|
212
|
+
readonly input: QSWAP_QuoteExactQuOutput_input;
|
|
213
|
+
readonly output: QSWAP_QuoteExactQuOutput_output;
|
|
214
|
+
};
|
|
215
|
+
QuoteExactAssetInput: {
|
|
216
|
+
readonly kind: "function";
|
|
217
|
+
readonly inputType: 6;
|
|
218
|
+
readonly inputTypeName: "QuoteExactAssetInput_input";
|
|
219
|
+
readonly outputTypeName: "QuoteExactAssetInput_output";
|
|
220
|
+
readonly input: QSWAP_QuoteExactAssetInput_input;
|
|
221
|
+
readonly output: QSWAP_QuoteExactAssetInput_output;
|
|
222
|
+
};
|
|
223
|
+
QuoteExactAssetOutput: {
|
|
224
|
+
readonly kind: "function";
|
|
225
|
+
readonly inputType: 7;
|
|
226
|
+
readonly inputTypeName: "QuoteExactAssetOutput_input";
|
|
227
|
+
readonly outputTypeName: "QuoteExactAssetOutput_output";
|
|
228
|
+
readonly input: QSWAP_QuoteExactAssetOutput_input;
|
|
229
|
+
readonly output: QSWAP_QuoteExactAssetOutput_output;
|
|
230
|
+
};
|
|
231
|
+
InvestRewardsInfo: {
|
|
232
|
+
readonly kind: "function";
|
|
233
|
+
readonly inputType: 8;
|
|
234
|
+
readonly inputTypeName: "InvestRewardsInfo_input";
|
|
235
|
+
readonly outputTypeName: "InvestRewardsInfo_output";
|
|
236
|
+
readonly input: QSWAP_InvestRewardsInfo_input;
|
|
237
|
+
readonly output: QSWAP_InvestRewardsInfo_output;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
readonly procedures: {
|
|
241
|
+
IssueAsset: {
|
|
242
|
+
readonly kind: "procedure";
|
|
243
|
+
readonly inputType: 1;
|
|
244
|
+
readonly inputTypeName: "IssueAsset_input";
|
|
245
|
+
readonly outputTypeName: "IssueAsset_output";
|
|
246
|
+
readonly input: QSWAP_IssueAsset_input;
|
|
247
|
+
readonly output: QSWAP_IssueAsset_output;
|
|
248
|
+
};
|
|
249
|
+
TransferShareOwnershipAndPossession: {
|
|
250
|
+
readonly kind: "procedure";
|
|
251
|
+
readonly inputType: 2;
|
|
252
|
+
readonly inputTypeName: "TransferShareOwnershipAndPossession_input";
|
|
253
|
+
readonly outputTypeName: "TransferShareOwnershipAndPossession_output";
|
|
254
|
+
readonly input: QSWAP_TransferShareOwnershipAndPossession_input;
|
|
255
|
+
readonly output: QSWAP_TransferShareOwnershipAndPossession_output;
|
|
256
|
+
};
|
|
257
|
+
CreatePool: {
|
|
258
|
+
readonly kind: "procedure";
|
|
259
|
+
readonly inputType: 3;
|
|
260
|
+
readonly inputTypeName: "CreatePool_input";
|
|
261
|
+
readonly outputTypeName: "CreatePool_output";
|
|
262
|
+
readonly input: QSWAP_CreatePool_input;
|
|
263
|
+
readonly output: QSWAP_CreatePool_output;
|
|
264
|
+
};
|
|
265
|
+
AddLiquidity: {
|
|
266
|
+
readonly kind: "procedure";
|
|
267
|
+
readonly inputType: 4;
|
|
268
|
+
readonly inputTypeName: "AddLiquidity_input";
|
|
269
|
+
readonly outputTypeName: "AddLiquidity_output";
|
|
270
|
+
readonly input: QSWAP_AddLiquidity_input;
|
|
271
|
+
readonly output: QSWAP_AddLiquidity_output;
|
|
272
|
+
};
|
|
273
|
+
RemoveLiquidity: {
|
|
274
|
+
readonly kind: "procedure";
|
|
275
|
+
readonly inputType: 5;
|
|
276
|
+
readonly inputTypeName: "RemoveLiquidity_input";
|
|
277
|
+
readonly outputTypeName: "RemoveLiquidity_output";
|
|
278
|
+
readonly input: QSWAP_RemoveLiquidity_input;
|
|
279
|
+
readonly output: QSWAP_RemoveLiquidity_output;
|
|
280
|
+
};
|
|
281
|
+
SwapExactQuForAsset: {
|
|
282
|
+
readonly kind: "procedure";
|
|
283
|
+
readonly inputType: 6;
|
|
284
|
+
readonly inputTypeName: "SwapExactQuForAsset_input";
|
|
285
|
+
readonly outputTypeName: "SwapExactQuForAsset_output";
|
|
286
|
+
readonly input: QSWAP_SwapExactQuForAsset_input;
|
|
287
|
+
readonly output: QSWAP_SwapExactQuForAsset_output;
|
|
288
|
+
};
|
|
289
|
+
SwapQuForExactAsset: {
|
|
290
|
+
readonly kind: "procedure";
|
|
291
|
+
readonly inputType: 7;
|
|
292
|
+
readonly inputTypeName: "SwapQuForExactAsset_input";
|
|
293
|
+
readonly outputTypeName: "SwapQuForExactAsset_output";
|
|
294
|
+
readonly input: QSWAP_SwapQuForExactAsset_input;
|
|
295
|
+
readonly output: QSWAP_SwapQuForExactAsset_output;
|
|
296
|
+
};
|
|
297
|
+
SwapExactAssetForQu: {
|
|
298
|
+
readonly kind: "procedure";
|
|
299
|
+
readonly inputType: 8;
|
|
300
|
+
readonly inputTypeName: "SwapExactAssetForQu_input";
|
|
301
|
+
readonly outputTypeName: "SwapExactAssetForQu_output";
|
|
302
|
+
readonly input: QSWAP_SwapExactAssetForQu_input;
|
|
303
|
+
readonly output: QSWAP_SwapExactAssetForQu_output;
|
|
304
|
+
};
|
|
305
|
+
SwapAssetForExactQu: {
|
|
306
|
+
readonly kind: "procedure";
|
|
307
|
+
readonly inputType: 9;
|
|
308
|
+
readonly inputTypeName: "SwapAssetForExactQu_input";
|
|
309
|
+
readonly outputTypeName: "SwapAssetForExactQu_output";
|
|
310
|
+
readonly input: QSWAP_SwapAssetForExactQu_input;
|
|
311
|
+
readonly output: QSWAP_SwapAssetForExactQu_output;
|
|
312
|
+
};
|
|
313
|
+
SetInvestRewardsInfo: {
|
|
314
|
+
readonly kind: "procedure";
|
|
315
|
+
readonly inputType: 10;
|
|
316
|
+
readonly inputTypeName: "SetInvestRewardsInfo_input";
|
|
317
|
+
readonly outputTypeName: "SetInvestRewardsInfo_output";
|
|
318
|
+
readonly input: QSWAP_SetInvestRewardsInfo_input;
|
|
319
|
+
readonly output: QSWAP_SetInvestRewardsInfo_output;
|
|
320
|
+
};
|
|
321
|
+
TransferShareManagementRights: {
|
|
322
|
+
readonly kind: "procedure";
|
|
323
|
+
readonly inputType: 11;
|
|
324
|
+
readonly inputTypeName: "TransferShareManagementRights_input";
|
|
325
|
+
readonly outputTypeName: "TransferShareManagementRights_output";
|
|
326
|
+
readonly input: QSWAP_TransferShareManagementRights_input;
|
|
327
|
+
readonly output: QSWAP_TransferShareManagementRights_output;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export type ContractName = keyof ContractTypeMap & string;
|
|
334
|
+
export type FunctionName<C extends ContractName> = keyof ContractTypeMap[C]["functions"] & string;
|
|
335
|
+
export type ProcedureName<C extends ContractName> = keyof ContractTypeMap[C]["procedures"] & string;
|
|
336
|
+
|
|
337
|
+
export type FunctionInput<
|
|
338
|
+
C extends ContractName,
|
|
339
|
+
F extends FunctionName<C>,
|
|
340
|
+
> = ContractTypeMap[C]["functions"][F]["input"];
|
|
341
|
+
export type FunctionOutput<
|
|
342
|
+
C extends ContractName,
|
|
343
|
+
F extends FunctionName<C>,
|
|
344
|
+
> = ContractTypeMap[C]["functions"][F]["output"];
|
|
345
|
+
|
|
346
|
+
export type ProcedureInput<
|
|
347
|
+
C extends ContractName,
|
|
348
|
+
P extends ProcedureName<C>,
|
|
349
|
+
> = ContractTypeMap[C]["procedures"][P]["input"];
|
|
350
|
+
export type ProcedureOutput<
|
|
351
|
+
C extends ContractName,
|
|
352
|
+
P extends ProcedureName<C>,
|
|
353
|
+
> = ContractTypeMap[C]["procedures"][P]["output"];
|
|
354
|
+
|
|
355
|
+
export const contractCodecRegistry = {
|
|
356
|
+
QSWAP: {
|
|
357
|
+
contractIndex: 13,
|
|
358
|
+
functions: {
|
|
359
|
+
Fees: {
|
|
360
|
+
kind: "function",
|
|
361
|
+
inputType: 1,
|
|
362
|
+
inputTypeName: "Fees_input",
|
|
363
|
+
outputTypeName: "Fees_output",
|
|
364
|
+
},
|
|
365
|
+
GetPoolBasicState: {
|
|
366
|
+
kind: "function",
|
|
367
|
+
inputType: 2,
|
|
368
|
+
inputTypeName: "GetPoolBasicState_input",
|
|
369
|
+
outputTypeName: "GetPoolBasicState_output",
|
|
370
|
+
},
|
|
371
|
+
GetLiquidityOf: {
|
|
372
|
+
kind: "function",
|
|
373
|
+
inputType: 3,
|
|
374
|
+
inputTypeName: "GetLiquidityOf_input",
|
|
375
|
+
outputTypeName: "GetLiquidityOf_output",
|
|
376
|
+
},
|
|
377
|
+
QuoteExactQuInput: {
|
|
378
|
+
kind: "function",
|
|
379
|
+
inputType: 4,
|
|
380
|
+
inputTypeName: "QuoteExactQuInput_input",
|
|
381
|
+
outputTypeName: "QuoteExactQuInput_output",
|
|
382
|
+
},
|
|
383
|
+
QuoteExactQuOutput: {
|
|
384
|
+
kind: "function",
|
|
385
|
+
inputType: 5,
|
|
386
|
+
inputTypeName: "QuoteExactQuOutput_input",
|
|
387
|
+
outputTypeName: "QuoteExactQuOutput_output",
|
|
388
|
+
},
|
|
389
|
+
QuoteExactAssetInput: {
|
|
390
|
+
kind: "function",
|
|
391
|
+
inputType: 6,
|
|
392
|
+
inputTypeName: "QuoteExactAssetInput_input",
|
|
393
|
+
outputTypeName: "QuoteExactAssetInput_output",
|
|
394
|
+
},
|
|
395
|
+
QuoteExactAssetOutput: {
|
|
396
|
+
kind: "function",
|
|
397
|
+
inputType: 7,
|
|
398
|
+
inputTypeName: "QuoteExactAssetOutput_input",
|
|
399
|
+
outputTypeName: "QuoteExactAssetOutput_output",
|
|
400
|
+
},
|
|
401
|
+
InvestRewardsInfo: {
|
|
402
|
+
kind: "function",
|
|
403
|
+
inputType: 8,
|
|
404
|
+
inputTypeName: "InvestRewardsInfo_input",
|
|
405
|
+
outputTypeName: "InvestRewardsInfo_output",
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
procedures: {
|
|
409
|
+
IssueAsset: {
|
|
410
|
+
kind: "procedure",
|
|
411
|
+
inputType: 1,
|
|
412
|
+
inputTypeName: "IssueAsset_input",
|
|
413
|
+
outputTypeName: "IssueAsset_output",
|
|
414
|
+
},
|
|
415
|
+
TransferShareOwnershipAndPossession: {
|
|
416
|
+
kind: "procedure",
|
|
417
|
+
inputType: 2,
|
|
418
|
+
inputTypeName: "TransferShareOwnershipAndPossession_input",
|
|
419
|
+
outputTypeName: "TransferShareOwnershipAndPossession_output",
|
|
420
|
+
},
|
|
421
|
+
CreatePool: {
|
|
422
|
+
kind: "procedure",
|
|
423
|
+
inputType: 3,
|
|
424
|
+
inputTypeName: "CreatePool_input",
|
|
425
|
+
outputTypeName: "CreatePool_output",
|
|
426
|
+
},
|
|
427
|
+
AddLiquidity: {
|
|
428
|
+
kind: "procedure",
|
|
429
|
+
inputType: 4,
|
|
430
|
+
inputTypeName: "AddLiquidity_input",
|
|
431
|
+
outputTypeName: "AddLiquidity_output",
|
|
432
|
+
},
|
|
433
|
+
RemoveLiquidity: {
|
|
434
|
+
kind: "procedure",
|
|
435
|
+
inputType: 5,
|
|
436
|
+
inputTypeName: "RemoveLiquidity_input",
|
|
437
|
+
outputTypeName: "RemoveLiquidity_output",
|
|
438
|
+
},
|
|
439
|
+
SwapExactQuForAsset: {
|
|
440
|
+
kind: "procedure",
|
|
441
|
+
inputType: 6,
|
|
442
|
+
inputTypeName: "SwapExactQuForAsset_input",
|
|
443
|
+
outputTypeName: "SwapExactQuForAsset_output",
|
|
444
|
+
},
|
|
445
|
+
SwapQuForExactAsset: {
|
|
446
|
+
kind: "procedure",
|
|
447
|
+
inputType: 7,
|
|
448
|
+
inputTypeName: "SwapQuForExactAsset_input",
|
|
449
|
+
outputTypeName: "SwapQuForExactAsset_output",
|
|
450
|
+
},
|
|
451
|
+
SwapExactAssetForQu: {
|
|
452
|
+
kind: "procedure",
|
|
453
|
+
inputType: 8,
|
|
454
|
+
inputTypeName: "SwapExactAssetForQu_input",
|
|
455
|
+
outputTypeName: "SwapExactAssetForQu_output",
|
|
456
|
+
},
|
|
457
|
+
SwapAssetForExactQu: {
|
|
458
|
+
kind: "procedure",
|
|
459
|
+
inputType: 9,
|
|
460
|
+
inputTypeName: "SwapAssetForExactQu_input",
|
|
461
|
+
outputTypeName: "SwapAssetForExactQu_output",
|
|
462
|
+
},
|
|
463
|
+
SetInvestRewardsInfo: {
|
|
464
|
+
kind: "procedure",
|
|
465
|
+
inputType: 10,
|
|
466
|
+
inputTypeName: "SetInvestRewardsInfo_input",
|
|
467
|
+
outputTypeName: "SetInvestRewardsInfo_output",
|
|
468
|
+
},
|
|
469
|
+
TransferShareManagementRights: {
|
|
470
|
+
kind: "procedure",
|
|
471
|
+
inputType: 11,
|
|
472
|
+
inputTypeName: "TransferShareManagementRights_input",
|
|
473
|
+
outputTypeName: "TransferShareManagementRights_output",
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
} as const satisfies Readonly<Record<ContractName, unknown>>;
|
|
478
|
+
|
|
479
|
+
export type RuntimeContractCodecRegistry = typeof contractCodecRegistry;
|