@scallop-io/sui-scallop-sdk 1.4.19 → 1.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/common.d.ts +4 -4
- package/dist/constants/enum.d.ts +2 -2
- package/dist/constants/poolAddress.d.ts +3 -1
- package/dist/constants/queryKeys.d.ts +2 -2
- package/dist/index.js +400 -115
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +398 -110
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallopQuery.d.ts +13 -6
- package/dist/models/scallopUtils.d.ts +2 -2
- package/dist/queries/borrowIncentiveQuery.d.ts +2 -0
- package/dist/queries/poolAddressesQuery.d.ts +3 -1
- package/dist/queries/portfolioQuery.d.ts +4 -3
- package/dist/queries/priceQuery.d.ts +2 -0
- package/dist/queries/sCoinQuery.d.ts +1 -1
- package/dist/types/query/portfolio.d.ts +4 -0
- package/package.json +1 -1
- package/src/builders/borrowIncentiveBuilder.ts +29 -7
- package/src/builders/coreBuilder.ts +66 -10
- package/src/builders/oracle.ts +44 -4
- package/src/builders/referralBuilder.ts +20 -4
- package/src/builders/spoolBuilder.ts +38 -4
- package/src/builders/vescaBuilder.ts +25 -5
- package/src/constants/coinGecko.ts +1 -0
- package/src/constants/common.ts +2 -0
- package/src/constants/enum.ts +8 -0
- package/src/constants/poolAddress.ts +165 -58
- package/src/constants/pyth.ts +1 -0
- package/src/constants/queryKeys.ts +2 -2
- package/src/models/scallopUtils.ts +3 -0
- package/src/queries/poolAddressesQuery.ts +15 -3
- package/src/queries/portfolioQuery.ts +16 -5
- package/src/queries/vescaQuery.ts +18 -4
- package/src/types/query/portfolio.ts +4 -0
- package/dist/test.d.ts +0 -1
- package/src/test.ts +0 -17
package/dist/index.js
CHANGED
|
@@ -117,7 +117,8 @@ var COIN_GECKGO_IDS = {
|
|
|
117
117
|
sca: "scallop-2",
|
|
118
118
|
fdusd: "first-digital-usd",
|
|
119
119
|
deep: "deepbook",
|
|
120
|
-
fud: "fud-the-pug"
|
|
120
|
+
fud: "fud-the-pug",
|
|
121
|
+
blub: "blub"
|
|
121
122
|
};
|
|
122
123
|
|
|
123
124
|
// src/constants/common.ts
|
|
@@ -151,7 +152,8 @@ var SUPPORT_POOLS = [
|
|
|
151
152
|
"sca",
|
|
152
153
|
"fud",
|
|
153
154
|
"deep",
|
|
154
|
-
"fdusd"
|
|
155
|
+
"fdusd",
|
|
156
|
+
"blub"
|
|
155
157
|
];
|
|
156
158
|
var SUPPORT_COLLATERALS = [
|
|
157
159
|
"usdc",
|
|
@@ -202,7 +204,8 @@ var SUPPORT_SCOIN = [
|
|
|
202
204
|
"swbtc",
|
|
203
205
|
"sdeep",
|
|
204
206
|
"sfud",
|
|
205
|
-
"sfdusd"
|
|
207
|
+
"sfdusd",
|
|
208
|
+
"sblub"
|
|
206
209
|
];
|
|
207
210
|
var SUPPORT_SUI_BRIDGE = ["sbeth", "sbusdt"];
|
|
208
211
|
var SUPPORT_WORMHOLE = [
|
|
@@ -255,6 +258,7 @@ var coinDecimals = {
|
|
|
255
258
|
fdusd: 6,
|
|
256
259
|
deep: 6,
|
|
257
260
|
fud: 5,
|
|
261
|
+
blub: 2,
|
|
258
262
|
susdc: 6,
|
|
259
263
|
sweth: 8,
|
|
260
264
|
ssbeth: 8,
|
|
@@ -272,7 +276,8 @@ var coinDecimals = {
|
|
|
272
276
|
ssca: 9,
|
|
273
277
|
sfdusd: 6,
|
|
274
278
|
sdeep: 6,
|
|
275
|
-
sfud: 5
|
|
279
|
+
sfud: 5,
|
|
280
|
+
sblub: 2
|
|
276
281
|
};
|
|
277
282
|
var assetCoins = {
|
|
278
283
|
usdc: "usdc",
|
|
@@ -292,7 +297,8 @@ var assetCoins = {
|
|
|
292
297
|
sca: "sca",
|
|
293
298
|
fdusd: "fdusd",
|
|
294
299
|
deep: "deep",
|
|
295
|
-
fud: "fud"
|
|
300
|
+
fud: "fud",
|
|
301
|
+
blub: "blub"
|
|
296
302
|
};
|
|
297
303
|
var marketCoins = {
|
|
298
304
|
susdc: "susdc",
|
|
@@ -312,7 +318,8 @@ var marketCoins = {
|
|
|
312
318
|
ssca: "ssca",
|
|
313
319
|
sfdusd: "sfdusd",
|
|
314
320
|
sdeep: "sdeep",
|
|
315
|
-
sfud: "sfud"
|
|
321
|
+
sfud: "sfud",
|
|
322
|
+
sblub: "sblub"
|
|
316
323
|
};
|
|
317
324
|
var sCoins = {
|
|
318
325
|
susdc: "susdc",
|
|
@@ -331,7 +338,8 @@ var sCoins = {
|
|
|
331
338
|
swbtc: "swbtc",
|
|
332
339
|
sfdusd: "sfdusd",
|
|
333
340
|
sfud: "sfud",
|
|
334
|
-
sdeep: "sdeep"
|
|
341
|
+
sdeep: "sdeep",
|
|
342
|
+
sblub: "sblub"
|
|
335
343
|
};
|
|
336
344
|
var stakeMarketCoins = {
|
|
337
345
|
susdc: "susdc",
|
|
@@ -380,6 +388,7 @@ var coinIds = {
|
|
|
380
388
|
// isolated assets
|
|
381
389
|
deep: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270",
|
|
382
390
|
fud: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1",
|
|
391
|
+
blub: "0xfa7ac3951fdca92c5200d468d31a365eb03b2be9936fde615e69f0c1274ad3a0",
|
|
383
392
|
// Sui bridge assets
|
|
384
393
|
sbeth: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29",
|
|
385
394
|
sbusdt: "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068"
|
|
@@ -415,6 +424,7 @@ var sCoinIds = {
|
|
|
415
424
|
// isolated assets
|
|
416
425
|
sdeep: "0xeb7a05a3224837c5e5503575aed0be73c091d1ce5e43aa3c3e716e0ae614608f::scallop_deep::SCALLOP_DEEP",
|
|
417
426
|
sfud: "0xe56d5167f427cbe597da9e8150ef5c337839aaf46891d62468dcf80bdd8e10d1::scallop_fud::SCALLOP_FUD",
|
|
427
|
+
sblub: "0xe72f65446eabfad2103037af2d49d24599106fb44bf4c046c1e7e9acf6844dd0::scallop_blub::SCALLOP_BLUB",
|
|
418
428
|
// Sui bridge assets
|
|
419
429
|
ssbeth: "0xb14f82d8506d139eacef109688d1b71e7236bcce9b2c0ad526abcd6aa5be7de0::scallop_sb_eth::SCALLOP_SB_ETH",
|
|
420
430
|
ssbusdt: "0xb1d7df34829d1513b73ba17cb7ad90c88d1e104bb65ab8f62f13e0cc103783d3::scallop_sb_usdt::SCALLOP_SB_USDT"
|
|
@@ -452,29 +462,6 @@ var FlashLoanFeeObjectMap = {
|
|
|
452
462
|
|
|
453
463
|
// src/constants/poolAddress.ts
|
|
454
464
|
var POOL_ADDRESSES = {
|
|
455
|
-
usdc: {
|
|
456
|
-
coinName: "usdc",
|
|
457
|
-
symbol: "USDC",
|
|
458
|
-
lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
|
|
459
|
-
collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
|
|
460
|
-
borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
|
|
461
|
-
interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
|
|
462
|
-
riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
|
|
463
|
-
borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
|
|
464
|
-
supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
|
|
465
|
-
borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
|
|
466
|
-
spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
|
|
467
|
-
spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
|
|
468
|
-
sCoinTreasury: "0xbe6b63021f3d82e0e7e977cdd718ed7c019cf2eba374b7b546220402452f938e",
|
|
469
|
-
sCoinType: "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC",
|
|
470
|
-
sCoinName: "susdc",
|
|
471
|
-
sCoinSymbol: "sUSDC",
|
|
472
|
-
coinMetadataId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6",
|
|
473
|
-
coinType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
|
|
474
|
-
sCoinMetadataId: "0x763a21eba338e00bc684aaad80491c89eea5f247b59c47df45b17610c9ad58f2",
|
|
475
|
-
spoolName: "susdc",
|
|
476
|
-
decimals: 6
|
|
477
|
-
},
|
|
478
465
|
sbeth: {
|
|
479
466
|
coinName: "sbeth",
|
|
480
467
|
symbol: "sbETH",
|
|
@@ -493,7 +480,9 @@ var POOL_ADDRESSES = {
|
|
|
493
480
|
coinMetadataId: "0x89b04ba87f8832d4d76e17a1c9dce72eb3e64d372cf02012b8d2de5384faeef0",
|
|
494
481
|
coinType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH",
|
|
495
482
|
sCoinMetadataId: "0xdfdd14d53ed8c7ace7cac8a0eecdfa4c2345e15d9efcbd4e1828f81a107cbe2d",
|
|
496
|
-
decimals: 8
|
|
483
|
+
decimals: 8,
|
|
484
|
+
pythFeed: "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
|
|
485
|
+
pythFeedObjectId: "0x9193fd47f9a0ab99b6e365a464c8a9ae30e6150fc37ed2a89c1586631f6fc4ab"
|
|
497
486
|
},
|
|
498
487
|
sbusdt: {
|
|
499
488
|
coinName: "sbusdt",
|
|
@@ -513,7 +502,34 @@ var POOL_ADDRESSES = {
|
|
|
513
502
|
coinMetadataId: "0xda61b33ac61ed4c084bbda65a2229459ed4eb2185729e70498538f0688bec3cc",
|
|
514
503
|
coinType: "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT",
|
|
515
504
|
sCoinMetadataId: "0x1ce77b036043c8fdcc5cd050ed06433ae60296b194c2abf7ade8b7b7c8386d36",
|
|
516
|
-
decimals: 6
|
|
505
|
+
decimals: 6,
|
|
506
|
+
pythFeed: "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b",
|
|
507
|
+
pythFeedObjectId: "0x985e3db9f93f76ee8bace7c3dd5cc676a096accd5d9e09e9ae0fb6e492b14572"
|
|
508
|
+
},
|
|
509
|
+
usdc: {
|
|
510
|
+
coinName: "usdc",
|
|
511
|
+
symbol: "USDC",
|
|
512
|
+
lendingPoolAddress: "0xd3be98bf540f7603eeb550c0c0a19dbfc78822f25158b5fa84ebd9609def415f",
|
|
513
|
+
collateralPoolAddress: "0x8f0d529ba179c5b3d508213003eab813aaae31f78226099639b9a69d1aec17af",
|
|
514
|
+
borrowDynamic: "0x77837ecd4f26fac9a410fff594f2c0bd3288904a15492ca77cb8a52684dbb866",
|
|
515
|
+
interestModel: "0xaae3f179d63009380cbdcb9acb12907afc9c3cb79cc3460be296a9c6d28f3ff3",
|
|
516
|
+
riskModel: "0x198b24db213bfeb8b3c80ae63dde92e32fd24984d25da8233ff777b851edd574",
|
|
517
|
+
borrowFeeKey: "0xd37c5316cfe0a5967d14264fa6b423f880518b294a1ee6581ccbb49ccc401fb8",
|
|
518
|
+
supplyLimitKey: "0x4be9ae54ac4d320f4f9c14cae78cb85c8e0e67791dd9bdba6d2db20614a28a24",
|
|
519
|
+
borrowLimitKey: "0x6b01093cba95b835181f00e3a2c31ed8dfc8d64fe3db0fb80933a09f66e1ccf1",
|
|
520
|
+
spool: "0x0b5f5f413bd3799e4052c37311966c77f3a4545eb125d2e93e67a68478021918",
|
|
521
|
+
spoolReward: "0x85ed6ed72ea97c35dbf0cdc7ed6fbc48d8ec15de9b17c74bf4512df8a6d7f166",
|
|
522
|
+
sCoinTreasury: "0xbe6b63021f3d82e0e7e977cdd718ed7c019cf2eba374b7b546220402452f938e",
|
|
523
|
+
sCoinType: "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC",
|
|
524
|
+
sCoinName: "susdc",
|
|
525
|
+
sCoinSymbol: "sUSDC",
|
|
526
|
+
coinMetadataId: "0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6",
|
|
527
|
+
coinType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
|
|
528
|
+
sCoinMetadataId: "0x763a21eba338e00bc684aaad80491c89eea5f247b59c47df45b17610c9ad58f2",
|
|
529
|
+
spoolName: "susdc",
|
|
530
|
+
decimals: 6,
|
|
531
|
+
pythFeed: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
|
|
532
|
+
pythFeedObjectId: "0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab"
|
|
517
533
|
},
|
|
518
534
|
weth: {
|
|
519
535
|
coinName: "weth",
|
|
@@ -536,7 +552,9 @@ var POOL_ADDRESSES = {
|
|
|
536
552
|
coinType: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",
|
|
537
553
|
sCoinMetadataId: "0x077d0fd835b559e5b4bb52641f7627ddbf8b200f9b2cf4e28b3514da2a32a4dd",
|
|
538
554
|
spoolName: "sweth",
|
|
539
|
-
decimals: 8
|
|
555
|
+
decimals: 8,
|
|
556
|
+
pythFeed: "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
|
|
557
|
+
pythFeedObjectId: "0x9193fd47f9a0ab99b6e365a464c8a9ae30e6150fc37ed2a89c1586631f6fc4ab"
|
|
540
558
|
},
|
|
541
559
|
wbtc: {
|
|
542
560
|
coinName: "wbtc",
|
|
@@ -556,7 +574,9 @@ var POOL_ADDRESSES = {
|
|
|
556
574
|
coinMetadataId: "0x5d3c6e60eeff8a05b693b481539e7847dfe33013e7070cdcb387f5c0cac05dfd",
|
|
557
575
|
coinType: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN",
|
|
558
576
|
sCoinMetadataId: "0x1ba5904dae41699683da767c7a97785a55c51ec1253498c8fe1980169a96523d",
|
|
559
|
-
decimals: 8
|
|
577
|
+
decimals: 8,
|
|
578
|
+
pythFeed: "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
|
|
579
|
+
pythFeedObjectId: "0x9a62b4863bdeaabdc9500fce769cf7e72d5585eeb28a6d26e4cafadc13f76ab2"
|
|
560
580
|
},
|
|
561
581
|
wusdc: {
|
|
562
582
|
coinName: "wusdc",
|
|
@@ -579,7 +599,9 @@ var POOL_ADDRESSES = {
|
|
|
579
599
|
coinType: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
|
|
580
600
|
sCoinMetadataId: "0xdc0595d068621d630f3c7c364dd257f7e3f8079e00c31c8d18755a033c15ae93",
|
|
581
601
|
spoolName: "swusdc",
|
|
582
|
-
decimals: 6
|
|
602
|
+
decimals: 6,
|
|
603
|
+
pythFeed: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
|
|
604
|
+
pythFeedObjectId: "0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab"
|
|
583
605
|
},
|
|
584
606
|
wusdt: {
|
|
585
607
|
coinName: "wusdt",
|
|
@@ -602,7 +624,9 @@ var POOL_ADDRESSES = {
|
|
|
602
624
|
coinType: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",
|
|
603
625
|
sCoinMetadataId: "0x171d0f1ca99d5fefb8b2e40b89899bacdc5417a783906ae119b9cb1c113d59ae",
|
|
604
626
|
spoolName: "swusdt",
|
|
605
|
-
decimals: 6
|
|
627
|
+
decimals: 6,
|
|
628
|
+
pythFeed: "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b",
|
|
629
|
+
pythFeedObjectId: "0x985e3db9f93f76ee8bace7c3dd5cc676a096accd5d9e09e9ae0fb6e492b14572"
|
|
606
630
|
},
|
|
607
631
|
sui: {
|
|
608
632
|
coinName: "sui",
|
|
@@ -625,7 +649,9 @@ var POOL_ADDRESSES = {
|
|
|
625
649
|
coinType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
|
|
626
650
|
sCoinMetadataId: "0xac724644f481f4870ecdc29b9549aa8ea5180f10827c0d97b493f9f65a91455d",
|
|
627
651
|
spoolName: "ssui",
|
|
628
|
-
decimals: 9
|
|
652
|
+
decimals: 9,
|
|
653
|
+
pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
|
|
654
|
+
pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
|
|
629
655
|
},
|
|
630
656
|
wapt: {
|
|
631
657
|
coinName: "wapt",
|
|
@@ -638,7 +664,9 @@ var POOL_ADDRESSES = {
|
|
|
638
664
|
borrowFeeKey: "0x768735df587c7e0f141dcd035fbbcbf9d2149a7b23888baed4e2baa160fa2eeb",
|
|
639
665
|
coinMetadataId: "0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8",
|
|
640
666
|
coinType: "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37::coin::COIN",
|
|
641
|
-
decimals: 8
|
|
667
|
+
decimals: 8,
|
|
668
|
+
pythFeed: "03ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d5",
|
|
669
|
+
pythFeedObjectId: "0x7c5b7837c44a69b469325463ac0673ac1aa8435ff44ddb4191c9ae380463647f"
|
|
642
670
|
},
|
|
643
671
|
wsol: {
|
|
644
672
|
coinName: "wsol",
|
|
@@ -658,7 +686,9 @@ var POOL_ADDRESSES = {
|
|
|
658
686
|
coinMetadataId: "0x4d2c39082b4477e3e79dc4562d939147ab90c42fc5f3e4acf03b94383cd69b6e",
|
|
659
687
|
coinType: "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8::coin::COIN",
|
|
660
688
|
sCoinMetadataId: "0xee202d2013fc09453d695c640088ee08f14afc8f1ae26284b4ebbc4712ff1ba5",
|
|
661
|
-
decimals: 8
|
|
689
|
+
decimals: 8,
|
|
690
|
+
pythFeed: "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
|
|
691
|
+
pythFeedObjectId: "0x9d0d275efbd37d8a8855f6f2c761fa5983293dd8ce202ee5196626de8fcd4469"
|
|
662
692
|
},
|
|
663
693
|
cetus: {
|
|
664
694
|
coinName: "cetus",
|
|
@@ -681,7 +711,9 @@ var POOL_ADDRESSES = {
|
|
|
681
711
|
coinType: "0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS",
|
|
682
712
|
sCoinMetadataId: "0xf022d041455a038d762a091f7a9e9521211f20501bcf8b6913ef5493a023218f",
|
|
683
713
|
spoolName: "scetus",
|
|
684
|
-
decimals: 9
|
|
714
|
+
decimals: 9,
|
|
715
|
+
pythFeed: "e5b274b2611143df055d6e7cd8d93fe1961716bcd4dca1cad87a83bc1e78c1ef",
|
|
716
|
+
pythFeedObjectId: "0x24c0247fb22457a719efac7f670cdc79be321b521460bd6bd2ccfa9f80713b14"
|
|
685
717
|
},
|
|
686
718
|
afsui: {
|
|
687
719
|
coinName: "afsui",
|
|
@@ -704,7 +736,9 @@ var POOL_ADDRESSES = {
|
|
|
704
736
|
coinType: "0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc::afsui::AFSUI",
|
|
705
737
|
sCoinMetadataId: "0xfd81c4d1b4d9d1b8c522e91121d22e94759386b29eafe1cc3888ca0ebe369b9e",
|
|
706
738
|
spoolName: "safsui",
|
|
707
|
-
decimals: 9
|
|
739
|
+
decimals: 9,
|
|
740
|
+
pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
|
|
741
|
+
pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
|
|
708
742
|
},
|
|
709
743
|
hasui: {
|
|
710
744
|
coinName: "hasui",
|
|
@@ -727,7 +761,9 @@ var POOL_ADDRESSES = {
|
|
|
727
761
|
coinType: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::hasui::HASUI",
|
|
728
762
|
sCoinMetadataId: "0x0a2a4a25aac50ac79210d710f93cb22db58bc6ee22f213364dda9a709cab2189",
|
|
729
763
|
spoolName: "shasui",
|
|
730
|
-
decimals: 9
|
|
764
|
+
decimals: 9,
|
|
765
|
+
pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
|
|
766
|
+
pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
|
|
731
767
|
},
|
|
732
768
|
vsui: {
|
|
733
769
|
coinName: "vsui",
|
|
@@ -750,7 +786,9 @@ var POOL_ADDRESSES = {
|
|
|
750
786
|
coinType: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT",
|
|
751
787
|
sCoinMetadataId: "0xa96cc21ddfb6486be4a96cda0c58734e4ddea2a8c04984f9e6121d8fae997ddf",
|
|
752
788
|
spoolName: "svsui",
|
|
753
|
-
decimals: 9
|
|
789
|
+
decimals: 9,
|
|
790
|
+
pythFeed: "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744",
|
|
791
|
+
pythFeedObjectId: "0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37"
|
|
754
792
|
},
|
|
755
793
|
sca: {
|
|
756
794
|
coinName: "sca",
|
|
@@ -770,7 +808,9 @@ var POOL_ADDRESSES = {
|
|
|
770
808
|
coinMetadataId: "0x5d26a1e9a55c88147ac870bfa31b729d7f49f8804b8b3adfdf3582d301cca844",
|
|
771
809
|
coinType: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA",
|
|
772
810
|
sCoinMetadataId: "0x27e3877491b308dfac46fb3d9f7dfa6a1e8b7dc3c374e92ecda7976055746964",
|
|
773
|
-
decimals: 9
|
|
811
|
+
decimals: 9,
|
|
812
|
+
pythFeed: "7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc",
|
|
813
|
+
pythFeedObjectId: "0xf6de1d3279a269a597d813cbaca59aa906543ab9a8c64e84a4722f1a20863985"
|
|
774
814
|
},
|
|
775
815
|
fud: {
|
|
776
816
|
coinName: "fud",
|
|
@@ -789,26 +829,28 @@ var POOL_ADDRESSES = {
|
|
|
789
829
|
coinMetadataId: "0x01087411ef48aaac1eb6e24803213e3a60a03b147dac930e5e341f17a85e524e",
|
|
790
830
|
coinType: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
|
|
791
831
|
sCoinMetadataId: "0x4e03390de36b8c84e0a8297d3d0d08a8a34bed93787e37fcb26bfc26df33226c",
|
|
792
|
-
decimals: 5
|
|
832
|
+
decimals: 5,
|
|
833
|
+
pythFeed: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75",
|
|
834
|
+
pythFeedObjectId: "0x4531c3ed0d22f21f5fce882905372006c9aafa30f01db03b789e95a6c50de7b2"
|
|
793
835
|
},
|
|
794
|
-
|
|
795
|
-
coinName: "
|
|
796
|
-
symbol: "
|
|
797
|
-
lendingPoolAddress: "
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
sCoinTreasury: "
|
|
805
|
-
sCoinType: "
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
836
|
+
blub: {
|
|
837
|
+
coinName: "blub",
|
|
838
|
+
symbol: "BLUB",
|
|
839
|
+
lendingPoolAddress: "0x4dede1d8eda98647c3fc9838e94a890b73ca37a20764087eb78ba0473edea1a5",
|
|
840
|
+
borrowDynamic: "0xb2e9df6917ff3cb93fc4361102504c2d225913b3860458ef40f83b370601bec2",
|
|
841
|
+
interestModel: "0xec07bfcf93df52d1c0dabecc88b1ee66445a2fda6b98378c19d8e029022f2012",
|
|
842
|
+
borrowFeeKey: "0x59b820845932c1f151793b1c6e605ad993535784ccfaa83e709207d6aed3ab99",
|
|
843
|
+
supplyLimitKey: "0xc25e930484a10498a53562cfb87da47280e842564d455f25e5b80a913002d5a0",
|
|
844
|
+
borrowLimitKey: "0xaf4560140b2c6906befd546cc556f7c459964e7c31e20a6e1ab992bbc6d12b7f",
|
|
845
|
+
isolatedAssetKey: "0x30a8f1dbf9dc05dae26c25fac6dfa80fa2d886e05e61cefc697b94959dd75007",
|
|
846
|
+
sCoinTreasury: "0x87d34361dfd0e2accc946684d10b176484f348892f6cc51a829418040c4700e1",
|
|
847
|
+
sCoinType: "0xe72f65446eabfad2103037af2d49d24599106fb44bf4c046c1e7e9acf6844dd0::scallop_blub::SCALLOP_BLUB",
|
|
848
|
+
coinMetadataId: "0xac32b519790cae96c3317457d903d61d04f1bc8f7710096d80fcba72c7a53703",
|
|
849
|
+
coinType: "0xfa7ac3951fdca92c5200d468d31a365eb03b2be9936fde615e69f0c1274ad3a0::BLUB::BLUB",
|
|
850
|
+
sCoinMetadataId: "0xfa11263cb39de80b9e224d7e0391866a7e779d3d62451de82a91ba601bfb1ce3",
|
|
851
|
+
decimals: 2,
|
|
852
|
+
pythFeed: "5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c",
|
|
853
|
+
pythFeedObjectId: "0x246658c3324f2477568c78cca622518fbc6969a004b841d81409d24a7ec39b18"
|
|
812
854
|
},
|
|
813
855
|
deep: {
|
|
814
856
|
coinName: "deep",
|
|
@@ -827,7 +869,30 @@ var POOL_ADDRESSES = {
|
|
|
827
869
|
coinMetadataId: "0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0",
|
|
828
870
|
coinType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP",
|
|
829
871
|
sCoinMetadataId: "0x2443014594a500a9119e11c6c6a86e865834f496c4614280ce8cace33c0b072e",
|
|
830
|
-
decimals: 6
|
|
872
|
+
decimals: 6,
|
|
873
|
+
pythFeed: "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff",
|
|
874
|
+
pythFeedObjectId: "0x8c7f3a322b94cc69db2a2ac575cbd94bf5766113324c3a3eceac91e3e88a51ed"
|
|
875
|
+
},
|
|
876
|
+
fdusd: {
|
|
877
|
+
coinName: "fdusd",
|
|
878
|
+
symbol: "FDUSD",
|
|
879
|
+
lendingPoolAddress: "0x4f46051a01f05c3ad9aecf29a771aad5c884e1a1888e08d7709085e3a095bc9c",
|
|
880
|
+
collateralPoolAddress: "0x4f6647a9afcfdb62bb9b27e4d1cb7bd7130aca1b4f13fa7164453c869c1681ae",
|
|
881
|
+
borrowDynamic: "0x4ddcf19b6290a8b048ecb314b14ef7f52c1c5b9ddc9259a2a242cd91d681a085",
|
|
882
|
+
interestModel: "0xb57a33706b29d2d253c74c1c0869e6e20da99036338d2b0b7235ab41621ee9dd",
|
|
883
|
+
riskModel: "0xd65fb21758dc1e6184940a1a27efb13228d7cf5e19f6dcca06cc2d996af4a6b9",
|
|
884
|
+
borrowFeeKey: "0xafe673a27747b063fa918d2dfe47794e44af553737ac562c2a63186539a07f45",
|
|
885
|
+
supplyLimitKey: "0x730e0785ba056a7a95f4a6959371a598d7fe782e81c40785c79982ced4cf4e35",
|
|
886
|
+
sCoinTreasury: "0xdad9bc6293e694f67a5274ea51b596e0bdabfafc585ae6d7e82888e65f1a03e0",
|
|
887
|
+
sCoinType: "0x6711551c1e7652a270d9fbf0eee25d99594c157cde3cb5fbb49035eb59b1b001::scallop_fdusd::SCALLOP_FDUSD",
|
|
888
|
+
sCoinName: "sfdusd",
|
|
889
|
+
sCoinSymbol: "sFDUSD",
|
|
890
|
+
coinMetadataId: "0xdebee5265a67c186ed87fe93303d33dfe1de53e3b4fd7d9329c2852860acd3e7",
|
|
891
|
+
coinType: "0xf16e6b723f242ec745dfd7634ad072c42d5c1d9ac9d62a39c381303eaa57693a::fdusd::FDUSD",
|
|
892
|
+
sCoinMetadataId: "0xb1529a3b5e5831d19a722493eec19785f613945d3dc984602d44a418f990d73f",
|
|
893
|
+
decimals: 6,
|
|
894
|
+
pythFeed: "0xccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979",
|
|
895
|
+
pythFeedObjectId: "0x5f6583b2b0fe1ecf94aaffeaab8a838794693960cea48c0da282d5f4a24be027"
|
|
831
896
|
}
|
|
832
897
|
};
|
|
833
898
|
|
|
@@ -854,7 +919,8 @@ var PYTH_FEED_IDS = {
|
|
|
854
919
|
sca: "7e17f0ac105abe9214deb9944c30264f5986bf292869c6bd8e8da3ccd92d79bc",
|
|
855
920
|
fdusd: "0xccdc1a08923e2e4f4b1e6ea89de6acbc5fe1948e9706f5604b8cb50bc1ed3979",
|
|
856
921
|
deep: "29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff",
|
|
857
|
-
fud: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75"
|
|
922
|
+
fud: "6a4090703da959247727f2b490eb21aea95c8684ecfac675f432008830890c75",
|
|
923
|
+
blub: "5fc11ffe4975b624be495be038da30e30bee2004d8ae6282b5364577ef4ca92c"
|
|
858
924
|
};
|
|
859
925
|
|
|
860
926
|
// src/constants/queryKeys.ts
|
|
@@ -2451,7 +2517,7 @@ var ScallopAddress = class {
|
|
|
2451
2517
|
};
|
|
2452
2518
|
|
|
2453
2519
|
// src/models/scallopClient.ts
|
|
2454
|
-
var
|
|
2520
|
+
var import_utils24 = require("@mysten/sui/utils");
|
|
2455
2521
|
|
|
2456
2522
|
// src/models/scallopUtils.ts
|
|
2457
2523
|
var import_utils10 = require("@mysten/sui/utils");
|
|
@@ -4732,7 +4798,8 @@ var getObligationAccount = async (query, obligation, ownerAddress, indexer = fal
|
|
|
4732
4798
|
};
|
|
4733
4799
|
var getTotalValueLocked = async (query, indexer = false) => {
|
|
4734
4800
|
const market = await query.getMarketPools(void 0, { indexer });
|
|
4735
|
-
let
|
|
4801
|
+
let supplyLendingValue = (0, import_bignumber5.default)(0);
|
|
4802
|
+
let supplyCollateralValue = (0, import_bignumber5.default)(0);
|
|
4736
4803
|
let borrowValue = (0, import_bignumber5.default)(0);
|
|
4737
4804
|
if (indexer) {
|
|
4738
4805
|
const tvlIndexer = await query.indexer.getTotalValueLocked();
|
|
@@ -4742,12 +4809,16 @@ var getTotalValueLocked = async (query, indexer = false) => {
|
|
|
4742
4809
|
borrowValue: tvlIndexer.borrowValue,
|
|
4743
4810
|
borrowValueChangeRatio: tvlIndexer.borrowValueChangeRatio,
|
|
4744
4811
|
totalValue: tvlIndexer.totalValue,
|
|
4745
|
-
totalValueChangeRatio: tvlIndexer.totalValueChangeRatio
|
|
4812
|
+
totalValueChangeRatio: tvlIndexer.totalValueChangeRatio,
|
|
4813
|
+
supplyLendingValue: tvlIndexer.supplyLendingValue,
|
|
4814
|
+
supplyLendingValueChangeRatio: tvlIndexer.supplyLendingValueChangeRatio,
|
|
4815
|
+
supplyCollateralValue: tvlIndexer.supplyCollateralValue,
|
|
4816
|
+
supplyCollateralValueChangeRatio: tvlIndexer.supplyCollateralValueChangeRatio
|
|
4746
4817
|
};
|
|
4747
4818
|
return tvl2;
|
|
4748
4819
|
}
|
|
4749
4820
|
for (const pool of Object.values(market.pools)) {
|
|
4750
|
-
|
|
4821
|
+
supplyLendingValue = supplyLendingValue.plus(
|
|
4751
4822
|
(0, import_bignumber5.default)(pool.supplyCoin).multipliedBy(pool.coinPrice)
|
|
4752
4823
|
);
|
|
4753
4824
|
borrowValue = borrowValue.plus(
|
|
@@ -4755,14 +4826,16 @@ var getTotalValueLocked = async (query, indexer = false) => {
|
|
|
4755
4826
|
);
|
|
4756
4827
|
}
|
|
4757
4828
|
for (const collateral of Object.values(market.collaterals)) {
|
|
4758
|
-
|
|
4829
|
+
supplyCollateralValue = supplyCollateralValue.plus(
|
|
4759
4830
|
(0, import_bignumber5.default)(collateral.depositCoin).multipliedBy(collateral.coinPrice)
|
|
4760
4831
|
);
|
|
4761
4832
|
}
|
|
4762
4833
|
const tvl = {
|
|
4763
|
-
supplyValue:
|
|
4834
|
+
supplyValue: supplyLendingValue.plus(supplyCollateralValue).toNumber(),
|
|
4835
|
+
supplyLendingValue: supplyLendingValue.toNumber(),
|
|
4836
|
+
supplyCollateralValue: supplyCollateralValue.toNumber(),
|
|
4764
4837
|
borrowValue: borrowValue.toNumber(),
|
|
4765
|
-
totalValue:
|
|
4838
|
+
totalValue: supplyLendingValue.plus(supplyCollateralValue).minus(borrowValue).toNumber()
|
|
4766
4839
|
};
|
|
4767
4840
|
return tvl;
|
|
4768
4841
|
};
|
|
@@ -5594,10 +5667,26 @@ var getTotalVeScaTreasuryAmount = async (utils, veScaTreasury) => {
|
|
|
5594
5667
|
const veScaPkgId = utils.address.get("vesca.id");
|
|
5595
5668
|
const veScaConfig = utils.address.get("vesca.config");
|
|
5596
5669
|
veScaTreasury = veScaTreasury ?? utils.address.get("vesca.treasury");
|
|
5670
|
+
const txb = new import_sui_kit4.SuiTxBlock();
|
|
5597
5671
|
const refreshQueryTarget = `${veScaPkgId}::treasury::refresh`;
|
|
5598
|
-
const refreshArgs = [
|
|
5672
|
+
const refreshArgs = [
|
|
5673
|
+
veScaConfig,
|
|
5674
|
+
veScaTreasury,
|
|
5675
|
+
txb.sharedObjectRef({
|
|
5676
|
+
objectId: import_sui_kit4.SUI_CLOCK_OBJECT_ID,
|
|
5677
|
+
mutable: false,
|
|
5678
|
+
initialSharedVersion: "1"
|
|
5679
|
+
})
|
|
5680
|
+
];
|
|
5599
5681
|
const veScaAmountQueryTarget = `${veScaPkgId}::treasury::total_ve_sca_amount`;
|
|
5600
|
-
const veScaAmountArgs = [
|
|
5682
|
+
const veScaAmountArgs = [
|
|
5683
|
+
veScaTreasury,
|
|
5684
|
+
txb.sharedObjectRef({
|
|
5685
|
+
objectId: import_sui_kit4.SUI_CLOCK_OBJECT_ID,
|
|
5686
|
+
mutable: false,
|
|
5687
|
+
initialSharedVersion: "1"
|
|
5688
|
+
})
|
|
5689
|
+
];
|
|
5601
5690
|
const resolvedRefreshArgs = await Promise.all(
|
|
5602
5691
|
refreshArgs.map(async (arg) => {
|
|
5603
5692
|
if (typeof arg === "string") {
|
|
@@ -5614,7 +5703,6 @@ var getTotalVeScaTreasuryAmount = async (utils, veScaTreasury) => {
|
|
|
5614
5703
|
return arg;
|
|
5615
5704
|
})
|
|
5616
5705
|
);
|
|
5617
|
-
const txb = new import_sui_kit4.SuiTxBlock();
|
|
5618
5706
|
txb.moveCall(refreshQueryTarget, resolvedRefreshArgs);
|
|
5619
5707
|
txb.moveCall(veScaAmountQueryTarget, resolvedVeScaAmountArgs);
|
|
5620
5708
|
const txBytes = await txb.txBlock.build({
|
|
@@ -5731,7 +5819,10 @@ var getAllAddresses = async (query) => {
|
|
|
5731
5819
|
// @ts-ignore
|
|
5732
5820
|
`spool.pools.s${coinName}.rewardPoolId`
|
|
5733
5821
|
);
|
|
5734
|
-
const sCoinType = query.address.get(
|
|
5822
|
+
const sCoinType = query.address.get(
|
|
5823
|
+
// @ts-ignore
|
|
5824
|
+
`scoin.coins.s${coinName}.coinType`
|
|
5825
|
+
);
|
|
5735
5826
|
const sCoinName = sCoinType ? query.utils.parseSCoinName(coinName) : void 0;
|
|
5736
5827
|
const sCoinSymbol = sCoinName ? query.utils.parseSymbol(sCoinName) : void 0;
|
|
5737
5828
|
const sCoinTreasury = query.address.get(
|
|
@@ -5745,6 +5836,11 @@ var getAllAddresses = async (query) => {
|
|
|
5745
5836
|
// @ts-ignore
|
|
5746
5837
|
`scoin.coins.s${coinName}.metaData`
|
|
5747
5838
|
);
|
|
5839
|
+
const pythFeed = PYTH_FEED_IDS[coinName];
|
|
5840
|
+
const pythFeedObjectId = query.address.get(
|
|
5841
|
+
//@ts-ignore
|
|
5842
|
+
`core.coins.${coinName}.oracle.pyth.feedObject`
|
|
5843
|
+
);
|
|
5748
5844
|
const decimals = query.utils.getCoinDecimal(coinName);
|
|
5749
5845
|
const spoolName = spool ? `s${coinName}` : void 0;
|
|
5750
5846
|
results[coinName] = {
|
|
@@ -5769,7 +5865,9 @@ var getAllAddresses = async (query) => {
|
|
|
5769
5865
|
coinType: `0x${coinType}`,
|
|
5770
5866
|
sCoinMetadataId,
|
|
5771
5867
|
spoolName,
|
|
5772
|
-
decimals
|
|
5868
|
+
decimals,
|
|
5869
|
+
pythFeed,
|
|
5870
|
+
pythFeedObjectId
|
|
5773
5871
|
};
|
|
5774
5872
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
5775
5873
|
})
|
|
@@ -5866,6 +5964,8 @@ var ScallopUtils = class {
|
|
|
5866
5964
|
}
|
|
5867
5965
|
if (coinName === "sui")
|
|
5868
5966
|
return (0, import_utils10.normalizeStructTag)(`${coinPackageId}::sui::SUI`);
|
|
5967
|
+
if (coinName === "blub")
|
|
5968
|
+
return (0, import_utils10.normalizeStructTag)(`${coinPackageId}::BLUB::BLUB`);
|
|
5869
5969
|
const wormHolePackageIds = [
|
|
5870
5970
|
this.address.get("core.coins.wusdc.id") ?? wormholeCoinIds.wusdc,
|
|
5871
5971
|
this.address.get("core.coins.wusdt.id") ?? wormholeCoinIds.wusdt,
|
|
@@ -6251,7 +6351,7 @@ var ScallopUtils = class {
|
|
|
6251
6351
|
};
|
|
6252
6352
|
|
|
6253
6353
|
// src/models/scallopBuilder.ts
|
|
6254
|
-
var
|
|
6354
|
+
var import_utils23 = require("@mysten/sui/utils");
|
|
6255
6355
|
|
|
6256
6356
|
// src/builders/coreBuilder.ts
|
|
6257
6357
|
var import_transactions = require("@mysten/sui/transactions");
|
|
@@ -6375,27 +6475,67 @@ var priceUpdateRequest = (txBlock, packageId, xOracleId, coinType) => {
|
|
|
6375
6475
|
var confirmPriceUpdateRequest = (txBlock, packageId, xOracleId, request, coinType) => {
|
|
6376
6476
|
const target = `${packageId}::x_oracle::confirm_price_update_request`;
|
|
6377
6477
|
const typeArgs = [coinType];
|
|
6378
|
-
txBlock.moveCall(
|
|
6478
|
+
txBlock.moveCall(
|
|
6479
|
+
target,
|
|
6480
|
+
[
|
|
6481
|
+
xOracleId,
|
|
6482
|
+
request,
|
|
6483
|
+
txBlock.sharedObjectRef({
|
|
6484
|
+
objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
|
|
6485
|
+
mutable: false,
|
|
6486
|
+
initialSharedVersion: "1"
|
|
6487
|
+
})
|
|
6488
|
+
],
|
|
6489
|
+
typeArgs
|
|
6490
|
+
);
|
|
6379
6491
|
return txBlock;
|
|
6380
6492
|
};
|
|
6381
6493
|
var updateSupraPrice = (txBlock, packageId, request, holderId, registryId, coinType) => {
|
|
6382
6494
|
txBlock.moveCall(
|
|
6383
6495
|
`${packageId}::rule::set_price`,
|
|
6384
|
-
[
|
|
6496
|
+
[
|
|
6497
|
+
request,
|
|
6498
|
+
holderId,
|
|
6499
|
+
registryId,
|
|
6500
|
+
txBlock.sharedObjectRef({
|
|
6501
|
+
objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
|
|
6502
|
+
mutable: false,
|
|
6503
|
+
initialSharedVersion: "1"
|
|
6504
|
+
})
|
|
6505
|
+
],
|
|
6385
6506
|
[coinType]
|
|
6386
6507
|
);
|
|
6387
6508
|
};
|
|
6388
6509
|
var updateSwitchboardPrice = (txBlock, packageId, request, aggregatorId, registryId, coinType) => {
|
|
6389
6510
|
txBlock.moveCall(
|
|
6390
6511
|
`${packageId}::rule::set_price`,
|
|
6391
|
-
[
|
|
6512
|
+
[
|
|
6513
|
+
request,
|
|
6514
|
+
aggregatorId,
|
|
6515
|
+
registryId,
|
|
6516
|
+
txBlock.sharedObjectRef({
|
|
6517
|
+
objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
|
|
6518
|
+
mutable: false,
|
|
6519
|
+
initialSharedVersion: "1"
|
|
6520
|
+
})
|
|
6521
|
+
],
|
|
6392
6522
|
[coinType]
|
|
6393
6523
|
);
|
|
6394
6524
|
};
|
|
6395
6525
|
var updatePythPrice = (txBlock, packageId, request, stateId, feedObjectId, registryId, coinType) => {
|
|
6396
6526
|
txBlock.moveCall(
|
|
6397
6527
|
`${packageId}::rule::set_price`,
|
|
6398
|
-
[
|
|
6528
|
+
[
|
|
6529
|
+
request,
|
|
6530
|
+
stateId,
|
|
6531
|
+
feedObjectId,
|
|
6532
|
+
registryId,
|
|
6533
|
+
txBlock.sharedObjectRef({
|
|
6534
|
+
objectId: import_utils12.SUI_CLOCK_OBJECT_ID,
|
|
6535
|
+
mutable: false,
|
|
6536
|
+
initialSharedVersion: "1"
|
|
6537
|
+
})
|
|
6538
|
+
],
|
|
6399
6539
|
[coinType]
|
|
6400
6540
|
);
|
|
6401
6541
|
};
|
|
@@ -6475,7 +6615,11 @@ var generateCoreNormalMethod = ({
|
|
|
6475
6615
|
coreIds.coinDecimalsRegistry,
|
|
6476
6616
|
txBlock.pure.u64(amount),
|
|
6477
6617
|
coreIds.xOracle,
|
|
6478
|
-
|
|
6618
|
+
txBlock.sharedObjectRef({
|
|
6619
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6620
|
+
mutable: false,
|
|
6621
|
+
initialSharedVersion: "1"
|
|
6622
|
+
})
|
|
6479
6623
|
],
|
|
6480
6624
|
[coinType]
|
|
6481
6625
|
);
|
|
@@ -6485,7 +6629,16 @@ var generateCoreNormalMethod = ({
|
|
|
6485
6629
|
return builder.moveCall(
|
|
6486
6630
|
txBlock,
|
|
6487
6631
|
`${coreIds.protocolPkg}::mint::mint`,
|
|
6488
|
-
[
|
|
6632
|
+
[
|
|
6633
|
+
coreIds.version,
|
|
6634
|
+
coreIds.market,
|
|
6635
|
+
coin,
|
|
6636
|
+
txBlock.sharedObjectRef({
|
|
6637
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6638
|
+
mutable: false,
|
|
6639
|
+
initialSharedVersion: "1"
|
|
6640
|
+
})
|
|
6641
|
+
],
|
|
6489
6642
|
[coinType]
|
|
6490
6643
|
);
|
|
6491
6644
|
},
|
|
@@ -6494,7 +6647,16 @@ var generateCoreNormalMethod = ({
|
|
|
6494
6647
|
return builder.moveCall(
|
|
6495
6648
|
txBlock,
|
|
6496
6649
|
`${coreIds.protocolPkg}::mint::mint_entry`,
|
|
6497
|
-
[
|
|
6650
|
+
[
|
|
6651
|
+
coreIds.version,
|
|
6652
|
+
coreIds.market,
|
|
6653
|
+
coin,
|
|
6654
|
+
txBlock.sharedObjectRef({
|
|
6655
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6656
|
+
mutable: false,
|
|
6657
|
+
initialSharedVersion: "1"
|
|
6658
|
+
})
|
|
6659
|
+
],
|
|
6498
6660
|
[coinType]
|
|
6499
6661
|
);
|
|
6500
6662
|
},
|
|
@@ -6503,7 +6665,16 @@ var generateCoreNormalMethod = ({
|
|
|
6503
6665
|
return builder.moveCall(
|
|
6504
6666
|
txBlock,
|
|
6505
6667
|
`${coreIds.protocolPkg}::redeem::redeem`,
|
|
6506
|
-
[
|
|
6668
|
+
[
|
|
6669
|
+
coreIds.version,
|
|
6670
|
+
coreIds.market,
|
|
6671
|
+
marketCoin,
|
|
6672
|
+
txBlock.sharedObjectRef({
|
|
6673
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6674
|
+
mutable: false,
|
|
6675
|
+
initialSharedVersion: "1"
|
|
6676
|
+
})
|
|
6677
|
+
],
|
|
6507
6678
|
[coinType]
|
|
6508
6679
|
);
|
|
6509
6680
|
},
|
|
@@ -6512,7 +6683,16 @@ var generateCoreNormalMethod = ({
|
|
|
6512
6683
|
return builder.moveCall(
|
|
6513
6684
|
txBlock,
|
|
6514
6685
|
`${coreIds.protocolPkg}::redeem::redeem_entry`,
|
|
6515
|
-
[
|
|
6686
|
+
[
|
|
6687
|
+
coreIds.version,
|
|
6688
|
+
coreIds.market,
|
|
6689
|
+
marketCoin,
|
|
6690
|
+
txBlock.sharedObjectRef({
|
|
6691
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6692
|
+
mutable: false,
|
|
6693
|
+
initialSharedVersion: "1"
|
|
6694
|
+
})
|
|
6695
|
+
],
|
|
6516
6696
|
[coinType]
|
|
6517
6697
|
);
|
|
6518
6698
|
},
|
|
@@ -6529,7 +6709,11 @@ var generateCoreNormalMethod = ({
|
|
|
6529
6709
|
coreIds.coinDecimalsRegistry,
|
|
6530
6710
|
amount,
|
|
6531
6711
|
coreIds.xOracle,
|
|
6532
|
-
|
|
6712
|
+
txBlock.sharedObjectRef({
|
|
6713
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6714
|
+
mutable: false,
|
|
6715
|
+
initialSharedVersion: "1"
|
|
6716
|
+
})
|
|
6533
6717
|
],
|
|
6534
6718
|
[coinType]
|
|
6535
6719
|
);
|
|
@@ -6548,7 +6732,11 @@ var generateCoreNormalMethod = ({
|
|
|
6548
6732
|
borrowReferral,
|
|
6549
6733
|
typeof amount === "number" ? txBlock.pure.u64(amount) : amount,
|
|
6550
6734
|
coreIds.xOracle,
|
|
6551
|
-
|
|
6735
|
+
txBlock.sharedObjectRef({
|
|
6736
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6737
|
+
mutable: false,
|
|
6738
|
+
initialSharedVersion: "1"
|
|
6739
|
+
})
|
|
6552
6740
|
],
|
|
6553
6741
|
[coinType, referralWitnessType]
|
|
6554
6742
|
);
|
|
@@ -6566,7 +6754,11 @@ var generateCoreNormalMethod = ({
|
|
|
6566
6754
|
coreIds.coinDecimalsRegistry,
|
|
6567
6755
|
txBlock.pure.u64(amount),
|
|
6568
6756
|
coreIds.xOracle,
|
|
6569
|
-
|
|
6757
|
+
txBlock.sharedObjectRef({
|
|
6758
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6759
|
+
mutable: false,
|
|
6760
|
+
initialSharedVersion: "1"
|
|
6761
|
+
})
|
|
6570
6762
|
],
|
|
6571
6763
|
[coinType]
|
|
6572
6764
|
);
|
|
@@ -6581,7 +6773,11 @@ var generateCoreNormalMethod = ({
|
|
|
6581
6773
|
obligation,
|
|
6582
6774
|
coreIds.market,
|
|
6583
6775
|
coin,
|
|
6584
|
-
|
|
6776
|
+
txBlock.sharedObjectRef({
|
|
6777
|
+
objectId: import_utils13.SUI_CLOCK_OBJECT_ID,
|
|
6778
|
+
mutable: false,
|
|
6779
|
+
initialSharedVersion: "1"
|
|
6780
|
+
})
|
|
6585
6781
|
],
|
|
6586
6782
|
[coinType]
|
|
6587
6783
|
);
|
|
@@ -6746,7 +6942,7 @@ var generateCoreQuickMethod = ({
|
|
|
6746
6942
|
) ?? [];
|
|
6747
6943
|
const updateCoinNames = [...obligationCoinNames, poolCoinName];
|
|
6748
6944
|
await updateOracles(builder, txBlock, updateCoinNames);
|
|
6749
|
-
return
|
|
6945
|
+
return txBlock.borrowWithReferral(
|
|
6750
6946
|
obligationInfo.obligationId,
|
|
6751
6947
|
obligationInfo.obligationKey,
|
|
6752
6948
|
borrowReferral,
|
|
@@ -6874,7 +7070,14 @@ var generateSpoolNormalMethod = ({
|
|
|
6874
7070
|
return builder.moveCall(
|
|
6875
7071
|
txBlock,
|
|
6876
7072
|
`${spoolIds.spoolPkg}::user::new_spool_account`,
|
|
6877
|
-
[
|
|
7073
|
+
[
|
|
7074
|
+
stakePoolId,
|
|
7075
|
+
txBlock.sharedObjectRef({
|
|
7076
|
+
objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
|
|
7077
|
+
mutable: false,
|
|
7078
|
+
initialSharedVersion: "1"
|
|
7079
|
+
})
|
|
7080
|
+
],
|
|
6878
7081
|
[marketCoinType]
|
|
6879
7082
|
);
|
|
6880
7083
|
},
|
|
@@ -6886,7 +7089,16 @@ var generateSpoolNormalMethod = ({
|
|
|
6886
7089
|
builder.moveCall(
|
|
6887
7090
|
txBlock,
|
|
6888
7091
|
`${spoolIds.spoolPkg}::user::stake`,
|
|
6889
|
-
[
|
|
7092
|
+
[
|
|
7093
|
+
stakePoolId,
|
|
7094
|
+
stakeAccount,
|
|
7095
|
+
coin,
|
|
7096
|
+
txBlock.sharedObjectRef({
|
|
7097
|
+
objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
|
|
7098
|
+
mutable: false,
|
|
7099
|
+
initialSharedVersion: "1"
|
|
7100
|
+
})
|
|
7101
|
+
],
|
|
6890
7102
|
[marketCoinType]
|
|
6891
7103
|
);
|
|
6892
7104
|
},
|
|
@@ -6898,7 +7110,16 @@ var generateSpoolNormalMethod = ({
|
|
|
6898
7110
|
return builder.moveCall(
|
|
6899
7111
|
txBlock,
|
|
6900
7112
|
`${spoolIds.spoolPkg}::user::unstake`,
|
|
6901
|
-
[
|
|
7113
|
+
[
|
|
7114
|
+
stakePoolId,
|
|
7115
|
+
stakeAccount,
|
|
7116
|
+
amount,
|
|
7117
|
+
txBlock.sharedObjectRef({
|
|
7118
|
+
objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
|
|
7119
|
+
mutable: false,
|
|
7120
|
+
initialSharedVersion: "1"
|
|
7121
|
+
})
|
|
7122
|
+
],
|
|
6902
7123
|
[marketCoinType]
|
|
6903
7124
|
);
|
|
6904
7125
|
},
|
|
@@ -6915,7 +7136,16 @@ var generateSpoolNormalMethod = ({
|
|
|
6915
7136
|
return builder.moveCall(
|
|
6916
7137
|
txBlock,
|
|
6917
7138
|
`${spoolIds.spoolPkg}::user::redeem_rewards`,
|
|
6918
|
-
[
|
|
7139
|
+
[
|
|
7140
|
+
stakePoolId,
|
|
7141
|
+
rewardPoolId,
|
|
7142
|
+
stakeAccount,
|
|
7143
|
+
txBlock.sharedObjectRef({
|
|
7144
|
+
objectId: import_utils15.SUI_CLOCK_OBJECT_ID,
|
|
7145
|
+
mutable: false,
|
|
7146
|
+
initialSharedVersion: "1"
|
|
7147
|
+
})
|
|
7148
|
+
],
|
|
6919
7149
|
[marketCoinType, rewardCoinType]
|
|
6920
7150
|
);
|
|
6921
7151
|
}
|
|
@@ -7050,7 +7280,6 @@ var newSpoolTxBlock = (builder, initTxBlock) => {
|
|
|
7050
7280
|
|
|
7051
7281
|
// src/builders/borrowIncentiveBuilder.ts
|
|
7052
7282
|
var import_transactions3 = require("@mysten/sui/transactions");
|
|
7053
|
-
var import_utils17 = require("@mysten/sui/utils");
|
|
7054
7283
|
var import_sui_kit7 = require("@scallop-io/sui-kit");
|
|
7055
7284
|
var requireObligationInfo2 = async (...params) => {
|
|
7056
7285
|
const [builder, txBlock, obligationId, obligationKey] = params;
|
|
@@ -7103,7 +7332,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7103
7332
|
obligationKey,
|
|
7104
7333
|
obligationId,
|
|
7105
7334
|
borrowIncentiveIds.obligationAccessStore,
|
|
7106
|
-
|
|
7335
|
+
txBlock.sharedObjectRef({
|
|
7336
|
+
objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
|
|
7337
|
+
mutable: false,
|
|
7338
|
+
initialSharedVersion: "1"
|
|
7339
|
+
})
|
|
7107
7340
|
]
|
|
7108
7341
|
);
|
|
7109
7342
|
},
|
|
@@ -7122,7 +7355,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7122
7355
|
veScaIds.treasury,
|
|
7123
7356
|
veScaIds.table,
|
|
7124
7357
|
veScaKey,
|
|
7125
|
-
|
|
7358
|
+
txBlock.sharedObjectRef({
|
|
7359
|
+
objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
|
|
7360
|
+
mutable: false,
|
|
7361
|
+
initialSharedVersion: "1"
|
|
7362
|
+
})
|
|
7126
7363
|
],
|
|
7127
7364
|
[]
|
|
7128
7365
|
);
|
|
@@ -7137,7 +7374,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7137
7374
|
borrowIncentiveIds.incentiveAccounts,
|
|
7138
7375
|
obligationKey,
|
|
7139
7376
|
obligationId,
|
|
7140
|
-
|
|
7377
|
+
txBlock.sharedObjectRef({
|
|
7378
|
+
objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
|
|
7379
|
+
mutable: false,
|
|
7380
|
+
initialSharedVersion: "1"
|
|
7381
|
+
})
|
|
7141
7382
|
]
|
|
7142
7383
|
);
|
|
7143
7384
|
},
|
|
@@ -7152,7 +7393,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7152
7393
|
borrowIncentiveIds.incentiveAccounts,
|
|
7153
7394
|
obligationKey,
|
|
7154
7395
|
obligationId,
|
|
7155
|
-
|
|
7396
|
+
txBlock.sharedObjectRef({
|
|
7397
|
+
objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
|
|
7398
|
+
mutable: false,
|
|
7399
|
+
initialSharedVersion: "1"
|
|
7400
|
+
})
|
|
7156
7401
|
],
|
|
7157
7402
|
[rewardType]
|
|
7158
7403
|
);
|
|
@@ -7167,7 +7412,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7167
7412
|
borrowIncentiveIds.incentiveAccounts,
|
|
7168
7413
|
obligation,
|
|
7169
7414
|
veScaKey,
|
|
7170
|
-
|
|
7415
|
+
txBlock.sharedObjectRef({
|
|
7416
|
+
objectId: import_sui_kit7.SUI_CLOCK_OBJECT_ID,
|
|
7417
|
+
mutable: false,
|
|
7418
|
+
initialSharedVersion: "1"
|
|
7419
|
+
})
|
|
7171
7420
|
]
|
|
7172
7421
|
);
|
|
7173
7422
|
}
|
|
@@ -7318,7 +7567,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7318
7567
|
veScaIds.treasury,
|
|
7319
7568
|
scaCoin,
|
|
7320
7569
|
unlockAtInSecondTimestamp,
|
|
7321
|
-
|
|
7570
|
+
txBlock.sharedObjectRef({
|
|
7571
|
+
objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
|
|
7572
|
+
mutable: false,
|
|
7573
|
+
initialSharedVersion: "1"
|
|
7574
|
+
})
|
|
7322
7575
|
],
|
|
7323
7576
|
[]
|
|
7324
7577
|
);
|
|
@@ -7333,7 +7586,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7333
7586
|
veScaIds.table,
|
|
7334
7587
|
veScaIds.treasury,
|
|
7335
7588
|
newUnlockAtInSecondTimestamp,
|
|
7336
|
-
|
|
7589
|
+
txBlock.sharedObjectRef({
|
|
7590
|
+
objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
|
|
7591
|
+
mutable: false,
|
|
7592
|
+
initialSharedVersion: "1"
|
|
7593
|
+
})
|
|
7337
7594
|
],
|
|
7338
7595
|
[]
|
|
7339
7596
|
);
|
|
@@ -7348,7 +7605,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7348
7605
|
veScaIds.table,
|
|
7349
7606
|
veScaIds.treasury,
|
|
7350
7607
|
scaCoin,
|
|
7351
|
-
|
|
7608
|
+
txBlock.sharedObjectRef({
|
|
7609
|
+
objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
|
|
7610
|
+
mutable: false,
|
|
7611
|
+
initialSharedVersion: "1"
|
|
7612
|
+
})
|
|
7352
7613
|
],
|
|
7353
7614
|
[]
|
|
7354
7615
|
);
|
|
@@ -7364,7 +7625,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7364
7625
|
veScaIds.treasury,
|
|
7365
7626
|
scaCoin,
|
|
7366
7627
|
newUnlockAtInSecondTimestamp,
|
|
7367
|
-
|
|
7628
|
+
txBlock.sharedObjectRef({
|
|
7629
|
+
objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
|
|
7630
|
+
mutable: false,
|
|
7631
|
+
initialSharedVersion: "1"
|
|
7632
|
+
})
|
|
7368
7633
|
],
|
|
7369
7634
|
[]
|
|
7370
7635
|
);
|
|
@@ -7378,7 +7643,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7378
7643
|
veScaKey,
|
|
7379
7644
|
veScaIds.table,
|
|
7380
7645
|
veScaIds.treasury,
|
|
7381
|
-
|
|
7646
|
+
txBlock.sharedObjectRef({
|
|
7647
|
+
objectId: import_sui_kit8.SUI_CLOCK_OBJECT_ID,
|
|
7648
|
+
mutable: false,
|
|
7649
|
+
initialSharedVersion: "1"
|
|
7650
|
+
})
|
|
7382
7651
|
],
|
|
7383
7652
|
[]
|
|
7384
7653
|
);
|
|
@@ -7587,7 +7856,11 @@ var generateReferralNormalMethod = ({
|
|
|
7587
7856
|
referralIds.referralBindings,
|
|
7588
7857
|
txBlock.pure.id(veScaKeyId),
|
|
7589
7858
|
veScaTable,
|
|
7590
|
-
|
|
7859
|
+
txBlock.sharedObjectRef({
|
|
7860
|
+
objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
|
|
7861
|
+
mutable: false,
|
|
7862
|
+
initialSharedVersion: "1"
|
|
7863
|
+
})
|
|
7591
7864
|
],
|
|
7592
7865
|
[]
|
|
7593
7866
|
);
|
|
@@ -7603,7 +7876,11 @@ var generateReferralNormalMethod = ({
|
|
|
7603
7876
|
referralIds.referralBindings,
|
|
7604
7877
|
referralIds.authorizedWitnessList,
|
|
7605
7878
|
referralIds.referralTiers,
|
|
7606
|
-
|
|
7879
|
+
txBlock.sharedObjectRef({
|
|
7880
|
+
objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
|
|
7881
|
+
mutable: false,
|
|
7882
|
+
initialSharedVersion: "1"
|
|
7883
|
+
})
|
|
7607
7884
|
],
|
|
7608
7885
|
[coinType]
|
|
7609
7886
|
);
|
|
@@ -7617,7 +7894,11 @@ var generateReferralNormalMethod = ({
|
|
|
7617
7894
|
referralIds.version,
|
|
7618
7895
|
ticket,
|
|
7619
7896
|
referralIds.referralRevenuePool,
|
|
7620
|
-
|
|
7897
|
+
txBlock.sharedObjectRef({
|
|
7898
|
+
objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
|
|
7899
|
+
mutable: false,
|
|
7900
|
+
initialSharedVersion: "1"
|
|
7901
|
+
})
|
|
7621
7902
|
],
|
|
7622
7903
|
[coinType]
|
|
7623
7904
|
);
|
|
@@ -7631,7 +7912,11 @@ var generateReferralNormalMethod = ({
|
|
|
7631
7912
|
referralIds.version,
|
|
7632
7913
|
referralIds.referralRevenuePool,
|
|
7633
7914
|
veScaKey,
|
|
7634
|
-
|
|
7915
|
+
txBlock.sharedObjectRef({
|
|
7916
|
+
objectId: import_sui_kit9.SUI_CLOCK_OBJECT_ID,
|
|
7917
|
+
mutable: false,
|
|
7918
|
+
initialSharedVersion: "1"
|
|
7919
|
+
})
|
|
7635
7920
|
],
|
|
7636
7921
|
[coinType]
|
|
7637
7922
|
);
|
|
@@ -8075,12 +8360,12 @@ var ScallopIndexer = class {
|
|
|
8075
8360
|
};
|
|
8076
8361
|
|
|
8077
8362
|
// src/models/scallopQuery.ts
|
|
8078
|
-
var
|
|
8363
|
+
var import_utils22 = require("@mysten/sui/utils");
|
|
8079
8364
|
var ScallopQuery = class {
|
|
8080
8365
|
constructor(params = {}, instance) {
|
|
8081
8366
|
this.params = params;
|
|
8082
8367
|
this.suiKit = instance?.suiKit ?? instance?.utils?.suiKit ?? newSuiKit(params);
|
|
8083
|
-
this.walletAddress = (0,
|
|
8368
|
+
this.walletAddress = (0, import_utils22.normalizeSuiAddress)(
|
|
8084
8369
|
params.walletAddress ?? this.suiKit.currentAddress()
|
|
8085
8370
|
);
|
|
8086
8371
|
if (instance?.utils) {
|
|
@@ -8680,7 +8965,7 @@ var ScallopBuilder = class {
|
|
|
8680
8965
|
constructor(params = {}, instance) {
|
|
8681
8966
|
this.suiKit = instance?.suiKit ?? newSuiKit(params);
|
|
8682
8967
|
this.params = params;
|
|
8683
|
-
this.walletAddress = (0,
|
|
8968
|
+
this.walletAddress = (0, import_utils23.normalizeSuiAddress)(
|
|
8684
8969
|
params?.walletAddress ?? this.suiKit.currentAddress()
|
|
8685
8970
|
);
|
|
8686
8971
|
if (instance?.query) {
|
|
@@ -8827,7 +9112,7 @@ var ScallopClient = class {
|
|
|
8827
9112
|
constructor(params = {}, instance) {
|
|
8828
9113
|
this.params = params;
|
|
8829
9114
|
this.suiKit = instance?.suiKit ?? instance?.builder?.suiKit ?? newSuiKit(params);
|
|
8830
|
-
this.walletAddress = (0,
|
|
9115
|
+
this.walletAddress = (0, import_utils24.normalizeSuiAddress)(
|
|
8831
9116
|
params?.walletAddress ?? this.suiKit.currentAddress()
|
|
8832
9117
|
);
|
|
8833
9118
|
if (instance?.builder) {
|