@scallop-io/sui-scallop-sdk 0.46.63 → 0.47.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -81,19 +81,19 @@ var API_BASE_URL = "https://sui.apis.scallop.io";
81
81
  var SDK_API_BASE_URL = "https://sdk.api.scallop.io";
82
82
  var IS_VE_SCA_TEST = false;
83
83
  var USE_TEST_ADDRESS = false;
84
- var ADDRESSES_ID = IS_VE_SCA_TEST || USE_TEST_ADDRESS ? "65fb07c39c845425d71d7b18" : "664dfe22898c36c159e28bc8";
84
+ var ADDRESSES_ID = IS_VE_SCA_TEST || USE_TEST_ADDRESS ? "65fb07c39c845425d71d7b18" : "66f8e7ed9bb9e07fdfb86bbb";
85
85
  var PROTOCOL_OBJECT_ID = IS_VE_SCA_TEST ? "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" : "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
86
86
  var BORROW_FEE_PROTOCOL_ID = IS_VE_SCA_TEST ? "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" : "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
87
87
  var SCA_COIN_TYPE = IS_VE_SCA_TEST ? `0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA` : "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
88
88
  var OLD_BORROW_INCENTIVE_PROTOCOL_ID = "0xc63072e7f5f4983a2efaf5bdba1480d5e7d74d57948e1c7cc436f8e22cbeb410";
89
89
  var SUPPORT_POOLS = [
90
- "eth",
91
- "btc",
92
- "usdc",
93
- "usdt",
90
+ "weth",
91
+ "wbtc",
92
+ "wusdc",
93
+ "wusdt",
94
94
  "sui",
95
- "apt",
96
- "sol",
95
+ "wapt",
96
+ "wsol",
97
97
  "cetus",
98
98
  "afsui",
99
99
  "hasui",
@@ -101,13 +101,13 @@ var SUPPORT_POOLS = [
101
101
  "sca"
102
102
  ];
103
103
  var SUPPORT_COLLATERALS = [
104
- "eth",
105
- "btc",
106
- "usdc",
107
- "usdt",
104
+ "weth",
105
+ "wbtc",
106
+ "wusdc",
107
+ "wusdt",
108
108
  "sui",
109
- "apt",
110
- "sol",
109
+ "wapt",
110
+ "wsol",
111
111
  "cetus",
112
112
  "afsui",
113
113
  "hasui",
@@ -115,10 +115,10 @@ var SUPPORT_COLLATERALS = [
115
115
  "sca"
116
116
  ];
117
117
  var SUPPORT_SPOOLS = [
118
- "seth",
118
+ "sweth",
119
119
  "ssui",
120
- "susdc",
121
- "susdt",
120
+ "swusdc",
121
+ "swusdt",
122
122
  "scetus",
123
123
  "safsui",
124
124
  "shasui",
@@ -126,26 +126,26 @@ var SUPPORT_SPOOLS = [
126
126
  ];
127
127
  var SUPPORT_SCOIN = [
128
128
  "ssui",
129
- "susdc",
130
- "susdt",
129
+ "swusdc",
130
+ "swusdt",
131
131
  "safsui",
132
132
  "shasui",
133
133
  "svsui",
134
- "seth",
134
+ "sweth",
135
135
  "ssca",
136
136
  "scetus",
137
- "ssol",
138
- "sbtc"
137
+ "swsol",
138
+ "swbtc"
139
139
  ];
140
140
  var SUPPORT_SPOOLS_REWARDS = ["sui"];
141
141
  var SUPPORT_BORROW_INCENTIVE_POOLS = [
142
142
  "sui",
143
- "usdc",
144
- "usdt",
143
+ "wusdc",
144
+ "wusdt",
145
145
  "afsui",
146
146
  "hasui",
147
147
  "vsui",
148
- "eth",
148
+ "weth",
149
149
  "sca"
150
150
  ];
151
151
  var SUPPORT_BORROW_INCENTIVE_REWARDS = ["sui", "sca"];
@@ -167,25 +167,25 @@ var SUPPORT_PACKAGES = [
167
167
 
168
168
  // src/constants/enum.ts
169
169
  var coinDecimals = {
170
- eth: 8,
171
- btc: 8,
172
- usdc: 6,
173
- usdt: 6,
170
+ weth: 8,
171
+ wbtc: 8,
172
+ wusdc: 6,
173
+ wusdt: 6,
174
174
  sui: 9,
175
- apt: 8,
176
- sol: 8,
175
+ wapt: 8,
176
+ wsol: 8,
177
177
  cetus: 9,
178
178
  afsui: 9,
179
179
  hasui: 9,
180
180
  vsui: 9,
181
181
  sca: 9,
182
- seth: 8,
183
- sbtc: 8,
184
- susdc: 6,
185
- susdt: 6,
182
+ sweth: 8,
183
+ swbtc: 8,
184
+ swusdc: 6,
185
+ swusdt: 6,
186
186
  ssui: 9,
187
- sapt: 8,
188
- ssol: 8,
187
+ swapt: 8,
188
+ swsol: 8,
189
189
  scetus: 9,
190
190
  safsui: 9,
191
191
  shasui: 9,
@@ -193,13 +193,13 @@ var coinDecimals = {
193
193
  ssca: 9
194
194
  };
195
195
  var assetCoins = {
196
- eth: "eth",
197
- btc: "btc",
198
- usdc: "usdc",
199
- usdt: "usdt",
196
+ weth: "weth",
197
+ wbtc: "wbtc",
198
+ wusdc: "wusdc",
199
+ wusdt: "wusdt",
200
200
  sui: "sui",
201
- apt: "apt",
202
- sol: "sol",
201
+ wapt: "wapt",
202
+ wsol: "wsol",
203
203
  cetus: "cetus",
204
204
  afsui: "afsui",
205
205
  hasui: "hasui",
@@ -207,13 +207,13 @@ var assetCoins = {
207
207
  sca: "sca"
208
208
  };
209
209
  var marketCoins = {
210
- seth: "seth",
211
- sbtc: "sbtc",
212
- susdc: "susdc",
213
- susdt: "susdt",
210
+ sweth: "sweth",
211
+ swbtc: "swbtc",
212
+ swusdc: "swusdc",
213
+ swusdt: "swusdt",
214
214
  ssui: "ssui",
215
- sapt: "sapt",
216
- ssol: "ssol",
215
+ swapt: "swapt",
216
+ swsol: "swsol",
217
217
  scetus: "scetus",
218
218
  safsui: "safsui",
219
219
  shasui: "shasui",
@@ -221,33 +221,33 @@ var marketCoins = {
221
221
  ssca: "ssca"
222
222
  };
223
223
  var sCoins = {
224
- seth: "seth",
225
- susdc: "susdc",
226
- susdt: "susdt",
224
+ sweth: "sweth",
225
+ swusdc: "swusdc",
226
+ swusdt: "swusdt",
227
227
  ssui: "ssui",
228
228
  scetus: "scetus",
229
229
  safsui: "safsui",
230
230
  shasui: "shasui",
231
231
  svsui: "svsui",
232
232
  ssca: "ssca",
233
- ssol: "ssol",
234
- sbtc: "sbtc"
233
+ swsol: "swsol",
234
+ swbtc: "swbtc"
235
235
  };
236
236
  var stakeMarketCoins = {
237
- seth: "seth",
237
+ sweth: "sweth",
238
238
  ssui: "ssui",
239
- susdc: "susdc",
240
- susdt: "susdt",
239
+ swusdc: "swusdc",
240
+ swusdt: "swusdt",
241
241
  scetus: "scetus",
242
242
  safsui: "safsui",
243
243
  shasui: "shasui",
244
244
  svsui: "svsui"
245
245
  };
246
246
  var spoolRewardCoins = {
247
- seth: "sui",
247
+ sweth: "sui",
248
248
  ssui: "sui",
249
- susdc: "sui",
250
- susdt: "sui",
249
+ swusdc: "sui",
250
+ swusdt: "sui",
251
251
  scetus: "sui",
252
252
  safsui: "sui",
253
253
  shasui: "sui",
@@ -255,22 +255,22 @@ var spoolRewardCoins = {
255
255
  };
256
256
  var borrowIncentiveRewardCoins = {
257
257
  sui: ["sui", "sca"],
258
- usdc: ["sui", "sca"],
259
- usdt: ["sui", "sca"],
258
+ wusdc: ["sui", "sca"],
259
+ wusdt: ["sui", "sca"],
260
260
  sca: ["sui", "sca"],
261
261
  afsui: ["sui"],
262
262
  hasui: ["sui"],
263
263
  vsui: ["sui"],
264
- eth: ["sui"]
264
+ weth: ["sui"]
265
265
  };
266
266
  var coinIds = {
267
267
  sui: "0x0000000000000000000000000000000000000000000000000000000000000002",
268
- eth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
269
- btc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
270
- usdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
271
- usdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
272
- apt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
273
- sol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
268
+ weth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
269
+ wbtc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
270
+ wusdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
271
+ wusdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
272
+ wapt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
273
+ wsol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
274
274
  cetus: "0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b",
275
275
  afsui: "0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc",
276
276
  hasui: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d",
@@ -278,12 +278,12 @@ var coinIds = {
278
278
  sca: IS_VE_SCA_TEST ? "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524" : "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6"
279
279
  };
280
280
  var wormholeCoinIds = {
281
- eth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
282
- btc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
283
- usdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
284
- usdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
285
- apt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
286
- sol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8"
281
+ weth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
282
+ wbtc: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
283
+ wusdc: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
284
+ wusdt: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
285
+ wapt: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
286
+ wsol: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8"
287
287
  };
288
288
  var voloCoinIds = {
289
289
  vsui: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55"
@@ -292,14 +292,14 @@ var sCoinIds = {
292
292
  ssui: "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI",
293
293
  scetus: "0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS",
294
294
  ssca: "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA",
295
- susdc: "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
296
- susdt: "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
297
- seth: "0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
295
+ swusdc: "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
296
+ swusdt: "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
297
+ sweth: "0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
298
298
  safsui: "0x00671b1fa2a124f5be8bdae8b91ee711462c5d9e31bda232e70fd9607b523c88::scallop_af_sui::SCALLOP_AF_SUI",
299
299
  shasui: "0x9a2376943f7d22f88087c259c5889925f332ca4347e669dc37d54c2bf651af3c::scallop_ha_sui::SCALLOP_HA_SUI",
300
300
  svsui: "0xe1a1cc6bcf0001a015eab84bcc6713393ce20535f55b8b6f35c142e057a25fbe::scallop_v_sui::SCALLOP_V_SUI",
301
- ssol: "0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL",
302
- sbtc: "0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC"
301
+ swsol: "0x1392650f2eca9e3f6ffae3ff89e42a3590d7102b80e2b430f674730bc30d3259::scallop_wormhole_sol::SCALLOP_WORMHOLE_SOL",
302
+ swbtc: "0x2cf76a9cf5d3337961d1154283234f94da2dcff18544dfe5cbdef65f319591b5::scallop_wormhole_btc::SCALLOP_WORMHOLE_BTC"
303
303
  };
304
304
 
305
305
  // src/constants/vesca.ts
@@ -312,17 +312,17 @@ var MIN_TOP_UP_AMOUNT = 1e9;
312
312
  // src/constants/flashloan.ts
313
313
  var FlashLoanFeeObjectMap = {
314
314
  vsui: "0x0069cddee7a5c0b1d34beb5ef0620f978096525f1830b055f38b110f40d73fbb",
315
- btc: "0x2078490aa37d8fb42b511e5c95e217cb957d141267e16980bc802d76b42719f7",
315
+ wbtc: "0x2078490aa37d8fb42b511e5c95e217cb957d141267e16980bc802d76b42719f7",
316
316
  sui: "0x27614284a8f0a699ffd35aae8f2572c937ec76771cb21b0d7930ec4491a76ed4",
317
- usdt: "0x5b61983a19b5159ca348d291e4b595f42db70ccda32852a2ed85528aa65171e4",
318
- apt: "0x9d5898edcd1e4abcb044273242293a9d036f6a977bf3fe57ab71f5a87c505ee6",
317
+ wusdt: "0x5b61983a19b5159ca348d291e4b595f42db70ccda32852a2ed85528aa65171e4",
318
+ wapt: "0x9d5898edcd1e4abcb044273242293a9d036f6a977bf3fe57ab71f5a87c505ee6",
319
319
  afsui: "0xac87fde83d434554ec300c1334c9a622aa5b59e82a04334dc99e1cc1f75d4eae",
320
320
  hasui: "0xb9f505d532de1d6c9f3a8522a2d16f2958b75c0ed939d4f80b96f584a2a8ed5e",
321
- usdc: "0xd241d6a7e44ac11a6689370ed9a98eec389b98b8a6695c61fddede9fa7567b90",
322
- eth: "0xd252acb058e77877810c1290564e290a8f9fcab5bc9aca2884ede8a38810cf34",
321
+ wusdc: "0xd241d6a7e44ac11a6689370ed9a98eec389b98b8a6695c61fddede9fa7567b90",
322
+ weth: "0xd252acb058e77877810c1290564e290a8f9fcab5bc9aca2884ede8a38810cf34",
323
323
  sca: "0xe04e46471754b6f48d81c549ecfec09de02733715a63bec02364c6ac7c4dd2dc",
324
324
  cetus: "0xe65a73d11c31b2d323ad2b9f6b4bb0a3c0df9c1b212eef66c854941186a5ddc7",
325
- sol: "0xe84bdb35b790fc7bdd1645122ac6ac0fc904531d6772c9e25904fece322c5f34"
325
+ wsol: "0xe84bdb35b790fc7bdd1645122ac6ac0fc904531d6772c9e25904fece322c5f34"
326
326
  };
327
327
 
328
328
  // src/models/scallop.ts
@@ -723,7 +723,7 @@ var parseOriginBorrowIncentivePoolData = (originBorrowIncentivePoolData) => {
723
723
  )
724
724
  };
725
725
  };
726
- var calculateBorrowIncentivePoolPointData = (parsedBorrowIncentivePoolData, parsedBorrowIncentivePoolPointData, rewardCoinPrice, rewardCoinDecimal, poolCoinPrice, poolCoinDecimal) => {
726
+ var calculateBorrowIncentivePoolPointData = (parsedBorrowIncentivePoolPointData, rewardCoinPrice, rewardCoinDecimal, poolCoinPrice, poolCoinDecimal) => {
727
727
  const baseIndexRate = 1e9;
728
728
  const distributedPointPerSec = (0, import_bignumber.default)(
729
729
  parsedBorrowIncentivePoolPointData.distributedPointPerPeriod
@@ -846,6 +846,10 @@ var isMarketCoin = (coinName) => {
846
846
  return coinName.charAt(0).toLowerCase() === "s" && COIN_SET.includes(assetCoinName);
847
847
  };
848
848
  var parseAssetSymbol = (coinName) => {
849
+ const isWormhole = coinName.charAt(0) === "w";
850
+ if (isWormhole) {
851
+ return `w${coinName.slice(1).toUpperCase()}`;
852
+ }
849
853
  switch (coinName) {
850
854
  case "afsui":
851
855
  return "afSUI";
@@ -1245,7 +1249,7 @@ var TEST_ADDRESSES = {
1245
1249
  }
1246
1250
  }
1247
1251
  },
1248
- apt: {
1252
+ wapt: {
1249
1253
  id: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
1250
1254
  metaData: "0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8",
1251
1255
  treasury: "",
@@ -1258,7 +1262,7 @@ var TEST_ADDRESSES = {
1258
1262
  }
1259
1263
  }
1260
1264
  },
1261
- sol: {
1265
+ wsol: {
1262
1266
  id: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
1263
1267
  metaData: "0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e",
1264
1268
  treasury: "",
@@ -1271,7 +1275,7 @@ var TEST_ADDRESSES = {
1271
1275
  }
1272
1276
  }
1273
1277
  },
1274
- btc: {
1278
+ wbtc: {
1275
1279
  id: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
1276
1280
  metaData: "0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd",
1277
1281
  treasury: "",
@@ -1284,7 +1288,7 @@ var TEST_ADDRESSES = {
1284
1288
  }
1285
1289
  }
1286
1290
  },
1287
- eth: {
1291
+ weth: {
1288
1292
  id: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
1289
1293
  metaData: "0x8900e4ceede3363bef086d6b50ca89d816d0e90bf6bc46efefe1f8455e08f50f",
1290
1294
  treasury: "",
@@ -1297,7 +1301,7 @@ var TEST_ADDRESSES = {
1297
1301
  }
1298
1302
  }
1299
1303
  },
1300
- usdc: {
1304
+ wusdc: {
1301
1305
  id: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
1302
1306
  metaData: "0x4fbf84f3029bd0c0b77164b587963be957f853eccf834a67bb9ecba6ec80f189",
1303
1307
  treasury: "",
@@ -1310,7 +1314,7 @@ var TEST_ADDRESSES = {
1310
1314
  }
1311
1315
  }
1312
1316
  },
1313
- usdt: {
1317
+ wusdt: {
1314
1318
  id: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
1315
1319
  metaData: "0xfb0e3eb97dd158a5ae979dddfa24348063843c5b20eb8381dd5fa7c93699e45c",
1316
1320
  treasury: "",
@@ -1462,7 +1466,7 @@ var TEST_ADDRESSES = {
1462
1466
  // '0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a',
1463
1467
  object: "0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21",
1464
1468
  pools: {
1465
- seth: {
1469
+ sweth: {
1466
1470
  id: "0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787",
1467
1471
  rewardPoolId: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077"
1468
1472
  },
@@ -1474,7 +1478,7 @@ var TEST_ADDRESSES = {
1474
1478
  "0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a"
1475
1479
  )
1476
1480
  },
1477
- susdc: {
1481
+ swusdc: {
1478
1482
  // id: '0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0',
1479
1483
  id: "0xf1b383b9cf2e9f515fc69567df1053098f273849d09cd84b0278a773429bd2b2",
1480
1484
  rewardPoolId: (
@@ -1482,7 +1486,7 @@ var TEST_ADDRESSES = {
1482
1486
  "0xc71c53ee6505d928ba15bea4fe4f45d98c9c31eced94b72d00a7827d4b7ba3ff"
1483
1487
  )
1484
1488
  },
1485
- susdt: {
1489
+ swusdt: {
1486
1490
  // id: '0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f',
1487
1491
  id: "0xb5567dfa5c7fc17a249e959732664c50713dd8c23db1a11376b27df800c17418",
1488
1492
  rewardPoolId: (
@@ -1575,15 +1579,15 @@ var TEST_ADDRESSES = {
1575
1579
  coinType: "0x0a9d3c6c9af9f6e8def82921541bcbd17f73ed31bed3adcb684f2a4c267e42f0::scallop_sca::SCALLOP_SCA",
1576
1580
  treasury: "0xe818636d1d6c46d6ea1a2dce9d94696d7cbc18ce27451b603eeaa47aba8d75e0"
1577
1581
  },
1578
- susdc: {
1582
+ swusdc: {
1579
1583
  coinType: "0xaedc3ab75db8680b81a755015fa90124d217be93457b893c05bac033817defaf::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
1580
1584
  treasury: "0xfc6971648f867f7fd6928d1b873af71577e2eaf2c7543ef8bc82c431d833ae78"
1581
1585
  },
1582
- susdt: {
1586
+ swusdt: {
1583
1587
  coinType: "0xbf02fc87ddc104b342ad8414c85ceadf5b0c823c055a06fb0ed776272c01a52a::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
1584
1588
  treasury: "0xb9593e2c3a0ba796ee815012b75ae46468ea78cda0188b9ac6816efe65503521"
1585
1589
  },
1586
- seth: {
1590
+ sweth: {
1587
1591
  coinType: "0x27d54f43e3eda701be56b82e5756e41c84467cd202f5cf713d5f9e45a9f1b6bc::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
1588
1592
  treasury: "0x032b4c8fac94c038dbe986f7587e9b1e4ef580b5ee06d2ef249d85459b7ef05d"
1589
1593
  },
@@ -1627,7 +1631,7 @@ var EMPTY_ADDRESSES = {
1627
1631
  }
1628
1632
  }
1629
1633
  },
1630
- apt: {
1634
+ wapt: {
1631
1635
  id: "",
1632
1636
  metaData: "",
1633
1637
  treasury: "",
@@ -1640,7 +1644,7 @@ var EMPTY_ADDRESSES = {
1640
1644
  }
1641
1645
  }
1642
1646
  },
1643
- sol: {
1647
+ wsol: {
1644
1648
  id: "",
1645
1649
  metaData: "",
1646
1650
  treasury: "",
@@ -1653,7 +1657,7 @@ var EMPTY_ADDRESSES = {
1653
1657
  }
1654
1658
  }
1655
1659
  },
1656
- btc: {
1660
+ wbtc: {
1657
1661
  id: "",
1658
1662
  metaData: "",
1659
1663
  treasury: "",
@@ -1666,7 +1670,7 @@ var EMPTY_ADDRESSES = {
1666
1670
  }
1667
1671
  }
1668
1672
  },
1669
- eth: {
1673
+ weth: {
1670
1674
  id: "",
1671
1675
  metaData: "",
1672
1676
  treasury: "",
@@ -1679,7 +1683,7 @@ var EMPTY_ADDRESSES = {
1679
1683
  }
1680
1684
  }
1681
1685
  },
1682
- usdc: {
1686
+ wusdc: {
1683
1687
  id: "",
1684
1688
  metaData: "",
1685
1689
  treasury: "",
@@ -1692,7 +1696,7 @@ var EMPTY_ADDRESSES = {
1692
1696
  }
1693
1697
  }
1694
1698
  },
1695
- usdt: {
1699
+ wusdt: {
1696
1700
  id: "",
1697
1701
  metaData: "",
1698
1702
  treasury: "",
@@ -1831,7 +1835,7 @@ var EMPTY_ADDRESSES = {
1831
1835
  adminCap: "",
1832
1836
  object: "",
1833
1837
  pools: {
1834
- seth: {
1838
+ sweth: {
1835
1839
  id: "",
1836
1840
  rewardPoolId: ""
1837
1841
  },
@@ -1839,11 +1843,11 @@ var EMPTY_ADDRESSES = {
1839
1843
  id: "",
1840
1844
  rewardPoolId: ""
1841
1845
  },
1842
- susdc: {
1846
+ swusdc: {
1843
1847
  id: "",
1844
1848
  rewardPoolId: ""
1845
1849
  },
1846
- susdt: {
1850
+ swusdt: {
1847
1851
  id: "",
1848
1852
  rewardPoolId: ""
1849
1853
  },
@@ -1918,15 +1922,15 @@ var EMPTY_ADDRESSES = {
1918
1922
  coinType: "",
1919
1923
  treasury: ""
1920
1924
  },
1921
- susdc: {
1925
+ swusdc: {
1922
1926
  coinType: "",
1923
1927
  treasury: ""
1924
1928
  },
1925
- susdt: {
1929
+ swusdt: {
1926
1930
  coinType: "",
1927
1931
  treasury: ""
1928
1932
  },
1929
- seth: {
1933
+ sweth: {
1930
1934
  coinType: "",
1931
1935
  treasury: ""
1932
1936
  },
@@ -2788,14 +2792,14 @@ var getObligations = async ({
2788
2792
  );
2789
2793
  return obligations;
2790
2794
  };
2791
- var getObligationLocked = async (cache, obligationId) => {
2792
- const obligationObjectResponse = await cache.queryGetObject(obligationId, {
2795
+ var getObligationLocked = async (cache, obligation) => {
2796
+ const obligationObjectResponse = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
2793
2797
  showContent: true
2794
- });
2798
+ }))?.data : obligation;
2795
2799
  let obligationLocked = false;
2796
- if (obligationObjectResponse?.data && obligationObjectResponse?.data?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.data.content.fields) {
2800
+ if (obligationObjectResponse && obligationObjectResponse?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.content.fields) {
2797
2801
  obligationLocked = Boolean(
2798
- obligationObjectResponse.data.content.fields.lock_key
2802
+ obligationObjectResponse.content.fields.lock_key
2799
2803
  );
2800
2804
  }
2801
2805
  return obligationLocked;
@@ -3090,10 +3094,10 @@ var getStakeAccounts = async ({
3090
3094
  }
3091
3095
  } while (hasNextPage);
3092
3096
  const stakeAccounts = {
3093
- seth: [],
3097
+ sweth: [],
3094
3098
  ssui: [],
3095
- susdc: [],
3096
- susdt: [],
3099
+ swusdc: [],
3100
+ swusdt: [],
3097
3101
  scetus: [],
3098
3102
  safsui: [],
3099
3103
  shasui: [],
@@ -3125,8 +3129,8 @@ var getStakeAccounts = async ({
3125
3129
  const index = Number(fields.index);
3126
3130
  const points = Number(fields.points);
3127
3131
  const totalPoints = Number(fields.total_points);
3128
- if ((0, import_utils5.normalizeStructTag)(type) === stakeMarketCoinTypes.seth) {
3129
- stakeAccounts.seth.push({
3132
+ if ((0, import_utils5.normalizeStructTag)(type) === stakeMarketCoinTypes.sweth) {
3133
+ stakeAccounts.sweth.push({
3130
3134
  id,
3131
3135
  type: (0, import_utils5.normalizeStructTag)(type),
3132
3136
  stakePoolId,
@@ -3147,8 +3151,8 @@ var getStakeAccounts = async ({
3147
3151
  points,
3148
3152
  totalPoints
3149
3153
  });
3150
- } else if ((0, import_utils5.normalizeStructTag)(type) === stakeMarketCoinTypes.susdc) {
3151
- stakeAccounts.susdc.push({
3154
+ } else if ((0, import_utils5.normalizeStructTag)(type) === stakeMarketCoinTypes.swusdc) {
3155
+ stakeAccounts.swusdc.push({
3152
3156
  id,
3153
3157
  type: (0, import_utils5.normalizeStructTag)(type),
3154
3158
  stakePoolId,
@@ -3158,8 +3162,8 @@ var getStakeAccounts = async ({
3158
3162
  points,
3159
3163
  totalPoints
3160
3164
  });
3161
- } else if ((0, import_utils5.normalizeStructTag)(type) === stakeMarketCoinTypes.susdt) {
3162
- stakeAccounts.susdt.push({
3165
+ } else if ((0, import_utils5.normalizeStructTag)(type) === stakeMarketCoinTypes.swusdt) {
3166
+ stakeAccounts.swusdt.push({
3163
3167
  id,
3164
3168
  type: (0, import_utils5.normalizeStructTag)(type),
3165
3169
  stakePoolId,
@@ -3360,7 +3364,7 @@ var queryBorrowIncentivePools = async (query, borrowIncentiveCoinNames, indexer
3360
3364
  const symbol = query.utils.parseSymbol(rewardCoinName);
3361
3365
  const coinDecimal = query.utils.getCoinDecimal(rewardCoinName);
3362
3366
  const calculatedPoolPoint = calculateBorrowIncentivePoolPointData(
3363
- parsedBorrowIncentivePoolData,
3367
+ // parsedBorrowIncentivePoolData,
3364
3368
  poolPoint,
3365
3369
  rewardCoinPrice,
3366
3370
  rewardCoinDecimal,
@@ -4417,12 +4421,12 @@ var ScallopUtils = class {
4417
4421
  if (coinName === "sui")
4418
4422
  return (0, import_utils10.normalizeStructTag)(`${coinPackageId}::sui::SUI`);
4419
4423
  const wormHolePackageIds = [
4420
- this.address.get("core.coins.usdc.id") ?? wormholeCoinIds.usdc,
4421
- this.address.get("core.coins.usdt.id") ?? wormholeCoinIds.usdt,
4422
- this.address.get("core.coins.eth.id") ?? wormholeCoinIds.eth,
4423
- this.address.get("core.coins.btc.id") ?? wormholeCoinIds.btc,
4424
- this.address.get("core.coins.sol.id") ?? wormholeCoinIds.sol,
4425
- this.address.get("core.coins.apt.id") ?? wormholeCoinIds.apt
4424
+ this.address.get("core.coins.wusdc.id") ?? wormholeCoinIds.wusdc,
4425
+ this.address.get("core.coins.wusdt.id") ?? wormholeCoinIds.wusdt,
4426
+ this.address.get("core.coins.weth.id") ?? wormholeCoinIds.weth,
4427
+ this.address.get("core.coins.wbtc.id") ?? wormholeCoinIds.wbtc,
4428
+ this.address.get("core.coins.wsol.id") ?? wormholeCoinIds.wsol,
4429
+ this.address.get("core.coins.wapt.id") ?? wormholeCoinIds.wapt
4426
4430
  ];
4427
4431
  const voloPackageIds = [
4428
4432
  this.address.get("core.coins.vsui.id") ?? voloCoinIds.vsui
@@ -4496,12 +4500,12 @@ var ScallopUtils = class {
4496
4500
  const isMarketCoinType = coinType.includes("reserve::MarketCoin");
4497
4501
  coinType = coinTypeMatch?.[1] || coinType;
4498
4502
  const wormHoleCoinTypeMap = {
4499
- [`${this.address.get("core.coins.usdc.id") ?? wormholeCoinIds.usdc}::coin::COIN`]: "usdc",
4500
- [`${this.address.get("core.coins.usdt.id") ?? wormholeCoinIds.usdt}::coin::COIN`]: "usdt",
4501
- [`${this.address.get("core.coins.eth.id") ?? wormholeCoinIds.eth}::coin::COIN`]: "eth",
4502
- [`${this.address.get("core.coins.btc.id") ?? wormholeCoinIds.btc}::coin::COIN`]: "btc",
4503
- [`${this.address.get("core.coins.sol.id") ?? wormholeCoinIds.sol}::coin::COIN`]: "sol",
4504
- [`${this.address.get("core.coins.apt.id") ?? wormholeCoinIds.apt}::coin::COIN`]: "apt"
4503
+ [`${this.address.get("core.coins.wusdc.id") ?? wormholeCoinIds.wusdc}::coin::COIN`]: "wusdc",
4504
+ [`${this.address.get("core.coins.wusdt.id") ?? wormholeCoinIds.wusdt}::coin::COIN`]: "wusdt",
4505
+ [`${this.address.get("core.coins.weth.id") ?? wormholeCoinIds.weth}::coin::COIN`]: "weth",
4506
+ [`${this.address.get("core.coins.wbtc.id") ?? wormholeCoinIds.wbtc}::coin::COIN`]: "wbtc",
4507
+ [`${this.address.get("core.coins.wsol.id") ?? wormholeCoinIds.wsol}::coin::COIN`]: "wsol",
4508
+ [`${this.address.get("core.coins.wapt.id") ?? wormholeCoinIds.wapt}::coin::COIN`]: "wapt"
4505
4509
  };
4506
4510
  const voloCoinTypeMap = {
4507
4511
  [`${this.address.get("core.coins.vsui.id") ?? voloCoinIds.vsui}::cert::CERT`]: "vsui"
@@ -4541,7 +4545,7 @@ var ScallopUtils = class {
4541
4545
  * return Coin wrapped type.
4542
4546
  */
4543
4547
  getCoinWrappedType(assetCoinName) {
4544
- return assetCoinName === "usdc" || assetCoinName === "usdt" || assetCoinName === "eth" || assetCoinName === "btc" || assetCoinName === "apt" || assetCoinName === "sol" ? {
4548
+ return assetCoinName === "wusdc" || assetCoinName === "wusdt" || assetCoinName === "weth" || assetCoinName === "wbtc" || assetCoinName === "wapt" || assetCoinName === "wsol" ? {
4545
4549
  from: "Wormhole",
4546
4550
  type: "Portal from Ethereum"
4547
4551
  } : void 0;
@@ -6388,7 +6392,7 @@ var ScallopIndexer = class {
6388
6392
  const response = await this.cache.queryClient.fetchQuery({
6389
6393
  queryKey: ["market"],
6390
6394
  queryFn: async () => {
6391
- return await this._requestClient.get(`/api/market`);
6395
+ return await this._requestClient.get(`/api/market/migrate`);
6392
6396
  }
6393
6397
  });
6394
6398
  if (response.status === 200) {
@@ -6451,7 +6455,7 @@ var ScallopIndexer = class {
6451
6455
  const response = await this.cache.queryClient.fetchQuery({
6452
6456
  queryKey: ["spools"],
6453
6457
  queryFn: async () => {
6454
- return await this._requestClient.get(`/api/spools`);
6458
+ return await this._requestClient.get(`/api/spools/migrate`);
6455
6459
  }
6456
6460
  });
6457
6461
  if (response.status === 200) {
@@ -6480,7 +6484,7 @@ var ScallopIndexer = class {
6480
6484
  const response = await this.cache.queryClient.fetchQuery({
6481
6485
  queryKey: ["borrowIncentivePools"],
6482
6486
  queryFn: async () => {
6483
- return await this._requestClient.get(`/api/borrowIncentivePools`);
6487
+ return await this._requestClient.get(`/api/borrowIncentivePools/migrate`);
6484
6488
  }
6485
6489
  });
6486
6490
  if (response.status === 200) {