@typemove/sui 1.2.3 → 1.2.4-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.
Files changed (131) hide show
  1. package/package.json +3 -3
  2. package/dist/cjs/builtin/0x1.d.ts +0 -496
  3. package/dist/cjs/builtin/0x1.d.ts.map +0 -1
  4. package/dist/cjs/builtin/0x1.js +0 -2038
  5. package/dist/cjs/builtin/0x1.js.map +0 -1
  6. package/dist/cjs/builtin/0x2.d.ts +0 -2933
  7. package/dist/cjs/builtin/0x2.d.ts.map +0 -1
  8. package/dist/cjs/builtin/0x2.js +0 -9511
  9. package/dist/cjs/builtin/0x2.js.map +0 -1
  10. package/dist/cjs/builtin/0x3.d.ts +0 -1208
  11. package/dist/cjs/builtin/0x3.d.ts.map +0 -1
  12. package/dist/cjs/builtin/0x3.js +0 -2455
  13. package/dist/cjs/builtin/0x3.js.map +0 -1
  14. package/dist/cjs/builtin/index.d.ts +0 -4
  15. package/dist/cjs/builtin/index.d.ts.map +0 -1
  16. package/dist/cjs/builtin/index.js +0 -11
  17. package/dist/cjs/builtin/index.js.map +0 -1
  18. package/dist/cjs/codegen/codegen.d.ts +0 -19
  19. package/dist/cjs/codegen/codegen.d.ts.map +0 -1
  20. package/dist/cjs/codegen/codegen.js +0 -178
  21. package/dist/cjs/codegen/codegen.js.map +0 -1
  22. package/dist/cjs/codegen/index.d.ts +0 -2
  23. package/dist/cjs/codegen/index.d.ts.map +0 -1
  24. package/dist/cjs/codegen/index.js +0 -5
  25. package/dist/cjs/codegen/index.js.map +0 -1
  26. package/dist/cjs/index.d.ts +0 -4
  27. package/dist/cjs/index.d.ts.map +0 -1
  28. package/dist/cjs/index.js +0 -11
  29. package/dist/cjs/index.js.map +0 -1
  30. package/dist/cjs/models.d.ts +0 -18
  31. package/dist/cjs/models.d.ts.map +0 -1
  32. package/dist/cjs/models.js +0 -5
  33. package/dist/cjs/models.js.map +0 -1
  34. package/dist/cjs/move-coder.d.ts +0 -25
  35. package/dist/cjs/move-coder.d.ts.map +0 -1
  36. package/dist/cjs/move-coder.js +0 -229
  37. package/dist/cjs/move-coder.js.map +0 -1
  38. package/dist/cjs/move-coder.test.d.ts +0 -2
  39. package/dist/cjs/move-coder.test.d.ts.map +0 -1
  40. package/dist/cjs/move-coder.test.js.map +0 -1
  41. package/dist/cjs/sui-chain-adapter.d.ts +0 -15
  42. package/dist/cjs/sui-chain-adapter.d.ts.map +0 -1
  43. package/dist/cjs/sui-chain-adapter.js +0 -95
  44. package/dist/cjs/sui-chain-adapter.js.map +0 -1
  45. package/dist/cjs/to-internal.d.ts +0 -4
  46. package/dist/cjs/to-internal.d.ts.map +0 -1
  47. package/dist/cjs/to-internal.js +0 -85
  48. package/dist/cjs/to-internal.js.map +0 -1
  49. package/dist/cjs/transaction.d.ts +0 -6
  50. package/dist/cjs/transaction.d.ts.map +0 -1
  51. package/dist/cjs/transaction.js +0 -35
  52. package/dist/cjs/transaction.js.map +0 -1
  53. package/dist/esm/builtin/0x1.d.ts +0 -496
  54. package/dist/esm/builtin/0x1.d.ts.map +0 -1
  55. package/dist/esm/builtin/0x1.js +0 -2034
  56. package/dist/esm/builtin/0x1.js.map +0 -1
  57. package/dist/esm/builtin/0x2.d.ts +0 -2933
  58. package/dist/esm/builtin/0x2.d.ts.map +0 -1
  59. package/dist/esm/builtin/0x2.js +0 -9506
  60. package/dist/esm/builtin/0x2.js.map +0 -1
  61. package/dist/esm/builtin/0x3.d.ts +0 -1208
  62. package/dist/esm/builtin/0x3.d.ts.map +0 -1
  63. package/dist/esm/builtin/0x3.js +0 -2450
  64. package/dist/esm/builtin/0x3.js.map +0 -1
  65. package/dist/esm/builtin/index.d.ts +0 -4
  66. package/dist/esm/builtin/index.d.ts.map +0 -1
  67. package/dist/esm/builtin/index.js +0 -7
  68. package/dist/esm/builtin/index.js.map +0 -1
  69. package/dist/esm/codegen/codegen.d.ts +0 -19
  70. package/dist/esm/codegen/codegen.d.ts.map +0 -1
  71. package/dist/esm/codegen/codegen.js +0 -172
  72. package/dist/esm/codegen/codegen.js.map +0 -1
  73. package/dist/esm/codegen/index.d.ts +0 -2
  74. package/dist/esm/codegen/index.d.ts.map +0 -1
  75. package/dist/esm/codegen/index.js +0 -2
  76. package/dist/esm/codegen/index.js.map +0 -1
  77. package/dist/esm/codegen/run.d.ts +0 -2
  78. package/dist/esm/codegen/run.d.ts.map +0 -1
  79. package/dist/esm/codegen/run.js.map +0 -1
  80. package/dist/esm/index.d.ts +0 -4
  81. package/dist/esm/index.d.ts.map +0 -1
  82. package/dist/esm/index.js +0 -4
  83. package/dist/esm/index.js.map +0 -1
  84. package/dist/esm/models.d.ts +0 -18
  85. package/dist/esm/models.d.ts.map +0 -1
  86. package/dist/esm/models.js +0 -2
  87. package/dist/esm/models.js.map +0 -1
  88. package/dist/esm/move-coder.d.ts +0 -25
  89. package/dist/esm/move-coder.d.ts.map +0 -1
  90. package/dist/esm/move-coder.js +0 -223
  91. package/dist/esm/move-coder.js.map +0 -1
  92. package/dist/esm/move-coder.test.d.ts +0 -2
  93. package/dist/esm/move-coder.test.d.ts.map +0 -1
  94. package/dist/esm/move-coder.test.js.map +0 -1
  95. package/dist/esm/sui-chain-adapter.d.ts +0 -15
  96. package/dist/esm/sui-chain-adapter.d.ts.map +0 -1
  97. package/dist/esm/sui-chain-adapter.js +0 -91
  98. package/dist/esm/sui-chain-adapter.js.map +0 -1
  99. package/dist/esm/to-internal.d.ts +0 -4
  100. package/dist/esm/to-internal.d.ts.map +0 -1
  101. package/dist/esm/to-internal.js +0 -81
  102. package/dist/esm/to-internal.js.map +0 -1
  103. package/dist/esm/transaction.d.ts +0 -6
  104. package/dist/esm/transaction.d.ts.map +0 -1
  105. package/dist/esm/transaction.js +0 -28
  106. package/dist/esm/transaction.js.map +0 -1
  107. package/src/abis/0x1.json +0 -2063
  108. package/src/abis/0x2.json +0 -13410
  109. package/src/abis/0x3.json +0 -8645
  110. package/src/builtin/0x1.ts +0 -3000
  111. package/src/builtin/0x2.ts +0 -14596
  112. package/src/builtin/0x3.ts +0 -4188
  113. package/src/builtin/index.ts +0 -6
  114. package/src/codegen/codegen.ts +0 -211
  115. package/src/codegen/index.ts +0 -1
  116. package/src/codegen/run.ts +0 -20
  117. package/src/index.ts +0 -4
  118. package/src/models.ts +0 -21
  119. package/src/move-coder.ts +0 -276
  120. package/src/sui-chain-adapter.ts +0 -121
  121. package/src/tests/abis/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.json +0 -265
  122. package/src/tests/abis/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.json +0 -2429
  123. package/src/tests/abis/testnet/0xdee9.json +0 -5523
  124. package/src/tests/abis/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.json +0 -10060
  125. package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +0 -303
  126. package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +0 -2697
  127. package/src/tests/types/testnet/0xdee9.ts +0 -3099
  128. package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +0 -10215
  129. package/src/tests/types/testnet/index.ts +0 -7
  130. package/src/to-internal.ts +0 -109
  131. package/src/transaction.ts +0 -31
@@ -1,2697 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- /* Generated modules for account 0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a */
6
-
7
- import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
8
- import { MoveCoder, TypedEventInstance } from "@typemove/sui";
9
-
10
- import { defaultMoveCoder } from "@typemove/sui";
11
-
12
- import {
13
- ZERO_ADDRESS,
14
- TypedDevInspectResults,
15
- getMoveCoder,
16
- } from "@typemove/sui";
17
- import {
18
- TransactionBlock,
19
- TransactionArgument,
20
- } from "@mysten/sui.js/transactions";
21
- import { SuiClient } from "@mysten/sui.js/client";
22
- import { type ObjectCallArg } from "@mysten/sui.js/dist/esm/builder/Inputs.js";
23
- import {
24
- transactionArgumentOrObject,
25
- transactionArgumentOrPure,
26
- transactionArgumentOrVec,
27
- } from "@typemove/sui";
28
-
29
- import { _0x2 } from "@typemove/sui/builtin";
30
- import { _0x1 } from "@typemove/sui/builtin";
31
-
32
- export namespace comparator {
33
- export interface Result {
34
- inner: number;
35
- }
36
-
37
- export namespace Result {
38
- export const TYPE_QNAME =
39
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::Result";
40
-
41
- const TYPE = new TypeDescriptor<Result>(Result.TYPE_QNAME);
42
-
43
- export function type(): TypeDescriptor<Result> {
44
- return TYPE.apply();
45
- }
46
- }
47
-
48
- export namespace builder {
49
- export function compare<T0 = any>(
50
- tx: TransactionBlock,
51
- args: [
52
- string | ObjectCallArg | TransactionArgument,
53
- string | ObjectCallArg | TransactionArgument,
54
- ],
55
- typeArguments: [TypeDescriptor<T0> | string],
56
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
57
- const _args: any[] = [];
58
- _args.push(transactionArgumentOrObject(args[0], tx));
59
- _args.push(transactionArgumentOrObject(args[1], tx));
60
-
61
- // @ts-ignore
62
- return tx.moveCall({
63
- target:
64
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::compare",
65
- arguments: _args,
66
- typeArguments: [
67
- typeof typeArguments[0] === "string"
68
- ? typeArguments[0]
69
- : typeArguments[0].getSignature(),
70
- ],
71
- });
72
- }
73
- export function compareU8Vector(
74
- tx: TransactionBlock,
75
- args: [
76
- (string | ObjectCallArg)[] | TransactionArgument,
77
- (string | ObjectCallArg)[] | TransactionArgument,
78
- ],
79
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
80
- const _args: any[] = [];
81
- _args.push(transactionArgumentOrVec(args[0], tx));
82
- _args.push(transactionArgumentOrVec(args[1], tx));
83
-
84
- // @ts-ignore
85
- return tx.moveCall({
86
- target:
87
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::compare_u8_vector",
88
- arguments: _args,
89
- });
90
- }
91
- export function isEqual(
92
- tx: TransactionBlock,
93
- args: [string | ObjectCallArg | TransactionArgument],
94
- ): TransactionArgument & [TransactionArgument] {
95
- const _args: any[] = [];
96
- _args.push(transactionArgumentOrObject(args[0], tx));
97
-
98
- // @ts-ignore
99
- return tx.moveCall({
100
- target:
101
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_equal",
102
- arguments: _args,
103
- });
104
- }
105
- export function isGreaterThan(
106
- tx: TransactionBlock,
107
- args: [string | ObjectCallArg | TransactionArgument],
108
- ): TransactionArgument & [TransactionArgument] {
109
- const _args: any[] = [];
110
- _args.push(transactionArgumentOrObject(args[0], tx));
111
-
112
- // @ts-ignore
113
- return tx.moveCall({
114
- target:
115
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_greater_than",
116
- arguments: _args,
117
- });
118
- }
119
- export function isSmallerThan(
120
- tx: TransactionBlock,
121
- args: [string | ObjectCallArg | TransactionArgument],
122
- ): TransactionArgument & [TransactionArgument] {
123
- const _args: any[] = [];
124
- _args.push(transactionArgumentOrObject(args[0], tx));
125
-
126
- // @ts-ignore
127
- return tx.moveCall({
128
- target:
129
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_smaller_than",
130
- arguments: _args,
131
- });
132
- }
133
- }
134
- export namespace view {
135
- export async function compare<T0 = any>(
136
- client: SuiClient,
137
- args: [
138
- string | ObjectCallArg | TransactionArgument,
139
- string | ObjectCallArg | TransactionArgument,
140
- ],
141
- typeArguments: [TypeDescriptor<T0> | string],
142
- ): Promise<TypedDevInspectResults<[comparator.Result]>> {
143
- const tx = new TransactionBlock();
144
- builder.compare(tx, args, typeArguments);
145
- const insepctRes = await client.devInspectTransactionBlock({
146
- transactionBlock: tx,
147
- sender: ZERO_ADDRESS,
148
- });
149
-
150
- return (await getMoveCoder(client)).decodeDevInspectResult<
151
- [comparator.Result]
152
- >(insepctRes);
153
- }
154
- export async function compareU8Vector(
155
- client: SuiClient,
156
- args: [
157
- (string | ObjectCallArg)[] | TransactionArgument,
158
- (string | ObjectCallArg)[] | TransactionArgument,
159
- ],
160
- ): Promise<TypedDevInspectResults<[comparator.Result]>> {
161
- const tx = new TransactionBlock();
162
- builder.compareU8Vector(tx, args);
163
- const insepctRes = await client.devInspectTransactionBlock({
164
- transactionBlock: tx,
165
- sender: ZERO_ADDRESS,
166
- });
167
-
168
- return (await getMoveCoder(client)).decodeDevInspectResult<
169
- [comparator.Result]
170
- >(insepctRes);
171
- }
172
- export async function isEqual(
173
- client: SuiClient,
174
- args: [string | ObjectCallArg | TransactionArgument],
175
- ): Promise<TypedDevInspectResults<[Boolean]>> {
176
- const tx = new TransactionBlock();
177
- builder.isEqual(tx, args);
178
- const insepctRes = await client.devInspectTransactionBlock({
179
- transactionBlock: tx,
180
- sender: ZERO_ADDRESS,
181
- });
182
-
183
- return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
184
- insepctRes,
185
- );
186
- }
187
- export async function isGreaterThan(
188
- client: SuiClient,
189
- args: [string | ObjectCallArg | TransactionArgument],
190
- ): Promise<TypedDevInspectResults<[Boolean]>> {
191
- const tx = new TransactionBlock();
192
- builder.isGreaterThan(tx, args);
193
- const insepctRes = await client.devInspectTransactionBlock({
194
- transactionBlock: tx,
195
- sender: ZERO_ADDRESS,
196
- });
197
-
198
- return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
199
- insepctRes,
200
- );
201
- }
202
- export async function isSmallerThan(
203
- client: SuiClient,
204
- args: [string | ObjectCallArg | TransactionArgument],
205
- ): Promise<TypedDevInspectResults<[Boolean]>> {
206
- const tx = new TransactionBlock();
207
- builder.isSmallerThan(tx, args);
208
- const insepctRes = await client.devInspectTransactionBlock({
209
- transactionBlock: tx,
210
- sender: ZERO_ADDRESS,
211
- });
212
-
213
- return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
214
- insepctRes,
215
- );
216
- }
217
- }
218
- }
219
-
220
- export namespace math_utils {
221
- export namespace builder {
222
- export function max(
223
- tx: TransactionBlock,
224
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
225
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
226
- const _args: any[] = [];
227
- _args.push(transactionArgumentOrPure(args[0], tx));
228
- _args.push(transactionArgumentOrPure(args[1], tx));
229
-
230
- // @ts-ignore
231
- return tx.moveCall({
232
- target:
233
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::max",
234
- arguments: _args,
235
- });
236
- }
237
- export function maxU64(
238
- tx: TransactionBlock,
239
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
240
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
241
- const _args: any[] = [];
242
- _args.push(transactionArgumentOrPure(args[0], tx));
243
- _args.push(transactionArgumentOrPure(args[1], tx));
244
-
245
- // @ts-ignore
246
- return tx.moveCall({
247
- target:
248
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::max_u64",
249
- arguments: _args,
250
- });
251
- }
252
- export function min(
253
- tx: TransactionBlock,
254
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
255
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
256
- const _args: any[] = [];
257
- _args.push(transactionArgumentOrPure(args[0], tx));
258
- _args.push(transactionArgumentOrPure(args[1], tx));
259
-
260
- // @ts-ignore
261
- return tx.moveCall({
262
- target:
263
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::min",
264
- arguments: _args,
265
- });
266
- }
267
- export function pow(
268
- tx: TransactionBlock,
269
- args: [bigint | TransactionArgument, number | TransactionArgument],
270
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
271
- const _args: any[] = [];
272
- _args.push(transactionArgumentOrPure(args[0], tx));
273
- _args.push(transactionArgumentOrPure(args[1], tx));
274
-
275
- // @ts-ignore
276
- return tx.moveCall({
277
- target:
278
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::pow",
279
- arguments: _args,
280
- });
281
- }
282
- export function sqrt(
283
- tx: TransactionBlock,
284
- args: [bigint | TransactionArgument],
285
- ): TransactionArgument & [TransactionArgument] {
286
- const _args: any[] = [];
287
- _args.push(transactionArgumentOrPure(args[0], tx));
288
-
289
- // @ts-ignore
290
- return tx.moveCall({
291
- target:
292
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::sqrt",
293
- arguments: _args,
294
- });
295
- }
296
- export function sqrtU256(
297
- tx: TransactionBlock,
298
- args: [bigint | TransactionArgument],
299
- ): TransactionArgument & [TransactionArgument] {
300
- const _args: any[] = [];
301
- _args.push(transactionArgumentOrPure(args[0], tx));
302
-
303
- // @ts-ignore
304
- return tx.moveCall({
305
- target:
306
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::sqrt_u256",
307
- arguments: _args,
308
- });
309
- }
310
- }
311
- export namespace view {
312
- export async function max(
313
- client: SuiClient,
314
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
315
- ): Promise<TypedDevInspectResults<[bigint]>> {
316
- const tx = new TransactionBlock();
317
- builder.max(tx, args);
318
- const insepctRes = await client.devInspectTransactionBlock({
319
- transactionBlock: tx,
320
- sender: ZERO_ADDRESS,
321
- });
322
-
323
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
324
- insepctRes,
325
- );
326
- }
327
- export async function maxU64(
328
- client: SuiClient,
329
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
330
- ): Promise<TypedDevInspectResults<[bigint]>> {
331
- const tx = new TransactionBlock();
332
- builder.maxU64(tx, args);
333
- const insepctRes = await client.devInspectTransactionBlock({
334
- transactionBlock: tx,
335
- sender: ZERO_ADDRESS,
336
- });
337
-
338
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
339
- insepctRes,
340
- );
341
- }
342
- export async function min(
343
- client: SuiClient,
344
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
345
- ): Promise<TypedDevInspectResults<[bigint]>> {
346
- const tx = new TransactionBlock();
347
- builder.min(tx, args);
348
- const insepctRes = await client.devInspectTransactionBlock({
349
- transactionBlock: tx,
350
- sender: ZERO_ADDRESS,
351
- });
352
-
353
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
354
- insepctRes,
355
- );
356
- }
357
- export async function pow(
358
- client: SuiClient,
359
- args: [bigint | TransactionArgument, number | TransactionArgument],
360
- ): Promise<TypedDevInspectResults<[bigint]>> {
361
- const tx = new TransactionBlock();
362
- builder.pow(tx, args);
363
- const insepctRes = await client.devInspectTransactionBlock({
364
- transactionBlock: tx,
365
- sender: ZERO_ADDRESS,
366
- });
367
-
368
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
369
- insepctRes,
370
- );
371
- }
372
- export async function sqrt(
373
- client: SuiClient,
374
- args: [bigint | TransactionArgument],
375
- ): Promise<TypedDevInspectResults<[bigint]>> {
376
- const tx = new TransactionBlock();
377
- builder.sqrt(tx, args);
378
- const insepctRes = await client.devInspectTransactionBlock({
379
- transactionBlock: tx,
380
- sender: ZERO_ADDRESS,
381
- });
382
-
383
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
384
- insepctRes,
385
- );
386
- }
387
- export async function sqrtU256(
388
- client: SuiClient,
389
- args: [bigint | TransactionArgument],
390
- ): Promise<TypedDevInspectResults<[bigint]>> {
391
- const tx = new TransactionBlock();
392
- builder.sqrtU256(tx, args);
393
- const insepctRes = await client.devInspectTransactionBlock({
394
- transactionBlock: tx,
395
- sender: ZERO_ADDRESS,
396
- });
397
-
398
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
399
- insepctRes,
400
- );
401
- }
402
- }
403
- }
404
-
405
- export namespace pool {
406
- export interface ControllerCap {
407
- id: _0x2.object_.UID;
408
- }
409
-
410
- export namespace ControllerCap {
411
- export const TYPE_QNAME =
412
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::ControllerCap";
413
-
414
- const TYPE = new TypeDescriptor<ControllerCap>(ControllerCap.TYPE_QNAME);
415
-
416
- export function type(): TypeDescriptor<ControllerCap> {
417
- return TYPE.apply();
418
- }
419
- }
420
-
421
- export interface FeeToSet {
422
- fee_to: string;
423
- caller: string;
424
- }
425
-
426
- export namespace FeeToSet {
427
- export const TYPE_QNAME =
428
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::FeeToSet";
429
-
430
- const TYPE = new TypeDescriptor<FeeToSet>(FeeToSet.TYPE_QNAME);
431
-
432
- export function type(): TypeDescriptor<FeeToSet> {
433
- return TYPE.apply();
434
- }
435
- }
436
-
437
- export interface FeeToSetInstance extends TypedEventInstance<FeeToSet> {
438
- data_decoded: FeeToSet;
439
- type_arguments: [];
440
- }
441
-
442
- export interface LiquidityAdded<T0, T1> {
443
- user: string;
444
- first_amount: bigint;
445
- second_amount: bigint;
446
- first_reserve: bigint;
447
- second_reserve: bigint;
448
- wisp_lp_amount: bigint;
449
- fee_amount: bigint;
450
- }
451
-
452
- export namespace LiquidityAdded {
453
- export const TYPE_QNAME =
454
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::LiquidityAdded";
455
-
456
- const TYPE = new TypeDescriptor<LiquidityAdded<any, any>>(
457
- LiquidityAdded.TYPE_QNAME,
458
- );
459
-
460
- export function type<T0, T1>(
461
- arg0: TypeDescriptor<T0> = ANY_TYPE,
462
- arg1: TypeDescriptor<T1> = ANY_TYPE,
463
- ): TypeDescriptor<LiquidityAdded<T0, T1>> {
464
- return TYPE.apply(arg0, arg1);
465
- }
466
- }
467
-
468
- export interface LiquidityAddedInstance
469
- extends TypedEventInstance<LiquidityAdded<any, any>> {
470
- data_decoded: LiquidityAdded<any, any>;
471
- type_arguments: [string, string];
472
- }
473
-
474
- export interface LiquidityRemoved<T0, T1> {
475
- user: string;
476
- first_amount: bigint;
477
- second_amount: bigint;
478
- first_reserve: bigint;
479
- second_reserve: bigint;
480
- wisp_lp_amount: bigint;
481
- fee_amount: bigint;
482
- }
483
-
484
- export namespace LiquidityRemoved {
485
- export const TYPE_QNAME =
486
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::LiquidityRemoved";
487
-
488
- const TYPE = new TypeDescriptor<LiquidityRemoved<any, any>>(
489
- LiquidityRemoved.TYPE_QNAME,
490
- );
491
-
492
- export function type<T0, T1>(
493
- arg0: TypeDescriptor<T0> = ANY_TYPE,
494
- arg1: TypeDescriptor<T1> = ANY_TYPE,
495
- ): TypeDescriptor<LiquidityRemoved<T0, T1>> {
496
- return TYPE.apply(arg0, arg1);
497
- }
498
- }
499
-
500
- export interface LiquidityRemovedInstance
501
- extends TypedEventInstance<LiquidityRemoved<any, any>> {
502
- data_decoded: LiquidityRemoved<any, any>;
503
- type_arguments: [string, string];
504
- }
505
-
506
- export interface Pool<T0, T1> {
507
- id: _0x2.object_.UID;
508
- first_token: _0x2.balance.Balance<T0>;
509
- second_token: _0x2.balance.Balance<T1>;
510
- wisp_lp_supply: _0x2.balance.Supply<pool.WISPLP<T0, T1>>;
511
- k_last: bigint;
512
- }
513
-
514
- export namespace Pool {
515
- export const TYPE_QNAME =
516
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::Pool";
517
-
518
- const TYPE = new TypeDescriptor<Pool<any, any>>(Pool.TYPE_QNAME);
519
-
520
- export function type<T0, T1>(
521
- arg0: TypeDescriptor<T0> = ANY_TYPE,
522
- arg1: TypeDescriptor<T1> = ANY_TYPE,
523
- ): TypeDescriptor<Pool<T0, T1>> {
524
- return TYPE.apply(arg0, arg1);
525
- }
526
- }
527
-
528
- export interface PoolCreated<T0, T1> {
529
- pool: string;
530
- first_amount: bigint;
531
- second_amount: bigint;
532
- wisp_lp_amount: bigint;
533
- }
534
-
535
- export namespace PoolCreated {
536
- export const TYPE_QNAME =
537
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolCreated";
538
-
539
- const TYPE = new TypeDescriptor<PoolCreated<any, any>>(
540
- PoolCreated.TYPE_QNAME,
541
- );
542
-
543
- export function type<T0, T1>(
544
- arg0: TypeDescriptor<T0> = ANY_TYPE,
545
- arg1: TypeDescriptor<T1> = ANY_TYPE,
546
- ): TypeDescriptor<PoolCreated<T0, T1>> {
547
- return TYPE.apply(arg0, arg1);
548
- }
549
- }
550
-
551
- export interface PoolCreatedInstance
552
- extends TypedEventInstance<PoolCreated<any, any>> {
553
- data_decoded: PoolCreated<any, any>;
554
- type_arguments: [string, string];
555
- }
556
-
557
- export interface PoolName {
558
- first_type: _0x1.type_name.TypeName;
559
- second_type: _0x1.type_name.TypeName;
560
- }
561
-
562
- export namespace PoolName {
563
- export const TYPE_QNAME =
564
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolName";
565
-
566
- const TYPE = new TypeDescriptor<PoolName>(PoolName.TYPE_QNAME);
567
-
568
- export function type(): TypeDescriptor<PoolName> {
569
- return TYPE.apply();
570
- }
571
- }
572
-
573
- export interface PoolNameInstance extends TypedEventInstance<PoolName> {
574
- data_decoded: PoolName;
575
- type_arguments: [];
576
- }
577
-
578
- export interface PoolRegistry {
579
- id: _0x2.object_.UID;
580
- fee_to: string;
581
- pools: _0x2.object_bag.ObjectBag;
582
- }
583
-
584
- export namespace PoolRegistry {
585
- export const TYPE_QNAME =
586
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolRegistry";
587
-
588
- const TYPE = new TypeDescriptor<PoolRegistry>(PoolRegistry.TYPE_QNAME);
589
-
590
- export function type(): TypeDescriptor<PoolRegistry> {
591
- return TYPE.apply();
592
- }
593
- }
594
-
595
- export interface TokenSwapped<T0, T1> {
596
- user: string;
597
- first_amount_in: bigint;
598
- second_amount_in: bigint;
599
- first_amount_out: bigint;
600
- second_amount_out: bigint;
601
- first_reserve: bigint;
602
- second_reserve: bigint;
603
- }
604
-
605
- export namespace TokenSwapped {
606
- export const TYPE_QNAME =
607
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::TokenSwapped";
608
-
609
- const TYPE = new TypeDescriptor<TokenSwapped<any, any>>(
610
- TokenSwapped.TYPE_QNAME,
611
- );
612
-
613
- export function type<T0, T1>(
614
- arg0: TypeDescriptor<T0> = ANY_TYPE,
615
- arg1: TypeDescriptor<T1> = ANY_TYPE,
616
- ): TypeDescriptor<TokenSwapped<T0, T1>> {
617
- return TYPE.apply(arg0, arg1);
618
- }
619
- }
620
-
621
- export interface TokenSwappedInstance
622
- extends TypedEventInstance<TokenSwapped<any, any>> {
623
- data_decoded: TokenSwapped<any, any>;
624
- type_arguments: [string, string];
625
- }
626
-
627
- export interface WISPLP<T0, T1> {
628
- dummy_field: Boolean;
629
- }
630
-
631
- export namespace WISPLP {
632
- export const TYPE_QNAME =
633
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::WISPLP";
634
-
635
- const TYPE = new TypeDescriptor<WISPLP<any, any>>(WISPLP.TYPE_QNAME);
636
-
637
- export function type<T0, T1>(
638
- arg0: TypeDescriptor<T0> = ANY_TYPE,
639
- arg1: TypeDescriptor<T1> = ANY_TYPE,
640
- ): TypeDescriptor<WISPLP<T0, T1>> {
641
- return TYPE.apply(arg0, arg1);
642
- }
643
- }
644
-
645
- export namespace builder {
646
- export function addLiquidity<T0 = any, T1 = any>(
647
- tx: TransactionBlock,
648
- args: [
649
- string | ObjectCallArg | TransactionArgument,
650
- string | ObjectCallArg | TransactionArgument,
651
- string | ObjectCallArg | TransactionArgument,
652
- bigint | TransactionArgument,
653
- bigint | TransactionArgument,
654
- bigint | TransactionArgument,
655
- bigint | TransactionArgument,
656
- string | ObjectCallArg | TransactionArgument,
657
- ],
658
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
659
- ): TransactionArgument &
660
- [
661
- TransactionArgument,
662
- TransactionArgument,
663
- TransactionArgument,
664
- TransactionArgument,
665
- TransactionArgument,
666
- TransactionArgument,
667
- TransactionArgument,
668
- TransactionArgument,
669
- ] {
670
- const _args: any[] = [];
671
- _args.push(transactionArgumentOrObject(args[0], tx));
672
- _args.push(transactionArgumentOrObject(args[1], tx));
673
- _args.push(transactionArgumentOrObject(args[2], tx));
674
- _args.push(transactionArgumentOrPure(args[3], tx));
675
- _args.push(transactionArgumentOrPure(args[4], tx));
676
- _args.push(transactionArgumentOrPure(args[5], tx));
677
- _args.push(transactionArgumentOrPure(args[6], tx));
678
- _args.push(transactionArgumentOrObject(args[7], tx));
679
-
680
- // @ts-ignore
681
- return tx.moveCall({
682
- target:
683
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::add_liquidity",
684
- arguments: _args,
685
- typeArguments: [
686
- typeof typeArguments[0] === "string"
687
- ? typeArguments[0]
688
- : typeArguments[0].getSignature(),
689
- typeof typeArguments[1] === "string"
690
- ? typeArguments[1]
691
- : typeArguments[1].getSignature(),
692
- ],
693
- });
694
- }
695
- export function borrowMutPool<T0 = any, T1 = any>(
696
- tx: TransactionBlock,
697
- args: [string | ObjectCallArg | TransactionArgument],
698
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
699
- ): TransactionArgument & [TransactionArgument] {
700
- const _args: any[] = [];
701
- _args.push(transactionArgumentOrObject(args[0], tx));
702
-
703
- // @ts-ignore
704
- return tx.moveCall({
705
- target:
706
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::borrow_mut_pool",
707
- arguments: _args,
708
- typeArguments: [
709
- typeof typeArguments[0] === "string"
710
- ? typeArguments[0]
711
- : typeArguments[0].getSignature(),
712
- typeof typeArguments[1] === "string"
713
- ? typeArguments[1]
714
- : typeArguments[1].getSignature(),
715
- ],
716
- });
717
- }
718
- export function borrowPool<T0 = any, T1 = any>(
719
- tx: TransactionBlock,
720
- args: [string | ObjectCallArg | TransactionArgument],
721
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
722
- ): TransactionArgument & [TransactionArgument] {
723
- const _args: any[] = [];
724
- _args.push(transactionArgumentOrObject(args[0], tx));
725
-
726
- // @ts-ignore
727
- return tx.moveCall({
728
- target:
729
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::borrow_pool",
730
- arguments: _args,
731
- typeArguments: [
732
- typeof typeArguments[0] === "string"
733
- ? typeArguments[0]
734
- : typeArguments[0].getSignature(),
735
- typeof typeArguments[1] === "string"
736
- ? typeArguments[1]
737
- : typeArguments[1].getSignature(),
738
- ],
739
- });
740
- }
741
- export function createPool<T0 = any, T1 = any>(
742
- tx: TransactionBlock,
743
- args: [
744
- string | ObjectCallArg | TransactionArgument,
745
- string | ObjectCallArg | TransactionArgument,
746
- string | ObjectCallArg | TransactionArgument,
747
- bigint | TransactionArgument,
748
- bigint | TransactionArgument,
749
- string | ObjectCallArg | TransactionArgument,
750
- ],
751
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
752
- ): TransactionArgument &
753
- [
754
- TransactionArgument,
755
- TransactionArgument,
756
- TransactionArgument,
757
- TransactionArgument,
758
- TransactionArgument,
759
- TransactionArgument,
760
- ] {
761
- const _args: any[] = [];
762
- _args.push(transactionArgumentOrObject(args[0], tx));
763
- _args.push(transactionArgumentOrObject(args[1], tx));
764
- _args.push(transactionArgumentOrObject(args[2], tx));
765
- _args.push(transactionArgumentOrPure(args[3], tx));
766
- _args.push(transactionArgumentOrPure(args[4], tx));
767
- _args.push(transactionArgumentOrObject(args[5], tx));
768
-
769
- // @ts-ignore
770
- return tx.moveCall({
771
- target:
772
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::create_pool",
773
- arguments: _args,
774
- typeArguments: [
775
- typeof typeArguments[0] === "string"
776
- ? typeArguments[0]
777
- : typeArguments[0].getSignature(),
778
- typeof typeArguments[1] === "string"
779
- ? typeArguments[1]
780
- : typeArguments[1].getSignature(),
781
- ],
782
- });
783
- }
784
- export function createPoolName(
785
- tx: TransactionBlock,
786
- args: [
787
- _0x1.type_name.TypeName | TransactionArgument,
788
- _0x1.type_name.TypeName | TransactionArgument,
789
- ],
790
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
791
- const _args: any[] = [];
792
- _args.push(transactionArgumentOrPure(args[0], tx));
793
- _args.push(transactionArgumentOrPure(args[1], tx));
794
-
795
- // @ts-ignore
796
- return tx.moveCall({
797
- target:
798
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::create_pool_name",
799
- arguments: _args,
800
- });
801
- }
802
- export function getAmounts<T0 = any, T1 = any>(
803
- tx: TransactionBlock,
804
- args: [string | ObjectCallArg | TransactionArgument],
805
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
806
- ): TransactionArgument & [TransactionArgument] {
807
- const _args: any[] = [];
808
- _args.push(transactionArgumentOrObject(args[0], tx));
809
-
810
- // @ts-ignore
811
- return tx.moveCall({
812
- target:
813
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_amounts",
814
- arguments: _args,
815
- typeArguments: [
816
- typeof typeArguments[0] === "string"
817
- ? typeArguments[0]
818
- : typeArguments[0].getSignature(),
819
- typeof typeArguments[1] === "string"
820
- ? typeArguments[1]
821
- : typeArguments[1].getSignature(),
822
- ],
823
- });
824
- }
825
- export function getInputAmount<T0 = any, T1 = any>(
826
- tx: TransactionBlock,
827
- args: [
828
- string | ObjectCallArg | TransactionArgument,
829
- bigint | TransactionArgument,
830
- Boolean | TransactionArgument,
831
- ],
832
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
833
- ): TransactionArgument &
834
- [TransactionArgument, TransactionArgument, TransactionArgument] {
835
- const _args: any[] = [];
836
- _args.push(transactionArgumentOrObject(args[0], tx));
837
- _args.push(transactionArgumentOrPure(args[1], tx));
838
- _args.push(transactionArgumentOrPure(args[2], tx));
839
-
840
- // @ts-ignore
841
- return tx.moveCall({
842
- target:
843
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_input_amount",
844
- arguments: _args,
845
- typeArguments: [
846
- typeof typeArguments[0] === "string"
847
- ? typeArguments[0]
848
- : typeArguments[0].getSignature(),
849
- typeof typeArguments[1] === "string"
850
- ? typeArguments[1]
851
- : typeArguments[1].getSignature(),
852
- ],
853
- });
854
- }
855
- export function getOutputAmount<T0 = any, T1 = any>(
856
- tx: TransactionBlock,
857
- args: [
858
- string | ObjectCallArg | TransactionArgument,
859
- bigint | TransactionArgument,
860
- Boolean | TransactionArgument,
861
- ],
862
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
863
- ): TransactionArgument &
864
- [TransactionArgument, TransactionArgument, TransactionArgument] {
865
- const _args: any[] = [];
866
- _args.push(transactionArgumentOrObject(args[0], tx));
867
- _args.push(transactionArgumentOrPure(args[1], tx));
868
- _args.push(transactionArgumentOrPure(args[2], tx));
869
-
870
- // @ts-ignore
871
- return tx.moveCall({
872
- target:
873
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_output_amount",
874
- arguments: _args,
875
- typeArguments: [
876
- typeof typeArguments[0] === "string"
877
- ? typeArguments[0]
878
- : typeArguments[0].getSignature(),
879
- typeof typeArguments[1] === "string"
880
- ? typeArguments[1]
881
- : typeArguments[1].getSignature(),
882
- ],
883
- });
884
- }
885
- export function getPoolData<T0 = any, T1 = any>(
886
- tx: TransactionBlock,
887
- args: [string | ObjectCallArg | TransactionArgument],
888
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
889
- ): TransactionArgument & [TransactionArgument] {
890
- const _args: any[] = [];
891
- _args.push(transactionArgumentOrObject(args[0], tx));
892
-
893
- // @ts-ignore
894
- return tx.moveCall({
895
- target:
896
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_pool_data",
897
- arguments: _args,
898
- typeArguments: [
899
- typeof typeArguments[0] === "string"
900
- ? typeArguments[0]
901
- : typeArguments[0].getSignature(),
902
- typeof typeArguments[1] === "string"
903
- ? typeArguments[1]
904
- : typeArguments[1].getSignature(),
905
- ],
906
- });
907
- }
908
- export function isPoolCreated<T0 = any, T1 = any>(
909
- tx: TransactionBlock,
910
- args: [string | ObjectCallArg | TransactionArgument],
911
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
912
- ): TransactionArgument & [TransactionArgument] {
913
- const _args: any[] = [];
914
- _args.push(transactionArgumentOrObject(args[0], tx));
915
-
916
- // @ts-ignore
917
- return tx.moveCall({
918
- target:
919
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::is_pool_created",
920
- arguments: _args,
921
- typeArguments: [
922
- typeof typeArguments[0] === "string"
923
- ? typeArguments[0]
924
- : typeArguments[0].getSignature(),
925
- typeof typeArguments[1] === "string"
926
- ? typeArguments[1]
927
- : typeArguments[1].getSignature(),
928
- ],
929
- });
930
- }
931
- export function isPoolCreatedSorted<T0 = any, T1 = any>(
932
- tx: TransactionBlock,
933
- args: [string | ObjectCallArg | TransactionArgument],
934
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
935
- ): TransactionArgument & [TransactionArgument] {
936
- const _args: any[] = [];
937
- _args.push(transactionArgumentOrObject(args[0], tx));
938
-
939
- // @ts-ignore
940
- return tx.moveCall({
941
- target:
942
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::is_pool_created_sorted",
943
- arguments: _args,
944
- typeArguments: [
945
- typeof typeArguments[0] === "string"
946
- ? typeArguments[0]
947
- : typeArguments[0].getSignature(),
948
- typeof typeArguments[1] === "string"
949
- ? typeArguments[1]
950
- : typeArguments[1].getSignature(),
951
- ],
952
- });
953
- }
954
- export function processSwapExactInput<T0 = any, T1 = any>(
955
- tx: TransactionBlock,
956
- args: [
957
- string | ObjectCallArg | TransactionArgument,
958
- string | ObjectCallArg | TransactionArgument,
959
- string | ObjectCallArg | TransactionArgument,
960
- bigint | TransactionArgument,
961
- Boolean | TransactionArgument,
962
- string | ObjectCallArg | TransactionArgument,
963
- ],
964
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
965
- ): TransactionArgument &
966
- [
967
- TransactionArgument,
968
- TransactionArgument,
969
- TransactionArgument,
970
- TransactionArgument,
971
- TransactionArgument,
972
- TransactionArgument,
973
- ] {
974
- const _args: any[] = [];
975
- _args.push(transactionArgumentOrObject(args[0], tx));
976
- _args.push(transactionArgumentOrObject(args[1], tx));
977
- _args.push(transactionArgumentOrObject(args[2], tx));
978
- _args.push(transactionArgumentOrPure(args[3], tx));
979
- _args.push(transactionArgumentOrPure(args[4], tx));
980
- _args.push(transactionArgumentOrObject(args[5], tx));
981
-
982
- // @ts-ignore
983
- return tx.moveCall({
984
- target:
985
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::process_swap_exact_input",
986
- arguments: _args,
987
- typeArguments: [
988
- typeof typeArguments[0] === "string"
989
- ? typeArguments[0]
990
- : typeArguments[0].getSignature(),
991
- typeof typeArguments[1] === "string"
992
- ? typeArguments[1]
993
- : typeArguments[1].getSignature(),
994
- ],
995
- });
996
- }
997
- export function processSwapExactOutput<T0 = any, T1 = any>(
998
- tx: TransactionBlock,
999
- args: [
1000
- string | ObjectCallArg | TransactionArgument,
1001
- string | ObjectCallArg | TransactionArgument,
1002
- string | ObjectCallArg | TransactionArgument,
1003
- bigint | TransactionArgument,
1004
- Boolean | TransactionArgument,
1005
- string | ObjectCallArg | TransactionArgument,
1006
- ],
1007
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1008
- ): TransactionArgument &
1009
- [
1010
- TransactionArgument,
1011
- TransactionArgument,
1012
- TransactionArgument,
1013
- TransactionArgument,
1014
- TransactionArgument,
1015
- TransactionArgument,
1016
- ] {
1017
- const _args: any[] = [];
1018
- _args.push(transactionArgumentOrObject(args[0], tx));
1019
- _args.push(transactionArgumentOrObject(args[1], tx));
1020
- _args.push(transactionArgumentOrObject(args[2], tx));
1021
- _args.push(transactionArgumentOrPure(args[3], tx));
1022
- _args.push(transactionArgumentOrPure(args[4], tx));
1023
- _args.push(transactionArgumentOrObject(args[5], tx));
1024
-
1025
- // @ts-ignore
1026
- return tx.moveCall({
1027
- target:
1028
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::process_swap_exact_output",
1029
- arguments: _args,
1030
- typeArguments: [
1031
- typeof typeArguments[0] === "string"
1032
- ? typeArguments[0]
1033
- : typeArguments[0].getSignature(),
1034
- typeof typeArguments[1] === "string"
1035
- ? typeArguments[1]
1036
- : typeArguments[1].getSignature(),
1037
- ],
1038
- });
1039
- }
1040
- export function removeLiquidity<T0 = any, T1 = any>(
1041
- tx: TransactionBlock,
1042
- args: [
1043
- string | ObjectCallArg | TransactionArgument,
1044
- string | ObjectCallArg | TransactionArgument,
1045
- bigint | TransactionArgument,
1046
- bigint | TransactionArgument,
1047
- bigint | TransactionArgument,
1048
- string | ObjectCallArg | TransactionArgument,
1049
- ],
1050
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1051
- ): TransactionArgument &
1052
- [
1053
- TransactionArgument,
1054
- TransactionArgument,
1055
- TransactionArgument,
1056
- TransactionArgument,
1057
- TransactionArgument,
1058
- TransactionArgument,
1059
- ] {
1060
- const _args: any[] = [];
1061
- _args.push(transactionArgumentOrObject(args[0], tx));
1062
- _args.push(transactionArgumentOrObject(args[1], tx));
1063
- _args.push(transactionArgumentOrPure(args[2], tx));
1064
- _args.push(transactionArgumentOrPure(args[3], tx));
1065
- _args.push(transactionArgumentOrPure(args[4], tx));
1066
- _args.push(transactionArgumentOrObject(args[5], tx));
1067
-
1068
- // @ts-ignore
1069
- return tx.moveCall({
1070
- target:
1071
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::remove_liquidity",
1072
- arguments: _args,
1073
- typeArguments: [
1074
- typeof typeArguments[0] === "string"
1075
- ? typeArguments[0]
1076
- : typeArguments[0].getSignature(),
1077
- typeof typeArguments[1] === "string"
1078
- ? typeArguments[1]
1079
- : typeArguments[1].getSignature(),
1080
- ],
1081
- });
1082
- }
1083
- export function setFeeTo_(
1084
- tx: TransactionBlock,
1085
- args: [
1086
- string | ObjectCallArg | TransactionArgument,
1087
- string | ObjectCallArg | TransactionArgument,
1088
- string | TransactionArgument,
1089
- string | ObjectCallArg | TransactionArgument,
1090
- ],
1091
- ): TransactionArgument &
1092
- [
1093
- TransactionArgument,
1094
- TransactionArgument,
1095
- TransactionArgument,
1096
- TransactionArgument,
1097
- ] {
1098
- const _args: any[] = [];
1099
- _args.push(transactionArgumentOrObject(args[0], tx));
1100
- _args.push(transactionArgumentOrObject(args[1], tx));
1101
- _args.push(transactionArgumentOrPure(args[2], tx));
1102
- _args.push(transactionArgumentOrObject(args[3], tx));
1103
-
1104
- // @ts-ignore
1105
- return tx.moveCall({
1106
- target:
1107
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::set_fee_to_",
1108
- arguments: _args,
1109
- });
1110
- }
1111
- export function swapExactFirstToSecond<T0 = any, T1 = any>(
1112
- tx: TransactionBlock,
1113
- args: [
1114
- string | ObjectCallArg | TransactionArgument,
1115
- string | ObjectCallArg | TransactionArgument,
1116
- bigint | TransactionArgument,
1117
- bigint | TransactionArgument,
1118
- string | ObjectCallArg | TransactionArgument,
1119
- ],
1120
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1121
- ): TransactionArgument &
1122
- [
1123
- TransactionArgument,
1124
- TransactionArgument,
1125
- TransactionArgument,
1126
- TransactionArgument,
1127
- TransactionArgument,
1128
- ] {
1129
- const _args: any[] = [];
1130
- _args.push(transactionArgumentOrObject(args[0], tx));
1131
- _args.push(transactionArgumentOrObject(args[1], tx));
1132
- _args.push(transactionArgumentOrPure(args[2], tx));
1133
- _args.push(transactionArgumentOrPure(args[3], tx));
1134
- _args.push(transactionArgumentOrObject(args[4], tx));
1135
-
1136
- // @ts-ignore
1137
- return tx.moveCall({
1138
- target:
1139
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_exact_first_to_second",
1140
- arguments: _args,
1141
- typeArguments: [
1142
- typeof typeArguments[0] === "string"
1143
- ? typeArguments[0]
1144
- : typeArguments[0].getSignature(),
1145
- typeof typeArguments[1] === "string"
1146
- ? typeArguments[1]
1147
- : typeArguments[1].getSignature(),
1148
- ],
1149
- });
1150
- }
1151
- export function swapExactSecondToFirst<T0 = any, T1 = any>(
1152
- tx: TransactionBlock,
1153
- args: [
1154
- string | ObjectCallArg | TransactionArgument,
1155
- string | ObjectCallArg | TransactionArgument,
1156
- bigint | TransactionArgument,
1157
- bigint | TransactionArgument,
1158
- string | ObjectCallArg | TransactionArgument,
1159
- ],
1160
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1161
- ): TransactionArgument &
1162
- [
1163
- TransactionArgument,
1164
- TransactionArgument,
1165
- TransactionArgument,
1166
- TransactionArgument,
1167
- TransactionArgument,
1168
- ] {
1169
- const _args: any[] = [];
1170
- _args.push(transactionArgumentOrObject(args[0], tx));
1171
- _args.push(transactionArgumentOrObject(args[1], tx));
1172
- _args.push(transactionArgumentOrPure(args[2], tx));
1173
- _args.push(transactionArgumentOrPure(args[3], tx));
1174
- _args.push(transactionArgumentOrObject(args[4], tx));
1175
-
1176
- // @ts-ignore
1177
- return tx.moveCall({
1178
- target:
1179
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_exact_second_to_first",
1180
- arguments: _args,
1181
- typeArguments: [
1182
- typeof typeArguments[0] === "string"
1183
- ? typeArguments[0]
1184
- : typeArguments[0].getSignature(),
1185
- typeof typeArguments[1] === "string"
1186
- ? typeArguments[1]
1187
- : typeArguments[1].getSignature(),
1188
- ],
1189
- });
1190
- }
1191
- export function swapFirstToExactSecond<T0 = any, T1 = any>(
1192
- tx: TransactionBlock,
1193
- args: [
1194
- string | ObjectCallArg | TransactionArgument,
1195
- string | ObjectCallArg | TransactionArgument,
1196
- bigint | TransactionArgument,
1197
- bigint | TransactionArgument,
1198
- string | ObjectCallArg | TransactionArgument,
1199
- ],
1200
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1201
- ): TransactionArgument &
1202
- [
1203
- TransactionArgument,
1204
- TransactionArgument,
1205
- TransactionArgument,
1206
- TransactionArgument,
1207
- TransactionArgument,
1208
- ] {
1209
- const _args: any[] = [];
1210
- _args.push(transactionArgumentOrObject(args[0], tx));
1211
- _args.push(transactionArgumentOrObject(args[1], tx));
1212
- _args.push(transactionArgumentOrPure(args[2], tx));
1213
- _args.push(transactionArgumentOrPure(args[3], tx));
1214
- _args.push(transactionArgumentOrObject(args[4], tx));
1215
-
1216
- // @ts-ignore
1217
- return tx.moveCall({
1218
- target:
1219
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_first_to_exact_second",
1220
- arguments: _args,
1221
- typeArguments: [
1222
- typeof typeArguments[0] === "string"
1223
- ? typeArguments[0]
1224
- : typeArguments[0].getSignature(),
1225
- typeof typeArguments[1] === "string"
1226
- ? typeArguments[1]
1227
- : typeArguments[1].getSignature(),
1228
- ],
1229
- });
1230
- }
1231
- export function swapSecondToExactFirst<T0 = any, T1 = any>(
1232
- tx: TransactionBlock,
1233
- args: [
1234
- string | ObjectCallArg | TransactionArgument,
1235
- string | ObjectCallArg | TransactionArgument,
1236
- bigint | TransactionArgument,
1237
- bigint | TransactionArgument,
1238
- string | ObjectCallArg | TransactionArgument,
1239
- ],
1240
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1241
- ): TransactionArgument &
1242
- [
1243
- TransactionArgument,
1244
- TransactionArgument,
1245
- TransactionArgument,
1246
- TransactionArgument,
1247
- TransactionArgument,
1248
- ] {
1249
- const _args: any[] = [];
1250
- _args.push(transactionArgumentOrObject(args[0], tx));
1251
- _args.push(transactionArgumentOrObject(args[1], tx));
1252
- _args.push(transactionArgumentOrPure(args[2], tx));
1253
- _args.push(transactionArgumentOrPure(args[3], tx));
1254
- _args.push(transactionArgumentOrObject(args[4], tx));
1255
-
1256
- // @ts-ignore
1257
- return tx.moveCall({
1258
- target:
1259
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_second_to_exact_first",
1260
- arguments: _args,
1261
- typeArguments: [
1262
- typeof typeArguments[0] === "string"
1263
- ? typeArguments[0]
1264
- : typeArguments[0].getSignature(),
1265
- typeof typeArguments[1] === "string"
1266
- ? typeArguments[1]
1267
- : typeArguments[1].getSignature(),
1268
- ],
1269
- });
1270
- }
1271
- export function zapInFirst<T0 = any, T1 = any>(
1272
- tx: TransactionBlock,
1273
- args: [
1274
- string | ObjectCallArg | TransactionArgument,
1275
- string | ObjectCallArg | TransactionArgument,
1276
- bigint | TransactionArgument,
1277
- string | ObjectCallArg | TransactionArgument,
1278
- ],
1279
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1280
- ): TransactionArgument &
1281
- [
1282
- TransactionArgument,
1283
- TransactionArgument,
1284
- TransactionArgument,
1285
- TransactionArgument,
1286
- ] {
1287
- const _args: any[] = [];
1288
- _args.push(transactionArgumentOrObject(args[0], tx));
1289
- _args.push(transactionArgumentOrObject(args[1], tx));
1290
- _args.push(transactionArgumentOrPure(args[2], tx));
1291
- _args.push(transactionArgumentOrObject(args[3], tx));
1292
-
1293
- // @ts-ignore
1294
- return tx.moveCall({
1295
- target:
1296
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::zap_in_first",
1297
- arguments: _args,
1298
- typeArguments: [
1299
- typeof typeArguments[0] === "string"
1300
- ? typeArguments[0]
1301
- : typeArguments[0].getSignature(),
1302
- typeof typeArguments[1] === "string"
1303
- ? typeArguments[1]
1304
- : typeArguments[1].getSignature(),
1305
- ],
1306
- });
1307
- }
1308
- export function zapInSecond<T0 = any, T1 = any>(
1309
- tx: TransactionBlock,
1310
- args: [
1311
- string | ObjectCallArg | TransactionArgument,
1312
- string | ObjectCallArg | TransactionArgument,
1313
- bigint | TransactionArgument,
1314
- string | ObjectCallArg | TransactionArgument,
1315
- ],
1316
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1317
- ): TransactionArgument &
1318
- [
1319
- TransactionArgument,
1320
- TransactionArgument,
1321
- TransactionArgument,
1322
- TransactionArgument,
1323
- ] {
1324
- const _args: any[] = [];
1325
- _args.push(transactionArgumentOrObject(args[0], tx));
1326
- _args.push(transactionArgumentOrObject(args[1], tx));
1327
- _args.push(transactionArgumentOrPure(args[2], tx));
1328
- _args.push(transactionArgumentOrObject(args[3], tx));
1329
-
1330
- // @ts-ignore
1331
- return tx.moveCall({
1332
- target:
1333
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::zap_in_second",
1334
- arguments: _args,
1335
- typeArguments: [
1336
- typeof typeArguments[0] === "string"
1337
- ? typeArguments[0]
1338
- : typeArguments[0].getSignature(),
1339
- typeof typeArguments[1] === "string"
1340
- ? typeArguments[1]
1341
- : typeArguments[1].getSignature(),
1342
- ],
1343
- });
1344
- }
1345
- }
1346
- export namespace view {
1347
- export async function addLiquidity<T0 = any, T1 = any>(
1348
- client: SuiClient,
1349
- args: [
1350
- string | ObjectCallArg | TransactionArgument,
1351
- string | ObjectCallArg | TransactionArgument,
1352
- string | ObjectCallArg | TransactionArgument,
1353
- bigint | TransactionArgument,
1354
- bigint | TransactionArgument,
1355
- bigint | TransactionArgument,
1356
- bigint | TransactionArgument,
1357
- string | ObjectCallArg | TransactionArgument,
1358
- ],
1359
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1360
- ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
1361
- const tx = new TransactionBlock();
1362
- builder.addLiquidity(tx, args, typeArguments);
1363
- const insepctRes = await client.devInspectTransactionBlock({
1364
- transactionBlock: tx,
1365
- sender: ZERO_ADDRESS,
1366
- });
1367
-
1368
- return (await getMoveCoder(client)).decodeDevInspectResult<
1369
- [_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
1370
- >(insepctRes);
1371
- }
1372
- export async function borrowMutPool<T0 = any, T1 = any>(
1373
- client: SuiClient,
1374
- args: [string | ObjectCallArg | TransactionArgument],
1375
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1376
- ): Promise<TypedDevInspectResults<[string]>> {
1377
- const tx = new TransactionBlock();
1378
- builder.borrowMutPool(tx, args, typeArguments);
1379
- const insepctRes = await client.devInspectTransactionBlock({
1380
- transactionBlock: tx,
1381
- sender: ZERO_ADDRESS,
1382
- });
1383
-
1384
- return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
1385
- insepctRes,
1386
- );
1387
- }
1388
- export async function borrowPool<T0 = any, T1 = any>(
1389
- client: SuiClient,
1390
- args: [string | ObjectCallArg | TransactionArgument],
1391
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1392
- ): Promise<TypedDevInspectResults<[string]>> {
1393
- const tx = new TransactionBlock();
1394
- builder.borrowPool(tx, args, typeArguments);
1395
- const insepctRes = await client.devInspectTransactionBlock({
1396
- transactionBlock: tx,
1397
- sender: ZERO_ADDRESS,
1398
- });
1399
-
1400
- return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
1401
- insepctRes,
1402
- );
1403
- }
1404
- export async function createPool<T0 = any, T1 = any>(
1405
- client: SuiClient,
1406
- args: [
1407
- string | ObjectCallArg | TransactionArgument,
1408
- string | ObjectCallArg | TransactionArgument,
1409
- string | ObjectCallArg | TransactionArgument,
1410
- bigint | TransactionArgument,
1411
- bigint | TransactionArgument,
1412
- string | ObjectCallArg | TransactionArgument,
1413
- ],
1414
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1415
- ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
1416
- const tx = new TransactionBlock();
1417
- builder.createPool(tx, args, typeArguments);
1418
- const insepctRes = await client.devInspectTransactionBlock({
1419
- transactionBlock: tx,
1420
- sender: ZERO_ADDRESS,
1421
- });
1422
-
1423
- return (await getMoveCoder(client)).decodeDevInspectResult<
1424
- [_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
1425
- >(insepctRes);
1426
- }
1427
- export async function createPoolName(
1428
- client: SuiClient,
1429
- args: [
1430
- _0x1.type_name.TypeName | TransactionArgument,
1431
- _0x1.type_name.TypeName | TransactionArgument,
1432
- ],
1433
- ): Promise<TypedDevInspectResults<[pool.PoolName]>> {
1434
- const tx = new TransactionBlock();
1435
- builder.createPoolName(tx, args);
1436
- const insepctRes = await client.devInspectTransactionBlock({
1437
- transactionBlock: tx,
1438
- sender: ZERO_ADDRESS,
1439
- });
1440
-
1441
- return (await getMoveCoder(client)).decodeDevInspectResult<
1442
- [pool.PoolName]
1443
- >(insepctRes);
1444
- }
1445
- export async function getAmounts<T0 = any, T1 = any>(
1446
- client: SuiClient,
1447
- args: [string | ObjectCallArg | TransactionArgument],
1448
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1449
- ): Promise<TypedDevInspectResults<[bigint, bigint, bigint]>> {
1450
- const tx = new TransactionBlock();
1451
- builder.getAmounts(tx, args, typeArguments);
1452
- const insepctRes = await client.devInspectTransactionBlock({
1453
- transactionBlock: tx,
1454
- sender: ZERO_ADDRESS,
1455
- });
1456
-
1457
- return (await getMoveCoder(client)).decodeDevInspectResult<
1458
- [bigint, bigint, bigint]
1459
- >(insepctRes);
1460
- }
1461
- export async function getInputAmount<T0 = any, T1 = any>(
1462
- client: SuiClient,
1463
- args: [
1464
- string | ObjectCallArg | TransactionArgument,
1465
- bigint | TransactionArgument,
1466
- Boolean | TransactionArgument,
1467
- ],
1468
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1469
- ): Promise<TypedDevInspectResults<[bigint]>> {
1470
- const tx = new TransactionBlock();
1471
- builder.getInputAmount(tx, args, typeArguments);
1472
- const insepctRes = await client.devInspectTransactionBlock({
1473
- transactionBlock: tx,
1474
- sender: ZERO_ADDRESS,
1475
- });
1476
-
1477
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1478
- insepctRes,
1479
- );
1480
- }
1481
- export async function getOutputAmount<T0 = any, T1 = any>(
1482
- client: SuiClient,
1483
- args: [
1484
- string | ObjectCallArg | TransactionArgument,
1485
- bigint | TransactionArgument,
1486
- Boolean | TransactionArgument,
1487
- ],
1488
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1489
- ): Promise<TypedDevInspectResults<[bigint]>> {
1490
- const tx = new TransactionBlock();
1491
- builder.getOutputAmount(tx, args, typeArguments);
1492
- const insepctRes = await client.devInspectTransactionBlock({
1493
- transactionBlock: tx,
1494
- sender: ZERO_ADDRESS,
1495
- });
1496
-
1497
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1498
- insepctRes,
1499
- );
1500
- }
1501
- export async function getPoolData<T0 = any, T1 = any>(
1502
- client: SuiClient,
1503
- args: [string | ObjectCallArg | TransactionArgument],
1504
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1505
- ): Promise<
1506
- TypedDevInspectResults<[bigint, bigint, bigint, bigint, bigint]>
1507
- > {
1508
- const tx = new TransactionBlock();
1509
- builder.getPoolData(tx, args, typeArguments);
1510
- const insepctRes = await client.devInspectTransactionBlock({
1511
- transactionBlock: tx,
1512
- sender: ZERO_ADDRESS,
1513
- });
1514
-
1515
- return (await getMoveCoder(client)).decodeDevInspectResult<
1516
- [bigint, bigint, bigint, bigint, bigint]
1517
- >(insepctRes);
1518
- }
1519
- export async function isPoolCreated<T0 = any, T1 = any>(
1520
- client: SuiClient,
1521
- args: [string | ObjectCallArg | TransactionArgument],
1522
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1523
- ): Promise<TypedDevInspectResults<[Boolean]>> {
1524
- const tx = new TransactionBlock();
1525
- builder.isPoolCreated(tx, args, typeArguments);
1526
- const insepctRes = await client.devInspectTransactionBlock({
1527
- transactionBlock: tx,
1528
- sender: ZERO_ADDRESS,
1529
- });
1530
-
1531
- return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
1532
- insepctRes,
1533
- );
1534
- }
1535
- export async function isPoolCreatedSorted<T0 = any, T1 = any>(
1536
- client: SuiClient,
1537
- args: [string | ObjectCallArg | TransactionArgument],
1538
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1539
- ): Promise<TypedDevInspectResults<[Boolean]>> {
1540
- const tx = new TransactionBlock();
1541
- builder.isPoolCreatedSorted(tx, args, typeArguments);
1542
- const insepctRes = await client.devInspectTransactionBlock({
1543
- transactionBlock: tx,
1544
- sender: ZERO_ADDRESS,
1545
- });
1546
-
1547
- return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
1548
- insepctRes,
1549
- );
1550
- }
1551
- export async function processSwapExactInput<T0 = any, T1 = any>(
1552
- client: SuiClient,
1553
- args: [
1554
- string | ObjectCallArg | TransactionArgument,
1555
- string | ObjectCallArg | TransactionArgument,
1556
- string | ObjectCallArg | TransactionArgument,
1557
- bigint | TransactionArgument,
1558
- Boolean | TransactionArgument,
1559
- string | ObjectCallArg | TransactionArgument,
1560
- ],
1561
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1562
- ): Promise<TypedDevInspectResults<[]>> {
1563
- const tx = new TransactionBlock();
1564
- builder.processSwapExactInput(tx, args, typeArguments);
1565
- const insepctRes = await client.devInspectTransactionBlock({
1566
- transactionBlock: tx,
1567
- sender: ZERO_ADDRESS,
1568
- });
1569
-
1570
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1571
- insepctRes,
1572
- );
1573
- }
1574
- export async function processSwapExactOutput<T0 = any, T1 = any>(
1575
- client: SuiClient,
1576
- args: [
1577
- string | ObjectCallArg | TransactionArgument,
1578
- string | ObjectCallArg | TransactionArgument,
1579
- string | ObjectCallArg | TransactionArgument,
1580
- bigint | TransactionArgument,
1581
- Boolean | TransactionArgument,
1582
- string | ObjectCallArg | TransactionArgument,
1583
- ],
1584
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1585
- ): Promise<TypedDevInspectResults<[]>> {
1586
- const tx = new TransactionBlock();
1587
- builder.processSwapExactOutput(tx, args, typeArguments);
1588
- const insepctRes = await client.devInspectTransactionBlock({
1589
- transactionBlock: tx,
1590
- sender: ZERO_ADDRESS,
1591
- });
1592
-
1593
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1594
- insepctRes,
1595
- );
1596
- }
1597
- export async function removeLiquidity<T0 = any, T1 = any>(
1598
- client: SuiClient,
1599
- args: [
1600
- string | ObjectCallArg | TransactionArgument,
1601
- string | ObjectCallArg | TransactionArgument,
1602
- bigint | TransactionArgument,
1603
- bigint | TransactionArgument,
1604
- bigint | TransactionArgument,
1605
- string | ObjectCallArg | TransactionArgument,
1606
- ],
1607
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1608
- ): Promise<
1609
- TypedDevInspectResults<[_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]>
1610
- > {
1611
- const tx = new TransactionBlock();
1612
- builder.removeLiquidity(tx, args, typeArguments);
1613
- const insepctRes = await client.devInspectTransactionBlock({
1614
- transactionBlock: tx,
1615
- sender: ZERO_ADDRESS,
1616
- });
1617
-
1618
- return (await getMoveCoder(client)).decodeDevInspectResult<
1619
- [_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]
1620
- >(insepctRes);
1621
- }
1622
- export async function setFeeTo_(
1623
- client: SuiClient,
1624
- args: [
1625
- string | ObjectCallArg | TransactionArgument,
1626
- string | ObjectCallArg | TransactionArgument,
1627
- string | TransactionArgument,
1628
- string | ObjectCallArg | TransactionArgument,
1629
- ],
1630
- ): Promise<TypedDevInspectResults<[]>> {
1631
- const tx = new TransactionBlock();
1632
- builder.setFeeTo_(tx, args);
1633
- const insepctRes = await client.devInspectTransactionBlock({
1634
- transactionBlock: tx,
1635
- sender: ZERO_ADDRESS,
1636
- });
1637
-
1638
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1639
- insepctRes,
1640
- );
1641
- }
1642
- export async function swapExactFirstToSecond<T0 = any, T1 = any>(
1643
- client: SuiClient,
1644
- args: [
1645
- string | ObjectCallArg | TransactionArgument,
1646
- string | ObjectCallArg | TransactionArgument,
1647
- bigint | TransactionArgument,
1648
- bigint | TransactionArgument,
1649
- string | ObjectCallArg | TransactionArgument,
1650
- ],
1651
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1652
- ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
1653
- const tx = new TransactionBlock();
1654
- builder.swapExactFirstToSecond(tx, args, typeArguments);
1655
- const insepctRes = await client.devInspectTransactionBlock({
1656
- transactionBlock: tx,
1657
- sender: ZERO_ADDRESS,
1658
- });
1659
-
1660
- return (await getMoveCoder(client)).decodeDevInspectResult<
1661
- [_0x2.coin.Coin<T1>]
1662
- >(insepctRes);
1663
- }
1664
- export async function swapExactSecondToFirst<T0 = any, T1 = any>(
1665
- client: SuiClient,
1666
- args: [
1667
- string | ObjectCallArg | TransactionArgument,
1668
- string | ObjectCallArg | TransactionArgument,
1669
- bigint | TransactionArgument,
1670
- bigint | TransactionArgument,
1671
- string | ObjectCallArg | TransactionArgument,
1672
- ],
1673
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1674
- ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
1675
- const tx = new TransactionBlock();
1676
- builder.swapExactSecondToFirst(tx, args, typeArguments);
1677
- const insepctRes = await client.devInspectTransactionBlock({
1678
- transactionBlock: tx,
1679
- sender: ZERO_ADDRESS,
1680
- });
1681
-
1682
- return (await getMoveCoder(client)).decodeDevInspectResult<
1683
- [_0x2.coin.Coin<T0>]
1684
- >(insepctRes);
1685
- }
1686
- export async function swapFirstToExactSecond<T0 = any, T1 = any>(
1687
- client: SuiClient,
1688
- args: [
1689
- string | ObjectCallArg | TransactionArgument,
1690
- string | ObjectCallArg | TransactionArgument,
1691
- bigint | TransactionArgument,
1692
- bigint | TransactionArgument,
1693
- string | ObjectCallArg | TransactionArgument,
1694
- ],
1695
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1696
- ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
1697
- const tx = new TransactionBlock();
1698
- builder.swapFirstToExactSecond(tx, args, typeArguments);
1699
- const insepctRes = await client.devInspectTransactionBlock({
1700
- transactionBlock: tx,
1701
- sender: ZERO_ADDRESS,
1702
- });
1703
-
1704
- return (await getMoveCoder(client)).decodeDevInspectResult<
1705
- [_0x2.coin.Coin<T1>]
1706
- >(insepctRes);
1707
- }
1708
- export async function swapSecondToExactFirst<T0 = any, T1 = any>(
1709
- client: SuiClient,
1710
- args: [
1711
- string | ObjectCallArg | TransactionArgument,
1712
- string | ObjectCallArg | TransactionArgument,
1713
- bigint | TransactionArgument,
1714
- bigint | TransactionArgument,
1715
- string | ObjectCallArg | TransactionArgument,
1716
- ],
1717
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1718
- ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
1719
- const tx = new TransactionBlock();
1720
- builder.swapSecondToExactFirst(tx, args, typeArguments);
1721
- const insepctRes = await client.devInspectTransactionBlock({
1722
- transactionBlock: tx,
1723
- sender: ZERO_ADDRESS,
1724
- });
1725
-
1726
- return (await getMoveCoder(client)).decodeDevInspectResult<
1727
- [_0x2.coin.Coin<T0>]
1728
- >(insepctRes);
1729
- }
1730
- export async function zapInFirst<T0 = any, T1 = any>(
1731
- client: SuiClient,
1732
- args: [
1733
- string | ObjectCallArg | TransactionArgument,
1734
- string | ObjectCallArg | TransactionArgument,
1735
- bigint | TransactionArgument,
1736
- string | ObjectCallArg | TransactionArgument,
1737
- ],
1738
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1739
- ): Promise<
1740
- TypedDevInspectResults<
1741
- [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
1742
- >
1743
- > {
1744
- const tx = new TransactionBlock();
1745
- builder.zapInFirst(tx, args, typeArguments);
1746
- const insepctRes = await client.devInspectTransactionBlock({
1747
- transactionBlock: tx,
1748
- sender: ZERO_ADDRESS,
1749
- });
1750
-
1751
- return (await getMoveCoder(client)).decodeDevInspectResult<
1752
- [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
1753
- >(insepctRes);
1754
- }
1755
- export async function zapInSecond<T0 = any, T1 = any>(
1756
- client: SuiClient,
1757
- args: [
1758
- string | ObjectCallArg | TransactionArgument,
1759
- string | ObjectCallArg | TransactionArgument,
1760
- bigint | TransactionArgument,
1761
- string | ObjectCallArg | TransactionArgument,
1762
- ],
1763
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1764
- ): Promise<
1765
- TypedDevInspectResults<
1766
- [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
1767
- >
1768
- > {
1769
- const tx = new TransactionBlock();
1770
- builder.zapInSecond(tx, args, typeArguments);
1771
- const insepctRes = await client.devInspectTransactionBlock({
1772
- transactionBlock: tx,
1773
- sender: ZERO_ADDRESS,
1774
- });
1775
-
1776
- return (await getMoveCoder(client)).decodeDevInspectResult<
1777
- [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
1778
- >(insepctRes);
1779
- }
1780
- }
1781
- }
1782
-
1783
- export namespace pool_utils {
1784
- export namespace builder {
1785
- export function executeReturnToken<T0 = any>(
1786
- tx: TransactionBlock,
1787
- args: [
1788
- _0x2.coin.Coin<T0> | TransactionArgument,
1789
- string | ObjectCallArg | TransactionArgument,
1790
- ],
1791
- typeArguments: [TypeDescriptor<T0> | string],
1792
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1793
- const _args: any[] = [];
1794
- _args.push(transactionArgumentOrPure(args[0], tx));
1795
- _args.push(transactionArgumentOrObject(args[1], tx));
1796
-
1797
- // @ts-ignore
1798
- return tx.moveCall({
1799
- target:
1800
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::execute_return_token",
1801
- arguments: _args,
1802
- typeArguments: [
1803
- typeof typeArguments[0] === "string"
1804
- ? typeArguments[0]
1805
- : typeArguments[0].getSignature(),
1806
- ],
1807
- });
1808
- }
1809
- export function getInputPrice(
1810
- tx: TransactionBlock,
1811
- args: [
1812
- bigint | TransactionArgument,
1813
- bigint | TransactionArgument,
1814
- bigint | TransactionArgument,
1815
- bigint | TransactionArgument,
1816
- ],
1817
- ): TransactionArgument &
1818
- [
1819
- TransactionArgument,
1820
- TransactionArgument,
1821
- TransactionArgument,
1822
- TransactionArgument,
1823
- ] {
1824
- const _args: any[] = [];
1825
- _args.push(transactionArgumentOrPure(args[0], tx));
1826
- _args.push(transactionArgumentOrPure(args[1], tx));
1827
- _args.push(transactionArgumentOrPure(args[2], tx));
1828
- _args.push(transactionArgumentOrPure(args[3], tx));
1829
-
1830
- // @ts-ignore
1831
- return tx.moveCall({
1832
- target:
1833
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_input_price",
1834
- arguments: _args,
1835
- });
1836
- }
1837
- export function getOptimalZapInAmount(
1838
- tx: TransactionBlock,
1839
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
1840
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1841
- const _args: any[] = [];
1842
- _args.push(transactionArgumentOrPure(args[0], tx));
1843
- _args.push(transactionArgumentOrPure(args[1], tx));
1844
-
1845
- // @ts-ignore
1846
- return tx.moveCall({
1847
- target:
1848
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_optimal_zap_in_amount",
1849
- arguments: _args,
1850
- });
1851
- }
1852
- export function getOutputPrice(
1853
- tx: TransactionBlock,
1854
- args: [
1855
- bigint | TransactionArgument,
1856
- bigint | TransactionArgument,
1857
- bigint | TransactionArgument,
1858
- bigint | TransactionArgument,
1859
- ],
1860
- ): TransactionArgument &
1861
- [
1862
- TransactionArgument,
1863
- TransactionArgument,
1864
- TransactionArgument,
1865
- TransactionArgument,
1866
- ] {
1867
- const _args: any[] = [];
1868
- _args.push(transactionArgumentOrPure(args[0], tx));
1869
- _args.push(transactionArgumentOrPure(args[1], tx));
1870
- _args.push(transactionArgumentOrPure(args[2], tx));
1871
- _args.push(transactionArgumentOrPure(args[3], tx));
1872
-
1873
- // @ts-ignore
1874
- return tx.moveCall({
1875
- target:
1876
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_output_price",
1877
- arguments: _args,
1878
- });
1879
- }
1880
- export function getTripleType<T0 = any, T1 = any, T2 = any>(
1881
- tx: TransactionBlock,
1882
- args: [],
1883
- typeArguments: [
1884
- TypeDescriptor<T0> | string,
1885
- TypeDescriptor<T1> | string,
1886
- TypeDescriptor<T2> | string,
1887
- ],
1888
- ): TransactionArgument & [] {
1889
- const _args: any[] = [];
1890
-
1891
- // @ts-ignore
1892
- return tx.moveCall({
1893
- target:
1894
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_triple_type",
1895
- arguments: _args,
1896
- typeArguments: [
1897
- typeof typeArguments[0] === "string"
1898
- ? typeArguments[0]
1899
- : typeArguments[0].getSignature(),
1900
- typeof typeArguments[1] === "string"
1901
- ? typeArguments[1]
1902
- : typeArguments[1].getSignature(),
1903
- typeof typeArguments[2] === "string"
1904
- ? typeArguments[2]
1905
- : typeArguments[2].getSignature(),
1906
- ],
1907
- });
1908
- }
1909
- export function getType<T0 = any, T1 = any>(
1910
- tx: TransactionBlock,
1911
- args: [],
1912
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1913
- ): TransactionArgument & [] {
1914
- const _args: any[] = [];
1915
-
1916
- // @ts-ignore
1917
- return tx.moveCall({
1918
- target:
1919
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_type",
1920
- arguments: _args,
1921
- typeArguments: [
1922
- typeof typeArguments[0] === "string"
1923
- ? typeArguments[0]
1924
- : typeArguments[0].getSignature(),
1925
- typeof typeArguments[1] === "string"
1926
- ? typeArguments[1]
1927
- : typeArguments[1].getSignature(),
1928
- ],
1929
- });
1930
- }
1931
- export function quote(
1932
- tx: TransactionBlock,
1933
- args: [
1934
- bigint | TransactionArgument,
1935
- bigint | TransactionArgument,
1936
- bigint | TransactionArgument,
1937
- ],
1938
- ): TransactionArgument &
1939
- [TransactionArgument, TransactionArgument, TransactionArgument] {
1940
- const _args: any[] = [];
1941
- _args.push(transactionArgumentOrPure(args[0], tx));
1942
- _args.push(transactionArgumentOrPure(args[1], tx));
1943
- _args.push(transactionArgumentOrPure(args[2], tx));
1944
-
1945
- // @ts-ignore
1946
- return tx.moveCall({
1947
- target:
1948
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::quote",
1949
- arguments: _args,
1950
- });
1951
- }
1952
- export function sortTokenType(
1953
- tx: TransactionBlock,
1954
- args: [
1955
- string | ObjectCallArg | TransactionArgument,
1956
- string | ObjectCallArg | TransactionArgument,
1957
- ],
1958
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1959
- const _args: any[] = [];
1960
- _args.push(transactionArgumentOrObject(args[0], tx));
1961
- _args.push(transactionArgumentOrObject(args[1], tx));
1962
-
1963
- // @ts-ignore
1964
- return tx.moveCall({
1965
- target:
1966
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::sort_token_type",
1967
- arguments: _args,
1968
- });
1969
- }
1970
- }
1971
- export namespace view {
1972
- export async function executeReturnToken<T0 = any>(
1973
- client: SuiClient,
1974
- args: [
1975
- _0x2.coin.Coin<T0> | TransactionArgument,
1976
- string | ObjectCallArg | TransactionArgument,
1977
- ],
1978
- typeArguments: [TypeDescriptor<T0> | string],
1979
- ): Promise<TypedDevInspectResults<[]>> {
1980
- const tx = new TransactionBlock();
1981
- builder.executeReturnToken(tx, args, typeArguments);
1982
- const insepctRes = await client.devInspectTransactionBlock({
1983
- transactionBlock: tx,
1984
- sender: ZERO_ADDRESS,
1985
- });
1986
-
1987
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1988
- insepctRes,
1989
- );
1990
- }
1991
- export async function getInputPrice(
1992
- client: SuiClient,
1993
- args: [
1994
- bigint | TransactionArgument,
1995
- bigint | TransactionArgument,
1996
- bigint | TransactionArgument,
1997
- bigint | TransactionArgument,
1998
- ],
1999
- ): Promise<TypedDevInspectResults<[bigint]>> {
2000
- const tx = new TransactionBlock();
2001
- builder.getInputPrice(tx, args);
2002
- const insepctRes = await client.devInspectTransactionBlock({
2003
- transactionBlock: tx,
2004
- sender: ZERO_ADDRESS,
2005
- });
2006
-
2007
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
2008
- insepctRes,
2009
- );
2010
- }
2011
- export async function getOptimalZapInAmount(
2012
- client: SuiClient,
2013
- args: [bigint | TransactionArgument, bigint | TransactionArgument],
2014
- ): Promise<TypedDevInspectResults<[bigint]>> {
2015
- const tx = new TransactionBlock();
2016
- builder.getOptimalZapInAmount(tx, args);
2017
- const insepctRes = await client.devInspectTransactionBlock({
2018
- transactionBlock: tx,
2019
- sender: ZERO_ADDRESS,
2020
- });
2021
-
2022
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
2023
- insepctRes,
2024
- );
2025
- }
2026
- export async function getOutputPrice(
2027
- client: SuiClient,
2028
- args: [
2029
- bigint | TransactionArgument,
2030
- bigint | TransactionArgument,
2031
- bigint | TransactionArgument,
2032
- bigint | TransactionArgument,
2033
- ],
2034
- ): Promise<TypedDevInspectResults<[bigint]>> {
2035
- const tx = new TransactionBlock();
2036
- builder.getOutputPrice(tx, args);
2037
- const insepctRes = await client.devInspectTransactionBlock({
2038
- transactionBlock: tx,
2039
- sender: ZERO_ADDRESS,
2040
- });
2041
-
2042
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
2043
- insepctRes,
2044
- );
2045
- }
2046
- export async function getTripleType<T0 = any, T1 = any, T2 = any>(
2047
- client: SuiClient,
2048
- args: [],
2049
- typeArguments: [
2050
- TypeDescriptor<T0> | string,
2051
- TypeDescriptor<T1> | string,
2052
- TypeDescriptor<T2> | string,
2053
- ],
2054
- ): Promise<
2055
- TypedDevInspectResults<
2056
- [
2057
- _0x1.type_name.TypeName,
2058
- _0x1.type_name.TypeName,
2059
- _0x1.type_name.TypeName,
2060
- ]
2061
- >
2062
- > {
2063
- const tx = new TransactionBlock();
2064
- builder.getTripleType(tx, args, typeArguments);
2065
- const insepctRes = await client.devInspectTransactionBlock({
2066
- transactionBlock: tx,
2067
- sender: ZERO_ADDRESS,
2068
- });
2069
-
2070
- return (await getMoveCoder(client)).decodeDevInspectResult<
2071
- [
2072
- _0x1.type_name.TypeName,
2073
- _0x1.type_name.TypeName,
2074
- _0x1.type_name.TypeName,
2075
- ]
2076
- >(insepctRes);
2077
- }
2078
- export async function getType<T0 = any, T1 = any>(
2079
- client: SuiClient,
2080
- args: [],
2081
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2082
- ): Promise<
2083
- TypedDevInspectResults<[_0x1.type_name.TypeName, _0x1.type_name.TypeName]>
2084
- > {
2085
- const tx = new TransactionBlock();
2086
- builder.getType(tx, args, typeArguments);
2087
- const insepctRes = await client.devInspectTransactionBlock({
2088
- transactionBlock: tx,
2089
- sender: ZERO_ADDRESS,
2090
- });
2091
-
2092
- return (await getMoveCoder(client)).decodeDevInspectResult<
2093
- [_0x1.type_name.TypeName, _0x1.type_name.TypeName]
2094
- >(insepctRes);
2095
- }
2096
- export async function quote(
2097
- client: SuiClient,
2098
- args: [
2099
- bigint | TransactionArgument,
2100
- bigint | TransactionArgument,
2101
- bigint | TransactionArgument,
2102
- ],
2103
- ): Promise<TypedDevInspectResults<[bigint]>> {
2104
- const tx = new TransactionBlock();
2105
- builder.quote(tx, args);
2106
- const insepctRes = await client.devInspectTransactionBlock({
2107
- transactionBlock: tx,
2108
- sender: ZERO_ADDRESS,
2109
- });
2110
-
2111
- return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
2112
- insepctRes,
2113
- );
2114
- }
2115
- export async function sortTokenType(
2116
- client: SuiClient,
2117
- args: [
2118
- string | ObjectCallArg | TransactionArgument,
2119
- string | ObjectCallArg | TransactionArgument,
2120
- ],
2121
- ): Promise<TypedDevInspectResults<[comparator.Result]>> {
2122
- const tx = new TransactionBlock();
2123
- builder.sortTokenType(tx, args);
2124
- const insepctRes = await client.devInspectTransactionBlock({
2125
- transactionBlock: tx,
2126
- sender: ZERO_ADDRESS,
2127
- });
2128
-
2129
- return (await getMoveCoder(client)).decodeDevInspectResult<
2130
- [comparator.Result]
2131
- >(insepctRes);
2132
- }
2133
- }
2134
- }
2135
-
2136
- export namespace router {
2137
- export namespace builder {
2138
- export function addLiquidity_<T0 = any, T1 = any>(
2139
- tx: TransactionBlock,
2140
- args: [
2141
- string | ObjectCallArg | TransactionArgument,
2142
- (string | ObjectCallArg)[] | TransactionArgument,
2143
- (string | ObjectCallArg)[] | TransactionArgument,
2144
- bigint | TransactionArgument,
2145
- bigint | TransactionArgument,
2146
- bigint | TransactionArgument,
2147
- bigint | TransactionArgument,
2148
- string | ObjectCallArg | TransactionArgument,
2149
- ],
2150
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2151
- ): TransactionArgument &
2152
- [
2153
- TransactionArgument,
2154
- TransactionArgument,
2155
- TransactionArgument,
2156
- TransactionArgument,
2157
- TransactionArgument,
2158
- TransactionArgument,
2159
- TransactionArgument,
2160
- TransactionArgument,
2161
- ] {
2162
- const _args: any[] = [];
2163
- _args.push(transactionArgumentOrObject(args[0], tx));
2164
- _args.push(transactionArgumentOrVec(args[1], tx));
2165
- _args.push(transactionArgumentOrVec(args[2], tx));
2166
- _args.push(transactionArgumentOrPure(args[3], tx));
2167
- _args.push(transactionArgumentOrPure(args[4], tx));
2168
- _args.push(transactionArgumentOrPure(args[5], tx));
2169
- _args.push(transactionArgumentOrPure(args[6], tx));
2170
- _args.push(transactionArgumentOrObject(args[7], tx));
2171
-
2172
- // @ts-ignore
2173
- return tx.moveCall({
2174
- target:
2175
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::add_liquidity_",
2176
- arguments: _args,
2177
- typeArguments: [
2178
- typeof typeArguments[0] === "string"
2179
- ? typeArguments[0]
2180
- : typeArguments[0].getSignature(),
2181
- typeof typeArguments[1] === "string"
2182
- ? typeArguments[1]
2183
- : typeArguments[1].getSignature(),
2184
- ],
2185
- });
2186
- }
2187
- export function createPool_<T0 = any, T1 = any>(
2188
- tx: TransactionBlock,
2189
- args: [
2190
- string | ObjectCallArg | TransactionArgument,
2191
- (string | ObjectCallArg)[] | TransactionArgument,
2192
- (string | ObjectCallArg)[] | TransactionArgument,
2193
- bigint | TransactionArgument,
2194
- bigint | TransactionArgument,
2195
- string | ObjectCallArg | TransactionArgument,
2196
- ],
2197
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2198
- ): TransactionArgument &
2199
- [
2200
- TransactionArgument,
2201
- TransactionArgument,
2202
- TransactionArgument,
2203
- TransactionArgument,
2204
- TransactionArgument,
2205
- TransactionArgument,
2206
- ] {
2207
- const _args: any[] = [];
2208
- _args.push(transactionArgumentOrObject(args[0], tx));
2209
- _args.push(transactionArgumentOrVec(args[1], tx));
2210
- _args.push(transactionArgumentOrVec(args[2], tx));
2211
- _args.push(transactionArgumentOrPure(args[3], tx));
2212
- _args.push(transactionArgumentOrPure(args[4], tx));
2213
- _args.push(transactionArgumentOrObject(args[5], tx));
2214
-
2215
- // @ts-ignore
2216
- return tx.moveCall({
2217
- target:
2218
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::create_pool_",
2219
- arguments: _args,
2220
- typeArguments: [
2221
- typeof typeArguments[0] === "string"
2222
- ? typeArguments[0]
2223
- : typeArguments[0].getSignature(),
2224
- typeof typeArguments[1] === "string"
2225
- ? typeArguments[1]
2226
- : typeArguments[1].getSignature(),
2227
- ],
2228
- });
2229
- }
2230
- export function removeLiquidity_<T0 = any, T1 = any>(
2231
- tx: TransactionBlock,
2232
- args: [
2233
- string | ObjectCallArg | TransactionArgument,
2234
- (string | ObjectCallArg)[] | TransactionArgument,
2235
- bigint | TransactionArgument,
2236
- bigint | TransactionArgument,
2237
- bigint | TransactionArgument,
2238
- string | ObjectCallArg | TransactionArgument,
2239
- ],
2240
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2241
- ): TransactionArgument &
2242
- [
2243
- TransactionArgument,
2244
- TransactionArgument,
2245
- TransactionArgument,
2246
- TransactionArgument,
2247
- TransactionArgument,
2248
- TransactionArgument,
2249
- ] {
2250
- const _args: any[] = [];
2251
- _args.push(transactionArgumentOrObject(args[0], tx));
2252
- _args.push(transactionArgumentOrVec(args[1], tx));
2253
- _args.push(transactionArgumentOrPure(args[2], tx));
2254
- _args.push(transactionArgumentOrPure(args[3], tx));
2255
- _args.push(transactionArgumentOrPure(args[4], tx));
2256
- _args.push(transactionArgumentOrObject(args[5], tx));
2257
-
2258
- // @ts-ignore
2259
- return tx.moveCall({
2260
- target:
2261
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::remove_liquidity_",
2262
- arguments: _args,
2263
- typeArguments: [
2264
- typeof typeArguments[0] === "string"
2265
- ? typeArguments[0]
2266
- : typeArguments[0].getSignature(),
2267
- typeof typeArguments[1] === "string"
2268
- ? typeArguments[1]
2269
- : typeArguments[1].getSignature(),
2270
- ],
2271
- });
2272
- }
2273
- export function swapExactInput_<T0 = any, T1 = any>(
2274
- tx: TransactionBlock,
2275
- args: [
2276
- string | ObjectCallArg | TransactionArgument,
2277
- (string | ObjectCallArg)[] | TransactionArgument,
2278
- bigint | TransactionArgument,
2279
- bigint | TransactionArgument,
2280
- string | ObjectCallArg | TransactionArgument,
2281
- ],
2282
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2283
- ): TransactionArgument &
2284
- [
2285
- TransactionArgument,
2286
- TransactionArgument,
2287
- TransactionArgument,
2288
- TransactionArgument,
2289
- TransactionArgument,
2290
- ] {
2291
- const _args: any[] = [];
2292
- _args.push(transactionArgumentOrObject(args[0], tx));
2293
- _args.push(transactionArgumentOrVec(args[1], tx));
2294
- _args.push(transactionArgumentOrPure(args[2], tx));
2295
- _args.push(transactionArgumentOrPure(args[3], tx));
2296
- _args.push(transactionArgumentOrObject(args[4], tx));
2297
-
2298
- // @ts-ignore
2299
- return tx.moveCall({
2300
- target:
2301
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_input_",
2302
- arguments: _args,
2303
- typeArguments: [
2304
- typeof typeArguments[0] === "string"
2305
- ? typeArguments[0]
2306
- : typeArguments[0].getSignature(),
2307
- typeof typeArguments[1] === "string"
2308
- ? typeArguments[1]
2309
- : typeArguments[1].getSignature(),
2310
- ],
2311
- });
2312
- }
2313
- export function swapExactInputDoublehop_<T0 = any, T1 = any, T2 = any>(
2314
- tx: TransactionBlock,
2315
- args: [
2316
- string | ObjectCallArg | TransactionArgument,
2317
- (string | ObjectCallArg)[] | TransactionArgument,
2318
- bigint | TransactionArgument,
2319
- bigint | TransactionArgument,
2320
- string | ObjectCallArg | TransactionArgument,
2321
- ],
2322
- typeArguments: [
2323
- TypeDescriptor<T0> | string,
2324
- TypeDescriptor<T1> | string,
2325
- TypeDescriptor<T2> | string,
2326
- ],
2327
- ): TransactionArgument &
2328
- [
2329
- TransactionArgument,
2330
- TransactionArgument,
2331
- TransactionArgument,
2332
- TransactionArgument,
2333
- TransactionArgument,
2334
- ] {
2335
- const _args: any[] = [];
2336
- _args.push(transactionArgumentOrObject(args[0], tx));
2337
- _args.push(transactionArgumentOrVec(args[1], tx));
2338
- _args.push(transactionArgumentOrPure(args[2], tx));
2339
- _args.push(transactionArgumentOrPure(args[3], tx));
2340
- _args.push(transactionArgumentOrObject(args[4], tx));
2341
-
2342
- // @ts-ignore
2343
- return tx.moveCall({
2344
- target:
2345
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_input_doublehop_",
2346
- arguments: _args,
2347
- typeArguments: [
2348
- typeof typeArguments[0] === "string"
2349
- ? typeArguments[0]
2350
- : typeArguments[0].getSignature(),
2351
- typeof typeArguments[1] === "string"
2352
- ? typeArguments[1]
2353
- : typeArguments[1].getSignature(),
2354
- typeof typeArguments[2] === "string"
2355
- ? typeArguments[2]
2356
- : typeArguments[2].getSignature(),
2357
- ],
2358
- });
2359
- }
2360
- export function swapExactOutput_<T0 = any, T1 = any>(
2361
- tx: TransactionBlock,
2362
- args: [
2363
- string | ObjectCallArg | TransactionArgument,
2364
- (string | ObjectCallArg)[] | TransactionArgument,
2365
- bigint | TransactionArgument,
2366
- bigint | TransactionArgument,
2367
- string | ObjectCallArg | TransactionArgument,
2368
- ],
2369
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2370
- ): TransactionArgument &
2371
- [
2372
- TransactionArgument,
2373
- TransactionArgument,
2374
- TransactionArgument,
2375
- TransactionArgument,
2376
- TransactionArgument,
2377
- ] {
2378
- const _args: any[] = [];
2379
- _args.push(transactionArgumentOrObject(args[0], tx));
2380
- _args.push(transactionArgumentOrVec(args[1], tx));
2381
- _args.push(transactionArgumentOrPure(args[2], tx));
2382
- _args.push(transactionArgumentOrPure(args[3], tx));
2383
- _args.push(transactionArgumentOrObject(args[4], tx));
2384
-
2385
- // @ts-ignore
2386
- return tx.moveCall({
2387
- target:
2388
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_output_",
2389
- arguments: _args,
2390
- typeArguments: [
2391
- typeof typeArguments[0] === "string"
2392
- ? typeArguments[0]
2393
- : typeArguments[0].getSignature(),
2394
- typeof typeArguments[1] === "string"
2395
- ? typeArguments[1]
2396
- : typeArguments[1].getSignature(),
2397
- ],
2398
- });
2399
- }
2400
- export function swapExactOutputDoublehop_<T0 = any, T1 = any, T2 = any>(
2401
- tx: TransactionBlock,
2402
- args: [
2403
- string | ObjectCallArg | TransactionArgument,
2404
- (string | ObjectCallArg)[] | TransactionArgument,
2405
- bigint | TransactionArgument,
2406
- bigint | TransactionArgument,
2407
- string | ObjectCallArg | TransactionArgument,
2408
- ],
2409
- typeArguments: [
2410
- TypeDescriptor<T0> | string,
2411
- TypeDescriptor<T1> | string,
2412
- TypeDescriptor<T2> | string,
2413
- ],
2414
- ): TransactionArgument &
2415
- [
2416
- TransactionArgument,
2417
- TransactionArgument,
2418
- TransactionArgument,
2419
- TransactionArgument,
2420
- TransactionArgument,
2421
- ] {
2422
- const _args: any[] = [];
2423
- _args.push(transactionArgumentOrObject(args[0], tx));
2424
- _args.push(transactionArgumentOrVec(args[1], tx));
2425
- _args.push(transactionArgumentOrPure(args[2], tx));
2426
- _args.push(transactionArgumentOrPure(args[3], tx));
2427
- _args.push(transactionArgumentOrObject(args[4], tx));
2428
-
2429
- // @ts-ignore
2430
- return tx.moveCall({
2431
- target:
2432
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_output_doublehop_",
2433
- arguments: _args,
2434
- typeArguments: [
2435
- typeof typeArguments[0] === "string"
2436
- ? typeArguments[0]
2437
- : typeArguments[0].getSignature(),
2438
- typeof typeArguments[1] === "string"
2439
- ? typeArguments[1]
2440
- : typeArguments[1].getSignature(),
2441
- typeof typeArguments[2] === "string"
2442
- ? typeArguments[2]
2443
- : typeArguments[2].getSignature(),
2444
- ],
2445
- });
2446
- }
2447
- export function zapIn_<T0 = any, T1 = any>(
2448
- tx: TransactionBlock,
2449
- args: [
2450
- string | ObjectCallArg | TransactionArgument,
2451
- (string | ObjectCallArg)[] | TransactionArgument,
2452
- bigint | TransactionArgument,
2453
- string | ObjectCallArg | TransactionArgument,
2454
- ],
2455
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2456
- ): TransactionArgument &
2457
- [
2458
- TransactionArgument,
2459
- TransactionArgument,
2460
- TransactionArgument,
2461
- TransactionArgument,
2462
- ] {
2463
- const _args: any[] = [];
2464
- _args.push(transactionArgumentOrObject(args[0], tx));
2465
- _args.push(transactionArgumentOrVec(args[1], tx));
2466
- _args.push(transactionArgumentOrPure(args[2], tx));
2467
- _args.push(transactionArgumentOrObject(args[3], tx));
2468
-
2469
- // @ts-ignore
2470
- return tx.moveCall({
2471
- target:
2472
- "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::zap_in_",
2473
- arguments: _args,
2474
- typeArguments: [
2475
- typeof typeArguments[0] === "string"
2476
- ? typeArguments[0]
2477
- : typeArguments[0].getSignature(),
2478
- typeof typeArguments[1] === "string"
2479
- ? typeArguments[1]
2480
- : typeArguments[1].getSignature(),
2481
- ],
2482
- });
2483
- }
2484
- }
2485
- export namespace view {
2486
- export async function addLiquidity_<T0 = any, T1 = any>(
2487
- client: SuiClient,
2488
- args: [
2489
- string | ObjectCallArg | TransactionArgument,
2490
- (string | ObjectCallArg)[] | TransactionArgument,
2491
- (string | ObjectCallArg)[] | TransactionArgument,
2492
- bigint | TransactionArgument,
2493
- bigint | TransactionArgument,
2494
- bigint | TransactionArgument,
2495
- bigint | TransactionArgument,
2496
- string | ObjectCallArg | TransactionArgument,
2497
- ],
2498
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2499
- ): Promise<TypedDevInspectResults<[]>> {
2500
- const tx = new TransactionBlock();
2501
- builder.addLiquidity_(tx, args, typeArguments);
2502
- const insepctRes = await client.devInspectTransactionBlock({
2503
- transactionBlock: tx,
2504
- sender: ZERO_ADDRESS,
2505
- });
2506
-
2507
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2508
- insepctRes,
2509
- );
2510
- }
2511
- export async function createPool_<T0 = any, T1 = any>(
2512
- client: SuiClient,
2513
- args: [
2514
- string | ObjectCallArg | TransactionArgument,
2515
- (string | ObjectCallArg)[] | TransactionArgument,
2516
- (string | ObjectCallArg)[] | TransactionArgument,
2517
- bigint | TransactionArgument,
2518
- bigint | TransactionArgument,
2519
- string | ObjectCallArg | TransactionArgument,
2520
- ],
2521
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2522
- ): Promise<TypedDevInspectResults<[]>> {
2523
- const tx = new TransactionBlock();
2524
- builder.createPool_(tx, args, typeArguments);
2525
- const insepctRes = await client.devInspectTransactionBlock({
2526
- transactionBlock: tx,
2527
- sender: ZERO_ADDRESS,
2528
- });
2529
-
2530
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2531
- insepctRes,
2532
- );
2533
- }
2534
- export async function removeLiquidity_<T0 = any, T1 = any>(
2535
- client: SuiClient,
2536
- args: [
2537
- string | ObjectCallArg | TransactionArgument,
2538
- (string | ObjectCallArg)[] | TransactionArgument,
2539
- bigint | TransactionArgument,
2540
- bigint | TransactionArgument,
2541
- bigint | TransactionArgument,
2542
- string | ObjectCallArg | TransactionArgument,
2543
- ],
2544
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2545
- ): Promise<TypedDevInspectResults<[]>> {
2546
- const tx = new TransactionBlock();
2547
- builder.removeLiquidity_(tx, args, typeArguments);
2548
- const insepctRes = await client.devInspectTransactionBlock({
2549
- transactionBlock: tx,
2550
- sender: ZERO_ADDRESS,
2551
- });
2552
-
2553
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2554
- insepctRes,
2555
- );
2556
- }
2557
- export async function swapExactInput_<T0 = any, T1 = any>(
2558
- client: SuiClient,
2559
- args: [
2560
- string | ObjectCallArg | TransactionArgument,
2561
- (string | ObjectCallArg)[] | TransactionArgument,
2562
- bigint | TransactionArgument,
2563
- bigint | TransactionArgument,
2564
- string | ObjectCallArg | TransactionArgument,
2565
- ],
2566
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2567
- ): Promise<TypedDevInspectResults<[]>> {
2568
- const tx = new TransactionBlock();
2569
- builder.swapExactInput_(tx, args, typeArguments);
2570
- const insepctRes = await client.devInspectTransactionBlock({
2571
- transactionBlock: tx,
2572
- sender: ZERO_ADDRESS,
2573
- });
2574
-
2575
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2576
- insepctRes,
2577
- );
2578
- }
2579
- export async function swapExactInputDoublehop_<
2580
- T0 = any,
2581
- T1 = any,
2582
- T2 = any,
2583
- >(
2584
- client: SuiClient,
2585
- args: [
2586
- string | ObjectCallArg | TransactionArgument,
2587
- (string | ObjectCallArg)[] | TransactionArgument,
2588
- bigint | TransactionArgument,
2589
- bigint | TransactionArgument,
2590
- string | ObjectCallArg | TransactionArgument,
2591
- ],
2592
- typeArguments: [
2593
- TypeDescriptor<T0> | string,
2594
- TypeDescriptor<T1> | string,
2595
- TypeDescriptor<T2> | string,
2596
- ],
2597
- ): Promise<TypedDevInspectResults<[]>> {
2598
- const tx = new TransactionBlock();
2599
- builder.swapExactInputDoublehop_(tx, args, typeArguments);
2600
- const insepctRes = await client.devInspectTransactionBlock({
2601
- transactionBlock: tx,
2602
- sender: ZERO_ADDRESS,
2603
- });
2604
-
2605
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2606
- insepctRes,
2607
- );
2608
- }
2609
- export async function swapExactOutput_<T0 = any, T1 = any>(
2610
- client: SuiClient,
2611
- args: [
2612
- string | ObjectCallArg | TransactionArgument,
2613
- (string | ObjectCallArg)[] | TransactionArgument,
2614
- bigint | TransactionArgument,
2615
- bigint | TransactionArgument,
2616
- string | ObjectCallArg | TransactionArgument,
2617
- ],
2618
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2619
- ): Promise<TypedDevInspectResults<[]>> {
2620
- const tx = new TransactionBlock();
2621
- builder.swapExactOutput_(tx, args, typeArguments);
2622
- const insepctRes = await client.devInspectTransactionBlock({
2623
- transactionBlock: tx,
2624
- sender: ZERO_ADDRESS,
2625
- });
2626
-
2627
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2628
- insepctRes,
2629
- );
2630
- }
2631
- export async function swapExactOutputDoublehop_<
2632
- T0 = any,
2633
- T1 = any,
2634
- T2 = any,
2635
- >(
2636
- client: SuiClient,
2637
- args: [
2638
- string | ObjectCallArg | TransactionArgument,
2639
- (string | ObjectCallArg)[] | TransactionArgument,
2640
- bigint | TransactionArgument,
2641
- bigint | TransactionArgument,
2642
- string | ObjectCallArg | TransactionArgument,
2643
- ],
2644
- typeArguments: [
2645
- TypeDescriptor<T0> | string,
2646
- TypeDescriptor<T1> | string,
2647
- TypeDescriptor<T2> | string,
2648
- ],
2649
- ): Promise<TypedDevInspectResults<[]>> {
2650
- const tx = new TransactionBlock();
2651
- builder.swapExactOutputDoublehop_(tx, args, typeArguments);
2652
- const insepctRes = await client.devInspectTransactionBlock({
2653
- transactionBlock: tx,
2654
- sender: ZERO_ADDRESS,
2655
- });
2656
-
2657
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2658
- insepctRes,
2659
- );
2660
- }
2661
- export async function zapIn_<T0 = any, T1 = any>(
2662
- client: SuiClient,
2663
- args: [
2664
- string | ObjectCallArg | TransactionArgument,
2665
- (string | ObjectCallArg)[] | TransactionArgument,
2666
- bigint | TransactionArgument,
2667
- string | ObjectCallArg | TransactionArgument,
2668
- ],
2669
- typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2670
- ): Promise<TypedDevInspectResults<[]>> {
2671
- const tx = new TransactionBlock();
2672
- builder.zapIn_(tx, args, typeArguments);
2673
- const insepctRes = await client.devInspectTransactionBlock({
2674
- transactionBlock: tx,
2675
- sender: ZERO_ADDRESS,
2676
- });
2677
-
2678
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2679
- insepctRes,
2680
- );
2681
- }
2682
- }
2683
- }
2684
-
2685
- const MODULES = JSON.parse(
2686
- '{"comparator":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"comparator","friends":[],"structs":{"Result":{"abilities":{"abilities":["Drop"]},"typeParameters":[],"fields":[{"name":"inner","type":"U8"}]}},"exposedFunctions":{"compare":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"TypeParameter":0}},{"Reference":{"TypeParameter":0}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]},"compare_u8_vector":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"},{"Vector":"U8"}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]},"is_equal":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]},"is_greater_than":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]},"is_smaller_than":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]}}},"math_utils":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"math_utils","friends":[],"structs":{},"exposedFunctions":{"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"max_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U8"],"return":["U128"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":["U128"]},"sqrt_u256":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":["U256"]}}},"pool":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"pool","friends":[],"structs":{"ControllerCap":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}}]},"FeeToSet":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[],"fields":[{"name":"fee_to","type":"Address"},{"name":"caller","type":"Address"}]},"LiquidityAdded":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"},{"name":"wisp_lp_amount","type":"U64"},{"name":"fee_amount","type":"U64"}]},"LiquidityRemoved":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"},{"name":"wisp_lp_amount","type":"U64"},{"name":"fee_amount","type":"U64"}]},"Pool":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"first_token","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"second_token","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":1}]}}},{"name":"wisp_lp_supply","type":{"Struct":{"address":"0x2","module":"balance","name":"Supply","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},{"name":"k_last","type":"U128"}]},"PoolCreated":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"wisp_lp_amount","type":"U64"}]},"PoolName":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"first_type","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"second_type","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}]},"PoolRegistry":{"abilities":{"abilities":["Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"fee_to","type":"Address"},{"name":"pools","type":{"Struct":{"address":"0x2","module":"object_bag","name":"ObjectBag","typeArguments":[]}}}]},"TokenSwapped":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount_in","type":"U64"},{"name":"second_amount_in","type":"U64"},{"name":"first_amount_out","type":"U64"},{"name":"second_amount_out","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"}]},"WISPLP":{"abilities":{"abilities":["Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"dummy_field","type":"Bool"}]}},"exposedFunctions":{"add_liquidity":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}]},"borrow_mut_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}]},"borrow_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}]},"create_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}]},"create_pool_name":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolName","typeArguments":[]}}]},"get_amounts":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64","U64"]},"get_input_amount":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return":["U64"]},"get_output_amount":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return":["U64"]},"get_pool_data":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64","U64","U64","U128"]},"is_pool_created":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":["Bool"]},"is_pool_created_sorted":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":["Bool"]},"process_swap_exact_input":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","Bool",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"process_swap_exact_output":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","Bool",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"remove_liquidity":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},"U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"set_fee_to_":{"visibility":"Public","isEntry":true,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"ControllerCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},"Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_first_to_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_exact_second_to_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"swap_first_to_exact_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_second_to_exact_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"zap_in_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"zap_in_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]}}},"pool_utils":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"pool_utils","friends":[],"structs":{},"exposedFunctions":{"execute_return_token":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"get_input_price":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64","U64"],"return":["U64"]},"get_optimal_zap_in_amount":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"get_output_price":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64","U64"],"return":["U64"]},"get_triple_type":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"get_type":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"quote":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64"],"return":["U64"]},"sort_token_type":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]}}},"router":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"router","friends":[],"structs":{},"exposedFunctions":{"add_liquidity_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"create_pool_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"remove_liquidity_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},"U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_input_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_input_doublehop_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_output_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_output_doublehop_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"zap_in_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]}}}}',
2687
- );
2688
-
2689
- export function loadAllTypes(coder: MoveCoder) {
2690
- _0x2.loadAllTypes(coder);
2691
- _0x1.loadAllTypes(coder);
2692
- for (const m of Object.values(MODULES)) {
2693
- coder.load(m as any);
2694
- }
2695
- }
2696
-
2697
- loadAllTypes(defaultMoveCoder());