@typus/typus-perp-sdk 1.1.32-codegen-exp7 → 1.1.32-codegen-exp8
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/client.js +34 -3
- package/dist/src/fetch.d.ts +3 -91
- package/dist/src/fetch.js +43 -41
- package/dist/src/generated/typus_perp/admin.d.ts +158 -1
- package/dist/src/generated/typus_perp/admin.js +211 -0
- package/dist/src/generated/typus_perp/competition.d.ts +39 -1
- package/dist/src/generated/typus_perp/competition.js +46 -0
- package/dist/src/generated/typus_perp/deps/sui/table.d.ts +31 -0
- package/dist/src/generated/typus_perp/{tlp.js → deps/sui/table.js} +28 -13
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +0 -8
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +3 -11
- package/dist/src/generated/typus_perp/error.d.ts +443 -0
- package/dist/src/generated/typus_perp/error.js +788 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +51 -1
- package/dist/src/generated/typus_perp/escrow.js +63 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +2 -476
- package/dist/src/generated/typus_perp/lp_pool.js +19 -492
- package/dist/src/generated/typus_perp/position.d.ts +1016 -1
- package/dist/src/generated/typus_perp/position.js +1187 -0
- package/dist/src/generated/typus_perp/profit_vault.d.ts +272 -0
- package/dist/src/generated/typus_perp/profit_vault.js +321 -0
- package/dist/src/generated/typus_perp/symbol.d.ts +30 -1
- package/dist/src/generated/typus_perp/symbol.js +42 -0
- package/dist/src/generated/typus_perp/trading.d.ts +56 -418
- package/dist/src/generated/typus_perp/trading.js +124 -552
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +32 -1
- package/dist/src/generated/typus_perp/treasury_caps.js +40 -0
- package/dist/src/generated/typus_perp/user_account.d.ts +107 -1
- package/dist/src/generated/typus_perp/user_account.js +149 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +9 -25
- package/dist/src/generated/typus_stake_pool/admin.js +11 -36
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +56 -4
- package/dist/src/generated/typus_stake_pool/stake_pool.js +68 -4
- package/dist/src/generated/utils/index.js +3 -0
- package/dist/src/grpc/graphql.d.ts +6 -6
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +13 -19
- package/dist/src/user/order.js +1 -6
- package/dist/src/user/orderWithBidReceipt.js +3 -3
- package/package.json +2 -2
- package/dist/src/generated/typus_perp/lending.d.ts +0 -47
- package/dist/src/generated/typus_perp/lending.js +0 -50
- package/dist/src/generated/typus_perp/tlp.d.ts +0 -13
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.BurnLpEvent = exports.UpdateLiquidityValueEvent = exports.CompleteRebalancingEvent = exports.RebalanceEvent = exports.RebalanceProcess = exports.ManagerRemoveLiquidityTokenEvent = exports.ResumeTokenPoolEvent = exports.SuspendTokenPoolEvent = exports.ResumePoolEvent = exports.SuspendPoolEvent = exports.RedeemEvent = exports.SwapEvent = exports.UpdateBorrowInfoEvent = exports.MintLpEvent = exports.UpdateMarginConfigEvent = exports.ManagerEmergencyWithdrawEvent = exports.ManagerEmergencyDepositEvent = exports.UpdateSpotConfigEvent = exports.AddLiquidityTokenEvent = exports.UpdateRebalanceCostThresholdBpEvent = exports.UpdateUnlockCountdownTsMsEvent = exports.NewLiquidityPoolEvent = exports.ManagerDepositReceipt = exports.DeactivatingShares = exports.LiquidityPool = exports.LiquidityPoolInfo = exports.TokenPool = exports.State = exports.Config = exports.MarginConfig = exports.SpotConfig = exports.Registry = void 0;
|
|
40
40
|
exports.init = init;
|
|
41
41
|
exports.newLiquidityPool = newLiquidityPool;
|
|
42
42
|
exports.updateUnlockCountdownTsMs = updateUnlockCountdownTsMs;
|
|
@@ -55,15 +55,6 @@ exports.suspendPool = suspendPool;
|
|
|
55
55
|
exports.resumePool = resumePool;
|
|
56
56
|
exports.suspendTokenPool = suspendTokenPool;
|
|
57
57
|
exports.resumeTokenPool = resumeTokenPool;
|
|
58
|
-
exports.managerDepositScallop = managerDepositScallop;
|
|
59
|
-
exports.managerDepositNavi = managerDepositNavi;
|
|
60
|
-
exports.managerWithdrawScallop = managerWithdrawScallop;
|
|
61
|
-
exports.managerWithdrawNavi = managerWithdrawNavi;
|
|
62
|
-
exports.managerRewardNavi = managerRewardNavi;
|
|
63
|
-
exports.startRemoveLiquidityTokenProcess = startRemoveLiquidityTokenProcess;
|
|
64
|
-
exports.managerFlashRemoveLiquidity = managerFlashRemoveLiquidity;
|
|
65
|
-
exports.managerFlashRepayLiquidity = managerFlashRepayLiquidity;
|
|
66
|
-
exports.completeRemoveLiquidityTokenProcess = completeRemoveLiquidityTokenProcess;
|
|
67
58
|
exports.managerRemoveLiquidityToken = managerRemoveLiquidityToken;
|
|
68
59
|
exports.checkTokenPoolStatus = checkTokenPoolStatus;
|
|
69
60
|
exports.tokenPoolIsActive = tokenPoolIsActive;
|
|
@@ -84,12 +75,6 @@ exports.calculateBurnLp = calculateBurnLp;
|
|
|
84
75
|
exports.calculateLpFee = calculateLpFee;
|
|
85
76
|
exports.calculateSwapFee = calculateSwapFee;
|
|
86
77
|
exports.checkTvlUpdated = checkTvlUpdated;
|
|
87
|
-
exports.calculateLendingAmountCapped = calculateLendingAmountCapped;
|
|
88
|
-
exports.depositScallopBasic = depositScallopBasic;
|
|
89
|
-
exports.withdrawScallopBasic = withdrawScallopBasic;
|
|
90
|
-
exports.depositNavi = depositNavi;
|
|
91
|
-
exports.withdrawNavi = withdrawNavi;
|
|
92
|
-
exports.rewardNavi = rewardNavi;
|
|
93
78
|
exports.burnLp_ = burnLp_;
|
|
94
79
|
exports.viewSwapResult = viewSwapResult;
|
|
95
80
|
exports.getReceiptCollateralBcs = getReceiptCollateralBcs;
|
|
@@ -108,7 +93,6 @@ exports.checkTradingOrderSizeValid = checkTradingOrderSizeValid;
|
|
|
108
93
|
exports.getCumulativeBorrowRate = getCumulativeBorrowRate;
|
|
109
94
|
exports.getTvlUsd = getTvlUsd;
|
|
110
95
|
exports.getBorrowRateDecimal = getBorrowRateDecimal;
|
|
111
|
-
exports.burnLp = burnLp;
|
|
112
96
|
exports.deprecated = deprecated;
|
|
113
97
|
exports.getUserDeactivatingShares = getUserDeactivatingShares;
|
|
114
98
|
/**
|
|
@@ -274,25 +258,6 @@ exports.LiquidityPool = new index_1.MoveStruct({
|
|
|
274
258
|
bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8()),
|
|
275
259
|
},
|
|
276
260
|
});
|
|
277
|
-
exports.RemoveLiquidityTokenProcess = new index_1.MoveStruct({
|
|
278
|
-
name: `${$moduleName}::RemoveLiquidityTokenProcess`,
|
|
279
|
-
fields: {
|
|
280
|
-
/** The type name of the liquidity token being removed. */
|
|
281
|
-
liquidity_token: type_name.TypeName,
|
|
282
|
-
/** A vector of the base tokens of the removed positions. */
|
|
283
|
-
removed_positions_base_token: bcs_1.bcs.vector(type_name.TypeName),
|
|
284
|
-
/** A vector of the base tokens of the removed orders. */
|
|
285
|
-
removed_orders_base_token: bcs_1.bcs.vector(type_name.TypeName),
|
|
286
|
-
/** The address of the oracle for the removed token. */
|
|
287
|
-
removed_token_oracle_id: bcs_1.bcs.Address,
|
|
288
|
-
/** The value of the removed liquidity in USD. */
|
|
289
|
-
removed_usd: bcs_1.bcs.u64(),
|
|
290
|
-
/** The value of the repaid liquidity in USD. */
|
|
291
|
-
repaid_usd: bcs_1.bcs.u64(),
|
|
292
|
-
/** The status of the removal process. */
|
|
293
|
-
status: bcs_1.bcs.u64(),
|
|
294
|
-
},
|
|
295
|
-
});
|
|
296
261
|
exports.DeactivatingShares = new index_1.MoveStruct({
|
|
297
262
|
name: `${$moduleName}::DeactivatingShares`,
|
|
298
263
|
fields: {
|
|
@@ -306,8 +271,8 @@ exports.DeactivatingShares = new index_1.MoveStruct({
|
|
|
306
271
|
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
307
272
|
},
|
|
308
273
|
});
|
|
309
|
-
exports.
|
|
310
|
-
name: `${$moduleName}::
|
|
274
|
+
exports.ManagerDepositReceipt = new index_1.MoveStruct({
|
|
275
|
+
name: `${$moduleName}::ManagerDepositReceipt`,
|
|
311
276
|
fields: {
|
|
312
277
|
id: object.UID,
|
|
313
278
|
/** The index of the pool. */
|
|
@@ -493,83 +458,6 @@ exports.ResumeTokenPoolEvent = new index_1.MoveStruct({
|
|
|
493
458
|
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
494
459
|
},
|
|
495
460
|
});
|
|
496
|
-
exports.DepositLendingEvent = new index_1.MoveStruct({
|
|
497
|
-
name: `${$moduleName}::DepositLendingEvent`,
|
|
498
|
-
fields: {
|
|
499
|
-
index: bcs_1.bcs.u64(),
|
|
500
|
-
lending_index: bcs_1.bcs.u64(),
|
|
501
|
-
c_token_type: type_name.TypeName,
|
|
502
|
-
deposit_amount: bcs_1.bcs.u64(),
|
|
503
|
-
minted_market_coin_amount: bcs_1.bcs.u64(),
|
|
504
|
-
latest_lending_amount: bcs_1.bcs.u64(),
|
|
505
|
-
latest_market_coin_amount: bcs_1.bcs.u64(),
|
|
506
|
-
latest_reserved_amount: bcs_1.bcs.u64(),
|
|
507
|
-
latest_liquidity_amount: bcs_1.bcs.u64(),
|
|
508
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
509
|
-
},
|
|
510
|
-
});
|
|
511
|
-
exports.WithdrawLendingEvent = new index_1.MoveStruct({
|
|
512
|
-
name: `${$moduleName}::WithdrawLendingEvent`,
|
|
513
|
-
fields: {
|
|
514
|
-
index: bcs_1.bcs.u64(),
|
|
515
|
-
lending_index: bcs_1.bcs.u64(),
|
|
516
|
-
c_token_type: type_name.TypeName,
|
|
517
|
-
r_token_type: type_name.TypeName,
|
|
518
|
-
withdraw_amount: bcs_1.bcs.u64(),
|
|
519
|
-
withdrawn_collateral_amount: bcs_1.bcs.u64(),
|
|
520
|
-
latest_lending_amount: bcs_1.bcs.u64(),
|
|
521
|
-
latest_market_coin_amount: bcs_1.bcs.u64(),
|
|
522
|
-
latest_reserved_amount: bcs_1.bcs.u64(),
|
|
523
|
-
latest_liquidity_amount: bcs_1.bcs.u64(),
|
|
524
|
-
lending_interest: bcs_1.bcs.u64(),
|
|
525
|
-
protocol_share: bcs_1.bcs.u64(),
|
|
526
|
-
lending_reward: bcs_1.bcs.u64(),
|
|
527
|
-
reward_protocol_share: bcs_1.bcs.u64(),
|
|
528
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
529
|
-
},
|
|
530
|
-
});
|
|
531
|
-
exports.StartRemoveLiquidityTokenProcessEvent = new index_1.MoveStruct({
|
|
532
|
-
name: `${$moduleName}::StartRemoveLiquidityTokenProcessEvent`,
|
|
533
|
-
fields: {
|
|
534
|
-
index: bcs_1.bcs.u64(),
|
|
535
|
-
liquidity_token: type_name.TypeName,
|
|
536
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
537
|
-
},
|
|
538
|
-
});
|
|
539
|
-
exports.ManagerFlashRemoveLiquidityEvent = new index_1.MoveStruct({
|
|
540
|
-
name: `${$moduleName}::ManagerFlashRemoveLiquidityEvent`,
|
|
541
|
-
fields: {
|
|
542
|
-
index: bcs_1.bcs.u64(),
|
|
543
|
-
liquidity_token: type_name.TypeName,
|
|
544
|
-
price: bcs_1.bcs.u64(),
|
|
545
|
-
price_decimal: bcs_1.bcs.u64(),
|
|
546
|
-
remove_amount: bcs_1.bcs.u64(),
|
|
547
|
-
removed_usd: bcs_1.bcs.u64(),
|
|
548
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
549
|
-
},
|
|
550
|
-
});
|
|
551
|
-
exports.ManagerFlashRepayLiquidityEvent = new index_1.MoveStruct({
|
|
552
|
-
name: `${$moduleName}::ManagerFlashRepayLiquidityEvent`,
|
|
553
|
-
fields: {
|
|
554
|
-
index: bcs_1.bcs.u64(),
|
|
555
|
-
liquidity_token: type_name.TypeName,
|
|
556
|
-
price: bcs_1.bcs.u64(),
|
|
557
|
-
price_decimal: bcs_1.bcs.u64(),
|
|
558
|
-
repaid_amount: bcs_1.bcs.u64(),
|
|
559
|
-
repaid_usd: bcs_1.bcs.u64(),
|
|
560
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
561
|
-
},
|
|
562
|
-
});
|
|
563
|
-
exports.CompleteRemoveLiquidityTokenProcessEvent = new index_1.MoveStruct({
|
|
564
|
-
name: `${$moduleName}::CompleteRemoveLiquidityTokenProcessEvent`,
|
|
565
|
-
fields: {
|
|
566
|
-
index: bcs_1.bcs.u64(),
|
|
567
|
-
liquidity_token: type_name.TypeName,
|
|
568
|
-
removed_usd: bcs_1.bcs.u64(),
|
|
569
|
-
repaid_usd: bcs_1.bcs.u64(),
|
|
570
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
571
|
-
},
|
|
572
|
-
});
|
|
573
461
|
exports.ManagerRemoveLiquidityTokenEvent = new index_1.MoveStruct({
|
|
574
462
|
name: `${$moduleName}::ManagerRemoveLiquidityTokenEvent`,
|
|
575
463
|
fields: {
|
|
@@ -649,14 +537,6 @@ exports.BurnLpEvent = new index_1.MoveStruct({
|
|
|
649
537
|
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
650
538
|
},
|
|
651
539
|
});
|
|
652
|
-
exports.ManagerDepositReceipt = new index_1.MoveStruct({
|
|
653
|
-
name: `${$moduleName}::ManagerDepositReceipt`,
|
|
654
|
-
fields: {
|
|
655
|
-
id: object.UID,
|
|
656
|
-
token_type: type_name.TypeName,
|
|
657
|
-
amount: bcs_1.bcs.u64(),
|
|
658
|
-
},
|
|
659
|
-
});
|
|
660
540
|
function init(options = {}) {
|
|
661
541
|
const packageAddress = options.package ?? "@typus/perp";
|
|
662
542
|
return (tx) => tx.moveCall({
|
|
@@ -709,7 +589,7 @@ function addLiquidityToken(options) {
|
|
|
709
589
|
`${packageAddress}::admin::Version`,
|
|
710
590
|
`${packageAddress}::lp_pool::Registry`,
|
|
711
591
|
"u64",
|
|
712
|
-
"
|
|
592
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
713
593
|
"u64",
|
|
714
594
|
"u64",
|
|
715
595
|
"u64",
|
|
@@ -828,7 +708,7 @@ function managerEmergencyWithdraw(options) {
|
|
|
828
708
|
`${packageAddress}::admin::Version`,
|
|
829
709
|
`${packageAddress}::lp_pool::Registry`,
|
|
830
710
|
"u64",
|
|
831
|
-
`${packageAddress}::lp_pool::
|
|
711
|
+
`${packageAddress}::lp_pool::ManagerDepositReceipt`,
|
|
832
712
|
];
|
|
833
713
|
const parameterNames = ["version", "registry", "index", "receipt"];
|
|
834
714
|
return (tx) => tx.moveCall({
|
|
@@ -881,7 +761,7 @@ function mintLp(options) {
|
|
|
881
761
|
`${packageAddress}::admin::Version`,
|
|
882
762
|
`${packageAddress}::lp_pool::Registry`,
|
|
883
763
|
`${packageAddress}::treasury_caps::TreasuryCaps`,
|
|
884
|
-
"
|
|
764
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
885
765
|
"u64",
|
|
886
766
|
`0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<${options.typeArguments[0]}>`,
|
|
887
767
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
@@ -919,8 +799,8 @@ function swap(options) {
|
|
|
919
799
|
`${packageAddress}::admin::Version`,
|
|
920
800
|
`${packageAddress}::lp_pool::Registry`,
|
|
921
801
|
"u64",
|
|
922
|
-
"
|
|
923
|
-
"
|
|
802
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
803
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
924
804
|
`0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<${options.typeArguments[0]}>`,
|
|
925
805
|
"u64",
|
|
926
806
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
@@ -961,7 +841,7 @@ function claim(options) {
|
|
|
961
841
|
`${packageAddress}::lp_pool::Registry`,
|
|
962
842
|
"u64",
|
|
963
843
|
`${packageAddress}::treasury_caps::TreasuryCaps`,
|
|
964
|
-
"
|
|
844
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
965
845
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
966
846
|
];
|
|
967
847
|
const parameterNames = ["version", "registry", "index", "treasuryCaps", "oracle"];
|
|
@@ -1023,207 +903,6 @@ function resumeTokenPool(options) {
|
|
|
1023
903
|
typeArguments: options.typeArguments,
|
|
1024
904
|
});
|
|
1025
905
|
}
|
|
1026
|
-
/** [Authorized Function] Manager deposits to Scallop. */
|
|
1027
|
-
function managerDepositScallop(options) {
|
|
1028
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1029
|
-
const argumentsTypes = [
|
|
1030
|
-
`${packageAddress}::admin::Version`,
|
|
1031
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1032
|
-
"u64",
|
|
1033
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::version::Version",
|
|
1034
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::market::Market",
|
|
1035
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1036
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::option::Option<u64>",
|
|
1037
|
-
];
|
|
1038
|
-
const parameterNames = ["version", "registry", "index", "scallopVersion", "scallopMarket", "lendingAmount"];
|
|
1039
|
-
return (tx) => tx.moveCall({
|
|
1040
|
-
package: packageAddress,
|
|
1041
|
-
module: "lp_pool",
|
|
1042
|
-
function: "manager_deposit_scallop",
|
|
1043
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1044
|
-
typeArguments: options.typeArguments,
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
function managerDepositNavi(options) {
|
|
1048
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1049
|
-
const argumentsTypes = [
|
|
1050
|
-
`${packageAddress}::admin::Version`,
|
|
1051
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1052
|
-
"u64",
|
|
1053
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage",
|
|
1054
|
-
`0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::pool::Pool<${options.typeArguments[0]}>`,
|
|
1055
|
-
"u8",
|
|
1056
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v2::Incentive",
|
|
1057
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::Incentive",
|
|
1058
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1059
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::option::Option<u64>",
|
|
1060
|
-
];
|
|
1061
|
-
const parameterNames = ["version", "registry", "index", "storage", "pool", "asset", "incentiveV2", "incentiveV3", "lendingAmount"];
|
|
1062
|
-
return (tx) => tx.moveCall({
|
|
1063
|
-
package: packageAddress,
|
|
1064
|
-
module: "lp_pool",
|
|
1065
|
-
function: "manager_deposit_navi",
|
|
1066
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1067
|
-
typeArguments: options.typeArguments,
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
/** [Authorized Function] Manager withdraws from Scallop. */
|
|
1071
|
-
function managerWithdrawScallop(options) {
|
|
1072
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1073
|
-
const argumentsTypes = [
|
|
1074
|
-
`${packageAddress}::admin::Version`,
|
|
1075
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1076
|
-
"u64",
|
|
1077
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::version::Version",
|
|
1078
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::market::Market",
|
|
1079
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1080
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::option::Option<u64>",
|
|
1081
|
-
];
|
|
1082
|
-
const parameterNames = ["version", "registry", "index", "scallopVersion", "scallopMarket", "withdrawAmount"];
|
|
1083
|
-
return (tx) => tx.moveCall({
|
|
1084
|
-
package: packageAddress,
|
|
1085
|
-
module: "lp_pool",
|
|
1086
|
-
function: "manager_withdraw_scallop",
|
|
1087
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1088
|
-
typeArguments: options.typeArguments,
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
function managerWithdrawNavi(options) {
|
|
1092
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1093
|
-
const argumentsTypes = [
|
|
1094
|
-
`${packageAddress}::admin::Version`,
|
|
1095
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1096
|
-
"u64",
|
|
1097
|
-
"0xca441b44943c16be0e6e23c5a955bb971537ea3289ae8016fbf33fffe1fd210f::config::OracleConfig",
|
|
1098
|
-
"0xca441b44943c16be0e6e23c5a955bb971537ea3289ae8016fbf33fffe1fd210f::oracle::PriceOracle",
|
|
1099
|
-
"0x5d8fbbf6f908a4af8c6d072669a462d53e03eb3c1d863bd0359dc818c69ea706::SupraSValueFeed::OracleHolder",
|
|
1100
|
-
"0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::price_info::PriceInfoObject",
|
|
1101
|
-
"address",
|
|
1102
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage",
|
|
1103
|
-
`0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::pool::Pool<${options.typeArguments[0]}>`,
|
|
1104
|
-
"u8",
|
|
1105
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v2::Incentive",
|
|
1106
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::Incentive",
|
|
1107
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1108
|
-
];
|
|
1109
|
-
const parameterNames = [
|
|
1110
|
-
"version",
|
|
1111
|
-
"registry",
|
|
1112
|
-
"index",
|
|
1113
|
-
"oracleConfig",
|
|
1114
|
-
"priceOracle",
|
|
1115
|
-
"supraOracleHolder",
|
|
1116
|
-
"pythPriceInfo",
|
|
1117
|
-
"feedAddress",
|
|
1118
|
-
"storage",
|
|
1119
|
-
"pool",
|
|
1120
|
-
"asset",
|
|
1121
|
-
"incentiveV2",
|
|
1122
|
-
"incentiveV3",
|
|
1123
|
-
];
|
|
1124
|
-
return (tx) => tx.moveCall({
|
|
1125
|
-
package: packageAddress,
|
|
1126
|
-
module: "lp_pool",
|
|
1127
|
-
function: "manager_withdraw_navi",
|
|
1128
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1129
|
-
typeArguments: options.typeArguments,
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1132
|
-
function managerRewardNavi(options) {
|
|
1133
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1134
|
-
const argumentsTypes = [
|
|
1135
|
-
`${packageAddress}::admin::Version`,
|
|
1136
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1137
|
-
"u64",
|
|
1138
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage",
|
|
1139
|
-
`0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::RewardFund<${options.typeArguments[0]}>`,
|
|
1140
|
-
"vector<0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String>",
|
|
1141
|
-
"vector<address>",
|
|
1142
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::Incentive",
|
|
1143
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1144
|
-
];
|
|
1145
|
-
const parameterNames = ["version", "registry", "index", "storage", "rewardFund", "coinTypes", "ruleIds", "incentiveV3"];
|
|
1146
|
-
return (tx) => tx.moveCall({
|
|
1147
|
-
package: packageAddress,
|
|
1148
|
-
module: "lp_pool",
|
|
1149
|
-
function: "manager_reward_navi",
|
|
1150
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1151
|
-
typeArguments: options.typeArguments,
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
function startRemoveLiquidityTokenProcess(options) {
|
|
1155
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1156
|
-
const argumentsTypes = [
|
|
1157
|
-
`${packageAddress}::admin::Version`,
|
|
1158
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1159
|
-
"u64",
|
|
1160
|
-
"0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a::oracle::Oracle",
|
|
1161
|
-
];
|
|
1162
|
-
const parameterNames = ["version", "registry", "index", "oracle"];
|
|
1163
|
-
return (tx) => tx.moveCall({
|
|
1164
|
-
package: packageAddress,
|
|
1165
|
-
module: "lp_pool",
|
|
1166
|
-
function: "start_remove_liquidity_token_process",
|
|
1167
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1168
|
-
typeArguments: options.typeArguments,
|
|
1169
|
-
});
|
|
1170
|
-
}
|
|
1171
|
-
function managerFlashRemoveLiquidity(options) {
|
|
1172
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1173
|
-
const argumentsTypes = [
|
|
1174
|
-
`${packageAddress}::admin::Version`,
|
|
1175
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1176
|
-
"u64",
|
|
1177
|
-
"0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a::oracle::Oracle",
|
|
1178
|
-
`${packageAddress}::lp_pool::RemoveLiquidityTokenProcess`,
|
|
1179
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1180
|
-
];
|
|
1181
|
-
const parameterNames = ["version", "registry", "index", "oracle", "process"];
|
|
1182
|
-
return (tx) => tx.moveCall({
|
|
1183
|
-
package: packageAddress,
|
|
1184
|
-
module: "lp_pool",
|
|
1185
|
-
function: "manager_flash_remove_liquidity",
|
|
1186
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1187
|
-
typeArguments: options.typeArguments,
|
|
1188
|
-
});
|
|
1189
|
-
}
|
|
1190
|
-
function managerFlashRepayLiquidity(options) {
|
|
1191
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1192
|
-
const argumentsTypes = [
|
|
1193
|
-
`${packageAddress}::admin::Version`,
|
|
1194
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1195
|
-
"u64",
|
|
1196
|
-
"0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a::oracle::Oracle",
|
|
1197
|
-
`${packageAddress}::lp_pool::RemoveLiquidityTokenProcess`,
|
|
1198
|
-
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
1199
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1200
|
-
];
|
|
1201
|
-
const parameterNames = ["version", "registry", "index", "oracle", "process", "balance"];
|
|
1202
|
-
return (tx) => tx.moveCall({
|
|
1203
|
-
package: packageAddress,
|
|
1204
|
-
module: "lp_pool",
|
|
1205
|
-
function: "manager_flash_repay_liquidity",
|
|
1206
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1207
|
-
typeArguments: options.typeArguments,
|
|
1208
|
-
});
|
|
1209
|
-
}
|
|
1210
|
-
function completeRemoveLiquidityTokenProcess(options) {
|
|
1211
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1212
|
-
const argumentsTypes = [
|
|
1213
|
-
`${packageAddress}::admin::Version`,
|
|
1214
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1215
|
-
"u64",
|
|
1216
|
-
`${packageAddress}::lp_pool::RemoveLiquidityTokenProcess`,
|
|
1217
|
-
];
|
|
1218
|
-
const parameterNames = ["version", "registry", "index", "process"];
|
|
1219
|
-
return (tx) => tx.moveCall({
|
|
1220
|
-
package: packageAddress,
|
|
1221
|
-
module: "lp_pool",
|
|
1222
|
-
function: "complete_remove_liquidity_token_process",
|
|
1223
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1224
|
-
typeArguments: options.typeArguments,
|
|
1225
|
-
});
|
|
1226
|
-
}
|
|
1227
906
|
/** [Authorized Function] Manager removes a liquidity token. */
|
|
1228
907
|
function managerRemoveLiquidityToken(options) {
|
|
1229
908
|
const packageAddress = options.package ?? "@typus/perp";
|
|
@@ -1267,8 +946,8 @@ function rebalance(options) {
|
|
|
1267
946
|
`${packageAddress}::admin::Version`,
|
|
1268
947
|
`${packageAddress}::lp_pool::Registry`,
|
|
1269
948
|
"u64",
|
|
1270
|
-
"
|
|
1271
|
-
"
|
|
949
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
950
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1272
951
|
"u64",
|
|
1273
952
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1274
953
|
];
|
|
@@ -1288,8 +967,8 @@ function completeRebalancing(options) {
|
|
|
1288
967
|
`${packageAddress}::admin::Version`,
|
|
1289
968
|
`${packageAddress}::lp_pool::Registry`,
|
|
1290
969
|
"u64",
|
|
1291
|
-
"
|
|
1292
|
-
"
|
|
970
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
971
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1293
972
|
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[1]}>`,
|
|
1294
973
|
`${packageAddress}::lp_pool::RebalanceProcess`,
|
|
1295
974
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
@@ -1326,7 +1005,7 @@ function updateLiquidityValue(options) {
|
|
|
1326
1005
|
`${packageAddress}::admin::Version`,
|
|
1327
1006
|
`${packageAddress}::lp_pool::Registry`,
|
|
1328
1007
|
"u64",
|
|
1329
|
-
"
|
|
1008
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1330
1009
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1331
1010
|
];
|
|
1332
1011
|
const parameterNames = ["version", "registry", "index", "oracle"];
|
|
@@ -1359,7 +1038,7 @@ function updateTvl(options) {
|
|
|
1359
1038
|
`${packageAddress}::admin::Version`,
|
|
1360
1039
|
`${packageAddress}::lp_pool::LiquidityPool`,
|
|
1361
1040
|
"0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName",
|
|
1362
|
-
"
|
|
1041
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1363
1042
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1364
1043
|
];
|
|
1365
1044
|
const parameterNames = ["version", "liquidityPool", "tokenType", "oracle"];
|
|
@@ -1537,138 +1216,6 @@ function checkTvlUpdated(options) {
|
|
|
1537
1216
|
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1538
1217
|
});
|
|
1539
1218
|
}
|
|
1540
|
-
function calculateLendingAmountCapped(options) {
|
|
1541
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1542
|
-
const argumentsTypes = [
|
|
1543
|
-
`${packageAddress}::lp_pool::TokenPool`,
|
|
1544
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::option::Option<u64>",
|
|
1545
|
-
];
|
|
1546
|
-
const parameterNames = ["tokenPool", "lendingAmount"];
|
|
1547
|
-
return (tx) => tx.moveCall({
|
|
1548
|
-
package: packageAddress,
|
|
1549
|
-
module: "lp_pool",
|
|
1550
|
-
function: "calculate_lending_amount_capped",
|
|
1551
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1552
|
-
});
|
|
1553
|
-
}
|
|
1554
|
-
function depositScallopBasic(options) {
|
|
1555
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1556
|
-
const argumentsTypes = [
|
|
1557
|
-
`${packageAddress}::lp_pool::LiquidityPool`,
|
|
1558
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::version::Version",
|
|
1559
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::market::Market",
|
|
1560
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1561
|
-
"u64",
|
|
1562
|
-
];
|
|
1563
|
-
const parameterNames = ["liquidityPool", "scallopVersion", "scallopMarket", "depositAmount"];
|
|
1564
|
-
return (tx) => tx.moveCall({
|
|
1565
|
-
package: packageAddress,
|
|
1566
|
-
module: "lp_pool",
|
|
1567
|
-
function: "deposit_scallop_basic",
|
|
1568
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1569
|
-
typeArguments: options.typeArguments,
|
|
1570
|
-
});
|
|
1571
|
-
}
|
|
1572
|
-
function withdrawScallopBasic(options) {
|
|
1573
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1574
|
-
const argumentsTypes = [
|
|
1575
|
-
`${packageAddress}::admin::Version`,
|
|
1576
|
-
`${packageAddress}::lp_pool::LiquidityPool`,
|
|
1577
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::version::Version",
|
|
1578
|
-
"0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::market::Market",
|
|
1579
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1580
|
-
"u64",
|
|
1581
|
-
];
|
|
1582
|
-
const parameterNames = ["version", "liquidityPool", "scallopVersion", "scallopMarket", "withdrawAmount"];
|
|
1583
|
-
return (tx) => tx.moveCall({
|
|
1584
|
-
package: packageAddress,
|
|
1585
|
-
module: "lp_pool",
|
|
1586
|
-
function: "withdraw_scallop_basic",
|
|
1587
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1588
|
-
typeArguments: options.typeArguments,
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
|
-
function depositNavi(options) {
|
|
1592
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1593
|
-
const argumentsTypes = [
|
|
1594
|
-
`${packageAddress}::lp_pool::LiquidityPool`,
|
|
1595
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage",
|
|
1596
|
-
`0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::pool::Pool<${options.typeArguments[0]}>`,
|
|
1597
|
-
"u8",
|
|
1598
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v2::Incentive",
|
|
1599
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::Incentive",
|
|
1600
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1601
|
-
"u64",
|
|
1602
|
-
];
|
|
1603
|
-
const parameterNames = ["liquidityPool", "storage", "pool", "asset", "incentiveV2", "incentiveV3", "depositAmount"];
|
|
1604
|
-
return (tx) => tx.moveCall({
|
|
1605
|
-
package: packageAddress,
|
|
1606
|
-
module: "lp_pool",
|
|
1607
|
-
function: "deposit_navi",
|
|
1608
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1609
|
-
typeArguments: options.typeArguments,
|
|
1610
|
-
});
|
|
1611
|
-
}
|
|
1612
|
-
function withdrawNavi(options) {
|
|
1613
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1614
|
-
const argumentsTypes = [
|
|
1615
|
-
`${packageAddress}::admin::Version`,
|
|
1616
|
-
`${packageAddress}::lp_pool::LiquidityPool`,
|
|
1617
|
-
"0xca441b44943c16be0e6e23c5a955bb971537ea3289ae8016fbf33fffe1fd210f::config::OracleConfig",
|
|
1618
|
-
"0xca441b44943c16be0e6e23c5a955bb971537ea3289ae8016fbf33fffe1fd210f::oracle::PriceOracle",
|
|
1619
|
-
"0x5d8fbbf6f908a4af8c6d072669a462d53e03eb3c1d863bd0359dc818c69ea706::SupraSValueFeed::OracleHolder",
|
|
1620
|
-
"0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::price_info::PriceInfoObject",
|
|
1621
|
-
"address",
|
|
1622
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage",
|
|
1623
|
-
`0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::pool::Pool<${options.typeArguments[0]}>`,
|
|
1624
|
-
"u8",
|
|
1625
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v2::Incentive",
|
|
1626
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::Incentive",
|
|
1627
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1628
|
-
];
|
|
1629
|
-
const parameterNames = [
|
|
1630
|
-
"version",
|
|
1631
|
-
"liquidityPool",
|
|
1632
|
-
"oracleConfig",
|
|
1633
|
-
"priceOracle",
|
|
1634
|
-
"supraOracleHolder",
|
|
1635
|
-
"pythPriceInfo",
|
|
1636
|
-
"feedAddress",
|
|
1637
|
-
"storage",
|
|
1638
|
-
"pool",
|
|
1639
|
-
"asset",
|
|
1640
|
-
"incentiveV2",
|
|
1641
|
-
"incentiveV3",
|
|
1642
|
-
];
|
|
1643
|
-
return (tx) => tx.moveCall({
|
|
1644
|
-
package: packageAddress,
|
|
1645
|
-
module: "lp_pool",
|
|
1646
|
-
function: "withdraw_navi",
|
|
1647
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1648
|
-
typeArguments: options.typeArguments,
|
|
1649
|
-
});
|
|
1650
|
-
}
|
|
1651
|
-
function rewardNavi(options) {
|
|
1652
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1653
|
-
const argumentsTypes = [
|
|
1654
|
-
`${packageAddress}::admin::Version`,
|
|
1655
|
-
`${packageAddress}::lp_pool::LiquidityPool`,
|
|
1656
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage",
|
|
1657
|
-
`0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::RewardFund<${options.typeArguments[0]}>`,
|
|
1658
|
-
"vector<0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String>",
|
|
1659
|
-
"vector<address>",
|
|
1660
|
-
"0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::incentive_v3::Incentive",
|
|
1661
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1662
|
-
];
|
|
1663
|
-
const parameterNames = ["version", "liquidityPool", "storage", "rewardFund", "coinTypes", "ruleIds", "incentiveV3"];
|
|
1664
|
-
return (tx) => tx.moveCall({
|
|
1665
|
-
package: packageAddress,
|
|
1666
|
-
module: "lp_pool",
|
|
1667
|
-
function: "reward_navi",
|
|
1668
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1669
|
-
typeArguments: options.typeArguments,
|
|
1670
|
-
});
|
|
1671
|
-
}
|
|
1672
1219
|
function burnLp_(options) {
|
|
1673
1220
|
const packageAddress = options.package ?? "@typus/perp";
|
|
1674
1221
|
const argumentsTypes = [
|
|
@@ -1676,7 +1223,7 @@ function burnLp_(options) {
|
|
|
1676
1223
|
`${packageAddress}::lp_pool::Registry`,
|
|
1677
1224
|
"u64",
|
|
1678
1225
|
`${packageAddress}::treasury_caps::TreasuryCaps`,
|
|
1679
|
-
"
|
|
1226
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1680
1227
|
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
1681
1228
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1682
1229
|
];
|
|
@@ -1695,8 +1242,8 @@ function viewSwapResult(options) {
|
|
|
1695
1242
|
`${packageAddress}::admin::Version`,
|
|
1696
1243
|
`${packageAddress}::lp_pool::Registry`,
|
|
1697
1244
|
"u64",
|
|
1698
|
-
"
|
|
1699
|
-
"
|
|
1245
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1246
|
+
"0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73::oracle::Oracle",
|
|
1700
1247
|
"u64",
|
|
1701
1248
|
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1702
1249
|
];
|
|
@@ -1724,7 +1271,7 @@ function getExpiredReceiptCollateralBcs(options) {
|
|
|
1724
1271
|
const packageAddress = options.package ?? "@typus/perp";
|
|
1725
1272
|
const argumentsTypes = [
|
|
1726
1273
|
`${packageAddress}::lp_pool::Registry`,
|
|
1727
|
-
"
|
|
1274
|
+
"0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::typus_dov_single::Registry",
|
|
1728
1275
|
"u64",
|
|
1729
1276
|
];
|
|
1730
1277
|
const parameterNames = ["registry", "dovRegistry", "index"];
|
|
@@ -1914,26 +1461,6 @@ function getBorrowRateDecimal(options = {}) {
|
|
|
1914
1461
|
function: "get_borrow_rate_decimal",
|
|
1915
1462
|
});
|
|
1916
1463
|
}
|
|
1917
|
-
function burnLp(options) {
|
|
1918
|
-
const packageAddress = options.package ?? "@typus/perp";
|
|
1919
|
-
const argumentsTypes = [
|
|
1920
|
-
`${packageAddress}::admin::Version`,
|
|
1921
|
-
`${packageAddress}::lp_pool::Registry`,
|
|
1922
|
-
"u64",
|
|
1923
|
-
`${packageAddress}::treasury_caps::TreasuryCaps`,
|
|
1924
|
-
"0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a::oracle::Oracle",
|
|
1925
|
-
`0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<${options.typeArguments[1]}>`,
|
|
1926
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
1927
|
-
];
|
|
1928
|
-
const parameterNames = ["version", "registry", "index", "treasuryCaps", "oracle", "coin"];
|
|
1929
|
-
return (tx) => tx.moveCall({
|
|
1930
|
-
package: packageAddress,
|
|
1931
|
-
module: "lp_pool",
|
|
1932
|
-
function: "burn_lp",
|
|
1933
|
-
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
1934
|
-
typeArguments: options.typeArguments,
|
|
1935
|
-
});
|
|
1936
|
-
}
|
|
1937
1464
|
function deprecated(options = {}) {
|
|
1938
1465
|
const packageAddress = options.package ?? "@typus/perp";
|
|
1939
1466
|
return (tx) => tx.moveCall({
|