@alphafi/alphafi-sdk 0.0.39 → 0.0.40
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/cjs/adminFunctions.d.ts.map +1 -1
- package/dist/cjs/adminFunctions.js +9 -1
- package/dist/cjs/adminFunctions.js.map +1 -1
- package/dist/cjs/common/coins.d.ts.map +1 -1
- package/dist/cjs/common/coins.js +12 -0
- package/dist/cjs/common/coins.js.map +1 -1
- package/dist/cjs/common/constants.d.ts +135 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +98 -7
- package/dist/cjs/common/constants.js.map +1 -1
- package/dist/cjs/common/maps.d.ts.map +1 -1
- package/dist/cjs/common/maps.js +103 -16
- package/dist/cjs/common/maps.js.map +1 -1
- package/dist/cjs/common/types.d.ts +58 -5
- package/dist/cjs/common/types.d.ts.map +1 -1
- package/dist/cjs/common/types.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +9 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.js +2 -3
- package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.js.map +1 -1
- package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js +5 -11
- package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
- package/dist/cjs/sui-sdk/functions/getReceipts.d.ts +2 -2
- package/dist/cjs/sui-sdk/functions/getReceipts.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/functions/getReceipts.js +1 -1
- package/dist/cjs/sui-sdk/functions/getReceipts.js.map +1 -1
- package/dist/cjs/transactions/bluefin.d.ts +6 -0
- package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
- package/dist/cjs/transactions/bluefin.js +411 -34
- package/dist/cjs/transactions/bluefin.js.map +1 -1
- package/dist/cjs/transactions/cetus.d.ts +1 -1
- package/dist/cjs/transactions/cetus.d.ts.map +1 -1
- package/dist/cjs/transactions/cetus.js +3 -3
- package/dist/cjs/transactions/cetus.js.map +1 -1
- package/dist/cjs/transactions/deposit.d.ts.map +1 -1
- package/dist/cjs/transactions/deposit.js +9 -1
- package/dist/cjs/transactions/deposit.js.map +1 -1
- package/dist/cjs/transactions/withdraw.d.ts.map +1 -1
- package/dist/cjs/transactions/withdraw.js +9 -1
- package/dist/cjs/transactions/withdraw.js.map +1 -1
- package/dist/esm/adminFunctions.d.ts.map +1 -1
- package/dist/esm/adminFunctions.js +10 -2
- package/dist/esm/adminFunctions.js.map +1 -1
- package/dist/esm/common/coins.d.ts.map +1 -1
- package/dist/esm/common/coins.js +12 -0
- package/dist/esm/common/coins.js.map +1 -1
- package/dist/esm/common/constants.d.ts +135 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +98 -7
- package/dist/esm/common/constants.js.map +1 -1
- package/dist/esm/common/maps.d.ts.map +1 -1
- package/dist/esm/common/maps.js +103 -16
- package/dist/esm/common/maps.js.map +1 -1
- package/dist/esm/common/types.d.ts +58 -5
- package/dist/esm/common/types.d.ts.map +1 -1
- package/dist/esm/common/types.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.d.ts.map +1 -1
- package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.js +2 -3
- package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.js.map +1 -1
- package/dist/esm/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
- package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js +5 -11
- package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
- package/dist/esm/sui-sdk/functions/getReceipts.d.ts +2 -2
- package/dist/esm/sui-sdk/functions/getReceipts.d.ts.map +1 -1
- package/dist/esm/sui-sdk/functions/getReceipts.js +1 -1
- package/dist/esm/sui-sdk/functions/getReceipts.js.map +1 -1
- package/dist/esm/transactions/bluefin.d.ts +6 -0
- package/dist/esm/transactions/bluefin.d.ts.map +1 -1
- package/dist/esm/transactions/bluefin.js +408 -33
- package/dist/esm/transactions/bluefin.js.map +1 -1
- package/dist/esm/transactions/cetus.d.ts +1 -1
- package/dist/esm/transactions/cetus.d.ts.map +1 -1
- package/dist/esm/transactions/cetus.js +3 -3
- package/dist/esm/transactions/cetus.js.map +1 -1
- package/dist/esm/transactions/deposit.d.ts.map +1 -1
- package/dist/esm/transactions/deposit.js +10 -2
- package/dist/esm/transactions/deposit.js.map +1 -1
- package/dist/esm/transactions/withdraw.d.ts.map +1 -1
- package/dist/esm/transactions/withdraw.js +10 -2
- package/dist/esm/transactions/withdraw.js.map +1 -1
- package/docs/assets/highlight.css +101 -0
- package/docs/assets/icons.js +21 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +2218 -0
- package/docs/assets/navigation.js +2 -0
- package/docs/assets/search.js +2 -0
- package/docs/assets/style.css +1489 -0
- package/docs/functions/alphaLpBreakdown.html +253 -0
- package/docs/functions/bucketDepositTx.html +267 -0
- package/docs/functions/bucketWithdrawTx.html +267 -0
- package/docs/functions/cetusLpBreakdown.html +253 -0
- package/docs/functions/claimRewardTxb.html +243 -0
- package/docs/functions/coinAmountToXTokensDoubleAsset.html +267 -0
- package/docs/functions/coinAmountToXTokensSingleAsset.html +260 -0
- package/docs/functions/coinsInPool.html +438 -0
- package/docs/functions/collectRewards.html +242 -0
- package/docs/functions/deposit.html +246 -0
- package/docs/functions/depositAlphaTxb.html +250 -0
- package/docs/functions/depositBluefinSuiFirstTxb.html +302 -0
- package/docs/functions/depositBluefinType1Txb.html +300 -0
- package/docs/functions/depositBluefinType2Txb.html +300 -0
- package/docs/functions/depositCetusAlphaSuiTxb.html +300 -0
- package/docs/functions/depositCetusSuiTxb.html +298 -0
- package/docs/functions/depositCetusTxb.html +298 -0
- package/docs/functions/depositDoubleAssetTxb.html +270 -0
- package/docs/functions/depositSingleAssetTxb.html +263 -0
- package/docs/functions/fetchAfterTransactionEvents.html +306 -0
- package/docs/functions/fetchAutoCompoundingEvents.html +257 -0
- package/docs/functions/fetchAutoCompoundingEventsGql.html +251 -0
- package/docs/functions/fetchCetusPools.html +231 -0
- package/docs/functions/fetchChainIdentifier.html +233 -0
- package/docs/functions/fetchCheckRatioEvents.html +249 -0
- package/docs/functions/fetchLiquidityChangeEvents.html +257 -0
- package/docs/functions/fetchMultiReceipts.html +261 -0
- package/docs/functions/fetchNftHolders.html +233 -0
- package/docs/functions/fetchPools.html +230 -0
- package/docs/functions/fetchPortfolioData.html +243 -0
- package/docs/functions/fetchProtocolData.html +231 -0
- package/docs/functions/fetchTVL.html +253 -0
- package/docs/functions/fetchUserVaultBalances.html +245 -0
- package/docs/functions/fetchUserVaults.html +243 -0
- package/docs/functions/fetchUserWalletData.html +243 -0
- package/docs/functions/fetchWithdrawV2Events.html +255 -0
- package/docs/functions/getAirdropShare.html +243 -0
- package/docs/functions/getAllDoubleAssetVaults.html +235 -0
- package/docs/functions/getAllSingleAssetVaults.html +235 -0
- package/docs/functions/getAllVaultBalances.html +265 -0
- package/docs/functions/getAllVaults.html +233 -0
- package/docs/functions/getAlphaUnlocks.html +245 -0
- package/docs/functions/getAlphaVaultBalance.html +255 -0
- package/docs/functions/getAmounts.html +272 -0
- package/docs/functions/getApr.html +243 -0
- package/docs/functions/getAprs.html +255 -0
- package/docs/functions/getApy.html +243 -0
- package/docs/functions/getApys.html +255 -0
- package/docs/functions/getCetusInvestorTicksMap.html +284 -0
- package/docs/functions/getCetusSqrtPriceMap.html +249 -0
- package/docs/functions/getCoinAmountsFromLiquidity.html +266 -0
- package/docs/functions/getConf.html +9882 -0
- package/docs/functions/getCurrentTick.html +247 -0
- package/docs/functions/getDoubleAssetVaultBalance.html +268 -0
- package/docs/functions/getDoubleAssetVaults.html +253 -0
- package/docs/functions/getHoldersFromTransactions.html +299 -0
- package/docs/functions/getInvestor.html +259 -0
- package/docs/functions/getInvestorPoolMap.html +241 -0
- package/docs/functions/getLastAutoCompoundTime.html +249 -0
- package/docs/functions/getLiquidity.html +260 -0
- package/docs/functions/getParentPool.html +256 -0
- package/docs/functions/getPool.html +262 -0
- package/docs/functions/getPoolExchangeRateMap.html +249 -0
- package/docs/functions/getPositionTicks.html +249 -0
- package/docs/functions/getPriceToTick.html +254 -0
- package/docs/functions/getRebalanceHistories.html +269 -0
- package/docs/functions/getRebalanceHistory.html +255 -0
- package/docs/functions/getReceipts.html +268 -0
- package/docs/functions/getSingleAssetVaultBalance.html +268 -0
- package/docs/functions/getSingleAssetVaults.html +253 -0
- package/docs/functions/getSuiClient.html +247 -0
- package/docs/functions/getSuiNodeUrl.html +232 -0
- package/docs/functions/getTVLs.html +243 -0
- package/docs/functions/getTickToPrice.html +254 -0
- package/docs/functions/getUserTokensFromTransactions.html +269 -0
- package/docs/functions/getUserTokensInUsdFromTransactions.html +263 -0
- package/docs/functions/getVaultBalance.html +277 -0
- package/docs/functions/getVaultBalanceForActiveUsers.html +261 -0
- package/docs/functions/getVaults.html +250 -0
- package/docs/functions/getXTokenVaultBalanceForActiveUsers.html +261 -0
- package/docs/functions/lastAutocompoundTime.html +249 -0
- package/docs/functions/liquidityToTokens.html +253 -0
- package/docs/functions/loopingDeposit.html +277 -0
- package/docs/functions/loopingWithdraw.html +278 -0
- package/docs/functions/multiLiquidityToTokens.html +271 -0
- package/docs/functions/multiTokensToUsd.html +262 -0
- package/docs/functions/multiXTokensToLiquidity.html +257 -0
- package/docs/functions/naviDepositTx.html +278 -0
- package/docs/functions/naviHasuiSuiLoopDepositTx.html +271 -0
- package/docs/functions/naviHasuiSuiLoopWithdrawTx.html +271 -0
- package/docs/functions/naviSuiVsuiLoopDepositTx.html +271 -0
- package/docs/functions/naviSuiVsuiLoopWithdrawTx.html +271 -0
- package/docs/functions/naviUsdcUsdtLoopDepositTx.html +271 -0
- package/docs/functions/naviUsdcUsdtLoopWithdrawTx.html +271 -0
- package/docs/functions/naviUsdtUsdcLoopDepositTx.html +271 -0
- package/docs/functions/naviUsdtUsdcLoopWithdrawTx.html +271 -0
- package/docs/functions/naviWithdrawTx.html +278 -0
- package/docs/functions/parseUserWalletData.html +243 -0
- package/docs/functions/setSuiClient.html +255 -0
- package/docs/functions/setSuiNodeUrl.html +249 -0
- package/docs/functions/withdraw.html +249 -0
- package/docs/functions/withdrawAlphaTxb.html +257 -0
- package/docs/functions/withdrawBluefinSuiFirstTxb.html +282 -0
- package/docs/functions/withdrawBluefinType1Txb.html +280 -0
- package/docs/functions/withdrawBluefinType2Txb.html +280 -0
- package/docs/functions/withdrawCetusAlphaSuiTxb.html +282 -0
- package/docs/functions/withdrawCetusSuiTxb.html +278 -0
- package/docs/functions/withdrawCetusTxb.html +278 -0
- package/docs/functions/withdrawTxb.html +260 -0
- package/docs/index.html +622 -0
- package/docs/interfaces/Coin.html +474 -0
- package/docs/interfaces/CoinPair.html +358 -0
- package/docs/interfaces/NaviVoloData.html +514 -0
- package/docs/interfaces/RebalanceHistoryType.html +652 -0
- package/docs/modules.html +1440 -0
- package/docs/types/AfterTransactionEventNode.html +305 -0
- package/docs/types/Allocator.html +321 -0
- package/docs/types/AlphaFiDoubleAssetVault.html +258 -0
- package/docs/types/AlphaFiMultiVaultBalance.html +219 -0
- package/docs/types/AlphaFiSingleAssetVault.html +244 -0
- package/docs/types/AlphaFiVault.html +214 -0
- package/docs/types/AlphaFiVaultBalance.html +220 -0
- package/docs/types/AlphaPoolType.html +383 -0
- package/docs/types/AlphaReceipt.html +220 -0
- package/docs/types/AlphaReceiptFields.html +421 -0
- package/docs/types/AlphaVaultBalance.html +245 -0
- package/docs/types/AutoCompoundingEventNode.html +225 -0
- package/docs/types/BluefinInvestor.html +209 -0
- package/docs/types/BluefinPoolType.html +209 -0
- package/docs/types/BucketInvestor.html +249 -0
- package/docs/types/CetusInvestor.html +240 -0
- package/docs/types/CetusPoolType.html +433 -0
- package/docs/types/CetusSwapOptions.html +209 -0
- package/docs/types/CoinAmounts.html +216 -0
- package/docs/types/CoinName.html +281 -0
- package/docs/types/CoinType.html +282 -0
- package/docs/types/CommonInvestorFields.html +276 -0
- package/docs/types/CreatePoolOptions.html +246 -0
- package/docs/types/Distributor.html +341 -0
- package/docs/types/DoubleAssetMultiVaultBalance.html +236 -0
- package/docs/types/DoubleAssetPoolNames.html +267 -0
- package/docs/types/DoubleAssetTokenHoldings.html +232 -0
- package/docs/types/DoubleAssetVaultBalance.html +229 -0
- package/docs/types/GetHoldersParams.html +221 -0
- package/docs/types/GetTokenHoldingsParams.html +227 -0
- package/docs/types/GetUserTokensFromTransactionsParams.html +233 -0
- package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +244 -0
- package/docs/types/GetVaultBalanceForActiveUsersParams.html +231 -0
- package/docs/types/GetVaultBalanceParams.html +217 -0
- package/docs/types/HoldingsObj.html +223 -0
- package/docs/types/Icon.html +266 -0
- package/docs/types/Investor.html +245 -0
- package/docs/types/LiquidityChangeEventNode.html +220 -0
- package/docs/types/LiquidityToTokensParams.html +255 -0
- package/docs/types/LiquidityToUsdParams.html +267 -0
- package/docs/types/LoopingDebt.html +258 -0
- package/docs/types/LpBreakdownType.html +238 -0
- package/docs/types/MemberPoolDataType.html +276 -0
- package/docs/types/MemberType.html +269 -0
- package/docs/types/MultiGetVaultBalancesParams.html +229 -0
- package/docs/types/NaviInvestor.html +235 -0
- package/docs/types/OtherReceiptFields.html +373 -0
- package/docs/types/PoolName.html +304 -0
- package/docs/types/PoolReceipt.html +253 -0
- package/docs/types/PoolType.html +388 -0
- package/docs/types/Receipt.html +475 -0
- package/docs/types/ReceiptGQL.html +374 -0
- package/docs/types/SingleAssetMultiVaultBalance.html +232 -0
- package/docs/types/SingleAssetPoolNames.html +247 -0
- package/docs/types/SingleAssetTokenHoldings.html +228 -0
- package/docs/types/SingleAssetVaultBalance.html +223 -0
- package/docs/types/SingleGetVaultBalancesParams.html +224 -0
- package/docs/types/StrategyType.html +217 -0
- package/docs/types/SuiNetwork.html +213 -0
- package/docs/types/SwapOptions.html +248 -0
- package/docs/types/TickSpacing.html +212 -0
- package/docs/types/TotalWeightType.html +246 -0
- package/docs/types/TransactionBlockType.html +358 -0
- package/docs/types/UserPoolLiquidity.html +221 -0
- package/docs/types/UserPoolTokenHoldings.html +217 -0
- package/docs/types/UserUsdHoldings.html +223 -0
- package/docs/types/VaultBalance.html +216 -0
- package/docs/types/WithdrawV2EventNode.html +208 -0
- package/docs/variables/bluefinPoolMap.html +214 -0
- package/docs/variables/cetusPoolMap.html +214 -0
- package/docs/variables/coinsList.html +220 -0
- package/docs/variables/defunctPoolsSet.html +209 -0
- package/docs/variables/doubleAssetPoolCoinMap.html +237 -0
- package/docs/variables/loopingAccountAddresses.html +219 -0
- package/docs/variables/loopingPoolCoinMap.html +233 -0
- package/docs/variables/naviAssetMap.html +215 -0
- package/docs/variables/poolIdPoolNameMap.html +218 -0
- package/docs/variables/poolInfo.html +304 -0
- package/docs/variables/singleAssetPoolCoinMap.html +229 -0
- package/docs/variables/stableCoins.html +207 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withdrawBluefinType2Txb = exports.withdrawBluefinType1Txb = exports.withdrawBluefinSuiFirstTxb = exports.depositBluefinType2Txb = exports.depositBluefinType1Txb = exports.depositBluefinSuiFirstTxb = void 0;
|
|
3
|
+
exports.withdrawBluefinType2Txb = exports.withdrawBluefinType1Txb = exports.withdrawBluefinSuiSecondTxb = exports.withdrawBluefinSuiFirstTxb = exports.depositBluefinType2Txb = exports.depositBluefinType1Txb = exports.depositBluefinSuiSecondTxb = exports.depositBluefinSuiFirstTxb = void 0;
|
|
4
4
|
const transactions_1 = require("@mysten/sui/transactions");
|
|
5
5
|
const coins_js_1 = require("../common/coins.js");
|
|
6
6
|
const constants_js_1 = require("../common/constants.js");
|
|
@@ -67,14 +67,13 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
67
67
|
arguments: [txb.object(receipt[0].objectId)],
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
console.log(poolinfo.poolId);
|
|
71
70
|
if (poolName === "BLUEFIN-SUI-USDC") {
|
|
72
71
|
txb.moveCall({
|
|
73
72
|
target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_deposit`,
|
|
74
73
|
typeArguments: [
|
|
75
74
|
coins_js_1.coinsList[pool1].type,
|
|
76
75
|
coins_js_1.coinsList[pool2].type,
|
|
77
|
-
coins_js_1.coinsList["
|
|
76
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
78
77
|
coins_js_1.coinsList["SUI"].type,
|
|
79
78
|
],
|
|
80
79
|
arguments: [
|
|
@@ -89,7 +88,7 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
89
88
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
90
89
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
91
90
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
|
|
92
|
-
txb.object((0, constants_js_1.getConf)().
|
|
91
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
93
92
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
94
93
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
95
94
|
],
|
|
@@ -101,7 +100,7 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
101
100
|
typeArguments: [
|
|
102
101
|
coins_js_1.coinsList[pool1].type,
|
|
103
102
|
coins_js_1.coinsList[pool2].type,
|
|
104
|
-
coins_js_1.coinsList["
|
|
103
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
105
104
|
coins_js_1.coinsList["SUI"].type,
|
|
106
105
|
],
|
|
107
106
|
arguments: [
|
|
@@ -116,7 +115,7 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
116
115
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
117
116
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
118
117
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_BUCK_POOL),
|
|
119
|
-
txb.object((0, constants_js_1.getConf)().
|
|
118
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
120
119
|
txb.object(maps_js_1.cetusPoolMap["BUCK-SUI"]),
|
|
121
120
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
122
121
|
],
|
|
@@ -128,7 +127,7 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
128
127
|
typeArguments: [
|
|
129
128
|
coins_js_1.coinsList[pool1].type,
|
|
130
129
|
coins_js_1.coinsList[pool2].type,
|
|
131
|
-
coins_js_1.coinsList["
|
|
130
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
132
131
|
coins_js_1.coinsList["SUI"].type,
|
|
133
132
|
],
|
|
134
133
|
arguments: [
|
|
@@ -143,7 +142,7 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
143
142
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
144
143
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
145
144
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_AUSD_POOL),
|
|
146
|
-
txb.object((0, constants_js_1.getConf)().
|
|
145
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
147
146
|
txb.object(maps_js_1.cetusPoolMap["AUSD-SUI"]),
|
|
148
147
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
149
148
|
],
|
|
@@ -158,6 +157,155 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
|
|
|
158
157
|
return txb;
|
|
159
158
|
};
|
|
160
159
|
exports.depositBluefinSuiFirstTxb = depositBluefinSuiFirstTxb;
|
|
160
|
+
const depositBluefinSuiSecondTxb = async (amount, poolName, isAmountA, options, transaction = undefined) => {
|
|
161
|
+
const suiClient = (0, client_js_1.getSuiClient)();
|
|
162
|
+
const address = options.address;
|
|
163
|
+
let txb;
|
|
164
|
+
if (transaction)
|
|
165
|
+
txb = transaction;
|
|
166
|
+
else
|
|
167
|
+
txb = new transactions_1.Transaction();
|
|
168
|
+
poolName = poolName.toUpperCase();
|
|
169
|
+
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
170
|
+
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
171
|
+
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
172
|
+
let coins1 = [];
|
|
173
|
+
let currentCursor = null;
|
|
174
|
+
do {
|
|
175
|
+
const response = await suiClient.getCoins({
|
|
176
|
+
owner: address,
|
|
177
|
+
coinType: coins_js_1.coinsList[pool1].type,
|
|
178
|
+
cursor: currentCursor,
|
|
179
|
+
});
|
|
180
|
+
coins1 = coins1.concat(response.data);
|
|
181
|
+
// Check if there's a next page
|
|
182
|
+
if (response.hasNextPage && response.nextCursor) {
|
|
183
|
+
currentCursor = response.nextCursor;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
// No more pages available
|
|
187
|
+
// console.log("No more receipts available.");
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
} while (true);
|
|
191
|
+
const amounts = await (0, cetus_js_1.getAmounts)(poolName, isAmountA, amount);
|
|
192
|
+
if (amounts) {
|
|
193
|
+
const amount1 = amounts[0];
|
|
194
|
+
const amount2 = amounts[1];
|
|
195
|
+
let coin1;
|
|
196
|
+
if (coins1.length >= 1) {
|
|
197
|
+
//coin1
|
|
198
|
+
[coin1] = txb.splitCoins(txb.object(coins1[0].coinObjectId), [0]);
|
|
199
|
+
txb.mergeCoins(coin1, coins1.map((c) => c.coinObjectId));
|
|
200
|
+
const [depositCoinA] = txb.splitCoins(coin1, [amount1]);
|
|
201
|
+
//coin2
|
|
202
|
+
const [depositCoinB] = txb.splitCoins(txb.gas, [amount2]);
|
|
203
|
+
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
204
|
+
let someReceipt;
|
|
205
|
+
if (receipt.length == 0) {
|
|
206
|
+
[someReceipt] = txb.moveCall({
|
|
207
|
+
target: `0x1::option::none`,
|
|
208
|
+
typeArguments: [poolinfo.receiptType],
|
|
209
|
+
arguments: [],
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
[someReceipt] = txb.moveCall({
|
|
214
|
+
target: `0x1::option::some`,
|
|
215
|
+
typeArguments: [receipt[0].content.type],
|
|
216
|
+
arguments: [txb.object(receipt[0].objectId)],
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
if (poolName === "BLUEFIN-BLUE-SUI") {
|
|
220
|
+
txb.moveCall({
|
|
221
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_deposit`,
|
|
222
|
+
typeArguments: [
|
|
223
|
+
coins_js_1.coinsList[pool1].type,
|
|
224
|
+
coins_js_1.coinsList[pool2].type,
|
|
225
|
+
coins_js_1.coinsList["DEEP"].type,
|
|
226
|
+
coins_js_1.coinsList["SUI"].type,
|
|
227
|
+
],
|
|
228
|
+
arguments: [
|
|
229
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
230
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
231
|
+
someReceipt,
|
|
232
|
+
txb.object(poolinfo.poolId),
|
|
233
|
+
depositCoinA,
|
|
234
|
+
depositCoinB,
|
|
235
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
236
|
+
txb.object(poolinfo.investorId),
|
|
237
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
238
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
239
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL),
|
|
240
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_DEEP_SUI_POOL),
|
|
241
|
+
txb.object(maps_js_1.cetusPoolMap["BLUE-SUI"]),
|
|
242
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
243
|
+
],
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
else if (poolName === "BLUEFIN-WBTC-SUI") {
|
|
247
|
+
txb.moveCall({
|
|
248
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_deposit`,
|
|
249
|
+
typeArguments: [
|
|
250
|
+
coins_js_1.coinsList[pool1].type,
|
|
251
|
+
coins_js_1.coinsList[pool2].type,
|
|
252
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
253
|
+
coins_js_1.coinsList["SUI"].type,
|
|
254
|
+
],
|
|
255
|
+
arguments: [
|
|
256
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
257
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
258
|
+
someReceipt,
|
|
259
|
+
txb.object(poolinfo.poolId),
|
|
260
|
+
depositCoinA,
|
|
261
|
+
depositCoinB,
|
|
262
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
263
|
+
txb.object(poolinfo.investorId),
|
|
264
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
265
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
266
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_WBTC_SUI_POOL),
|
|
267
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL),
|
|
268
|
+
txb.object(maps_js_1.cetusPoolMap["WBTC-SUI"]),
|
|
269
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
270
|
+
],
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
else if (poolName === "BLUEFIN-DEEP-SUI") {
|
|
274
|
+
txb.moveCall({
|
|
275
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_deposit`,
|
|
276
|
+
typeArguments: [
|
|
277
|
+
coins_js_1.coinsList[pool1].type,
|
|
278
|
+
coins_js_1.coinsList[pool2].type,
|
|
279
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
280
|
+
coins_js_1.coinsList["SUI"].type,
|
|
281
|
+
],
|
|
282
|
+
arguments: [
|
|
283
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
284
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
285
|
+
someReceipt,
|
|
286
|
+
txb.object(poolinfo.poolId),
|
|
287
|
+
depositCoinA,
|
|
288
|
+
depositCoinB,
|
|
289
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
290
|
+
txb.object(poolinfo.investorId),
|
|
291
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
292
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
293
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_DEEP_SUI_POOL),
|
|
294
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL),
|
|
295
|
+
txb.object(maps_js_1.cetusPoolMap["DEEP-SUI"]),
|
|
296
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
297
|
+
],
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
txb.transferObjects([coin1], address);
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
throw new Error(`No ${pool1} or ${pool2} Coins`);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return txb;
|
|
307
|
+
};
|
|
308
|
+
exports.depositBluefinSuiSecondTxb = depositBluefinSuiSecondTxb;
|
|
161
309
|
const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, transaction = undefined) => {
|
|
162
310
|
const suiClient = (0, client_js_1.getSuiClient)();
|
|
163
311
|
const address = options.address;
|
|
@@ -245,7 +393,7 @@ const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
245
393
|
typeArguments: [
|
|
246
394
|
coins_js_1.coinsList[pool1].type,
|
|
247
395
|
coins_js_1.coinsList[pool2].type,
|
|
248
|
-
coins_js_1.coinsList["
|
|
396
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
249
397
|
coins_js_1.coinsList["SUI"].type,
|
|
250
398
|
],
|
|
251
399
|
arguments: [
|
|
@@ -260,7 +408,7 @@ const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
260
408
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
261
409
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
262
410
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_USDT_USDC_POOL),
|
|
263
|
-
txb.object((0, constants_js_1.getConf)().
|
|
411
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
264
412
|
txb.object(maps_js_1.cetusPoolMap["USDC-USDT"]),
|
|
265
413
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
266
414
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
@@ -273,7 +421,7 @@ const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
273
421
|
typeArguments: [
|
|
274
422
|
coins_js_1.coinsList[pool1].type,
|
|
275
423
|
coins_js_1.coinsList[pool2].type,
|
|
276
|
-
coins_js_1.coinsList["
|
|
424
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
277
425
|
coins_js_1.coinsList["SUI"].type,
|
|
278
426
|
],
|
|
279
427
|
arguments: [
|
|
@@ -288,7 +436,7 @@ const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
288
436
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
289
437
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
290
438
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_AUSD_USDC_POOL),
|
|
291
|
-
txb.object((0, constants_js_1.getConf)().
|
|
439
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
292
440
|
txb.object(maps_js_1.cetusPoolMap["USDC-AUSD"]),
|
|
293
441
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
294
442
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
@@ -301,7 +449,7 @@ const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
301
449
|
typeArguments: [
|
|
302
450
|
coins_js_1.coinsList[pool1].type,
|
|
303
451
|
coins_js_1.coinsList[pool2].type,
|
|
304
|
-
coins_js_1.coinsList["
|
|
452
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
305
453
|
coins_js_1.coinsList["SUI"].type,
|
|
306
454
|
],
|
|
307
455
|
arguments: [
|
|
@@ -316,13 +464,41 @@ const depositBluefinType1Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
316
464
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
317
465
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
318
466
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_WBTC_USDC_POOL),
|
|
319
|
-
txb.object((0, constants_js_1.getConf)().
|
|
467
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
320
468
|
txb.object(maps_js_1.cetusPoolMap["USDC-WBTC"]),
|
|
321
469
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
322
470
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
323
471
|
],
|
|
324
472
|
});
|
|
325
473
|
}
|
|
474
|
+
else if (poolName === "BLUEFIN-SEND-USDC") {
|
|
475
|
+
txb.moveCall({
|
|
476
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_pool::user_deposit`,
|
|
477
|
+
typeArguments: [
|
|
478
|
+
coins_js_1.coinsList[pool1].type,
|
|
479
|
+
coins_js_1.coinsList[pool2].type,
|
|
480
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
481
|
+
coins_js_1.coinsList["SUI"].type,
|
|
482
|
+
],
|
|
483
|
+
arguments: [
|
|
484
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
485
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
486
|
+
someReceipt,
|
|
487
|
+
txb.object(poolinfo.poolId),
|
|
488
|
+
depositCoinA,
|
|
489
|
+
depositCoinB,
|
|
490
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
491
|
+
txb.object(poolinfo.investorId),
|
|
492
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
493
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
494
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_SEND_USDC_POOL),
|
|
495
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
496
|
+
txb.object(maps_js_1.cetusPoolMap["USDC-SEND"]),
|
|
497
|
+
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
498
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
499
|
+
],
|
|
500
|
+
});
|
|
501
|
+
}
|
|
326
502
|
txb.transferObjects([coin1], address);
|
|
327
503
|
txb.transferObjects([coin2], address);
|
|
328
504
|
}
|
|
@@ -420,7 +596,7 @@ const depositBluefinType2Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
420
596
|
typeArguments: [
|
|
421
597
|
coins_js_1.coinsList[pool1].type,
|
|
422
598
|
coins_js_1.coinsList[pool2].type,
|
|
423
|
-
coins_js_1.coinsList["
|
|
599
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
424
600
|
coins_js_1.coinsList["SUI"].type,
|
|
425
601
|
],
|
|
426
602
|
arguments: [
|
|
@@ -435,7 +611,7 @@ const depositBluefinType2Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
435
611
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
436
612
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
437
613
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_ALPHA_USDC_POOL),
|
|
438
|
-
txb.object((0, constants_js_1.getConf)().
|
|
614
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
439
615
|
txb.object(maps_js_1.cetusPoolMap["ALPHA-USDC"]),
|
|
440
616
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
441
617
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
@@ -448,7 +624,7 @@ const depositBluefinType2Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
448
624
|
typeArguments: [
|
|
449
625
|
coins_js_1.coinsList[pool1].type,
|
|
450
626
|
coins_js_1.coinsList[pool2].type,
|
|
451
|
-
coins_js_1.coinsList["
|
|
627
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
452
628
|
coins_js_1.coinsList["SUI"].type,
|
|
453
629
|
],
|
|
454
630
|
arguments: [
|
|
@@ -463,13 +639,41 @@ const depositBluefinType2Txb = async (amount, poolName, isAmountA, options, tran
|
|
|
463
639
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
464
640
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
465
641
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_NAVX_VSUI_POOL),
|
|
466
|
-
txb.object((0, constants_js_1.getConf)().
|
|
642
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
467
643
|
txb.object(maps_js_1.cetusPoolMap["NAVX-VSUI"]),
|
|
468
644
|
txb.object(maps_js_1.cetusPoolMap["VSUI-SUI"]),
|
|
469
645
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
470
646
|
],
|
|
471
647
|
});
|
|
472
648
|
}
|
|
649
|
+
else if (poolName === "BLUEFIN-BLUE-USDC") {
|
|
650
|
+
txb.moveCall({
|
|
651
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_type_2_pool::user_deposit`,
|
|
652
|
+
typeArguments: [
|
|
653
|
+
coins_js_1.coinsList[pool1].type,
|
|
654
|
+
coins_js_1.coinsList[pool2].type,
|
|
655
|
+
coins_js_1.coinsList["DEEP"].type,
|
|
656
|
+
coins_js_1.coinsList["SUI"].type,
|
|
657
|
+
],
|
|
658
|
+
arguments: [
|
|
659
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
660
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
661
|
+
someReceipt,
|
|
662
|
+
txb.object(poolinfo.poolId),
|
|
663
|
+
depositCoinA,
|
|
664
|
+
depositCoinB,
|
|
665
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
666
|
+
txb.object(poolinfo.investorId),
|
|
667
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
668
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
669
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_USDC_POOL),
|
|
670
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_DEEP_SUI_POOL),
|
|
671
|
+
txb.object(maps_js_1.cetusPoolMap["BLUE-USDC"]),
|
|
672
|
+
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
673
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
674
|
+
],
|
|
675
|
+
});
|
|
676
|
+
}
|
|
473
677
|
txb.transferObjects([coin1], address);
|
|
474
678
|
txb.transferObjects([coin2], address);
|
|
475
679
|
}
|
|
@@ -510,7 +714,7 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
510
714
|
typeArguments: [
|
|
511
715
|
coins_js_1.coinsList[pool1].type,
|
|
512
716
|
coins_js_1.coinsList[pool2].type,
|
|
513
|
-
coins_js_1.coinsList["
|
|
717
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
514
718
|
coins_js_1.coinsList["SUI"].type,
|
|
515
719
|
],
|
|
516
720
|
arguments: [
|
|
@@ -526,7 +730,7 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
526
730
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
527
731
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
528
732
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
|
|
529
|
-
txb.object((0, constants_js_1.getConf)().
|
|
733
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
530
734
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
531
735
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
532
736
|
],
|
|
@@ -538,7 +742,7 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
538
742
|
typeArguments: [
|
|
539
743
|
coins_js_1.coinsList[pool1].type,
|
|
540
744
|
coins_js_1.coinsList[pool2].type,
|
|
541
|
-
coins_js_1.coinsList["
|
|
745
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
542
746
|
coins_js_1.coinsList["SUI"].type,
|
|
543
747
|
],
|
|
544
748
|
arguments: [
|
|
@@ -554,7 +758,7 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
554
758
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
555
759
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
556
760
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_BUCK_POOL),
|
|
557
|
-
txb.object((0, constants_js_1.getConf)().
|
|
761
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
558
762
|
txb.object(maps_js_1.cetusPoolMap["BUCK-SUI"]),
|
|
559
763
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
560
764
|
],
|
|
@@ -566,7 +770,7 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
566
770
|
typeArguments: [
|
|
567
771
|
coins_js_1.coinsList[pool1].type,
|
|
568
772
|
coins_js_1.coinsList[pool2].type,
|
|
569
|
-
coins_js_1.coinsList["
|
|
773
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
570
774
|
coins_js_1.coinsList["SUI"].type,
|
|
571
775
|
],
|
|
572
776
|
arguments: [
|
|
@@ -582,7 +786,7 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
582
786
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
583
787
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
584
788
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_AUSD_POOL),
|
|
585
|
-
txb.object((0, constants_js_1.getConf)().
|
|
789
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
586
790
|
txb.object(maps_js_1.cetusPoolMap["AUSD-SUI"]),
|
|
587
791
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
588
792
|
],
|
|
@@ -595,6 +799,121 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
595
799
|
return txb;
|
|
596
800
|
};
|
|
597
801
|
exports.withdrawBluefinSuiFirstTxb = withdrawBluefinSuiFirstTxb;
|
|
802
|
+
const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) => {
|
|
803
|
+
const address = options.address;
|
|
804
|
+
const txb = new transactions_1.Transaction();
|
|
805
|
+
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
806
|
+
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
807
|
+
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
808
|
+
const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
|
|
809
|
+
if (receipt.length > 0) {
|
|
810
|
+
let alpha_receipt;
|
|
811
|
+
if (alphaReceipt.length == 0) {
|
|
812
|
+
[alpha_receipt] = txb.moveCall({
|
|
813
|
+
target: `0x1::option::none`,
|
|
814
|
+
typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
815
|
+
arguments: [],
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
[alpha_receipt] = txb.moveCall({
|
|
820
|
+
target: `0x1::option::some`,
|
|
821
|
+
typeArguments: [alphaReceipt[0].content.type],
|
|
822
|
+
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
826
|
+
if (poolName === "BLUEFIN-BLUE-SUI") {
|
|
827
|
+
txb.moveCall({
|
|
828
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw`,
|
|
829
|
+
typeArguments: [
|
|
830
|
+
coins_js_1.coinsList[pool1].type,
|
|
831
|
+
coins_js_1.coinsList[pool2].type,
|
|
832
|
+
coins_js_1.coinsList["DEEP"].type,
|
|
833
|
+
coins_js_1.coinsList["SUI"].type,
|
|
834
|
+
],
|
|
835
|
+
arguments: [
|
|
836
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
837
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
838
|
+
txb.object(receipt[0].objectId),
|
|
839
|
+
alpha_receipt,
|
|
840
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
|
|
841
|
+
txb.object(poolinfo.poolId),
|
|
842
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
843
|
+
txb.object(poolinfo.investorId),
|
|
844
|
+
txb.pure.u128(xTokens),
|
|
845
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
846
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
847
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL),
|
|
848
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_DEEP_SUI_POOL),
|
|
849
|
+
txb.object(maps_js_1.cetusPoolMap["BLUE-SUI"]),
|
|
850
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
851
|
+
],
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
else if (poolName === "BLUEFIN-WBTC-SUI") {
|
|
855
|
+
txb.moveCall({
|
|
856
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw`,
|
|
857
|
+
typeArguments: [
|
|
858
|
+
coins_js_1.coinsList[pool1].type,
|
|
859
|
+
coins_js_1.coinsList[pool2].type,
|
|
860
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
861
|
+
coins_js_1.coinsList["SUI"].type,
|
|
862
|
+
],
|
|
863
|
+
arguments: [
|
|
864
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
865
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
866
|
+
txb.object(receipt[0].objectId),
|
|
867
|
+
alpha_receipt,
|
|
868
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
|
|
869
|
+
txb.object(poolinfo.poolId),
|
|
870
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
871
|
+
txb.object(poolinfo.investorId),
|
|
872
|
+
txb.pure.u128(xTokens),
|
|
873
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
874
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
875
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_WBTC_SUI_POOL),
|
|
876
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL),
|
|
877
|
+
txb.object(maps_js_1.cetusPoolMap["WBTC-SUI"]),
|
|
878
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
879
|
+
],
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
else if (poolName === "BLUEFIN-DEEP-SUI") {
|
|
883
|
+
txb.moveCall({
|
|
884
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw`,
|
|
885
|
+
typeArguments: [
|
|
886
|
+
coins_js_1.coinsList[pool1].type,
|
|
887
|
+
coins_js_1.coinsList[pool2].type,
|
|
888
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
889
|
+
coins_js_1.coinsList["SUI"].type,
|
|
890
|
+
],
|
|
891
|
+
arguments: [
|
|
892
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
893
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
894
|
+
txb.object(receipt[0].objectId),
|
|
895
|
+
alpha_receipt,
|
|
896
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
|
|
897
|
+
txb.object(poolinfo.poolId),
|
|
898
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
899
|
+
txb.object(poolinfo.investorId),
|
|
900
|
+
txb.pure.u128(xTokens),
|
|
901
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
902
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
903
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_DEEP_SUI_POOL),
|
|
904
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL),
|
|
905
|
+
txb.object(maps_js_1.cetusPoolMap["DEEP-SUI"]),
|
|
906
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
907
|
+
],
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
throw new Error("No receipt found!");
|
|
913
|
+
}
|
|
914
|
+
return txb;
|
|
915
|
+
};
|
|
916
|
+
exports.withdrawBluefinSuiSecondTxb = withdrawBluefinSuiSecondTxb;
|
|
598
917
|
const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
599
918
|
const address = options.address;
|
|
600
919
|
const txb = new transactions_1.Transaction();
|
|
@@ -625,7 +944,7 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
625
944
|
typeArguments: [
|
|
626
945
|
coins_js_1.coinsList[pool1].type,
|
|
627
946
|
coins_js_1.coinsList[pool2].type,
|
|
628
|
-
coins_js_1.coinsList["
|
|
947
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
629
948
|
coins_js_1.coinsList["SUI"].type,
|
|
630
949
|
],
|
|
631
950
|
arguments: [
|
|
@@ -641,7 +960,7 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
641
960
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
642
961
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
643
962
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_USDT_USDC_POOL),
|
|
644
|
-
txb.object((0, constants_js_1.getConf)().
|
|
963
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
645
964
|
txb.object(maps_js_1.cetusPoolMap["USDC-USDT"]),
|
|
646
965
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
647
966
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
@@ -654,7 +973,7 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
654
973
|
typeArguments: [
|
|
655
974
|
coins_js_1.coinsList[pool1].type,
|
|
656
975
|
coins_js_1.coinsList[pool2].type,
|
|
657
|
-
coins_js_1.coinsList["
|
|
976
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
658
977
|
coins_js_1.coinsList["SUI"].type,
|
|
659
978
|
],
|
|
660
979
|
arguments: [
|
|
@@ -670,7 +989,7 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
670
989
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
671
990
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
672
991
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_AUSD_USDC_POOL),
|
|
673
|
-
txb.object((0, constants_js_1.getConf)().
|
|
992
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
674
993
|
txb.object(maps_js_1.cetusPoolMap["USDC-AUSD"]),
|
|
675
994
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
676
995
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
@@ -683,7 +1002,7 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
683
1002
|
typeArguments: [
|
|
684
1003
|
coins_js_1.coinsList[pool1].type,
|
|
685
1004
|
coins_js_1.coinsList[pool2].type,
|
|
686
|
-
coins_js_1.coinsList["
|
|
1005
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
687
1006
|
coins_js_1.coinsList["SUI"].type,
|
|
688
1007
|
],
|
|
689
1008
|
arguments: [
|
|
@@ -699,13 +1018,42 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
699
1018
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
700
1019
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
701
1020
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_WBTC_USDC_POOL),
|
|
702
|
-
txb.object((0, constants_js_1.getConf)().
|
|
1021
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
703
1022
|
txb.object(maps_js_1.cetusPoolMap["USDC-WBTC"]),
|
|
704
1023
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
705
1024
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
706
1025
|
],
|
|
707
1026
|
});
|
|
708
1027
|
}
|
|
1028
|
+
else if (poolName === "BLUEFIN-SEND-USDC") {
|
|
1029
|
+
txb.moveCall({
|
|
1030
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_pool::user_withdraw`,
|
|
1031
|
+
typeArguments: [
|
|
1032
|
+
coins_js_1.coinsList[pool1].type,
|
|
1033
|
+
coins_js_1.coinsList[pool2].type,
|
|
1034
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
1035
|
+
coins_js_1.coinsList["SUI"].type,
|
|
1036
|
+
],
|
|
1037
|
+
arguments: [
|
|
1038
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
1039
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
1040
|
+
txb.object(receipt[0].objectId),
|
|
1041
|
+
alpha_receipt,
|
|
1042
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
|
|
1043
|
+
txb.object(poolinfo.poolId),
|
|
1044
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
1045
|
+
txb.object(poolinfo.investorId),
|
|
1046
|
+
txb.pure.u128(xTokens),
|
|
1047
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
1048
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
1049
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_SEND_USDC_POOL),
|
|
1050
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
1051
|
+
txb.object(maps_js_1.cetusPoolMap["USDC-SEND"]),
|
|
1052
|
+
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
1053
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
1054
|
+
],
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
709
1057
|
}
|
|
710
1058
|
else {
|
|
711
1059
|
throw new Error("No receipt found!");
|
|
@@ -743,7 +1091,7 @@ const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
743
1091
|
typeArguments: [
|
|
744
1092
|
coins_js_1.coinsList[pool1].type,
|
|
745
1093
|
coins_js_1.coinsList[pool2].type,
|
|
746
|
-
coins_js_1.coinsList["
|
|
1094
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
747
1095
|
coins_js_1.coinsList["SUI"].type,
|
|
748
1096
|
],
|
|
749
1097
|
arguments: [
|
|
@@ -759,7 +1107,7 @@ const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
759
1107
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
760
1108
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
761
1109
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_ALPHA_USDC_POOL),
|
|
762
|
-
txb.object((0, constants_js_1.getConf)().
|
|
1110
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
763
1111
|
txb.object(maps_js_1.cetusPoolMap["ALPHA-USDC"]),
|
|
764
1112
|
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
765
1113
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
@@ -772,7 +1120,7 @@ const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
772
1120
|
typeArguments: [
|
|
773
1121
|
coins_js_1.coinsList[pool1].type,
|
|
774
1122
|
coins_js_1.coinsList[pool2].type,
|
|
775
|
-
coins_js_1.coinsList["
|
|
1123
|
+
coins_js_1.coinsList["BLUE"].type,
|
|
776
1124
|
coins_js_1.coinsList["SUI"].type,
|
|
777
1125
|
],
|
|
778
1126
|
arguments: [
|
|
@@ -788,13 +1136,42 @@ const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
788
1136
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
789
1137
|
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
790
1138
|
txb.object((0, constants_js_1.getConf)().BLUEFIN_NAVX_VSUI_POOL),
|
|
791
|
-
txb.object((0, constants_js_1.getConf)().
|
|
1139
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
792
1140
|
txb.object(maps_js_1.cetusPoolMap["NAVX-VSUI"]),
|
|
793
1141
|
txb.object(maps_js_1.cetusPoolMap["VSUI-SUI"]),
|
|
794
1142
|
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
795
1143
|
],
|
|
796
1144
|
});
|
|
797
1145
|
}
|
|
1146
|
+
else if (poolName === "BLUEFIN-BLUE-USDC") {
|
|
1147
|
+
txb.moveCall({
|
|
1148
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_type_2_pool::user_withdraw`,
|
|
1149
|
+
typeArguments: [
|
|
1150
|
+
coins_js_1.coinsList[pool1].type,
|
|
1151
|
+
coins_js_1.coinsList[pool2].type,
|
|
1152
|
+
coins_js_1.coinsList["DEEP"].type,
|
|
1153
|
+
coins_js_1.coinsList["SUI"].type,
|
|
1154
|
+
],
|
|
1155
|
+
arguments: [
|
|
1156
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
|
|
1157
|
+
txb.object((0, constants_js_1.getConf)().VERSION),
|
|
1158
|
+
txb.object(receipt[0].objectId),
|
|
1159
|
+
alpha_receipt,
|
|
1160
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
|
|
1161
|
+
txb.object(poolinfo.poolId),
|
|
1162
|
+
txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
1163
|
+
txb.object(poolinfo.investorId),
|
|
1164
|
+
txb.pure.u128(xTokens),
|
|
1165
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
|
|
1166
|
+
txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
|
|
1167
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_USDC_POOL),
|
|
1168
|
+
txb.object((0, constants_js_1.getConf)().BLUEFIN_DEEP_SUI_POOL),
|
|
1169
|
+
txb.object(maps_js_1.cetusPoolMap["BLUE-USDC"]),
|
|
1170
|
+
txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
|
|
1171
|
+
txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
1172
|
+
],
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
798
1175
|
}
|
|
799
1176
|
else {
|
|
800
1177
|
throw new Error("No receipt found!");
|