@scallop-io/sui-scallop-sdk 1.4.15-rc.2 → 1.4.15-rc.3

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.
@@ -13,4 +13,5 @@ export declare const POOL_ADDRESSES: OptionalKeys<Record<SupportPoolCoins, {
13
13
  supplyLimitKey?: string;
14
14
  borrowLimitKey?: string;
15
15
  isolatedAssetKey?: string;
16
+ coinDecimalId?: string;
16
17
  }>>;
package/dist/index.js CHANGED
@@ -422,6 +422,21 @@ var FlashLoanFeeObjectMap = {
422
422
 
423
423
  // src/constants/poolAddress.ts
424
424
  var POOL_ADDRESSES = {
425
+ usdc: {
426
+ lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
427
+ collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
428
+ borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
429
+ interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
430
+ riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
431
+ borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
432
+ supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
433
+ borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
434
+ isolatedAssetKey: void 0,
435
+ spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
436
+ spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
437
+ sCoinTreasury: "0xbe6b63021f3d82e0e7e977cdd718ed7c019cf2eba374b7b546220402452f938e",
438
+ coinDecimalId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6"
439
+ },
425
440
  sbeth: {
426
441
  lendingPoolAddress: "0xaa34c938e0394e5186c7dc626ad69be96af2194b23fdc6ac1c63090e399f5ba4",
427
442
  collateralPoolAddress: "0xce0549a1cbe952e734f56646988e6b02bbae14667889a60e24d0d03540a6119f",
@@ -433,20 +448,24 @@ var POOL_ADDRESSES = {
433
448
  borrowLimitKey: "0x165c274c67eda2b0d13563124741fffd0ce7d643f4c1c4b59d7e53a83796ae25",
434
449
  isolatedAssetKey: void 0,
435
450
  spool: void 0,
436
- spoolReward: void 0
451
+ spoolReward: void 0,
452
+ sCoinTreasury: "0xfd0f02def6358a1f266acfa1493d4707ee8387460d434fb667d63d755ff907ed",
453
+ coinDecimalId: "0x89b04ba87f8832d4d76e17a1c9dce72eb3e64d372cf02012b8d2de5384faeef0"
437
454
  },
438
- usdc: {
439
- lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
440
- collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
441
- borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
442
- interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
443
- riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
444
- borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
445
- supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
446
- borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
455
+ weth: {
456
+ lendingPoolAddress: "0xc8fcdff48efc265740ae0b74aae3faccae9ec00034039a113f3339798035108c",
457
+ collateralPoolAddress: "0xad7ced91ed6e7f2b81805561eee27fa6f3e72fdae561077334c7248583db4dbf",
458
+ borrowDynamic: "0xd1578e1d1c9c82eb4c5bf14beece8142a67a683b2647d7276e92984119fc1445",
459
+ interestModel: "0xa1dc08541cd2cb7cfb4e56272292d5c6a4780e80fd210c58abffae98268b5ed9",
460
+ riskModel: "0x9f05a25fd33a9e8cf33962126b175d038e184f0ee1b87dc41d4cedbe6abebbe5",
461
+ borrowFeeKey: "0x29672ba8ab4625b8181d8ed739e5344de22a97d417748c4d1276c7379283d7a3",
462
+ supplyLimitKey: "0x2b957941bdc9432bbc83ab74dc194b6ebb7c927bc4c6926a5492b5503499e509",
463
+ borrowLimitKey: "0x51f256d87e51a7ca2b1c482923096f4b6dac6beac89d8ecf4c65b7d5764115d6",
447
464
  isolatedAssetKey: void 0,
448
- spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
449
- spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166"
465
+ spool: "0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787",
466
+ spoolReward: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077",
467
+ sCoinTreasury: "0x4b7f5da0e306c9d52490a0c1d4091e653d6b89778b9b4f23c877e534e4d9cd21",
468
+ coinDecimalId: "0x8900e4ceede3363bef086d6b50ca89d816d0e90bf6bc46efefe1f8455e08f50f"
450
469
  },
451
470
  wbtc: {
452
471
  lendingPoolAddress: "0x65cc08a5aca0a0b8d72e1993ded8d145f06dd102fd0d8f285b92934faed564ab",
@@ -459,7 +478,9 @@ var POOL_ADDRESSES = {
459
478
  borrowLimitKey: "0x231e13ba6b1eb26c562f4a125778d3152f9a77e31f124bd6012e234a73012169",
460
479
  isolatedAssetKey: void 0,
461
480
  spool: void 0,
462
- spoolReward: void 0
481
+ spoolReward: void 0,
482
+ sCoinTreasury: "0xe2883934ea42c99bc998bbe0f01dd6d27aa0e27a56455707b1b34e6a41c20baa",
483
+ coinDecimalId: "0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd"
463
484
  },
464
485
  wusdc: {
465
486
  lendingPoolAddress: "0x2f4df5e1368fbbdaa5c712d28b837b3d41c2d3872979ccededcdfdac55ff8a93",
@@ -472,20 +493,9 @@ var POOL_ADDRESSES = {
472
493
  borrowLimitKey: "0x97f1502ce994db0bcb15aac1760d174def9e88e97cd2262eed54521ee2c19f81",
473
494
  isolatedAssetKey: void 0,
474
495
  spool: "0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0",
475
- spoolReward: "0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8"
476
- },
477
- weth: {
478
- lendingPoolAddress: "0xc8fcdff48efc265740ae0b74aae3faccae9ec00034039a113f3339798035108c",
479
- collateralPoolAddress: "0xad7ced91ed6e7f2b81805561eee27fa6f3e72fdae561077334c7248583db4dbf",
480
- borrowDynamic: "0xd1578e1d1c9c82eb4c5bf14beece8142a67a683b2647d7276e92984119fc1445",
481
- interestModel: "0xa1dc08541cd2cb7cfb4e56272292d5c6a4780e80fd210c58abffae98268b5ed9",
482
- riskModel: "0x9f05a25fd33a9e8cf33962126b175d038e184f0ee1b87dc41d4cedbe6abebbe5",
483
- borrowFeeKey: "0x29672ba8ab4625b8181d8ed739e5344de22a97d417748c4d1276c7379283d7a3",
484
- supplyLimitKey: "0x2b957941bdc9432bbc83ab74dc194b6ebb7c927bc4c6926a5492b5503499e509",
485
- borrowLimitKey: "0x51f256d87e51a7ca2b1c482923096f4b6dac6beac89d8ecf4c65b7d5764115d6",
486
- isolatedAssetKey: void 0,
487
- spool: "0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787",
488
- spoolReward: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077"
496
+ spoolReward: "0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8",
497
+ sCoinTreasury: "0x50c5cfcbcca3aaacab0984e4d7ad9a6ad034265bebb440f0d1cd688ec20b2548",
498
+ coinDecimalId: "0x4fbf84f3029bd0c0b77164b587963be957f853eccf834a67bb9ecba6ec80f189"
489
499
  },
490
500
  wusdt: {
491
501
  lendingPoolAddress: "0xfbc056f126dd35adc1f8fe985e2cedc8010e687e8e851e1c5b99fdf63cd1c879",
@@ -498,7 +508,9 @@ var POOL_ADDRESSES = {
498
508
  borrowLimitKey: "0xa3278564fc613680a69c10972a0299965bf6e12e9ac171388842fc958de0f90e",
499
509
  isolatedAssetKey: void 0,
500
510
  spool: "0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f",
501
- spoolReward: "0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080"
511
+ spoolReward: "0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080",
512
+ sCoinTreasury: "0x1f02e2fed702b477732d4ad6044aaed04f2e8e586a169153694861a901379df0",
513
+ coinDecimalId: "0xfb0e3eb97dd158a5ae979dddfa24348063843c5b20eb8381dd5fa7c93699e45c"
502
514
  },
503
515
  sui: {
504
516
  lendingPoolAddress: "0x9c9077abf7a29eebce41e33addbcd6f5246a5221dd733e56ea0f00ae1b25c9e8",
@@ -511,7 +523,9 @@ var POOL_ADDRESSES = {
511
523
  borrowLimitKey: "0x2b33a7efdcf6a6df24f4d8a356dd52f58d75bc023c3f171d99502d4d008b53f0",
512
524
  isolatedAssetKey: void 0,
513
525
  spool: "0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4",
514
- spoolReward: "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9"
526
+ spoolReward: "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9",
527
+ sCoinTreasury: "0x5c1678c8261ac9eec024d4d630006a9f55c80dc0b1aa38a003fcb1d425818c6b",
528
+ coinDecimalId: "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3"
515
529
  },
516
530
  wapt: {
517
531
  lendingPoolAddress: "0xca8c14a24e0c32b198eaf479a3317461e3cc339097ce88eaf296a15df8dcfdf5",
@@ -524,20 +538,9 @@ var POOL_ADDRESSES = {
524
538
  borrowLimitKey: void 0,
525
539
  isolatedAssetKey: void 0,
526
540
  spool: void 0,
527
- spoolReward: void 0
528
- },
529
- afsui: {
530
- lendingPoolAddress: "0x9b942a24ce390b7f5016d34a0217057bf9487b92aa6d7cc9894271dbbe62471a",
531
- collateralPoolAddress: "0xe5e56f5c0e3072760b21f9d49a5cc793f37d736c412a9065c16e1265c74e6341",
532
- borrowDynamic: "0x1c76d4df9506154a117bbac0f5e005d8a9c0d9ca60e3fe0c9d080006f6f54e81",
533
- interestModel: "0xb155c536b37c9601baaa734ad1dd0ef335b2b597aceb8d3ecee41a43f94dcd70",
534
- riskModel: "0x75371b1d04b5bebc0738af548ba64ea658e74f78228ec8014336d8eebb992312",
535
- borrowFeeKey: "0xabc6422db2d4ee01635ddaeaa44ba68370eebd785d2c4632515f841ae9bc47d9",
536
- supplyLimitKey: "0x61a2054eb37f543c0d774da57f2c9542aad8d79a197f748ac08ef5df6cc47028",
537
- borrowLimitKey: "0x4459498a043872cd107ea917493fee0baf2d37a273c7538e1d6581cc61b92af8",
538
- isolatedAssetKey: void 0,
539
- spool: "0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800",
540
- spoolReward: "0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e"
541
+ spoolReward: void 0,
542
+ sCoinTreasury: void 0,
543
+ coinDecimalId: "0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8"
541
544
  },
542
545
  wsol: {
543
546
  lendingPoolAddress: "0x985682c42984cdfb03f9ff7d8923344c2fe096b1ae4b82ea17721af19d22a21f",
@@ -550,7 +553,9 @@ var POOL_ADDRESSES = {
550
553
  borrowLimitKey: "0x77d453c51948f32564c810bc73f9ba7abde880657b7f89e1c8a3bc28fa36ee87",
551
554
  isolatedAssetKey: void 0,
552
555
  spool: void 0,
553
- spoolReward: void 0
556
+ spoolReward: void 0,
557
+ sCoinTreasury: "0x760fd66f5be869af4382fa32b812b3c67f0eca1bb1ed7a5578b21d56e1848819",
558
+ coinDecimalId: "0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e"
554
559
  },
555
560
  cetus: {
556
561
  lendingPoolAddress: "0xc09858f60e74a1b671635bec4e8a2c84a0ff313eb87f525fba3258e88c6b6282",
@@ -563,7 +568,24 @@ var POOL_ADDRESSES = {
563
568
  borrowLimitKey: "0xf44218a5f0feb128e6fbe74b91d1e7e9ef859bd23a576ff0de151829e015a157",
564
569
  isolatedAssetKey: void 0,
565
570
  spool: "0xac1bb13bf4472a637c18c2415fb0e3c1227ea2bcf35242e50563c98215bd298e",
566
- spoolReward: "0x6835c1224126a45086fc6406adc249e3f30df18d779ca4f4e570e38716a17f3f"
571
+ spoolReward: "0x6835c1224126a45086fc6406adc249e3f30df18d779ca4f4e570e38716a17f3f",
572
+ sCoinTreasury: "0xa283c63488773c916cb3d6c64109536160d5eb496caddc721eb39aad2977d735",
573
+ coinDecimalId: "0x4c0dce55eff2db5419bbd2d239d1aa22b4a400c01bbb648b058a9883989025da"
574
+ },
575
+ afsui: {
576
+ lendingPoolAddress: "0x9b942a24ce390b7f5016d34a0217057bf9487b92aa6d7cc9894271dbbe62471a",
577
+ collateralPoolAddress: "0xe5e56f5c0e3072760b21f9d49a5cc793f37d736c412a9065c16e1265c74e6341",
578
+ borrowDynamic: "0x1c76d4df9506154a117bbac0f5e005d8a9c0d9ca60e3fe0c9d080006f6f54e81",
579
+ interestModel: "0xb155c536b37c9601baaa734ad1dd0ef335b2b597aceb8d3ecee41a43f94dcd70",
580
+ riskModel: "0x75371b1d04b5bebc0738af548ba64ea658e74f78228ec8014336d8eebb992312",
581
+ borrowFeeKey: "0xabc6422db2d4ee01635ddaeaa44ba68370eebd785d2c4632515f841ae9bc47d9",
582
+ supplyLimitKey: "0x61a2054eb37f543c0d774da57f2c9542aad8d79a197f748ac08ef5df6cc47028",
583
+ borrowLimitKey: "0x4459498a043872cd107ea917493fee0baf2d37a273c7538e1d6581cc61b92af8",
584
+ isolatedAssetKey: void 0,
585
+ spool: "0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800",
586
+ spoolReward: "0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e",
587
+ sCoinTreasury: "0x55f4dfe9e40bc4cc11c70fcb1f3daefa2bdc330567c58d4f0792fbd9f9175a62",
588
+ coinDecimalId: "0x2f9217f533e51334873a39b8026a4aa6919497b47f49d0986a4f1aec66f8a34d"
567
589
  },
568
590
  hasui: {
569
591
  lendingPoolAddress: "0x7ebc607f6bdeb659fb6506cb91c5cc1d47bb365cfd5d2e637ea765346ec84ed4",
@@ -576,7 +598,9 @@ var POOL_ADDRESSES = {
576
598
  borrowLimitKey: "0x65333e606eead786a999c8267bc9886b0fdbc298a8a8635a48a9c9b8838d9395",
577
599
  isolatedAssetKey: void 0,
578
600
  spool: "0xa6148bc1b623e936d39a952ceb5bea79e8b37228a8f595067bf1852efd3c34aa",
579
- spoolReward: "0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66"
601
+ spoolReward: "0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66",
602
+ sCoinTreasury: "0x404ccc1404d74a90eb6f9c9d4b6cda6d417fb03189f80d9070a35e5dab1df0f5",
603
+ coinDecimalId: "0x2c5f33af93f6511df699aaaa5822d823aac6ed99d4a0de2a4a50b3afa0172e24"
580
604
  },
581
605
  vsui: {
582
606
  lendingPoolAddress: "0xda9257c0731d8822e8a438ebced13415850d705b779c79958dcf2aeb21fcb43d",
@@ -589,7 +613,9 @@ var POOL_ADDRESSES = {
589
613
  borrowLimitKey: "0x4eb206b4417642cfc1b02f80bb5f5e366af2af2f9fb4ea4f4e898ae82367f8a0",
590
614
  isolatedAssetKey: void 0,
591
615
  spool: "0x69ce8e537e750a95381e6040794afa5ab1758353a1a2e1de7760391b01f91670",
592
- spoolReward: "0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a"
616
+ spoolReward: "0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a",
617
+ sCoinTreasury: "0xc06688ee1af25abc286ffb1d18ce273d1d5907cd1064c25f4e8ca61ea989c1d1",
618
+ coinDecimalId: "0xabd84a23467b33854ab25cf862006fd97479f8f6f53e50fe732c43a274d939bd"
593
619
  },
594
620
  sca: {
595
621
  lendingPoolAddress: "0x6fc7d4211fc7018b6c75e7b908b88f2e0536443239804a3d32af547637bd28d7",
@@ -602,20 +628,9 @@ var POOL_ADDRESSES = {
602
628
  borrowLimitKey: "0x04c7de61c5b42972f9bf6a8b1848e5fea2d037ee8deba81741ecd4a70aa80d30",
603
629
  isolatedAssetKey: void 0,
604
630
  spool: void 0,
605
- spoolReward: void 0
606
- },
607
- deep: {
608
- lendingPoolAddress: "0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03",
609
- collateralPoolAddress: void 0,
610
- borrowDynamic: "0x95e00d7466f97a100e70f08bd37788dc49335796f6f49fab996d40dd0681c6d3",
611
- interestModel: "0x4143c298506a332d92ea8a995e6f3991ee3215f58f6fc6441752835d275b9a69",
612
- riskModel: void 0,
613
- borrowFeeKey: "0xb14ee43f4ad2a2c40bac8c4406a401690e93c982e289cf3802fedf74a159cab2",
614
- supplyLimitKey: "0x599528fdfdc253e90dfd0acf4f4a166b391e2aac1ca6528abbff63225b548fee",
615
- borrowLimitKey: "0xf4217e8ef9d9c32e8992092e910a77535a8124c19b8a762a673f227f5f765a4e",
616
- isolatedAssetKey: "0x208d3a24ba369dcfc8f0387333d1512b98199eb150d2f2a69359ff708cf761e3",
617
- spool: void 0,
618
- spoolReward: void 0
631
+ spoolReward: void 0,
632
+ sCoinTreasury: "0xe04bfc95e00252bd654ee13c08edef9ac5e4b6ae4074e8390db39e9a0109c529",
633
+ coinDecimalId: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844"
619
634
  },
620
635
  fud: {
621
636
  lendingPoolAddress: "0xefed2cbe76b344792ac724523c8b2236740d1cea2100d46a0ed0dc760c7f4231",
@@ -628,7 +643,24 @@ var POOL_ADDRESSES = {
628
643
  borrowLimitKey: "0x3d928a001c453c50004baa54e14b0a0e1b0907d9c613dfd76064fd7ed4e8beb8",
629
644
  isolatedAssetKey: "0xfcb533e9e4e31f9c9f32d6cbf7fbb3425f1d60474e229a363a2dc7f835d587e2",
630
645
  spool: void 0,
631
- spoolReward: void 0
646
+ spoolReward: void 0,
647
+ sCoinTreasury: "0xf25212f11d182decff7a86165699a73e3d5787aced203ca539f43cfbc10db867",
648
+ coinDecimalId: "0x01087411ef48aaac1eb6e24803213e3a60a03b147dac930e5e341f17a85e524e"
649
+ },
650
+ deep: {
651
+ lendingPoolAddress: "0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03",
652
+ collateralPoolAddress: void 0,
653
+ borrowDynamic: "0x95e00d7466f97a100e70f08bd37788dc49335796f6f49fab996d40dd0681c6d3",
654
+ interestModel: "0x4143c298506a332d92ea8a995e6f3991ee3215f58f6fc6441752835d275b9a69",
655
+ riskModel: void 0,
656
+ borrowFeeKey: "0xb14ee43f4ad2a2c40bac8c4406a401690e93c982e289cf3802fedf74a159cab2",
657
+ supplyLimitKey: "0x599528fdfdc253e90dfd0acf4f4a166b391e2aac1ca6528abbff63225b548fee",
658
+ borrowLimitKey: "0xf4217e8ef9d9c32e8992092e910a77535a8124c19b8a762a673f227f5f765a4e",
659
+ isolatedAssetKey: "0x208d3a24ba369dcfc8f0387333d1512b98199eb150d2f2a69359ff708cf761e3",
660
+ spool: void 0,
661
+ spoolReward: void 0,
662
+ sCoinTreasury: "0xc63838fabe37b25ad897392d89876d920f5e0c6a406bf3abcb84753d2829bc88",
663
+ coinDecimalId: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0"
632
664
  }
633
665
  };
634
666
 
@@ -2047,10 +2079,33 @@ var ScallopCache = class {
2047
2079
  retryDelay: 1e3,
2048
2080
  queryKey: queryKeys.rpc.getOwnedObjects(input),
2049
2081
  queryFn: async () => {
2050
- return await callWithRateLimit(
2082
+ const results = await callWithRateLimit(
2051
2083
  this.tokenBucket,
2052
2084
  async () => await this.client.getOwnedObjects(input)
2053
2085
  );
2086
+ if (results && results.data.length > 0) {
2087
+ results.data.filter(
2088
+ (result) => !!result.data
2089
+ ).forEach((result) => {
2090
+ this.queryClient.setQueriesData(
2091
+ {
2092
+ exact: false,
2093
+ queryKey: queryKeys.rpc.getObject(
2094
+ result.data.objectId,
2095
+ input.options ?? {}
2096
+ )
2097
+ },
2098
+ {
2099
+ data: result.data,
2100
+ error: null
2101
+ },
2102
+ {
2103
+ updatedAt: Date.now()
2104
+ }
2105
+ );
2106
+ });
2107
+ }
2108
+ return results;
2054
2109
  }
2055
2110
  });
2056
2111
  }
@@ -2073,10 +2128,29 @@ var ScallopCache = class {
2073
2128
  retryDelay: (attemptIndex) => Math.min(1e3 * attemptIndex, 8e3),
2074
2129
  queryKey: queryKeys.rpc.getDynamicFieldObject(input),
2075
2130
  queryFn: async () => {
2076
- return await callWithRateLimit(
2131
+ const result = await callWithRateLimit(
2077
2132
  this.tokenBucket,
2078
2133
  () => this.client.getDynamicFieldObject(input)
2079
2134
  );
2135
+ if (result?.data) {
2136
+ this.queryClient.setQueriesData(
2137
+ {
2138
+ exact: false,
2139
+ queryKey: queryKeys.rpc.getObject(result?.data.objectId, {
2140
+ showContent: true,
2141
+ showOwner: true
2142
+ })
2143
+ },
2144
+ {
2145
+ data: result.data,
2146
+ error: null
2147
+ },
2148
+ {
2149
+ updatedAt: Date.now()
2150
+ }
2151
+ );
2152
+ }
2153
+ return result;
2080
2154
  }
2081
2155
  });
2082
2156
  }
@@ -3714,14 +3788,26 @@ var getObligations = async ({
3714
3788
  } while (hasNextPage);
3715
3789
  const keyObjects = keyObjectsResponse.filter((ref) => !!ref.data);
3716
3790
  const obligations = [];
3791
+ const obligationsObjects = await queryMultipleObjects(
3792
+ address.cache,
3793
+ keyObjects.map((ref) => ref.data?.content).filter(
3794
+ (content) => content?.dataType === "moveObject"
3795
+ ).map((content) => content.fields.ownership.fields.of),
3796
+ {
3797
+ showContent: true
3798
+ }
3799
+ );
3717
3800
  await Promise.allSettled(
3718
- keyObjects.map(async ({ data }) => {
3801
+ keyObjects.map(async ({ data }, idx) => {
3719
3802
  const keyId = data?.objectId;
3720
3803
  const content = data?.content;
3721
3804
  if (keyId && content && "fields" in content) {
3722
3805
  const fields = content.fields;
3723
3806
  const obligationId = String(fields.ownership.fields.of);
3724
- const locked = await getObligationLocked(address.cache, obligationId);
3807
+ const locked = await getObligationLocked(
3808
+ address.cache,
3809
+ obligationsObjects[idx]
3810
+ );
3725
3811
  obligations.push({ id: obligationId, keyId, locked });
3726
3812
  }
3727
3813
  })
@@ -3729,14 +3815,12 @@ var getObligations = async ({
3729
3815
  return obligations;
3730
3816
  };
3731
3817
  var getObligationLocked = async (cache, obligation) => {
3732
- const obligationObjectResponse = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
3818
+ const obligationObjectData = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
3733
3819
  showContent: true
3734
3820
  }))?.data : obligation;
3735
3821
  let obligationLocked = false;
3736
- if (obligationObjectResponse && obligationObjectResponse?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.content.fields) {
3737
- obligationLocked = Boolean(
3738
- obligationObjectResponse.content.fields.lock_key
3739
- );
3822
+ if (obligationObjectData && obligationObjectData?.content?.dataType === "moveObject" && "lock_key" in obligationObjectData.content.fields) {
3823
+ obligationLocked = Boolean(obligationObjectData.content.fields.lock_key);
3740
3824
  }
3741
3825
  return obligationLocked;
3742
3826
  };
@@ -4121,7 +4205,7 @@ var getObligationAccount = async (query, obligationId, ownerAddress, indexer = f
4121
4205
  ];
4122
4206
  market = market ?? await query.getMarketPools(void 0, { indexer });
4123
4207
  coinPrices = coinPrices ?? await query.getAllCoinPrices({ marketPools: market.pools });
4124
- coinAmounts = coinAmounts || await query.getCoinAmounts(coinNames, ownerAddress);
4208
+ coinAmounts = coinAmounts ?? await query.getCoinAmounts(coinNames, ownerAddress);
4125
4209
  const [obligationQuery, borrowIncentivePools, borrowIncentiveAccounts] = await Promise.all([
4126
4210
  query.queryObligation(obligationId),
4127
4211
  query.getBorrowIncentivePools(void 0, {
@@ -5256,6 +5340,9 @@ var getAllAddresses = async (query) => {
5256
5340
  // @ts-ignore
5257
5341
  `scoin.coins.s${coinName}.treasury`
5258
5342
  );
5343
+ const coinDecimalId = query.address.get(
5344
+ `core.coins.${coinName}.metaData`
5345
+ );
5259
5346
  results[coinName] = {
5260
5347
  lendingPoolAddress: addresses[0],
5261
5348
  collateralPoolAddress: addresses[1],
@@ -5268,7 +5355,8 @@ var getAllAddresses = async (query) => {
5268
5355
  isolatedAssetKey: addresses[8],
5269
5356
  spool,
5270
5357
  spoolReward: rewardPool,
5271
- sCoinTreasury
5358
+ sCoinTreasury,
5359
+ coinDecimalId
5272
5360
  };
5273
5361
  await new Promise((resolve) => setTimeout(resolve, 200));
5274
5362
  })
@@ -6044,7 +6132,7 @@ var generateCoreNormalMethod = ({
6044
6132
  coreIds.market,
6045
6133
  coreIds.coinDecimalsRegistry,
6046
6134
  borrowReferral,
6047
- txBlock.pure.u64(amount),
6135
+ typeof amount === "number" ? txBlock.pure.u64(amount) : amount,
6048
6136
  coreIds.xOracle,
6049
6137
  import_utils14.SUI_CLOCK_OBJECT_ID
6050
6138
  ],
@@ -7945,11 +8033,9 @@ var ScallopQuery = class {
7945
8033
  * @return Borrowing and collateral information.
7946
8034
  */
7947
8035
  async getObligationAccount(obligationId, ownerAddress = this.walletAddress, args) {
7948
- return await getObligationAccount(
7949
- this,
7950
- obligationId,
7951
- ownerAddress,
7952
- args?.indexer
8036
+ const results = await this.getObligationAccounts(ownerAddress, args);
8037
+ return Object.values(results).find(
8038
+ (obligation) => obligation?.obligationId === obligationId
7953
8039
  );
7954
8040
  }
7955
8041
  /**
@@ -8778,6 +8864,8 @@ var ScallopClient = class {
8778
8864
  txBlock.setSender(sender);
8779
8865
  const rewardCoinsCollection = {};
8780
8866
  const obligationAccount = await this.query.getObligationAccount(obligationId);
8867
+ if (!obligationAccount)
8868
+ throw new Error("Obligation not found");
8781
8869
  const rewardCoinNames = Object.values(obligationAccount.borrowIncentives).flatMap(
8782
8870
  ({ rewards }) => rewards.filter(({ availableClaimAmount }) => availableClaimAmount > 0)
8783
8871
  ).flatMap(({ coinName }) => coinName);