@typemove/sui 1.14.0-rc.1 → 2.0.0

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