@scallop-io/sui-scallop-sdk 1.4.20 → 1.4.21

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.
@@ -26,4 +26,5 @@ export const PYTH_FEED_IDS: Record<SupportPoolCoins, string> = {
26
26
  fdusd: '0xccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979',
27
27
  deep: '29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff',
28
28
  fud: '6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75',
29
+ blub: '5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c',
29
30
  };
@@ -170,6 +170,9 @@ export class ScallopUtils {
170
170
  }
171
171
  if (coinName === 'sui')
172
172
  return normalizeStructTag(`${coinPackageId}::sui::SUI`);
173
+ if (coinName === 'blub')
174
+ return normalizeStructTag(`${coinPackageId}::BLUB::BLUB`);
175
+
173
176
  const wormHolePackageIds = [
174
177
  this.address.get('core.coins.wusdc.id') ?? wormholeCoinIds.wusdc,
175
178
  this.address.get('core.coins.wusdt.id') ?? wormholeCoinIds.wusdt,
@@ -1,4 +1,4 @@
1
- import { SUPPORT_POOLS } from 'src/constants';
1
+ import { PYTH_FEED_IDS, SUPPORT_POOLS } from 'src/constants';
2
2
  import { ScallopQuery } from 'src/models';
3
3
  import { OptionalKeys, SupportPoolCoins } from 'src/types';
4
4
 
@@ -30,6 +30,8 @@ export const getAllAddresses = async (query: ScallopQuery) => {
30
30
  sCoinMetadataId?: string;
31
31
  spoolName?: string;
32
32
  decimals: number;
33
+ pythFeed?: string;
34
+ pythFeedObjectId?: string;
33
35
  }
34
36
  >
35
37
  > = {};
@@ -49,6 +51,7 @@ export const getAllAddresses = async (query: ScallopQuery) => {
49
51
  },
50
52
  [] as [SupportPoolCoins, string][]
51
53
  );
54
+
52
55
  const balanceSheetParentId =
53
56
  fields.vault.fields.balance_sheets.fields.table.fields.id.id;
54
57
 
@@ -121,8 +124,10 @@ export const getAllAddresses = async (query: ScallopQuery) => {
121
124
  // @ts-ignore
122
125
  `spool.pools.s${coinName}.rewardPoolId`
123
126
  );
124
- // @ts-ignore
125
- const sCoinType = query.address.get(`scoin.coins.s${coinName}.coinType`);
127
+ const sCoinType = query.address.get(
128
+ // @ts-ignore
129
+ `scoin.coins.s${coinName}.coinType`
130
+ );
126
131
  const sCoinName = sCoinType
127
132
  ? query.utils.parseSCoinName(coinName)
128
133
  : undefined;
@@ -141,6 +146,11 @@ export const getAllAddresses = async (query: ScallopQuery) => {
141
146
  `scoin.coins.s${coinName}.metaData`
142
147
  );
143
148
 
149
+ const pythFeed = PYTH_FEED_IDS[coinName];
150
+ const pythFeedObjectId = query.address.get(
151
+ //@ts-ignore
152
+ `core.coins.${coinName}.oracle.pyth.feedObject`
153
+ );
144
154
  const decimals = query.utils.getCoinDecimal(coinName);
145
155
  const spoolName = spool ? `s${coinName}` : undefined;
146
156
  results[coinName as SupportPoolCoins] = {
@@ -166,6 +176,8 @@ export const getAllAddresses = async (query: ScallopQuery) => {
166
176
  sCoinMetadataId,
167
177
  spoolName,
168
178
  decimals,
179
+ pythFeed,
180
+ pythFeedObjectId,
169
181
  };
170
182
 
171
183
  await new Promise((resolve) => setTimeout(resolve, 500));