@sentio/sdk 2.4.0 → 2.5.0-rc.1
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/lib/aptos/aptos-processor.d.ts +1 -1
- package/lib/aptos/aptos-processor.js +1 -1
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/builtin/0x1.d.ts +16 -177
- package/lib/aptos/builtin/0x1.js +56 -538
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.d.ts +2 -13
- package/lib/aptos/builtin/0x3.js +20 -48
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/codegen/codegen.d.ts +0 -20
- package/lib/aptos/codegen/codegen.js +37 -357
- package/lib/aptos/codegen/codegen.js.map +1 -1
- package/lib/aptos/{types.test.d.ts → codegen/types.test.d.ts} +0 -0
- package/lib/aptos/codegen/types.test.js.map +1 -0
- package/lib/aptos/models.d.ts +0 -8
- package/lib/aptos/models.js.map +1 -1
- package/lib/aptos/move-coder.d.ts +4 -13
- package/lib/aptos/move-coder.js +13 -124
- package/lib/aptos/move-coder.js.map +1 -1
- package/lib/aptos/move-types.d.ts +6 -0
- package/lib/aptos/move-types.js +52 -1
- package/lib/aptos/move-types.js.map +1 -1
- package/lib/aptos/tests/souffl3.js +1 -1
- package/lib/aptos/tests/souffl3.js.map +1 -1
- package/lib/aptos/tests/types/reserved.d.ts +2 -8
- package/lib/aptos/tests/types/reserved.js +11 -24
- package/lib/aptos/tests/types/reserved.js.map +1 -1
- package/lib/aptos/tests/types/soffl3.d.ts +2 -14
- package/lib/aptos/tests/types/soffl3.js +15 -48
- package/lib/aptos/tests/types/soffl3.js.map +1 -1
- package/lib/aptos/tests/types/souffle.d.ts +2 -8
- package/lib/aptos/tests/types/souffle.js +11 -24
- package/lib/aptos/tests/types/souffle.js.map +1 -1
- package/lib/aptos/utils.d.ts +2 -7
- package/lib/aptos/utils.js +2 -15
- package/lib/aptos/utils.js.map +1 -1
- package/lib/eth/tests/codegen.test.js.map +1 -1
- package/lib/eth/tests/erc20.js +1 -1
- package/lib/eth/tests/erc20.js.map +1 -1
- package/lib/eth/tests/logger.test.js.map +1 -1
- package/lib/move/abstract-codegen.d.ts +44 -0
- package/lib/move/abstract-codegen.js +341 -0
- package/lib/move/abstract-codegen.js.map +1 -0
- package/lib/move/abstract-move-coder.d.ts +24 -0
- package/lib/move/abstract-move-coder.js +141 -0
- package/lib/move/abstract-move-coder.js.map +1 -0
- package/lib/move/account.d.ts +18 -0
- package/lib/{aptos/codegen/typegen.js → move/account.js} +20 -82
- package/lib/move/account.js.map +1 -0
- package/lib/move/filter.d.ts +25 -0
- package/lib/move/filter.js +11 -0
- package/lib/move/filter.js.map +1 -0
- package/lib/move/index.d.ts +5 -25
- package/lib/move/index.js +5 -10
- package/lib/move/index.js.map +1 -1
- package/lib/move/neutral-models.d.ts +34 -0
- package/lib/move/neutral-models.js +7 -0
- package/lib/move/neutral-models.js.map +1 -0
- package/lib/move/ts-type.d.ts +2 -0
- package/lib/move/ts-type.js +77 -0
- package/lib/move/ts-type.js.map +1 -0
- package/lib/{aptos/codegen/typegen.test.d.ts → move/ts-type.test.d.ts} +0 -0
- package/lib/move/ts-type.test.js.map +1 -0
- package/lib/{aptos → move}/types.d.ts +1 -0
- package/lib/{aptos → move}/types.js +26 -3
- package/lib/move/types.js.map +1 -0
- package/lib/move/utils.d.ts +9 -0
- package/lib/move/utils.js +20 -0
- package/lib/move/utils.js.map +1 -0
- package/lib/sui/builtin/0x1.d.ts +114 -0
- package/lib/sui/builtin/0x1.js +174 -0
- package/lib/sui/builtin/0x1.js.map +1 -0
- package/lib/sui/builtin/0x2.d.ts +1047 -0
- package/lib/sui/builtin/0x2.js +1295 -0
- package/lib/sui/builtin/0x2.js.map +1 -0
- package/lib/sui/builtin/index.d.ts +2 -0
- package/lib/sui/builtin/index.js +6 -0
- package/lib/sui/builtin/index.js.map +1 -0
- package/lib/sui/codegen/codegen.d.ts +1 -0
- package/lib/sui/codegen/codegen.js +61 -0
- package/lib/sui/codegen/codegen.js.map +1 -0
- package/lib/sui/codegen/index.d.ts +1 -0
- package/lib/sui/codegen/index.js +2 -0
- package/lib/sui/codegen/index.js.map +1 -0
- package/lib/sui/codegen/run.d.ts +1 -0
- package/lib/sui/codegen/run.js +12 -0
- package/lib/sui/codegen/run.js.map +1 -0
- package/lib/sui/index.d.ts +2 -0
- package/lib/sui/index.js +1 -0
- package/lib/sui/index.js.map +1 -1
- package/lib/sui/models.d.ts +7 -1
- package/lib/sui/models.js +0 -23
- package/lib/sui/models.js.map +1 -1
- package/lib/sui/move-coder.d.ts +11 -0
- package/lib/sui/move-coder.js +53 -0
- package/lib/sui/move-coder.js.map +1 -0
- package/lib/sui/move-types.d.ts +9 -0
- package/lib/sui/move-types.js +81 -0
- package/lib/sui/move-types.js.map +1 -0
- package/lib/sui/sui-processor.js +3 -3
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/sui/tests/sui.test.js.map +1 -1
- package/lib/sui/tests/types/index.d.ts +1 -0
- package/lib/sui/tests/types/index.js +5 -0
- package/lib/sui/tests/types/index.js.map +1 -0
- package/lib/sui/tests/types/testnet/index.d.ts +1 -0
- package/lib/sui/tests/types/testnet/index.js +5 -0
- package/lib/sui/tests/types/testnet/index.js.map +1 -0
- package/lib/sui/tests/types/testnet/swap.d.ts +249 -0
- package/lib/sui/tests/types/testnet/swap.js +310 -0
- package/lib/sui/tests/types/testnet/swap.js.map +1 -0
- package/lib/testing/aptos-facet.js +1 -1
- package/lib/testing/aptos-facet.js.map +1 -1
- package/lib/testing/sui-facet.js +3 -2
- package/lib/testing/sui-facet.js.map +1 -1
- package/package.json +8 -5
- package/src/aptos/aptos-processor.ts +1 -1
- package/src/aptos/builtin/0x1.ts +70 -652
- package/src/aptos/builtin/0x3.ts +24 -59
- package/src/aptos/codegen/codegen.ts +35 -421
- package/src/aptos/models.ts +0 -10
- package/src/aptos/move-coder.ts +16 -150
- package/src/aptos/move-types.ts +62 -0
- package/src/aptos/tests/souffl3.ts +1 -1
- package/src/aptos/tests/types/reserved.ts +15 -30
- package/src/aptos/tests/types/soffl3.ts +19 -58
- package/src/aptos/tests/types/souffle.ts +15 -30
- package/src/aptos/utils.ts +3 -21
- package/src/eth/tests/erc20.ts +1 -1
- package/src/move/abstract-codegen.ts +426 -0
- package/src/move/abstract-move-coder.ts +170 -0
- package/src/move/account.ts +96 -0
- package/src/move/filter.ts +33 -0
- package/src/move/index.ts +5 -33
- package/src/move/neutral-models.ts +45 -0
- package/src/move/ts-type.ts +86 -0
- package/src/{aptos → move}/types.ts +28 -3
- package/src/move/utils.ts +25 -0
- package/src/sui/abis/0x1.json +1729 -1733
- package/src/sui/abis/0x2.json +13279 -13283
- package/src/sui/builtin/0x1.ts +307 -0
- package/src/sui/builtin/0x2.ts +2578 -0
- package/src/sui/builtin/index.ts +5 -0
- package/src/sui/codegen/codegen.ts +71 -0
- package/src/sui/codegen/index.ts +1 -0
- package/src/sui/codegen/run.ts +13 -0
- package/src/sui/index.ts +4 -0
- package/src/sui/models.ts +7 -28
- package/src/sui/move-coder.ts +63 -0
- package/src/sui/move-types.ts +109 -0
- package/src/sui/sui-processor.ts +3 -3
- package/src/sui/tests/abis/testnet/swap.json +1752 -0
- package/src/sui/tests/types/index.ts +3 -0
- package/src/sui/tests/types/testnet/index.ts +4 -0
- package/src/sui/tests/types/testnet/swap.ts +698 -0
- package/src/testing/aptos-facet.ts +1 -1
- package/src/testing/sui-facet.ts +3 -2
- package/lib/aptos/codegen/typegen.d.ts +0 -18
- package/lib/aptos/codegen/typegen.js.map +0 -1
- package/lib/aptos/codegen/typegen.test.js.map +0 -1
- package/lib/aptos/types.js.map +0 -1
- package/lib/aptos/types.test.js.map +0 -1
- package/lib/jest.config.d.ts +0 -9
- package/lib/jest.config.js +0 -9
- package/lib/jest.config.js.map +0 -1
- package/src/aptos/codegen/typegen.ts +0 -165
- package/src/jest.config.ts +0 -8
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
/* Generated modules for account 0x8235459df815e77668b4a49bb36e229f3321f432 */
|
|
6
|
+
|
|
7
|
+
import { CallFilter } from "@sentio/sdk/move";
|
|
8
|
+
import {
|
|
9
|
+
MoveCoder,
|
|
10
|
+
defaultMoveCoder,
|
|
11
|
+
SuiBindOptions,
|
|
12
|
+
SuiBaseProcessor,
|
|
13
|
+
TypedEventInstance,
|
|
14
|
+
SuiNetwork,
|
|
15
|
+
TypedEntryFunctionPayload,
|
|
16
|
+
SuiContext,
|
|
17
|
+
} from "@sentio/sdk/sui";
|
|
18
|
+
import { MoveFetchConfig } from "@sentio/protos";
|
|
19
|
+
import { SuiAddress } from "@sentio/sdk/sui";
|
|
20
|
+
|
|
21
|
+
import { _0x2 } from "@sentio/sdk/sui/builtin";
|
|
22
|
+
|
|
23
|
+
export class pool extends SuiBaseProcessor {
|
|
24
|
+
constructor(options: SuiBindOptions) {
|
|
25
|
+
super("pool", options);
|
|
26
|
+
}
|
|
27
|
+
static DEFAULT_OPTIONS: SuiBindOptions = {
|
|
28
|
+
address: "0x8235459df815e77668b4a49bb36e229f3321f432",
|
|
29
|
+
network: SuiNetwork.TEST_NET,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
static bind(options: Partial<SuiBindOptions> = {}): pool {
|
|
33
|
+
return new pool({ ...pool.DEFAULT_OPTIONS, ...options });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
onEntryAddLiquidity(
|
|
37
|
+
func: (call: pool.AddLiquidityPayload, ctx: SuiContext) => void,
|
|
38
|
+
filter?: CallFilter,
|
|
39
|
+
fetchConfig?: MoveFetchConfig
|
|
40
|
+
): pool {
|
|
41
|
+
this.onEntryFunctionCall(
|
|
42
|
+
func,
|
|
43
|
+
{
|
|
44
|
+
...filter,
|
|
45
|
+
function: "pool::add_liquidity",
|
|
46
|
+
},
|
|
47
|
+
fetchConfig
|
|
48
|
+
);
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
onEntryBurnToken(
|
|
53
|
+
func: (call: pool.BurnTokenPayload, ctx: SuiContext) => void,
|
|
54
|
+
filter?: CallFilter,
|
|
55
|
+
fetchConfig?: MoveFetchConfig
|
|
56
|
+
): pool {
|
|
57
|
+
this.onEntryFunctionCall(
|
|
58
|
+
func,
|
|
59
|
+
{
|
|
60
|
+
...filter,
|
|
61
|
+
function: "pool::burn_token",
|
|
62
|
+
},
|
|
63
|
+
fetchConfig
|
|
64
|
+
);
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
onEntryCreatePool(
|
|
69
|
+
func: (call: pool.CreatePoolPayload, ctx: SuiContext) => void,
|
|
70
|
+
filter?: CallFilter,
|
|
71
|
+
fetchConfig?: MoveFetchConfig
|
|
72
|
+
): pool {
|
|
73
|
+
this.onEntryFunctionCall(
|
|
74
|
+
func,
|
|
75
|
+
{
|
|
76
|
+
...filter,
|
|
77
|
+
function: "pool::create_pool",
|
|
78
|
+
},
|
|
79
|
+
fetchConfig
|
|
80
|
+
);
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
onEntryFreezePool(
|
|
85
|
+
func: (call: pool.FreezePoolPayload, ctx: SuiContext) => void,
|
|
86
|
+
filter?: CallFilter,
|
|
87
|
+
fetchConfig?: MoveFetchConfig
|
|
88
|
+
): pool {
|
|
89
|
+
this.onEntryFunctionCall(
|
|
90
|
+
func,
|
|
91
|
+
{
|
|
92
|
+
...filter,
|
|
93
|
+
function: "pool::freeze_pool",
|
|
94
|
+
},
|
|
95
|
+
fetchConfig
|
|
96
|
+
);
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onEntryMintTestToken(
|
|
101
|
+
func: (call: pool.MintTestTokenPayload, ctx: SuiContext) => void,
|
|
102
|
+
filter?: CallFilter,
|
|
103
|
+
fetchConfig?: MoveFetchConfig
|
|
104
|
+
): pool {
|
|
105
|
+
this.onEntryFunctionCall(
|
|
106
|
+
func,
|
|
107
|
+
{
|
|
108
|
+
...filter,
|
|
109
|
+
function: "pool::mint_test_token",
|
|
110
|
+
},
|
|
111
|
+
fetchConfig
|
|
112
|
+
);
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
onEntryMintTestTokenBnb(
|
|
117
|
+
func: (call: pool.MintTestTokenBnbPayload, ctx: SuiContext) => void,
|
|
118
|
+
filter?: CallFilter,
|
|
119
|
+
fetchConfig?: MoveFetchConfig
|
|
120
|
+
): pool {
|
|
121
|
+
this.onEntryFunctionCall(
|
|
122
|
+
func,
|
|
123
|
+
{
|
|
124
|
+
...filter,
|
|
125
|
+
function: "pool::mint_test_token_bnb",
|
|
126
|
+
},
|
|
127
|
+
fetchConfig
|
|
128
|
+
);
|
|
129
|
+
return this;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
onEntryMintTestTokenBtc(
|
|
133
|
+
func: (call: pool.MintTestTokenBtcPayload, ctx: SuiContext) => void,
|
|
134
|
+
filter?: CallFilter,
|
|
135
|
+
fetchConfig?: MoveFetchConfig
|
|
136
|
+
): pool {
|
|
137
|
+
this.onEntryFunctionCall(
|
|
138
|
+
func,
|
|
139
|
+
{
|
|
140
|
+
...filter,
|
|
141
|
+
function: "pool::mint_test_token_btc",
|
|
142
|
+
},
|
|
143
|
+
fetchConfig
|
|
144
|
+
);
|
|
145
|
+
return this;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
onEntryMintTestTokenDai(
|
|
149
|
+
func: (call: pool.MintTestTokenDaiPayload, ctx: SuiContext) => void,
|
|
150
|
+
filter?: CallFilter,
|
|
151
|
+
fetchConfig?: MoveFetchConfig
|
|
152
|
+
): pool {
|
|
153
|
+
this.onEntryFunctionCall(
|
|
154
|
+
func,
|
|
155
|
+
{
|
|
156
|
+
...filter,
|
|
157
|
+
function: "pool::mint_test_token_dai",
|
|
158
|
+
},
|
|
159
|
+
fetchConfig
|
|
160
|
+
);
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
onEntryMintTestTokenEth(
|
|
165
|
+
func: (call: pool.MintTestTokenEthPayload, ctx: SuiContext) => void,
|
|
166
|
+
filter?: CallFilter,
|
|
167
|
+
fetchConfig?: MoveFetchConfig
|
|
168
|
+
): pool {
|
|
169
|
+
this.onEntryFunctionCall(
|
|
170
|
+
func,
|
|
171
|
+
{
|
|
172
|
+
...filter,
|
|
173
|
+
function: "pool::mint_test_token_eth",
|
|
174
|
+
},
|
|
175
|
+
fetchConfig
|
|
176
|
+
);
|
|
177
|
+
return this;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
onEntryMintTestTokenMerge(
|
|
181
|
+
func: (call: pool.MintTestTokenMergePayload, ctx: SuiContext) => void,
|
|
182
|
+
filter?: CallFilter,
|
|
183
|
+
fetchConfig?: MoveFetchConfig
|
|
184
|
+
): pool {
|
|
185
|
+
this.onEntryFunctionCall(
|
|
186
|
+
func,
|
|
187
|
+
{
|
|
188
|
+
...filter,
|
|
189
|
+
function: "pool::mint_test_token_merge",
|
|
190
|
+
},
|
|
191
|
+
fetchConfig
|
|
192
|
+
);
|
|
193
|
+
return this;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
onEntryMintTestTokenSol(
|
|
197
|
+
func: (call: pool.MintTestTokenSolPayload, ctx: SuiContext) => void,
|
|
198
|
+
filter?: CallFilter,
|
|
199
|
+
fetchConfig?: MoveFetchConfig
|
|
200
|
+
): pool {
|
|
201
|
+
this.onEntryFunctionCall(
|
|
202
|
+
func,
|
|
203
|
+
{
|
|
204
|
+
...filter,
|
|
205
|
+
function: "pool::mint_test_token_sol",
|
|
206
|
+
},
|
|
207
|
+
fetchConfig
|
|
208
|
+
);
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
onEntryMintTestTokenUsdc(
|
|
213
|
+
func: (call: pool.MintTestTokenUsdcPayload, ctx: SuiContext) => void,
|
|
214
|
+
filter?: CallFilter,
|
|
215
|
+
fetchConfig?: MoveFetchConfig
|
|
216
|
+
): pool {
|
|
217
|
+
this.onEntryFunctionCall(
|
|
218
|
+
func,
|
|
219
|
+
{
|
|
220
|
+
...filter,
|
|
221
|
+
function: "pool::mint_test_token_usdc",
|
|
222
|
+
},
|
|
223
|
+
fetchConfig
|
|
224
|
+
);
|
|
225
|
+
return this;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
onEntryMintTestTokenUsdt(
|
|
229
|
+
func: (call: pool.MintTestTokenUsdtPayload, ctx: SuiContext) => void,
|
|
230
|
+
filter?: CallFilter,
|
|
231
|
+
fetchConfig?: MoveFetchConfig
|
|
232
|
+
): pool {
|
|
233
|
+
this.onEntryFunctionCall(
|
|
234
|
+
func,
|
|
235
|
+
{
|
|
236
|
+
...filter,
|
|
237
|
+
function: "pool::mint_test_token_usdt",
|
|
238
|
+
},
|
|
239
|
+
fetchConfig
|
|
240
|
+
);
|
|
241
|
+
return this;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
onEntryMintToken(
|
|
245
|
+
func: (call: pool.MintTokenPayload, ctx: SuiContext) => void,
|
|
246
|
+
filter?: CallFilter,
|
|
247
|
+
fetchConfig?: MoveFetchConfig
|
|
248
|
+
): pool {
|
|
249
|
+
this.onEntryFunctionCall(
|
|
250
|
+
func,
|
|
251
|
+
{
|
|
252
|
+
...filter,
|
|
253
|
+
function: "pool::mint_token",
|
|
254
|
+
},
|
|
255
|
+
fetchConfig
|
|
256
|
+
);
|
|
257
|
+
return this;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
onEntryMintTokenMerge(
|
|
261
|
+
func: (call: pool.MintTokenMergePayload, ctx: SuiContext) => void,
|
|
262
|
+
filter?: CallFilter,
|
|
263
|
+
fetchConfig?: MoveFetchConfig
|
|
264
|
+
): pool {
|
|
265
|
+
this.onEntryFunctionCall(
|
|
266
|
+
func,
|
|
267
|
+
{
|
|
268
|
+
...filter,
|
|
269
|
+
function: "pool::mint_token_merge",
|
|
270
|
+
},
|
|
271
|
+
fetchConfig
|
|
272
|
+
);
|
|
273
|
+
return this;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
onEntryRedeemAdminBalance(
|
|
277
|
+
func: (call: pool.RedeemAdminBalancePayload, ctx: SuiContext) => void,
|
|
278
|
+
filter?: CallFilter,
|
|
279
|
+
fetchConfig?: MoveFetchConfig
|
|
280
|
+
): pool {
|
|
281
|
+
this.onEntryFunctionCall(
|
|
282
|
+
func,
|
|
283
|
+
{
|
|
284
|
+
...filter,
|
|
285
|
+
function: "pool::redeem_admin_balance",
|
|
286
|
+
},
|
|
287
|
+
fetchConfig
|
|
288
|
+
);
|
|
289
|
+
return this;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
onEntryRemoveLiquidity(
|
|
293
|
+
func: (call: pool.RemoveLiquidityPayload, ctx: SuiContext) => void,
|
|
294
|
+
filter?: CallFilter,
|
|
295
|
+
fetchConfig?: MoveFetchConfig
|
|
296
|
+
): pool {
|
|
297
|
+
this.onEntryFunctionCall(
|
|
298
|
+
func,
|
|
299
|
+
{
|
|
300
|
+
...filter,
|
|
301
|
+
function: "pool::remove_liquidity",
|
|
302
|
+
},
|
|
303
|
+
fetchConfig
|
|
304
|
+
);
|
|
305
|
+
return this;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
onEntrySwapXToY(
|
|
309
|
+
func: (call: pool.SwapXToYPayload, ctx: SuiContext) => void,
|
|
310
|
+
filter?: CallFilter,
|
|
311
|
+
fetchConfig?: MoveFetchConfig
|
|
312
|
+
): pool {
|
|
313
|
+
this.onEntryFunctionCall(
|
|
314
|
+
func,
|
|
315
|
+
{
|
|
316
|
+
...filter,
|
|
317
|
+
function: "pool::swap_x_to_y",
|
|
318
|
+
},
|
|
319
|
+
fetchConfig
|
|
320
|
+
);
|
|
321
|
+
return this;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
onEntrySwapYToX(
|
|
325
|
+
func: (call: pool.SwapYToXPayload, ctx: SuiContext) => void,
|
|
326
|
+
filter?: CallFilter,
|
|
327
|
+
fetchConfig?: MoveFetchConfig
|
|
328
|
+
): pool {
|
|
329
|
+
this.onEntryFunctionCall(
|
|
330
|
+
func,
|
|
331
|
+
{
|
|
332
|
+
...filter,
|
|
333
|
+
function: "pool::swap_y_to_x",
|
|
334
|
+
},
|
|
335
|
+
fetchConfig
|
|
336
|
+
);
|
|
337
|
+
return this;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
onEntryUnfreezePool(
|
|
341
|
+
func: (call: pool.UnfreezePoolPayload, ctx: SuiContext) => void,
|
|
342
|
+
filter?: CallFilter,
|
|
343
|
+
fetchConfig?: MoveFetchConfig
|
|
344
|
+
): pool {
|
|
345
|
+
this.onEntryFunctionCall(
|
|
346
|
+
func,
|
|
347
|
+
{
|
|
348
|
+
...filter,
|
|
349
|
+
function: "pool::unfreeze_pool",
|
|
350
|
+
},
|
|
351
|
+
fetchConfig
|
|
352
|
+
);
|
|
353
|
+
return this;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
onEventLiquidityEvent(
|
|
357
|
+
func: (event: pool.LiquidityEventInstance, ctx: SuiContext) => void,
|
|
358
|
+
fetchConfig?: MoveFetchConfig
|
|
359
|
+
): pool {
|
|
360
|
+
this.onMoveEvent(
|
|
361
|
+
func,
|
|
362
|
+
{
|
|
363
|
+
type: "pool::LiquidityEvent",
|
|
364
|
+
},
|
|
365
|
+
fetchConfig
|
|
366
|
+
);
|
|
367
|
+
return this;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
onEventPoolCreateEvent(
|
|
371
|
+
func: (event: pool.PoolCreateEventInstance, ctx: SuiContext) => void,
|
|
372
|
+
fetchConfig?: MoveFetchConfig
|
|
373
|
+
): pool {
|
|
374
|
+
this.onMoveEvent(
|
|
375
|
+
func,
|
|
376
|
+
{
|
|
377
|
+
type: "pool::PoolCreateEvent",
|
|
378
|
+
},
|
|
379
|
+
fetchConfig
|
|
380
|
+
);
|
|
381
|
+
return this;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
onEventSwapTokenEvent(
|
|
385
|
+
func: (event: pool.SwapTokenEventInstance, ctx: SuiContext) => void,
|
|
386
|
+
fetchConfig?: MoveFetchConfig
|
|
387
|
+
): pool {
|
|
388
|
+
this.onMoveEvent(
|
|
389
|
+
func,
|
|
390
|
+
{
|
|
391
|
+
type: "pool::SwapTokenEvent",
|
|
392
|
+
},
|
|
393
|
+
fetchConfig
|
|
394
|
+
);
|
|
395
|
+
return this;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export namespace pool {
|
|
400
|
+
export class ComputeShareStruct {
|
|
401
|
+
static TYPE_QNAME =
|
|
402
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::ComputeShareStruct";
|
|
403
|
+
remain: bigint;
|
|
404
|
+
admin: bigint;
|
|
405
|
+
lp: bigint;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export class LSP<T0, T1> {
|
|
409
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::LSP";
|
|
410
|
+
dummy_field: Boolean;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export class LiquidityEvent {
|
|
414
|
+
static TYPE_QNAME =
|
|
415
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::LiquidityEvent";
|
|
416
|
+
pool_id: string;
|
|
417
|
+
is_added: Boolean;
|
|
418
|
+
x_amount: bigint;
|
|
419
|
+
y_amount: bigint;
|
|
420
|
+
lsp_amount: bigint;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface LiquidityEventInstance
|
|
424
|
+
extends TypedEventInstance<LiquidityEvent> {
|
|
425
|
+
fields_decoded: LiquidityEvent;
|
|
426
|
+
type_arguments: [];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export class Pool<T0, T1> {
|
|
430
|
+
static TYPE_QNAME =
|
|
431
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::Pool";
|
|
432
|
+
id: _0x2.object_.UID;
|
|
433
|
+
index: bigint;
|
|
434
|
+
x: _0x2.balance.Balance<T0>;
|
|
435
|
+
y: _0x2.balance.Balance<T1>;
|
|
436
|
+
x_admin: _0x2.balance.Balance<T0>;
|
|
437
|
+
y_admin: _0x2.balance.Balance<T1>;
|
|
438
|
+
lsp_supply: _0x2.balance.Supply<pool.LSP<T0, T1>>;
|
|
439
|
+
admin_fee: bigint;
|
|
440
|
+
lp_fee: bigint;
|
|
441
|
+
freeze: Boolean;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export class PoolCreateEvent {
|
|
445
|
+
static TYPE_QNAME =
|
|
446
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::PoolCreateEvent";
|
|
447
|
+
pool_id: string;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export interface PoolCreateEventInstance
|
|
451
|
+
extends TypedEventInstance<PoolCreateEvent> {
|
|
452
|
+
fields_decoded: PoolCreateEvent;
|
|
453
|
+
type_arguments: [];
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export class PoolCreateInfo {
|
|
457
|
+
static TYPE_QNAME =
|
|
458
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::PoolCreateInfo";
|
|
459
|
+
id: _0x2.object_.UID;
|
|
460
|
+
pool_id: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export class SwapCap {
|
|
464
|
+
static TYPE_QNAME =
|
|
465
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::SwapCap";
|
|
466
|
+
id: _0x2.object_.UID;
|
|
467
|
+
pool_create_counter: bigint;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export class SwapTokenEvent {
|
|
471
|
+
static TYPE_QNAME =
|
|
472
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::SwapTokenEvent";
|
|
473
|
+
pool_id: string;
|
|
474
|
+
x_to_y: Boolean;
|
|
475
|
+
in_amount: bigint;
|
|
476
|
+
out_amount: bigint;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
export interface SwapTokenEventInstance
|
|
480
|
+
extends TypedEventInstance<SwapTokenEvent> {
|
|
481
|
+
fields_decoded: SwapTokenEvent;
|
|
482
|
+
type_arguments: [];
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export class TestBNB {
|
|
486
|
+
static TYPE_QNAME =
|
|
487
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestBNB";
|
|
488
|
+
dummy_field: Boolean;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export class TestBTC {
|
|
492
|
+
static TYPE_QNAME =
|
|
493
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestBTC";
|
|
494
|
+
dummy_field: Boolean;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export class TestDAI {
|
|
498
|
+
static TYPE_QNAME =
|
|
499
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestDAI";
|
|
500
|
+
dummy_field: Boolean;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export class TestETH {
|
|
504
|
+
static TYPE_QNAME =
|
|
505
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestETH";
|
|
506
|
+
dummy_field: Boolean;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export class TestSOL {
|
|
510
|
+
static TYPE_QNAME =
|
|
511
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestSOL";
|
|
512
|
+
dummy_field: Boolean;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export class TestToken {
|
|
516
|
+
static TYPE_QNAME =
|
|
517
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestToken";
|
|
518
|
+
dummy_field: Boolean;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export class TestTokenSupply {
|
|
522
|
+
static TYPE_QNAME =
|
|
523
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestTokenSupply";
|
|
524
|
+
id: _0x2.object_.UID;
|
|
525
|
+
supply: _0x2.balance.Supply<pool.TestToken>;
|
|
526
|
+
supply_bnb: _0x2.balance.Supply<pool.TestBNB>;
|
|
527
|
+
supply_btc: _0x2.balance.Supply<pool.TestBTC>;
|
|
528
|
+
supply_dai: _0x2.balance.Supply<pool.TestDAI>;
|
|
529
|
+
supply_eth: _0x2.balance.Supply<pool.TestETH>;
|
|
530
|
+
supply_sol: _0x2.balance.Supply<pool.TestSOL>;
|
|
531
|
+
supply_usdc: _0x2.balance.Supply<pool.TestUSDC>;
|
|
532
|
+
supply_usdt: _0x2.balance.Supply<pool.TestUSDT>;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export class TestUSDC {
|
|
536
|
+
static TYPE_QNAME =
|
|
537
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestUSDC";
|
|
538
|
+
dummy_field: Boolean;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export class TestUSDT {
|
|
542
|
+
static TYPE_QNAME =
|
|
543
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestUSDT";
|
|
544
|
+
dummy_field: Boolean;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export class Token {
|
|
548
|
+
static TYPE_QNAME =
|
|
549
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::Token";
|
|
550
|
+
dummy_field: Boolean;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export class TokenSupply {
|
|
554
|
+
static TYPE_QNAME =
|
|
555
|
+
"0x8235459df815e77668b4a49bb36e229f3321f432::pool::TokenSupply";
|
|
556
|
+
id: _0x2.object_.UID;
|
|
557
|
+
supply: _0x2.balance.Supply<pool.Token>;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export interface AddLiquidityPayload<T0 = any, T1 = any>
|
|
561
|
+
extends TypedEntryFunctionPayload<
|
|
562
|
+
[SuiAddress, string, string, bigint, bigint]
|
|
563
|
+
> {
|
|
564
|
+
arguments_decoded: [SuiAddress, string, string, bigint, bigint];
|
|
565
|
+
type_arguments: [string, string];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export interface BurnTokenPayload
|
|
569
|
+
extends TypedEntryFunctionPayload<[SuiAddress, SuiAddress, string]> {
|
|
570
|
+
arguments_decoded: [SuiAddress, SuiAddress, string];
|
|
571
|
+
type_arguments: [];
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface CreatePoolPayload<T0 = any, T1 = any>
|
|
575
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, bigint]> {
|
|
576
|
+
arguments_decoded: [SuiAddress, bigint, bigint];
|
|
577
|
+
type_arguments: [string, string];
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export interface FreezePoolPayload<T0 = any, T1 = any>
|
|
581
|
+
extends TypedEntryFunctionPayload<[SuiAddress]> {
|
|
582
|
+
arguments_decoded: [SuiAddress];
|
|
583
|
+
type_arguments: [string, string];
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export interface MintTestTokenPayload
|
|
587
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
588
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
589
|
+
type_arguments: [];
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export interface MintTestTokenBnbPayload
|
|
593
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
594
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
595
|
+
type_arguments: [];
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface MintTestTokenBtcPayload
|
|
599
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
600
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
601
|
+
type_arguments: [];
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export interface MintTestTokenDaiPayload
|
|
605
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
606
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
607
|
+
type_arguments: [];
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface MintTestTokenEthPayload
|
|
611
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
612
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
613
|
+
type_arguments: [];
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export interface MintTestTokenMergePayload
|
|
617
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
618
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
619
|
+
type_arguments: [];
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export interface MintTestTokenSolPayload
|
|
623
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
624
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
625
|
+
type_arguments: [];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export interface MintTestTokenUsdcPayload
|
|
629
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
630
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
631
|
+
type_arguments: [];
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface MintTestTokenUsdtPayload
|
|
635
|
+
extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
636
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
637
|
+
type_arguments: [];
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export interface MintTokenPayload
|
|
641
|
+
extends TypedEntryFunctionPayload<
|
|
642
|
+
[SuiAddress, SuiAddress, bigint, SuiAddress]
|
|
643
|
+
> {
|
|
644
|
+
arguments_decoded: [SuiAddress, SuiAddress, bigint, SuiAddress];
|
|
645
|
+
type_arguments: [];
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export interface MintTokenMergePayload
|
|
649
|
+
extends TypedEntryFunctionPayload<
|
|
650
|
+
[SuiAddress, SuiAddress, bigint, SuiAddress]
|
|
651
|
+
> {
|
|
652
|
+
arguments_decoded: [SuiAddress, SuiAddress, bigint, SuiAddress];
|
|
653
|
+
type_arguments: [];
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
export interface RedeemAdminBalancePayload<T0 = any, T1 = any>
|
|
657
|
+
extends TypedEntryFunctionPayload<[SuiAddress, SuiAddress]> {
|
|
658
|
+
arguments_decoded: [SuiAddress, SuiAddress];
|
|
659
|
+
type_arguments: [string, string];
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export interface RemoveLiquidityPayload<T0 = any, T1 = any>
|
|
663
|
+
extends TypedEntryFunctionPayload<[SuiAddress, string, bigint]> {
|
|
664
|
+
arguments_decoded: [SuiAddress, string, bigint];
|
|
665
|
+
type_arguments: [string, string];
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export interface SwapXToYPayload<T0 = any, T1 = any>
|
|
669
|
+
extends TypedEntryFunctionPayload<[SuiAddress, string, bigint, bigint]> {
|
|
670
|
+
arguments_decoded: [SuiAddress, string, bigint, bigint];
|
|
671
|
+
type_arguments: [string, string];
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export interface SwapYToXPayload<T0 = any, T1 = any>
|
|
675
|
+
extends TypedEntryFunctionPayload<[SuiAddress, string, bigint, bigint]> {
|
|
676
|
+
arguments_decoded: [SuiAddress, string, bigint, bigint];
|
|
677
|
+
type_arguments: [string, string];
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export interface UnfreezePoolPayload<T0 = any, T1 = any>
|
|
681
|
+
extends TypedEntryFunctionPayload<[SuiAddress]> {
|
|
682
|
+
arguments_decoded: [SuiAddress];
|
|
683
|
+
type_arguments: [string, string];
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
const MODULES = JSON.parse(
|
|
688
|
+
'{"pool":{"file_format_version":6,"address":"0x8235459df815e77668b4a49bb36e229f3321f432","name":"pool","friends":[],"structs":{"ComputeShareStruct":{"abilities":{"abilities":[]},"type_parameters":[],"fields":[{"name":"remain","type_":"U64"},{"name":"admin","type_":"U64"},{"name":"lp","type_":"U64"}]},"LSP":{"abilities":{"abilities":["Drop"]},"type_parameters":[{"constraints":{"abilities":[]},"is_phantom":true},{"constraints":{"abilities":[]},"is_phantom":true}],"fields":[{"name":"dummy_field","type_":"Bool"}]},"LiquidityEvent":{"abilities":{"abilities":["Copy","Drop"]},"type_parameters":[],"fields":[{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}},{"name":"is_added","type_":"Bool"},{"name":"x_amount","type_":"U64"},{"name":"y_amount","type_":"U64"},{"name":"lsp_amount","type_":"U64"}]},"Pool":{"abilities":{"abilities":["Key"]},"type_parameters":[{"constraints":{"abilities":[]},"is_phantom":true},{"constraints":{"abilities":[]},"is_phantom":true}],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"index","type_":"U64"},{"name":"x","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":0}]}}},{"name":"y","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":1}]}}},{"name":"x_admin","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":0}]}}},{"name":"y_admin","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":1}]}}},{"name":"lsp_supply","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"LSP","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},{"name":"admin_fee","type_":"U64"},{"name":"lp_fee","type_":"U64"},{"name":"freeze","type_":"Bool"}]},"PoolCreateEvent":{"abilities":{"abilities":["Copy","Drop"]},"type_parameters":[],"fields":[{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}}]},"PoolCreateInfo":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}}]},"SwapCap":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"pool_create_counter","type_":"U64"}]},"SwapTokenEvent":{"abilities":{"abilities":["Copy","Drop"]},"type_parameters":[],"fields":[{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}},{"name":"x_to_y","type_":"Bool"},{"name":"in_amount","type_":"U64"},{"name":"out_amount","type_":"U64"}]},"TestBNB":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestBTC":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestDAI":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestETH":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestSOL":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestToken":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestTokenSupply":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"supply","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestToken","type_arguments":[]}}]}}},{"name":"supply_bnb","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestBNB","type_arguments":[]}}]}}},{"name":"supply_btc","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestBTC","type_arguments":[]}}]}}},{"name":"supply_dai","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestDAI","type_arguments":[]}}]}}},{"name":"supply_eth","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestETH","type_arguments":[]}}]}}},{"name":"supply_sol","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestSOL","type_arguments":[]}}]}}},{"name":"supply_usdc","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestUSDC","type_arguments":[]}}]}}},{"name":"supply_usdt","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestUSDT","type_arguments":[]}}]}}}]},"TestUSDC":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestUSDT":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"Token":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TokenSupply":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"supply","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Token","type_arguments":[]}}]}}}]}},"exposed_functions":{"add_liquidity":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":1}]}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"burn_token":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Token","type_arguments":[]}}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"compute_amount":{"visibility":"Public","is_entry":false,"type_parameters":[],"parameters":["U64","U64","U64"],"return_":["U64"]},"compute_k":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":["U128"]},"compute_share":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64"],"return_":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"ComputeShareStruct","type_arguments":[]}}]},"create_pool":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"freeze_pool":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":[]},"get_admin_amounts":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":["U64","U64"]},"get_amounts":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":["U64","U64","U64"]},"get_token_supply":{"visibility":"Public","is_entry":false,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}}],"return_":["U64"]},"get_x_amount":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return_":["U64"]},"get_y_amount":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return_":["U64"]},"mint_test_token":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_bnb":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_btc":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_dai":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_eth":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_merge":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestToken","type_arguments":[]}}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_sol":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_usdc":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_usdt":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_token":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_token_merge":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Token","type_arguments":[]}}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"redeem_admin_balance":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"remove_liquidity":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"LSP","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"swap_x_to_y":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":0}]}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"swap_y_to_x":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":1}]}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"unfreeze_pool":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":[]}}}}'
|
|
689
|
+
);
|
|
690
|
+
|
|
691
|
+
export function loadAllTypes(coder: MoveCoder) {
|
|
692
|
+
_0x2.loadAllTypes(coder);
|
|
693
|
+
for (const m of Object.values(MODULES)) {
|
|
694
|
+
coder.load(m as any);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
loadAllTypes(defaultMoveCoder());
|