@typemove/sui 1.0.0-rc.10

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