@scallop-io/sui-scallop-sdk 1.4.24-alpha.1 → 1.5.0-alpha.1

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 (52) hide show
  1. package/dist/constants/common.d.ts +4 -4
  2. package/dist/constants/enum.d.ts +2 -2
  3. package/dist/constants/index.d.ts +1 -0
  4. package/dist/constants/xoracle.d.ts +2 -0
  5. package/dist/index.js +580 -685
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +590 -696
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/models/scallopIndexer.d.ts +1 -0
  10. package/dist/models/scallopPrice.d.ts +0 -0
  11. package/dist/models/scallopQuery.d.ts +30 -13
  12. package/dist/models/scallopUtils.d.ts +2 -2
  13. package/dist/queries/borrowIncentiveQuery.d.ts +0 -2
  14. package/dist/queries/coreQuery.d.ts +1 -1
  15. package/dist/queries/index.d.ts +1 -0
  16. package/dist/queries/poolAddressesQuery.d.ts +1 -1
  17. package/dist/queries/portfolioQuery.d.ts +3 -4
  18. package/dist/queries/priceQuery.d.ts +1 -3
  19. package/dist/queries/sCoinQuery.d.ts +1 -1
  20. package/dist/queries/xOracleQuery.d.ts +13 -0
  21. package/dist/types/address.d.ts +1 -0
  22. package/dist/types/constant/index.d.ts +1 -0
  23. package/dist/types/constant/xOracle.d.ts +9 -0
  24. package/package.json +1 -1
  25. package/src/builders/borrowIncentiveBuilder.ts +11 -25
  26. package/src/builders/coreBuilder.ts +15 -72
  27. package/src/builders/oracle.ts +73 -46
  28. package/src/builders/referralBuilder.ts +9 -20
  29. package/src/builders/spoolBuilder.ts +10 -38
  30. package/src/builders/vescaBuilder.ts +11 -26
  31. package/src/constants/coinGecko.ts +4 -12
  32. package/src/constants/common.ts +0 -2
  33. package/src/constants/enum.ts +10 -13
  34. package/src/constants/index.ts +1 -0
  35. package/src/constants/poolAddress.ts +343 -218
  36. package/src/constants/pyth.ts +0 -1
  37. package/src/constants/testAddress.ts +35 -254
  38. package/src/constants/xoracle.ts +25 -0
  39. package/src/models/scallopIndexer.ts +11 -0
  40. package/src/models/scallopPrice.ts +0 -0
  41. package/src/models/scallopQuery.ts +58 -13
  42. package/src/models/scallopUtils.ts +1 -1
  43. package/src/queries/coreQuery.ts +16 -6
  44. package/src/queries/index.ts +1 -0
  45. package/src/queries/poolAddressesQuery.ts +2 -2
  46. package/src/queries/priceQuery.ts +10 -3
  47. package/src/queries/vescaQuery.ts +8 -17
  48. package/src/queries/xOracleQuery.ts +124 -0
  49. package/src/types/address.ts +1 -0
  50. package/src/types/constant/index.ts +1 -0
  51. package/src/types/constant/xOracle.ts +11 -0
  52. package/src/utils/util.ts +4 -9
package/dist/index.js CHANGED
@@ -84,7 +84,8 @@ __export(src_exports, {
84
84
  stakeMarketCoins: () => stakeMarketCoins,
85
85
  suiBridgeCoins: () => suiBridgeCoins,
86
86
  voloCoinIds: () => voloCoinIds,
87
- wormholeCoinIds: () => wormholeCoinIds
87
+ wormholeCoinIds: () => wormholeCoinIds,
88
+ xOracleList: () => xOracleList
88
89
  });
89
90
  module.exports = __toCommonJS(src_exports);
90
91
 
@@ -100,35 +101,26 @@ var DEFAULT_CACHE_OPTIONS = {
100
101
 
101
102
  // src/constants/coinGecko.ts
102
103
  var COIN_GECKGO_IDS = {
103
- // Sui Bridge
104
+ usdc: "usdc",
104
105
  sbeth: "ethereum",
105
106
  sbusdt: "tether",
106
107
  sbwbtc: "bitcoin",
107
- // Wormhole
108
108
  weth: "ethereum",
109
109
  wbtc: "bitcoin",
110
110
  wusdc: "usdc",
111
111
  wusdt: "tether",
112
+ sui: "sui",
112
113
  wapt: "aptos",
113
114
  wsol: "solana",
114
- // Sui Native
115
- usdc: "usdc",
116
- // Sui LST
117
- sui: "sui",
115
+ cetus: "cetus-protocol",
118
116
  afsui: "sui",
119
117
  hasui: "sui",
120
118
  vsui: "sui",
121
- // Stable
122
- fdusd: "first-digital-usd",
123
- // DeFi
124
- cetus: "cetus-protocol",
125
119
  sca: "scallop-2",
120
+ fdusd: "first-digital-usd",
126
121
  deep: "deepbook",
127
- // Isolated Asset
128
122
  fud: "fud-the-pug",
129
- blub: "blub",
130
- musd: ""
131
- // @TODO: add coinGecko id
123
+ blub: "blub"
132
124
  };
133
125
 
134
126
  // src/constants/common.ts
@@ -165,8 +157,7 @@ var SUPPORT_POOLS = [
165
157
  "fud",
166
158
  "deep",
167
159
  "fdusd",
168
- "blub",
169
- "musd"
160
+ "blub"
170
161
  ];
171
162
  var SUPPORT_COLLATERALS = [
172
163
  "usdc",
@@ -221,8 +212,7 @@ var SUPPORT_SCOIN = [
221
212
  "sdeep",
222
213
  "sfud",
223
214
  "sfdusd",
224
- "sblub",
225
- "smusd"
215
+ "sblub"
226
216
  ];
227
217
  var SUPPORT_SUI_BRIDGE = ["sbeth", "sbusdt", "sbwbtc"];
228
218
  var SUPPORT_WORMHOLE = [
@@ -277,7 +267,6 @@ var coinDecimals = {
277
267
  deep: 6,
278
268
  fud: 5,
279
269
  blub: 2,
280
- musd: 9,
281
270
  susdc: 6,
282
271
  sweth: 8,
283
272
  ssbeth: 8,
@@ -297,8 +286,7 @@ var coinDecimals = {
297
286
  sfdusd: 6,
298
287
  sdeep: 6,
299
288
  sfud: 5,
300
- sblub: 2,
301
- smusd: 9
289
+ sblub: 2
302
290
  };
303
291
  var assetCoins = {
304
292
  usdc: "usdc",
@@ -320,8 +308,7 @@ var assetCoins = {
320
308
  fdusd: "fdusd",
321
309
  deep: "deep",
322
310
  fud: "fud",
323
- blub: "blub",
324
- musd: "musd"
311
+ blub: "blub"
325
312
  };
326
313
  var marketCoins = {
327
314
  susdc: "susdc",
@@ -343,8 +330,7 @@ var marketCoins = {
343
330
  sfdusd: "sfdusd",
344
331
  sdeep: "sdeep",
345
332
  sfud: "sfud",
346
- sblub: "sblub",
347
- smusd: "smusd"
333
+ sblub: "sblub"
348
334
  };
349
335
  var sCoins = {
350
336
  susdc: "susdc",
@@ -365,8 +351,7 @@ var sCoins = {
365
351
  sfdusd: "sfdusd",
366
352
  sfud: "sfud",
367
353
  sdeep: "sdeep",
368
- sblub: "sblub",
369
- smusd: "smusd"
354
+ sblub: "sblub"
370
355
  };
371
356
  var stakeMarketCoins = {
372
357
  susdc: "susdc",
@@ -420,8 +405,7 @@ var coinIds = {
420
405
  // Sui bridge assets
421
406
  sbeth: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29",
422
407
  sbusdt: "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068",
423
- sbwbtc: "0xaafb102dd0902f5055cadecd687fb5b71ca82ef0e0285d90afde828ec58ca96b",
424
- musd: "0xe44df51c0b21a27ab915fa1fe2ca610cd3eaa6d9666fe5e62b988bf7f0bd8722"
408
+ sbwbtc: "0xaafb102dd0902f5055cadecd687fb5b71ca82ef0e0285d90afde828ec58ca96b"
425
409
  };
426
410
  var wormholeCoinIds = {
427
411
  weth: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
@@ -435,8 +419,10 @@ var voloCoinIds = {
435
419
  vsui: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55"
436
420
  };
437
421
  var sCoinIds = {
438
- ssui: "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI",
439
- ssca: "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA",
422
+ // ssui: '0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI', // @TODO: restore on prod
423
+ ssui: "0x88618204de2dfdc2597681a8441ee726b0dc13494c41e319c3264eb7b35fea90::scallop_sui::SCALLOP_SUI",
424
+ // ssca: '0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA', // @TODO: restore on prod
425
+ ssca: "0x9f64a180373a6b66595025ae16a4ab701f0af1dd5c7ce1ac91dc112e52c2a3f8::scallop_sca::SCALLOP_SCA",
440
426
  scetus: "0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS",
441
427
  // Wormhole assets
442
428
  sweth: "0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH",
@@ -447,19 +433,25 @@ var sCoinIds = {
447
433
  shasui: "0x9a2376943f7d22f88087c259c5889925f332ca4347e669dc37d54c2bf651af3c::scallop_ha_sui::SCALLOP_HA_SUI",
448
434
  svsui: "0xe1a1cc6bcf0001a015eab84bcc6713393ce20535f55b8b6f35c142e057a25fbe::scallop_v_sui::SCALLOP_V_SUI",
449
435
  // stable coins
450
- susdc: "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC",
436
+ susdc: (
437
+ // '0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC', // @TODO: restore on prod
438
+ "0x55ed015f9f006c0c96ad36ebe3b3570d088e8498f52defea48e5634c110e485c::scallop_usdc::SCALLOP_USDC"
439
+ ),
451
440
  swusdc: "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
452
441
  swusdt: "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT",
453
442
  sfdusd: "0x6711551c1e7652a270d9fbf0eee25d99594c157cde3cb5fbb49035eb59b1b001::scallop_fdusd::SCALLOP_FDUSD",
454
443
  // isolated assets
455
- sdeep: "0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP",
456
- sfud: "0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD",
444
+ sdeep: (
445
+ // '0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP', // @TODO: restore on prod
446
+ "0x34f0a2e793e1f79ceac72cfe3bb95f65541da449418289ccd12922d16140c882::scallop_deep::SCALLOP_DEEP"
447
+ ),
448
+ // sfud: '0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD', // @TODO: restore on prod
449
+ sfud: "0x3b23c05f917052255a0b16a534dbd4446911aa4a30bd3497cdf5b736551e7ef8::scallop_fud::SCALLOP_FUD",
457
450
  sblub: "0xe72f65446eabfad2103037af2d49d24599106fb44bf4c046c1e7e9acf6844dd0::scallop_blub::SCALLOP_BLUB",
458
451
  // Sui bridge assets
459
452
  ssbeth: "0xb14f82d8506d139eacef109688d1b71e7236bcce9b2c0ad526abcd6aa5be7de0::scallop_sb_eth::SCALLOP_SB_ETH",
460
453
  ssbusdt: "0xb1d7df34829d1513b73ba17cb7ad90c88d1e104bb65ab8f62f13e0cc103783d3::scallop_sb_usdt::SCALLOP_SB_USDT",
461
- ssbwbtc: "0x08c0fe357d3a138f4552bee393ce3a28a45bebcca43373d6a90bc44ab76f82e2::scallop_sb_wbtc::SCALLOP_SB_WBTC",
462
- smusd: "0x0a228d1c59071eccf3716076a1f71216846ee256d9fb07ea11fb7c1eb56435a5::scallop_musd::SCALLOP_MUSD"
454
+ ssbwbtc: "0x08c0fe357d3a138f4552bee393ce3a28a45bebcca43373d6a90bc44ab76f82e2::scallop_sb_wbtc::SCALLOP_SB_WBTC"
463
455
  };
464
456
  var sCoinTypeToName = Object.entries(sCoinIds).reduce(
465
457
  (acc, [coinName, coinType]) => {
@@ -561,30 +553,54 @@ var POOL_ADDRESSES = {
561
553
  pythFeedObjectId: "0x9a62b4863bdeaabdc9500fce769cf7e72d5585eeb28a6d26e4cafadc13f76ab2"
562
554
  },
563
555
  usdc: {
564
- coinName: "usdc",
565
- symbol: "USDC",
566
- lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
567
- collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
568
- borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
569
- interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
570
- riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
571
- borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
572
- supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
573
- borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
574
- spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
575
- spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
576
- sCoinTreasury: "0xbe6b63021f3d82e0e7e977cdd718ed7c019cf2eba374b7b546220402452f938e",
577
- sCoinType: "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC",
578
- sCoinName: "susdc",
579
- sCoinSymbol: "sUSDC",
580
- coinMetadataId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6",
581
- coinType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
582
- sCoinMetadataId: "0x763a21eba338e00bc684aaad80491c89eea5f247b59c47df45b17610c9ad58f2",
583
- spoolName: "susdc",
584
- decimals: 6,
585
- pythFeed: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
586
- pythFeedObjectId: "0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab"
556
+ ...{
557
+ coinName: "usdc",
558
+ symbol: "USDC",
559
+ lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
560
+ collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
561
+ borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
562
+ interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
563
+ riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
564
+ borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
565
+ supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
566
+ borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
567
+ spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
568
+ spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
569
+ sCoinTreasury: "0xbe6b63021f3d82e0e7e977cdd718ed7c019cf2eba374b7b546220402452f938e",
570
+ sCoinType: "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC",
571
+ sCoinName: "susdc",
572
+ sCoinSymbol: "sUSDC",
573
+ coinMetadataId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6",
574
+ coinType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
575
+ sCoinMetadataId: "0x763a21eba338e00bc684aaad80491c89eea5f247b59c47df45b17610c9ad58f2",
576
+ spoolName: "susdc",
577
+ decimals: 6,
578
+ pythFeed: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
579
+ pythFeedObjectId: "0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab"
580
+ },
581
+ ...{
582
+ coinName: "usdc",
583
+ symbol: "USDC",
584
+ lendingPoolAddress: "0x13319d295914b390b22484373f20f822bca10314c34c227ae6e28df3d9aa8e01",
585
+ collateralPoolAddress: "0x2fdcf63682577f6bfdd4296500067543ba9877d5d5e41ebd9e51b97ab071ce69",
586
+ borrowDynamic: "0x7fd0660f0102789ad039542165c6cbc2d90ba3c1d9dbd4ac4ae8804d80817542",
587
+ interestModel: "0xd4e7b06a79f63706523167f055296db641b0f8ddd6734c05e205f2de0fcefdd0",
588
+ riskModel: "0x19e5993350186f192ffeb2cba0650b04c291390e149c8ac9b324ecf394daaa1a",
589
+ spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
590
+ spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
591
+ sCoinTreasury: "0x6ef82ef94472dcb8c2cdeac8df38874024c08570ca165986ba56d1e38fe0c0a3",
592
+ sCoinType: "0x55ed015f9f006c0c96ad36ebe3b3570d088e8498f52defea48e5634c110e485c::scallop_usdc::SCALLOP_USDC",
593
+ sCoinName: "susdc",
594
+ sCoinSymbol: "sUSDC",
595
+ coinMetadataId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6",
596
+ coinType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
597
+ spoolName: "susdc",
598
+ decimals: 6,
599
+ pythFeed: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
600
+ pythFeedObjectId: "0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab"
601
+ }
587
602
  },
603
+ // @TODO: restore on prod
588
604
  weth: {
589
605
  coinName: "weth",
590
606
  symbol: "wETH",
@@ -683,30 +699,54 @@ var POOL_ADDRESSES = {
683
699
  pythFeedObjectId: "0x985e3db9f93f76ee8bace7c3dd5cc676a096accd5d9e09e9ae0fb6e492b14572"
684
700
  },
685
701
  sui: {
686
- coinName: "sui",
687
- symbol: "SUI",
688
- lendingPoolAddress: "0x9c9077abf7a29eebce41e33addbcd6f5246a5221dd733e56ea0f00ae1b25c9e8",
689
- collateralPoolAddress: "0x75aacfb7dcbf92ee0111fc1bf975b12569e4ba632e81ed7ae5ac090d40cd3acb",
690
- borrowDynamic: "0xbf68e6159c99dcaf87717385f1143d2891c2d19663bd51f0bc9b6909e4bb7c27",
691
- interestModel: "0x0dad9baa89b863c15a0487575de7cc428b01f1aa3998ad7a9e9752d96e83ffa9",
692
- riskModel: "0xcd6675864690b5648a6e309f2f02a66914b2b2bd9c31936f4e0f7fc0f792bc86",
693
- borrowFeeKey: "0xda5ede87a05c0677b17511c859b22d0a2b0229ee374d5d7a1274cb836b9fe5f8",
694
- supplyLimitKey: "0x0602418e66fb7a73fa997077bd66f248ad5b090d43344a14b9f1db598ecc1d47",
695
- borrowLimitKey: "0x2b33a7efdcf6a6df24f4d8a356dd52f58d75bc023c3f171d99502d4d008b53f0",
696
- spool: "0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4",
697
- spoolReward: "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9",
698
- sCoinTreasury: "0x5c1678c8261ac9eec024d4d630006a9f55c80dc0b1aa38a003fcb1d425818c6b",
699
- sCoinType: "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI",
700
- sCoinName: "ssui",
701
- sCoinSymbol: "sSUI",
702
- coinMetadataId: "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3",
703
- coinType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
704
- sCoinMetadataId: "0xac724644f481f4870ecdc29b9549aa8ea5180f10827c0d97b493f9f65a91455d",
705
- spoolName: "ssui",
706
- decimals: 9,
707
- pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
708
- pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
702
+ ...{
703
+ coinName: "sui",
704
+ symbol: "SUI",
705
+ lendingPoolAddress: "0x9c9077abf7a29eebce41e33addbcd6f5246a5221dd733e56ea0f00ae1b25c9e8",
706
+ collateralPoolAddress: "0x75aacfb7dcbf92ee0111fc1bf975b12569e4ba632e81ed7ae5ac090d40cd3acb",
707
+ borrowDynamic: "0xbf68e6159c99dcaf87717385f1143d2891c2d19663bd51f0bc9b6909e4bb7c27",
708
+ interestModel: "0x0dad9baa89b863c15a0487575de7cc428b01f1aa3998ad7a9e9752d96e83ffa9",
709
+ riskModel: "0xcd6675864690b5648a6e309f2f02a66914b2b2bd9c31936f4e0f7fc0f792bc86",
710
+ borrowFeeKey: "0xda5ede87a05c0677b17511c859b22d0a2b0229ee374d5d7a1274cb836b9fe5f8",
711
+ supplyLimitKey: "0x0602418e66fb7a73fa997077bd66f248ad5b090d43344a14b9f1db598ecc1d47",
712
+ borrowLimitKey: "0x2b33a7efdcf6a6df24f4d8a356dd52f58d75bc023c3f171d99502d4d008b53f0",
713
+ spool: "0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4",
714
+ spoolReward: "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9",
715
+ sCoinTreasury: "0x5c1678c8261ac9eec024d4d630006a9f55c80dc0b1aa38a003fcb1d425818c6b",
716
+ sCoinType: "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI",
717
+ sCoinName: "ssui",
718
+ sCoinSymbol: "sSUI",
719
+ coinMetadataId: "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3",
720
+ coinType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
721
+ sCoinMetadataId: "0xac724644f481f4870ecdc29b9549aa8ea5180f10827c0d97b493f9f65a91455d",
722
+ spoolName: "ssui",
723
+ decimals: 9,
724
+ pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
725
+ pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
726
+ },
727
+ ...{
728
+ coinName: "sui",
729
+ symbol: "SUI",
730
+ lendingPoolAddress: "0xeb86ad67543c1ac2c4cbaf178d38a45ab27c2e69d60f0f8badd83f563f012c3c",
731
+ collateralPoolAddress: "0xcba7bb07d4d3ce01d81e71d9def680aa8b417347bfd7834aee8fc3b85b61c9a1",
732
+ borrowDynamic: "0xd47c2fd3dbb95ed06e5da92f6b99611ba94a36efa6a13d9b33b02519761cc84e",
733
+ interestModel: "0x4742bb49aa49ab4e5d9dfa119cddc027d1b7811ac42ca1ce794818d4a4da68e7",
734
+ riskModel: "0x6dc356e829cfca2d79f0d68a79b5ddd5296ad0c955a38e2fc397485e2b629367",
735
+ spool: "0xb9617f83c06ebdeac0a8834782b1015e1cc7ea23739e30c132c4bfb95c37a579",
736
+ spoolReward: "0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a",
737
+ sCoinTreasury: "0x03f1d94a40bd9f5d556bacb5c5245732b185572f6a29b36ad8b555d9a8a24f09",
738
+ sCoinType: "0x88618204de2dfdc2597681a8441ee726b0dc13494c41e319c3264eb7b35fea90::scallop_sui::SCALLOP_SUI",
739
+ sCoinName: "ssui",
740
+ sCoinSymbol: "sSUI",
741
+ coinMetadataId: "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3",
742
+ coinType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
743
+ spoolName: "ssui",
744
+ decimals: 9,
745
+ pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
746
+ pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
747
+ }
709
748
  },
749
+ // @TODO: restore on prod
710
750
  wapt: {
711
751
  coinName: "wapt",
712
752
  symbol: "wAPT",
@@ -845,48 +885,88 @@ var POOL_ADDRESSES = {
845
885
  pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
846
886
  },
847
887
  sca: {
848
- coinName: "sca",
849
- symbol: "SCA",
850
- lendingPoolAddress: "0x6fc7d4211fc7018b6c75e7b908b88f2e0536443239804a3d32af547637bd28d7",
851
- collateralPoolAddress: "0xff677a5d9e9dc8f08f0a8681ebfc7481d1c7d57bc441f2881974adcdd7b13c31",
852
- borrowDynamic: "0x4e24f52edd739dab59ca4c6353ca430b7ce57e7f333abd0957958570a7cd09ca",
853
- interestModel: "0xbdcd48cf5b1a814911dc2d5c72d393a980c87820199fe5d799289ce94f4c47df",
854
- riskModel: "0xc437c24b67b8e2676907700fa395af337ad6463d2c0b4f4fa2e9276414026089",
855
- borrowFeeKey: "0xee55ba0f9800a62d9e7aef667f87e658258f41814d2c9fa02e25590671b4e5ad",
856
- supplyLimitKey: "0x8dd938856b972a10ea27ecab2af7ed78e48fc5f6ccedaf2b2119959f747dc2e3",
857
- borrowLimitKey: "0x04c7de61c5b42972f9bf6a8b1848e5fea2d037ee8deba81741ecd4a70aa80d30",
858
- sCoinTreasury: "0xe04bfc95e00252bd654ee13c08edef9ac5e4b6ae4074e8390db39e9a0109c529",
859
- sCoinType: "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA",
860
- sCoinName: "ssca",
861
- sCoinSymbol: "sSCA",
862
- coinMetadataId: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844",
863
- coinType: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA",
864
- sCoinMetadataId: "0x27e3877491b308dfac46fb3d9f7dfa6a1e8b7dc3c374e92ecda7976055746964",
865
- decimals: 9,
866
- pythFeed: "7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc",
867
- pythFeedObjectId: "0xf6de1d3279a269a597d813cbaca59aa906543ab9a8c64e84a4722f1a20863985"
888
+ ...{
889
+ coinName: "sca",
890
+ symbol: "SCA",
891
+ lendingPoolAddress: "0x6fc7d4211fc7018b6c75e7b908b88f2e0536443239804a3d32af547637bd28d7",
892
+ collateralPoolAddress: "0xff677a5d9e9dc8f08f0a8681ebfc7481d1c7d57bc441f2881974adcdd7b13c31",
893
+ borrowDynamic: "0x4e24f52edd739dab59ca4c6353ca430b7ce57e7f333abd0957958570a7cd09ca",
894
+ interestModel: "0xbdcd48cf5b1a814911dc2d5c72d393a980c87820199fe5d799289ce94f4c47df",
895
+ riskModel: "0xc437c24b67b8e2676907700fa395af337ad6463d2c0b4f4fa2e9276414026089",
896
+ borrowFeeKey: "0xee55ba0f9800a62d9e7aef667f87e658258f41814d2c9fa02e25590671b4e5ad",
897
+ supplyLimitKey: "0x8dd938856b972a10ea27ecab2af7ed78e48fc5f6ccedaf2b2119959f747dc2e3",
898
+ borrowLimitKey: "0x04c7de61c5b42972f9bf6a8b1848e5fea2d037ee8deba81741ecd4a70aa80d30",
899
+ sCoinTreasury: "0xe04bfc95e00252bd654ee13c08edef9ac5e4b6ae4074e8390db39e9a0109c529",
900
+ sCoinType: "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA",
901
+ sCoinName: "ssca",
902
+ sCoinSymbol: "sSCA",
903
+ coinMetadataId: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844",
904
+ coinType: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA",
905
+ sCoinMetadataId: "0x27e3877491b308dfac46fb3d9f7dfa6a1e8b7dc3c374e92ecda7976055746964",
906
+ decimals: 9,
907
+ pythFeed: "7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc",
908
+ pythFeedObjectId: "0xf6de1d3279a269a597d813cbaca59aa906543ab9a8c64e84a4722f1a20863985"
909
+ },
910
+ ...{
911
+ coinName: "sca",
912
+ symbol: "SCA",
913
+ lendingPoolAddress: "0xd08ef85bc753616ce0f1e3ac01bbc8bd1ee53e03b1e82aaa9690db5cd285ef4c",
914
+ collateralPoolAddress: "0x4f59b8ef2cdd195830890cf0c01e29c159e48a6a6c766c64fd4b26cfa9ee58c6",
915
+ borrowDynamic: "0x7f6e11fbd32b5d0223f03bfda67a5b48c551a09cfff88edc187591f9a4b0ab10",
916
+ interestModel: "0xcb10daf0fee6f416463444f5b47aac0f0197a889bc60be2c4f90916f6a8d2faa",
917
+ riskModel: "0x043f21a35bd1e1060a7c579db46e10cfd039d0b75d6bfd758de97b60434ae708",
918
+ sCoinTreasury: "0x1b05d2cd8b20dba19da073a54195fc52d2f438ea19dea0713bae7a7dab308199",
919
+ sCoinType: "0x9f64a180373a6b66595025ae16a4ab701f0af1dd5c7ce1ac91dc112e52c2a3f8::scallop_sca::SCALLOP_SCA",
920
+ sCoinName: "ssca",
921
+ sCoinSymbol: "sSCA",
922
+ coinMetadataId: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844",
923
+ coinType: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA",
924
+ decimals: 9,
925
+ pythFeed: "7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc",
926
+ pythFeedObjectId: "0xf6de1d3279a269a597d813cbaca59aa906543ab9a8c64e84a4722f1a20863985"
927
+ }
868
928
  },
929
+ // @TODO: restore on prod
869
930
  fud: {
870
- coinName: "fud",
871
- symbol: "FUD",
872
- lendingPoolAddress: "0xefed2cbe76b344792ac724523c8b2236740d1cea2100d46a0ed0dc760c7f4231",
873
- borrowDynamic: "0x14367ddca30e2860cb89ed4eaca20c7ece260c5d59dd9990d2c85a8321326acb",
874
- interestModel: "0x2600ac100ef154eb2329ffd3aad47aca308ff9f9348de3e8e94aaeb906ec2303",
875
- borrowFeeKey: "0xa87e8b26e07ff35ac9fb57adcc779be2883080fc7d12de2d9e7e16d8d8d5e529",
876
- supplyLimitKey: "0xf98419aecc37a3c5de716f8ec590f8991a5be34da72ce1a2da09531ff45adf7d",
877
- borrowLimitKey: "0x3d928a001c453c50004baa54e14b0a0e1b0907d9c613dfd76064fd7ed4e8beb8",
878
- isolatedAssetKey: "0xfcb533e9e4e31f9c9f32d6cbf7fbb3425f1d60474e229a363a2dc7f835d587e2",
879
- sCoinTreasury: "0xf25212f11d182decff7a86165699a73e3d5787aced203ca539f43cfbc10db867",
880
- sCoinType: "0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD",
881
- sCoinName: "sfud",
882
- sCoinSymbol: "sFUD",
883
- coinMetadataId: "0x01087411ef48aaac1eb6e24803213e3a60a03b147dac930e5e341f17a85e524e",
884
- coinType: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
885
- sCoinMetadataId: "0x4e03390de36b8c84e0a8297d3d0d08a8a34bed93787e37fcb26bfc26df33226c",
886
- decimals: 5,
887
- pythFeed: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75",
888
- pythFeedObjectId: "0x4531c3ed0d22f21f5fce882905372006c9aafa30f01db03b789e95a6c50de7b2"
931
+ ...{
932
+ coinName: "fud",
933
+ symbol: "FUD",
934
+ lendingPoolAddress: "0xefed2cbe76b344792ac724523c8b2236740d1cea2100d46a0ed0dc760c7f4231",
935
+ borrowDynamic: "0x14367ddca30e2860cb89ed4eaca20c7ece260c5d59dd9990d2c85a8321326acb",
936
+ interestModel: "0x2600ac100ef154eb2329ffd3aad47aca308ff9f9348de3e8e94aaeb906ec2303",
937
+ borrowFeeKey: "0xa87e8b26e07ff35ac9fb57adcc779be2883080fc7d12de2d9e7e16d8d8d5e529",
938
+ supplyLimitKey: "0xf98419aecc37a3c5de716f8ec590f8991a5be34da72ce1a2da09531ff45adf7d",
939
+ borrowLimitKey: "0x3d928a001c453c50004baa54e14b0a0e1b0907d9c613dfd76064fd7ed4e8beb8",
940
+ isolatedAssetKey: "0xfcb533e9e4e31f9c9f32d6cbf7fbb3425f1d60474e229a363a2dc7f835d587e2",
941
+ sCoinTreasury: "0xf25212f11d182decff7a86165699a73e3d5787aced203ca539f43cfbc10db867",
942
+ sCoinType: "0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD",
943
+ sCoinName: "sfud",
944
+ sCoinSymbol: "sFUD",
945
+ coinMetadataId: "0x01087411ef48aaac1eb6e24803213e3a60a03b147dac930e5e341f17a85e524e",
946
+ coinType: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
947
+ sCoinMetadataId: "0x4e03390de36b8c84e0a8297d3d0d08a8a34bed93787e37fcb26bfc26df33226c",
948
+ decimals: 5,
949
+ pythFeed: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75",
950
+ pythFeedObjectId: "0x4531c3ed0d22f21f5fce882905372006c9aafa30f01db03b789e95a6c50de7b2"
951
+ },
952
+ ...{
953
+ coinName: "fud",
954
+ symbol: "FUD",
955
+ lendingPoolAddress: "0xc8a078d15ee7bbff49a14835f36951833d2d55c91ffd2972251dadbff8045ca8",
956
+ borrowDynamic: "0x345a2fa0fe5d5d704fd8ad609a9b7529f22e3cda738ad26756ad2a85e5d43777",
957
+ interestModel: "0xc84a22d8bca58e5f05673d1de2a7406b1b7bc9dcd15fd848ba6555c7ecab9d83",
958
+ sCoinTreasury: "0x858c492d51425b922c040c1a389e185b3b00d565e7d72ead1a81dc733104660d",
959
+ sCoinType: "0x3b23c05f917052255a0b16a534dbd4446911aa4a30bd3497cdf5b736551e7ef8::scallop_fud::SCALLOP_FUD",
960
+ sCoinName: "sfud",
961
+ sCoinSymbol: "sFUD",
962
+ coinMetadataId: "0x01087411ef48aaac1eb6e24803213e3a60a03b147dac930e5e341f17a85e524e",
963
+ coinType: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
964
+ decimals: 5,
965
+ pythFeed: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75",
966
+ pythFeedObjectId: "0x4531c3ed0d22f21f5fce882905372006c9aafa30f01db03b789e95a6c50de7b2"
967
+ }
889
968
  },
969
+ // @TODO: restore on prod
890
970
  blub: {
891
971
  coinName: "blub",
892
972
  symbol: "BLUB",
@@ -907,26 +987,45 @@ var POOL_ADDRESSES = {
907
987
  pythFeedObjectId: "0x246658c3324f2477568c78cca622518fbc6969a004b841d81409d24a7ec39b18"
908
988
  },
909
989
  deep: {
910
- coinName: "deep",
911
- symbol: "DEEP",
912
- lendingPoolAddress: "0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03",
913
- borrowDynamic: "0x95e00d7466f97a100e70f08bd37788dc49335796f6f49fab996d40dd0681c6d3",
914
- interestModel: "0x4143c298506a332d92ea8a995e6f3991ee3215f58f6fc6441752835d275b9a69",
915
- borrowFeeKey: "0xb14ee43f4ad2a2c40bac8c4406a401690e93c982e289cf3802fedf74a159cab2",
916
- supplyLimitKey: "0x599528fdfdc253e90dfd0acf4f4a166b391e2aac1ca6528abbff63225b548fee",
917
- borrowLimitKey: "0xf4217e8ef9d9c32e8992092e910a77535a8124c19b8a762a673f227f5f765a4e",
918
- isolatedAssetKey: "0x208d3a24ba369dcfc8f0387333d1512b98199eb150d2f2a69359ff708cf761e3",
919
- sCoinTreasury: "0xc63838fabe37b25ad897392d89876d920f5e0c6a406bf3abcb84753d2829bc88",
920
- sCoinType: "0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP",
921
- sCoinName: "sdeep",
922
- sCoinSymbol: "sDEEP",
923
- coinMetadataId: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0",
924
- coinType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP",
925
- sCoinMetadataId: "0x2443014594a500a9119e11c6c6a86e865834f496c4614280ce8cace33c0b072e",
926
- decimals: 6,
927
- pythFeed: "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff",
928
- pythFeedObjectId: "0x8c7f3a322b94cc69db2a2ac575cbd94bf5766113324c3a3eceac91e3e88a51ed"
990
+ ...{
991
+ coinName: "deep",
992
+ symbol: "DEEP",
993
+ lendingPoolAddress: "0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03",
994
+ borrowDynamic: "0x95e00d7466f97a100e70f08bd37788dc49335796f6f49fab996d40dd0681c6d3",
995
+ interestModel: "0x4143c298506a332d92ea8a995e6f3991ee3215f58f6fc6441752835d275b9a69",
996
+ borrowFeeKey: "0xb14ee43f4ad2a2c40bac8c4406a401690e93c982e289cf3802fedf74a159cab2",
997
+ supplyLimitKey: "0x599528fdfdc253e90dfd0acf4f4a166b391e2aac1ca6528abbff63225b548fee",
998
+ borrowLimitKey: "0xf4217e8ef9d9c32e8992092e910a77535a8124c19b8a762a673f227f5f765a4e",
999
+ isolatedAssetKey: "0x208d3a24ba369dcfc8f0387333d1512b98199eb150d2f2a69359ff708cf761e3",
1000
+ sCoinTreasury: "0xc63838fabe37b25ad897392d89876d920f5e0c6a406bf3abcb84753d2829bc88",
1001
+ sCoinType: "0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP",
1002
+ sCoinName: "sdeep",
1003
+ sCoinSymbol: "sDEEP",
1004
+ coinMetadataId: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0",
1005
+ coinType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP",
1006
+ sCoinMetadataId: "0x2443014594a500a9119e11c6c6a86e865834f496c4614280ce8cace33c0b072e",
1007
+ decimals: 6,
1008
+ pythFeed: "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff",
1009
+ pythFeedObjectId: "0x8c7f3a322b94cc69db2a2ac575cbd94bf5766113324c3a3eceac91e3e88a51ed"
1010
+ },
1011
+ ...{
1012
+ coinName: "deep",
1013
+ symbol: "DEEP",
1014
+ lendingPoolAddress: "0xfb8e4f68c9b14034da7f1f4703013dda69ebbb4578f835825bcf92ab89c3b5ae",
1015
+ borrowDynamic: "0xbf983b12a8707b174c0b037096ba2fbf1b30e6efb9cce14fc35207de0a696f79",
1016
+ interestModel: "0xb7f04cd3aaaefe671a79f9aed8646ae085a7e6812c1604044977c9355e0769c8",
1017
+ sCoinTreasury: "0x71d41465cf2d16fa0206126526bebdf65c8871d1fcfbd0c2237db2306afd67ba",
1018
+ sCoinType: "0x34f0a2e793e1f79ceac72cfe3bb95f65541da449418289ccd12922d16140c882::scallop_deep::SCALLOP_DEEP",
1019
+ sCoinName: "sdeep",
1020
+ sCoinSymbol: "sDEEP",
1021
+ coinMetadataId: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0",
1022
+ coinType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP",
1023
+ decimals: 6,
1024
+ pythFeed: "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff",
1025
+ pythFeedObjectId: "0x8c7f3a322b94cc69db2a2ac575cbd94bf5766113324c3a3eceac91e3e88a51ed"
1026
+ }
929
1027
  },
1028
+ // @TODO: restore on prod
930
1029
  fdusd: {
931
1030
  coinName: "fdusd",
932
1031
  symbol: "FDUSD",
@@ -947,29 +1046,6 @@ var POOL_ADDRESSES = {
947
1046
  decimals: 6,
948
1047
  pythFeed: "0xccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979",
949
1048
  pythFeedObjectId: "0x5f6583b2b0fe1ecf94aaffeaab8a838794693960cea48c0da282d5f4a24be027"
950
- },
951
- // @TODO: add pyth feed
952
- musd: {
953
- coinName: "musd",
954
- symbol: "mUSD",
955
- lendingPoolAddress: "0x0565254220e7ca857a87341898bdebeb9e5d6f8f8fe68eb25dd3e257d41a0b0c",
956
- collateralPoolAddress: void 0,
957
- borrowDynamic: "0x9448dc2ae8054d5b735fd617fb4ca57046ddc98bfff91ce31de1df452f3bf695",
958
- interestModel: "0xc3b57c57814e22ac42c7062922a0437ebf40495e37aee32cbb94cba0693970ed",
959
- riskModel: void 0,
960
- borrowFeeKey: "0xfdb02d76dc67553fd15f42f1de49ca79cd2812bdaf8bcd079cfe17ce23ed9fc4",
961
- supplyLimitKey: "0x340aaae070f9489b59c4257610babf6f170abf43fbe51cf7de1e2e04492f6823",
962
- isolatedAssetKey: "0xe10f03b13d2cdb46543130bafaf1884c9a5a7712b5932aae15b2f8d4fc31a774",
963
- sCoinTreasury: "0xadfd554635ccc87e992f23ca838f0f16c14874e324a1b79b77f6bfe118edea9f",
964
- sCoinType: "0x0a228d1c59071eccf3716076a1f71216846ee256d9fb07ea11fb7c1eb56435a5::scallop_musd::SCALLOP_MUSD",
965
- sCoinName: "smusd",
966
- sCoinSymbol: "smUSD",
967
- coinMetadataId: "0xc154abd271b24032a2c80d96c1b82109490bb600ed189ef881d8c9467ed44a4f",
968
- coinType: "0xe44df51c0b21a27ab915fa1fe2ca610cd3eaa6d9666fe5e62b988bf7f0bd8722::musd::MUSD",
969
- sCoinMetadataId: "0xb924f8c3d4b993172d4fc553c1ea242e8ca539e83edc3edaf5512ae44dfa6863",
970
- decimals: 0,
971
- pythFeed: "",
972
- pythFeedObjectId: ""
973
1049
  }
974
1050
  };
975
1051
 
@@ -998,9 +1074,7 @@ var PYTH_FEED_IDS = {
998
1074
  fdusd: "0xccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979",
999
1075
  deep: "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff",
1000
1076
  fud: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75",
1001
- blub: "5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c",
1002
- musd: ""
1003
- // @TODO: add mUSD pyth
1077
+ blub: "5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c"
1004
1078
  };
1005
1079
 
1006
1080
  // src/constants/queryKeys.ts
@@ -1108,21 +1182,13 @@ var RPC_PROVIDERS = [
1108
1182
  // src/constants/testAddress.ts
1109
1183
  var TEST_ADDRESSES = {
1110
1184
  core: {
1111
- // version:
1112
- // '0x07871c4b3c847a0f674510d4978d5cf6f960452795e8ff6f189fd2088a3f6ac7',
1113
- version: "0xd318de9b0f6873879a82cbfcc2daa1d1591a8b54e7cea9f4b567da63c692a52b",
1185
+ version: "0xee15d07800e2ad4852505c57cd86afea774af02c17388f8bd907de75f915b4f4",
1114
1186
  versionCap: "0x590a4011cb649b3878f3ea14b3a78674642a9548d79b7e091ef679574b158a07",
1115
- // object:
1116
- // '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf',
1117
- object: "0x6c23585e940a989588432509107e98bae06dbca4e333f26d0635d401b3c7c76d",
1118
- // market:
1119
- // '0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9',
1120
- market: "0x9d6434e97f3f98fd9b0c0e1dca22632073985abcd22541feae7ee1e34cbe3af2",
1187
+ object: "0xb03fa00e2d9f17d78a9d48bd94d8852abec68c19d55e819096b1e062e69bfad1",
1188
+ market: "0xa7f41efe3b551c20ad6d6cea6ccd0fd68d2e2eaaacdca5e62d956209f6a51312",
1121
1189
  adminCap: "0x09689d018e71c337d9db6d67cbca06b74ed92196103624028ccc3ecea411777c",
1122
1190
  coinDecimalsRegistry: "0x200abe9bf19751cc566ae35aa58e2b7e4ff688fc1130f8d8909ea09bc137d668",
1123
- // obligationAccessStore:
1124
- // '0x733e30b7c94d619d78cb8f5bc4bfbb759ced9a531239028caabb2474e5be59c9',
1125
- obligationAccessStore: "0x46e9b44a77ee9c9d33cc2689ecdfbb8f681935cbc6bdf6ac3df048e396c36c82",
1191
+ obligationAccessStore: "0xb7d7e1464936fbdcdd4913308b40335e662401029635289bdb317c7dde9d6c68",
1126
1192
  coins: {
1127
1193
  usdc: {
1128
1194
  id: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7",
@@ -1137,97 +1203,6 @@ var TEST_ADDRESSES = {
1137
1203
  }
1138
1204
  }
1139
1205
  },
1140
- cetus: {
1141
- id: "0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b",
1142
- metaData: "0x4c0dce55eff2db5419bbd2d239d1aa22b4a400c01bbb648b058a9883989025da",
1143
- treasury: "",
1144
- oracle: {
1145
- supra: "",
1146
- switchboard: "",
1147
- pyth: {
1148
- feed: "e5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef",
1149
- feedObject: "0x24c0247fb22457a719efac7f670cdc79be321b521460bd6bd2ccfa9f80713b14"
1150
- }
1151
- }
1152
- },
1153
- wapt: {
1154
- id: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37",
1155
- metaData: "0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8",
1156
- treasury: "",
1157
- oracle: {
1158
- supra: "",
1159
- switchboard: "",
1160
- pyth: {
1161
- feed: "03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5",
1162
- feedObject: "0x7c5b7837c44a69b469325463ac0673ac1aa8435ff44ddb4191c9ae380463647f"
1163
- }
1164
- }
1165
- },
1166
- wsol: {
1167
- id: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8",
1168
- metaData: "0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e",
1169
- treasury: "",
1170
- oracle: {
1171
- supra: "",
1172
- switchboard: "",
1173
- pyth: {
1174
- feed: "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
1175
- feedObject: "0x9d0d275efbd37d8a8855f6f2c761fa5983293dd8ce202ee5196626de8fcd4469"
1176
- }
1177
- }
1178
- },
1179
- wbtc: {
1180
- id: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881",
1181
- metaData: "0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd",
1182
- treasury: "",
1183
- oracle: {
1184
- supra: "",
1185
- switchboard: "",
1186
- pyth: {
1187
- feed: "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
1188
- feedObject: "0x9a62b4863bdeaabdc9500fce769cf7e72d5585eeb28a6d26e4cafadc13f76ab2"
1189
- }
1190
- }
1191
- },
1192
- weth: {
1193
- id: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5",
1194
- metaData: "0x8900e4ceede3363bef086d6b50ca89d816d0e90bf6bc46efefe1f8455e08f50f",
1195
- treasury: "",
1196
- oracle: {
1197
- supra: "",
1198
- switchboard: "",
1199
- pyth: {
1200
- feed: "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
1201
- feedObject: "0x9193fd47f9a0ab99b6e365a464c8a9ae30e6150fc37ed2a89c1586631f6fc4ab"
1202
- }
1203
- }
1204
- },
1205
- wusdc: {
1206
- id: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf",
1207
- metaData: "0x4fbf84f3029bd0c0b77164b587963be957f853eccf834a67bb9ecba6ec80f189",
1208
- treasury: "",
1209
- oracle: {
1210
- supra: "",
1211
- switchboard: "",
1212
- pyth: {
1213
- feed: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
1214
- feedObject: "0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab"
1215
- }
1216
- }
1217
- },
1218
- wusdt: {
1219
- id: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c",
1220
- metaData: "0xfb0e3eb97dd158a5ae979dddfa24348063843c5b20eb8381dd5fa7c93699e45c",
1221
- treasury: "",
1222
- oracle: {
1223
- supra: "",
1224
- switchboard: "",
1225
- pyth: {
1226
- feed: "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b",
1227
- feedObject: "0x985e3db9f93f76ee8bace7c3dd5cc676a096accd5d9e09e9ae0fb6e492b14572"
1228
- }
1229
- }
1230
- },
1231
1206
  sui: {
1232
1207
  id: "0x0000000000000000000000000000000000000000000000000000000000000002",
1233
1208
  metaData: "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3",
@@ -1241,45 +1216,6 @@ var TEST_ADDRESSES = {
1241
1216
  }
1242
1217
  }
1243
1218
  },
1244
- afsui: {
1245
- id: "0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc",
1246
- metaData: "0x2f9217f533e51334873a39b8026a4aa6919497b47f49d0986a4f1aec66f8a34d",
1247
- treasury: "",
1248
- oracle: {
1249
- supra: "",
1250
- switchboard: "",
1251
- pyth: {
1252
- feed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
1253
- feedObject: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
1254
- }
1255
- }
1256
- },
1257
- hasui: {
1258
- id: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d",
1259
- metaData: "0x2c5f33af93f6511df699aaaa5822d823aac6ed99d4a0de2a4a50b3afa0172e24",
1260
- treasury: "",
1261
- oracle: {
1262
- supra: "",
1263
- switchboard: "",
1264
- pyth: {
1265
- feed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
1266
- feedObject: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
1267
- }
1268
- }
1269
- },
1270
- vsui: {
1271
- id: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55",
1272
- metaData: "0xabd84a23467b33854ab25cf862006fd97479f8f6f53e50fe732c43a274d939bd",
1273
- treasury: "",
1274
- oracle: {
1275
- supra: "",
1276
- switchboard: "",
1277
- pyth: {
1278
- feed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
1279
- feedObject: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
1280
- }
1281
- }
1282
- },
1283
1219
  sca: {
1284
1220
  id: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6",
1285
1221
  metaData: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844",
@@ -1293,41 +1229,6 @@ var TEST_ADDRESSES = {
1293
1229
  }
1294
1230
  }
1295
1231
  },
1296
- sbeth: {
1297
- id: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29",
1298
- metaData: "0x89b04ba87f8832d4d76e17a1c9dce72eb3e64d372cf02012b8d2de5384faeef0",
1299
- treasury: "",
1300
- oracle: {
1301
- supra: "",
1302
- switchboard: "",
1303
- pyth: {
1304
- feed: "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
1305
- feedObject: "0x9193fd47f9a0ab99b6e365a464c8a9ae30e6150fc37ed2a89c1586631f6fc4ab"
1306
- }
1307
- }
1308
- },
1309
- // @TODO: add test address
1310
- // @ts-ignore
1311
- sbusdt: {},
1312
- // @ts-ignore
1313
- sbwbtc: {},
1314
- // @ts-ignore
1315
- blub: {},
1316
- // @ts-ignore
1317
- musd: {},
1318
- fdusd: {
1319
- id: "0xf16e6b723f242ec745dfd7634ad072c42d5c1d9ac9d62a39c381303eaa57693a",
1320
- metaData: "0xdebee5265a67c186ed87fe93303d33dfe1de53e3b4fd7d9329c2852860acd3e7",
1321
- treasury: "",
1322
- oracle: {
1323
- supra: "",
1324
- switchboard: "",
1325
- pyth: {
1326
- feed: "0xccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979",
1327
- feedObject: "0x5f6583b2b0fe1ecf94aaffeaab8a838794693960cea48c0da282d5f4a24be027"
1328
- }
1329
- }
1330
- },
1331
1232
  deep: {
1332
1233
  id: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270",
1333
1234
  metaData: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0",
@@ -1356,12 +1257,12 @@ var TEST_ADDRESSES = {
1356
1257
  }
1357
1258
  },
1358
1259
  oracles: {
1359
- xOracle: "0x93d5bf0936b71eb27255941e532fac33b5a5c7759e377b4923af0a1359ad494f",
1260
+ xOracle: "0x0c09daac413e834f2fe69601c41e836022fa9a185df6b56a80f6bcd8a3ecb8a2",
1360
1261
  xOracleCap: "0x1edeae568fde99e090dbdec4bcdbd33a15f53a1ce1f87aeef1a560dedf4b4a90",
1361
1262
  supra: { registry: "", registryCap: "", holder: "" },
1362
1263
  switchboard: { registry: "", registryCap: "" },
1363
1264
  pyth: {
1364
- registry: "0xedc293f9413a5a7a5d53bdba1fd889d0a4030894469228f0acdae4aa3c55a213",
1265
+ registry: "0xdcf813893649521abd27816ba8d946b0cb7fc98d776cc9adcecba54688ccc109",
1365
1266
  registryCap: "0xbcb07141eb1f7e01fbda4130ecf5f5adaeabb77f5d9c32158b7532bcd2197acd",
1366
1267
  state: "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8",
1367
1268
  wormhole: "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a",
@@ -1386,46 +1287,36 @@ var TEST_ADDRESSES = {
1386
1287
  upgradeCap: "0x3f203f6fff6a69d151e4f1cd931f22b68c489ef2759765662fc7baf673943c9e"
1387
1288
  },
1388
1289
  protocol: {
1389
- id: "0xb784ea287d944e478a3ceaa071f8885072cce6b7224cf245914dc2f9963f460e",
1290
+ id: "0xb03fa00e2d9f17d78a9d48bd94d8852abec68c19d55e819096b1e062e69bfad1",
1390
1291
  upgradeCap: "0x38527d154618d1fd5a644b90717fe07cf0e9f26b46b63e9568e611a3f86d5c1a"
1391
1292
  },
1392
- // protocol: {
1393
- // id: '0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e',
1394
- // upgradeCap:
1395
- // '0x38527d154618d1fd5a644b90717fe07cf0e9f26b46b63e9568e611a3f86d5c1a',
1396
- // },
1397
1293
  protocolWhitelist: {
1398
1294
  id: "0x4c262d9343dac53ecb28f482a2a3f62c73d0ebac5b5f03d57383d56ff219acdf",
1399
1295
  upgradeCap: "0x4a5e88a75039b00988f633f811f58117f31b8627a46bf822aa114d9010049449"
1400
1296
  },
1401
- // query: {
1402
- // id: '0xb8d603a39114a5efef3dd0bf84df0bed1be1fbd39b78b7dd6e8a61ccc5e6006f',
1403
- // upgradeCap:
1404
- // '0x0d535c35f608b9b01b7ccce11acf43b1dd80c1b72bf8b541744a6e28e8d2745f',
1405
- // },
1406
1297
  query: {
1407
- id: "0x89706958f43fb170de134579e3fbc53972b946ee78bd2442d8e1adc36074fbdc",
1298
+ id: "0x3a0dbce719fc56a96bf8e8dd53cd57eb9c313642a88d99b86f51208762eba258",
1299
+ object: "",
1408
1300
  upgradeCap: "0x0d535c35f608b9b01b7ccce11acf43b1dd80c1b72bf8b541744a6e28e8d2745f"
1409
1301
  },
1410
- supra: { id: "", upgradeCap: "" },
1302
+ supra: { id: "", object: "", upgradeCap: "" },
1411
1303
  pyth: {
1412
- id: "0x910f30cbc7f601f75a5141a01265cd47c62d468707c5e1aecb32a18f448cb25a",
1304
+ id: "0xe622909f9252d4ef1737c41ea430ef44203d8f5dc8e01e1b3950a31405bc54eb",
1305
+ object: "0xe622909f9252d4ef1737c41ea430ef44203d8f5dc8e01e1b3950a31405bc54eb",
1413
1306
  upgradeCap: "0xdf0ffbae1ea5bb25fbca5efba433dcf00c7cced65679af2f04728901275c6157"
1414
1307
  },
1415
1308
  switchboard: { id: "", upgradeCap: "" },
1416
1309
  xOracle: {
1417
- id: "0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6",
1310
+ id: "0xe7511600c924f1d0ac4b3fa5de3ae26b8845545902b015dc5fc7894307365d7b",
1311
+ object: "0xe7511600c924f1d0ac4b3fa5de3ae26b8845545902b015dc5fc7894307365d7b",
1418
1312
  upgradeCap: "0x0f928a6b2e26b73330fecaf9b44acfc9800a4a9794d6415c2a3153bc70e3c1f0"
1419
1313
  },
1420
1314
  testCoin: { id: "", upgradeCap: "" }
1421
1315
  }
1422
1316
  },
1423
1317
  spool: {
1424
- // id: '0x7c4fdabe81c31b19a45d1e572a52a539997a90903fbb5bfab71480abe0fa62c3',
1425
1318
  id: "0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21",
1426
1319
  adminCap: "0xdd8a047cbbf802bfcde5288b8ef1910965d789cc614da11d39af05fca0bd020a",
1427
- // object:
1428
- // '0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a',
1429
1320
  object: "0x1742655fe5872dfa6456673f9e38612a4965e6979e6cd7696a7f1225f28bae21",
1430
1321
  pools: {
1431
1322
  sweth: {
@@ -1433,72 +1324,48 @@ var TEST_ADDRESSES = {
1433
1324
  rewardPoolId: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077"
1434
1325
  },
1435
1326
  ssui: {
1436
- // id: '0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4',
1437
1327
  id: "0xb9617f83c06ebdeac0a8834782b1015e1cc7ea23739e30c132c4bfb95c37a579",
1438
- rewardPoolId: (
1439
- // '0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9',
1440
- "0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a"
1441
- )
1328
+ rewardPoolId: "0xc3206071a8d43212efb6e3b5504f2321f8df97ab122b466c0bc7cfdf398dc13a"
1442
1329
  },
1443
1330
  susdc: {
1444
1331
  id: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
1445
1332
  rewardPoolId: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166"
1446
1333
  },
1447
1334
  swusdc: {
1448
- // id: '0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0',
1449
1335
  id: "0xf1b383b9cf2e9f515fc69567df1053098f273849d09cd84b0278a773429bd2b2",
1450
- rewardPoolId: (
1451
- // '0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8',
1452
- "0xc71c53ee6505d928ba15bea4fe4f45d98c9c31eced94b72d00a7827d4b7ba3ff"
1453
- )
1336
+ rewardPoolId: "0xc71c53ee6505d928ba15bea4fe4f45d98c9c31eced94b72d00a7827d4b7ba3ff"
1454
1337
  },
1455
1338
  swusdt: {
1456
- // id: '0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f',
1457
1339
  id: "0xb5567dfa5c7fc17a249e959732664c50713dd8c23db1a11376b27df800c17418",
1458
- rewardPoolId: (
1459
- // '0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080',
1460
- "0x60768b0687ff0235e376a039709a683e4c436098785e473b67b32dbab47b69ab"
1461
- )
1340
+ rewardPoolId: "0x60768b0687ff0235e376a039709a683e4c436098785e473b67b32dbab47b69ab"
1462
1341
  },
1463
1342
  scetus: {
1464
1343
  id: "0xac1bb13bf4472a637c18c2415fb0e3c1227ea2bcf35242e50563c98215bd298e",
1465
1344
  rewardPoolId: "0x6835c1224126a45086fc6406adc249e3f30df18d779ca4f4e570e38716a17f3f"
1466
1345
  },
1467
1346
  safsui: {
1468
- // id: '0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800',
1469
1347
  id: "0xc568bb4c991258e839aa54802ecda04fcd9838c826bc3b42b40af81b23c458c8",
1470
- rewardPoolId: (
1471
- // '0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e',
1472
- "0x389a3cbeda742b918941bb24fd00e077bad3367484394d6234f8209b9a6aa03d"
1473
- )
1348
+ rewardPoolId: "0x389a3cbeda742b918941bb24fd00e077bad3367484394d6234f8209b9a6aa03d"
1474
1349
  },
1475
1350
  shasui: {
1476
- // id: '0xa6148bc1b623e936d39a952ceb5bea79e8b37228a8f595067bf1852efd3c34aa',
1477
1351
  id: "0x93f3f4499bf89f2d05ddc1f8b15f51701a7c6c4d0ac0b9c3bc99462cbbd8e321",
1478
- rewardPoolId: (
1479
- // '0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66',
1480
- "0x94cee1be7f5ff34193f3aabef0b14142cb28af4d905fe487a9a7d85a15edb6aa"
1481
- )
1352
+ rewardPoolId: "0x94cee1be7f5ff34193f3aabef0b14142cb28af4d905fe487a9a7d85a15edb6aa"
1482
1353
  },
1483
1354
  svsui: {
1484
- // id: '0x69ce8e537e750a95381e6040794afa5ab1758353a1a2e1de7760391b01f91670',
1485
1355
  id: "0xa970e9087f80cb59e9299b8e7af7175d977ad6c9af0322aa4440e138fbd7ae00",
1486
- rewardPoolId: (
1487
- // '0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a',
1488
- "0x38eee9699c4fc132a6623e54b865f047df4fc6eb83af807300f44e8f4b235ff0"
1489
- )
1356
+ rewardPoolId: "0x38eee9699c4fc132a6623e54b865f047df4fc6eb83af807300f44e8f4b235ff0"
1490
1357
  }
1491
1358
  },
1492
1359
  config: ""
1493
1360
  },
1494
1361
  borrowIncentive: {
1495
- id: "0x85769d63565ce99c7622f8e336ca1460926ddf29738ad2a39407b5cac29f61fe",
1362
+ id: "0x8fe05c796e779c71e7739dcaecefb8757ff9482f62e419dbd0dd9c35b740054f",
1496
1363
  adminCap: "0x56ac8e6f2b360b2b35c0168d72cc6cd17d9592afb83709865cb87af24bb2025b",
1497
- object: "0x85769d63565ce99c7622f8e336ca1460926ddf29738ad2a39407b5cac29f61fe",
1498
- query: "0x8e0d00f8ff1199d7c5fe56cea0e901a525daeefff0445a1635ace8282ae3302c",
1499
- incentivePools: "0x9d564c93128c6ab0c0d3e050a47f11df0b91494f3bb779bdc1301c1c637f15eb",
1500
- incentiveAccounts: "0x09e6040e798246de04941bc79a3ba62d3eca6d7a218cc30f21fb07f478fa2926",
1501
- config: "0x43d4ca1dfc90b161c4240facd119e74e4b850cca2957f88c2ec289c9380da064"
1364
+ object: "0x8fe05c796e779c71e7739dcaecefb8757ff9482f62e419dbd0dd9c35b740054f",
1365
+ query: "0x5fba54ac5862f087112c54c02339623bd245721f5e21ea3330fc8c8afc8f51f4",
1366
+ incentivePools: "0xcace4f4736229043d9f897667d046370b8a4d6534bfd307787c40b4c9f42514a",
1367
+ incentiveAccounts: "0x41ff558f580ca0f711910fd6ef687fce9df76ee8e7fc5e150bdfae08e17fae62",
1368
+ config: "0x9636e7b947b806b9fe438d037f02bb24026c5b2691d2f6bad349c2e117f77cc3"
1502
1369
  },
1503
1370
  referral: {
1504
1371
  id: "0x1bf5a8ce77050d8052549d743e16b469f15aa6b81b752b78b6ebb65179665f5a",
@@ -1510,8 +1377,6 @@ var TEST_ADDRESSES = {
1510
1377
  revenueTableId: "0x595baa3654c297bff84ab7786a2d250f019cefc66e8df8e89fd9d41e02bd30dd",
1511
1378
  referralTiers: "0x144350f3db9b46d11b140084cd54e6de0b9c3b8d265ce8059b51d0ef58ea464b",
1512
1379
  tiersTableId: "0xeac755a7a8b7798530905ac79e8c114f19d0f130f6eab012954f08faac29c75d",
1513
- // authorizedWitnessList:
1514
- // '0xf21b0ed043c9bb70842c0129159f4943dbcc3c9ef2f2f808af65f8be25cfd20e',
1515
1380
  authorizedWitnessList: "0x9d6223dc52015b8a3986a573590ef2af8f1b8f3e4685513888c052f001b87e7f",
1516
1381
  version: "0x3545849eb97723e676a476ec9d4fe5f2eb0eb2c6b78972851114fd4c7ed4639f"
1517
1382
  },
@@ -1531,19 +1396,19 @@ var TEST_ADDRESSES = {
1531
1396
  userRewardTableId: "0x748a80395849ed37db1b0e14f2ab5d1d96458d2359ab3a84eb079d0f4ac7cf2e"
1532
1397
  },
1533
1398
  scoin: {
1534
- id: "0x773dab39c90fe05439b06a2d061795e52a974ff92c2aef90b2ee467acf7f33c8",
1399
+ id: "0x826a4934bee9487e558eed603cf42f30cdc4321d6f31083930791b95f903b9f9",
1535
1400
  coins: {
1536
1401
  ssui: {
1537
- coinType: "0xf569919046f19a0c40b519ecfbb6ca0319698cd5908716c29b62ef56541f298b::scallop_sui::SCALLOP_SUI",
1538
- treasury: "0x0e499640a12c38dd9cc44532f5bc5fd1b6da86d2f9a8810357250f4b26e9e5c7"
1539
- },
1540
- scetus: {
1541
- coinType: "0x8b71e6d323ed78515af2bead13bf3d0da1562ba4a99234eb7c4f14fd39ef0427::scallop_cetus::SCALLOP_CETUS",
1542
- treasury: "0xd786f4b2d26278cc7911a3445b1b085eab60f269ef9dbb6b87e803d52f155003"
1402
+ coinType: "0x88618204de2dfdc2597681a8441ee726b0dc13494c41e319c3264eb7b35fea90::scallop_sui::SCALLOP_SUI",
1403
+ treasury: "0x03f1d94a40bd9f5d556bacb5c5245732b185572f6a29b36ad8b555d9a8a24f09"
1543
1404
  },
1544
1405
  ssca: {
1545
- coinType: "0x958428555e778e55918a59eb1c92c77f32b5c554fa3a5e56cd0815086b5072e7::scallop_sca::SCALLOP_SCA",
1546
- treasury: "0x5f1c5de1df7341075d119570269b7b452af50afe8363080638f1ae29a554c038"
1406
+ coinType: "0x9f64a180373a6b66595025ae16a4ab701f0af1dd5c7ce1ac91dc112e52c2a3f8::scallop_sca::SCALLOP_SCA",
1407
+ treasury: "0x1b05d2cd8b20dba19da073a54195fc52d2f438ea19dea0713bae7a7dab308199"
1408
+ },
1409
+ susdc: {
1410
+ coinType: "0x55ed015f9f006c0c96ad36ebe3b3570d088e8498f52defea48e5634c110e485c::scallop_usdc::SCALLOP_USDC",
1411
+ treasury: "0x6ef82ef94472dcb8c2cdeac8df38874024c08570ca165986ba56d1e38fe0c0a3"
1547
1412
  },
1548
1413
  swusdc: {
1549
1414
  coinType: "0xf5447c4305a486d8c8557559887c2c39449ddb5e748f15d33946d02a1663c158::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC",
@@ -1578,12 +1443,12 @@ var TEST_ADDRESSES = {
1578
1443
  treasury: "0xdad9bc6293e694f67a5274ea51b596e0bdabfafc585ae6d7e82888e65f1a03e0"
1579
1444
  },
1580
1445
  sdeep: {
1581
- coinType: "0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP",
1582
- treasury: "0xc63838fabe37b25ad897392d89876d920f5e0c6a406bf3abcb84753d2829bc88"
1446
+ coinType: "0x34f0a2e793e1f79ceac72cfe3bb95f65541da449418289ccd12922d16140c882::scallop_deep::SCALLOP_DEEP",
1447
+ treasury: "0x71d41465cf2d16fa0206126526bebdf65c8871d1fcfbd0c2237db2306afd67ba"
1583
1448
  },
1584
1449
  sfud: {
1585
- coinType: "0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD",
1586
- treasury: "0xf25212f11d182decff7a86165699a73e3d5787aced203ca539f43cfbc10db867"
1450
+ coinType: "0x3b23c05f917052255a0b16a534dbd4446911aa4a30bd3497cdf5b736551e7ef8::scallop_fud::SCALLOP_FUD",
1451
+ treasury: "0x858c492d51425b922c040c1a389e185b3b00d565e7d72ead1a81dc733104660d"
1587
1452
  }
1588
1453
  }
1589
1454
  }
@@ -1596,6 +1461,31 @@ var MAX_LOCK_DURATION = MAX_LOCK_ROUNDS * UNLOCK_ROUND_DURATION;
1596
1461
  var MIN_INITIAL_LOCK_AMOUNT = 1e10;
1597
1462
  var MIN_TOP_UP_AMOUNT = 1e9;
1598
1463
 
1464
+ // src/constants/xoracle.ts
1465
+ var xOracleList = {
1466
+ // @TODO: Update to real oracle list
1467
+ usdc: { primary: ["pyth"], secondary: [] },
1468
+ sbeth: { primary: [], secondary: [] },
1469
+ sbusdt: { primary: [], secondary: [] },
1470
+ sbwbtc: { primary: [], secondary: [] },
1471
+ weth: { primary: [], secondary: [] },
1472
+ wbtc: { primary: [], secondary: [] },
1473
+ wusdc: { primary: [], secondary: [] },
1474
+ wusdt: { primary: [], secondary: [] },
1475
+ sui: { primary: ["pyth"], secondary: [] },
1476
+ wapt: { primary: [], secondary: [] },
1477
+ wsol: { primary: [], secondary: [] },
1478
+ cetus: { primary: [], secondary: [] },
1479
+ afsui: { primary: [], secondary: [] },
1480
+ hasui: { primary: [], secondary: [] },
1481
+ vsui: { primary: [], secondary: [] },
1482
+ sca: { primary: ["pyth"], secondary: [] },
1483
+ fud: { primary: ["pyth"], secondary: [] },
1484
+ deep: { primary: ["pyth"], secondary: [] },
1485
+ fdusd: { primary: [], secondary: [] },
1486
+ blub: { primary: [], secondary: [] }
1487
+ };
1488
+
1599
1489
  // src/models/scallopCache.ts
1600
1490
  var import_query_core = require("@tanstack/query-core");
1601
1491
  var import_sui_kit2 = require("@scallop-io/sui-kit");
@@ -3134,13 +3024,10 @@ var parseAssetSymbol = (coinName) => {
3134
3024
  return `w${coinName.slice(1).toUpperCase()}`;
3135
3025
  }
3136
3026
  if (isSuiBridgeAsset(coinName)) {
3137
- switch (coinName) {
3138
- case "sbwbtc":
3139
- return "sbwBTC";
3140
- default: {
3141
- return `sb${coinName.slice(2).toUpperCase()}`;
3142
- }
3027
+ if (coinName.startsWith("sbw") && coinName.length > 3) {
3028
+ return `sbw${coinName.slice(3).toUpperCase()}`;
3143
3029
  }
3030
+ return `sb${coinName.slice(2).toUpperCase()}`;
3144
3031
  }
3145
3032
  if (isMarketCoin(coinName)) {
3146
3033
  const assetCoinName = coinName.slice(1).toLowerCase();
@@ -3153,8 +3040,6 @@ var parseAssetSymbol = (coinName) => {
3153
3040
  return "haSUI";
3154
3041
  case "vsui":
3155
3042
  return "vSUI";
3156
- case "musd":
3157
- return "mUSD";
3158
3043
  default:
3159
3044
  return coinName.toUpperCase();
3160
3045
  }
@@ -3172,7 +3057,7 @@ var parseDataFromPythPriceFeed = (feed, address) => {
3172
3057
  publishTime: Number(feed.price.publishTime) * 10 ** 3
3173
3058
  };
3174
3059
  } else {
3175
- throw new Error("Invalid feed id");
3060
+ throw new Error(`Invalid feed id: ${feed.id}`);
3176
3061
  }
3177
3062
  };
3178
3063
  var findClosestUnlockRound = (unlockAtInSecondTimestamp) => {
@@ -4161,7 +4046,7 @@ var getObligations = async ({
4161
4046
  address
4162
4047
  }, ownerAddress) => {
4163
4048
  const owner = ownerAddress;
4164
- const protocolObjectId = address.get("core.object") ?? PROTOCOL_OBJECT_ID;
4049
+ const protocolObjectId = address.get("core.object") || PROTOCOL_OBJECT_ID;
4165
4050
  const keyObjectsResponse = [];
4166
4051
  let hasNextPage = false;
4167
4052
  let nextCursor = null;
@@ -4222,10 +4107,19 @@ var getObligationLocked = async (cache, obligation) => {
4222
4107
  };
4223
4108
  var queryObligation = async ({
4224
4109
  address
4225
- }, obligationId) => {
4110
+ }, obligationId, version = address.get("core.version"), market = address.get("core.market")) => {
4226
4111
  const packageId = address.get("core.packages.query.id");
4227
4112
  const queryTarget = `${packageId}::obligation_query::obligation_data`;
4228
- const args = [obligationId];
4113
+ const args = [
4114
+ version,
4115
+ market,
4116
+ obligationId,
4117
+ {
4118
+ objectId: import_utils5.SUI_CLOCK_OBJECT_ID,
4119
+ mutable: false,
4120
+ initialSharedVersion: "1"
4121
+ }
4122
+ ];
4229
4123
  const queryResult = await address.cache.queryInspectTxn(
4230
4124
  { queryTarget, args }
4231
4125
  // txBlock
@@ -5179,9 +5073,9 @@ var getPythPrices = async ({
5179
5073
  {}
5180
5074
  );
5181
5075
  };
5182
- var getAllCoinPrices = async (query, marketPools, coinPrices) => {
5183
- coinPrices = coinPrices ?? await query.utils.getCoinPrices();
5184
- marketPools = marketPools ?? (await query.getMarketPools(void 0, { coinPrices })).pools;
5076
+ var getAllCoinPrices = async (query, marketPools, coinPrices, indexer = false) => {
5077
+ coinPrices = coinPrices ?? (indexer ? await query.getCoinPricesByIndexer() : await query.utils.getCoinPrices());
5078
+ marketPools = marketPools ?? (await query.getMarketPools(void 0, { coinPrices, indexer })).pools;
5185
5079
  if (!marketPools) {
5186
5080
  throw new Error(`Failed to fetch market pool for getAllCoinPrices`);
5187
5081
  }
@@ -5762,25 +5656,15 @@ var getTotalVeScaTreasuryAmount = async (utils, veScaTreasury) => {
5762
5656
  const veScaConfig = utils.address.get("vesca.config");
5763
5657
  veScaTreasury = veScaTreasury ?? utils.address.get("vesca.treasury");
5764
5658
  const txb = new import_sui_kit4.SuiTxBlock();
5659
+ const clockObjectRef = txb.sharedObjectRef({
5660
+ objectId: import_sui_kit4.SUI_CLOCK_OBJECT_ID,
5661
+ mutable: false,
5662
+ initialSharedVersion: "1"
5663
+ });
5765
5664
  const refreshQueryTarget = `${veScaPkgId}::treasury::refresh`;
5766
- const refreshArgs = [
5767
- veScaConfig,
5768
- veScaTreasury,
5769
- txb.sharedObjectRef({
5770
- objectId: import_sui_kit4.SUI_CLOCK_OBJECT_ID,
5771
- mutable: false,
5772
- initialSharedVersion: "1"
5773
- })
5774
- ];
5665
+ const refreshArgs = [veScaConfig, veScaTreasury, clockObjectRef];
5775
5666
  const veScaAmountQueryTarget = `${veScaPkgId}::treasury::total_ve_sca_amount`;
5776
- const veScaAmountArgs = [
5777
- veScaTreasury,
5778
- txb.sharedObjectRef({
5779
- objectId: import_sui_kit4.SUI_CLOCK_OBJECT_ID,
5780
- mutable: false,
5781
- initialSharedVersion: "1"
5782
- })
5783
- ];
5667
+ const veScaAmountArgs = [veScaTreasury, clockObjectRef];
5784
5668
  const resolvedRefreshArgs = await Promise.all(
5785
5669
  refreshArgs.map(async (arg) => {
5786
5670
  if (typeof arg === "string") {
@@ -5844,7 +5728,7 @@ var getVeScaTreasuryInfo = async (utils) => {
5844
5728
  };
5845
5729
 
5846
5730
  // src/queries/poolAddressesQuery.ts
5847
- var getAllAddresses = async (query, pools) => {
5731
+ var getAllAddresses = async (query, pools = [...SUPPORT_POOLS]) => {
5848
5732
  const results = {};
5849
5733
  const marketId = query.address.get("core.market");
5850
5734
  const marketObject = (await query.cache.queryGetObject(marketId))?.data;
@@ -5969,6 +5853,78 @@ var getAllAddresses = async (query, pools) => {
5969
5853
  return results;
5970
5854
  };
5971
5855
 
5856
+ // src/queries/xOracleQuery.ts
5857
+ var PRIMARY_PRICE_UPDATE_POLICY = "0xbcd908d0ee6d63d726e61676f3feeec3d19817f4849bbecf372dd3399f247f6b";
5858
+ var SECONDARY_PRICE_UPDDATE_POLICY = "0x624a6f120777bb30e718b86e836c205ef4229448052377dc3d78272a6662b2c0";
5859
+ var getPriceUpdatePolicies = async (address) => {
5860
+ const priceUpdatePolicyRulesKeyType = `${address.get("core.packages.xOracle.object")}::price_update_policy::PriceUpdatePolicyRulesKey`;
5861
+ const [primaryPriceUpdatePolicyTable, secondaryPriceUpdatePolicyTable] = await Promise.all([
5862
+ address.cache.queryGetDynamicFieldObject({
5863
+ parentId: PRIMARY_PRICE_UPDATE_POLICY,
5864
+ name: {
5865
+ type: priceUpdatePolicyRulesKeyType,
5866
+ value: { dummy_field: false }
5867
+ }
5868
+ }),
5869
+ address.cache.queryGetDynamicFieldObject({
5870
+ parentId: SECONDARY_PRICE_UPDDATE_POLICY,
5871
+ name: {
5872
+ type: priceUpdatePolicyRulesKeyType,
5873
+ value: { dummy_field: false }
5874
+ }
5875
+ })
5876
+ ]);
5877
+ return {
5878
+ primary: primaryPriceUpdatePolicyTable,
5879
+ secondary: secondaryPriceUpdatePolicyTable
5880
+ };
5881
+ };
5882
+ var PRIMARY_PRICE_UPDATE_POLICY_VECSET_ID = "0xfb1330aa028ed6a159b742c71b5a79b3b6824cf71efa40ea82b52486ad209264";
5883
+ var SECONDARY_PRICE_UPDATE_POLICY_VECSET_ID = "0x4b827acc73f3f53f808dd73a7ee0a60ae61e84322176bece72b26467030b467c";
5884
+ var getAssetOracles = async (utils, ruleType) => {
5885
+ const ruleTypeNameToOracleType = {
5886
+ [`${utils.address.get("core.packages.pyth.object")}::rule::Rule`]: "pyth",
5887
+ [`${utils.address.get("core.packages.supra.object")}::rule::Rule`]: "supra",
5888
+ [`${utils.address.get("core.packages.switchboard.object")}::rule::Rule`]: "switchboard"
5889
+ };
5890
+ const assetPrimaryOracles = {};
5891
+ let cursor = null;
5892
+ do {
5893
+ const response = await utils.cache.queryGetDynamicFields({
5894
+ parentId: ruleType === "primary" ? PRIMARY_PRICE_UPDATE_POLICY_VECSET_ID : SECONDARY_PRICE_UPDATE_POLICY_VECSET_ID,
5895
+ cursor,
5896
+ limit: 10
5897
+ });
5898
+ if (!response)
5899
+ break;
5900
+ const { data, hasNextPage, nextCursor } = response;
5901
+ cursor = nextCursor;
5902
+ const objectIds = data.map((dynamicField) => dynamicField.objectId);
5903
+ const objectResponses = await utils.cache.queryGetObjects(objectIds);
5904
+ objectResponses.forEach((object) => {
5905
+ if (!object.content || object.content.dataType !== "moveObject")
5906
+ return;
5907
+ const fields = object.content.fields;
5908
+ const typeName = fields.name.fields.name;
5909
+ const assetName = utils.parseCoinNameFromType(`0x${typeName}`);
5910
+ if (!assetName)
5911
+ throw new Error(`Invalid asset name: ${assetName}`);
5912
+ if (!assetPrimaryOracles[assetName]) {
5913
+ assetPrimaryOracles[assetName] = [];
5914
+ }
5915
+ const value = fields.value;
5916
+ value.fields.contents.forEach((content) => {
5917
+ assetPrimaryOracles[assetName].push(
5918
+ ruleTypeNameToOracleType[`0x${content.fields.name}`]
5919
+ );
5920
+ });
5921
+ });
5922
+ if (!hasNextPage)
5923
+ break;
5924
+ } while (cursor);
5925
+ return assetPrimaryOracles;
5926
+ };
5927
+
5972
5928
  // src/models/scallopUtils.ts
5973
5929
  var ScallopUtils = class {
5974
5930
  constructor(params, instance) {
@@ -6160,7 +6116,7 @@ var ScallopUtils = class {
6160
6116
  * @return Market coin type.
6161
6117
  */
6162
6118
  parseMarketCoinType(coinName) {
6163
- const protocolObjectId = this.address.get("core.object") ?? PROTOCOL_OBJECT_ID;
6119
+ const protocolObjectId = this.address.get("core.object") || PROTOCOL_OBJECT_ID;
6164
6120
  const coinType = this.parseCoinType(coinName, true);
6165
6121
  return `${protocolObjectId}::reserve::MarketCoin<${coinType}>`;
6166
6122
  }
@@ -6457,13 +6413,19 @@ var import_sui_kit5 = require("@scallop-io/sui-kit");
6457
6413
  // src/builders/oracle.ts
6458
6414
  var import_utils12 = require("@mysten/sui/utils");
6459
6415
  var import_pyth_sui_js2 = require("@pythnetwork/pyth-sui-js");
6460
- var updateOracles = async (builder, txBlock, assetCoinNames, options = { usePythPullModel: true }) => {
6416
+ var updateOracles = async (builder, txBlock, assetCoinNames = [
6417
+ .../* @__PURE__ */ new Set([...SUPPORT_POOLS, ...SUPPORT_COLLATERALS])
6418
+ ], options = { usePythPullModel: true }) => {
6461
6419
  const usePythPullModel = builder.params.usePythPullModel ?? options.usePythPullModel;
6462
- assetCoinNames = assetCoinNames ?? [
6463
- .../* @__PURE__ */ new Set([...SUPPORT_POOLS, ...SUPPORT_COLLATERALS])
6420
+ const flattenedRules = [
6421
+ ...new Set(
6422
+ Object.values(xOracleList).flatMap(({ primary, secondary }) => [
6423
+ ...primary,
6424
+ ...secondary
6425
+ ])
6426
+ )
6464
6427
  ];
6465
- const rules = builder.isTestnet ? ["pyth"] : ["pyth"];
6466
- if (usePythPullModel && rules.includes("pyth")) {
6428
+ if (flattenedRules.includes("pyth") && usePythPullModel) {
6467
6429
  const pythClient = new import_pyth_sui_js2.SuiPythClient(
6468
6430
  builder.suiKit.client(),
6469
6431
  builder.address.get("core.oracles.pyth.state"),
@@ -6493,7 +6455,12 @@ var updateOracles = async (builder, txBlock, assetCoinNames, options = { usePyth
6493
6455
  }
6494
6456
  const updateAssetCoinNames = [...new Set(assetCoinNames)];
6495
6457
  for (const assetCoinName of updateAssetCoinNames) {
6496
- await updateOracle(builder, txBlock, assetCoinName, rules);
6458
+ await updateOracle(
6459
+ builder,
6460
+ txBlock,
6461
+ assetCoinName,
6462
+ xOracleList[assetCoinName]
6463
+ );
6497
6464
  }
6498
6465
  };
6499
6466
  var updateOracle = async (builder, txBlock, assetCoinName, rules) => {
@@ -6523,37 +6490,42 @@ var updatePrice = (txBlock, rules, xOraclePackageId, xOracleId, pythPackageId, p
6523
6490
  xOracleId,
6524
6491
  coinType
6525
6492
  );
6526
- if (rules.includes("pyth")) {
6527
- updatePythPrice(
6528
- txBlock,
6529
- pythPackageId,
6530
- request,
6531
- pythStateId,
6532
- pythFeedObjectId,
6533
- pythRegistryId,
6534
- coinType
6535
- );
6536
- }
6537
- if (rules.includes("switchboard")) {
6538
- updateSwitchboardPrice(
6539
- txBlock,
6540
- switchboardPackageId,
6541
- request,
6542
- switchboardAggregatorId,
6543
- switchboardRegistryId,
6544
- coinType
6545
- );
6546
- }
6547
- if (rules.includes("supra")) {
6548
- updateSupraPrice(
6549
- txBlock,
6550
- supraPackageId,
6551
- request,
6552
- supraHolderId,
6553
- supraRegistryId,
6554
- coinType
6555
- );
6556
- }
6493
+ Object.entries(rules).forEach(([type, rule]) => {
6494
+ if (rule.includes("pyth")) {
6495
+ updatePythPrice(
6496
+ type,
6497
+ txBlock,
6498
+ pythPackageId,
6499
+ request,
6500
+ pythStateId,
6501
+ pythFeedObjectId,
6502
+ pythRegistryId,
6503
+ coinType
6504
+ );
6505
+ }
6506
+ if (rule.includes("supra")) {
6507
+ updateSupraPrice(
6508
+ type,
6509
+ txBlock,
6510
+ supraPackageId,
6511
+ request,
6512
+ supraHolderId,
6513
+ supraRegistryId,
6514
+ coinType
6515
+ );
6516
+ }
6517
+ if (rule.includes("switchboard")) {
6518
+ updateSwitchboardPrice(
6519
+ type,
6520
+ txBlock,
6521
+ switchboardPackageId,
6522
+ request,
6523
+ switchboardAggregatorId,
6524
+ switchboardRegistryId,
6525
+ coinType
6526
+ );
6527
+ }
6528
+ });
6557
6529
  confirmPriceUpdateRequest(
6558
6530
  txBlock,
6559
6531
  xOraclePackageId,
@@ -6586,41 +6558,41 @@ var confirmPriceUpdateRequest = (txBlock, packageId, xOracleId, request, coinTyp
6586
6558
  );
6587
6559
  return txBlock;
6588
6560
  };
6589
- var updateSupraPrice = (txBlock, packageId, request, holderId, registryId, coinType) => {
6561
+ var updateSupraPrice = (type, txBlock, packageId, request, holderId, registryId, coinType) => {
6590
6562
  txBlock.moveCall(
6591
- `${packageId}::rule::set_price`,
6563
+ `${packageId}::rule::set_price_as_${type}`,
6592
6564
  [
6593
6565
  request,
6594
6566
  holderId,
6595
6567
  registryId,
6596
6568
  txBlock.sharedObjectRef({
6597
6569
  objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
6598
- mutable: false,
6599
- initialSharedVersion: "1"
6570
+ initialSharedVersion: "1",
6571
+ mutable: false
6600
6572
  })
6601
6573
  ],
6602
6574
  [coinType]
6603
6575
  );
6604
6576
  };
6605
- var updateSwitchboardPrice = (txBlock, packageId, request, aggregatorId, registryId, coinType) => {
6577
+ var updateSwitchboardPrice = (type, txBlock, packageId, request, aggregatorId, registryId, coinType) => {
6606
6578
  txBlock.moveCall(
6607
- `${packageId}::rule::set_price`,
6579
+ `${packageId}::rule::set_price_as_${type}`,
6608
6580
  [
6609
6581
  request,
6610
6582
  aggregatorId,
6611
6583
  registryId,
6612
6584
  txBlock.sharedObjectRef({
6613
6585
  objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
6614
- mutable: false,
6615
- initialSharedVersion: "1"
6586
+ initialSharedVersion: "1",
6587
+ mutable: false
6616
6588
  })
6617
6589
  ],
6618
6590
  [coinType]
6619
6591
  );
6620
6592
  };
6621
- var updatePythPrice = (txBlock, packageId, request, stateId, feedObjectId, registryId, coinType) => {
6593
+ var updatePythPrice = (type, txBlock, packageId, request, stateId, feedObjectId, registryId, coinType) => {
6622
6594
  txBlock.moveCall(
6623
- `${packageId}::rule::set_price`,
6595
+ `${packageId}::rule::set_price_as_${type}`,
6624
6596
  [
6625
6597
  request,
6626
6598
  stateId,
@@ -6628,8 +6600,8 @@ var updatePythPrice = (txBlock, packageId, request, stateId, feedObjectId, regis
6628
6600
  registryId,
6629
6601
  txBlock.sharedObjectRef({
6630
6602
  objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
6631
- mutable: false,
6632
- initialSharedVersion: "1"
6603
+ initialSharedVersion: "1",
6604
+ mutable: false
6633
6605
  })
6634
6606
  ],
6635
6607
  [coinType]
@@ -6666,6 +6638,11 @@ var generateCoreNormalMethod = ({
6666
6638
  };
6667
6639
  const referralPkgId = builder.address.get("referral.id");
6668
6640
  const referralWitnessType = `${referralPkgId}::scallop_referral_program::REFERRAL_WITNESS`;
6641
+ const clockObjectRef = txBlock.sharedObjectRef({
6642
+ objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6643
+ mutable: false,
6644
+ initialSharedVersion: "1"
6645
+ });
6669
6646
  return {
6670
6647
  openObligation: () => {
6671
6648
  const [obligation, obligationKey, obligationHotPotato] = builder.moveCall(
@@ -6711,11 +6688,7 @@ var generateCoreNormalMethod = ({
6711
6688
  coreIds.coinDecimalsRegistry,
6712
6689
  txBlock.pure.u64(amount),
6713
6690
  coreIds.xOracle,
6714
- txBlock.sharedObjectRef({
6715
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6716
- mutable: false,
6717
- initialSharedVersion: "1"
6718
- })
6691
+ clockObjectRef
6719
6692
  ],
6720
6693
  [coinType]
6721
6694
  );
@@ -6725,16 +6698,7 @@ var generateCoreNormalMethod = ({
6725
6698
  return builder.moveCall(
6726
6699
  txBlock,
6727
6700
  `${coreIds.protocolPkg}::mint::mint`,
6728
- [
6729
- coreIds.version,
6730
- coreIds.market,
6731
- coin,
6732
- txBlock.sharedObjectRef({
6733
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6734
- mutable: false,
6735
- initialSharedVersion: "1"
6736
- })
6737
- ],
6701
+ [coreIds.version, coreIds.market, coin, clockObjectRef],
6738
6702
  [coinType]
6739
6703
  );
6740
6704
  },
@@ -6743,16 +6707,7 @@ var generateCoreNormalMethod = ({
6743
6707
  return builder.moveCall(
6744
6708
  txBlock,
6745
6709
  `${coreIds.protocolPkg}::mint::mint_entry`,
6746
- [
6747
- coreIds.version,
6748
- coreIds.market,
6749
- coin,
6750
- txBlock.sharedObjectRef({
6751
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6752
- mutable: false,
6753
- initialSharedVersion: "1"
6754
- })
6755
- ],
6710
+ [coreIds.version, coreIds.market, coin, clockObjectRef],
6756
6711
  [coinType]
6757
6712
  );
6758
6713
  },
@@ -6761,16 +6716,7 @@ var generateCoreNormalMethod = ({
6761
6716
  return builder.moveCall(
6762
6717
  txBlock,
6763
6718
  `${coreIds.protocolPkg}::redeem::redeem`,
6764
- [
6765
- coreIds.version,
6766
- coreIds.market,
6767
- marketCoin,
6768
- txBlock.sharedObjectRef({
6769
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6770
- mutable: false,
6771
- initialSharedVersion: "1"
6772
- })
6773
- ],
6719
+ [coreIds.version, coreIds.market, marketCoin, clockObjectRef],
6774
6720
  [coinType]
6775
6721
  );
6776
6722
  },
@@ -6779,16 +6725,7 @@ var generateCoreNormalMethod = ({
6779
6725
  return builder.moveCall(
6780
6726
  txBlock,
6781
6727
  `${coreIds.protocolPkg}::redeem::redeem_entry`,
6782
- [
6783
- coreIds.version,
6784
- coreIds.market,
6785
- marketCoin,
6786
- txBlock.sharedObjectRef({
6787
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6788
- mutable: false,
6789
- initialSharedVersion: "1"
6790
- })
6791
- ],
6728
+ [coreIds.version, coreIds.market, marketCoin, clockObjectRef],
6792
6729
  [coinType]
6793
6730
  );
6794
6731
  },
@@ -6805,11 +6742,7 @@ var generateCoreNormalMethod = ({
6805
6742
  coreIds.coinDecimalsRegistry,
6806
6743
  amount,
6807
6744
  coreIds.xOracle,
6808
- txBlock.sharedObjectRef({
6809
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6810
- mutable: false,
6811
- initialSharedVersion: "1"
6812
- })
6745
+ clockObjectRef
6813
6746
  ],
6814
6747
  [coinType]
6815
6748
  );
@@ -6828,11 +6761,7 @@ var generateCoreNormalMethod = ({
6828
6761
  borrowReferral,
6829
6762
  typeof amount === "number" ? txBlock.pure.u64(amount) : amount,
6830
6763
  coreIds.xOracle,
6831
- txBlock.sharedObjectRef({
6832
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6833
- mutable: false,
6834
- initialSharedVersion: "1"
6835
- })
6764
+ clockObjectRef
6836
6765
  ],
6837
6766
  [coinType, referralWitnessType]
6838
6767
  );
@@ -6850,11 +6779,7 @@ var generateCoreNormalMethod = ({
6850
6779
  coreIds.coinDecimalsRegistry,
6851
6780
  txBlock.pure.u64(amount),
6852
6781
  coreIds.xOracle,
6853
- txBlock.sharedObjectRef({
6854
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6855
- mutable: false,
6856
- initialSharedVersion: "1"
6857
- })
6782
+ clockObjectRef
6858
6783
  ],
6859
6784
  [coinType]
6860
6785
  );
@@ -6864,17 +6789,7 @@ var generateCoreNormalMethod = ({
6864
6789
  builder.moveCall(
6865
6790
  txBlock,
6866
6791
  `${coreIds.protocolPkg}::repay::repay`,
6867
- [
6868
- coreIds.version,
6869
- obligation,
6870
- coreIds.market,
6871
- coin,
6872
- txBlock.sharedObjectRef({
6873
- objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
6874
- mutable: false,
6875
- initialSharedVersion: "1"
6876
- })
6877
- ],
6792
+ [coreIds.version, obligation, coreIds.market, coin, clockObjectRef],
6878
6793
  [coinType]
6879
6794
  );
6880
6795
  },
@@ -7019,7 +6934,7 @@ var generateCoreQuickMethod = ({
7019
6934
  ) ?? [];
7020
6935
  const updateCoinNames = [...obligationCoinNames, poolCoinName];
7021
6936
  await updateOracles(builder, txBlock, updateCoinNames);
7022
- return await txBlock.borrow(
6937
+ return txBlock.borrow(
7023
6938
  obligationInfo.obligationId,
7024
6939
  obligationInfo.obligationKey,
7025
6940
  amount,
@@ -7157,6 +7072,11 @@ var generateSpoolNormalMethod = ({
7157
7072
  const spoolIds = {
7158
7073
  spoolPkg: builder.address.get("spool.id")
7159
7074
  };
7075
+ const clockObjectRef = txBlock.sharedObjectRef({
7076
+ objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
7077
+ mutable: false,
7078
+ initialSharedVersion: "1"
7079
+ });
7160
7080
  return {
7161
7081
  createStakeAccount: (stakeMarketCoinName) => {
7162
7082
  const marketCoinType = builder.utils.parseMarketCoinType(stakeMarketCoinName);
@@ -7166,14 +7086,7 @@ var generateSpoolNormalMethod = ({
7166
7086
  return builder.moveCall(
7167
7087
  txBlock,
7168
7088
  `${spoolIds.spoolPkg}::user::new_spool_account`,
7169
- [
7170
- stakePoolId,
7171
- txBlock.sharedObjectRef({
7172
- objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
7173
- mutable: false,
7174
- initialSharedVersion: "1"
7175
- })
7176
- ],
7089
+ [stakePoolId, clockObjectRef],
7177
7090
  [marketCoinType]
7178
7091
  );
7179
7092
  },
@@ -7185,16 +7098,7 @@ var generateSpoolNormalMethod = ({
7185
7098
  builder.moveCall(
7186
7099
  txBlock,
7187
7100
  `${spoolIds.spoolPkg}::user::stake`,
7188
- [
7189
- stakePoolId,
7190
- stakeAccount,
7191
- coin,
7192
- txBlock.sharedObjectRef({
7193
- objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
7194
- mutable: false,
7195
- initialSharedVersion: "1"
7196
- })
7197
- ],
7101
+ [stakePoolId, stakeAccount, coin, clockObjectRef],
7198
7102
  [marketCoinType]
7199
7103
  );
7200
7104
  },
@@ -7206,16 +7110,7 @@ var generateSpoolNormalMethod = ({
7206
7110
  return builder.moveCall(
7207
7111
  txBlock,
7208
7112
  `${spoolIds.spoolPkg}::user::unstake`,
7209
- [
7210
- stakePoolId,
7211
- stakeAccount,
7212
- amount,
7213
- txBlock.sharedObjectRef({
7214
- objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
7215
- mutable: false,
7216
- initialSharedVersion: "1"
7217
- })
7218
- ],
7113
+ [stakePoolId, stakeAccount, amount, clockObjectRef],
7219
7114
  [marketCoinType]
7220
7115
  );
7221
7116
  },
@@ -7232,16 +7127,7 @@ var generateSpoolNormalMethod = ({
7232
7127
  return builder.moveCall(
7233
7128
  txBlock,
7234
7129
  `${spoolIds.spoolPkg}::user::redeem_rewards`,
7235
- [
7236
- stakePoolId,
7237
- rewardPoolId,
7238
- stakeAccount,
7239
- txBlock.sharedObjectRef({
7240
- objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
7241
- mutable: false,
7242
- initialSharedVersion: "1"
7243
- })
7244
- ],
7130
+ [stakePoolId, rewardPoolId, stakeAccount, clockObjectRef],
7245
7131
  [marketCoinType, rewardCoinType]
7246
7132
  );
7247
7133
  }
@@ -7416,6 +7302,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
7416
7302
  treasury: builder.address.get("vesca.treasury"),
7417
7303
  config: builder.address.get("vesca.config")
7418
7304
  };
7305
+ const clockObjectRef = txBlock.sharedObjectRef({
7306
+ objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
7307
+ mutable: false,
7308
+ initialSharedVersion: "1"
7309
+ });
7419
7310
  return {
7420
7311
  stakeObligation: (obligationId, obligationKey) => {
7421
7312
  builder.moveCall(
@@ -7428,11 +7319,7 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
7428
7319
  obligationKey,
7429
7320
  obligationId,
7430
7321
  borrowIncentiveIds.obligationAccessStore,
7431
- txBlock.sharedObjectRef({
7432
- objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
7433
- mutable: false,
7434
- initialSharedVersion: "1"
7435
- })
7322
+ clockObjectRef
7436
7323
  ]
7437
7324
  );
7438
7325
  },
@@ -7451,11 +7338,7 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
7451
7338
  veScaIds.treasury,
7452
7339
  veScaIds.table,
7453
7340
  veScaKey,
7454
- txBlock.sharedObjectRef({
7455
- objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
7456
- mutable: false,
7457
- initialSharedVersion: "1"
7458
- })
7341
+ clockObjectRef
7459
7342
  ],
7460
7343
  []
7461
7344
  );
@@ -7470,11 +7353,7 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
7470
7353
  borrowIncentiveIds.incentiveAccounts,
7471
7354
  obligationKey,
7472
7355
  obligationId,
7473
- txBlock.sharedObjectRef({
7474
- objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
7475
- mutable: false,
7476
- initialSharedVersion: "1"
7477
- })
7356
+ clockObjectRef
7478
7357
  ]
7479
7358
  );
7480
7359
  },
@@ -7489,11 +7368,7 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
7489
7368
  borrowIncentiveIds.incentiveAccounts,
7490
7369
  obligationKey,
7491
7370
  obligationId,
7492
- txBlock.sharedObjectRef({
7493
- objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
7494
- mutable: false,
7495
- initialSharedVersion: "1"
7496
- })
7371
+ clockObjectRef
7497
7372
  ],
7498
7373
  [rewardType]
7499
7374
  );
@@ -7508,11 +7383,7 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
7508
7383
  borrowIncentiveIds.incentiveAccounts,
7509
7384
  obligation,
7510
7385
  veScaKey,
7511
- txBlock.sharedObjectRef({
7512
- objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
7513
- mutable: false,
7514
- initialSharedVersion: "1"
7515
- })
7386
+ clockObjectRef
7516
7387
  ]
7517
7388
  );
7518
7389
  }
@@ -7652,6 +7523,11 @@ var generateNormalVeScaMethod = ({
7652
7523
  treasury: builder.address.get("vesca.treasury"),
7653
7524
  config: builder.address.get("vesca.config")
7654
7525
  };
7526
+ const clockObjectRef = txBlock.sharedObjectRef({
7527
+ objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
7528
+ mutable: false,
7529
+ initialSharedVersion: "1"
7530
+ });
7655
7531
  return {
7656
7532
  lockSca: (scaCoin, unlockAtInSecondTimestamp) => {
7657
7533
  return builder.moveCall(
@@ -7663,11 +7539,7 @@ var generateNormalVeScaMethod = ({
7663
7539
  veScaIds.treasury,
7664
7540
  scaCoin,
7665
7541
  unlockAtInSecondTimestamp,
7666
- txBlock.sharedObjectRef({
7667
- objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
7668
- mutable: false,
7669
- initialSharedVersion: "1"
7670
- })
7542
+ clockObjectRef
7671
7543
  ],
7672
7544
  []
7673
7545
  );
@@ -7682,11 +7554,7 @@ var generateNormalVeScaMethod = ({
7682
7554
  veScaIds.table,
7683
7555
  veScaIds.treasury,
7684
7556
  newUnlockAtInSecondTimestamp,
7685
- txBlock.sharedObjectRef({
7686
- objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
7687
- mutable: false,
7688
- initialSharedVersion: "1"
7689
- })
7557
+ clockObjectRef
7690
7558
  ],
7691
7559
  []
7692
7560
  );
@@ -7701,11 +7569,7 @@ var generateNormalVeScaMethod = ({
7701
7569
  veScaIds.table,
7702
7570
  veScaIds.treasury,
7703
7571
  scaCoin,
7704
- txBlock.sharedObjectRef({
7705
- objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
7706
- mutable: false,
7707
- initialSharedVersion: "1"
7708
- })
7572
+ clockObjectRef
7709
7573
  ],
7710
7574
  []
7711
7575
  );
@@ -7721,11 +7585,7 @@ var generateNormalVeScaMethod = ({
7721
7585
  veScaIds.treasury,
7722
7586
  scaCoin,
7723
7587
  newUnlockAtInSecondTimestamp,
7724
- txBlock.sharedObjectRef({
7725
- objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
7726
- mutable: false,
7727
- initialSharedVersion: "1"
7728
- })
7588
+ clockObjectRef
7729
7589
  ],
7730
7590
  []
7731
7591
  );
@@ -7739,11 +7599,7 @@ var generateNormalVeScaMethod = ({
7739
7599
  veScaKey,
7740
7600
  veScaIds.table,
7741
7601
  veScaIds.treasury,
7742
- txBlock.sharedObjectRef({
7743
- objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
7744
- mutable: false,
7745
- initialSharedVersion: "1"
7746
- })
7602
+ clockObjectRef
7747
7603
  ],
7748
7604
  []
7749
7605
  );
@@ -7888,7 +7744,7 @@ var generateQuickVeScaMethod = ({
7888
7744
  const veSca = await requireVeSca(builder, txBlock, veScaKey);
7889
7745
  checkVesca(veSca?.unlockAt);
7890
7746
  if (veSca) {
7891
- const sca = await txBlock.redeemSca(veSca.keyId);
7747
+ const sca = txBlock.redeemSca(veSca.keyId);
7892
7748
  if (transferSca) {
7893
7749
  txBlock.transferObjects([sca], sender);
7894
7750
  return;
@@ -7943,6 +7799,11 @@ var generateReferralNormalMethod = ({
7943
7799
  version: builder.address.get("referral.version")
7944
7800
  };
7945
7801
  const veScaTable = builder.address.get("vesca.table");
7802
+ const clockObjectRef = txBlock.sharedObjectRef({
7803
+ objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
7804
+ mutable: false,
7805
+ initialSharedVersion: "1"
7806
+ });
7946
7807
  return {
7947
7808
  bindToReferral: (veScaKeyId) => {
7948
7809
  builder.moveCall(
@@ -7952,11 +7813,7 @@ var generateReferralNormalMethod = ({
7952
7813
  referralIds.referralBindings,
7953
7814
  txBlock.pure.id(veScaKeyId),
7954
7815
  veScaTable,
7955
- txBlock.sharedObjectRef({
7956
- objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
7957
- mutable: false,
7958
- initialSharedVersion: "1"
7959
- })
7816
+ clockObjectRef
7960
7817
  ],
7961
7818
  []
7962
7819
  );
@@ -7972,11 +7829,7 @@ var generateReferralNormalMethod = ({
7972
7829
  referralIds.referralBindings,
7973
7830
  referralIds.authorizedWitnessList,
7974
7831
  referralIds.referralTiers,
7975
- txBlock.sharedObjectRef({
7976
- objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
7977
- mutable: false,
7978
- initialSharedVersion: "1"
7979
- })
7832
+ clockObjectRef
7980
7833
  ],
7981
7834
  [coinType]
7982
7835
  );
@@ -7990,11 +7843,7 @@ var generateReferralNormalMethod = ({
7990
7843
  referralIds.version,
7991
7844
  ticket,
7992
7845
  referralIds.referralRevenuePool,
7993
- txBlock.sharedObjectRef({
7994
- objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
7995
- mutable: false,
7996
- initialSharedVersion: "1"
7997
- })
7846
+ clockObjectRef
7998
7847
  ],
7999
7848
  [coinType]
8000
7849
  );
@@ -8008,11 +7857,7 @@ var generateReferralNormalMethod = ({
8008
7857
  referralIds.version,
8009
7858
  referralIds.referralRevenuePool,
8010
7859
  veScaKey,
8011
- txBlock.sharedObjectRef({
8012
- objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
8013
- mutable: false,
8014
- initialSharedVersion: "1"
8015
- })
7860
+ clockObjectRef
8016
7861
  ],
8017
7862
  [coinType]
8018
7863
  );
@@ -8453,6 +8298,16 @@ var ScallopIndexer = class {
8453
8298
  async getCoinPrice(poolCoinName) {
8454
8299
  return (await this.getMarketPool(poolCoinName))?.coinPrice ?? 0;
8455
8300
  }
8301
+ async getCoinPrices() {
8302
+ const marketPools = await this.getMarketPools();
8303
+ return Object.entries(marketPools).reduce(
8304
+ (prev, [coinName, market]) => {
8305
+ prev[coinName] = market.coinPrice;
8306
+ return prev;
8307
+ },
8308
+ {}
8309
+ );
8310
+ }
8456
8311
  };
8457
8312
 
8458
8313
  // src/models/scallopQuery.ts
@@ -8611,8 +8466,8 @@ var ScallopQuery = class {
8611
8466
  * @param obligationId - The obligation id.
8612
8467
  * @return Obligation data.
8613
8468
  */
8614
- async queryObligation(obligationId) {
8615
- return queryObligation(this, obligationId);
8469
+ async queryObligation(obligationId, args) {
8470
+ return queryObligation(this, obligationId, args?.version, args?.market);
8616
8471
  }
8617
8472
  /**
8618
8473
  * Get all asset coin amounts.
@@ -9030,19 +8885,31 @@ var ScallopQuery = class {
9030
8885
  async getCoinPriceByIndexer(poolName) {
9031
8886
  return this.indexer.getCoinPrice(poolName);
9032
8887
  }
8888
+ /**
8889
+ * Get all supported pool price from indexer
8890
+ * @returns prices data
8891
+ */
8892
+ async getCoinPricesByIndexer() {
8893
+ return this.indexer.getCoinPrices();
8894
+ }
9033
8895
  /**
9034
8896
  * Get all coin prices, including sCoin
9035
8897
  * @returns prices data
9036
8898
  */
9037
8899
  async getAllCoinPrices(args) {
9038
- return getAllCoinPrices(this, args?.marketPools, args?.coinPrices);
8900
+ return getAllCoinPrices(
8901
+ this,
8902
+ args?.marketPools,
8903
+ args?.coinPrices,
8904
+ args?.indexer
8905
+ );
9039
8906
  }
9040
8907
  /**
9041
8908
  * Query all address (lending pool, collateral pool, borrow dynamics, interest models, etc.) of all pool
9042
8909
  * @returns
9043
8910
  */
9044
- async getPoolAddresses(pools = [...SUPPORT_POOLS]) {
9045
- return getAllAddresses(this, pools);
8911
+ async getPoolAddresses(poolNames) {
8912
+ return getAllAddresses(this, poolNames);
9046
8913
  }
9047
8914
  /**
9048
8915
  * Get user portfolio
@@ -9054,6 +8921,33 @@ var ScallopQuery = class {
9054
8921
  args?.indexer ?? false
9055
8922
  );
9056
8923
  }
8924
+ /**
8925
+ * Get both primary and secondary price update policy objects
8926
+ * @returns price update policies
8927
+ */
8928
+ async getPriceUpdatePolicies() {
8929
+ return await getPriceUpdatePolicies(this.address);
8930
+ }
8931
+ /**
8932
+ * Return the supported primary and secondary oracles for all supported pool assets
8933
+ * @returns
8934
+ */
8935
+ async getAssetOracles() {
8936
+ const [primary, secondary] = await Promise.all([
8937
+ getAssetOracles(this.utils, "primary"),
8938
+ getAssetOracles(this.utils, "secondary")
8939
+ ]);
8940
+ return SUPPORT_POOLS.reduce(
8941
+ (acc, pool) => {
8942
+ acc[pool] = {
8943
+ primary: primary[pool] ?? [],
8944
+ secondary: secondary[pool] ?? []
8945
+ };
8946
+ return acc;
8947
+ },
8948
+ {}
8949
+ );
8950
+ }
9057
8951
  };
9058
8952
 
9059
8953
  // src/models/scallopBuilder.ts
@@ -10066,6 +9960,7 @@ var Scallop = class {
10066
9960
  stakeMarketCoins,
10067
9961
  suiBridgeCoins,
10068
9962
  voloCoinIds,
10069
- wormholeCoinIds
9963
+ wormholeCoinIds,
9964
+ xOracleList
10070
9965
  });
10071
9966
  //# sourceMappingURL=index.js.map