@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.
package/dist/index.mjs CHANGED
@@ -328,6 +328,21 @@ var FlashLoanFeeObjectMap = {
328
328
 
329
329
  // src/constants/poolAddress.ts
330
330
  var POOL_ADDRESSES = {
331
+ usdc: {
332
+ lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
333
+ collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
334
+ borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
335
+ interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
336
+ riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
337
+ borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
338
+ supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
339
+ borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
340
+ isolatedAssetKey: void 0,
341
+ spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
342
+ spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
343
+ sCoinTreasury: "0xbe6b63021f3d82e0e7e977cdd718ed7c019cf2eba374b7b546220402452f938e",
344
+ coinDecimalId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6"
345
+ },
331
346
  sbeth: {
332
347
  lendingPoolAddress: "0xaa34c938e0394e5186c7dc626ad69be96af2194b23fdc6ac1c63090e399f5ba4",
333
348
  collateralPoolAddress: "0xce0549a1cbe952e734f56646988e6b02bbae14667889a60e24d0d03540a6119f",
@@ -339,20 +354,24 @@ var POOL_ADDRESSES = {
339
354
  borrowLimitKey: "0x165c274c67eda2b0d13563124741fffd0ce7d643f4c1c4b59d7e53a83796ae25",
340
355
  isolatedAssetKey: void 0,
341
356
  spool: void 0,
342
- spoolReward: void 0
357
+ spoolReward: void 0,
358
+ sCoinTreasury: "0xfd0f02def6358a1f266acfa1493d4707ee8387460d434fb667d63d755ff907ed",
359
+ coinDecimalId: "0x89b04ba87f8832d4d76e17a1c9dce72eb3e64d372cf02012b8d2de5384faeef0"
343
360
  },
344
- usdc: {
345
- lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
346
- collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
347
- borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
348
- interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
349
- riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
350
- borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
351
- supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
352
- borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
361
+ weth: {
362
+ lendingPoolAddress: "0xc8fcdff48efc265740ae0b74aae3faccae9ec00034039a113f3339798035108c",
363
+ collateralPoolAddress: "0xad7ced91ed6e7f2b81805561eee27fa6f3e72fdae561077334c7248583db4dbf",
364
+ borrowDynamic: "0xd1578e1d1c9c82eb4c5bf14beece8142a67a683b2647d7276e92984119fc1445",
365
+ interestModel: "0xa1dc08541cd2cb7cfb4e56272292d5c6a4780e80fd210c58abffae98268b5ed9",
366
+ riskModel: "0x9f05a25fd33a9e8cf33962126b175d038e184f0ee1b87dc41d4cedbe6abebbe5",
367
+ borrowFeeKey: "0x29672ba8ab4625b8181d8ed739e5344de22a97d417748c4d1276c7379283d7a3",
368
+ supplyLimitKey: "0x2b957941bdc9432bbc83ab74dc194b6ebb7c927bc4c6926a5492b5503499e509",
369
+ borrowLimitKey: "0x51f256d87e51a7ca2b1c482923096f4b6dac6beac89d8ecf4c65b7d5764115d6",
353
370
  isolatedAssetKey: void 0,
354
- spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
355
- spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166"
371
+ spool: "0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787",
372
+ spoolReward: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077",
373
+ sCoinTreasury: "0x4b7f5da0e306c9d52490a0c1d4091e653d6b89778b9b4f23c877e534e4d9cd21",
374
+ coinDecimalId: "0x8900e4ceede3363bef086d6b50ca89d816d0e90bf6bc46efefe1f8455e08f50f"
356
375
  },
357
376
  wbtc: {
358
377
  lendingPoolAddress: "0x65cc08a5aca0a0b8d72e1993ded8d145f06dd102fd0d8f285b92934faed564ab",
@@ -365,7 +384,9 @@ var POOL_ADDRESSES = {
365
384
  borrowLimitKey: "0x231e13ba6b1eb26c562f4a125778d3152f9a77e31f124bd6012e234a73012169",
366
385
  isolatedAssetKey: void 0,
367
386
  spool: void 0,
368
- spoolReward: void 0
387
+ spoolReward: void 0,
388
+ sCoinTreasury: "0xe2883934ea42c99bc998bbe0f01dd6d27aa0e27a56455707b1b34e6a41c20baa",
389
+ coinDecimalId: "0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd"
369
390
  },
370
391
  wusdc: {
371
392
  lendingPoolAddress: "0x2f4df5e1368fbbdaa5c712d28b837b3d41c2d3872979ccededcdfdac55ff8a93",
@@ -378,20 +399,9 @@ var POOL_ADDRESSES = {
378
399
  borrowLimitKey: "0x97f1502ce994db0bcb15aac1760d174def9e88e97cd2262eed54521ee2c19f81",
379
400
  isolatedAssetKey: void 0,
380
401
  spool: "0x4ace6648ddc64e646ba47a957c562c32c9599b3bba8f5ac1aadb2ae23a2f8ca0",
381
- spoolReward: "0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8"
382
- },
383
- weth: {
384
- lendingPoolAddress: "0xc8fcdff48efc265740ae0b74aae3faccae9ec00034039a113f3339798035108c",
385
- collateralPoolAddress: "0xad7ced91ed6e7f2b81805561eee27fa6f3e72fdae561077334c7248583db4dbf",
386
- borrowDynamic: "0xd1578e1d1c9c82eb4c5bf14beece8142a67a683b2647d7276e92984119fc1445",
387
- interestModel: "0xa1dc08541cd2cb7cfb4e56272292d5c6a4780e80fd210c58abffae98268b5ed9",
388
- riskModel: "0x9f05a25fd33a9e8cf33962126b175d038e184f0ee1b87dc41d4cedbe6abebbe5",
389
- borrowFeeKey: "0x29672ba8ab4625b8181d8ed739e5344de22a97d417748c4d1276c7379283d7a3",
390
- supplyLimitKey: "0x2b957941bdc9432bbc83ab74dc194b6ebb7c927bc4c6926a5492b5503499e509",
391
- borrowLimitKey: "0x51f256d87e51a7ca2b1c482923096f4b6dac6beac89d8ecf4c65b7d5764115d6",
392
- isolatedAssetKey: void 0,
393
- spool: "0xeec40beccb07c575bebd842eeaabb835f77cd3dab73add433477e57f583a6787",
394
- spoolReward: "0x957de68a18d87817de8309b30c1ec269a4d87ae513abbeed86b5619cb9ce1077"
402
+ spoolReward: "0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8",
403
+ sCoinTreasury: "0x50c5cfcbcca3aaacab0984e4d7ad9a6ad034265bebb440f0d1cd688ec20b2548",
404
+ coinDecimalId: "0x4fbf84f3029bd0c0b77164b587963be957f853eccf834a67bb9ecba6ec80f189"
395
405
  },
396
406
  wusdt: {
397
407
  lendingPoolAddress: "0xfbc056f126dd35adc1f8fe985e2cedc8010e687e8e851e1c5b99fdf63cd1c879",
@@ -404,7 +414,9 @@ var POOL_ADDRESSES = {
404
414
  borrowLimitKey: "0xa3278564fc613680a69c10972a0299965bf6e12e9ac171388842fc958de0f90e",
405
415
  isolatedAssetKey: void 0,
406
416
  spool: "0xcb328f7ffa7f9342ed85af3fdb2f22919e1a06dfb2f713c04c73543870d7548f",
407
- spoolReward: "0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080"
417
+ spoolReward: "0x2c9f934d67a5baa586ceec2cc24163a2f049a6af3d5ba36b84d8ac40f25c4080",
418
+ sCoinTreasury: "0x1f02e2fed702b477732d4ad6044aaed04f2e8e586a169153694861a901379df0",
419
+ coinDecimalId: "0xfb0e3eb97dd158a5ae979dddfa24348063843c5b20eb8381dd5fa7c93699e45c"
408
420
  },
409
421
  sui: {
410
422
  lendingPoolAddress: "0x9c9077abf7a29eebce41e33addbcd6f5246a5221dd733e56ea0f00ae1b25c9e8",
@@ -417,7 +429,9 @@ var POOL_ADDRESSES = {
417
429
  borrowLimitKey: "0x2b33a7efdcf6a6df24f4d8a356dd52f58d75bc023c3f171d99502d4d008b53f0",
418
430
  isolatedAssetKey: void 0,
419
431
  spool: "0x4f0ba970d3c11db05c8f40c64a15b6a33322db3702d634ced6536960ab6f3ee4",
420
- spoolReward: "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9"
432
+ spoolReward: "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9",
433
+ sCoinTreasury: "0x5c1678c8261ac9eec024d4d630006a9f55c80dc0b1aa38a003fcb1d425818c6b",
434
+ coinDecimalId: "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3"
421
435
  },
422
436
  wapt: {
423
437
  lendingPoolAddress: "0xca8c14a24e0c32b198eaf479a3317461e3cc339097ce88eaf296a15df8dcfdf5",
@@ -430,20 +444,9 @@ var POOL_ADDRESSES = {
430
444
  borrowLimitKey: void 0,
431
445
  isolatedAssetKey: void 0,
432
446
  spool: void 0,
433
- spoolReward: void 0
434
- },
435
- afsui: {
436
- lendingPoolAddress: "0x9b942a24ce390b7f5016d34a0217057bf9487b92aa6d7cc9894271dbbe62471a",
437
- collateralPoolAddress: "0xe5e56f5c0e3072760b21f9d49a5cc793f37d736c412a9065c16e1265c74e6341",
438
- borrowDynamic: "0x1c76d4df9506154a117bbac0f5e005d8a9c0d9ca60e3fe0c9d080006f6f54e81",
439
- interestModel: "0xb155c536b37c9601baaa734ad1dd0ef335b2b597aceb8d3ecee41a43f94dcd70",
440
- riskModel: "0x75371b1d04b5bebc0738af548ba64ea658e74f78228ec8014336d8eebb992312",
441
- borrowFeeKey: "0xabc6422db2d4ee01635ddaeaa44ba68370eebd785d2c4632515f841ae9bc47d9",
442
- supplyLimitKey: "0x61a2054eb37f543c0d774da57f2c9542aad8d79a197f748ac08ef5df6cc47028",
443
- borrowLimitKey: "0x4459498a043872cd107ea917493fee0baf2d37a273c7538e1d6581cc61b92af8",
444
- isolatedAssetKey: void 0,
445
- spool: "0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800",
446
- spoolReward: "0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e"
447
+ spoolReward: void 0,
448
+ sCoinTreasury: void 0,
449
+ coinDecimalId: "0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8"
447
450
  },
448
451
  wsol: {
449
452
  lendingPoolAddress: "0x985682c42984cdfb03f9ff7d8923344c2fe096b1ae4b82ea17721af19d22a21f",
@@ -456,7 +459,9 @@ var POOL_ADDRESSES = {
456
459
  borrowLimitKey: "0x77d453c51948f32564c810bc73f9ba7abde880657b7f89e1c8a3bc28fa36ee87",
457
460
  isolatedAssetKey: void 0,
458
461
  spool: void 0,
459
- spoolReward: void 0
462
+ spoolReward: void 0,
463
+ sCoinTreasury: "0x760fd66f5be869af4382fa32b812b3c67f0eca1bb1ed7a5578b21d56e1848819",
464
+ coinDecimalId: "0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e"
460
465
  },
461
466
  cetus: {
462
467
  lendingPoolAddress: "0xc09858f60e74a1b671635bec4e8a2c84a0ff313eb87f525fba3258e88c6b6282",
@@ -469,7 +474,24 @@ var POOL_ADDRESSES = {
469
474
  borrowLimitKey: "0xf44218a5f0feb128e6fbe74b91d1e7e9ef859bd23a576ff0de151829e015a157",
470
475
  isolatedAssetKey: void 0,
471
476
  spool: "0xac1bb13bf4472a637c18c2415fb0e3c1227ea2bcf35242e50563c98215bd298e",
472
- spoolReward: "0x6835c1224126a45086fc6406adc249e3f30df18d779ca4f4e570e38716a17f3f"
477
+ spoolReward: "0x6835c1224126a45086fc6406adc249e3f30df18d779ca4f4e570e38716a17f3f",
478
+ sCoinTreasury: "0xa283c63488773c916cb3d6c64109536160d5eb496caddc721eb39aad2977d735",
479
+ coinDecimalId: "0x4c0dce55eff2db5419bbd2d239d1aa22b4a400c01bbb648b058a9883989025da"
480
+ },
481
+ afsui: {
482
+ lendingPoolAddress: "0x9b942a24ce390b7f5016d34a0217057bf9487b92aa6d7cc9894271dbbe62471a",
483
+ collateralPoolAddress: "0xe5e56f5c0e3072760b21f9d49a5cc793f37d736c412a9065c16e1265c74e6341",
484
+ borrowDynamic: "0x1c76d4df9506154a117bbac0f5e005d8a9c0d9ca60e3fe0c9d080006f6f54e81",
485
+ interestModel: "0xb155c536b37c9601baaa734ad1dd0ef335b2b597aceb8d3ecee41a43f94dcd70",
486
+ riskModel: "0x75371b1d04b5bebc0738af548ba64ea658e74f78228ec8014336d8eebb992312",
487
+ borrowFeeKey: "0xabc6422db2d4ee01635ddaeaa44ba68370eebd785d2c4632515f841ae9bc47d9",
488
+ supplyLimitKey: "0x61a2054eb37f543c0d774da57f2c9542aad8d79a197f748ac08ef5df6cc47028",
489
+ borrowLimitKey: "0x4459498a043872cd107ea917493fee0baf2d37a273c7538e1d6581cc61b92af8",
490
+ isolatedAssetKey: void 0,
491
+ spool: "0xeedf438abcaa6ce4d9625ffca110920592d5867e4c5637d84ad9f466c4feb800",
492
+ spoolReward: "0x89255a2f86ed7fbfef35ab8b7be48cc7667015975be2685dd9a55a9a64baf76e",
493
+ sCoinTreasury: "0x55f4dfe9e40bc4cc11c70fcb1f3daefa2bdc330567c58d4f0792fbd9f9175a62",
494
+ coinDecimalId: "0x2f9217f533e51334873a39b8026a4aa6919497b47f49d0986a4f1aec66f8a34d"
473
495
  },
474
496
  hasui: {
475
497
  lendingPoolAddress: "0x7ebc607f6bdeb659fb6506cb91c5cc1d47bb365cfd5d2e637ea765346ec84ed4",
@@ -482,7 +504,9 @@ var POOL_ADDRESSES = {
482
504
  borrowLimitKey: "0x65333e606eead786a999c8267bc9886b0fdbc298a8a8635a48a9c9b8838d9395",
483
505
  isolatedAssetKey: void 0,
484
506
  spool: "0xa6148bc1b623e936d39a952ceb5bea79e8b37228a8f595067bf1852efd3c34aa",
485
- spoolReward: "0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66"
507
+ spoolReward: "0x6f3563644d3e2ef13176dbf9d865bd93479df60ccbe07b7e66db57f6309f5a66",
508
+ sCoinTreasury: "0x404ccc1404d74a90eb6f9c9d4b6cda6d417fb03189f80d9070a35e5dab1df0f5",
509
+ coinDecimalId: "0x2c5f33af93f6511df699aaaa5822d823aac6ed99d4a0de2a4a50b3afa0172e24"
486
510
  },
487
511
  vsui: {
488
512
  lendingPoolAddress: "0xda9257c0731d8822e8a438ebced13415850d705b779c79958dcf2aeb21fcb43d",
@@ -495,7 +519,9 @@ var POOL_ADDRESSES = {
495
519
  borrowLimitKey: "0x4eb206b4417642cfc1b02f80bb5f5e366af2af2f9fb4ea4f4e898ae82367f8a0",
496
520
  isolatedAssetKey: void 0,
497
521
  spool: "0x69ce8e537e750a95381e6040794afa5ab1758353a1a2e1de7760391b01f91670",
498
- spoolReward: "0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a"
522
+ spoolReward: "0xbca914adce058ad0902c7f3cfcd698392a475f00dcfdc3f76001d0370b98777a",
523
+ sCoinTreasury: "0xc06688ee1af25abc286ffb1d18ce273d1d5907cd1064c25f4e8ca61ea989c1d1",
524
+ coinDecimalId: "0xabd84a23467b33854ab25cf862006fd97479f8f6f53e50fe732c43a274d939bd"
499
525
  },
500
526
  sca: {
501
527
  lendingPoolAddress: "0x6fc7d4211fc7018b6c75e7b908b88f2e0536443239804a3d32af547637bd28d7",
@@ -508,20 +534,9 @@ var POOL_ADDRESSES = {
508
534
  borrowLimitKey: "0x04c7de61c5b42972f9bf6a8b1848e5fea2d037ee8deba81741ecd4a70aa80d30",
509
535
  isolatedAssetKey: void 0,
510
536
  spool: void 0,
511
- spoolReward: void 0
512
- },
513
- deep: {
514
- lendingPoolAddress: "0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03",
515
- collateralPoolAddress: void 0,
516
- borrowDynamic: "0x95e00d7466f97a100e70f08bd37788dc49335796f6f49fab996d40dd0681c6d3",
517
- interestModel: "0x4143c298506a332d92ea8a995e6f3991ee3215f58f6fc6441752835d275b9a69",
518
- riskModel: void 0,
519
- borrowFeeKey: "0xb14ee43f4ad2a2c40bac8c4406a401690e93c982e289cf3802fedf74a159cab2",
520
- supplyLimitKey: "0x599528fdfdc253e90dfd0acf4f4a166b391e2aac1ca6528abbff63225b548fee",
521
- borrowLimitKey: "0xf4217e8ef9d9c32e8992092e910a77535a8124c19b8a762a673f227f5f765a4e",
522
- isolatedAssetKey: "0x208d3a24ba369dcfc8f0387333d1512b98199eb150d2f2a69359ff708cf761e3",
523
- spool: void 0,
524
- spoolReward: void 0
537
+ spoolReward: void 0,
538
+ sCoinTreasury: "0xe04bfc95e00252bd654ee13c08edef9ac5e4b6ae4074e8390db39e9a0109c529",
539
+ coinDecimalId: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844"
525
540
  },
526
541
  fud: {
527
542
  lendingPoolAddress: "0xefed2cbe76b344792ac724523c8b2236740d1cea2100d46a0ed0dc760c7f4231",
@@ -534,7 +549,24 @@ var POOL_ADDRESSES = {
534
549
  borrowLimitKey: "0x3d928a001c453c50004baa54e14b0a0e1b0907d9c613dfd76064fd7ed4e8beb8",
535
550
  isolatedAssetKey: "0xfcb533e9e4e31f9c9f32d6cbf7fbb3425f1d60474e229a363a2dc7f835d587e2",
536
551
  spool: void 0,
537
- spoolReward: void 0
552
+ spoolReward: void 0,
553
+ sCoinTreasury: "0xf25212f11d182decff7a86165699a73e3d5787aced203ca539f43cfbc10db867",
554
+ coinDecimalId: "0x01087411ef48aaac1eb6e24803213e3a60a03b147dac930e5e341f17a85e524e"
555
+ },
556
+ deep: {
557
+ lendingPoolAddress: "0xf4a67ffb43da1e1c61c049f188f19463ea8dbbf2d5ef4722d6df854ff1b1cc03",
558
+ collateralPoolAddress: void 0,
559
+ borrowDynamic: "0x95e00d7466f97a100e70f08bd37788dc49335796f6f49fab996d40dd0681c6d3",
560
+ interestModel: "0x4143c298506a332d92ea8a995e6f3991ee3215f58f6fc6441752835d275b9a69",
561
+ riskModel: void 0,
562
+ borrowFeeKey: "0xb14ee43f4ad2a2c40bac8c4406a401690e93c982e289cf3802fedf74a159cab2",
563
+ supplyLimitKey: "0x599528fdfdc253e90dfd0acf4f4a166b391e2aac1ca6528abbff63225b548fee",
564
+ borrowLimitKey: "0xf4217e8ef9d9c32e8992092e910a77535a8124c19b8a762a673f227f5f765a4e",
565
+ isolatedAssetKey: "0x208d3a24ba369dcfc8f0387333d1512b98199eb150d2f2a69359ff708cf761e3",
566
+ spool: void 0,
567
+ spoolReward: void 0,
568
+ sCoinTreasury: "0xc63838fabe37b25ad897392d89876d920f5e0c6a406bf3abcb84753d2829bc88",
569
+ coinDecimalId: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0"
538
570
  }
539
571
  };
540
572
 
@@ -1956,10 +1988,33 @@ var ScallopCache = class {
1956
1988
  retryDelay: 1e3,
1957
1989
  queryKey: queryKeys.rpc.getOwnedObjects(input),
1958
1990
  queryFn: async () => {
1959
- return await callWithRateLimit(
1991
+ const results = await callWithRateLimit(
1960
1992
  this.tokenBucket,
1961
1993
  async () => await this.client.getOwnedObjects(input)
1962
1994
  );
1995
+ if (results && results.data.length > 0) {
1996
+ results.data.filter(
1997
+ (result) => !!result.data
1998
+ ).forEach((result) => {
1999
+ this.queryClient.setQueriesData(
2000
+ {
2001
+ exact: false,
2002
+ queryKey: queryKeys.rpc.getObject(
2003
+ result.data.objectId,
2004
+ input.options ?? {}
2005
+ )
2006
+ },
2007
+ {
2008
+ data: result.data,
2009
+ error: null
2010
+ },
2011
+ {
2012
+ updatedAt: Date.now()
2013
+ }
2014
+ );
2015
+ });
2016
+ }
2017
+ return results;
1963
2018
  }
1964
2019
  });
1965
2020
  }
@@ -1982,10 +2037,29 @@ var ScallopCache = class {
1982
2037
  retryDelay: (attemptIndex) => Math.min(1e3 * attemptIndex, 8e3),
1983
2038
  queryKey: queryKeys.rpc.getDynamicFieldObject(input),
1984
2039
  queryFn: async () => {
1985
- return await callWithRateLimit(
2040
+ const result = await callWithRateLimit(
1986
2041
  this.tokenBucket,
1987
2042
  () => this.client.getDynamicFieldObject(input)
1988
2043
  );
2044
+ if (result?.data) {
2045
+ this.queryClient.setQueriesData(
2046
+ {
2047
+ exact: false,
2048
+ queryKey: queryKeys.rpc.getObject(result?.data.objectId, {
2049
+ showContent: true,
2050
+ showOwner: true
2051
+ })
2052
+ },
2053
+ {
2054
+ data: result.data,
2055
+ error: null
2056
+ },
2057
+ {
2058
+ updatedAt: Date.now()
2059
+ }
2060
+ );
2061
+ }
2062
+ return result;
1989
2063
  }
1990
2064
  });
1991
2065
  }
@@ -3623,14 +3697,26 @@ var getObligations = async ({
3623
3697
  } while (hasNextPage);
3624
3698
  const keyObjects = keyObjectsResponse.filter((ref) => !!ref.data);
3625
3699
  const obligations = [];
3700
+ const obligationsObjects = await queryMultipleObjects(
3701
+ address.cache,
3702
+ keyObjects.map((ref) => ref.data?.content).filter(
3703
+ (content) => content?.dataType === "moveObject"
3704
+ ).map((content) => content.fields.ownership.fields.of),
3705
+ {
3706
+ showContent: true
3707
+ }
3708
+ );
3626
3709
  await Promise.allSettled(
3627
- keyObjects.map(async ({ data }) => {
3710
+ keyObjects.map(async ({ data }, idx) => {
3628
3711
  const keyId = data?.objectId;
3629
3712
  const content = data?.content;
3630
3713
  if (keyId && content && "fields" in content) {
3631
3714
  const fields = content.fields;
3632
3715
  const obligationId = String(fields.ownership.fields.of);
3633
- const locked = await getObligationLocked(address.cache, obligationId);
3716
+ const locked = await getObligationLocked(
3717
+ address.cache,
3718
+ obligationsObjects[idx]
3719
+ );
3634
3720
  obligations.push({ id: obligationId, keyId, locked });
3635
3721
  }
3636
3722
  })
@@ -3638,14 +3724,12 @@ var getObligations = async ({
3638
3724
  return obligations;
3639
3725
  };
3640
3726
  var getObligationLocked = async (cache, obligation) => {
3641
- const obligationObjectResponse = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
3727
+ const obligationObjectData = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
3642
3728
  showContent: true
3643
3729
  }))?.data : obligation;
3644
3730
  let obligationLocked = false;
3645
- if (obligationObjectResponse && obligationObjectResponse?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.content.fields) {
3646
- obligationLocked = Boolean(
3647
- obligationObjectResponse.content.fields.lock_key
3648
- );
3731
+ if (obligationObjectData && obligationObjectData?.content?.dataType === "moveObject" && "lock_key" in obligationObjectData.content.fields) {
3732
+ obligationLocked = Boolean(obligationObjectData.content.fields.lock_key);
3649
3733
  }
3650
3734
  return obligationLocked;
3651
3735
  };
@@ -4030,7 +4114,7 @@ var getObligationAccount = async (query, obligationId, ownerAddress, indexer = f
4030
4114
  ];
4031
4115
  market = market ?? await query.getMarketPools(void 0, { indexer });
4032
4116
  coinPrices = coinPrices ?? await query.getAllCoinPrices({ marketPools: market.pools });
4033
- coinAmounts = coinAmounts || await query.getCoinAmounts(coinNames, ownerAddress);
4117
+ coinAmounts = coinAmounts ?? await query.getCoinAmounts(coinNames, ownerAddress);
4034
4118
  const [obligationQuery, borrowIncentivePools, borrowIncentiveAccounts] = await Promise.all([
4035
4119
  query.queryObligation(obligationId),
4036
4120
  query.getBorrowIncentivePools(void 0, {
@@ -5165,6 +5249,9 @@ var getAllAddresses = async (query) => {
5165
5249
  // @ts-ignore
5166
5250
  `scoin.coins.s${coinName}.treasury`
5167
5251
  );
5252
+ const coinDecimalId = query.address.get(
5253
+ `core.coins.${coinName}.metaData`
5254
+ );
5168
5255
  results[coinName] = {
5169
5256
  lendingPoolAddress: addresses[0],
5170
5257
  collateralPoolAddress: addresses[1],
@@ -5177,7 +5264,8 @@ var getAllAddresses = async (query) => {
5177
5264
  isolatedAssetKey: addresses[8],
5178
5265
  spool,
5179
5266
  spoolReward: rewardPool,
5180
- sCoinTreasury
5267
+ sCoinTreasury,
5268
+ coinDecimalId
5181
5269
  };
5182
5270
  await new Promise((resolve) => setTimeout(resolve, 200));
5183
5271
  })
@@ -5956,7 +6044,7 @@ var generateCoreNormalMethod = ({
5956
6044
  coreIds.market,
5957
6045
  coreIds.coinDecimalsRegistry,
5958
6046
  borrowReferral,
5959
- txBlock.pure.u64(amount),
6047
+ typeof amount === "number" ? txBlock.pure.u64(amount) : amount,
5960
6048
  coreIds.xOracle,
5961
6049
  SUI_CLOCK_OBJECT_ID3
5962
6050
  ],
@@ -7865,11 +7953,9 @@ var ScallopQuery = class {
7865
7953
  * @return Borrowing and collateral information.
7866
7954
  */
7867
7955
  async getObligationAccount(obligationId, ownerAddress = this.walletAddress, args) {
7868
- return await getObligationAccount(
7869
- this,
7870
- obligationId,
7871
- ownerAddress,
7872
- args?.indexer
7956
+ const results = await this.getObligationAccounts(ownerAddress, args);
7957
+ return Object.values(results).find(
7958
+ (obligation) => obligation?.obligationId === obligationId
7873
7959
  );
7874
7960
  }
7875
7961
  /**
@@ -8698,6 +8784,8 @@ var ScallopClient = class {
8698
8784
  txBlock.setSender(sender);
8699
8785
  const rewardCoinsCollection = {};
8700
8786
  const obligationAccount = await this.query.getObligationAccount(obligationId);
8787
+ if (!obligationAccount)
8788
+ throw new Error("Obligation not found");
8701
8789
  const rewardCoinNames = Object.values(obligationAccount.borrowIncentives).flatMap(
8702
8790
  ({ rewards }) => rewards.filter(({ availableClaimAmount }) => availableClaimAmount > 0)
8703
8791
  ).flatMap(({ coinName }) => coinName);