@typus/typus-sdk 1.8.3 → 1.8.5
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/constants/token.js +6 -2
- package/dist/src/typus-dov-single-v2/authority-entry.d.ts +36 -0
- package/dist/src/typus-dov-single-v2/authority-entry.js +44 -0
- package/dist/src/typus-hedge/index.js +0 -4
- package/dist/src/typus-hedge/user-entry.d.ts +3 -6
- package/dist/src/typus-hedge/user-entry.js +10 -17
- package/dist/src/typus-hedge/view-function.d.ts +1 -1
- package/dist/src/typus-hedge/view-function.js +9 -9
- package/dist/src/utils/pyth/constant.js +4 -0
- package/dist/src/utils/typusConfig.d.ts +3 -1
- package/package.json +1 -1
|
@@ -119,6 +119,7 @@ function typeArgToAsset(typeArg) {
|
|
|
119
119
|
// native bridge
|
|
120
120
|
// sbETH
|
|
121
121
|
case "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH":
|
|
122
|
+
case "0xc9587969592e1a1ba605d2327194824d041823558916e854086717d5ae2ad0d8::eth::ETH":
|
|
122
123
|
return "sbETH";
|
|
123
124
|
// sbUSDT
|
|
124
125
|
case "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT":
|
|
@@ -331,7 +332,7 @@ exports.tokenType = {
|
|
|
331
332
|
HIPPO: "",
|
|
332
333
|
MLIQ: "",
|
|
333
334
|
AUSD: "0x087653e9ffcc8ffe85e0e20523388aa27af2a5997ae64224444f0d98a2ba8279::ausd::AUSD",
|
|
334
|
-
sbETH: "",
|
|
335
|
+
sbETH: "0xc9587969592e1a1ba605d2327194824d041823558916e854086717d5ae2ad0d8::eth::ETH",
|
|
335
336
|
sbUSDT: "",
|
|
336
337
|
VSUI: "",
|
|
337
338
|
HASUI: "",
|
|
@@ -384,11 +385,12 @@ exports.oracle = {
|
|
|
384
385
|
wAPT: "0x25f9ffcc52776d5f8656bbdb4a3339a411c1550f288560ab0b101170f23b8245",
|
|
385
386
|
HAEDAL: "0x5dde9f285c75132a91b54ea7e93f5ddd61cdb38ca8e6191263028561a9956f94",
|
|
386
387
|
XAU: "0x511c861bcc9fb41e96091e9aefe07ff0ac55369b5838fd7f793569581b3b2f33",
|
|
387
|
-
JPY: "
|
|
388
|
+
JPY: "0x1f2d3395bf4b5369c09930ccda203ad7956718713b528c9d56c16e36a8a25fbb",
|
|
388
389
|
DOGE: "0x5eada11b8ecec767d8acb32608798b0c3951af93b13e84ef9d167f6a95e42a8a",
|
|
389
390
|
HYPE: "0x991a931286c0f46b0900da66cb60e59c57ace5103e60826ee31d568b141a8f9f",
|
|
390
391
|
XRP: "0xe81d3787435ac4e0108b98ed2a95f62d6e854c0a1821614a68d77f47bbdbec81",
|
|
391
392
|
xBTC: "0x6e7ca39c4ad0a1ad83937e98b220824566d858814aa8fd01294400b45c2bbc21",
|
|
393
|
+
sbETH: "0xc2100d191647b6b22a04a6b45d1d0381320f8eb5816ef067a69b7bc3954bf7cb",
|
|
392
394
|
},
|
|
393
395
|
TESTNET: {
|
|
394
396
|
SUI: "0x9083c9ce1a1eef569bb1a8b31dfa5e0fce2e05887e68ba79ca6ae522acd041f3",
|
|
@@ -411,6 +413,7 @@ exports.oracle = {
|
|
|
411
413
|
JPY: "0x58033b4a91375217a14db8efebad37000057f343e3b93be4efb028d4081d6824",
|
|
412
414
|
XAU: "0x172101af6fbaab02b2663ed7c502152431fed5d76ac865ac3ccad134c92d91db",
|
|
413
415
|
TBTC: "0x383cb3519e51c62d84ec54e2fca3438c43a83967738b364c20f0f2a662a668d5",
|
|
416
|
+
sbETH: "0xdf6785f0fc35af5621c5a4d6e5056298fe34c3147dca871d8bb0fee6d1d8a536",
|
|
414
417
|
},
|
|
415
418
|
};
|
|
416
419
|
exports.tokenRegistry = {
|
|
@@ -440,5 +443,6 @@ exports.tokenRegistry = {
|
|
|
440
443
|
MBLUB: "0x7c36d8c1b2b569676d9a3f4c73487ec49b483111cc0abf4b0d5654e026ac3d3a",
|
|
441
444
|
xBTC: "0x0701eee55ccf6ec7706e5a9b1c99c0733b49c3958f8f5a3503aea2e192706493",
|
|
442
445
|
TBTC: "0x94c1289dc6b129db6d5efc0ec49bde0e574e6ec34788b2f0fc8948ce5ed7d28a",
|
|
446
|
+
sbETH: "0x7327804456a3ec923ebf4b5bf7095c8217b725918287f504dc087c1ab907c10d",
|
|
443
447
|
},
|
|
444
448
|
};
|
|
@@ -110,3 +110,39 @@ export declare function withdrawCollateralNavi(config: TypusConfig, tx: Transact
|
|
|
110
110
|
naviIncentiveV3: string;
|
|
111
111
|
amount: string | undefined;
|
|
112
112
|
}): void;
|
|
113
|
+
/**
|
|
114
|
+
public entry fun borrow_navi<TOKEN>(
|
|
115
|
+
registry: &mut Registry,
|
|
116
|
+
index: u64,
|
|
117
|
+
deposit_index: u64,
|
|
118
|
+
oracle_config: &mut OracleConfig,
|
|
119
|
+
price_oracle: &mut PriceOracle,
|
|
120
|
+
supra_oracle_holder: &SupraOracle::SupraSValueFeed::OracleHolder,
|
|
121
|
+
pyth_price_info: &pyth::price_info::PriceInfoObject,
|
|
122
|
+
feed_address: address,
|
|
123
|
+
storage: &mut lending_core::storage::Storage,
|
|
124
|
+
pool: &mut lending_core::pool::Pool<TOKEN>,
|
|
125
|
+
asset: u8,
|
|
126
|
+
incentive_v2: &mut lending_core::incentive_v2::Incentive,
|
|
127
|
+
incentive_v3: &mut lending_core::incentive_v3::Incentive,
|
|
128
|
+
amount: u64,
|
|
129
|
+
clock: &Clock,
|
|
130
|
+
ctx: &mut TxContext,
|
|
131
|
+
) {
|
|
132
|
+
*/
|
|
133
|
+
export declare function borrowNavi(config: TypusConfig, tx: Transaction, input: {
|
|
134
|
+
typeArguments: string[];
|
|
135
|
+
index: string;
|
|
136
|
+
deposit_index: string;
|
|
137
|
+
naviOracleConfig: string;
|
|
138
|
+
naviPriceOracle: string;
|
|
139
|
+
naviSupraOracleHolder: string;
|
|
140
|
+
naviPythPriceInfo: string;
|
|
141
|
+
naviFeedAddress: string;
|
|
142
|
+
naviStorage: string;
|
|
143
|
+
naviPool: string;
|
|
144
|
+
naviAsset: number;
|
|
145
|
+
naviIncentiveV2: string;
|
|
146
|
+
naviIncentiveV3: string;
|
|
147
|
+
amount: string;
|
|
148
|
+
}): void;
|
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.getUpdateConfigTx = getUpdateConfigTx;
|
|
40
40
|
exports.depositCollateralNavi = depositCollateralNavi;
|
|
41
41
|
exports.withdrawCollateralNavi = withdrawCollateralNavi;
|
|
42
|
+
exports.borrowNavi = borrowNavi;
|
|
42
43
|
var constants_1 = require("../../src/constants");
|
|
43
44
|
var utils_1 = require("../../src/utils");
|
|
44
45
|
/**
|
|
@@ -177,3 +178,46 @@ function withdrawCollateralNavi(config, tx, input) {
|
|
|
177
178
|
],
|
|
178
179
|
});
|
|
179
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
public entry fun borrow_navi<TOKEN>(
|
|
183
|
+
registry: &mut Registry,
|
|
184
|
+
index: u64,
|
|
185
|
+
deposit_index: u64,
|
|
186
|
+
oracle_config: &mut OracleConfig,
|
|
187
|
+
price_oracle: &mut PriceOracle,
|
|
188
|
+
supra_oracle_holder: &SupraOracle::SupraSValueFeed::OracleHolder,
|
|
189
|
+
pyth_price_info: &pyth::price_info::PriceInfoObject,
|
|
190
|
+
feed_address: address,
|
|
191
|
+
storage: &mut lending_core::storage::Storage,
|
|
192
|
+
pool: &mut lending_core::pool::Pool<TOKEN>,
|
|
193
|
+
asset: u8,
|
|
194
|
+
incentive_v2: &mut lending_core::incentive_v2::Incentive,
|
|
195
|
+
incentive_v3: &mut lending_core::incentive_v3::Incentive,
|
|
196
|
+
amount: u64,
|
|
197
|
+
clock: &Clock,
|
|
198
|
+
ctx: &mut TxContext,
|
|
199
|
+
) {
|
|
200
|
+
*/
|
|
201
|
+
function borrowNavi(config, tx, input) {
|
|
202
|
+
tx.moveCall({
|
|
203
|
+
target: "".concat(config.package.dovSingle, "::tds_authorized_entry::borrow_navi"),
|
|
204
|
+
typeArguments: input.typeArguments,
|
|
205
|
+
arguments: [
|
|
206
|
+
tx.object(config.registry.dov.dovSingle),
|
|
207
|
+
tx.pure.u64(input.index),
|
|
208
|
+
tx.pure.u64(input.deposit_index),
|
|
209
|
+
tx.object(input.naviOracleConfig),
|
|
210
|
+
tx.object(input.naviPriceOracle),
|
|
211
|
+
tx.object(input.naviSupraOracleHolder),
|
|
212
|
+
tx.object(input.naviPythPriceInfo),
|
|
213
|
+
tx.pure.address(input.naviFeedAddress),
|
|
214
|
+
tx.object(input.naviStorage),
|
|
215
|
+
tx.object(input.naviPool),
|
|
216
|
+
tx.pure.u8(input.naviAsset),
|
|
217
|
+
tx.object(input.naviIncentiveV2),
|
|
218
|
+
tx.object(input.naviIncentiveV3),
|
|
219
|
+
tx.pure.u64(input.amount),
|
|
220
|
+
tx.object(constants_1.CLOCK),
|
|
221
|
+
],
|
|
222
|
+
});
|
|
223
|
+
}
|
|
@@ -16,7 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./user-entry"), exports);
|
|
18
18
|
__exportStar(require("./view-function"), exports);
|
|
19
|
-
// export * from "./authority-entry";
|
|
20
|
-
// export * from "./function";
|
|
21
|
-
// export * from "./history";
|
|
22
|
-
// export * from "./token-user-entry";
|
|
@@ -2,13 +2,12 @@ import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions
|
|
|
2
2
|
import { TypusConfig } from "../../src/utils";
|
|
3
3
|
/**
|
|
4
4
|
public fun raise_fund<MAIN_TOKEN, HEDGE_TOKEN>(
|
|
5
|
-
typus_version: &TypusVersion,
|
|
5
|
+
typus_version: &mut TypusVersion,
|
|
6
6
|
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
7
7
|
typus_user_registry: &mut TypusUserRegistry,
|
|
8
8
|
version: &Version,
|
|
9
9
|
registry: &mut Registry,
|
|
10
10
|
index: u64,
|
|
11
|
-
account: Option<address>,
|
|
12
11
|
raise_main_balance: Balance<MAIN_TOKEN>,
|
|
13
12
|
raise_hedge_balance: Balance<HEDGE_TOKEN>,
|
|
14
13
|
raise_from_deactivating: u64,
|
|
@@ -24,8 +23,8 @@ export declare function raiseFund(config: TypusConfig, tx: Transaction, input: {
|
|
|
24
23
|
raiseMainAmount: string;
|
|
25
24
|
raiseHedgeCoins: string[];
|
|
26
25
|
raiseHedgeAmount: string;
|
|
27
|
-
raiseFromDeactivating:
|
|
28
|
-
raiseFromInactive:
|
|
26
|
+
raiseFromDeactivating: string;
|
|
27
|
+
raiseFromInactive: string;
|
|
29
28
|
}): void;
|
|
30
29
|
/**
|
|
31
30
|
public fun reduce_fund<MAIN_TOKEN, HEDGE_TOKEN>(
|
|
@@ -35,7 +34,6 @@ export declare function raiseFund(config: TypusConfig, tx: Transaction, input: {
|
|
|
35
34
|
version: &mut Version,
|
|
36
35
|
registry: &mut Registry,
|
|
37
36
|
index: u64,
|
|
38
|
-
account: Option<address>,
|
|
39
37
|
reduce_from_warmup: u64,
|
|
40
38
|
reduce_from_active: u64,
|
|
41
39
|
reduce_from_inactive: bool,
|
|
@@ -61,7 +59,6 @@ export declare function reduceFund(config: TypusConfig, tx: Transaction, input:
|
|
|
61
59
|
version: &mut Version,
|
|
62
60
|
registry: &mut Registry,
|
|
63
61
|
index: u64,
|
|
64
|
-
account: Option<address>,
|
|
65
62
|
clock: &Clock,
|
|
66
63
|
ctx: &mut TxContext,
|
|
67
64
|
) {
|
|
@@ -19,18 +19,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
exports.raiseFund = raiseFund;
|
|
20
20
|
exports.reduceFund = reduceFund;
|
|
21
21
|
exports.snapshot = snapshot;
|
|
22
|
-
var utils_1 = require("@mysten/sui/dist/cjs/utils");
|
|
23
22
|
var constants_1 = require("../../src/constants");
|
|
24
|
-
var
|
|
23
|
+
var utils_1 = require("../../src/utils");
|
|
25
24
|
/**
|
|
26
25
|
public fun raise_fund<MAIN_TOKEN, HEDGE_TOKEN>(
|
|
27
|
-
typus_version: &TypusVersion,
|
|
26
|
+
typus_version: &mut TypusVersion,
|
|
28
27
|
typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
|
|
29
28
|
typus_user_registry: &mut TypusUserRegistry,
|
|
30
29
|
version: &Version,
|
|
31
30
|
registry: &mut Registry,
|
|
32
31
|
index: u64,
|
|
33
|
-
account: Option<address>,
|
|
34
32
|
raise_main_balance: Balance<MAIN_TOKEN>,
|
|
35
33
|
raise_hedge_balance: Balance<HEDGE_TOKEN>,
|
|
36
34
|
raise_from_deactivating: u64,
|
|
@@ -40,8 +38,8 @@ var utils_2 = require("../../src/utils");
|
|
|
40
38
|
) {
|
|
41
39
|
*/
|
|
42
40
|
function raiseFund(config, tx, input) {
|
|
43
|
-
var mainCoin = (0,
|
|
44
|
-
var hedgeCoin = (0,
|
|
41
|
+
var mainCoin = (0, utils_1.splitCoin)(tx, input.typeArguments[0], input.raiseMainCoins, input.raiseMainAmount, config.sponsored);
|
|
42
|
+
var hedgeCoin = (0, utils_1.splitCoin)(tx, input.typeArguments[1], input.raiseHedgeCoins, input.raiseHedgeAmount, config.sponsored);
|
|
45
43
|
var mainBalance = tx.moveCall({
|
|
46
44
|
target: "0x2::coin::into_balance",
|
|
47
45
|
typeArguments: [input.typeArguments[0]],
|
|
@@ -60,13 +58,12 @@ function raiseFund(config, tx, input) {
|
|
|
60
58
|
tx.object(config.registry.typus.leaderboard),
|
|
61
59
|
tx.object(config.registry.typus.user),
|
|
62
60
|
tx.object(config.version.hedge.hedge),
|
|
63
|
-
tx.object(config.registry.hedge),
|
|
61
|
+
tx.object(config.registry.hedge.hedge),
|
|
64
62
|
tx.pure.u64(input.index),
|
|
65
|
-
tx.pure.option("address", null),
|
|
66
63
|
tx.object(mainBalance),
|
|
67
64
|
tx.object(hedgeBalance),
|
|
68
|
-
tx.pure.
|
|
69
|
-
tx.pure.
|
|
65
|
+
tx.pure.u64(input.raiseFromDeactivating),
|
|
66
|
+
tx.pure.u64(input.raiseFromInactive),
|
|
70
67
|
tx.object(constants_1.CLOCK),
|
|
71
68
|
],
|
|
72
69
|
});
|
|
@@ -79,7 +76,6 @@ function raiseFund(config, tx, input) {
|
|
|
79
76
|
version: &mut Version,
|
|
80
77
|
registry: &mut Registry,
|
|
81
78
|
index: u64,
|
|
82
|
-
account: Option<address>,
|
|
83
79
|
reduce_from_warmup: u64,
|
|
84
80
|
reduce_from_active: u64,
|
|
85
81
|
reduce_from_inactive: bool,
|
|
@@ -92,7 +88,7 @@ function reduceFund(config, tx, input) {
|
|
|
92
88
|
var _a = __read(tx.splitCoins(tx.gas, [tx.pure.u64(input.feeAmount)]), 1), feeCoin = _a[0];
|
|
93
89
|
var feeBalance = tx.moveCall({
|
|
94
90
|
target: "0x2::coin::into_balance",
|
|
95
|
-
typeArguments: [
|
|
91
|
+
typeArguments: [constants_1.tokenType["MAINNET"].SUI],
|
|
96
92
|
arguments: [tx.object(feeCoin)],
|
|
97
93
|
});
|
|
98
94
|
var result = tx.moveCall({
|
|
@@ -103,9 +99,8 @@ function reduceFund(config, tx, input) {
|
|
|
103
99
|
tx.object(config.registry.typus.leaderboard),
|
|
104
100
|
tx.object(config.registry.typus.user),
|
|
105
101
|
tx.object(config.version.hedge.hedge),
|
|
106
|
-
tx.object(config.registry.hedge),
|
|
102
|
+
tx.object(config.registry.hedge.hedge),
|
|
107
103
|
tx.pure.u64(input.index),
|
|
108
|
-
tx.pure.option("address", null),
|
|
109
104
|
tx.pure.u64(input.reduceFromWarmup),
|
|
110
105
|
tx.pure.u64(input.reduceFromActive),
|
|
111
106
|
tx.pure.bool(input.reduceFromInactive),
|
|
@@ -132,7 +127,6 @@ function reduceFund(config, tx, input) {
|
|
|
132
127
|
version: &mut Version,
|
|
133
128
|
registry: &mut Registry,
|
|
134
129
|
index: u64,
|
|
135
|
-
account: Option<address>,
|
|
136
130
|
clock: &Clock,
|
|
137
131
|
ctx: &mut TxContext,
|
|
138
132
|
) {
|
|
@@ -146,9 +140,8 @@ function snapshot(config, tx, input) {
|
|
|
146
140
|
tx.object(config.registry.typus.leaderboard),
|
|
147
141
|
tx.object(config.registry.typus.user),
|
|
148
142
|
tx.object(config.version.hedge.hedge),
|
|
149
|
-
tx.object(config.registry.hedge),
|
|
143
|
+
tx.object(config.registry.hedge.hedge),
|
|
150
144
|
tx.pure.u64(input.index),
|
|
151
|
-
tx.pure.option("address", null),
|
|
152
145
|
tx.object(constants_1.CLOCK),
|
|
153
146
|
],
|
|
154
147
|
});
|
|
@@ -54,7 +54,7 @@ function getVaultData(config, input) {
|
|
|
54
54
|
transaction.moveCall({
|
|
55
55
|
target: "".concat(config.package.hedge.hedge, "::view_function::get_vault_data_bcs"),
|
|
56
56
|
typeArguments: [],
|
|
57
|
-
arguments: [transaction.object(config.registry.hedge), transaction.pure.vector("u64", input.indexes)],
|
|
57
|
+
arguments: [transaction.object(config.registry.hedge.hedge), transaction.pure.vector("u64", input.indexes)],
|
|
58
58
|
});
|
|
59
59
|
return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transaction, sender: constants_1.SENDER })];
|
|
60
60
|
case 1:
|
|
@@ -76,13 +76,13 @@ function getVaultData(config, input) {
|
|
|
76
76
|
});
|
|
77
77
|
var config = new Map();
|
|
78
78
|
reader.readVec(function (reader) {
|
|
79
|
-
config.set(String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))), reader.read64());
|
|
79
|
+
config = config.set(String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))), reader.read64());
|
|
80
80
|
});
|
|
81
81
|
var mainTokenShare = {
|
|
82
82
|
id: (0, utils_1.AddressFromBytes)(reader.readBytes(32)),
|
|
83
83
|
keyType: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))),
|
|
84
84
|
valueType: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))),
|
|
85
|
-
sliceIdx: reader.
|
|
85
|
+
sliceIdx: reader.read16(), // slice_idx
|
|
86
86
|
sliceSize: reader.read32(), // slice_size
|
|
87
87
|
length: reader.read64(), // length
|
|
88
88
|
};
|
|
@@ -93,7 +93,7 @@ function getVaultData(config, input) {
|
|
|
93
93
|
id: (0, utils_1.AddressFromBytes)(reader.readBytes(32)),
|
|
94
94
|
keyType: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))),
|
|
95
95
|
valueType: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))),
|
|
96
|
-
sliceIdx: reader.
|
|
96
|
+
sliceIdx: reader.read16(), // slice_idx
|
|
97
97
|
sliceSize: reader.read32(), // slice_size
|
|
98
98
|
length: reader.read64(), // length
|
|
99
99
|
};
|
|
@@ -104,7 +104,7 @@ function getVaultData(config, input) {
|
|
|
104
104
|
id: (0, utils_1.AddressFromBytes)(reader.readBytes(32)),
|
|
105
105
|
keyType: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))),
|
|
106
106
|
valueType: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.readULEB()))),
|
|
107
|
-
sliceIdx: reader.
|
|
107
|
+
sliceIdx: reader.read16(), // slice_idx
|
|
108
108
|
sliceSize: reader.read32(), // slice_size
|
|
109
109
|
length: reader.read64(), // length
|
|
110
110
|
};
|
|
@@ -121,7 +121,7 @@ function getVaultData(config, input) {
|
|
|
121
121
|
return reader.read8();
|
|
122
122
|
}));
|
|
123
123
|
});
|
|
124
|
-
result[info
|
|
124
|
+
result[info.get("index")] = [
|
|
125
125
|
{
|
|
126
126
|
id: id,
|
|
127
127
|
mainToken: mainToken,
|
|
@@ -157,12 +157,12 @@ function getShareData(config, input) {
|
|
|
157
157
|
target: "".concat(config.package.hedge.hedge, "::view_function::get_user_share_data_bcs"),
|
|
158
158
|
typeArguments: [],
|
|
159
159
|
arguments: [
|
|
160
|
-
transaction.object(config.
|
|
161
|
-
transaction.
|
|
160
|
+
transaction.object(config.version.typus),
|
|
161
|
+
transaction.object(config.registry.hedge.hedge),
|
|
162
162
|
transaction.pure.vector("u64", input.indexes),
|
|
163
163
|
],
|
|
164
164
|
});
|
|
165
|
-
return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transaction, sender:
|
|
165
|
+
return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transaction, sender: input.user })];
|
|
166
166
|
case 1:
|
|
167
167
|
results = (_a.sent()).results;
|
|
168
168
|
bytes = results[results.length - 1].returnValues[0][0];
|
|
@@ -10,6 +10,7 @@ exports.priceIDs = {
|
|
|
10
10
|
USDC: "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
|
|
11
11
|
WBTC: "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
|
|
12
12
|
wETH: "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
|
|
13
|
+
sbETH: "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
|
|
13
14
|
wSOL: "0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
|
|
14
15
|
TURBOS: "0xf9c2e890443dd995d0baafc08eea3358be1ffb874f93f99c30b3816c460bbac3",
|
|
15
16
|
wAPT: "0x03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5",
|
|
@@ -50,6 +51,7 @@ exports.priceIDs = {
|
|
|
50
51
|
wUSDC: "0x41f3625971ca2ed2263e78573fe5ce23e13d2558ed3f2e47ab0f84fb9e7ae722", // USDC/USD price ID
|
|
51
52
|
WBTC: "0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b",
|
|
52
53
|
wETH: "0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6",
|
|
54
|
+
sbETH: "0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6",
|
|
53
55
|
wSOL: "0xfe650f0367d4a7ef9815a593ea15d36593f0643aaaf0149bb04be67ab851decd",
|
|
54
56
|
TURBOS: "0x3f545e3f4ec9fd8eb3b9d9d6071a1da361f6729fa1b93d1d1baca3379551d99e",
|
|
55
57
|
wAPT: "0x44a93dddd8effa54ea51076c4e851b6cbbfd938e82eb90197de38fe8876bb66e",
|
|
@@ -86,6 +88,7 @@ exports.priceInfoObjectIds = {
|
|
|
86
88
|
wUSDT: "0x985e3db9f93f76ee8bace7c3dd5cc676a096accd5d9e09e9ae0fb6e492b14572",
|
|
87
89
|
WBTC: "0x9a62b4863bdeaabdc9500fce769cf7e72d5585eeb28a6d26e4cafadc13f76ab2",
|
|
88
90
|
wETH: "0x9193fd47f9a0ab99b6e365a464c8a9ae30e6150fc37ed2a89c1586631f6fc4ab",
|
|
91
|
+
sbETH: "0x9193fd47f9a0ab99b6e365a464c8a9ae30e6150fc37ed2a89c1586631f6fc4ab",
|
|
89
92
|
wSOL: "0x9d0d275efbd37d8a8855f6f2c761fa5983293dd8ce202ee5196626de8fcd4469",
|
|
90
93
|
wAPT: "0x7c5b7837c44a69b469325463ac0673ac1aa8435ff44ddb4191c9ae380463647f",
|
|
91
94
|
CETUS: "0x24c0247fb22457a719efac7f670cdc79be321b521460bd6bd2ccfa9f80713b14",
|
|
@@ -116,6 +119,7 @@ exports.priceInfoObjectIds = {
|
|
|
116
119
|
wUSDC: "0x9c4dd4008297ffa5e480684b8100ec21cc934405ed9a25d4e4d7b6259aad9c81",
|
|
117
120
|
WBTC: "0x72431a238277695d3f31e4425225a4462674ee6cceeea9d66447b210755fffba",
|
|
118
121
|
wETH: "0x4fde30cb8a5dc3cfee1c1c358fc66dc308408827efb217247c7ba54d76ccbee9",
|
|
122
|
+
sbETH: "0x4fde30cb8a5dc3cfee1c1c358fc66dc308408827efb217247c7ba54d76ccbee9",
|
|
119
123
|
wSOL: "0x33fbce1cad5ca155f2f5051430b23a694bc6e5de6df43e0f8aefe29f4a84336d",
|
|
120
124
|
TURBOS: "0xfe38289883c3afed692e5856f4896b3e094d4793e2ccf0a2715b890a718fa5c0",
|
|
121
125
|
wAPT: "0x9eeb8cb349d8e89fa9e6c94a97d6d30096f5b3c16bd50d9de96608f67a278c18",
|