@alphafi/alphafi-sdk 0.0.48 → 0.0.49

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.
Files changed (51) hide show
  1. package/dist/cjs/common/constants.d.ts +20 -2
  2. package/dist/cjs/common/constants.d.ts.map +1 -1
  3. package/dist/cjs/common/constants.js +34 -17
  4. package/dist/cjs/common/constants.js.map +1 -1
  5. package/dist/cjs/common/maps.d.ts.map +1 -1
  6. package/dist/cjs/common/maps.js +18 -0
  7. package/dist/cjs/common/maps.js.map +1 -1
  8. package/dist/cjs/common/types.d.ts +2 -2
  9. package/dist/cjs/common/types.d.ts.map +1 -1
  10. package/dist/cjs/common/types.js.map +1 -1
  11. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.d.ts.map +1 -1
  12. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.js +35 -2
  13. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.js.map +1 -1
  14. package/dist/cjs/sui-sdk/events/fetchEvents.d.ts.map +1 -1
  15. package/dist/cjs/sui-sdk/events/fetchEvents.js +29 -0
  16. package/dist/cjs/sui-sdk/events/fetchEvents.js.map +1 -1
  17. package/dist/cjs/sui-sdk/events/types.d.ts +11 -1
  18. package/dist/cjs/sui-sdk/events/types.d.ts.map +1 -1
  19. package/dist/cjs/sui-sdk/events/types.js.map +1 -1
  20. package/dist/cjs/transactions/blueRewards.d.ts.map +1 -1
  21. package/dist/cjs/transactions/blueRewards.js +52 -5
  22. package/dist/cjs/transactions/blueRewards.js.map +1 -1
  23. package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
  24. package/dist/cjs/transactions/bluefin.js +152 -97
  25. package/dist/cjs/transactions/bluefin.js.map +1 -1
  26. package/dist/esm/common/constants.d.ts +20 -2
  27. package/dist/esm/common/constants.d.ts.map +1 -1
  28. package/dist/esm/common/constants.js +34 -17
  29. package/dist/esm/common/constants.js.map +1 -1
  30. package/dist/esm/common/maps.d.ts.map +1 -1
  31. package/dist/esm/common/maps.js +18 -0
  32. package/dist/esm/common/maps.js.map +1 -1
  33. package/dist/esm/common/types.d.ts +2 -2
  34. package/dist/esm/common/types.d.ts.map +1 -1
  35. package/dist/esm/common/types.js.map +1 -1
  36. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.d.ts.map +1 -1
  37. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.js +36 -3
  38. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.js.map +1 -1
  39. package/dist/esm/sui-sdk/events/fetchEvents.d.ts.map +1 -1
  40. package/dist/esm/sui-sdk/events/fetchEvents.js +29 -0
  41. package/dist/esm/sui-sdk/events/fetchEvents.js.map +1 -1
  42. package/dist/esm/sui-sdk/events/types.d.ts +11 -1
  43. package/dist/esm/sui-sdk/events/types.d.ts.map +1 -1
  44. package/dist/esm/sui-sdk/events/types.js.map +1 -1
  45. package/dist/esm/transactions/blueRewards.d.ts.map +1 -1
  46. package/dist/esm/transactions/blueRewards.js +53 -6
  47. package/dist/esm/transactions/blueRewards.js.map +1 -1
  48. package/dist/esm/transactions/bluefin.d.ts.map +1 -1
  49. package/dist/esm/transactions/bluefin.js +152 -97
  50. package/dist/esm/transactions/bluefin.js.map +1 -1
  51. package/package.json +1 -1
@@ -29,6 +29,16 @@ export interface NaviLoopAutoCompoundingEvent extends NaviAutoCompoundingEvent {
29
29
  cur_total_debt: bigint;
30
30
  accrued_interest: bigint;
31
31
  }
32
+ export interface AutobalancingAutoCompoundingEvent {
33
+ blue_reward_amount: bigint;
34
+ current_liquidity: bigint;
35
+ fee_collected: bigint;
36
+ free_balance_a: bigint;
37
+ free_balance_b: bigint;
38
+ investor_id: string;
39
+ total_amount_a: bigint;
40
+ total_amount_b: bigint;
41
+ }
32
42
  export interface RebalanceEvent {
33
43
  investor_id: string;
34
44
  lower_tick_after: string;
@@ -164,7 +174,7 @@ export type AfterTransactionEventNode = (CetusAfterTransactionEvent & CommonEven
164
174
  txDigest: string;
165
175
  };
166
176
  });
167
- export type AutoCompoundingEventNode = (CetusAutoCompoundingEvent & CommonEventAttributes) | (NaviAutoCompoundingEvent & CommonEventAttributes) | (NaviLoopAutoCompoundingEvent & CommonEventAttributes) | (AlphaAutoCompoundingEvent & CommonEventAttributes);
177
+ export type AutoCompoundingEventNode = (CetusAutoCompoundingEvent & CommonEventAttributes) | (NaviAutoCompoundingEvent & CommonEventAttributes) | (NaviLoopAutoCompoundingEvent & CommonEventAttributes) | (AlphaAutoCompoundingEvent & CommonEventAttributes) | (AutobalancingAutoCompoundingEvent & CommonEventAttributes);
168
178
  export type RebalanceEventNode = RebalanceEvent & CommonEventAttributes;
169
179
  export type LiquidityChangeEventNode = (CetusLiquidityChangeEvent & CommonEventAttributes) | (NaviLiquidityChangeEvent & CommonEventAttributes) | (AlphaLiquidityChangeEvent & CommonEventAttributes);
170
180
  export type WithdrawV2EventNode = AlphaWithdrawV2Event & CommonEventAttributes;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/sui-sdk/events/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;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AAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AAE3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -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 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\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":"","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 +1 @@
1
- {"version":3,"file":"blueRewards.d.ts","sourceRoot":"","sources":["../../../src/transactions/blueRewards.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,QAAQ,EAET,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,CA0C1C;AAED,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
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,CAiE1C;AAED,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,MAAM,CAAC,CAqDjB"}
@@ -60,6 +60,30 @@ async function claimBlueRewardTxb(userAddress, poolName) {
60
60
  ],
61
61
  });
62
62
  }
63
+ else if (poolName === "BLUEFIN-AUTOBALANCE-SUI-USDC") {
64
+ blueBalance = txb.moveCall({
65
+ target: `${pool.packageId}::alphafi_bluefin_sui_first_pool::get_user_rewards`,
66
+ typeArguments: [
67
+ index_js_1.coinsList["SUI"].type,
68
+ index_js_1.coinsList["USDC"].type,
69
+ index_js_1.coinsList["BLUE"].type,
70
+ index_js_1.coinsList["SUI"].type,
71
+ ],
72
+ arguments: [
73
+ txb.object(receipts[0].objectId),
74
+ txb.object((0, index_js_1.getConf)().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),
75
+ txb.object(pool.poolId),
76
+ txb.object(pool.investorId),
77
+ txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
78
+ txb.object((0, index_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
79
+ txb.object((0, index_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
80
+ txb.object((0, index_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
81
+ txb.object((0, index_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
82
+ txb.object(index_js_1.cetusPoolMap["USDC-SUI"]),
83
+ txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
84
+ ],
85
+ });
86
+ }
63
87
  const blueCoin = txb.moveCall({
64
88
  target: "0x2::coin::from_balance",
65
89
  typeArguments: [index_js_1.coinsList["BLUE"].type],
@@ -75,16 +99,39 @@ async function pendingBlueRewardAmount(userAddress, poolName) {
75
99
  const { getReceipts } = await Promise.resolve().then(() => __importStar(require("../index.js")));
76
100
  try {
77
101
  const receipts = await getReceipts(poolName, userAddress, false);
78
- const userPendingRewardsAll = receipts[0].content.fields.pending_rewards.fields.contents;
102
+ const receipt = receipts[0];
103
+ const userXtokenBalance = receipt.content.fields.xTokenBalance;
104
+ let userBluePendingReward = new decimal_js_1.Decimal(0);
105
+ let curAcc = new decimal_js_1.Decimal(0);
106
+ let lastAcc = new decimal_js_1.Decimal(0);
107
+ const userPendingRewardsAll = receipt.content.fields.pending_rewards.fields.contents;
79
108
  for (let i = 0; i < userPendingRewardsAll.length; i++) {
80
109
  if (userPendingRewardsAll[i].fields.key.fields.name ==
81
110
  index_js_1.coinsList["BLUE"].type.substring(2)) {
82
- return new decimal_js_1.Decimal(userPendingRewardsAll[i].fields.value)
83
- .div(Math.pow(10, index_js_1.coinsList["BLUE"].expo))
84
- .toString();
111
+ userBluePendingReward = new decimal_js_1.Decimal(userPendingRewardsAll[i].fields.value);
112
+ break;
85
113
  }
86
114
  }
87
- return "0";
115
+ const pool = await (0, index_js_1.getPool)(poolName, false);
116
+ const currAccForAllRewards = pool.content.fields.acc_rewards_per_xtoken.fields.contents;
117
+ currAccForAllRewards?.forEach((reward) => {
118
+ if (reward.fields.key.fields.name == index_js_1.coinsList["BLUE"].type.substring(2)) {
119
+ curAcc = new decimal_js_1.Decimal(reward.fields.value);
120
+ }
121
+ });
122
+ const lastAccAll = receipt.content.fields.last_acc_reward_per_xtoken.fields.contents;
123
+ lastAccAll.forEach((reward) => {
124
+ if (reward.fields.key.fields.name == index_js_1.coinsList["BLUE"].type.substring(2)) {
125
+ lastAcc = new decimal_js_1.Decimal(reward.fields.value);
126
+ }
127
+ });
128
+ return curAcc
129
+ .minus(lastAcc)
130
+ .mul(userXtokenBalance)
131
+ .div(1e36)
132
+ .plus(userBluePendingReward)
133
+ .div(Math.pow(10, index_js_1.coinsList["BLUE"].expo))
134
+ .toString();
88
135
  }
89
136
  catch (e) {
90
137
  console.error("error in calculate pending blue rewards", e);
@@ -1 +1 @@
1
- {"version":3,"file":"blueRewards.js","sourceRoot":"","sources":["../../../src/transactions/blueRewards.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAaA,gDA6CC;AAED,0DAyBC;AArFD,2CAAqC;AACrC,0CAMqB;AACrB,2DAA0E;AAKnE,KAAK,UAAU,kBAAkB,CACtC,WAAmB,EACnB,QAAkB;IAElB,MAAM,EAAE,WAAW,EAAE,GAAG,wDAAa,aAAa,GAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QACjE,MAAM,GAAG,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,mBAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,IAAI,WAAW,CAAC;QAChB,IAAI,QAAQ,KAAK,+BAA+B,EAAE,CAAC;YACjD,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC;gBACzB,MAAM,EAAE,GAAG,mBAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,iDAAiD;gBACxF,aAAa,EAAE;oBACb,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI;oBACtB,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI;oBACtB,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI;oBACtB,oBAAS,CAAC,KAAK,CAAC,CAAC,IAAI;iBACtB;gBACD,SAAS,EAAE;oBACT,GAAG,CAAC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M,KAAK,UAAU,uBAAuB,CAC3C,WAAmB,EACnB,QAAkB;IAElB,MAAM,EAAE,WAAW,EAAE,GAAG,wDAAa,aAAa,GAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QACjE,MAAM,qBAAqB,GACzB,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC;QAE7D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,IACE,qBAAqB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI;gBAC/C,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EACnC,CAAC;gBACD,OAAO,IAAI,oBAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBACtD,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;qBACzC,QAAQ,EAAE,CAAC;YAChB,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAC;IACb,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} 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, false);\n const txb = new Transaction();\n const pool = poolInfo[poolName];\n let blueBalance;\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 }\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, false);\n const userPendingRewardsAll =\n receipts[0].content.fields.pending_rewards.fields.contents;\n\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 return new Decimal(userPendingRewardsAll[i].fields.value)\n .div(Math.pow(10, coinsList[\"BLUE\"].expo))\n .toString();\n }\n }\n return \"0\";\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":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,gDAoEC;AAED,0DAwDC;AA5ID,2CAAqC;AACrC,0CAOqB;AACrB,2DAA0E;AAKnE,KAAK,UAAU,kBAAkB,CACtC,WAAmB,EACnB,QAAkB;IAElB,MAAM,EAAE,WAAW,EAAE,GAAG,wDAAa,aAAa,GAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QACjE,MAAM,GAAG,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,mBAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,IAAI,WAA8B,CAAC;QACnC,IAAI,QAAQ,KAAK,+BAA+B,EAAE,CAAC;YACjD,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC;gBACzB,MAAM,EAAE,GAAG,mBAAQ,CAAC,QAAQ,CAAC,CAAC,SAAS,iDAAiD;gBACxF,aAAa,EAAE;oBACb,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI;oBACtB,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI;oBACtB,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI;oBACtB,oBAAS,CAAC,KAAK,CAAC,CAAC,IAAI;iBACtB;gBACD,SAAS,EAAE;oBACT,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;oBAChC,GAAG,CAAC,MAAM,CAAC,IAAA,kBAAO,GAAE,CAAC,iCAAiC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AAC;gBACD,MAAM,GAAG,IAAI,oBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,UAAU,GACd,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,0BAA0B,CAAC,MAAM,CAAC,QAAQ,CAAC;QACpE,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5B,IACE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,oBAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EACpE,CAAC;gBACD,OAAO,GAAG,IAAI,oBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC,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,oBAAS,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, false);\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 }\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, false);\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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AO,MAAM,sBAAsB,WACzB,MAAM,YACJ,QAAQ,aACP,OAAO,WACT;IAAE,OAAO,EAAE,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,yBAyM7B,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"}
@@ -148,6 +148,32 @@ const depositBluefinSuiFirstTxb = async (amount, poolName, isAmountA, options, t
148
148
  ],
149
149
  });
150
150
  }
151
+ else if (poolName === "BLUEFIN-AUTOBALANCE-SUI-USDC") {
152
+ txb.moveCall({
153
+ target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_deposit`,
154
+ typeArguments: [
155
+ coins_js_1.coinsList[pool1].type,
156
+ coins_js_1.coinsList[pool2].type,
157
+ coins_js_1.coinsList["BLUE"].type,
158
+ coins_js_1.coinsList["SUI"].type,
159
+ ],
160
+ arguments: [
161
+ txb.object((0, constants_js_1.getConf)().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),
162
+ someReceipt,
163
+ txb.object(poolinfo.poolId),
164
+ depositCoinA,
165
+ depositCoinB,
166
+ txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
167
+ txb.object(poolinfo.investorId),
168
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
169
+ txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
170
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
171
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
172
+ txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
173
+ txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
174
+ ],
175
+ });
176
+ }
151
177
  txb.transferObjects([coin1], address);
152
178
  }
153
179
  else {
@@ -981,105 +1007,134 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
981
1007
  const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
982
1008
  const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
983
1009
  if (receipt.length > 0) {
984
- let alpha_receipt;
985
- if (alphaReceipt.length == 0) {
986
- [alpha_receipt] = txb.moveCall({
987
- target: `0x1::option::none`,
988
- typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
989
- arguments: [],
990
- });
991
- }
992
- else {
993
- [alpha_receipt] = txb.moveCall({
994
- target: `0x1::option::some`,
995
- typeArguments: [alphaReceipt[0].content.type],
996
- arguments: [txb.object(alphaReceipt[0].objectId)],
997
- });
998
- }
999
1010
  const poolinfo = maps_js_1.poolInfo[poolName];
1000
- if (poolName === "BLUEFIN-SUI-USDC") {
1001
- txb.moveCall({
1002
- target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw`,
1003
- typeArguments: [
1004
- coins_js_1.coinsList[pool1].type,
1005
- coins_js_1.coinsList[pool2].type,
1006
- coins_js_1.coinsList["BLUE"].type,
1007
- coins_js_1.coinsList["SUI"].type,
1008
- ],
1009
- arguments: [
1010
- txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
1011
- txb.object((0, constants_js_1.getConf)().VERSION),
1012
- txb.object(receipt[0].objectId),
1013
- alpha_receipt,
1014
- txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
1015
- txb.object(poolinfo.poolId),
1016
- txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
1017
- txb.object(poolinfo.investorId),
1018
- txb.pure.u128(xTokens),
1019
- txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
1020
- txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
1021
- txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
1022
- txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1023
- txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
1024
- txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1025
- ],
1026
- });
1027
- }
1028
- else if (poolName === "BLUEFIN-SUI-BUCK") {
1029
- txb.moveCall({
1030
- target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_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_SUI_BUCK_POOL),
1050
- txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1051
- txb.object(maps_js_1.cetusPoolMap["BUCK-SUI"]),
1052
- txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1053
- ],
1054
- });
1011
+ if (poolName.toString().includes("AUTOBALANCE")) {
1012
+ if (poolName === "BLUEFIN-AUTOBALANCE-SUI-USDC") {
1013
+ txb.moveCall({
1014
+ target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw`,
1015
+ typeArguments: [
1016
+ coins_js_1.coinsList[pool1].type,
1017
+ coins_js_1.coinsList[pool2].type,
1018
+ coins_js_1.coinsList["BLUE"].type,
1019
+ coins_js_1.coinsList["SUI"].type,
1020
+ ],
1021
+ arguments: [
1022
+ txb.object((0, constants_js_1.getConf)().ALPHA_BLUEFIN_AUTOBALANCE_VERSION),
1023
+ txb.object(receipt[0].objectId),
1024
+ txb.object(poolinfo.poolId),
1025
+ txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
1026
+ txb.object(poolinfo.investorId),
1027
+ txb.pure.u128(xTokens),
1028
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
1029
+ txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
1030
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
1031
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1032
+ txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
1033
+ txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1034
+ ],
1035
+ });
1036
+ }
1055
1037
  }
1056
- else if (poolName === "BLUEFIN-SUI-AUSD") {
1057
- txb.moveCall({
1058
- target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw`,
1059
- typeArguments: [
1060
- coins_js_1.coinsList[pool1].type,
1061
- coins_js_1.coinsList[pool2].type,
1062
- coins_js_1.coinsList["BLUE"].type,
1063
- coins_js_1.coinsList["SUI"].type,
1064
- ],
1065
- arguments: [
1066
- txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
1067
- txb.object((0, constants_js_1.getConf)().VERSION),
1068
- txb.object(receipt[0].objectId),
1069
- alpha_receipt,
1070
- txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
1071
- txb.object(poolinfo.poolId),
1072
- txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
1073
- txb.object(poolinfo.investorId),
1074
- txb.pure.u128(xTokens),
1075
- txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
1076
- txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
1077
- txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_AUSD_POOL),
1078
- txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1079
- txb.object(maps_js_1.cetusPoolMap["AUSD-SUI"]),
1080
- txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1081
- ],
1082
- });
1038
+ else {
1039
+ let alpha_receipt;
1040
+ if (alphaReceipt.length == 0) {
1041
+ [alpha_receipt] = txb.moveCall({
1042
+ target: `0x1::option::none`,
1043
+ typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
1044
+ arguments: [],
1045
+ });
1046
+ }
1047
+ else {
1048
+ [alpha_receipt] = txb.moveCall({
1049
+ target: `0x1::option::some`,
1050
+ typeArguments: [alphaReceipt[0].content.type],
1051
+ arguments: [txb.object(alphaReceipt[0].objectId)],
1052
+ });
1053
+ }
1054
+ if (poolName === "BLUEFIN-SUI-USDC") {
1055
+ txb.moveCall({
1056
+ target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw`,
1057
+ typeArguments: [
1058
+ coins_js_1.coinsList[pool1].type,
1059
+ coins_js_1.coinsList[pool2].type,
1060
+ coins_js_1.coinsList["BLUE"].type,
1061
+ coins_js_1.coinsList["SUI"].type,
1062
+ ],
1063
+ arguments: [
1064
+ txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
1065
+ txb.object((0, constants_js_1.getConf)().VERSION),
1066
+ txb.object(receipt[0].objectId),
1067
+ alpha_receipt,
1068
+ txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
1069
+ txb.object(poolinfo.poolId),
1070
+ txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
1071
+ txb.object(poolinfo.investorId),
1072
+ txb.pure.u128(xTokens),
1073
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
1074
+ txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
1075
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_USDC_POOL),
1076
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1077
+ txb.object(maps_js_1.cetusPoolMap["USDC-SUI"]),
1078
+ txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1079
+ ],
1080
+ });
1081
+ }
1082
+ else if (poolName === "BLUEFIN-SUI-BUCK") {
1083
+ txb.moveCall({
1084
+ target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw`,
1085
+ typeArguments: [
1086
+ coins_js_1.coinsList[pool1].type,
1087
+ coins_js_1.coinsList[pool2].type,
1088
+ coins_js_1.coinsList["BLUE"].type,
1089
+ coins_js_1.coinsList["SUI"].type,
1090
+ ],
1091
+ arguments: [
1092
+ txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
1093
+ txb.object((0, constants_js_1.getConf)().VERSION),
1094
+ txb.object(receipt[0].objectId),
1095
+ alpha_receipt,
1096
+ txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
1097
+ txb.object(poolinfo.poolId),
1098
+ txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
1099
+ txb.object(poolinfo.investorId),
1100
+ txb.pure.u128(xTokens),
1101
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
1102
+ txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
1103
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_BUCK_POOL),
1104
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1105
+ txb.object(maps_js_1.cetusPoolMap["BUCK-SUI"]),
1106
+ txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1107
+ ],
1108
+ });
1109
+ }
1110
+ else if (poolName === "BLUEFIN-SUI-AUSD") {
1111
+ txb.moveCall({
1112
+ target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw`,
1113
+ typeArguments: [
1114
+ coins_js_1.coinsList[pool1].type,
1115
+ coins_js_1.coinsList[pool2].type,
1116
+ coins_js_1.coinsList["BLUE"].type,
1117
+ coins_js_1.coinsList["SUI"].type,
1118
+ ],
1119
+ arguments: [
1120
+ txb.object((0, constants_js_1.getConf)().ALPHA_4_VERSION),
1121
+ txb.object((0, constants_js_1.getConf)().VERSION),
1122
+ txb.object(receipt[0].objectId),
1123
+ alpha_receipt,
1124
+ txb.object((0, constants_js_1.getConf)().ALPHA_POOL),
1125
+ txb.object(poolinfo.poolId),
1126
+ txb.object((0, constants_js_1.getConf)().ALPHA_DISTRIBUTOR),
1127
+ txb.object(poolinfo.investorId),
1128
+ txb.pure.u128(xTokens),
1129
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_GLOBAL_CONFIG),
1130
+ txb.object((0, constants_js_1.getConf)().CETUS_GLOBAL_CONFIG_ID),
1131
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_SUI_AUSD_POOL),
1132
+ txb.object((0, constants_js_1.getConf)().BLUEFIN_BLUE_SUI_POOL_AUTOCOMPOUND),
1133
+ txb.object(maps_js_1.cetusPoolMap["AUSD-SUI"]),
1134
+ txb.object((0, constants_js_1.getConf)().CLOCK_PACKAGE_ID),
1135
+ ],
1136
+ });
1137
+ }
1083
1138
  }
1084
1139
  }
1085
1140
  else {