@typemove/sui 1.5.1 → 1.5.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +8 -4
- package/dist/cjs/builtin/0x1.d.ts +2 -0
- package/dist/cjs/builtin/0x1.d.ts.map +1 -1
- package/dist/cjs/builtin/0x1.js +187 -167
- package/dist/cjs/builtin/0x1.js.map +1 -1
- package/dist/cjs/builtin/0x2.d.ts +121 -0
- package/dist/cjs/builtin/0x2.d.ts.map +1 -1
- package/dist/cjs/builtin/0x2.js +1077 -856
- package/dist/cjs/builtin/0x2.js.map +1 -1
- package/dist/cjs/builtin/0x3.js +212 -212
- package/dist/cjs/codegen/codegen.js +2 -2
- package/dist/cjs/move-coder.d.ts +1 -1
- package/dist/cjs/move-coder.js +4 -4
- package/dist/esm/builtin/0x1.d.ts +2 -0
- package/dist/esm/builtin/0x1.d.ts.map +1 -1
- package/dist/esm/builtin/0x1.js +187 -167
- package/dist/esm/builtin/0x1.js.map +1 -1
- package/dist/esm/builtin/0x2.d.ts +121 -0
- package/dist/esm/builtin/0x2.d.ts.map +1 -1
- package/dist/esm/builtin/0x2.js +1076 -855
- package/dist/esm/builtin/0x2.js.map +1 -1
- package/dist/esm/builtin/0x3.js +212 -212
- package/dist/esm/codegen/codegen.js +2 -2
- package/dist/esm/move-coder.d.ts +1 -1
- package/dist/esm/move-coder.js +4 -4
- package/package.json +2 -2
- package/src/abis/0x1.json +20 -0
- package/src/abis/0x2.json +551 -0
- package/src/builtin/0x1.ts +195 -167
- package/src/builtin/0x2.ts +1238 -855
- package/src/builtin/0x3.ts +212 -212
- package/src/codegen/codegen.ts +2 -2
- package/src/move-coder.ts +4 -4
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +8 -8
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +96 -96
- package/src/tests/types/testnet/0xdee9.ts +94 -94
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +310 -310
|
@@ -142,14 +142,14 @@ export namespace comparator {
|
|
|
142
142
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
143
143
|
const tx = new TransactionBlock();
|
|
144
144
|
builder.compare(tx, args, typeArguments);
|
|
145
|
-
const
|
|
145
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
146
146
|
transactionBlock: tx,
|
|
147
147
|
sender: ZERO_ADDRESS,
|
|
148
148
|
});
|
|
149
149
|
|
|
150
150
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
151
151
|
[comparator.Result]
|
|
152
|
-
>(
|
|
152
|
+
>(inspectRes);
|
|
153
153
|
}
|
|
154
154
|
export async function compareU8Vector(
|
|
155
155
|
client: SuiClient,
|
|
@@ -160,14 +160,14 @@ export namespace comparator {
|
|
|
160
160
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
161
161
|
const tx = new TransactionBlock();
|
|
162
162
|
builder.compareU8Vector(tx, args);
|
|
163
|
-
const
|
|
163
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
164
164
|
transactionBlock: tx,
|
|
165
165
|
sender: ZERO_ADDRESS,
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
169
169
|
[comparator.Result]
|
|
170
|
-
>(
|
|
170
|
+
>(inspectRes);
|
|
171
171
|
}
|
|
172
172
|
export async function isEqual(
|
|
173
173
|
client: SuiClient,
|
|
@@ -175,13 +175,13 @@ export namespace comparator {
|
|
|
175
175
|
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
176
176
|
const tx = new TransactionBlock();
|
|
177
177
|
builder.isEqual(tx, args);
|
|
178
|
-
const
|
|
178
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
179
179
|
transactionBlock: tx,
|
|
180
180
|
sender: ZERO_ADDRESS,
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
184
|
-
|
|
184
|
+
inspectRes,
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
export async function isGreaterThan(
|
|
@@ -190,13 +190,13 @@ export namespace comparator {
|
|
|
190
190
|
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
191
191
|
const tx = new TransactionBlock();
|
|
192
192
|
builder.isGreaterThan(tx, args);
|
|
193
|
-
const
|
|
193
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
194
194
|
transactionBlock: tx,
|
|
195
195
|
sender: ZERO_ADDRESS,
|
|
196
196
|
});
|
|
197
197
|
|
|
198
198
|
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
199
|
-
|
|
199
|
+
inspectRes,
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
202
|
export async function isSmallerThan(
|
|
@@ -205,13 +205,13 @@ export namespace comparator {
|
|
|
205
205
|
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
206
206
|
const tx = new TransactionBlock();
|
|
207
207
|
builder.isSmallerThan(tx, args);
|
|
208
|
-
const
|
|
208
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
209
209
|
transactionBlock: tx,
|
|
210
210
|
sender: ZERO_ADDRESS,
|
|
211
211
|
});
|
|
212
212
|
|
|
213
213
|
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
214
|
-
|
|
214
|
+
inspectRes,
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -315,13 +315,13 @@ export namespace math_utils {
|
|
|
315
315
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
316
316
|
const tx = new TransactionBlock();
|
|
317
317
|
builder.max(tx, args);
|
|
318
|
-
const
|
|
318
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
319
319
|
transactionBlock: tx,
|
|
320
320
|
sender: ZERO_ADDRESS,
|
|
321
321
|
});
|
|
322
322
|
|
|
323
323
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
324
|
-
|
|
324
|
+
inspectRes,
|
|
325
325
|
);
|
|
326
326
|
}
|
|
327
327
|
export async function maxU64(
|
|
@@ -330,13 +330,13 @@ export namespace math_utils {
|
|
|
330
330
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
331
331
|
const tx = new TransactionBlock();
|
|
332
332
|
builder.maxU64(tx, args);
|
|
333
|
-
const
|
|
333
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
334
334
|
transactionBlock: tx,
|
|
335
335
|
sender: ZERO_ADDRESS,
|
|
336
336
|
});
|
|
337
337
|
|
|
338
338
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
339
|
-
|
|
339
|
+
inspectRes,
|
|
340
340
|
);
|
|
341
341
|
}
|
|
342
342
|
export async function min(
|
|
@@ -345,13 +345,13 @@ export namespace math_utils {
|
|
|
345
345
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
346
346
|
const tx = new TransactionBlock();
|
|
347
347
|
builder.min(tx, args);
|
|
348
|
-
const
|
|
348
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
349
349
|
transactionBlock: tx,
|
|
350
350
|
sender: ZERO_ADDRESS,
|
|
351
351
|
});
|
|
352
352
|
|
|
353
353
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
354
|
-
|
|
354
|
+
inspectRes,
|
|
355
355
|
);
|
|
356
356
|
}
|
|
357
357
|
export async function pow(
|
|
@@ -360,13 +360,13 @@ export namespace math_utils {
|
|
|
360
360
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
361
361
|
const tx = new TransactionBlock();
|
|
362
362
|
builder.pow(tx, args);
|
|
363
|
-
const
|
|
363
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
364
364
|
transactionBlock: tx,
|
|
365
365
|
sender: ZERO_ADDRESS,
|
|
366
366
|
});
|
|
367
367
|
|
|
368
368
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
369
|
-
|
|
369
|
+
inspectRes,
|
|
370
370
|
);
|
|
371
371
|
}
|
|
372
372
|
export async function sqrt(
|
|
@@ -375,13 +375,13 @@ export namespace math_utils {
|
|
|
375
375
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
376
376
|
const tx = new TransactionBlock();
|
|
377
377
|
builder.sqrt(tx, args);
|
|
378
|
-
const
|
|
378
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
379
379
|
transactionBlock: tx,
|
|
380
380
|
sender: ZERO_ADDRESS,
|
|
381
381
|
});
|
|
382
382
|
|
|
383
383
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
384
|
-
|
|
384
|
+
inspectRes,
|
|
385
385
|
);
|
|
386
386
|
}
|
|
387
387
|
export async function sqrtU256(
|
|
@@ -390,13 +390,13 @@ export namespace math_utils {
|
|
|
390
390
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
391
391
|
const tx = new TransactionBlock();
|
|
392
392
|
builder.sqrtU256(tx, args);
|
|
393
|
-
const
|
|
393
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
394
394
|
transactionBlock: tx,
|
|
395
395
|
sender: ZERO_ADDRESS,
|
|
396
396
|
});
|
|
397
397
|
|
|
398
398
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
399
|
-
|
|
399
|
+
inspectRes,
|
|
400
400
|
);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
@@ -1360,14 +1360,14 @@ export namespace pool {
|
|
|
1360
1360
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
1361
1361
|
const tx = new TransactionBlock();
|
|
1362
1362
|
builder.addLiquidity(tx, args, typeArguments);
|
|
1363
|
-
const
|
|
1363
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1364
1364
|
transactionBlock: tx,
|
|
1365
1365
|
sender: ZERO_ADDRESS,
|
|
1366
1366
|
});
|
|
1367
1367
|
|
|
1368
1368
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1369
1369
|
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
|
|
1370
|
-
>(
|
|
1370
|
+
>(inspectRes);
|
|
1371
1371
|
}
|
|
1372
1372
|
export async function borrowMutPool<T0 = any, T1 = any>(
|
|
1373
1373
|
client: SuiClient,
|
|
@@ -1376,13 +1376,13 @@ export namespace pool {
|
|
|
1376
1376
|
): Promise<TypedDevInspectResults<[string]>> {
|
|
1377
1377
|
const tx = new TransactionBlock();
|
|
1378
1378
|
builder.borrowMutPool(tx, args, typeArguments);
|
|
1379
|
-
const
|
|
1379
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1380
1380
|
transactionBlock: tx,
|
|
1381
1381
|
sender: ZERO_ADDRESS,
|
|
1382
1382
|
});
|
|
1383
1383
|
|
|
1384
1384
|
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1385
|
-
|
|
1385
|
+
inspectRes,
|
|
1386
1386
|
);
|
|
1387
1387
|
}
|
|
1388
1388
|
export async function borrowPool<T0 = any, T1 = any>(
|
|
@@ -1392,13 +1392,13 @@ export namespace pool {
|
|
|
1392
1392
|
): Promise<TypedDevInspectResults<[string]>> {
|
|
1393
1393
|
const tx = new TransactionBlock();
|
|
1394
1394
|
builder.borrowPool(tx, args, typeArguments);
|
|
1395
|
-
const
|
|
1395
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1396
1396
|
transactionBlock: tx,
|
|
1397
1397
|
sender: ZERO_ADDRESS,
|
|
1398
1398
|
});
|
|
1399
1399
|
|
|
1400
1400
|
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1401
|
-
|
|
1401
|
+
inspectRes,
|
|
1402
1402
|
);
|
|
1403
1403
|
}
|
|
1404
1404
|
export async function createPool<T0 = any, T1 = any>(
|
|
@@ -1415,14 +1415,14 @@ export namespace pool {
|
|
|
1415
1415
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
1416
1416
|
const tx = new TransactionBlock();
|
|
1417
1417
|
builder.createPool(tx, args, typeArguments);
|
|
1418
|
-
const
|
|
1418
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1419
1419
|
transactionBlock: tx,
|
|
1420
1420
|
sender: ZERO_ADDRESS,
|
|
1421
1421
|
});
|
|
1422
1422
|
|
|
1423
1423
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1424
1424
|
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
|
|
1425
|
-
>(
|
|
1425
|
+
>(inspectRes);
|
|
1426
1426
|
}
|
|
1427
1427
|
export async function createPoolName(
|
|
1428
1428
|
client: SuiClient,
|
|
@@ -1433,14 +1433,14 @@ export namespace pool {
|
|
|
1433
1433
|
): Promise<TypedDevInspectResults<[pool.PoolName]>> {
|
|
1434
1434
|
const tx = new TransactionBlock();
|
|
1435
1435
|
builder.createPoolName(tx, args);
|
|
1436
|
-
const
|
|
1436
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1437
1437
|
transactionBlock: tx,
|
|
1438
1438
|
sender: ZERO_ADDRESS,
|
|
1439
1439
|
});
|
|
1440
1440
|
|
|
1441
1441
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1442
1442
|
[pool.PoolName]
|
|
1443
|
-
>(
|
|
1443
|
+
>(inspectRes);
|
|
1444
1444
|
}
|
|
1445
1445
|
export async function getAmounts<T0 = any, T1 = any>(
|
|
1446
1446
|
client: SuiClient,
|
|
@@ -1449,14 +1449,14 @@ export namespace pool {
|
|
|
1449
1449
|
): Promise<TypedDevInspectResults<[bigint, bigint, bigint]>> {
|
|
1450
1450
|
const tx = new TransactionBlock();
|
|
1451
1451
|
builder.getAmounts(tx, args, typeArguments);
|
|
1452
|
-
const
|
|
1452
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1453
1453
|
transactionBlock: tx,
|
|
1454
1454
|
sender: ZERO_ADDRESS,
|
|
1455
1455
|
});
|
|
1456
1456
|
|
|
1457
1457
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1458
1458
|
[bigint, bigint, bigint]
|
|
1459
|
-
>(
|
|
1459
|
+
>(inspectRes);
|
|
1460
1460
|
}
|
|
1461
1461
|
export async function getInputAmount<T0 = any, T1 = any>(
|
|
1462
1462
|
client: SuiClient,
|
|
@@ -1469,13 +1469,13 @@ export namespace pool {
|
|
|
1469
1469
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1470
1470
|
const tx = new TransactionBlock();
|
|
1471
1471
|
builder.getInputAmount(tx, args, typeArguments);
|
|
1472
|
-
const
|
|
1472
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1473
1473
|
transactionBlock: tx,
|
|
1474
1474
|
sender: ZERO_ADDRESS,
|
|
1475
1475
|
});
|
|
1476
1476
|
|
|
1477
1477
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
1478
|
-
|
|
1478
|
+
inspectRes,
|
|
1479
1479
|
);
|
|
1480
1480
|
}
|
|
1481
1481
|
export async function getOutputAmount<T0 = any, T1 = any>(
|
|
@@ -1489,13 +1489,13 @@ export namespace pool {
|
|
|
1489
1489
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1490
1490
|
const tx = new TransactionBlock();
|
|
1491
1491
|
builder.getOutputAmount(tx, args, typeArguments);
|
|
1492
|
-
const
|
|
1492
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1493
1493
|
transactionBlock: tx,
|
|
1494
1494
|
sender: ZERO_ADDRESS,
|
|
1495
1495
|
});
|
|
1496
1496
|
|
|
1497
1497
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
1498
|
-
|
|
1498
|
+
inspectRes,
|
|
1499
1499
|
);
|
|
1500
1500
|
}
|
|
1501
1501
|
export async function getPoolData<T0 = any, T1 = any>(
|
|
@@ -1507,14 +1507,14 @@ export namespace pool {
|
|
|
1507
1507
|
> {
|
|
1508
1508
|
const tx = new TransactionBlock();
|
|
1509
1509
|
builder.getPoolData(tx, args, typeArguments);
|
|
1510
|
-
const
|
|
1510
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1511
1511
|
transactionBlock: tx,
|
|
1512
1512
|
sender: ZERO_ADDRESS,
|
|
1513
1513
|
});
|
|
1514
1514
|
|
|
1515
1515
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1516
1516
|
[bigint, bigint, bigint, bigint, bigint]
|
|
1517
|
-
>(
|
|
1517
|
+
>(inspectRes);
|
|
1518
1518
|
}
|
|
1519
1519
|
export async function isPoolCreated<T0 = any, T1 = any>(
|
|
1520
1520
|
client: SuiClient,
|
|
@@ -1523,13 +1523,13 @@ export namespace pool {
|
|
|
1523
1523
|
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1524
1524
|
const tx = new TransactionBlock();
|
|
1525
1525
|
builder.isPoolCreated(tx, args, typeArguments);
|
|
1526
|
-
const
|
|
1526
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1527
1527
|
transactionBlock: tx,
|
|
1528
1528
|
sender: ZERO_ADDRESS,
|
|
1529
1529
|
});
|
|
1530
1530
|
|
|
1531
1531
|
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1532
|
-
|
|
1532
|
+
inspectRes,
|
|
1533
1533
|
);
|
|
1534
1534
|
}
|
|
1535
1535
|
export async function isPoolCreatedSorted<T0 = any, T1 = any>(
|
|
@@ -1539,13 +1539,13 @@ export namespace pool {
|
|
|
1539
1539
|
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1540
1540
|
const tx = new TransactionBlock();
|
|
1541
1541
|
builder.isPoolCreatedSorted(tx, args, typeArguments);
|
|
1542
|
-
const
|
|
1542
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1543
1543
|
transactionBlock: tx,
|
|
1544
1544
|
sender: ZERO_ADDRESS,
|
|
1545
1545
|
});
|
|
1546
1546
|
|
|
1547
1547
|
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1548
|
-
|
|
1548
|
+
inspectRes,
|
|
1549
1549
|
);
|
|
1550
1550
|
}
|
|
1551
1551
|
export async function processSwapExactInput<T0 = any, T1 = any>(
|
|
@@ -1562,13 +1562,13 @@ export namespace pool {
|
|
|
1562
1562
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1563
1563
|
const tx = new TransactionBlock();
|
|
1564
1564
|
builder.processSwapExactInput(tx, args, typeArguments);
|
|
1565
|
-
const
|
|
1565
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1566
1566
|
transactionBlock: tx,
|
|
1567
1567
|
sender: ZERO_ADDRESS,
|
|
1568
1568
|
});
|
|
1569
1569
|
|
|
1570
1570
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1571
|
-
|
|
1571
|
+
inspectRes,
|
|
1572
1572
|
);
|
|
1573
1573
|
}
|
|
1574
1574
|
export async function processSwapExactOutput<T0 = any, T1 = any>(
|
|
@@ -1585,13 +1585,13 @@ export namespace pool {
|
|
|
1585
1585
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1586
1586
|
const tx = new TransactionBlock();
|
|
1587
1587
|
builder.processSwapExactOutput(tx, args, typeArguments);
|
|
1588
|
-
const
|
|
1588
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1589
1589
|
transactionBlock: tx,
|
|
1590
1590
|
sender: ZERO_ADDRESS,
|
|
1591
1591
|
});
|
|
1592
1592
|
|
|
1593
1593
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1594
|
-
|
|
1594
|
+
inspectRes,
|
|
1595
1595
|
);
|
|
1596
1596
|
}
|
|
1597
1597
|
export async function removeLiquidity<T0 = any, T1 = any>(
|
|
@@ -1610,14 +1610,14 @@ export namespace pool {
|
|
|
1610
1610
|
> {
|
|
1611
1611
|
const tx = new TransactionBlock();
|
|
1612
1612
|
builder.removeLiquidity(tx, args, typeArguments);
|
|
1613
|
-
const
|
|
1613
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1614
1614
|
transactionBlock: tx,
|
|
1615
1615
|
sender: ZERO_ADDRESS,
|
|
1616
1616
|
});
|
|
1617
1617
|
|
|
1618
1618
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1619
1619
|
[_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]
|
|
1620
|
-
>(
|
|
1620
|
+
>(inspectRes);
|
|
1621
1621
|
}
|
|
1622
1622
|
export async function setFeeTo_(
|
|
1623
1623
|
client: SuiClient,
|
|
@@ -1630,13 +1630,13 @@ export namespace pool {
|
|
|
1630
1630
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1631
1631
|
const tx = new TransactionBlock();
|
|
1632
1632
|
builder.setFeeTo_(tx, args);
|
|
1633
|
-
const
|
|
1633
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1634
1634
|
transactionBlock: tx,
|
|
1635
1635
|
sender: ZERO_ADDRESS,
|
|
1636
1636
|
});
|
|
1637
1637
|
|
|
1638
1638
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1639
|
-
|
|
1639
|
+
inspectRes,
|
|
1640
1640
|
);
|
|
1641
1641
|
}
|
|
1642
1642
|
export async function swapExactFirstToSecond<T0 = any, T1 = any>(
|
|
@@ -1652,14 +1652,14 @@ export namespace pool {
|
|
|
1652
1652
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
1653
1653
|
const tx = new TransactionBlock();
|
|
1654
1654
|
builder.swapExactFirstToSecond(tx, args, typeArguments);
|
|
1655
|
-
const
|
|
1655
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1656
1656
|
transactionBlock: tx,
|
|
1657
1657
|
sender: ZERO_ADDRESS,
|
|
1658
1658
|
});
|
|
1659
1659
|
|
|
1660
1660
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1661
1661
|
[_0x2.coin.Coin<T1>]
|
|
1662
|
-
>(
|
|
1662
|
+
>(inspectRes);
|
|
1663
1663
|
}
|
|
1664
1664
|
export async function swapExactSecondToFirst<T0 = any, T1 = any>(
|
|
1665
1665
|
client: SuiClient,
|
|
@@ -1674,14 +1674,14 @@ export namespace pool {
|
|
|
1674
1674
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
1675
1675
|
const tx = new TransactionBlock();
|
|
1676
1676
|
builder.swapExactSecondToFirst(tx, args, typeArguments);
|
|
1677
|
-
const
|
|
1677
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1678
1678
|
transactionBlock: tx,
|
|
1679
1679
|
sender: ZERO_ADDRESS,
|
|
1680
1680
|
});
|
|
1681
1681
|
|
|
1682
1682
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1683
1683
|
[_0x2.coin.Coin<T0>]
|
|
1684
|
-
>(
|
|
1684
|
+
>(inspectRes);
|
|
1685
1685
|
}
|
|
1686
1686
|
export async function swapFirstToExactSecond<T0 = any, T1 = any>(
|
|
1687
1687
|
client: SuiClient,
|
|
@@ -1696,14 +1696,14 @@ export namespace pool {
|
|
|
1696
1696
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
1697
1697
|
const tx = new TransactionBlock();
|
|
1698
1698
|
builder.swapFirstToExactSecond(tx, args, typeArguments);
|
|
1699
|
-
const
|
|
1699
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1700
1700
|
transactionBlock: tx,
|
|
1701
1701
|
sender: ZERO_ADDRESS,
|
|
1702
1702
|
});
|
|
1703
1703
|
|
|
1704
1704
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1705
1705
|
[_0x2.coin.Coin<T1>]
|
|
1706
|
-
>(
|
|
1706
|
+
>(inspectRes);
|
|
1707
1707
|
}
|
|
1708
1708
|
export async function swapSecondToExactFirst<T0 = any, T1 = any>(
|
|
1709
1709
|
client: SuiClient,
|
|
@@ -1718,14 +1718,14 @@ export namespace pool {
|
|
|
1718
1718
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
1719
1719
|
const tx = new TransactionBlock();
|
|
1720
1720
|
builder.swapSecondToExactFirst(tx, args, typeArguments);
|
|
1721
|
-
const
|
|
1721
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1722
1722
|
transactionBlock: tx,
|
|
1723
1723
|
sender: ZERO_ADDRESS,
|
|
1724
1724
|
});
|
|
1725
1725
|
|
|
1726
1726
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1727
1727
|
[_0x2.coin.Coin<T0>]
|
|
1728
|
-
>(
|
|
1728
|
+
>(inspectRes);
|
|
1729
1729
|
}
|
|
1730
1730
|
export async function zapInFirst<T0 = any, T1 = any>(
|
|
1731
1731
|
client: SuiClient,
|
|
@@ -1743,14 +1743,14 @@ export namespace pool {
|
|
|
1743
1743
|
> {
|
|
1744
1744
|
const tx = new TransactionBlock();
|
|
1745
1745
|
builder.zapInFirst(tx, args, typeArguments);
|
|
1746
|
-
const
|
|
1746
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1747
1747
|
transactionBlock: tx,
|
|
1748
1748
|
sender: ZERO_ADDRESS,
|
|
1749
1749
|
});
|
|
1750
1750
|
|
|
1751
1751
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1752
1752
|
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
|
|
1753
|
-
>(
|
|
1753
|
+
>(inspectRes);
|
|
1754
1754
|
}
|
|
1755
1755
|
export async function zapInSecond<T0 = any, T1 = any>(
|
|
1756
1756
|
client: SuiClient,
|
|
@@ -1768,14 +1768,14 @@ export namespace pool {
|
|
|
1768
1768
|
> {
|
|
1769
1769
|
const tx = new TransactionBlock();
|
|
1770
1770
|
builder.zapInSecond(tx, args, typeArguments);
|
|
1771
|
-
const
|
|
1771
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1772
1772
|
transactionBlock: tx,
|
|
1773
1773
|
sender: ZERO_ADDRESS,
|
|
1774
1774
|
});
|
|
1775
1775
|
|
|
1776
1776
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1777
1777
|
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
|
|
1778
|
-
>(
|
|
1778
|
+
>(inspectRes);
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
@@ -1979,13 +1979,13 @@ export namespace pool_utils {
|
|
|
1979
1979
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1980
1980
|
const tx = new TransactionBlock();
|
|
1981
1981
|
builder.executeReturnToken(tx, args, typeArguments);
|
|
1982
|
-
const
|
|
1982
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
1983
1983
|
transactionBlock: tx,
|
|
1984
1984
|
sender: ZERO_ADDRESS,
|
|
1985
1985
|
});
|
|
1986
1986
|
|
|
1987
1987
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1988
|
-
|
|
1988
|
+
inspectRes,
|
|
1989
1989
|
);
|
|
1990
1990
|
}
|
|
1991
1991
|
export async function getInputPrice(
|
|
@@ -1999,13 +1999,13 @@ export namespace pool_utils {
|
|
|
1999
1999
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2000
2000
|
const tx = new TransactionBlock();
|
|
2001
2001
|
builder.getInputPrice(tx, args);
|
|
2002
|
-
const
|
|
2002
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2003
2003
|
transactionBlock: tx,
|
|
2004
2004
|
sender: ZERO_ADDRESS,
|
|
2005
2005
|
});
|
|
2006
2006
|
|
|
2007
2007
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2008
|
-
|
|
2008
|
+
inspectRes,
|
|
2009
2009
|
);
|
|
2010
2010
|
}
|
|
2011
2011
|
export async function getOptimalZapInAmount(
|
|
@@ -2014,13 +2014,13 @@ export namespace pool_utils {
|
|
|
2014
2014
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2015
2015
|
const tx = new TransactionBlock();
|
|
2016
2016
|
builder.getOptimalZapInAmount(tx, args);
|
|
2017
|
-
const
|
|
2017
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2018
2018
|
transactionBlock: tx,
|
|
2019
2019
|
sender: ZERO_ADDRESS,
|
|
2020
2020
|
});
|
|
2021
2021
|
|
|
2022
2022
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2023
|
-
|
|
2023
|
+
inspectRes,
|
|
2024
2024
|
);
|
|
2025
2025
|
}
|
|
2026
2026
|
export async function getOutputPrice(
|
|
@@ -2034,13 +2034,13 @@ export namespace pool_utils {
|
|
|
2034
2034
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2035
2035
|
const tx = new TransactionBlock();
|
|
2036
2036
|
builder.getOutputPrice(tx, args);
|
|
2037
|
-
const
|
|
2037
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2038
2038
|
transactionBlock: tx,
|
|
2039
2039
|
sender: ZERO_ADDRESS,
|
|
2040
2040
|
});
|
|
2041
2041
|
|
|
2042
2042
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2043
|
-
|
|
2043
|
+
inspectRes,
|
|
2044
2044
|
);
|
|
2045
2045
|
}
|
|
2046
2046
|
export async function getTripleType<T0 = any, T1 = any, T2 = any>(
|
|
@@ -2062,7 +2062,7 @@ export namespace pool_utils {
|
|
|
2062
2062
|
> {
|
|
2063
2063
|
const tx = new TransactionBlock();
|
|
2064
2064
|
builder.getTripleType(tx, args, typeArguments);
|
|
2065
|
-
const
|
|
2065
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2066
2066
|
transactionBlock: tx,
|
|
2067
2067
|
sender: ZERO_ADDRESS,
|
|
2068
2068
|
});
|
|
@@ -2073,7 +2073,7 @@ export namespace pool_utils {
|
|
|
2073
2073
|
_0x1.type_name.TypeName,
|
|
2074
2074
|
_0x1.type_name.TypeName,
|
|
2075
2075
|
]
|
|
2076
|
-
>(
|
|
2076
|
+
>(inspectRes);
|
|
2077
2077
|
}
|
|
2078
2078
|
export async function getType<T0 = any, T1 = any>(
|
|
2079
2079
|
client: SuiClient,
|
|
@@ -2084,14 +2084,14 @@ export namespace pool_utils {
|
|
|
2084
2084
|
> {
|
|
2085
2085
|
const tx = new TransactionBlock();
|
|
2086
2086
|
builder.getType(tx, args, typeArguments);
|
|
2087
|
-
const
|
|
2087
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2088
2088
|
transactionBlock: tx,
|
|
2089
2089
|
sender: ZERO_ADDRESS,
|
|
2090
2090
|
});
|
|
2091
2091
|
|
|
2092
2092
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2093
2093
|
[_0x1.type_name.TypeName, _0x1.type_name.TypeName]
|
|
2094
|
-
>(
|
|
2094
|
+
>(inspectRes);
|
|
2095
2095
|
}
|
|
2096
2096
|
export async function quote(
|
|
2097
2097
|
client: SuiClient,
|
|
@@ -2103,13 +2103,13 @@ export namespace pool_utils {
|
|
|
2103
2103
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2104
2104
|
const tx = new TransactionBlock();
|
|
2105
2105
|
builder.quote(tx, args);
|
|
2106
|
-
const
|
|
2106
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2107
2107
|
transactionBlock: tx,
|
|
2108
2108
|
sender: ZERO_ADDRESS,
|
|
2109
2109
|
});
|
|
2110
2110
|
|
|
2111
2111
|
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2112
|
-
|
|
2112
|
+
inspectRes,
|
|
2113
2113
|
);
|
|
2114
2114
|
}
|
|
2115
2115
|
export async function sortTokenType(
|
|
@@ -2121,14 +2121,14 @@ export namespace pool_utils {
|
|
|
2121
2121
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
2122
2122
|
const tx = new TransactionBlock();
|
|
2123
2123
|
builder.sortTokenType(tx, args);
|
|
2124
|
-
const
|
|
2124
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2125
2125
|
transactionBlock: tx,
|
|
2126
2126
|
sender: ZERO_ADDRESS,
|
|
2127
2127
|
});
|
|
2128
2128
|
|
|
2129
2129
|
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2130
2130
|
[comparator.Result]
|
|
2131
|
-
>(
|
|
2131
|
+
>(inspectRes);
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
@@ -2499,13 +2499,13 @@ export namespace router {
|
|
|
2499
2499
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2500
2500
|
const tx = new TransactionBlock();
|
|
2501
2501
|
builder.addLiquidity_(tx, args, typeArguments);
|
|
2502
|
-
const
|
|
2502
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2503
2503
|
transactionBlock: tx,
|
|
2504
2504
|
sender: ZERO_ADDRESS,
|
|
2505
2505
|
});
|
|
2506
2506
|
|
|
2507
2507
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2508
|
-
|
|
2508
|
+
inspectRes,
|
|
2509
2509
|
);
|
|
2510
2510
|
}
|
|
2511
2511
|
export async function createPool_<T0 = any, T1 = any>(
|
|
@@ -2522,13 +2522,13 @@ export namespace router {
|
|
|
2522
2522
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2523
2523
|
const tx = new TransactionBlock();
|
|
2524
2524
|
builder.createPool_(tx, args, typeArguments);
|
|
2525
|
-
const
|
|
2525
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2526
2526
|
transactionBlock: tx,
|
|
2527
2527
|
sender: ZERO_ADDRESS,
|
|
2528
2528
|
});
|
|
2529
2529
|
|
|
2530
2530
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2531
|
-
|
|
2531
|
+
inspectRes,
|
|
2532
2532
|
);
|
|
2533
2533
|
}
|
|
2534
2534
|
export async function removeLiquidity_<T0 = any, T1 = any>(
|
|
@@ -2545,13 +2545,13 @@ export namespace router {
|
|
|
2545
2545
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2546
2546
|
const tx = new TransactionBlock();
|
|
2547
2547
|
builder.removeLiquidity_(tx, args, typeArguments);
|
|
2548
|
-
const
|
|
2548
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2549
2549
|
transactionBlock: tx,
|
|
2550
2550
|
sender: ZERO_ADDRESS,
|
|
2551
2551
|
});
|
|
2552
2552
|
|
|
2553
2553
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2554
|
-
|
|
2554
|
+
inspectRes,
|
|
2555
2555
|
);
|
|
2556
2556
|
}
|
|
2557
2557
|
export async function swapExactInput_<T0 = any, T1 = any>(
|
|
@@ -2567,13 +2567,13 @@ export namespace router {
|
|
|
2567
2567
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2568
2568
|
const tx = new TransactionBlock();
|
|
2569
2569
|
builder.swapExactInput_(tx, args, typeArguments);
|
|
2570
|
-
const
|
|
2570
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2571
2571
|
transactionBlock: tx,
|
|
2572
2572
|
sender: ZERO_ADDRESS,
|
|
2573
2573
|
});
|
|
2574
2574
|
|
|
2575
2575
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2576
|
-
|
|
2576
|
+
inspectRes,
|
|
2577
2577
|
);
|
|
2578
2578
|
}
|
|
2579
2579
|
export async function swapExactInputDoublehop_<
|
|
@@ -2597,13 +2597,13 @@ export namespace router {
|
|
|
2597
2597
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2598
2598
|
const tx = new TransactionBlock();
|
|
2599
2599
|
builder.swapExactInputDoublehop_(tx, args, typeArguments);
|
|
2600
|
-
const
|
|
2600
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2601
2601
|
transactionBlock: tx,
|
|
2602
2602
|
sender: ZERO_ADDRESS,
|
|
2603
2603
|
});
|
|
2604
2604
|
|
|
2605
2605
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2606
|
-
|
|
2606
|
+
inspectRes,
|
|
2607
2607
|
);
|
|
2608
2608
|
}
|
|
2609
2609
|
export async function swapExactOutput_<T0 = any, T1 = any>(
|
|
@@ -2619,13 +2619,13 @@ export namespace router {
|
|
|
2619
2619
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2620
2620
|
const tx = new TransactionBlock();
|
|
2621
2621
|
builder.swapExactOutput_(tx, args, typeArguments);
|
|
2622
|
-
const
|
|
2622
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2623
2623
|
transactionBlock: tx,
|
|
2624
2624
|
sender: ZERO_ADDRESS,
|
|
2625
2625
|
});
|
|
2626
2626
|
|
|
2627
2627
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2628
|
-
|
|
2628
|
+
inspectRes,
|
|
2629
2629
|
);
|
|
2630
2630
|
}
|
|
2631
2631
|
export async function swapExactOutputDoublehop_<
|
|
@@ -2649,13 +2649,13 @@ export namespace router {
|
|
|
2649
2649
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2650
2650
|
const tx = new TransactionBlock();
|
|
2651
2651
|
builder.swapExactOutputDoublehop_(tx, args, typeArguments);
|
|
2652
|
-
const
|
|
2652
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2653
2653
|
transactionBlock: tx,
|
|
2654
2654
|
sender: ZERO_ADDRESS,
|
|
2655
2655
|
});
|
|
2656
2656
|
|
|
2657
2657
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2658
|
-
|
|
2658
|
+
inspectRes,
|
|
2659
2659
|
);
|
|
2660
2660
|
}
|
|
2661
2661
|
export async function zapIn_<T0 = any, T1 = any>(
|
|
@@ -2670,13 +2670,13 @@ export namespace router {
|
|
|
2670
2670
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2671
2671
|
const tx = new TransactionBlock();
|
|
2672
2672
|
builder.zapIn_(tx, args, typeArguments);
|
|
2673
|
-
const
|
|
2673
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
|
2674
2674
|
transactionBlock: tx,
|
|
2675
2675
|
sender: ZERO_ADDRESS,
|
|
2676
2676
|
});
|
|
2677
2677
|
|
|
2678
2678
|
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2679
|
-
|
|
2679
|
+
inspectRes,
|
|
2680
2680
|
);
|
|
2681
2681
|
}
|
|
2682
2682
|
}
|