@alphafi/alphafi-sdk 0.0.52 → 0.0.54
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/#t.ts# +8 -0
- package/dist/cjs/adminFunctions.d.ts +6 -5
- package/dist/cjs/adminFunctions.d.ts.map +1 -1
- package/dist/cjs/adminFunctions.js +38 -15
- package/dist/cjs/adminFunctions.js.map +1 -1
- package/dist/cjs/common/constants.d.ts +24 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +38 -10
- 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 +22 -0
- package/dist/cjs/common/maps.js.map +1 -1
- package/dist/cjs/common/types.d.ts +2 -2
- package/dist/cjs/common/types.d.ts.map +1 -1
- package/dist/cjs/common/types.js.map +1 -1
- package/dist/cjs/getVaultBalances.d.ts.map +1 -1
- package/dist/cjs/getVaultBalances.js +10 -2
- package/dist/cjs/getVaultBalances.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 +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.d.ts +1 -0
- package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.js +1 -0
- package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.js +1 -0
- package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.js +1 -0
- package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchEvents.js +2 -1
- package/dist/cjs/sui-sdk/events/fetchEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.js +1 -0
- package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.d.ts +8 -0
- package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.d.ts.map +1 -0
- package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.js +40 -0
- package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.js.map +1 -0
- package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.js +1 -0
- package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.js +1 -0
- package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.js.map +1 -1
- package/dist/cjs/sui-sdk/events/types.d.ts +5 -0
- package/dist/cjs/sui-sdk/events/types.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/types.js +6 -0
- package/dist/cjs/sui-sdk/events/types.js.map +1 -1
- package/dist/cjs/sui-sdk/functions/fetchUserVaults.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/functions/fetchUserVaults.js +1 -0
- package/dist/cjs/sui-sdk/functions/fetchUserVaults.js.map +1 -1
- package/dist/cjs/transactions/blueRewards.d.ts.map +1 -1
- package/dist/cjs/transactions/blueRewards.js +25 -0
- package/dist/cjs/transactions/blueRewards.js.map +1 -1
- package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
- package/dist/cjs/transactions/bluefin.js +86 -33
- package/dist/cjs/transactions/bluefin.js.map +1 -1
- package/dist/cjs/transactions/collect_rewards.d.ts.map +1 -1
- package/dist/cjs/transactions/collect_rewards.js +3 -26
- package/dist/cjs/transactions/collect_rewards.js.map +1 -1
- package/dist/cjs/transactions/navi-looping.d.ts.map +1 -1
- package/dist/cjs/transactions/navi-looping.js +8 -2
- package/dist/cjs/transactions/navi-looping.js.map +1 -1
- package/dist/cjs/transactions/zapDeposit.d.ts.map +1 -1
- package/dist/cjs/transactions/zapDeposit.js +414 -119
- package/dist/cjs/transactions/zapDeposit.js.map +1 -1
- package/dist/cjs/vaultFunctions.d.ts.map +1 -1
- package/dist/cjs/vaultFunctions.js.map +1 -1
- package/dist/esm/adminFunctions.d.ts +6 -5
- package/dist/esm/adminFunctions.d.ts.map +1 -1
- package/dist/esm/adminFunctions.js +37 -15
- package/dist/esm/adminFunctions.js.map +1 -1
- package/dist/esm/common/constants.d.ts +24 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +38 -10
- 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 +22 -0
- package/dist/esm/common/maps.js.map +1 -1
- package/dist/esm/common/types.d.ts +2 -2
- package/dist/esm/common/types.d.ts.map +1 -1
- package/dist/esm/common/types.js.map +1 -1
- package/dist/esm/getVaultBalances.d.ts.map +1 -1
- package/dist/esm/getVaultBalances.js +10 -2
- package/dist/esm/getVaultBalances.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 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.d.ts +1 -0
- package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.js +1 -0
- package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.js +1 -0
- package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.js +1 -0
- package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchEvents.js +2 -1
- package/dist/esm/sui-sdk/events/fetchEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.js +1 -0
- package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.d.ts +8 -0
- package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.d.ts.map +1 -0
- package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.js +37 -0
- package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.js.map +1 -0
- package/dist/esm/sui-sdk/events/fetchRebalanceEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchRebalanceEvents.js +1 -0
- package/dist/esm/sui-sdk/events/fetchRebalanceEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.js +1 -0
- package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.js.map +1 -1
- package/dist/esm/sui-sdk/events/types.d.ts +5 -0
- package/dist/esm/sui-sdk/events/types.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/types.js +5 -1
- package/dist/esm/sui-sdk/events/types.js.map +1 -1
- package/dist/esm/sui-sdk/functions/fetchUserVaults.d.ts.map +1 -1
- package/dist/esm/sui-sdk/functions/fetchUserVaults.js +2 -1
- package/dist/esm/sui-sdk/functions/fetchUserVaults.js.map +1 -1
- package/dist/esm/transactions/blueRewards.d.ts.map +1 -1
- package/dist/esm/transactions/blueRewards.js +25 -0
- package/dist/esm/transactions/blueRewards.js.map +1 -1
- package/dist/esm/transactions/bluefin.d.ts.map +1 -1
- package/dist/esm/transactions/bluefin.js +86 -33
- package/dist/esm/transactions/bluefin.js.map +1 -1
- package/dist/esm/transactions/collect_rewards.d.ts.map +1 -1
- package/dist/esm/transactions/collect_rewards.js +2 -2
- package/dist/esm/transactions/collect_rewards.js.map +1 -1
- package/dist/esm/transactions/navi-looping.d.ts.map +1 -1
- package/dist/esm/transactions/navi-looping.js +8 -2
- package/dist/esm/transactions/navi-looping.js.map +1 -1
- package/dist/esm/transactions/zapDeposit.d.ts.map +1 -1
- package/dist/esm/transactions/zapDeposit.js +414 -119
- package/dist/esm/transactions/zapDeposit.js.map +1 -1
- package/dist/esm/vaultFunctions.d.ts.map +1 -1
- package/dist/esm/vaultFunctions.js.map +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/alphaLpBreakdown.html +1 -1
- package/docs/functions/cetusLpBreakdown.html +1 -1
- package/docs/functions/claimBlueRewardTxb.html +1 -1
- package/docs/functions/claimRewardTxb.html +1 -1
- package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
- package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
- package/docs/functions/coinsInPool.html +1 -1
- package/docs/functions/collectRewards.html +1 -1
- package/docs/functions/deposit.html +1 -1
- package/docs/functions/depositDoubleAssetTxb.html +1 -1
- package/docs/functions/depositSingleAssetTxb.html +1 -1
- package/docs/functions/fetchAfterTransactionEvents.html +1 -1
- package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
- package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
- package/docs/functions/fetchCetusPools.html +1 -1
- package/docs/functions/fetchChainIdentifier.html +1 -1
- package/docs/functions/fetchCheckRatioEvents.html +1 -1
- package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
- package/docs/functions/fetchMultiCategoryEvents.html +1 -0
- package/docs/functions/fetchMultiReceipts.html +1 -1
- package/docs/functions/fetchNftHolders.html +1 -1
- package/docs/functions/fetchPools.html +1 -1
- package/docs/functions/fetchPortfolioData.html +1 -1
- package/docs/functions/fetchProtocolData.html +1 -1
- package/docs/functions/fetchTVL.html +1 -1
- package/docs/functions/fetchUserVaultBalances.html +1 -1
- package/docs/functions/fetchUserVaults.html +1 -1
- package/docs/functions/fetchUserWalletData.html +1 -1
- package/docs/functions/fetchVoloExchangeRate.html +1 -1
- package/docs/functions/fetchWithdrawV2Events.html +1 -1
- package/docs/functions/getAirdropShare.html +1 -1
- package/docs/functions/getAllDoubleAssetVaults.html +1 -1
- package/docs/functions/getAllSingleAssetVaults.html +1 -1
- package/docs/functions/getAllVaultBalances.html +1 -1
- package/docs/functions/getAllVaults.html +1 -1
- package/docs/functions/getAlphaUnlocks.html +1 -1
- package/docs/functions/getAlphaVaultBalance.html +1 -1
- package/docs/functions/getAmounts.html +1 -1
- package/docs/functions/getApr.html +1 -1
- package/docs/functions/getAprs.html +1 -1
- package/docs/functions/getApy.html +1 -1
- package/docs/functions/getApys.html +1 -1
- package/docs/functions/getCetusInvestorTicksMap.html +1 -1
- package/docs/functions/getCetusPool.html +1 -1
- package/docs/functions/getCetusSqrtPriceMap.html +1 -1
- package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
- package/docs/functions/getConf.html +1 -1
- package/docs/functions/getCurrentTick.html +1 -1
- package/docs/functions/getDistributor.html +1 -1
- package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
- package/docs/functions/getDoubleAssetVaults.html +1 -1
- package/docs/functions/getHoldersFromTransactions.html +1 -1
- package/docs/functions/getInvestor.html +1 -1
- package/docs/functions/getInvestorPoolMap.html +1 -1
- package/docs/functions/getLastAutoCompoundTime.html +1 -1
- package/docs/functions/getLatestPrices.html +1 -1
- package/docs/functions/getLiquidity.html +1 -1
- package/docs/functions/getMultiCetusPool.html +1 -1
- package/docs/functions/getMultiInvestor.html +1 -1
- package/docs/functions/getMultiLatestPrices.html +1 -1
- package/docs/functions/getMultiParentPool.html +1 -1
- package/docs/functions/getMultiPool.html +1 -1
- package/docs/functions/getMultiReceipts.html +1 -1
- package/docs/functions/getParentPool.html +1 -1
- package/docs/functions/getPool.html +1 -1
- package/docs/functions/getPoolExchangeRate.html +1 -1
- package/docs/functions/getPoolExchangeRateMap.html +1 -1
- package/docs/functions/getPoolsWeightDistribution.html +1 -1
- package/docs/functions/getPositionRange.html +1 -1
- package/docs/functions/getPositionRanges.html +1 -1
- package/docs/functions/getPositionTicks.html +1 -1
- package/docs/functions/getPriceToTick.html +1 -1
- package/docs/functions/getRebalanceHistories.html +1 -1
- package/docs/functions/getRebalanceHistory.html +1 -1
- package/docs/functions/getReceipts.html +1 -1
- package/docs/functions/getSingleAssetVaultBalance.html +1 -1
- package/docs/functions/getSingleAssetVaults.html +1 -1
- package/docs/functions/getSuiClient.html +2 -2
- package/docs/functions/getSuiNodeUrl.html +2 -2
- package/docs/functions/getTVLs-1.html +1 -1
- package/docs/functions/getTickSpacing.html +1 -0
- package/docs/functions/getTickToPrice.html +1 -1
- package/docs/functions/getTvls.html +1 -1
- package/docs/functions/getUserTokensFromTransactions.html +1 -1
- package/docs/functions/getUserTokensInUsdFromTransactions.html +1 -1
- package/docs/functions/getVaultBalance.html +1 -1
- package/docs/functions/getVaultBalanceForActiveUsers.html +1 -1
- package/docs/functions/getVaults.html +1 -1
- package/docs/functions/getXTokenVaultBalanceForActiveUsers.html +1 -1
- package/docs/functions/getZapAmounts.html +1 -1
- package/docs/functions/lastAutocompoundTime.html +1 -1
- package/docs/functions/liquidityToTokens.html +1 -1
- package/docs/functions/multiLiquidityToTokens.html +1 -1
- package/docs/functions/multiTokensToUsd.html +1 -1
- package/docs/functions/multiXTokensToLiquidity.html +1 -1
- package/docs/functions/parseUserWalletData.html +1 -1
- package/docs/functions/pendingBlueRewardAmount.html +1 -1
- package/docs/functions/setCustomSuiClient.html +2 -2
- package/docs/functions/setSuiClient.html +2 -2
- package/docs/functions/setSuiNodeUrl.html +2 -2
- package/docs/functions/setWeights.html +1 -1
- package/docs/functions/withdraw.html +1 -1
- package/docs/functions/withdrawAlphaTxb.html +1 -1
- package/docs/functions/withdrawTxb.html +1 -1
- package/docs/functions/zapDepositTxb.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/Coin.html +6 -6
- package/docs/interfaces/CoinPair.html +2 -2
- package/docs/interfaces/NaviVoloData.html +2 -2
- package/docs/interfaces/PoolData.html +2 -2
- package/docs/interfaces/PoolWeightDistribution.html +2 -2
- package/docs/interfaces/RebalanceHistoryType.html +2 -2
- package/docs/modules.html +7 -2
- package/docs/types/AfterTransactionEventNode.html +1 -1
- package/docs/types/Allocator.html +1 -1
- package/docs/types/AlphaFiDoubleAssetVault.html +1 -1
- package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
- package/docs/types/AlphaFiSingleAssetVault.html +1 -1
- package/docs/types/AlphaFiVault.html +1 -1
- package/docs/types/AlphaFiVaultBalance.html +1 -1
- package/docs/types/AlphaPoolType.html +1 -1
- package/docs/types/AlphaReceipt.html +1 -1
- package/docs/types/AlphaReceiptFields.html +1 -1
- package/docs/types/AlphaVaultBalance.html +1 -1
- package/docs/types/AutoBalancePoolNames.html +1 -1
- package/docs/types/AutoCompoundingEventNode.html +1 -1
- package/docs/types/BluefinInvestor.html +1 -1
- package/docs/types/BluefinPoolType.html +1 -1
- package/docs/types/BucketInvestor.html +1 -1
- package/docs/types/CetusInvestor.html +1 -1
- package/docs/types/CetusPoolType.html +1 -1
- package/docs/types/CetusSwapOptions.html +1 -1
- package/docs/types/CoinAmounts.html +1 -1
- package/docs/types/CoinName.html +1 -1
- package/docs/types/CoinType.html +1 -1
- package/docs/types/CommonInvestorFields.html +1 -1
- package/docs/types/CreatePoolOptions.html +1 -1
- package/docs/types/Distributor.html +1 -1
- package/docs/types/DoubleAssetMultiVaultBalance.html +1 -1
- package/docs/types/DoubleAssetPoolNames.html +1 -1
- package/docs/types/DoubleAssetTokenHoldings.html +1 -1
- package/docs/types/DoubleAssetVaultBalance.html +1 -1
- package/docs/types/EventCategory.html +1 -0
- package/docs/types/EventNode.html +1 -0
- package/docs/types/GetHoldersParams.html +1 -1
- package/docs/types/GetTokenHoldingsParams.html +1 -1
- package/docs/types/GetUserTokensFromTransactionsParams.html +1 -1
- package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +1 -1
- package/docs/types/GetVaultBalanceForActiveUsersParams.html +1 -1
- package/docs/types/GetVaultBalanceParams.html +1 -1
- package/docs/types/HoldingsObj.html +1 -1
- package/docs/types/Icon.html +1 -1
- package/docs/types/Investor.html +1 -1
- package/docs/types/LiquidityChangeEventNode.html +1 -1
- package/docs/types/LiquidityToTokensParams.html +1 -1
- package/docs/types/LiquidityToUsdParams.html +1 -1
- package/docs/types/LoopingDebt.html +1 -1
- package/docs/types/LoopingPoolNames.html +1 -1
- package/docs/types/LpBreakdownType.html +1 -1
- package/docs/types/MemberPoolDataType.html +1 -1
- package/docs/types/MemberType.html +1 -1
- package/docs/types/MultiGetVaultBalancesParams.html +1 -1
- package/docs/types/NaviInvestor.html +1 -1
- package/docs/types/OtherReceiptFields.html +1 -1
- package/docs/types/PoolName.html +1 -1
- package/docs/types/PoolReceipt.html +1 -1
- package/docs/types/PoolType.html +1 -1
- package/docs/types/Receipt.html +1 -1
- package/docs/types/ReceiptGQL.html +1 -1
- package/docs/types/SingleAssetMultiVaultBalance.html +1 -1
- package/docs/types/SingleAssetPoolNames.html +1 -1
- package/docs/types/SingleAssetTokenHoldings.html +1 -1
- package/docs/types/SingleAssetVaultBalance.html +1 -1
- package/docs/types/SingleGetVaultBalancesParams.html +1 -1
- package/docs/types/StrategyType.html +1 -1
- package/docs/types/SuiNetwork.html +1 -1
- package/docs/types/SwapOptions.html +1 -1
- package/docs/types/TickSpacing.html +1 -1
- package/docs/types/TotalWeightType.html +1 -1
- package/docs/types/TransactionBlockType.html +1 -1
- package/docs/types/UserPoolLiquidity.html +1 -1
- package/docs/types/UserPoolTokenHoldings.html +1 -1
- package/docs/types/UserUsdHoldings.html +1 -1
- package/docs/types/VaultBalance.html +1 -1
- package/docs/types/WithdrawV2EventNode.html +1 -1
- package/docs/variables/bluefinPoolMap.html +1 -1
- package/docs/variables/cetusPoolMap.html +1 -1
- package/docs/variables/coinsList.html +1 -1
- package/docs/variables/defunctPoolsSet.html +1 -1
- package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
- package/docs/variables/eventCategories.html +1 -0
- package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
- package/docs/variables/loopingAccountAddresses.html +1 -1
- package/docs/variables/loopingPoolCoinMap.html +1 -1
- package/docs/variables/naviAssetMap.html +1 -1
- package/docs/variables/poolIdPoolNameMap.html +1 -1
- package/docs/variables/poolInfo.html +1 -1
- package/docs/variables/singleAssetPoolCoinMap.html +1 -1
- package/docs/variables/stableCoins.html +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sui-sdk/events/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PoolName } from \"../../common/types.js\";\n\ninterface CommonEventAttributes {\n type: string;\n timestamp: number;\n txDigest: string;\n eventSeq: number;\n transactionModule: string;\n}\n\nexport interface CetusAutoCompoundingEvent {\n compound_amount_a: bigint;\n compound_amount_b: bigint;\n current_liquidity: bigint;\n fee_collected_a: bigint;\n fee_collected_b: bigint;\n free_balance_a: bigint;\n free_balance_b: bigint;\n investor_id: string;\n total_amount_a: bigint;\n total_amount_b: bigint;\n}\n\nexport interface NaviAutoCompoundingEvent {\n compound_amount: bigint;\n fee_collected: bigint;\n investor_id: string;\n location: number;\n total_amount: bigint;\n}\n\nexport interface NaviLoopAutoCompoundingEvent extends NaviAutoCompoundingEvent {\n cur_total_debt: bigint;\n accrued_interest: bigint;\n}\n\nexport interface AutobalancingAutoCompoundingEvent {\n blue_reward_amount: bigint;\n current_liquidity: bigint;\n fee_collected: bigint;\n free_balance_a: bigint;\n free_balance_b: bigint;\n investor_id: string;\n total_amount_a: bigint;\n total_amount_b: bigint;\n}\n\nexport interface RebalanceEvent {\n investor_id: string;\n lower_tick_after: string;\n upper_tick_after: string;\n sqrt_price_after: string;\n amount_a_before: string;\n amount_b_before: string;\n amount_a_after: string;\n amount_b_after: string;\n}\n\n//verify, this might be wrong, alphapool reward event is defined as alpha autocompounding event\nexport interface AlphaAutoCompoundingEvent {\n amount: string;\n investor_id: string;\n}\n\nexport interface CetusLiquidityChangeEvent {\n amount_a: string;\n amount_b: string;\n event_type: number;\n fee_collected_a: string;\n fee_collected_b: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n total_amount_a: string;\n total_amount_b: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface NaviLiquidityChangeEvent {\n amount: string;\n event_type: number;\n fee_collected: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface AlphaLiquidityChangeEvent {\n amount: string;\n event_type: number;\n fee_collected: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface AlphaWithdrawV2Event {\n amount: string;\n amount_withdrawn_from_locked: string;\n amount_withdrawn_from_unlocked: string;\n fee_collected: string;\n instant_withdraw_fee_collected: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface CetusAfterTransactionEvent {\n liquidity: string;\n tokensInvested: string;\n xtokenSupply: string;\n}\nexport interface NaviAfterTransactionEvent {\n amount: string;\n tokensInvested: string;\n xtokenSupply: string;\n}\n\n// only event sequence non zero are after transaction\nexport interface AlphaBeforeAndAfterEvent {\n tokensInvested: string;\n xTokenSupply: string;\n}\n\nexport type CetusAddLiquidityEvent = {\n after_liquidity: string;\n amount_a: string;\n amount_b: string;\n liquidity: string;\n pool: string;\n position: string;\n tick_lower: { bits: number };\n tick_upper: { bits: number };\n};\nexport type CetusRemoveLiquidityEvent = {\n after_liquidity: string;\n amount_a: string;\n amount_b: string;\n liquidity: string;\n pool: string;\n position: string;\n tick_lower: { bits: number };\n tick_upper: { bits: number };\n};\n\nexport type NaviPoolDepositEvent = {\n amount: string;\n pool: string;\n sender: string;\n};\nexport type NaviPoolWithdrawEvent = {\n amount: string;\n pool: string;\n recipient: string;\n sender: string;\n};\n\nexport interface CheckRatioEvent {\n ratio: string;\n}\n\nexport type AfterTransactionEventNode =\n | (CetusAfterTransactionEvent &\n CommonEventAttributes & {\n poolName: PoolName | undefined;\n id: { eventSeq: number; txDigest: string };\n })\n | (NaviAfterTransactionEvent &\n CommonEventAttributes & {\n poolName: PoolName | undefined;\n id: { eventSeq: number; txDigest: string };\n })\n | (AlphaBeforeAndAfterEvent &\n CommonEventAttributes & {\n poolName: PoolName | undefined;\n id: { eventSeq: number; txDigest: string };\n });\n\nexport type AutoCompoundingEventNode =\n | (CetusAutoCompoundingEvent & CommonEventAttributes)\n | (NaviAutoCompoundingEvent & CommonEventAttributes)\n | (NaviLoopAutoCompoundingEvent & CommonEventAttributes)\n | (AlphaAutoCompoundingEvent & CommonEventAttributes)\n | (AutobalancingAutoCompoundingEvent & CommonEventAttributes);\n\nexport type RebalanceEventNode = RebalanceEvent & CommonEventAttributes;\n\nexport type LiquidityChangeEventNode =\n | (CetusLiquidityChangeEvent & CommonEventAttributes)\n | (NaviLiquidityChangeEvent & CommonEventAttributes)\n | (AlphaLiquidityChangeEvent & CommonEventAttributes);\n\nexport type WithdrawV2EventNode = AlphaWithdrawV2Event & CommonEventAttributes;\n\nexport type CheckRatioEventNode = CheckRatioEvent & CommonEventAttributes;\n\nexport type EventNode =\n | AutoCompoundingEventNode\n | RebalanceEventNode\n | LiquidityChangeEventNode\n | WithdrawV2EventNode\n | AfterTransactionEventNode\n | CheckRatioEventNode;\n\nexport type FetchAutoCompoundingEventsParams = {\n startTime?: number;\n endTime?: number;\n poolNames?: PoolName[];\n};\n\nexport type FetchRebalanceEventsParams = FetchAutoCompoundingEventsParams;\n\nexport type FetchLiquidityChangeEventsParams = FetchAutoCompoundingEventsParams;\n\nexport type FetchWithdrawV2EventsParams = {\n startTime?: number;\n endTime?: number;\n};\n\nexport type FetchCheckRatioEventsParams = FetchAutoCompoundingEventsParams;\n\nexport type FetchEventsParams = {\n eventTypes: string[];\n startTime?: number;\n endTime?: number;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sui-sdk/events/types.ts"],"names":[],"mappings":"AAkPA,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,iBAAiB;IACjB,iBAAiB;IACjB,YAAY;CACb,CAAC","sourcesContent":["import { PoolName } from \"../../common/types.js\";\n\ninterface CommonEventAttributes {\n type: string;\n timestamp: number;\n txDigest: string;\n eventSeq: number;\n transactionModule: string;\n}\n\nexport interface CetusAutoCompoundingEvent {\n compound_amount_a: bigint;\n compound_amount_b: bigint;\n current_liquidity: bigint;\n fee_collected_a: bigint;\n fee_collected_b: bigint;\n free_balance_a: bigint;\n free_balance_b: bigint;\n investor_id: string;\n total_amount_a: bigint;\n total_amount_b: bigint;\n}\n\nexport interface NaviAutoCompoundingEvent {\n compound_amount: bigint;\n fee_collected: bigint;\n investor_id: string;\n location: number;\n total_amount: bigint;\n}\n\nexport interface NaviLoopAutoCompoundingEvent extends NaviAutoCompoundingEvent {\n cur_total_debt: bigint;\n accrued_interest: bigint;\n}\n\nexport interface AutobalancingAutoCompoundingEvent {\n blue_reward_amount: bigint;\n current_liquidity: bigint;\n fee_collected: bigint;\n free_balance_a: bigint;\n free_balance_b: bigint;\n investor_id: string;\n total_amount_a: bigint;\n total_amount_b: bigint;\n}\n\nexport interface RebalanceEvent {\n investor_id: string;\n lower_tick_after: string;\n upper_tick_after: string;\n sqrt_price_after: string;\n amount_a_before: string;\n amount_b_before: string;\n amount_a_after: string;\n amount_b_after: string;\n}\n\n//verify, this might be wrong, alphapool reward event is defined as alpha autocompounding event\nexport interface AlphaAutoCompoundingEvent {\n amount: string;\n investor_id: string;\n}\n\nexport interface CetusLiquidityChangeEvent {\n amount_a: string;\n amount_b: string;\n event_type: number;\n fee_collected_a: string;\n fee_collected_b: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n total_amount_a: string;\n total_amount_b: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface NaviLiquidityChangeEvent {\n amount: string;\n event_type: number;\n fee_collected: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface AlphaLiquidityChangeEvent {\n amount: string;\n event_type: number;\n fee_collected: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface AlphaWithdrawV2Event {\n amount: string;\n amount_withdrawn_from_locked: string;\n amount_withdrawn_from_unlocked: string;\n fee_collected: string;\n instant_withdraw_fee_collected: string;\n pool_id: string;\n sender: string;\n tokens_invested: string;\n user_total_x_token_balance: string;\n x_token_supply: string;\n}\n\nexport interface CetusAfterTransactionEvent {\n liquidity: string;\n tokensInvested: string;\n xtokenSupply: string;\n}\nexport interface NaviAfterTransactionEvent {\n amount: string;\n tokensInvested: string;\n xtokenSupply: string;\n}\n\n// only event sequence non zero are after transaction\nexport interface AlphaBeforeAndAfterEvent {\n tokensInvested: string;\n xTokenSupply: string;\n}\n\nexport type CetusAddLiquidityEvent = {\n after_liquidity: string;\n amount_a: string;\n amount_b: string;\n liquidity: string;\n pool: string;\n position: string;\n tick_lower: { bits: number };\n tick_upper: { bits: number };\n};\nexport type CetusRemoveLiquidityEvent = {\n after_liquidity: string;\n amount_a: string;\n amount_b: string;\n liquidity: string;\n pool: string;\n position: string;\n tick_lower: { bits: number };\n tick_upper: { bits: number };\n};\n\nexport type NaviPoolDepositEvent = {\n amount: string;\n pool: string;\n sender: string;\n};\nexport type NaviPoolWithdrawEvent = {\n amount: string;\n pool: string;\n recipient: string;\n sender: string;\n};\n\nexport interface CheckRatioEvent {\n ratio: string;\n}\n\nexport type AfterTransactionEventNode =\n | (CetusAfterTransactionEvent &\n CommonEventAttributes & {\n poolName: PoolName | undefined;\n id: { eventSeq: number; txDigest: string };\n })\n | (NaviAfterTransactionEvent &\n CommonEventAttributes & {\n poolName: PoolName | undefined;\n id: { eventSeq: number; txDigest: string };\n })\n | (AlphaBeforeAndAfterEvent &\n CommonEventAttributes & {\n poolName: PoolName | undefined;\n id: { eventSeq: number; txDigest: string };\n });\n\nexport type AutoCompoundingEventNode =\n | (CetusAutoCompoundingEvent & CommonEventAttributes)\n | (NaviAutoCompoundingEvent & CommonEventAttributes)\n | (NaviLoopAutoCompoundingEvent & CommonEventAttributes)\n | (AlphaAutoCompoundingEvent & CommonEventAttributes)\n | (AutobalancingAutoCompoundingEvent & CommonEventAttributes);\n\nexport type RebalanceEventNode = RebalanceEvent & CommonEventAttributes;\n\nexport type LiquidityChangeEventNode =\n | (CetusLiquidityChangeEvent & CommonEventAttributes)\n | (NaviLiquidityChangeEvent & CommonEventAttributes)\n | (AlphaLiquidityChangeEvent & CommonEventAttributes);\n\nexport type WithdrawV2EventNode = AlphaWithdrawV2Event & CommonEventAttributes;\n\nexport type CheckRatioEventNode = CheckRatioEvent & CommonEventAttributes;\n\nexport type EventNode =\n | AutoCompoundingEventNode\n | RebalanceEventNode\n | LiquidityChangeEventNode\n | WithdrawV2EventNode\n | AfterTransactionEventNode\n | CheckRatioEventNode;\n\nexport type FetchAutoCompoundingEventsParams = {\n startTime?: number;\n endTime?: number;\n poolNames?: PoolName[];\n order?: \"ascending\" | \"descending\";\n};\n\nexport type FetchRebalanceEventsParams = FetchAutoCompoundingEventsParams;\n\nexport type FetchLiquidityChangeEventsParams = FetchAutoCompoundingEventsParams;\n\nexport type FetchWithdrawV2EventsParams = {\n startTime?: number;\n endTime?: number;\n order?: \"ascending\" | \"descending\";\n};\n\nexport type FetchCheckRatioEventsParams = FetchAutoCompoundingEventsParams;\n\nexport type FetchEventsParams = {\n eventTypes: string[];\n startTime?: number;\n endTime?: number;\n order?: \"ascending\" | \"descending\";\n};\n\nexport type EventCategory =\n | \"AutoCompounding\"\n | \"LiquidityChange\"\n | \"WithdrawV2\";\n\nexport const eventCategories: EventCategory[] = [\n \"AutoCompounding\",\n \"LiquidityChange\",\n \"WithdrawV2\",\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchUserVaults.d.ts","sourceRoot":"","sources":["../../../../src/sui-sdk/functions/fetchUserVaults.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"fetchUserVaults.d.ts","sourceRoot":"","sources":["../../../../src/sui-sdk/functions/fetchUserVaults.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,gBAAgB,CAAC;AAQxB,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,YAAY,EAAE,CAAC,CA6CzB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { coinsList } from "../../index.js";
|
|
1
|
+
import { coinsList, getMultiReceipts, } from "../../index.js";
|
|
2
2
|
import { singleAssetPoolCoinMap, doubleAssetPoolCoinMap, poolInfo, } from "../../common/maps.js";
|
|
3
3
|
import { getReceipts } from "./getReceipts.js";
|
|
4
4
|
export async function fetchUserVaults(address) {
|
|
5
5
|
const vaultsArr = [];
|
|
6
|
+
await getMultiReceipts(address);
|
|
6
7
|
await Promise.all(Object.keys(poolInfo).map(async (pool) => {
|
|
7
8
|
const receipt = await getReceipts(pool, address, false);
|
|
8
9
|
if (receipt.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchUserVaults.js","sourceRoot":"","sources":["../../../../src/sui-sdk/functions/fetchUserVaults.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"fetchUserVaults.js","sourceRoot":"","sources":["../../../../src/sui-sdk/functions/fetchUserVaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,gBAAgB,GAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAe;IAEf,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChC,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACvC,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,IAAgB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACpE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;YAC5C,IAAI,GAAG,GAA6B,SAAS,CAAC;YAC9C,IACE,QAAQ,CAAC,IAAI,CAAC,CAAC,kBAAkB,KAAK,SAAS;gBAC/C,QAAQ,CAAC,IAAI,CAAC,CAAC,kBAAkB,KAAK,MAAM;gBAC5C,QAAQ,CAAC,IAAI,CAAC,CAAC,kBAAkB,KAAK,QAAQ,EAC9C,CAAC;gBACD,MAAM,IAAI,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;gBAC/C,GAAG,GAAG;oBACJ,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM;oBAC7B,QAAQ,EAAE,IAAgB;oBAC1B,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI;oBACpC,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI;iBAC/B,CAAC;YACJ,CAAC;iBAAM,IACL,QAAQ,CAAC,IAAI,CAAC,CAAC,kBAAkB,KAAK,OAAO;gBAC7C,QAAQ,CAAC,IAAI,CAAC,CAAC,kBAAkB,KAAK,SAAS,EAC/C,CAAC;gBACD,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;gBACjD,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;gBACjD,GAAG,GAAG;oBACJ,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM;oBAC7B,QAAQ,EAAE,IAAgB;oBAC1B,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI;oBACpC,SAAS,EAAE,KAAK;oBAChB,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI;oBAChC,SAAS,EAAE,KAAK;oBAChB,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI;iBACjC,CAAC;YACJ,CAAC;YACD,IAAI,GAAG;gBAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CACH,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {\n AlphaFiVault,\n coinsList,\n getMultiReceipts,\n PoolName,\n} from \"../../index.js\";\nimport {\n singleAssetPoolCoinMap,\n doubleAssetPoolCoinMap,\n poolInfo,\n} from \"../../common/maps.js\";\nimport { getReceipts } from \"./getReceipts.js\";\n\nexport async function fetchUserVaults(\n address: string,\n): Promise<AlphaFiVault[]> {\n const vaultsArr: AlphaFiVault[] = [];\n await getMultiReceipts(address);\n await Promise.all(\n Object.keys(poolInfo).map(async (pool) => {\n const receipt = await getReceipts(pool as PoolName, address, false);\n if (receipt.length > 0) {\n const name = receipt[0].content.fields.name;\n let res: AlphaFiVault | undefined = undefined;\n if (\n poolInfo[pool].parentProtocolName === \"ALPHAFI\" ||\n poolInfo[pool].parentProtocolName === \"NAVI\" ||\n poolInfo[pool].parentProtocolName === \"BUCKET\"\n ) {\n const coin = singleAssetPoolCoinMap[pool].coin;\n res = {\n poolId: poolInfo[pool].poolId,\n poolName: pool as PoolName,\n receiptName: name,\n receiptType: receipt[0].content.type,\n coinName: coin,\n coinType: coinsList[coin].type,\n };\n } else if (\n poolInfo[pool].parentProtocolName === \"CETUS\" ||\n poolInfo[pool].parentProtocolName === \"BLUEFIN\"\n ) {\n const coinA = doubleAssetPoolCoinMap[pool].coin1;\n const coinB = doubleAssetPoolCoinMap[pool].coin2;\n res = {\n poolId: poolInfo[pool].poolId,\n poolName: pool as PoolName,\n receiptName: name,\n receiptType: receipt[0].content.type,\n coinNameA: coinA,\n coinTypeA: coinsList[coinA].type,\n coinNameB: coinB,\n coinTypeB: coinsList[coinB].type,\n };\n }\n if (res) vaultsArr.push(res);\n }\n }),\n );\n return vaultsArr;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueRewards.d.ts","sourceRoot":"","sources":["../../../src/transactions/blueRewards.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,QAAQ,EAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AACD,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"blueRewards.d.ts","sourceRoot":"","sources":["../../../src/transactions/blueRewards.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,QAAQ,EAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AACD,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAiH1C;AAED,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,MAAM,CAAC,CAqDjB"}
|
|
@@ -82,6 +82,31 @@ export async function claimBlueRewardTxb(userAddress, poolName) {
|
|
|
82
82
|
],
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
+
else if (poolName === "BLUEFIN-AUTOBALANCE-DEEP-BLUE") {
|
|
86
|
+
blueBalance = txb.moveCall({
|
|
87
|
+
target: `${poolInfo[poolName].packageId}::alphafi_bluefin_type_1_pool::get_user_rewards`,
|
|
88
|
+
typeArguments: [
|
|
89
|
+
coinsList["DEEP"].type,
|
|
90
|
+
coinsList["BLUE"].type,
|
|
91
|
+
coinsList["BLUE"].type,
|
|
92
|
+
coinsList["SUI"].type,
|
|
93
|
+
],
|
|
94
|
+
arguments: [
|
|
95
|
+
txb.object(receipts[0].objectId),
|
|
96
|
+
txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),
|
|
97
|
+
txb.object(pool.poolId),
|
|
98
|
+
txb.object(pool.investorId),
|
|
99
|
+
txb.object(getConf().ALPHA_DISTRIBUTOR),
|
|
100
|
+
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
101
|
+
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
102
|
+
txb.object(getConf().BLUEFIN_DEEP_BLUE_POOL),
|
|
103
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
|
|
104
|
+
txb.object(cetusPoolMap["BLUE-DEEP"]),
|
|
105
|
+
txb.object(cetusPoolMap["BLUE-SUI"]),
|
|
106
|
+
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
107
|
+
],
|
|
108
|
+
});
|
|
109
|
+
}
|
|
85
110
|
const blueCoin = txb.moveCall({
|
|
86
111
|
target: "0x2::coin::from_balance",
|
|
87
112
|
typeArguments: [coinsList["BLUE"].type],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueRewards.js","sourceRoot":"","sources":["../../../src/transactions/blueRewards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EAET,YAAY,EACZ,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAqB,MAAM,0BAA0B,CAAC;AAK1E,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,WAAmB,EACnB,QAAkB;IAElB,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QAChE,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,IAAI,WAA8B,CAAC;QACnC,IAAI,QAAQ,KAAK,+BAA+B,EAAE,CAAC;YACjD,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C;IACb,CAAC;AACH,CAAC","sourcesContent":["import { Decimal } from \"decimal.js\";\nimport {\n getConf,\n poolInfo,\n coinsList,\n PoolName,\n cetusPoolMap,\n getPool,\n} from \"../index.js\";\nimport { Transaction, TransactionResult } from \"@mysten/sui/transactions\";\nexport interface ClaimRewardResponse {\n txb: Transaction;\n coinOut: TransactionResult;\n}\nexport async function claimBlueRewardTxb(\n userAddress: string,\n poolName: PoolName,\n): Promise<ClaimRewardResponse | undefined> {\n const { getReceipts } = await import(\"../index.js\");\n try {\n const receipts = await getReceipts(poolName, userAddress, true);\n const txb = new Transaction();\n const pool = poolInfo[poolName];\n let blueBalance: TransactionResult;\n if (poolName === \"BLUEFIN-AUTOBALANCE-USDT-USDC\") {\n blueBalance = txb.moveCall({\n target: `${poolInfo[poolName].packageId}::alphafi_bluefin_type_1_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"USDT\"].type,\n coinsList[\"USDC\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_USDT_USDC_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"USDC-USDT\"]),\n txb.object(cetusPoolMap[\"USDC-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n } else if (poolName === \"BLUEFIN-AUTOBALANCE-SUI-USDC\") {\n blueBalance = txb.moveCall({\n target: `${pool.packageId}::alphafi_bluefin_sui_first_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"SUI\"].type,\n coinsList[\"USDC\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_SUI_USDC_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"USDC-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n } else if (poolName === \"BLUEFIN-AUTOBALANCE-SUIUSDT-USDC\") {\n blueBalance = txb.moveCall({\n target: `${poolInfo[poolName].packageId}::alphafi_bluefin_type_1_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"SUIUSDT\"].type,\n coinsList[\"USDC\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_SUIUSDT_USDC_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"USDC-SUIUSDT\"]),\n txb.object(cetusPoolMap[\"USDC-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n }\n\n const blueCoin = txb.moveCall({\n target: \"0x2::coin::from_balance\",\n typeArguments: [coinsList[\"BLUE\"].type],\n arguments: [blueBalance!],\n });\n return { txb: txb, coinOut: blueCoin };\n } catch (e) {\n console.error(\"error in claim blue rewards\", e);\n }\n}\n\nexport async function pendingBlueRewardAmount(\n userAddress: string,\n poolName: PoolName,\n): Promise<string> {\n const { getReceipts } = await import(\"../index.js\");\n try {\n const receipts = await getReceipts(poolName, userAddress, true);\n const receipt = receipts[0];\n const userXtokenBalance = receipt.content.fields.xTokenBalance;\n let userBluePendingReward = new Decimal(0);\n let curAcc = new Decimal(0);\n let lastAcc = new Decimal(0);\n const userPendingRewardsAll =\n receipt.content.fields.pending_rewards.fields.contents;\n for (let i = 0; i < userPendingRewardsAll.length; i++) {\n if (\n userPendingRewardsAll[i].fields.key.fields.name ==\n coinsList[\"BLUE\"].type.substring(2)\n ) {\n userBluePendingReward = new Decimal(\n userPendingRewardsAll[i].fields.value,\n );\n break;\n }\n }\n const pool = await getPool(poolName, false);\n const currAccForAllRewards =\n pool!.content.fields.acc_rewards_per_xtoken.fields.contents;\n currAccForAllRewards?.forEach((reward) => {\n if (\n reward.fields.key.fields.name == coinsList[\"BLUE\"].type.substring(2)\n ) {\n curAcc = new Decimal(reward.fields.value);\n }\n });\n const lastAccAll =\n receipt.content.fields.last_acc_reward_per_xtoken.fields.contents;\n lastAccAll.forEach((reward) => {\n if (\n reward.fields.key.fields.name == coinsList[\"BLUE\"].type.substring(2)\n ) {\n lastAcc = new Decimal(reward.fields.value);\n }\n });\n\n return curAcc\n .minus(lastAcc)\n .mul(userXtokenBalance)\n .div(1e36)\n .plus(userBluePendingReward)\n .div(Math.pow(10, coinsList[\"BLUE\"].expo))\n .toString();\n } catch (e) {\n console.error(\"error in calculate pending blue rewards\", e);\n return \"0\";\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"blueRewards.js","sourceRoot":"","sources":["../../../src/transactions/blueRewards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EAET,YAAY,EACZ,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO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AAC,CAAC;QAEH,OAAO,MAAM;aACV,KAAK,CAAC,OAAO,CAAC;aACd,GAAG,CAAC,iBAAiB,CAAC;aACtB,GAAG,CAAC,IAAI,CAAC;aACT,IAAI,CAAC,qBAAqB,CAAC;aAC3B,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;aACzC,QAAQ,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,CAAC,CAAC,CAAC;QAC5D,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC","sourcesContent":["import { Decimal } from \"decimal.js\";\nimport {\n getConf,\n poolInfo,\n coinsList,\n PoolName,\n cetusPoolMap,\n getPool,\n} from \"../index.js\";\nimport { Transaction, TransactionResult } from \"@mysten/sui/transactions\";\nexport interface ClaimRewardResponse {\n txb: Transaction;\n coinOut: TransactionResult;\n}\nexport async function claimBlueRewardTxb(\n userAddress: string,\n poolName: PoolName,\n): Promise<ClaimRewardResponse | undefined> {\n const { getReceipts } = await import(\"../index.js\");\n try {\n const receipts = await getReceipts(poolName, userAddress, true);\n const txb = new Transaction();\n const pool = poolInfo[poolName];\n let blueBalance: TransactionResult;\n if (poolName === \"BLUEFIN-AUTOBALANCE-USDT-USDC\") {\n blueBalance = txb.moveCall({\n target: `${poolInfo[poolName].packageId}::alphafi_bluefin_type_1_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"USDT\"].type,\n coinsList[\"USDC\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_USDT_USDC_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"USDC-USDT\"]),\n txb.object(cetusPoolMap[\"USDC-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n } else if (poolName === \"BLUEFIN-AUTOBALANCE-SUI-USDC\") {\n blueBalance = txb.moveCall({\n target: `${pool.packageId}::alphafi_bluefin_sui_first_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"SUI\"].type,\n coinsList[\"USDC\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_SUI_USDC_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"USDC-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n } else if (poolName === \"BLUEFIN-AUTOBALANCE-SUIUSDT-USDC\") {\n blueBalance = txb.moveCall({\n target: `${poolInfo[poolName].packageId}::alphafi_bluefin_type_1_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"SUIUSDT\"].type,\n coinsList[\"USDC\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_SUIUSDT_USDC_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"USDC-SUIUSDT\"]),\n txb.object(cetusPoolMap[\"USDC-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n } else if (poolName === \"BLUEFIN-AUTOBALANCE-DEEP-BLUE\") {\n blueBalance = txb.moveCall({\n target: `${poolInfo[poolName].packageId}::alphafi_bluefin_type_1_pool::get_user_rewards`,\n typeArguments: [\n coinsList[\"DEEP\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"BLUE\"].type,\n coinsList[\"SUI\"].type,\n ],\n arguments: [\n txb.object(receipts[0].objectId),\n txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),\n txb.object(pool.poolId),\n txb.object(pool.investorId),\n txb.object(getConf().ALPHA_DISTRIBUTOR),\n txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),\n txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),\n txb.object(getConf().BLUEFIN_DEEP_BLUE_POOL),\n txb.object(getConf().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),\n txb.object(cetusPoolMap[\"BLUE-DEEP\"]),\n txb.object(cetusPoolMap[\"BLUE-SUI\"]),\n txb.object(getConf().CLOCK_PACKAGE_ID),\n ],\n });\n }\n\n const blueCoin = txb.moveCall({\n target: \"0x2::coin::from_balance\",\n typeArguments: [coinsList[\"BLUE\"].type],\n arguments: [blueBalance!],\n });\n return { txb: txb, coinOut: blueCoin };\n } catch (e) {\n console.error(\"error in claim blue rewards\", e);\n }\n}\n\nexport async function pendingBlueRewardAmount(\n userAddress: string,\n poolName: PoolName,\n): Promise<string> {\n const { getReceipts } = await import(\"../index.js\");\n try {\n const receipts = await getReceipts(poolName, userAddress, true);\n const receipt = receipts[0];\n const userXtokenBalance = receipt.content.fields.xTokenBalance;\n let userBluePendingReward = new Decimal(0);\n let curAcc = new Decimal(0);\n let lastAcc = new Decimal(0);\n const userPendingRewardsAll =\n receipt.content.fields.pending_rewards.fields.contents;\n for (let i = 0; i < userPendingRewardsAll.length; i++) {\n if (\n userPendingRewardsAll[i].fields.key.fields.name ==\n coinsList[\"BLUE\"].type.substring(2)\n ) {\n userBluePendingReward = new Decimal(\n userPendingRewardsAll[i].fields.value,\n );\n break;\n }\n }\n const pool = await getPool(poolName, false);\n const currAccForAllRewards =\n pool!.content.fields.acc_rewards_per_xtoken.fields.contents;\n currAccForAllRewards?.forEach((reward) => {\n if (\n reward.fields.key.fields.name == coinsList[\"BLUE\"].type.substring(2)\n ) {\n curAcc = new Decimal(reward.fields.value);\n }\n });\n const lastAccAll =\n receipt.content.fields.last_acc_reward_per_xtoken.fields.contents;\n lastAccAll.forEach((reward) => {\n if (\n reward.fields.key.fields.name == coinsList[\"BLUE\"].type.substring(2)\n ) {\n lastAcc = new Decimal(reward.fields.value);\n }\n });\n\n return curAcc\n .minus(lastAcc)\n .mul(userXtokenBalance)\n .div(1e36)\n .plus(userBluePendingReward)\n .div(Math.pow(10, coinsList[\"BLUE\"].expo))\n .toString();\n } catch (e) {\n console.error(\"error in calculate pending blue rewards\", e);\n return \"0\";\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bluefin.d.ts","sourceRoot":"","sources":["../../../src/transactions/bluefin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAUvD,OAAO,EAAE,QAAQ,EAAW,MAAM,oBAAoB,CAAC;AAKvD,eAAO,MAAM,yBAAyB,WAC5B,MAAM,YACJ,QAAQ,aACP,OAAO,WACT;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,gBACf,WAAW,GAAG,SAAS,KACnC,OAAO,CAAC,WAAW,CAmLrB,CAAC;AAEF,eAAO,MAAM,0BAA0B,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AAE,MAAM,CAAA;CAAE,gBACf,WAAW,GAAG,SAAS,KACnC,OAAO,CAAC,WAAW,CAoKrB,CAAC;AAEF,eAAO,MAAM,0BAA0B,YAC5B,MAAM,YACL,QAAQ,WACT;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,yBA6I7B,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC7B,MAAM,YACL,QAAQ,WACT;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,yBA2I7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,MAAM,YACL,QAAQ,WACT;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,yBAuR7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,MAAM,YACL,QAAQ,WACT;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,yBA4K7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,MAAM,YACL,QAAQ,WACT;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,yBA4F7B,CAAC"}
|
|
@@ -85,7 +85,7 @@ export const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, opt
|
|
|
85
85
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
86
86
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
87
87
|
txb.object(getConf().BLUEFIN_SUI_USDC_POOL),
|
|
88
|
-
txb.object(getConf().
|
|
88
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
89
89
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
90
90
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
91
91
|
],
|
|
@@ -112,7 +112,7 @@ export const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, opt
|
|
|
112
112
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
113
113
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
114
114
|
txb.object(getConf().BLUEFIN_SUI_BUCK_POOL),
|
|
115
|
-
txb.object(getConf().
|
|
115
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
116
116
|
txb.object(cetusPoolMap["BUCK-SUI"]),
|
|
117
117
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
118
118
|
],
|
|
@@ -139,7 +139,7 @@ export const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, opt
|
|
|
139
139
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
140
140
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
141
141
|
txb.object(getConf().BLUEFIN_SUI_AUSD_POOL),
|
|
142
|
-
txb.object(getConf().
|
|
142
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
143
143
|
txb.object(cetusPoolMap["AUSD-SUI"]),
|
|
144
144
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
145
145
|
],
|
|
@@ -165,7 +165,7 @@ export const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, opt
|
|
|
165
165
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
166
166
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
167
167
|
txb.object(getConf().BLUEFIN_SUI_USDC_POOL),
|
|
168
|
-
txb.object(getConf().
|
|
168
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
169
169
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
170
170
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
171
171
|
],
|
|
@@ -455,7 +455,7 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
455
455
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
456
456
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
457
457
|
txb.object(getConf().BLUEFIN_USDT_USDC_POOL),
|
|
458
|
-
txb.object(getConf().
|
|
458
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
459
459
|
txb.object(cetusPoolMap["USDC-USDT"]),
|
|
460
460
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
461
461
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -483,7 +483,7 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
483
483
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
484
484
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
485
485
|
txb.object(getConf().BLUEFIN_AUSD_USDC_POOL),
|
|
486
|
-
txb.object(getConf().
|
|
486
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
487
487
|
txb.object(cetusPoolMap["USDC-AUSD"]),
|
|
488
488
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
489
489
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -511,7 +511,7 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
511
511
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
512
512
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
513
513
|
txb.object(getConf().BLUEFIN_WBTC_USDC_POOL),
|
|
514
|
-
txb.object(getConf().
|
|
514
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
515
515
|
txb.object(cetusPoolMap["USDC-WBTC"]),
|
|
516
516
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
517
517
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -539,7 +539,7 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
539
539
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
540
540
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
541
541
|
txb.object(getConf().BLUEFIN_SEND_USDC_POOL),
|
|
542
|
-
txb.object(getConf().
|
|
542
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
543
543
|
txb.object(cetusPoolMap["USDC-SEND"]),
|
|
544
544
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
545
545
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -567,7 +567,7 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
567
567
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
568
568
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
569
569
|
txb.object(getConf().BLUEFIN_STSUI_USDC_POOL),
|
|
570
|
-
txb.object(getConf().
|
|
570
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
571
571
|
txb.object(cetusPoolMap["USDC-STSUI"]),
|
|
572
572
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
573
573
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -594,14 +594,14 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
594
594
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
595
595
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
596
596
|
txb.object(getConf().BLUEFIN_USDT_USDC_POOL),
|
|
597
|
-
txb.object(getConf().
|
|
597
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
598
598
|
txb.object(cetusPoolMap["USDC-USDT"]),
|
|
599
599
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
600
600
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
601
601
|
],
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
|
-
if (poolName === "BLUEFIN-SUIUSDT-USDC") {
|
|
604
|
+
else if (poolName === "BLUEFIN-SUIUSDT-USDC") {
|
|
605
605
|
txb.moveCall({
|
|
606
606
|
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_pool::user_deposit`,
|
|
607
607
|
typeArguments: [
|
|
@@ -622,7 +622,7 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
622
622
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
623
623
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
624
624
|
txb.object(getConf().BLUEFIN_SUIUSDT_USDC_POOL),
|
|
625
|
-
txb.object(getConf().
|
|
625
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
626
626
|
txb.object(cetusPoolMap["USDC-SUIUSDT"]),
|
|
627
627
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
628
628
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -649,13 +649,40 @@ export const depositBluefinType1Txb = async (amount, poolName, isAmountA, option
|
|
|
649
649
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
650
650
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
651
651
|
txb.object(getConf().BLUEFIN_SUIUSDT_USDC_POOL),
|
|
652
|
-
txb.object(getConf().
|
|
652
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
653
653
|
txb.object(cetusPoolMap["USDC-SUIUSDT"]),
|
|
654
654
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
655
655
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
656
656
|
],
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
+
else if (poolName === "BLUEFIN-AUTOBALANCE-DEEP-BLUE") {
|
|
660
|
+
txb.moveCall({
|
|
661
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_pool::user_deposit`,
|
|
662
|
+
typeArguments: [
|
|
663
|
+
coinsList["DEEP"].type,
|
|
664
|
+
coinsList["BLUE"].type,
|
|
665
|
+
coinsList["BLUE"].type,
|
|
666
|
+
coinsList["SUI"].type,
|
|
667
|
+
],
|
|
668
|
+
arguments: [
|
|
669
|
+
txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),
|
|
670
|
+
someReceipt,
|
|
671
|
+
txb.object(poolinfo.poolId),
|
|
672
|
+
depositCoinA,
|
|
673
|
+
depositCoinB,
|
|
674
|
+
txb.object(getConf().ALPHA_DISTRIBUTOR),
|
|
675
|
+
txb.object(poolinfo.investorId),
|
|
676
|
+
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
677
|
+
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
678
|
+
txb.object(getConf().BLUEFIN_DEEP_BLUE_POOL),
|
|
679
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
680
|
+
txb.object(cetusPoolMap["BLUE-DEEP"]),
|
|
681
|
+
txb.object(cetusPoolMap["BLUE-SUI"]),
|
|
682
|
+
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
683
|
+
],
|
|
684
|
+
});
|
|
685
|
+
}
|
|
659
686
|
txb.transferObjects([coin1], address);
|
|
660
687
|
txb.transferObjects([coin2], address);
|
|
661
688
|
}
|
|
@@ -767,7 +794,7 @@ export const depositBluefinType2Txb = async (amount, poolName, isAmountA, option
|
|
|
767
794
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
768
795
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
769
796
|
txb.object(getConf().BLUEFIN_ALPHA_USDC_POOL),
|
|
770
|
-
txb.object(getConf().
|
|
797
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
771
798
|
txb.object(cetusPoolMap["ALPHA-USDC"]),
|
|
772
799
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
773
800
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -795,7 +822,7 @@ export const depositBluefinType2Txb = async (amount, poolName, isAmountA, option
|
|
|
795
822
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
796
823
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
797
824
|
txb.object(getConf().BLUEFIN_NAVX_VSUI_POOL),
|
|
798
|
-
txb.object(getConf().
|
|
825
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
799
826
|
txb.object(cetusPoolMap["NAVX-VSUI"]),
|
|
800
827
|
txb.object(cetusPoolMap["VSUI-SUI"]),
|
|
801
828
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -997,7 +1024,7 @@ export const depositBluefinStsuiTxb = async (amount, poolName, isAmountA, option
|
|
|
997
1024
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
998
1025
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
999
1026
|
txb.object(getConf().BLUEFIN_STSUI_USDC_POOL),
|
|
1000
|
-
txb.object(getConf().
|
|
1027
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1001
1028
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1002
1029
|
txb.object(bluefinPoolMap["SUI-USDC"]),
|
|
1003
1030
|
txb.object(getConf().LST_INFO),
|
|
@@ -1027,7 +1054,7 @@ export const depositBluefinStsuiTxb = async (amount, poolName, isAmountA, option
|
|
|
1027
1054
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1028
1055
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1029
1056
|
txb.object(getConf().BLUEFIN_ALPHA_STSUI_POOL),
|
|
1030
|
-
txb.object(getConf().
|
|
1057
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1031
1058
|
txb.object(cetusPoolMap["ALPHA-SUI"]),
|
|
1032
1059
|
txb.object(bluefinPoolMap["SUI-ALPHA"]),
|
|
1033
1060
|
txb.object(getConf().LST_INFO),
|
|
@@ -1075,7 +1102,7 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
|
|
|
1075
1102
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1076
1103
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1077
1104
|
txb.object(getConf().BLUEFIN_SUI_USDC_POOL),
|
|
1078
|
-
txb.object(getConf().
|
|
1105
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1079
1106
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1080
1107
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
1081
1108
|
],
|
|
@@ -1120,7 +1147,7 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
|
|
|
1120
1147
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1121
1148
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1122
1149
|
txb.object(getConf().BLUEFIN_SUI_USDC_POOL),
|
|
1123
|
-
txb.object(getConf().
|
|
1150
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1124
1151
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1125
1152
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
1126
1153
|
],
|
|
@@ -1148,7 +1175,7 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
|
|
|
1148
1175
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1149
1176
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1150
1177
|
txb.object(getConf().BLUEFIN_SUI_BUCK_POOL),
|
|
1151
|
-
txb.object(getConf().
|
|
1178
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1152
1179
|
txb.object(cetusPoolMap["BUCK-SUI"]),
|
|
1153
1180
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
1154
1181
|
],
|
|
@@ -1176,7 +1203,7 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
|
|
|
1176
1203
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1177
1204
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1178
1205
|
txb.object(getConf().BLUEFIN_SUI_AUSD_POOL),
|
|
1179
|
-
txb.object(getConf().
|
|
1206
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1180
1207
|
txb.object(cetusPoolMap["AUSD-SUI"]),
|
|
1181
1208
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
1182
1209
|
],
|
|
@@ -1359,7 +1386,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1359
1386
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1360
1387
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1361
1388
|
txb.object(getConf().BLUEFIN_USDT_USDC_POOL),
|
|
1362
|
-
txb.object(getConf().
|
|
1389
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1363
1390
|
txb.object(cetusPoolMap["USDC-USDT"]),
|
|
1364
1391
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1365
1392
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1385,13 +1412,39 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1385
1412
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1386
1413
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1387
1414
|
txb.object(getConf().BLUEFIN_SUIUSDT_USDC_POOL),
|
|
1388
|
-
txb.object(getConf().
|
|
1415
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1389
1416
|
txb.object(cetusPoolMap["USDC-SUIUSDT"]),
|
|
1390
1417
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1391
1418
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
1392
1419
|
],
|
|
1393
1420
|
});
|
|
1394
1421
|
}
|
|
1422
|
+
else if (poolName === "BLUEFIN-AUTOBALANCE-DEEP-BLUE") {
|
|
1423
|
+
txb.moveCall({
|
|
1424
|
+
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_pool::user_withdraw`,
|
|
1425
|
+
typeArguments: [
|
|
1426
|
+
coinsList[pool1].type,
|
|
1427
|
+
coinsList[pool2].type,
|
|
1428
|
+
coinsList["BLUE"].type,
|
|
1429
|
+
coinsList["SUI"].type,
|
|
1430
|
+
],
|
|
1431
|
+
arguments: [
|
|
1432
|
+
txb.object(getConf().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),
|
|
1433
|
+
txb.object(receipt[0].objectId),
|
|
1434
|
+
txb.object(poolinfo.poolId),
|
|
1435
|
+
txb.object(getConf().ALPHA_DISTRIBUTOR),
|
|
1436
|
+
txb.object(poolinfo.investorId),
|
|
1437
|
+
txb.pure.u128(xTokens),
|
|
1438
|
+
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1439
|
+
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1440
|
+
txb.object(getConf().BLUEFIN_DEEP_BLUE_POOL),
|
|
1441
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1442
|
+
txb.object(cetusPoolMap["BLUE-DEEP"]),
|
|
1443
|
+
txb.object(cetusPoolMap["BLUE-SUI"]),
|
|
1444
|
+
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
1445
|
+
],
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1395
1448
|
}
|
|
1396
1449
|
else {
|
|
1397
1450
|
let alpha_receipt;
|
|
@@ -1431,7 +1484,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1431
1484
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1432
1485
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1433
1486
|
txb.object(getConf().BLUEFIN_USDT_USDC_POOL),
|
|
1434
|
-
txb.object(getConf().
|
|
1487
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1435
1488
|
txb.object(cetusPoolMap["USDC-USDT"]),
|
|
1436
1489
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1437
1490
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1460,7 +1513,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1460
1513
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1461
1514
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1462
1515
|
txb.object(getConf().BLUEFIN_AUSD_USDC_POOL),
|
|
1463
|
-
txb.object(getConf().
|
|
1516
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1464
1517
|
txb.object(cetusPoolMap["USDC-AUSD"]),
|
|
1465
1518
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1466
1519
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1489,7 +1542,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1489
1542
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1490
1543
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1491
1544
|
txb.object(getConf().BLUEFIN_WBTC_USDC_POOL),
|
|
1492
|
-
txb.object(getConf().
|
|
1545
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1493
1546
|
txb.object(cetusPoolMap["USDC-WBTC"]),
|
|
1494
1547
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1495
1548
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1518,7 +1571,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1518
1571
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1519
1572
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1520
1573
|
txb.object(getConf().BLUEFIN_SEND_USDC_POOL),
|
|
1521
|
-
txb.object(getConf().
|
|
1574
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1522
1575
|
txb.object(cetusPoolMap["USDC-SEND"]),
|
|
1523
1576
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1524
1577
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1547,7 +1600,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1547
1600
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1548
1601
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1549
1602
|
txb.object(getConf().BLUEFIN_STSUI_USDC_POOL),
|
|
1550
|
-
txb.object(getConf().
|
|
1603
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1551
1604
|
txb.object(cetusPoolMap["USDC-STSUI"]),
|
|
1552
1605
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1553
1606
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1576,7 +1629,7 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1576
1629
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1577
1630
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1578
1631
|
txb.object(getConf().BLUEFIN_SUIUSDT_USDC_POOL),
|
|
1579
|
-
txb.object(getConf().
|
|
1632
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1580
1633
|
txb.object(cetusPoolMap["USDC-SUIUSDT"]),
|
|
1581
1634
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1582
1635
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1636,7 +1689,7 @@ export const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
1636
1689
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1637
1690
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1638
1691
|
txb.object(getConf().BLUEFIN_ALPHA_USDC_POOL),
|
|
1639
|
-
txb.object(getConf().
|
|
1692
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1640
1693
|
txb.object(cetusPoolMap["ALPHA-USDC"]),
|
|
1641
1694
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1642
1695
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1665,7 +1718,7 @@ export const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
1665
1718
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1666
1719
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1667
1720
|
txb.object(getConf().BLUEFIN_NAVX_VSUI_POOL),
|
|
1668
|
-
txb.object(getConf().
|
|
1721
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1669
1722
|
txb.object(cetusPoolMap["NAVX-VSUI"]),
|
|
1670
1723
|
txb.object(cetusPoolMap["VSUI-SUI"]),
|
|
1671
1724
|
txb.object(getConf().CLOCK_PACKAGE_ID),
|
|
@@ -1810,7 +1863,7 @@ export const withdrawBluefinStsuiTxb = async (xTokens, poolName, options) => {
|
|
|
1810
1863
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1811
1864
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1812
1865
|
txb.object(getConf().BLUEFIN_STSUI_USDC_POOL),
|
|
1813
|
-
txb.object(getConf().
|
|
1866
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1814
1867
|
txb.object(cetusPoolMap["USDC-SUI"]),
|
|
1815
1868
|
txb.object(bluefinPoolMap["SUI-USDC"]),
|
|
1816
1869
|
txb.object(getConf().LST_INFO),
|
|
@@ -1841,7 +1894,7 @@ export const withdrawBluefinStsuiTxb = async (xTokens, poolName, options) => {
|
|
|
1841
1894
|
txb.object(getConf().BLUEFIN_GLOBAL_CONFIG),
|
|
1842
1895
|
txb.object(getConf().CETUS_GLOBAL_CONFIG_ID),
|
|
1843
1896
|
txb.object(getConf().BLUEFIN_ALPHA_STSUI_POOL),
|
|
1844
|
-
txb.object(getConf().
|
|
1897
|
+
txb.object(getConf().BLUEFIN_BLUE_SUI_POOL),
|
|
1845
1898
|
txb.object(cetusPoolMap["ALPHA-SUI"]),
|
|
1846
1899
|
txb.object(bluefinPoolMap["SUI-ALPHA"]),
|
|
1847
1900
|
txb.object(getConf().LST_INFO),
|