@typus/typus-sdk 1.0.72 → 1.0.74
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/lib/config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"VERSION": "2.10.0",
|
|
3
|
+
"DB_NAME": "testnet_2_8_0",
|
|
4
|
+
"RPC_ENDPOINT": "https://fullnode.testnet.sui.io:443",
|
|
5
|
+
"SINGLE_COLLATERAL_PACKAGE": "0xc9a09a5d71159aec4fc43cdc80bc2e37b03c39151d72ae005921f3e5325a1cb5",
|
|
6
|
+
"SINGLE_COLLATERAL_PACKAGE_ORIGIN": "0x867a84b70d1f44ea10c02cb099dad5a46c074675afa3b728bd0c11f653e2cb18",
|
|
7
|
+
"SINGLE_COLLATERAL_MANAGER_CAP": "0x7040e5c1a4691d7df2208a577802b05784b8926ad157ebf99b46a185636f2e07",
|
|
8
|
+
"SINGLE_COLLATERAL_REGISTRY": "0x7808d2e668101969e67b6713df9dd96a57deba23baf4cd6754258756f332ef88",
|
|
9
|
+
"SINGLE_COLLATERAL_ADDITIONAL_CONFIG_REGISTRY": "0x3247cb9bde56b63cf4ce79670caed0f9ebc28f839586b07c5b1d79fb7450dde8",
|
|
10
|
+
"SINGLE_COLLATERAL_DEPOSIT_VAULT_REGISTRY": "0x6d63f91afacfdef3fb8e798b9bcda6b99e3e52730dab00c35ea195505c9efc2b",
|
|
11
|
+
"SINGLE_COLLATERAL_BID_VAULT_REGISTRY": "0x90e723d05a6f7da2b94bdc88772a205e3a3b90babf69b369adef024756c79da5",
|
|
12
|
+
"SINGLE_COLLATERAL_DEPOSIT_VAULT_USER_SHARE_REGISTRY": "0x3d8ddc0f8eadb2cb4ab0ecd62b8437bfb40b75fe5368c04fa6f3382c0975c4c6",
|
|
13
|
+
"SINGLE_COLLATERAL_BID_VAULT_USER_SHARE_REGISTRY": "0x0a0c530ffbad0ff9d9d1707dc1ea4c2e123ffdd5bd6c6c842f71cd449263202e",
|
|
14
|
+
"TOKEN_PACKAGE": "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519",
|
|
15
|
+
"BTC_TOKEN_REGISTRY": "0xcf5184b85f47cb1ffe421249e48b2cd34807534e1a4b4ad384009295bbbd3bf4",
|
|
16
|
+
"ETH_TOKEN_REGISTRY": "0x5cd3726a1d1ef32bffaaeb2ec4964f0ffac56cfb919f7d13d4672aed5059bfa1",
|
|
17
|
+
"USDC_TOKEN_REGISTRY": "0xf7df3c68a7d3ffc54065565c94a9fa3f5342957340bce78be74373846241a833",
|
|
18
|
+
"CETUS_TOKEN_REGISTRY": "0x24a7a5297a3656ebea71ed72a4974a7710943d9a598fda60fe60b44262da9f27",
|
|
19
|
+
"BUCK_TOKEN_REGISTRY": "0x445324cee50d98a949aab8e75ee44539ca9ef38ee431fed19d3eb7deb654536d",
|
|
20
|
+
"ORACLE_PACKAGE": "0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73",
|
|
21
|
+
"ORACLE_MANAGER_CAP": "0x4e118b46fc39fd8961b8bac6a7f668e12c63ef28fbd2cb6f9b6a40cb0a41dfaf",
|
|
22
|
+
"SUI_USDC_ORACLE": "0x770f17817e809f22d3cf3ba5f452056622a31dd6a1db7c60c94c5a598aff9a29",
|
|
23
|
+
"CETUS_USDC_ORACLE": "0xe8142c490363475a4ad0b9af02ac5a543962584f3a99cdb8754d909be6ec550d",
|
|
24
|
+
"BTC_USDC_ORACLE": "0xaa72a2b370cf45a7b1363a2b9e3f0c57c05863375b984e2ca0928973574404f2",
|
|
25
|
+
"ETH_USDC_ORACLE": "0x0ac9f9275eb0ac33b7f59741b1df67a6783af2db6d2a4e5aba8ce350d5b6b260",
|
|
26
|
+
"SUI_BUCK_ORACLE": "0x22ef75c17468f6ed24574f26011f7fcf61a7b983009c9ba6cacc28ae24ff1782",
|
|
27
|
+
"PYTH_STATE": "0xd8afde3a48b4ff7212bd6829a150f43f59043221200d63504d981f62bff2e27a",
|
|
28
|
+
"PYTH_SUI/USDC": "0xe38dbe2ff3322f1500fff45d0046101f371eebce47c067c5e9233248c4878c28",
|
|
29
|
+
"SWITCHBOARD_SUI/USDC": "0x84d2b7e435d6e6a5b137bf6f78f34b2c5515ae61cd8591d5ff6cd121a21aa6b7",
|
|
30
|
+
"CETUS_ORACLE": "0xfa4720fa516760b2de899dc74e078d8cc1cc6af6c74805b069b31dc3935aa119",
|
|
31
|
+
"mainnet": false
|
|
32
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getDepositorLeaderBoard(start?: string, end?: string, step?: number): Promise<
|
|
1
|
+
export declare function getDepositorLeaderBoard(start?: string, end?: string, step?: number): Promise<void>;
|
|
2
2
|
export declare function getBidderLeaderBoard(startTimestamp?: string, end?: string): Promise<LeaderBoard[]>;
|
|
3
3
|
interface LeaderBoard {
|
|
4
4
|
user: string;
|
|
@@ -55,74 +55,64 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
55
55
|
exports.getBidderLeaderBoard = exports.getDepositorLeaderBoard = void 0;
|
|
56
56
|
var apiUrl = "https://app.sentio.xyz/api/v1/insights/wayne/typus/query";
|
|
57
57
|
var headers = {
|
|
58
|
-
"api-key": "
|
|
58
|
+
"api-key": "UcELWyfhQjJcb26aSc59JvAYXU3x3eBGh",
|
|
59
59
|
"Content-Type": "application/json",
|
|
60
60
|
};
|
|
61
|
-
var
|
|
61
|
+
var requestData = {
|
|
62
62
|
timeRange: {
|
|
63
|
-
start: "-
|
|
63
|
+
start: "-30d",
|
|
64
64
|
end: "now",
|
|
65
|
-
step:
|
|
65
|
+
step: 86400,
|
|
66
|
+
timezone: "UTC",
|
|
66
67
|
},
|
|
67
|
-
limit:
|
|
68
|
+
limit: 20,
|
|
68
69
|
queries: [
|
|
69
70
|
{
|
|
70
71
|
metricsQuery: {
|
|
71
|
-
query: "
|
|
72
|
-
alias: "",
|
|
72
|
+
query: "deliverySize_USD_",
|
|
73
73
|
id: "a",
|
|
74
74
|
labelSelector: {},
|
|
75
75
|
aggregate: {
|
|
76
76
|
op: "SUM",
|
|
77
|
-
grouping: ["
|
|
77
|
+
grouping: ["coin_symbol"],
|
|
78
78
|
},
|
|
79
|
-
functions: [
|
|
80
|
-
disabled: true,
|
|
81
|
-
},
|
|
82
|
-
dataSource: "METRICS",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
priceQuery: {
|
|
86
|
-
id: "b",
|
|
87
|
-
alias: "",
|
|
88
|
-
coinId: [
|
|
79
|
+
functions: [
|
|
89
80
|
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
81
|
+
name: "sum_over_time",
|
|
82
|
+
arguments: [
|
|
83
|
+
{
|
|
84
|
+
durationValue: {
|
|
85
|
+
value: 1,
|
|
86
|
+
unit: "d",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
],
|
|
94
90
|
},
|
|
95
91
|
],
|
|
96
|
-
disabled:
|
|
92
|
+
disabled: false,
|
|
97
93
|
},
|
|
98
|
-
dataSource: "
|
|
99
|
-
|
|
100
|
-
],
|
|
101
|
-
formulas: [
|
|
102
|
-
{
|
|
103
|
-
expression: "a*b",
|
|
104
|
-
alias: "{{user}}",
|
|
105
|
-
id: "A",
|
|
106
|
-
disabled: false,
|
|
94
|
+
dataSource: "METRICS",
|
|
95
|
+
sourceName: "",
|
|
107
96
|
},
|
|
108
97
|
],
|
|
98
|
+
formulas: [],
|
|
109
99
|
};
|
|
110
100
|
function getDepositorLeaderBoard(start, end, step) {
|
|
111
101
|
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
-
var jsonData, response, data, samples
|
|
102
|
+
var jsonData, response, data, samples;
|
|
113
103
|
return __generator(this, function (_a) {
|
|
114
104
|
switch (_a.label) {
|
|
115
105
|
case 0:
|
|
116
106
|
if (start) {
|
|
117
|
-
|
|
107
|
+
requestData.timeRange.start = start;
|
|
118
108
|
}
|
|
119
109
|
if (end) {
|
|
120
|
-
|
|
110
|
+
requestData.timeRange.end = end;
|
|
121
111
|
}
|
|
122
112
|
if (step) {
|
|
123
|
-
|
|
113
|
+
requestData.timeRange.step = step;
|
|
124
114
|
}
|
|
125
|
-
jsonData = JSON.stringify(
|
|
115
|
+
jsonData = JSON.stringify(requestData);
|
|
126
116
|
return [4 /*yield*/, fetch(apiUrl, {
|
|
127
117
|
method: "POST",
|
|
128
118
|
headers: headers,
|
|
@@ -130,45 +120,12 @@ function getDepositorLeaderBoard(start, end, step) {
|
|
|
130
120
|
})];
|
|
131
121
|
case 1:
|
|
132
122
|
response = _a.sent();
|
|
133
|
-
_a.label = 2;
|
|
134
|
-
case 2:
|
|
135
|
-
_a.trys.push([2, 4, , 5]);
|
|
136
123
|
return [4 /*yield*/, response.json()];
|
|
137
|
-
case
|
|
124
|
+
case 2:
|
|
138
125
|
data = _a.sent();
|
|
139
126
|
samples = data.results[0].matrix.samples;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.map(function (element) {
|
|
143
|
-
// console.log("metric:", element.metric, "values: ", element.values);
|
|
144
|
-
// console.log("user:", element.metric.labels.user, "score: ", element.values.at(-1).value);
|
|
145
|
-
var sum = element.values.reduce(function (acc, curr) { return acc + curr.value / len_1; }, 0);
|
|
146
|
-
return {
|
|
147
|
-
user: element.metric.labels.user,
|
|
148
|
-
score: sum,
|
|
149
|
-
};
|
|
150
|
-
})
|
|
151
|
-
.filter(function (element) { return element.score != 0; });
|
|
152
|
-
userScoreMap = leader_board.reduce(function (map, obj) {
|
|
153
|
-
if (map[obj.user]) {
|
|
154
|
-
map[obj.user] += obj.score;
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
map[obj.user] = obj.score;
|
|
158
|
-
}
|
|
159
|
-
return map;
|
|
160
|
-
}, {});
|
|
161
|
-
result = Object.entries(userScoreMap).map(function (_a) {
|
|
162
|
-
var _b = __read(_a, 2), user = _b[0], score = _b[1];
|
|
163
|
-
return ({ user: user, score: score });
|
|
164
|
-
});
|
|
165
|
-
result.sort(function (a, b) { return b.score - a.score; });
|
|
166
|
-
// console.log(result);
|
|
167
|
-
return [2 /*return*/, result];
|
|
168
|
-
case 4:
|
|
169
|
-
e_1 = _a.sent();
|
|
170
|
-
return [2 /*return*/, []];
|
|
171
|
-
case 5: return [2 /*return*/];
|
|
127
|
+
console.log(samples[0].values);
|
|
128
|
+
return [2 /*return*/];
|
|
172
129
|
}
|
|
173
130
|
});
|
|
174
131
|
});
|
|
@@ -201,7 +158,7 @@ var bidderRequestData = {
|
|
|
201
158
|
};
|
|
202
159
|
function getBidderLeaderBoard(startTimestamp, end) {
|
|
203
160
|
return __awaiter(this, void 0, void 0, function () {
|
|
204
|
-
var jsonData, response, data, samples, leader_board, userScoreMap, result,
|
|
161
|
+
var jsonData, response, data, samples, leader_board, userScoreMap, result, e_1;
|
|
205
162
|
return __generator(this, function (_a) {
|
|
206
163
|
switch (_a.label) {
|
|
207
164
|
case 0:
|
|
@@ -259,7 +216,7 @@ function getBidderLeaderBoard(startTimestamp, end) {
|
|
|
259
216
|
// console.log(result);
|
|
260
217
|
return [2 /*return*/, result];
|
|
261
218
|
case 4:
|
|
262
|
-
|
|
219
|
+
e_1 = _a.sent();
|
|
263
220
|
return [2 /*return*/, []];
|
|
264
221
|
case 5: return [2 /*return*/];
|
|
265
222
|
}
|
|
@@ -268,7 +225,15 @@ function getBidderLeaderBoard(startTimestamp, end) {
|
|
|
268
225
|
}
|
|
269
226
|
exports.getBidderLeaderBoard = getBidderLeaderBoard;
|
|
270
227
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
271
|
-
|
|
272
|
-
|
|
228
|
+
var _a, _b;
|
|
229
|
+
return __generator(this, function (_c) {
|
|
230
|
+
switch (_c.label) {
|
|
231
|
+
case 0:
|
|
232
|
+
_b = (_a = console).log;
|
|
233
|
+
return [4 /*yield*/, getDepositorLeaderBoard("1684886400")];
|
|
234
|
+
case 1:
|
|
235
|
+
_b.apply(_a, [_c.sent()]);
|
|
236
|
+
return [2 /*return*/];
|
|
237
|
+
}
|
|
273
238
|
});
|
|
274
239
|
}); })();
|
package/lib/utils/token.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.assetToDecimal = exports.typeArgsToAssets = void 0;
|
|
4
7
|
var sui_js_1 = require("@mysten/sui.js");
|
|
8
|
+
var config_json_1 = __importDefault(require("../config.json"));
|
|
5
9
|
function typeArgsToAssets(typeArgs) {
|
|
6
10
|
var assets = typeArgs.map(function (x) {
|
|
7
11
|
var typeArgs = x.split("::");
|
|
@@ -16,6 +20,14 @@ function typeArgsToAssets(typeArgs) {
|
|
|
16
20
|
return "USDC";
|
|
17
21
|
case "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c":
|
|
18
22
|
return "USDT";
|
|
23
|
+
case config_json_1.default.TOKEN_PACKAGE:
|
|
24
|
+
if (typeArgs[2] == "BTC") {
|
|
25
|
+
return "WBTC";
|
|
26
|
+
}
|
|
27
|
+
else if (typeArgs[2] == "ETH") {
|
|
28
|
+
return "WETH";
|
|
29
|
+
}
|
|
30
|
+
return typeArgs[2];
|
|
19
31
|
default:
|
|
20
32
|
return typeArgs[2];
|
|
21
33
|
}
|
|
@@ -28,7 +28,7 @@ export declare function getWithdrawTx(gasBudget: number, packageId: string, type
|
|
|
28
28
|
)
|
|
29
29
|
@param typeArguments [Deposit Vault Token]
|
|
30
30
|
*/
|
|
31
|
-
export declare function getClaimTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string): Promise<TransactionBlock>;
|
|
31
|
+
export declare function getClaimTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string): Promise<TransactionBlock>;
|
|
32
32
|
/**
|
|
33
33
|
public(friend) entry fun harvest<TOKEN>(
|
|
34
34
|
registry: &mut Registry,
|
|
@@ -37,7 +37,7 @@ export declare function getClaimTx(gasBudget: number, packageId: string, typeArg
|
|
|
37
37
|
)
|
|
38
38
|
@param typeArguments [Bid Vault Token]
|
|
39
39
|
*/
|
|
40
|
-
export declare function getHarvestTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string): Promise<TransactionBlock>;
|
|
40
|
+
export declare function getHarvestTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string): Promise<TransactionBlock>;
|
|
41
41
|
/**
|
|
42
42
|
public(friend) entry fun claim_and_harvest<D_TOKEN, B_TOKEN>(
|
|
43
43
|
registry: &mut Registry,
|
|
@@ -46,7 +46,7 @@ export declare function getHarvestTx(gasBudget: number, packageId: string, typeA
|
|
|
46
46
|
)
|
|
47
47
|
@param typeArguments [Deposit Vault Token, Bid Vault Token]
|
|
48
48
|
*/
|
|
49
|
-
export declare function getClaimAndHarvestTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string): Promise<TransactionBlock>;
|
|
49
|
+
export declare function getClaimAndHarvestTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string): Promise<TransactionBlock>;
|
|
50
50
|
/**
|
|
51
51
|
public(friend) entry fun compound<TOKEN, O_TOKEN>(
|
|
52
52
|
registry: &mut Registry,
|
|
@@ -55,7 +55,7 @@ export declare function getClaimAndHarvestTx(gasBudget: number, packageId: strin
|
|
|
55
55
|
)
|
|
56
56
|
@param typeArguments [Deposit Vault Token, Oracle Token]
|
|
57
57
|
*/
|
|
58
|
-
export declare function getCompoundTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string): Promise<TransactionBlock>;
|
|
58
|
+
export declare function getCompoundTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string): Promise<TransactionBlock>;
|
|
59
59
|
/**
|
|
60
60
|
public(friend) entry fun unsubscribe<TOKEN>(
|
|
61
61
|
registry: &mut Registry,
|
|
@@ -71,7 +71,8 @@ function getDepositTx(gasBudget, packageId, typeArguments, registry, index, coin
|
|
|
71
71
|
return __generator(this, function (_b) {
|
|
72
72
|
tx = new sui_js_1.TransactionBlock();
|
|
73
73
|
if (!usingSponsoredGasCoin &&
|
|
74
|
-
(typeArguments[0] == "0x2::sui::SUI" ||
|
|
74
|
+
(typeArguments[0] == "0x2::sui::SUI" ||
|
|
75
|
+
typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
|
|
75
76
|
_a = __read(tx.splitCoins(tx.gas, [tx.pure(amount)]), 1), coin = _a[0];
|
|
76
77
|
tx.moveCall({
|
|
77
78
|
target: "".concat(packageId, "::typus_dov_single::deposit"),
|
|
@@ -125,7 +126,7 @@ exports.getWithdrawTx = getWithdrawTx;
|
|
|
125
126
|
)
|
|
126
127
|
@param typeArguments [Deposit Vault Token]
|
|
127
128
|
*/
|
|
128
|
-
function getClaimTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
129
|
+
function getClaimTx(gasBudget, packageId, typeArguments, registry, additional_config_registry, index) {
|
|
129
130
|
return __awaiter(this, void 0, void 0, function () {
|
|
130
131
|
var tx;
|
|
131
132
|
return __generator(this, function (_a) {
|
|
@@ -133,7 +134,7 @@ function getClaimTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
133
134
|
tx.moveCall({
|
|
134
135
|
target: "".concat(packageId, "::typus_dov_single::claim"),
|
|
135
136
|
typeArguments: typeArguments,
|
|
136
|
-
arguments: [tx.pure(registry), tx.pure(index)],
|
|
137
|
+
arguments: [tx.pure(registry), tx.pure(additional_config_registry), tx.pure(index)],
|
|
137
138
|
});
|
|
138
139
|
tx.setGasBudget(gasBudget);
|
|
139
140
|
return [2 /*return*/, tx];
|
|
@@ -149,7 +150,7 @@ exports.getClaimTx = getClaimTx;
|
|
|
149
150
|
)
|
|
150
151
|
@param typeArguments [Bid Vault Token]
|
|
151
152
|
*/
|
|
152
|
-
function getHarvestTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
153
|
+
function getHarvestTx(gasBudget, packageId, typeArguments, registry, additional_config_registry, index) {
|
|
153
154
|
return __awaiter(this, void 0, void 0, function () {
|
|
154
155
|
var tx;
|
|
155
156
|
return __generator(this, function (_a) {
|
|
@@ -157,7 +158,7 @@ function getHarvestTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
157
158
|
tx.moveCall({
|
|
158
159
|
target: "".concat(packageId, "::typus_dov_single::harvest"),
|
|
159
160
|
typeArguments: typeArguments,
|
|
160
|
-
arguments: [tx.pure(registry), tx.pure(index)],
|
|
161
|
+
arguments: [tx.pure(registry), tx.pure(additional_config_registry), tx.pure(index)],
|
|
161
162
|
});
|
|
162
163
|
tx.setGasBudget(gasBudget);
|
|
163
164
|
return [2 /*return*/, tx];
|
|
@@ -173,7 +174,7 @@ exports.getHarvestTx = getHarvestTx;
|
|
|
173
174
|
)
|
|
174
175
|
@param typeArguments [Deposit Vault Token, Bid Vault Token]
|
|
175
176
|
*/
|
|
176
|
-
function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
177
|
+
function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, additional_config_registry, index) {
|
|
177
178
|
return __awaiter(this, void 0, void 0, function () {
|
|
178
179
|
var tx;
|
|
179
180
|
return __generator(this, function (_a) {
|
|
@@ -181,7 +182,7 @@ function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, ind
|
|
|
181
182
|
tx.moveCall({
|
|
182
183
|
target: "".concat(packageId, "::typus_dov_single::claim_and_harvest"),
|
|
183
184
|
typeArguments: typeArguments,
|
|
184
|
-
arguments: [tx.pure(registry), tx.pure(index)],
|
|
185
|
+
arguments: [tx.pure(registry), tx.pure(additional_config_registry), tx.pure(index)],
|
|
185
186
|
});
|
|
186
187
|
tx.setGasBudget(gasBudget);
|
|
187
188
|
return [2 /*return*/, tx];
|
|
@@ -197,7 +198,7 @@ exports.getClaimAndHarvestTx = getClaimAndHarvestTx;
|
|
|
197
198
|
)
|
|
198
199
|
@param typeArguments [Deposit Vault Token, Oracle Token]
|
|
199
200
|
*/
|
|
200
|
-
function getCompoundTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
201
|
+
function getCompoundTx(gasBudget, packageId, typeArguments, registry, additional_config_registry, index) {
|
|
201
202
|
return __awaiter(this, void 0, void 0, function () {
|
|
202
203
|
var tx;
|
|
203
204
|
return __generator(this, function (_a) {
|
|
@@ -205,7 +206,7 @@ function getCompoundTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
205
206
|
tx.moveCall({
|
|
206
207
|
target: "".concat(packageId, "::typus_dov_single::compound"),
|
|
207
208
|
typeArguments: typeArguments,
|
|
208
|
-
arguments: [tx.pure(registry), tx.pure(index)],
|
|
209
|
+
arguments: [tx.pure(registry), tx.pure(additional_config_registry), tx.pure(index)],
|
|
209
210
|
});
|
|
210
211
|
tx.setGasBudget(gasBudget);
|
|
211
212
|
return [2 /*return*/, tx];
|
|
@@ -258,7 +259,8 @@ usingSponsoredGasCoin) {
|
|
|
258
259
|
return __generator(this, function (_b) {
|
|
259
260
|
tx = new sui_js_1.TransactionBlock();
|
|
260
261
|
if (!usingSponsoredGasCoin &&
|
|
261
|
-
(typeArguments[1] == "0x2::sui::SUI" ||
|
|
262
|
+
(typeArguments[1] == "0x2::sui::SUI" ||
|
|
263
|
+
typeArguments[1] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
|
|
262
264
|
_a = __read(tx.splitCoins(tx.gas, [tx.pure(premium_required)]), 1), coin = _a[0];
|
|
263
265
|
tx.moveCall({
|
|
264
266
|
target: "".concat(packageId, "::typus_dov_single::new_bid"),
|