@typus/typus-perp-sdk 1.0.29 → 1.0.31
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/fetch.d.ts +3 -0
- package/dist/src/fetch.js +3 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +52 -12
- package/dist/src/typus_perp/admin/functions.d.ts +25 -25
- package/dist/src/typus_perp/admin/functions.js +66 -53
- package/dist/src/typus_perp/admin/structs.d.ts +222 -222
- package/dist/src/typus_perp/admin/structs.js +256 -256
- package/dist/src/typus_perp/error/functions.d.ts +67 -67
- package/dist/src/typus_perp/error/functions.js +201 -134
- package/dist/src/typus_perp/escrow/functions.d.ts +3 -3
- package/dist/src/typus_perp/escrow/functions.js +9 -6
- package/dist/src/typus_perp/index.d.ts +1 -3
- package/dist/src/typus_perp/index.js +3 -3
- package/dist/src/typus_perp/lending/functions.d.ts +15 -0
- package/dist/src/typus_perp/lending/functions.js +22 -0
- package/dist/src/typus_perp/lp-pool/functions.d.ts +102 -63
- package/dist/src/typus_perp/lp-pool/functions.js +243 -123
- package/dist/src/typus_perp/lp-pool/structs.d.ts +661 -337
- package/dist/src/typus_perp/lp-pool/structs.js +1212 -766
- package/dist/src/typus_perp/math/functions.d.ts +16 -5
- package/dist/src/typus_perp/math/functions.js +33 -12
- package/dist/src/typus_perp/position/functions.d.ts +86 -86
- package/dist/src/typus_perp/position/functions.js +223 -157
- package/dist/src/typus_perp/symbol/functions.d.ts +4 -4
- package/dist/src/typus_perp/symbol/functions.js +14 -10
- package/dist/src/typus_perp/tlp/functions.d.ts +5 -5
- package/dist/src/typus_perp/tlp/functions.js +17 -12
- package/dist/src/typus_perp/token-interface/functions.d.ts +2 -2
- package/dist/src/typus_perp/token-interface/functions.js +6 -4
- package/dist/src/typus_perp/trading/functions.d.ts +75 -75
- package/dist/src/typus_perp/trading/functions.js +189 -138
- package/dist/src/typus_perp/trading/structs.d.ts +6 -0
- package/dist/src/typus_perp/trading/structs.js +6 -0
- package/dist/src/typus_perp/treasury-caps/functions.d.ts +4 -4
- package/dist/src/typus_perp/treasury-caps/functions.js +14 -10
- package/dist/src/typus_stake_pool/index.d.ts +1 -3
- package/dist/src/typus_stake_pool/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.splitBidReceipt = splitBidReceipt;
|
|
4
|
-
exports.orderFilled = orderFilled;
|
|
5
3
|
exports.addPositionLinkedOrderInfo = addPositionLinkedOrderInfo;
|
|
6
4
|
exports.calculateFilled_ = calculateFilled_;
|
|
7
5
|
exports.calculateIntrinsicValue = calculateIntrinsicValue;
|
|
@@ -56,6 +54,7 @@ exports.isOptionCollateralPosition = isOptionCollateralPosition;
|
|
|
56
54
|
exports.managerCreateReduceOnlyOrder = managerCreateReduceOnlyOrder;
|
|
57
55
|
exports.maxReleasingCollateralAmount = maxReleasingCollateralAmount;
|
|
58
56
|
exports.optionPositionBidReceiptsExpired = optionPositionBidReceiptsExpired;
|
|
57
|
+
exports.orderFilled = orderFilled;
|
|
59
58
|
exports.orderFilledWithBidReceiptsCollateral = orderFilledWithBidReceiptsCollateral;
|
|
60
59
|
exports.realizeFunding = realizeFunding;
|
|
61
60
|
exports.releaseCollateral = releaseCollateral;
|
|
@@ -64,6 +63,7 @@ exports.removeOrderWithBidReceipts = removeOrderWithBidReceipts;
|
|
|
64
63
|
exports.removePosition = removePosition;
|
|
65
64
|
exports.removePositionLinkedOrderInfo = removePositionLinkedOrderInfo;
|
|
66
65
|
exports.removePositionWithBidReceipts = removePositionWithBidReceipts;
|
|
66
|
+
exports.splitBidReceipt = splitBidReceipt;
|
|
67
67
|
exports.updateOptionPositionCollateralAmount = updateOptionPositionCollateralAmount;
|
|
68
68
|
exports.updatePositionBorrowRateAndFundingRate = updatePositionBorrowRateAndFundingRate;
|
|
69
69
|
var __1 = require("..");
|
|
@@ -71,42 +71,17 @@ var structs_1 = require("../../_dependencies/source/0x1/option/structs");
|
|
|
71
71
|
var structs_2 = require("../../_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs");
|
|
72
72
|
var util_1 = require("../../_framework/util");
|
|
73
73
|
var structs_3 = require("./structs");
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
target: "".concat(__1.PUBLISHED_AT, "::position::split_bid_receipt"),
|
|
77
|
-
arguments: [(0, util_1.obj)(tx, args.dovRegistry), (0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.size, "u64")],
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function orderFilled(tx, typeArg, args) {
|
|
81
|
-
return tx.moveCall({
|
|
82
|
-
target: "".concat(__1.PUBLISHED_AT, "::position::order_filled"),
|
|
83
|
-
typeArguments: [typeArg],
|
|
84
|
-
arguments: [
|
|
85
|
-
(0, util_1.obj)(tx, args.version),
|
|
86
|
-
(0, util_1.obj)(tx, args.order),
|
|
87
|
-
(0, util_1.option)(tx, "".concat(structs_3.Position.$typeName), args.originalPosition),
|
|
88
|
-
(0, util_1.pure)(tx, args.nextPositionId, "u64"),
|
|
89
|
-
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
90
|
-
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
91
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
92
|
-
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
93
|
-
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
94
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
95
|
-
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
96
|
-
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
97
|
-
(0, util_1.obj)(tx, args.clock),
|
|
98
|
-
],
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function addPositionLinkedOrderInfo(tx, args) {
|
|
74
|
+
function addPositionLinkedOrderInfo(tx, args, published_at) {
|
|
75
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
102
76
|
return tx.moveCall({
|
|
103
|
-
target: "".concat(
|
|
77
|
+
target: "".concat(published_at, "::position::add_position_linked_order_info"),
|
|
104
78
|
arguments: [(0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.linkedOrderId, "u64"), (0, util_1.pure)(tx, args.linkedOrderPrice, "u64")],
|
|
105
79
|
});
|
|
106
80
|
}
|
|
107
|
-
function calculateFilled_(tx, args) {
|
|
81
|
+
function calculateFilled_(tx, args, published_at) {
|
|
82
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
108
83
|
return tx.moveCall({
|
|
109
|
-
target: "".concat(
|
|
84
|
+
target: "".concat(published_at, "::position::calculate_filled_"),
|
|
110
85
|
arguments: [
|
|
111
86
|
(0, util_1.obj)(tx, args.position),
|
|
112
87
|
(0, util_1.pure)(tx, args.reduceOnly, "bool"),
|
|
@@ -117,9 +92,10 @@ function calculateFilled_(tx, args) {
|
|
|
117
92
|
],
|
|
118
93
|
});
|
|
119
94
|
}
|
|
120
|
-
function calculateIntrinsicValue(tx, typeArg, args) {
|
|
95
|
+
function calculateIntrinsicValue(tx, typeArg, args, published_at) {
|
|
96
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
121
97
|
return tx.moveCall({
|
|
122
|
-
target: "".concat(
|
|
98
|
+
target: "".concat(published_at, "::position::calculate_intrinsic_value"),
|
|
123
99
|
typeArguments: [typeArg],
|
|
124
100
|
arguments: [
|
|
125
101
|
(0, util_1.obj)(tx, args.dovRegistry),
|
|
@@ -130,9 +106,10 @@ function calculateIntrinsicValue(tx, typeArg, args) {
|
|
|
130
106
|
],
|
|
131
107
|
});
|
|
132
108
|
}
|
|
133
|
-
function calculatePositionFundingRate(tx, args) {
|
|
109
|
+
function calculatePositionFundingRate(tx, args, published_at) {
|
|
110
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
134
111
|
return tx.moveCall({
|
|
135
|
-
target: "".concat(
|
|
112
|
+
target: "".concat(published_at, "::position::calculate_position_funding_rate"),
|
|
136
113
|
arguments: [
|
|
137
114
|
(0, util_1.obj)(tx, args.position),
|
|
138
115
|
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
@@ -144,9 +121,10 @@ function calculatePositionFundingRate(tx, args) {
|
|
|
144
121
|
],
|
|
145
122
|
});
|
|
146
123
|
}
|
|
147
|
-
function calculateRealizedPnlUsd(tx, args) {
|
|
124
|
+
function calculateRealizedPnlUsd(tx, args, published_at) {
|
|
125
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
148
126
|
return tx.moveCall({
|
|
149
|
-
target: "".concat(
|
|
127
|
+
target: "".concat(published_at, "::position::calculate_realized_pnl_usd"),
|
|
150
128
|
arguments: [
|
|
151
129
|
(0, util_1.pure)(tx, args.side, "bool"),
|
|
152
130
|
(0, util_1.pure)(tx, args.size, "u64"),
|
|
@@ -157,9 +135,10 @@ function calculateRealizedPnlUsd(tx, args) {
|
|
|
157
135
|
],
|
|
158
136
|
});
|
|
159
137
|
}
|
|
160
|
-
function calculateTradingFee(tx, args) {
|
|
138
|
+
function calculateTradingFee(tx, args, published_at) {
|
|
139
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
161
140
|
return tx.moveCall({
|
|
162
|
-
target: "".concat(
|
|
141
|
+
target: "".concat(published_at, "::position::calculate_trading_fee"),
|
|
163
142
|
arguments: [
|
|
164
143
|
(0, util_1.pure)(tx, args.size, "u64"),
|
|
165
144
|
(0, util_1.pure)(tx, args.sizeDecimal, "u64"),
|
|
@@ -172,12 +151,14 @@ function calculateTradingFee(tx, args) {
|
|
|
172
151
|
],
|
|
173
152
|
});
|
|
174
153
|
}
|
|
175
|
-
function calculateUnrealizedCost(tx, position) {
|
|
176
|
-
|
|
154
|
+
function calculateUnrealizedCost(tx, position, published_at) {
|
|
155
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
156
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::calculate_unrealized_cost"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
177
157
|
}
|
|
178
|
-
function calculateUnrealizedPnl(tx, args) {
|
|
158
|
+
function calculateUnrealizedPnl(tx, args, published_at) {
|
|
159
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
179
160
|
return tx.moveCall({
|
|
180
|
-
target: "".concat(
|
|
161
|
+
target: "".concat(published_at, "::position::calculate_unrealized_pnl"),
|
|
181
162
|
arguments: [
|
|
182
163
|
(0, util_1.obj)(tx, args.position),
|
|
183
164
|
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
@@ -186,9 +167,10 @@ function calculateUnrealizedPnl(tx, args) {
|
|
|
186
167
|
],
|
|
187
168
|
});
|
|
188
169
|
}
|
|
189
|
-
function checkOptionCollateralPositionLiquidated(tx, typeArg, args) {
|
|
170
|
+
function checkOptionCollateralPositionLiquidated(tx, typeArg, args, published_at) {
|
|
171
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
190
172
|
return tx.moveCall({
|
|
191
|
-
target: "".concat(
|
|
173
|
+
target: "".concat(published_at, "::position::check_option_collateral_position_liquidated"),
|
|
192
174
|
typeArguments: [typeArg],
|
|
193
175
|
arguments: [
|
|
194
176
|
(0, util_1.obj)(tx, args.dovRegistry),
|
|
@@ -206,15 +188,17 @@ function checkOptionCollateralPositionLiquidated(tx, typeArg, args) {
|
|
|
206
188
|
],
|
|
207
189
|
});
|
|
208
190
|
}
|
|
209
|
-
function checkOrderFilled(tx, args) {
|
|
191
|
+
function checkOrderFilled(tx, args, published_at) {
|
|
192
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
210
193
|
return tx.moveCall({
|
|
211
|
-
target: "".concat(
|
|
194
|
+
target: "".concat(published_at, "::position::check_order_filled"),
|
|
212
195
|
arguments: [(0, util_1.obj)(tx, args.order), (0, util_1.pure)(tx, args.oraclePrice, "u64")],
|
|
213
196
|
});
|
|
214
197
|
}
|
|
215
|
-
function checkPositionLiquidated(tx, args) {
|
|
198
|
+
function checkPositionLiquidated(tx, args, published_at) {
|
|
199
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
216
200
|
return tx.moveCall({
|
|
217
|
-
target: "".concat(
|
|
201
|
+
target: "".concat(published_at, "::position::check_position_liquidated"),
|
|
218
202
|
arguments: [
|
|
219
203
|
(0, util_1.obj)(tx, args.position),
|
|
220
204
|
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
@@ -229,9 +213,10 @@ function checkPositionLiquidated(tx, args) {
|
|
|
229
213
|
],
|
|
230
214
|
});
|
|
231
215
|
}
|
|
232
|
-
function collateralWithPnl(tx, args) {
|
|
216
|
+
function collateralWithPnl(tx, args, published_at) {
|
|
217
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
233
218
|
return tx.moveCall({
|
|
234
|
-
target: "".concat(
|
|
219
|
+
target: "".concat(published_at, "::position::collateral_with_pnl"),
|
|
235
220
|
arguments: [
|
|
236
221
|
(0, util_1.obj)(tx, args.position),
|
|
237
222
|
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
@@ -242,9 +227,10 @@ function collateralWithPnl(tx, args) {
|
|
|
242
227
|
],
|
|
243
228
|
});
|
|
244
229
|
}
|
|
245
|
-
function createOrder(tx, typeArg, args) {
|
|
230
|
+
function createOrder(tx, typeArg, args, published_at) {
|
|
231
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
246
232
|
return tx.moveCall({
|
|
247
|
-
target: "".concat(
|
|
233
|
+
target: "".concat(published_at, "::position::create_order"),
|
|
248
234
|
typeArguments: [typeArg],
|
|
249
235
|
arguments: [
|
|
250
236
|
(0, util_1.obj)(tx, args.version),
|
|
@@ -265,9 +251,10 @@ function createOrder(tx, typeArg, args) {
|
|
|
265
251
|
],
|
|
266
252
|
});
|
|
267
253
|
}
|
|
268
|
-
function createOrderWithBidReceipts(tx, args) {
|
|
254
|
+
function createOrderWithBidReceipts(tx, args, published_at) {
|
|
255
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
269
256
|
return tx.moveCall({
|
|
270
|
-
target: "".concat(
|
|
257
|
+
target: "".concat(published_at, "::position::create_order_with_bid_receipts"),
|
|
271
258
|
arguments: [
|
|
272
259
|
(0, util_1.obj)(tx, args.version),
|
|
273
260
|
(0, util_1.obj)(tx, args.symbol),
|
|
@@ -290,9 +277,10 @@ function createOrderWithBidReceipts(tx, args) {
|
|
|
290
277
|
],
|
|
291
278
|
});
|
|
292
279
|
}
|
|
293
|
-
function emitRealizedFundingEvent(tx, args) {
|
|
280
|
+
function emitRealizedFundingEvent(tx, args, published_at) {
|
|
281
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
294
282
|
return tx.moveCall({
|
|
295
|
-
target: "".concat(
|
|
283
|
+
target: "".concat(published_at, "::position::emit_realized_funding_event"),
|
|
296
284
|
arguments: [
|
|
297
285
|
(0, util_1.pure)(tx, args.user, "address"),
|
|
298
286
|
(0, util_1.obj)(tx, args.collateralToken),
|
|
@@ -305,9 +293,10 @@ function emitRealizedFundingEvent(tx, args) {
|
|
|
305
293
|
],
|
|
306
294
|
});
|
|
307
295
|
}
|
|
308
|
-
function getEstimatedLiquidationPrice(tx, args) {
|
|
296
|
+
function getEstimatedLiquidationPrice(tx, args, published_at) {
|
|
297
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
309
298
|
return tx.moveCall({
|
|
310
|
-
target: "".concat(
|
|
299
|
+
target: "".concat(published_at, "::position::get_estimated_liquidation_price"),
|
|
311
300
|
arguments: [
|
|
312
301
|
(0, util_1.obj)(tx, args.position),
|
|
313
302
|
(0, util_1.pure)(tx, args.isSameToken, "bool"),
|
|
@@ -319,12 +308,14 @@ function getEstimatedLiquidationPrice(tx, args) {
|
|
|
319
308
|
],
|
|
320
309
|
});
|
|
321
310
|
}
|
|
322
|
-
function getMaxOrderTypeTag(tx) {
|
|
323
|
-
|
|
311
|
+
function getMaxOrderTypeTag(tx, published_at) {
|
|
312
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
313
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_max_order_type_tag"), arguments: [] });
|
|
324
314
|
}
|
|
325
|
-
function getOptionCollateralOrderCollateralAmount(tx, typeArg, args) {
|
|
315
|
+
function getOptionCollateralOrderCollateralAmount(tx, typeArg, args, published_at) {
|
|
316
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
326
317
|
return tx.moveCall({
|
|
327
|
-
target: "".concat(
|
|
318
|
+
target: "".concat(published_at, "::position::get_option_collateral_order_collateral_amount"),
|
|
328
319
|
typeArguments: [typeArg],
|
|
329
320
|
arguments: [
|
|
330
321
|
(0, util_1.obj)(tx, args.dovRegistry),
|
|
@@ -335,9 +326,10 @@ function getOptionCollateralOrderCollateralAmount(tx, typeArg, args) {
|
|
|
335
326
|
],
|
|
336
327
|
});
|
|
337
328
|
}
|
|
338
|
-
function getOptionPositionCollateralAmount(tx, typeArg, args) {
|
|
329
|
+
function getOptionPositionCollateralAmount(tx, typeArg, args, published_at) {
|
|
330
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
339
331
|
return tx.moveCall({
|
|
340
|
-
target: "".concat(
|
|
332
|
+
target: "".concat(published_at, "::position::get_option_position_collateral_amount"),
|
|
341
333
|
typeArguments: [typeArg],
|
|
342
334
|
arguments: [
|
|
343
335
|
(0, util_1.obj)(tx, args.dovRegistry),
|
|
@@ -348,9 +340,10 @@ function getOptionPositionCollateralAmount(tx, typeArg, args) {
|
|
|
348
340
|
],
|
|
349
341
|
});
|
|
350
342
|
}
|
|
351
|
-
function getOptionPositionExerciseValue(tx, typeArg, args) {
|
|
343
|
+
function getOptionPositionExerciseValue(tx, typeArg, args, published_at) {
|
|
344
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
352
345
|
return tx.moveCall({
|
|
353
|
-
target: "".concat(
|
|
346
|
+
target: "".concat(published_at, "::position::get_option_position_exercise_value"),
|
|
354
347
|
typeArguments: [typeArg],
|
|
355
348
|
arguments: [
|
|
356
349
|
(0, util_1.obj)(tx, args.dovRegistry),
|
|
@@ -361,25 +354,30 @@ function getOptionPositionExerciseValue(tx, typeArg, args) {
|
|
|
361
354
|
],
|
|
362
355
|
});
|
|
363
356
|
}
|
|
364
|
-
function getOptionPositionPortfolioIndex(tx, position) {
|
|
365
|
-
|
|
357
|
+
function getOptionPositionPortfolioIndex(tx, position, published_at) {
|
|
358
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
359
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_option_position_portfolio_index"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
366
360
|
}
|
|
367
|
-
function getOrderCollateralAmount(tx, typeArg, order) {
|
|
361
|
+
function getOrderCollateralAmount(tx, typeArg, order, published_at) {
|
|
362
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
368
363
|
return tx.moveCall({
|
|
369
|
-
target: "".concat(
|
|
364
|
+
target: "".concat(published_at, "::position::get_order_collateral_amount"),
|
|
370
365
|
typeArguments: [typeArg],
|
|
371
366
|
arguments: [(0, util_1.obj)(tx, order)],
|
|
372
367
|
});
|
|
373
368
|
}
|
|
374
|
-
function getOrderCollateralToken(tx, order) {
|
|
375
|
-
|
|
369
|
+
function getOrderCollateralToken(tx, order, published_at) {
|
|
370
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
371
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_collateral_token"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
376
372
|
}
|
|
377
|
-
function getOrderCollateralTokenDecimal(tx, order) {
|
|
378
|
-
|
|
373
|
+
function getOrderCollateralTokenDecimal(tx, order, published_at) {
|
|
374
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
375
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_collateral_token_decimal"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
379
376
|
}
|
|
380
|
-
function getOrderFilledFee(tx, args) {
|
|
377
|
+
function getOrderFilledFee(tx, args, published_at) {
|
|
378
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
381
379
|
return tx.moveCall({
|
|
382
|
-
target: "".concat(
|
|
380
|
+
target: "".concat(published_at, "::position::get_order_filled_fee"),
|
|
383
381
|
arguments: [
|
|
384
382
|
(0, util_1.obj)(tx, args.order),
|
|
385
383
|
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
@@ -390,82 +388,106 @@ function getOrderFilledFee(tx, args) {
|
|
|
390
388
|
],
|
|
391
389
|
});
|
|
392
390
|
}
|
|
393
|
-
function getOrderId(tx, order) {
|
|
394
|
-
|
|
391
|
+
function getOrderId(tx, order, published_at) {
|
|
392
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
393
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_id"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
395
394
|
}
|
|
396
|
-
function getOrderLinkedPositionId(tx, order) {
|
|
397
|
-
|
|
395
|
+
function getOrderLinkedPositionId(tx, order, published_at) {
|
|
396
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
397
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_linked_position_id"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
398
398
|
}
|
|
399
|
-
function getOrderPortfolioIndex(tx, order) {
|
|
400
|
-
|
|
399
|
+
function getOrderPortfolioIndex(tx, order, published_at) {
|
|
400
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
401
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_portfolio_index"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
401
402
|
}
|
|
402
|
-
function getOrderPrice(tx, order) {
|
|
403
|
-
|
|
403
|
+
function getOrderPrice(tx, order, published_at) {
|
|
404
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
405
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_price"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
404
406
|
}
|
|
405
|
-
function getOrderReduceOnly(tx, order) {
|
|
406
|
-
|
|
407
|
+
function getOrderReduceOnly(tx, order, published_at) {
|
|
408
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
409
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_reduce_only"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
407
410
|
}
|
|
408
|
-
function getOrderSide(tx, order) {
|
|
409
|
-
|
|
411
|
+
function getOrderSide(tx, order, published_at) {
|
|
412
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
413
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_side"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
410
414
|
}
|
|
411
|
-
function getOrderSize(tx, order) {
|
|
412
|
-
|
|
415
|
+
function getOrderSize(tx, order, published_at) {
|
|
416
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
417
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_size"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
413
418
|
}
|
|
414
|
-
function getOrderTradingSymbol(tx, order) {
|
|
415
|
-
|
|
419
|
+
function getOrderTradingSymbol(tx, order, published_at) {
|
|
420
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
421
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_trading_symbol"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
416
422
|
}
|
|
417
|
-
function getOrderTypeTag(tx, order) {
|
|
418
|
-
|
|
423
|
+
function getOrderTypeTag(tx, order, published_at) {
|
|
424
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
425
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_type_tag"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
419
426
|
}
|
|
420
|
-
function getOrderUser(tx, order) {
|
|
421
|
-
|
|
427
|
+
function getOrderUser(tx, order, published_at) {
|
|
428
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
429
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_order_user"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
422
430
|
}
|
|
423
|
-
function getPositionCollateralAmount(tx, typeArg, position) {
|
|
431
|
+
function getPositionCollateralAmount(tx, typeArg, position, published_at) {
|
|
432
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
424
433
|
return tx.moveCall({
|
|
425
|
-
target: "".concat(
|
|
434
|
+
target: "".concat(published_at, "::position::get_position_collateral_amount"),
|
|
426
435
|
typeArguments: [typeArg],
|
|
427
436
|
arguments: [(0, util_1.obj)(tx, position)],
|
|
428
437
|
});
|
|
429
438
|
}
|
|
430
|
-
function getPositionCollateralTokenDecimal(tx, position) {
|
|
431
|
-
|
|
439
|
+
function getPositionCollateralTokenDecimal(tx, position, published_at) {
|
|
440
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
441
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_collateral_token_decimal"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
432
442
|
}
|
|
433
|
-
function getPositionCollateralTokenType(tx, position) {
|
|
434
|
-
|
|
443
|
+
function getPositionCollateralTokenType(tx, position, published_at) {
|
|
444
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
445
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_collateral_token_type"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
435
446
|
}
|
|
436
|
-
function getPositionId(tx, position) {
|
|
437
|
-
|
|
447
|
+
function getPositionId(tx, position, published_at) {
|
|
448
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
449
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_id"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
438
450
|
}
|
|
439
|
-
function getPositionLinkedOrderIds(tx, position) {
|
|
440
|
-
|
|
451
|
+
function getPositionLinkedOrderIds(tx, position, published_at) {
|
|
452
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
453
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_linked_order_ids"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
441
454
|
}
|
|
442
|
-
function getPositionOptionCollateralInfo(tx, position) {
|
|
443
|
-
|
|
455
|
+
function getPositionOptionCollateralInfo(tx, position, published_at) {
|
|
456
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
457
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_option_collateral_info"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
444
458
|
}
|
|
445
|
-
function getPositionSide(tx, position) {
|
|
446
|
-
|
|
459
|
+
function getPositionSide(tx, position, published_at) {
|
|
460
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
461
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_side"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
447
462
|
}
|
|
448
|
-
function getPositionSize(tx, position) {
|
|
449
|
-
|
|
463
|
+
function getPositionSize(tx, position, published_at) {
|
|
464
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
465
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_size"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
450
466
|
}
|
|
451
|
-
function getPositionSizeDecimal(tx, position) {
|
|
452
|
-
|
|
467
|
+
function getPositionSizeDecimal(tx, position, published_at) {
|
|
468
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
469
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_size_decimal"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
453
470
|
}
|
|
454
|
-
function getPositionSymbol(tx, position) {
|
|
455
|
-
|
|
471
|
+
function getPositionSymbol(tx, position, published_at) {
|
|
472
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
473
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_symbol"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
456
474
|
}
|
|
457
|
-
function getPositionUnrealizedFundingSign(tx, position) {
|
|
458
|
-
|
|
475
|
+
function getPositionUnrealizedFundingSign(tx, position, published_at) {
|
|
476
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
477
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_unrealized_funding_sign"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
459
478
|
}
|
|
460
|
-
function getPositionUser(tx, position) {
|
|
461
|
-
|
|
479
|
+
function getPositionUser(tx, position, published_at) {
|
|
480
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
481
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_position_user"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
462
482
|
}
|
|
463
|
-
function getReserveAmount(tx, position) {
|
|
464
|
-
|
|
483
|
+
function getReserveAmount(tx, position, published_at) {
|
|
484
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
485
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::get_reserve_amount"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
465
486
|
}
|
|
466
|
-
function increaseCollateral(tx, typeArg, args) {
|
|
487
|
+
function increaseCollateral(tx, typeArg, args, published_at) {
|
|
488
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
467
489
|
return tx.moveCall({
|
|
468
|
-
target: "".concat(
|
|
490
|
+
target: "".concat(published_at, "::position::increase_collateral"),
|
|
469
491
|
typeArguments: [typeArg],
|
|
470
492
|
arguments: [
|
|
471
493
|
(0, util_1.obj)(tx, args.position),
|
|
@@ -477,15 +499,18 @@ function increaseCollateral(tx, typeArg, args) {
|
|
|
477
499
|
],
|
|
478
500
|
});
|
|
479
501
|
}
|
|
480
|
-
function isOptionCollateralOrder(tx, order) {
|
|
481
|
-
|
|
502
|
+
function isOptionCollateralOrder(tx, order, published_at) {
|
|
503
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
504
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::is_option_collateral_order"), arguments: [(0, util_1.obj)(tx, order)] });
|
|
482
505
|
}
|
|
483
|
-
function isOptionCollateralPosition(tx, position) {
|
|
484
|
-
|
|
506
|
+
function isOptionCollateralPosition(tx, position, published_at) {
|
|
507
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
508
|
+
return tx.moveCall({ target: "".concat(published_at, "::position::is_option_collateral_position"), arguments: [(0, util_1.obj)(tx, position)] });
|
|
485
509
|
}
|
|
486
|
-
function managerCreateReduceOnlyOrder(tx, typeArg, args) {
|
|
510
|
+
function managerCreateReduceOnlyOrder(tx, typeArg, args, published_at) {
|
|
511
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
487
512
|
return tx.moveCall({
|
|
488
|
-
target: "".concat(
|
|
513
|
+
target: "".concat(published_at, "::position::manager_create_reduce_only_order"),
|
|
489
514
|
typeArguments: [typeArg],
|
|
490
515
|
arguments: [
|
|
491
516
|
(0, util_1.obj)(tx, args.version),
|
|
@@ -504,9 +529,10 @@ function managerCreateReduceOnlyOrder(tx, typeArg, args) {
|
|
|
504
529
|
],
|
|
505
530
|
});
|
|
506
531
|
}
|
|
507
|
-
function maxReleasingCollateralAmount(tx, args) {
|
|
532
|
+
function maxReleasingCollateralAmount(tx, args, published_at) {
|
|
533
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
508
534
|
return tx.moveCall({
|
|
509
|
-
target: "".concat(
|
|
535
|
+
target: "".concat(published_at, "::position::max_releasing_collateral_amount"),
|
|
510
536
|
arguments: [
|
|
511
537
|
(0, util_1.obj)(tx, args.position),
|
|
512
538
|
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
@@ -519,15 +545,39 @@ function maxReleasingCollateralAmount(tx, args) {
|
|
|
519
545
|
],
|
|
520
546
|
});
|
|
521
547
|
}
|
|
522
|
-
function optionPositionBidReceiptsExpired(tx, args) {
|
|
548
|
+
function optionPositionBidReceiptsExpired(tx, args, published_at) {
|
|
549
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
523
550
|
return tx.moveCall({
|
|
524
|
-
target: "".concat(
|
|
551
|
+
target: "".concat(published_at, "::position::option_position_bid_receipts_expired"),
|
|
525
552
|
arguments: [(0, util_1.obj)(tx, args.dovRegistry), (0, util_1.obj)(tx, args.position)],
|
|
526
553
|
});
|
|
527
554
|
}
|
|
528
|
-
function
|
|
555
|
+
function orderFilled(tx, typeArg, args, published_at) {
|
|
556
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
529
557
|
return tx.moveCall({
|
|
530
|
-
target: "".concat(
|
|
558
|
+
target: "".concat(published_at, "::position::order_filled"),
|
|
559
|
+
typeArguments: [typeArg],
|
|
560
|
+
arguments: [
|
|
561
|
+
(0, util_1.obj)(tx, args.version),
|
|
562
|
+
(0, util_1.obj)(tx, args.order),
|
|
563
|
+
(0, util_1.option)(tx, "".concat(structs_3.Position.$typeName), args.originalPosition),
|
|
564
|
+
(0, util_1.pure)(tx, args.nextPositionId, "u64"),
|
|
565
|
+
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|
|
566
|
+
(0, util_1.pure)(tx, args.collateralOraclePriceDecimal, "u64"),
|
|
567
|
+
(0, util_1.pure)(tx, args.tradingPairOraclePrice, "u64"),
|
|
568
|
+
(0, util_1.pure)(tx, args.tradingPairOraclePriceDecimal, "u64"),
|
|
569
|
+
(0, util_1.pure)(tx, args.cumulativeBorrowRate, "u64"),
|
|
570
|
+
(0, util_1.pure)(tx, args.cumulativeFundingRateIndexSign, "bool"),
|
|
571
|
+
(0, util_1.pure)(tx, args.cumulativeFundingRateIndex, "u64"),
|
|
572
|
+
(0, util_1.pure)(tx, args.tradingFeeMbp, "u64"),
|
|
573
|
+
(0, util_1.obj)(tx, args.clock),
|
|
574
|
+
],
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
function orderFilledWithBidReceiptsCollateral(tx, typeArgs, args, published_at) {
|
|
578
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
579
|
+
return tx.moveCall({
|
|
580
|
+
target: "".concat(published_at, "::position::order_filled_with_bid_receipts_collateral"),
|
|
531
581
|
typeArguments: typeArgs,
|
|
532
582
|
arguments: [
|
|
533
583
|
(0, util_1.obj)(tx, args.version),
|
|
@@ -551,9 +601,10 @@ function orderFilledWithBidReceiptsCollateral(tx, typeArgs, args) {
|
|
|
551
601
|
],
|
|
552
602
|
});
|
|
553
603
|
}
|
|
554
|
-
function realizeFunding(tx, typeArg, args) {
|
|
604
|
+
function realizeFunding(tx, typeArg, args, published_at) {
|
|
605
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
555
606
|
return tx.moveCall({
|
|
556
|
-
target: "".concat(
|
|
607
|
+
target: "".concat(published_at, "::position::realize_funding"),
|
|
557
608
|
typeArguments: [typeArg],
|
|
558
609
|
arguments: [
|
|
559
610
|
(0, util_1.obj)(tx, args.position),
|
|
@@ -563,9 +614,10 @@ function realizeFunding(tx, typeArg, args) {
|
|
|
563
614
|
],
|
|
564
615
|
});
|
|
565
616
|
}
|
|
566
|
-
function releaseCollateral(tx, typeArg, args) {
|
|
617
|
+
function releaseCollateral(tx, typeArg, args, published_at) {
|
|
618
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
567
619
|
return tx.moveCall({
|
|
568
|
-
target: "".concat(
|
|
620
|
+
target: "".concat(published_at, "::position::release_collateral"),
|
|
569
621
|
typeArguments: [typeArg],
|
|
570
622
|
arguments: [
|
|
571
623
|
(0, util_1.obj)(tx, args.position),
|
|
@@ -577,41 +629,54 @@ function releaseCollateral(tx, typeArg, args) {
|
|
|
577
629
|
],
|
|
578
630
|
});
|
|
579
631
|
}
|
|
580
|
-
function removeOrder(tx, typeArg, args) {
|
|
632
|
+
function removeOrder(tx, typeArg, args, published_at) {
|
|
633
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
581
634
|
return tx.moveCall({
|
|
582
|
-
target: "".concat(
|
|
635
|
+
target: "".concat(published_at, "::position::remove_order"),
|
|
583
636
|
typeArguments: [typeArg],
|
|
584
637
|
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.order)],
|
|
585
638
|
});
|
|
586
639
|
}
|
|
587
|
-
function removeOrderWithBidReceipts(tx, args) {
|
|
640
|
+
function removeOrderWithBidReceipts(tx, args, published_at) {
|
|
641
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
588
642
|
return tx.moveCall({
|
|
589
|
-
target: "".concat(
|
|
643
|
+
target: "".concat(published_at, "::position::remove_order_with_bid_receipts"),
|
|
590
644
|
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.order)],
|
|
591
645
|
});
|
|
592
646
|
}
|
|
593
|
-
function removePosition(tx, typeArg, args) {
|
|
647
|
+
function removePosition(tx, typeArg, args, published_at) {
|
|
648
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
594
649
|
return tx.moveCall({
|
|
595
|
-
target: "".concat(
|
|
650
|
+
target: "".concat(published_at, "::position::remove_position"),
|
|
596
651
|
typeArguments: [typeArg],
|
|
597
652
|
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.position)],
|
|
598
653
|
});
|
|
599
654
|
}
|
|
600
|
-
function removePositionLinkedOrderInfo(tx, args) {
|
|
655
|
+
function removePositionLinkedOrderInfo(tx, args, published_at) {
|
|
656
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
601
657
|
return tx.moveCall({
|
|
602
|
-
target: "".concat(
|
|
658
|
+
target: "".concat(published_at, "::position::remove_position_linked_order_info"),
|
|
603
659
|
arguments: [(0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.linkedOrderId, "u64")],
|
|
604
660
|
});
|
|
605
661
|
}
|
|
606
|
-
function removePositionWithBidReceipts(tx, args) {
|
|
662
|
+
function removePositionWithBidReceipts(tx, args, published_at) {
|
|
663
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
607
664
|
return tx.moveCall({
|
|
608
|
-
target: "".concat(
|
|
665
|
+
target: "".concat(published_at, "::position::remove_position_with_bid_receipts"),
|
|
609
666
|
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.position)],
|
|
610
667
|
});
|
|
611
668
|
}
|
|
612
|
-
function
|
|
669
|
+
function splitBidReceipt(tx, args, published_at) {
|
|
670
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
671
|
+
return tx.moveCall({
|
|
672
|
+
target: "".concat(published_at, "::position::split_bid_receipt"),
|
|
673
|
+
arguments: [(0, util_1.obj)(tx, args.dovRegistry), (0, util_1.obj)(tx, args.position), (0, util_1.pure)(tx, args.size, "u64")],
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
function updateOptionPositionCollateralAmount(tx, typeArg, args, published_at) {
|
|
677
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
613
678
|
return tx.moveCall({
|
|
614
|
-
target: "".concat(
|
|
679
|
+
target: "".concat(published_at, "::position::update_option_position_collateral_amount"),
|
|
615
680
|
typeArguments: [typeArg],
|
|
616
681
|
arguments: [
|
|
617
682
|
(0, util_1.obj)(tx, args.dovRegistry),
|
|
@@ -622,9 +687,10 @@ function updateOptionPositionCollateralAmount(tx, typeArg, args) {
|
|
|
622
687
|
],
|
|
623
688
|
});
|
|
624
689
|
}
|
|
625
|
-
function updatePositionBorrowRateAndFundingRate(tx, args) {
|
|
690
|
+
function updatePositionBorrowRateAndFundingRate(tx, args, published_at) {
|
|
691
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
626
692
|
return tx.moveCall({
|
|
627
|
-
target: "".concat(
|
|
693
|
+
target: "".concat(published_at, "::position::update_position_borrow_rate_and_funding_rate"),
|
|
628
694
|
arguments: [
|
|
629
695
|
(0, util_1.obj)(tx, args.position),
|
|
630
696
|
(0, util_1.pure)(tx, args.collateralOraclePrice, "u64"),
|