@typus/typus-sdk 1.5.6 → 1.5.8-split-coins
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/dist/src/dice/user-entry.js +4 -7
- package/dist/src/typus-dov-single-v2/history/user-history.js +3 -0
- package/dist/src/typus-dov-single-v2/user-entry.js +8 -36
- package/dist/src/typus-safu/authority-entry.d.ts +17 -0
- package/dist/src/typus-safu/authority-entry.js +26 -0
- package/dist/src/typus-safu/index.d.ts +1 -0
- package/dist/src/typus-safu/index.js +1 -0
- package/dist/src/typus-safu/user-entry.d.ts +4 -2
- package/dist/src/typus-safu/user-entry.js +13 -30
- package/dist/src/typus-safu/view-function.d.ts +14 -1
- package/dist/src/typus-safu/view-function.js +48 -6
- package/dist/src/utils/tools.js +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ exports.playGuessTx = playGuessTx;
|
|
|
57
57
|
exports.newGamePlayGuessTx = newGamePlayGuessTx;
|
|
58
58
|
exports.getConsumeExpCoinStakedTx = getConsumeExpCoinStakedTx;
|
|
59
59
|
exports.getConsumeExpCoinUnstakedTx = getConsumeExpCoinUnstakedTx;
|
|
60
|
+
var utils_1 = require("../../src/utils");
|
|
60
61
|
/**
|
|
61
62
|
public(friend) entry fun new_game<TOKEN>(
|
|
62
63
|
registry: &mut Registry,
|
|
@@ -68,7 +69,7 @@ exports.getConsumeExpCoinUnstakedTx = getConsumeExpCoinUnstakedTx;
|
|
|
68
69
|
*/
|
|
69
70
|
function newGameTx(config, tx, input) {
|
|
70
71
|
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
var registry;
|
|
72
|
+
var registry, coin;
|
|
72
73
|
return __generator(this, function (_a) {
|
|
73
74
|
registry = "";
|
|
74
75
|
switch (input.module) {
|
|
@@ -81,15 +82,11 @@ function newGameTx(config, tx, input) {
|
|
|
81
82
|
default:
|
|
82
83
|
break;
|
|
83
84
|
}
|
|
85
|
+
coin = (0, utils_1.splitCoins)(tx, input.typeArguments[0], input.coins, input.amount);
|
|
84
86
|
tx.moveCall({
|
|
85
87
|
target: "".concat(config.package.dice, "::").concat(input.module, "::new_game"),
|
|
86
88
|
typeArguments: input.typeArguments,
|
|
87
|
-
arguments: [
|
|
88
|
-
tx.object(registry),
|
|
89
|
-
tx.pure.u64(input.index),
|
|
90
|
-
tx.makeMoveVec({ elements: input.coins.map(function (id) { return tx.object(id); }) }),
|
|
91
|
-
tx.pure.u64(input.amount),
|
|
92
|
-
],
|
|
89
|
+
arguments: [tx.object(registry), tx.pure.u64(input.index), tx.makeMoveVec({ elements: [coin] }), tx.pure.u64(input.amount)],
|
|
93
90
|
});
|
|
94
91
|
return [2 /*return*/, tx];
|
|
95
92
|
});
|
|
@@ -494,6 +494,9 @@ function parseTxHistory(datas, vaults) {
|
|
|
494
494
|
Amount = "".concat((0, bignumber_js_1.default)(profit).toFixed(), " ").concat(d_token);
|
|
495
495
|
break;
|
|
496
496
|
case "RedeemEvent":
|
|
497
|
+
if (event.type == "0xc654c3634a10567b329de1226c2629cae39cdc16ec5d594897d87b250d46e958::typus_dov_single::RedeemEvent") {
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
497
500
|
token = (0, constants_1.typeArgToAsset)("0x" + event.parsedJson.token.name);
|
|
498
501
|
amount = Number(event.parsedJson.amount) / Math.pow(10, (0, constants_1.assetToDecimal)(token));
|
|
499
502
|
Action = "Harvest Reward";
|
|
@@ -29,6 +29,7 @@ exports.getCompoundWithRedeemTx = getCompoundWithRedeemTx;
|
|
|
29
29
|
var bcs_1 = require("@mysten/sui/bcs");
|
|
30
30
|
var transactions_1 = require("@mysten/sui/transactions");
|
|
31
31
|
var constants_1 = require("../../src/constants");
|
|
32
|
+
var utils_1 = require("../../src/utils");
|
|
32
33
|
/**
|
|
33
34
|
public fun public_raise_fund<D_TOKEN, B_TOKEN>(
|
|
34
35
|
typus_ecosystem_version: &TypusEcosystemVersion,
|
|
@@ -45,32 +46,12 @@ var constants_1 = require("../../src/constants");
|
|
|
45
46
|
): (TypusDepositReceipt, vector<u64>) {
|
|
46
47
|
*/
|
|
47
48
|
function getRaiseFundTx(config, tx, input) {
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
tx.pure.address(input.user),
|
|
55
|
-
tx.makeMoveVec({
|
|
56
|
-
type: "0x2::coin::Coin<".concat(input.typeArguments[0], ">"),
|
|
57
|
-
elements: [tx.splitCoins(tx.gas, [tx.pure.u64(input.raiseAmount)])],
|
|
58
|
-
}),
|
|
59
|
-
tx.pure.u64(input.raiseAmount),
|
|
60
|
-
],
|
|
61
|
-
})
|
|
62
|
-
: tx.moveCall({
|
|
63
|
-
target: "".concat(config.package.framework, "::utils::delegate_extract_balance"),
|
|
64
|
-
typeArguments: [input.typeArguments[0]],
|
|
65
|
-
arguments: [
|
|
66
|
-
tx.pure.address(input.user),
|
|
67
|
-
tx.makeMoveVec({
|
|
68
|
-
type: "0x2::coin::Coin<".concat(input.typeArguments[0], ">"),
|
|
69
|
-
elements: input.raiseCoins.map(function (coin) { return tx.object(coin); }),
|
|
70
|
-
}),
|
|
71
|
-
tx.pure.u64(input.raiseAmount),
|
|
72
|
-
],
|
|
73
|
-
});
|
|
49
|
+
var coin = (0, utils_1.splitCoins)(tx, input.typeArguments[0], input.raiseCoins, input.raiseAmount);
|
|
50
|
+
var raiseBalance = tx.moveCall({
|
|
51
|
+
target: "0x2::coin::into_balance",
|
|
52
|
+
typeArguments: [input.typeArguments[0]],
|
|
53
|
+
arguments: [tx.object(coin)],
|
|
54
|
+
});
|
|
74
55
|
var result = tx.moveCall({
|
|
75
56
|
target: "".concat(config.package.dovSingle, "::tds_user_entry::public_raise_fund"),
|
|
76
57
|
typeArguments: input.typeArguments,
|
|
@@ -223,16 +204,7 @@ function getNewBidTx(config, tx, input) {
|
|
|
223
204
|
});
|
|
224
205
|
}
|
|
225
206
|
else {
|
|
226
|
-
var
|
|
227
|
-
target: "".concat(config.package.framework, "::utils::extract_balance"),
|
|
228
|
-
typeArguments: [input.typeArguments[1]],
|
|
229
|
-
arguments: [tx.makeMoveVec({ elements: input.coins.map(function (coin) { return tx.object(coin); }) }), tx.pure.u64(input.premium_required)],
|
|
230
|
-
});
|
|
231
|
-
var coin = tx.moveCall({
|
|
232
|
-
target: "0x2::coin::from_balance",
|
|
233
|
-
typeArguments: [input.typeArguments[1]],
|
|
234
|
-
arguments: [tx.object(balance)],
|
|
235
|
-
});
|
|
207
|
+
var coin = (0, utils_1.splitCoins)(tx, input.typeArguments[1], input.coins, input.premium_required);
|
|
236
208
|
var result = tx.moveCall({
|
|
237
209
|
target: "".concat(config.package.dovSingle, "::tds_user_entry::public_bid"),
|
|
238
210
|
typeArguments: input.typeArguments,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
|
+
import { TypusConfig } from "../../src/utils";
|
|
3
|
+
/**
|
|
4
|
+
entry fun update_vault_config(
|
|
5
|
+
version: &Version,
|
|
6
|
+
registry: &mut Registry,
|
|
7
|
+
index: u64,
|
|
8
|
+
config_index: u64,
|
|
9
|
+
value: u64,
|
|
10
|
+
ctx: &TxContext,
|
|
11
|
+
) {
|
|
12
|
+
*/
|
|
13
|
+
export declare function updateVaultConfig(config: TypusConfig, tx: Transaction, input: {
|
|
14
|
+
index: string;
|
|
15
|
+
configIndex: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateVaultConfig = updateVaultConfig;
|
|
4
|
+
/**
|
|
5
|
+
entry fun update_vault_config(
|
|
6
|
+
version: &Version,
|
|
7
|
+
registry: &mut Registry,
|
|
8
|
+
index: u64,
|
|
9
|
+
config_index: u64,
|
|
10
|
+
value: u64,
|
|
11
|
+
ctx: &TxContext,
|
|
12
|
+
) {
|
|
13
|
+
*/
|
|
14
|
+
function updateVaultConfig(config, tx, input) {
|
|
15
|
+
tx.moveCall({
|
|
16
|
+
target: "".concat(config.package.safu, "::safu::update_vault_config"),
|
|
17
|
+
typeArguments: [],
|
|
18
|
+
arguments: [
|
|
19
|
+
tx.object(config.version.safu),
|
|
20
|
+
tx.object(config.registry.safu.safu),
|
|
21
|
+
tx.pure.u64(input.index),
|
|
22
|
+
tx.pure.u64(input.configIndex),
|
|
23
|
+
tx.pure.u64(input.value),
|
|
24
|
+
],
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./view-function"), exports);
|
|
18
18
|
__exportStar(require("./user-entry"), exports);
|
|
19
19
|
__exportStar(require("./user-history"), exports);
|
|
20
|
+
__exportStar(require("./authority-entry"), exports);
|
|
@@ -27,16 +27,17 @@ export declare function getRaiseFundTx(config: TypusConfig, tx: Transaction, inp
|
|
|
27
27
|
user: string;
|
|
28
28
|
}): Transaction;
|
|
29
29
|
/**
|
|
30
|
-
public fun
|
|
30
|
+
public fun reduce_fund_v2<D_TOKEN>(
|
|
31
31
|
typus_version: &TypusVersion,
|
|
32
32
|
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
33
33
|
typus_user_registry: &mut TypusUserRegistry,
|
|
34
|
-
version: &Version,
|
|
34
|
+
version: &mut Version,
|
|
35
35
|
registry: &mut Registry,
|
|
36
36
|
index: u64,
|
|
37
37
|
reduce_from_warmup: u64,
|
|
38
38
|
reduce_from_active: u64,
|
|
39
39
|
reduce_from_inactive: u64,
|
|
40
|
+
coin: Coin<SUI>,
|
|
40
41
|
clock: &Clock,
|
|
41
42
|
ctx: &mut TxContext,
|
|
42
43
|
): Balance<D_TOKEN> {
|
|
@@ -47,6 +48,7 @@ export declare function getReduceFundTx(config: TypusConfig, tx: Transaction, in
|
|
|
47
48
|
reduceFromWarmup: string;
|
|
48
49
|
reduceFromActive: string;
|
|
49
50
|
reduceFromInactive: string;
|
|
51
|
+
feeAmount: string;
|
|
50
52
|
user: string;
|
|
51
53
|
}): Transaction;
|
|
52
54
|
/**
|
|
@@ -5,6 +5,7 @@ exports.getReduceFundTx = getReduceFundTx;
|
|
|
5
5
|
exports.getClaimRewardTx = getClaimRewardTx;
|
|
6
6
|
exports.getSnapshotTx = getSnapshotTx;
|
|
7
7
|
var constants_1 = require("../../src/constants");
|
|
8
|
+
var utils_1 = require("../../src/utils");
|
|
8
9
|
/**
|
|
9
10
|
public fun raise_fund<D_TOKEN>(
|
|
10
11
|
typus_version: &TypusVersion,
|
|
@@ -22,33 +23,13 @@ var constants_1 = require("../../src/constants");
|
|
|
22
23
|
) {
|
|
23
24
|
*/
|
|
24
25
|
function getRaiseFundTx(config, tx, input) {
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
tx.makeMoveVec({
|
|
33
|
-
type: "0x2::coin::Coin<".concat(input.typeArguments[0], ">"),
|
|
34
|
-
elements: [tx.splitCoins(tx.gas, [tx.pure.u64(input.raiseAmount)])],
|
|
35
|
-
}),
|
|
36
|
-
tx.pure.u64(input.raiseAmount),
|
|
37
|
-
],
|
|
38
|
-
})
|
|
39
|
-
: tx.moveCall({
|
|
40
|
-
target: "".concat(config.package.framework, "::utils::delegate_extract_balance"),
|
|
41
|
-
typeArguments: [input.typeArguments[0]],
|
|
42
|
-
arguments: [
|
|
43
|
-
tx.pure.address(input.user),
|
|
44
|
-
tx.makeMoveVec({
|
|
45
|
-
type: "0x2::coin::Coin<".concat(input.typeArguments[0], ">"),
|
|
46
|
-
elements: input.raiseCoins.map(function (coin) { return tx.object(coin); }),
|
|
47
|
-
}),
|
|
48
|
-
tx.pure.u64(input.raiseAmount),
|
|
49
|
-
],
|
|
50
|
-
});
|
|
51
|
-
var result = tx.moveCall({
|
|
26
|
+
var coin = (0, utils_1.splitCoins)(tx, input.typeArguments[0], input.raiseCoins, input.raiseAmount);
|
|
27
|
+
var raiseBalance = tx.moveCall({
|
|
28
|
+
target: "0x2::coin::into_balance",
|
|
29
|
+
typeArguments: [input.typeArguments[0]],
|
|
30
|
+
arguments: [tx.object(coin)],
|
|
31
|
+
});
|
|
32
|
+
tx.moveCall({
|
|
52
33
|
target: "".concat(config.package.safu, "::safu::raise_fund"),
|
|
53
34
|
typeArguments: input.typeArguments,
|
|
54
35
|
arguments: [
|
|
@@ -69,23 +50,24 @@ function getRaiseFundTx(config, tx, input) {
|
|
|
69
50
|
return tx;
|
|
70
51
|
}
|
|
71
52
|
/**
|
|
72
|
-
public fun
|
|
53
|
+
public fun reduce_fund_v2<D_TOKEN>(
|
|
73
54
|
typus_version: &TypusVersion,
|
|
74
55
|
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
75
56
|
typus_user_registry: &mut TypusUserRegistry,
|
|
76
|
-
version: &Version,
|
|
57
|
+
version: &mut Version,
|
|
77
58
|
registry: &mut Registry,
|
|
78
59
|
index: u64,
|
|
79
60
|
reduce_from_warmup: u64,
|
|
80
61
|
reduce_from_active: u64,
|
|
81
62
|
reduce_from_inactive: u64,
|
|
63
|
+
coin: Coin<SUI>,
|
|
82
64
|
clock: &Clock,
|
|
83
65
|
ctx: &mut TxContext,
|
|
84
66
|
): Balance<D_TOKEN> {
|
|
85
67
|
*/
|
|
86
68
|
function getReduceFundTx(config, tx, input) {
|
|
87
69
|
var result = tx.moveCall({
|
|
88
|
-
target: "".concat(config.package.safu, "::safu::
|
|
70
|
+
target: "".concat(config.package.safu, "::safu::reduce_fund_v2"),
|
|
89
71
|
typeArguments: input.typeArguments,
|
|
90
72
|
arguments: [
|
|
91
73
|
tx.object(config.version.typus),
|
|
@@ -97,6 +79,7 @@ function getReduceFundTx(config, tx, input) {
|
|
|
97
79
|
tx.pure.u64(input.reduceFromWarmup),
|
|
98
80
|
tx.pure.u64(input.reduceFromActive),
|
|
99
81
|
tx.pure.u64(input.reduceFromInactive),
|
|
82
|
+
tx.object((0, utils_1.splitCoins)(tx, constants_1.tokenType.SUI, [], input.feeAmount)),
|
|
100
83
|
tx.object(constants_1.CLOCK),
|
|
101
84
|
],
|
|
102
85
|
});
|
|
@@ -6,6 +6,7 @@ export interface Vault {
|
|
|
6
6
|
rewardToken: string[];
|
|
7
7
|
info: Info;
|
|
8
8
|
config: Config;
|
|
9
|
+
share: BigVector;
|
|
9
10
|
shareSupply: ShareSupply;
|
|
10
11
|
u64Padding: string[];
|
|
11
12
|
bcsPadding: string[];
|
|
@@ -30,9 +31,13 @@ export interface Config {
|
|
|
30
31
|
min_size: string;
|
|
31
32
|
fee_bp: string;
|
|
32
33
|
utilization_rate_bp: string;
|
|
33
|
-
|
|
34
|
+
exp_per_hour_bp: string;
|
|
34
35
|
incentive_mbp: string;
|
|
35
36
|
incentive_fixed: string;
|
|
37
|
+
point_per_hour_bp: string;
|
|
38
|
+
exercise_fee_bp: string;
|
|
39
|
+
exit_fee_bp: string;
|
|
40
|
+
exit_fee_amount: string;
|
|
36
41
|
}
|
|
37
42
|
export interface ShareSupply {
|
|
38
43
|
active_share: string;
|
|
@@ -42,6 +47,14 @@ export interface ShareSupply {
|
|
|
42
47
|
snapshot_share: string;
|
|
43
48
|
reward_share: string[];
|
|
44
49
|
}
|
|
50
|
+
export interface BigVector {
|
|
51
|
+
id: string;
|
|
52
|
+
element_type: string;
|
|
53
|
+
slice_idx: string;
|
|
54
|
+
slice_size: number;
|
|
55
|
+
length: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function getBigVectorData(config: TypusConfig, bigVector: BigVector): Promise<any[]>;
|
|
45
58
|
export declare function getVaultData(config: TypusConfig, input: {
|
|
46
59
|
indexes: string[];
|
|
47
60
|
}): Promise<{
|
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.getBigVectorData = getBigVectorData;
|
|
39
40
|
exports.getVaultData = getVaultData;
|
|
40
41
|
exports.getShareData = getShareData;
|
|
41
42
|
var transactions_1 = require("@mysten/sui/transactions");
|
|
@@ -43,6 +44,39 @@ var client_1 = require("@mysten/sui/client");
|
|
|
43
44
|
var bcs_1 = require("@mysten/bcs");
|
|
44
45
|
var utils_1 = require("../../src/utils");
|
|
45
46
|
var constants_1 = require("../../src/constants");
|
|
47
|
+
function getBigVectorData(config, bigVector) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
+
var provider, results, i, df, result;
|
|
50
|
+
var _a;
|
|
51
|
+
return __generator(this, function (_b) {
|
|
52
|
+
switch (_b.label) {
|
|
53
|
+
case 0:
|
|
54
|
+
provider = new client_1.SuiClient({ url: config.rpcEndpoint });
|
|
55
|
+
results = [];
|
|
56
|
+
i = 0;
|
|
57
|
+
_b.label = 1;
|
|
58
|
+
case 1:
|
|
59
|
+
if (!(i <= Number(bigVector.slice_idx))) return [3 /*break*/, 4];
|
|
60
|
+
return [4 /*yield*/, provider.getDynamicFieldObject({
|
|
61
|
+
parentId: bigVector.id,
|
|
62
|
+
name: {
|
|
63
|
+
type: "u64",
|
|
64
|
+
value: "".concat(i),
|
|
65
|
+
},
|
|
66
|
+
})];
|
|
67
|
+
case 2:
|
|
68
|
+
df = _b.sent();
|
|
69
|
+
result = (_a = df.data) === null || _a === void 0 ? void 0 : _a.content.fields.value.fields.vector.map(function (x) { return x.fields; });
|
|
70
|
+
results = results.concat(result);
|
|
71
|
+
_b.label = 3;
|
|
72
|
+
case 3:
|
|
73
|
+
i++;
|
|
74
|
+
return [3 /*break*/, 1];
|
|
75
|
+
case 4: return [2 /*return*/, results];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
46
80
|
function getVaultData(config, input) {
|
|
47
81
|
return __awaiter(this, void 0, void 0, function () {
|
|
48
82
|
var provider, transaction, results, bytes, reader, result;
|
|
@@ -95,16 +129,22 @@ function getVaultData(config, input) {
|
|
|
95
129
|
min_size: configArray[2],
|
|
96
130
|
fee_bp: configArray[3],
|
|
97
131
|
utilization_rate_bp: configArray[4],
|
|
98
|
-
|
|
132
|
+
exp_per_hour_bp: configArray[5],
|
|
99
133
|
incentive_mbp: configArray[6],
|
|
100
134
|
incentive_fixed: configArray[7],
|
|
135
|
+
point_per_hour_bp: configArray[8],
|
|
136
|
+
exercise_fee_bp: configArray[9],
|
|
137
|
+
exit_fee_bp: configArray[10],
|
|
138
|
+
exit_fee_amount: configArray[11],
|
|
101
139
|
};
|
|
102
140
|
// skip BigVector
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
141
|
+
var bigVector = {
|
|
142
|
+
id: (0, utils_1.AddressFromBytes)(reader.readBytes(32)),
|
|
143
|
+
element_type: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))), // element_type
|
|
144
|
+
slice_idx: reader.read64(), // slice_idx
|
|
145
|
+
slice_size: reader.read32(), // slice_size
|
|
146
|
+
length: reader.read64(), // length
|
|
147
|
+
};
|
|
108
148
|
var shareSupplyArray = reader.readVec(function (reader) {
|
|
109
149
|
return reader.read64();
|
|
110
150
|
});
|
|
@@ -131,6 +171,7 @@ function getVaultData(config, input) {
|
|
|
131
171
|
rewardToken: rewardToken,
|
|
132
172
|
info: info,
|
|
133
173
|
config: config,
|
|
174
|
+
share: bigVector,
|
|
134
175
|
shareSupply: shareSupply,
|
|
135
176
|
u64Padding: u64Padding,
|
|
136
177
|
bcsPadding: bcsPadding,
|
|
@@ -154,6 +195,7 @@ function getVaultData(config, input) {
|
|
|
154
195
|
rewardToken: rewardToken,
|
|
155
196
|
info: info,
|
|
156
197
|
config: config,
|
|
198
|
+
share: bigVector,
|
|
157
199
|
shareSupply: shareSupply,
|
|
158
200
|
u64Padding: u64Padding,
|
|
159
201
|
bcsPadding: bcsPadding,
|
package/dist/src/utils/tools.js
CHANGED
|
@@ -69,7 +69,7 @@ var countFloating = function (value) {
|
|
|
69
69
|
};
|
|
70
70
|
exports.countFloating = countFloating;
|
|
71
71
|
function splitCoins(tx, token, coins, amount) {
|
|
72
|
-
var _a = __read((0, utils_1.
|
|
72
|
+
var _a = __read((0, utils_1.normalizeStructTag)(token) == constants_1.tokenType.SUI
|
|
73
73
|
? tx.splitCoins(tx.gas, [tx.pure.u64(amount)])
|
|
74
74
|
: (function () {
|
|
75
75
|
var coin = coins.pop();
|