@sonarwatch/portfolio-plugins 0.14.1 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +2 -2
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/debridge/airdropFetcher.js +6 -0
  6. package/src/plugins/debridge/airdropFetcher.js.map +1 -1
  7. package/src/plugins/debridge/constants.d.ts +3 -1
  8. package/src/plugins/debridge/constants.js +4 -2
  9. package/src/plugins/debridge/constants.js.map +1 -1
  10. package/src/plugins/debridge/dlmmVaultsFetcher.d.ts +3 -0
  11. package/src/plugins/debridge/dlmmVaultsFetcher.js +158 -0
  12. package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -0
  13. package/src/plugins/debridge/dlmmVaultsJob.d.ts +3 -0
  14. package/src/plugins/debridge/dlmmVaultsJob.js +42 -0
  15. package/src/plugins/debridge/dlmmVaultsJob.js.map +1 -0
  16. package/src/plugins/debridge/index.js +7 -2
  17. package/src/plugins/debridge/index.js.map +1 -1
  18. package/src/plugins/deepbook/airdropFetcher.js +36 -14
  19. package/src/plugins/deepbook/airdropFetcher.js.map +1 -1
  20. package/src/plugins/jupiter/launchpad/constants.js +1 -1
  21. package/src/plugins/kamino/{s2AirdropFetcher.js → s2AirdropFetcher.old.js} +1 -1
  22. package/src/plugins/kamino/s2AirdropFetcher.old.js.map +1 -0
  23. package/src/plugins/native-stake/solana/constants.js +0 -1
  24. package/src/plugins/native-stake/solana/constants.js.map +1 -1
  25. package/src/plugins/native-stake/solana/solanaFetcher.js +11 -7
  26. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  27. package/src/plugins/nxfinance/positionsFetcher.js +1 -1
  28. package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
  29. package/src/plugins/scallop/cnyAirdropFetcher.js +1 -1
  30. package/src/plugins/scallop/cnyAirdropFetcher.js.map +1 -1
  31. package/src/plugins/scallop/constants.d.ts +9 -16
  32. package/src/plugins/scallop/constants.js +28 -44
  33. package/src/plugins/scallop/constants.js.map +1 -1
  34. package/src/plugins/scallop/index.js +7 -1
  35. package/src/plugins/scallop/index.js.map +1 -1
  36. package/src/plugins/scallop/lendingsFetcher.js +149 -79
  37. package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
  38. package/src/plugins/scallop/marketJob.js.map +1 -1
  39. package/src/plugins/scallop/obligationsFetcher.js +2 -2
  40. package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
  41. package/src/plugins/scallop/poolsJob.js +14 -5
  42. package/src/plugins/scallop/poolsJob.js.map +1 -1
  43. package/src/plugins/scallop/sCoinJob.js +2 -1
  44. package/src/plugins/scallop/sCoinJob.js.map +1 -1
  45. package/src/plugins/scallop/types/address.d.ts +1 -0
  46. package/src/plugins/scallop/types/basic.d.ts +4 -0
  47. package/src/plugins/scallop/types/coin.d.ts +18 -8
  48. package/src/plugins/scallop/types/coin.js +50 -2
  49. package/src/plugins/scallop/types/coin.js.map +1 -1
  50. package/src/plugins/scallop/types/data.d.ts +7 -5
  51. package/src/plugins/scallop/types/index.d.ts +2 -0
  52. package/src/plugins/scallop/types/index.js +2 -0
  53. package/src/plugins/scallop/types/index.js.map +1 -1
  54. package/src/plugins/scallop/types/spool.d.ts +10 -0
  55. package/src/plugins/scallop/types/spool.js +3 -0
  56. package/src/plugins/scallop/types/spool.js.map +1 -0
  57. package/src/plugins/scallop/types/sui.d.ts +2 -0
  58. package/src/plugins/scallop/types/sui.js +3 -0
  59. package/src/plugins/scallop/types/sui.js.map +1 -0
  60. package/src/plugins/scallop/types/vesca.d.ts +9 -12
  61. package/src/plugins/scallop/veScaFetcher.js +1 -1
  62. package/src/plugins/scallop/veScaFetcher.js.map +1 -1
  63. package/src/plugins/vaultka/constants.d.ts +8 -0
  64. package/src/plugins/vaultka/constants.js +31 -0
  65. package/src/plugins/vaultka/constants.js.map +1 -0
  66. package/src/plugins/vaultka/index.d.ts +6 -0
  67. package/src/plugins/vaultka/index.js +15 -0
  68. package/src/plugins/vaultka/index.js.map +1 -0
  69. package/src/plugins/vaultka/lendingFetcher.d.ts +3 -0
  70. package/src/plugins/vaultka/lendingFetcher.js +58 -0
  71. package/src/plugins/vaultka/lendingFetcher.js.map +1 -0
  72. package/src/plugins/vaultka/lendingJob.d.ts +3 -0
  73. package/src/plugins/vaultka/lendingJob.js +32 -0
  74. package/src/plugins/vaultka/lendingJob.js.map +1 -0
  75. package/src/plugins/vaultka/strategyFetcher.d.ts +3 -0
  76. package/src/plugins/vaultka/strategyFetcher.js +63 -0
  77. package/src/plugins/vaultka/strategyFetcher.js.map +1 -0
  78. package/src/plugins/vaultka/strategyJob.d.ts +3 -0
  79. package/src/plugins/vaultka/strategyJob.js +32 -0
  80. package/src/plugins/vaultka/strategyJob.js.map +1 -0
  81. package/src/plugins/vaultka/structs.d.ts +59 -0
  82. package/src/plugins/vaultka/structs.js +58 -0
  83. package/src/plugins/vaultka/structs.js.map +1 -0
  84. package/src/utils/sui/types.d.ts +4 -0
  85. package/src/plugins/kamino/s2AirdropFetcher.js.map +0 -1
  86. /package/src/plugins/kamino/{s2AirdropFetcher.d.ts → s2AirdropFetcher.old.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA8E;AAC9E,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4E;AAC5E,oDAAoE;AACpE,2CAIqB;AACrB,qEAAkE;AAElE,+DAA4D;AAE5D,MAAM,cAAc,GAAG,IAAI,6BAAa,CACtC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU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AI,EAAE;iBAEpC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA8E;AAC9E,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4E;AAC5E,oDAAoE;AACpE,2CAIqB;AACrB,qEAAkE;AAElE,+DAA4D;AAE5D,MAAM,cAAc,GAAG,IAAI,6BAAa,CACtC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,CACxC,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,6BAAmB,EAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,4BAAkB,EAClB,0BAAc,EACd,OAAO,CACR,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1C,MAAM,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CA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iter(void 0, void 0, void 0, function* (
57
57
  const amount = new bignumber_js_1.default(deposit.depositNote).multipliedBy(supplyNoteRate);
58
58
  const asset = {
59
59
  address: deposit.tokenMint,
60
- amount: amount,
60
+ amount,
61
61
  };
62
62
  if (constants_1.leverageVaultsMints.includes(deposit.tokenMint)) {
63
63
  elementBorrowlend.addSuppliedAsset(asset);
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAiE;AACjE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,sBAAsB,GAAG,mBAAS,CAAC,sBAAsB,CAC7D;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,cAAE,CAAC,QAAQ,EAAE,CAAC,EACf,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACf,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KACvB,EACD,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC;IAEL,MAAM,aAAa,GAAG,CACpB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,oCAAwB,EACxB,CAAC,sBAAsB,CAAC,CACzB,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CA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C,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAiE;AACjE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,sBAAsB,GAAG,mBAAS,CAAC,sBAAsB,CAC7D;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,cAAE,CAAC,QAAQ,EAAE,CAAC,EACf,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACf,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KACvB,EACD,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC;IAEL,MAAM,aAAa,GAAG,CACpB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,oCAAwB,EACxB,CAAC,sBAAsB,CAAC,CACzB,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC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,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -50,7 +50,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
50
50
  type: 'address',
51
51
  value: owner,
52
52
  },
53
- parentId: constants_1.tableId,
53
+ parentId: constants_1.cnyTableId,
54
54
  });
55
55
  if (claimStatus.data)
56
56
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"cnyAirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/cnyAirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,qCAAoD;AACpD,gEAAqC;AACrC,kDAA6C;AAG7C,2CAA8D;AAC9D,iFAA8E;AAE9E,qGAA6E;AAC7E,iDAA6C;AAC7C,iDAAmD;AAEnD,SAAS,SAAS,CAAC,SAAiB;IAClC,IAAI,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IAEjC,MAAM,GAAG,GAAG,IAAI,SAAG,CAAC,IAAA,sBAAgB,GAAE,CAAC,CAAC;IACxC,GAAG,CAAC,kBAAkB,CAAC,YAAY,EAAE;QACnC,MAAM,EAAE,YAAY;QACpB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9D,OAAO,IAAA,sBAAS,EAAC,WAAW,CAAC,MAAM,CAAC;SACjC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACjB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAED,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,SAAS,GA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op-scoin";
7
7
  export declare const poolsPrefix = "scallop-pools";
8
8
  export declare const spoolsPrefix = "scallop-spoolsmarket";
9
- export declare const addressEndpoint = "https://sui.apis.scallop.io/addresses/664dfe22898c36c159e28bc8";
9
+ export declare const addressEndpoint = "https://sui.apis.scallop.io/addresses/66f8e7ed9bb9e07fdfb86bbb";
10
10
  export declare const addressKey = "scallop-address-key";
11
11
  export declare const marketKey = "scallop-market-key";
12
12
  export declare const poolsKey = "scallop-pools-key";
13
13
  export declare const scoinKey = "scallop-scoin-key";
14
14
  export declare const spoolsKey = "scallop-spoolsmarket-key";
15
- export declare const spoolAccountPackageId = "0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a::spool_account::SpoolAccount";
16
- export declare const marketCoinPackageId = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::reserve::MarketCoin";
17
- export declare const obligationKeyPackageId = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::obligation::ObligationKey";
15
+ export declare const sPoolAccountType = "0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a::spool_account::SpoolAccount";
16
+ export declare const veScaKeyType = "0xcfe2d87aa5712b67cad2732edb6a2201bfdf592377e5c0968b7cb02099bd8e21::ve_sca::VeScaKey";
17
+ export declare const marketCoinType = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::reserve::MarketCoin";
18
+ export declare const obligationKeyType = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::obligation::ObligationKey";
18
19
  export declare const baseIndexRate = 1000000000;
19
20
  export declare const scaAddress = "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
20
21
  export declare const scaDecimals = 9;
21
- export declare const tableId = "0xbfbbbdf1fe9b70cdd1ebd1444ca273000177f81a405935f6007b7727d2ff90c2";
22
+ export declare const cnyTableId = "0xbfbbbdf1fe9b70cdd1ebd1444ca273000177f81a405935f6007b7727d2ff90c2";
22
23
  export declare const airdropUrl = "https://airdrop.apis.scallop.io/cny-campaign/claim-signature/";
23
- export declare const SCOIN_NAMES: readonly ["scallop_sui", "scallop_cetus", "scallop_sca", "scallop_wormhole_usdc", "scallop_wormhole_usdt", "scallop_wormhole_eth", "scallop_af_sui", "scallop_ha_sui", "scallop_v_sui"];
24
- export declare const COIN_NAMES: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus", "sca", "afsui", "hasui", "vsui"];
25
- export declare const MARKET_COIN_NAMES: readonly ["seth", "sbtc", "susdc", "susdt", "ssui", "sapt", "ssol", "scetus", "ssca", "safsui", "shasui", "svsui"];
26
- export declare const sCoinTypesMap: {
27
- [T in sCoinNames]: string;
28
- };
29
- export type sCoinNames = (typeof SCOIN_NAMES)[number];
30
- export type CoinNames = (typeof COIN_NAMES)[number];
31
- export declare const sCoinToCoinName: {
32
- [T in sCoinNames]: CoinNames;
33
- };
24
+ export declare const scoinNames: readonly ["scallop_sui", "scallop_cetus", "scallop_sca", "scallop_wormhole_usdc", "scallop_wormhole_usdt", "scallop_wormhole_eth", "scallop_wormhole_btc", "scallop_wormhole_sol", "scallop_af_sui", "scallop_ha_sui", "scallop_v_sui", "scallop_usdc"];
25
+ export declare const coinNames: readonly ["weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "sca", "afsui", "hasui", "vsui", "usdc"];
26
+ export declare const marketCoinNames: readonly ["sweth", "swbtc", "swusdc", "swusdt", "ssui", "swapt", "swsol", "scetus", "ssca", "safsui", "shasui", "svsui", "susdc"];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sCoinToCoinName = exports.sCoinTypesMap = exports.MARKET_COIN_NAMES = exports.COIN_NAMES = exports.SCOIN_NAMES = exports.airdropUrl = exports.tableId = exports.scaDecimals = exports.scaAddress = exports.baseIndexRate = exports.obligationKeyPackageId = exports.marketCoinPackageId = exports.spoolAccountPackageId = exports.spoolsKey = exports.scoinKey = exports.poolsKey = exports.marketKey = exports.addressKey = exports.addressEndpoint = exports.spoolsPrefix = exports.poolsPrefix = exports.scoinPrefix = exports.marketPrefix = exports.addressPrefix = exports.platform = exports.platformId = void 0;
3
+ exports.marketCoinNames = exports.coinNames = exports.scoinNames = exports.airdropUrl = exports.cnyTableId = exports.scaDecimals = exports.scaAddress = exports.baseIndexRate = exports.obligationKeyType = exports.marketCoinType = exports.veScaKeyType = exports.sPoolAccountType = exports.spoolsKey = exports.scoinKey = exports.poolsKey = exports.marketKey = exports.addressKey = exports.addressEndpoint = exports.spoolsPrefix = exports.poolsPrefix = exports.scoinPrefix = exports.marketPrefix = exports.addressPrefix = exports.platform = exports.platformId = void 0;
4
4
  exports.platformId = 'scallop';
5
5
  exports.platform = {
6
6
  id: exports.platformId,
@@ -14,80 +14,64 @@ exports.marketPrefix = `${exports.platformId}-market`;
14
14
  exports.scoinPrefix = `${exports.platformId}-scoin`;
15
15
  exports.poolsPrefix = `${exports.platformId}-pools`;
16
16
  exports.spoolsPrefix = `${exports.platformId}-spoolsmarket`;
17
- exports.addressEndpoint = 'https://sui.apis.scallop.io/addresses/664dfe22898c36c159e28bc8';
17
+ exports.addressEndpoint = 'https://sui.apis.scallop.io/addresses/66f8e7ed9bb9e07fdfb86bbb';
18
18
  exports.addressKey = 'scallop-address-key';
19
19
  exports.marketKey = 'scallop-market-key';
20
20
  exports.poolsKey = 'scallop-pools-key';
21
21
  exports.scoinKey = 'scallop-scoin-key';
22
22
  exports.spoolsKey = 'scallop-spoolsmarket-key';
23
- exports.spoolAccountPackageId = `0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a::spool_account::SpoolAccount`;
24
- const PROTOCOL_OBJECT_ID = '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf';
25
- exports.marketCoinPackageId = `${PROTOCOL_OBJECT_ID}::reserve::MarketCoin`;
26
- exports.obligationKeyPackageId = `${PROTOCOL_OBJECT_ID}::obligation::ObligationKey`;
23
+ exports.sPoolAccountType = `0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a::spool_account::SpoolAccount`;
24
+ exports.veScaKeyType = '0xcfe2d87aa5712b67cad2732edb6a2201bfdf592377e5c0968b7cb02099bd8e21::ve_sca::VeScaKey';
25
+ const scallopPackageId = '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf';
26
+ exports.marketCoinType = `${scallopPackageId}::reserve::MarketCoin`;
27
+ exports.obligationKeyType = `${scallopPackageId}::obligation::ObligationKey`;
27
28
  exports.baseIndexRate = 1000000000;
28
29
  exports.scaAddress = '0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA';
29
30
  exports.scaDecimals = 9;
30
- exports.tableId = '0xbfbbbdf1fe9b70cdd1ebd1444ca273000177f81a405935f6007b7727d2ff90c2';
31
+ exports.cnyTableId = '0xbfbbbdf1fe9b70cdd1ebd1444ca273000177f81a405935f6007b7727d2ff90c2';
31
32
  exports.airdropUrl = 'https://airdrop.apis.scallop.io/cny-campaign/claim-signature/';
32
- exports.SCOIN_NAMES = [
33
+ exports.scoinNames = [
33
34
  'scallop_sui',
34
35
  'scallop_cetus',
35
36
  'scallop_sca',
36
37
  'scallop_wormhole_usdc',
37
38
  'scallop_wormhole_usdt',
38
39
  'scallop_wormhole_eth',
40
+ 'scallop_wormhole_btc',
41
+ 'scallop_wormhole_sol',
39
42
  'scallop_af_sui',
40
43
  'scallop_ha_sui',
41
44
  'scallop_v_sui',
45
+ 'scallop_usdc',
42
46
  ];
43
- exports.COIN_NAMES = [
44
- 'eth',
45
- 'btc',
46
- 'usdc',
47
- 'usdt',
47
+ exports.coinNames = [
48
+ 'weth',
49
+ 'wbtc',
50
+ 'wusdc',
51
+ 'wusdt',
48
52
  'sui',
49
- 'apt',
50
- 'sol',
53
+ 'wapt',
54
+ 'wsol',
51
55
  'cetus',
52
56
  'sca',
53
57
  'afsui',
54
58
  'hasui',
55
59
  'vsui',
60
+ 'usdc',
56
61
  ];
57
- exports.MARKET_COIN_NAMES = [
58
- 'seth',
59
- 'sbtc',
60
- 'susdc',
61
- 'susdt',
62
+ exports.marketCoinNames = [
63
+ 'sweth',
64
+ 'swbtc',
65
+ 'swusdc',
66
+ 'swusdt',
62
67
  'ssui',
63
- 'sapt',
64
- 'ssol',
68
+ 'swapt',
69
+ 'swsol',
65
70
  'scetus',
66
71
  'ssca',
67
72
  'safsui',
68
73
  'shasui',
69
74
  'svsui',
75
+ 'susdc',
70
76
  ];
71
- exports.sCoinTypesMap = {
72
- scallop_sui: '0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI',
73
- scallop_cetus: '0xea346ce428f91ab007210443efcea5f5cdbbb3aae7e9affc0ca93f9203c31f0c::scallop_cetus::SCALLOP_CETUS',
74
- scallop_sca: '0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA',
75
- scallop_wormhole_usdc: '0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC',
76
- scallop_wormhole_usdt: '0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT',
77
- scallop_wormhole_eth: '0x67540ceb850d418679e69f1fb6b2093d6df78a2a699ffc733f7646096d552e9b::scallop_wormhole_eth::SCALLOP_WORMHOLE_ETH',
78
- scallop_af_sui: '0x00671b1fa2a124f5be8bdae8b91ee711462c5d9e31bda232e70fd9607b523c88::scallop_af_sui::SCALLOP_AF_SUI',
79
- scallop_ha_sui: '0x9a2376943f7d22f88087c259c5889925f332ca4347e669dc37d54c2bf651af3c::scallop_ha_sui::SCALLOP_HA_SUI',
80
- scallop_v_sui: '0xe1a1cc6bcf0001a015eab84bcc6713393ce20535f55b8b6f35c142e057a25fbe::scallop_v_sui::SCALLOP_V_SUI',
81
- };
82
- exports.sCoinToCoinName = {
83
- scallop_sui: 'sui',
84
- scallop_cetus: 'cetus',
85
- scallop_sca: 'sca',
86
- scallop_wormhole_usdc: 'usdc',
87
- scallop_wormhole_usdt: 'usdt',
88
- scallop_wormhole_eth: 'eth',
89
- scallop_af_sui: 'afsui',
90
- scallop_ha_sui: 'hasui',
91
- scallop_v_sui: 'vsui',
92
- };
93
77
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,YAAY,GAAG,GAAG,kBAAU,SAAS,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,YAAY,GAAG,GAAG,kBAAU,eAAe,CAAC;AAE5C,QAAA,eAAe,GAC1B,gEAAgE,CAAC;AACtD,QAAA,UAAU,GAAG,qBAAqB,CAAC;AACnC,QAAA,SAAS,GAAG,oBAAoB,CAAC;AACjC,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,SAAS,GAAG,0BAA0B,CAAC;AAEvC,QAAA,qBAAqB,GAAG,iGAAiG,CAAC;AACvI,MA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;IAC7B,qBAAqB,EAAE,MAAM;IAC7B,oBAAoB,EAAE,KAAK;IAC3B,cAAc,EAAE,OAAO;IACvB,cAAc,EAAE,OAAO;IACvB,aAAa,EAAE,MAAM;CACtB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,YAAY,GAAG,GAAG,kBAAU,SAAS,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,YAAY,GAAG,GAAG,kBAAU,eAAe,CAAC;AAE5C,QAAA,eAAe,GAC1B,gEAAgE,CAAC;AACtD,QAAA,UAAU,GAAG,qBAAqB,CAAC;AACnC,QAAA,SAAS,GAAG,oBAAoB,CAAC;AACjC,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,SAAS,GAAG,0BAA0B,CAAC;AAEvC,QAAA,gBAAgB,GAAG,iGAAiG,CAAC;AACrH,QAAA,YAAY,GACvB,sFAAsF,CAAC;AAEzF,MAAM,gBAAgB,GACpB,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GAAG,GAAG,gBAAgB,uBAAuB,CAAC;AAC5D,QAAA,iBAAiB,GAAG,GAAG,gBAAgB,6BAA6B,CAAC;AAErE,QAAA,aAAa,GAAG,UAAa,CAAC;AAC9B,QAAA,UAAU,GACrB,8EAA8E,CAAC;AACpE,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,UAAU,GACrB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GACrB,+DAA+D,CAAC;AAErD,QAAA,UAAU,GAAG;IACxB,aAAa;IACb,eAAe;IACf,aAAa;IACb,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,cAAc;CACN,CAAC;AAEE,QAAA,SAAS,GAAG;IACvB,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC;AAEE,QAAA,eAAe,GAAG;IAC7B,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;CACC,CAAC"}
@@ -14,7 +14,13 @@ const veScaFetcher_1 = __importDefault(require("./veScaFetcher"));
14
14
  const obligationsFetcher_1 = __importDefault(require("./obligationsFetcher"));
15
15
  const cnyAirdropFetcher_1 = __importDefault(require("./cnyAirdropFetcher"));
16
16
  const constants_1 = require("./constants");
17
- exports.jobs = [addressJob_1.default, sCoinJob_1.default, poolsJob_1.default, marketJob_1.default, spoolsMarketJob_1.default];
17
+ exports.jobs = [
18
+ addressJob_1.default,
19
+ sCoinJob_1.default,
20
+ poolsJob_1.default,
21
+ marketJob_1.default,
22
+ spoolsMarketJob_1.default,
23
+ ];
18
24
  exports.fetchers = [
19
25
  lendingsFetcher_1.default,
20
26
  obligationsFetcher_1.default,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,8DAAsC;AACtC,4DAAoC;AACpC,wEAAgD;AAChD,0DAAkC;AAElC,wEAAgD;AAChD,kEAA0C;AAC1C,8EAAsD;AACtD,4EAAmD;AACnD,2CAAuC;AAE1B,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,kBAAQ,EAAE,kBAAQ,EAAE,mBAAS,EAAE,yBAAe,CAAC,CAAC;AAC3E,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,4BAAkB;IAClB,sBAAY;IACZ,2BAAgB;CACjB,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,8DAAsC;AACtC,4DAAoC;AACpC,wEAAgD;AAChD,0DAAkC;AAElC,wEAAgD;AAChD,kEAA0C;AAC1C,8EAAsD;AACtD,4EAAmD;AACnD,2CAAuC;AAE1B,QAAA,IAAI,GAAU;IACzB,oBAAU;IACV,kBAAQ;IACR,kBAAQ;IACR,mBAAS;IACT,yBAAe;CAChB,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,4BAAkB;IAClB,sBAAY;IACZ,2BAAgB;CACjB,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
@@ -12,15 +12,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
15
17
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
18
  const utils_1 = require("@mysten/sui/utils");
17
19
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
20
  const constants_1 = require("./constants");
19
21
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
+ const types_1 = require("./types");
20
23
  const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
21
24
  const clients_1 = require("../../utils/clients");
22
25
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
24
26
  const elements = [];
25
27
  const borrowedAssets = [];
26
28
  const borrowedYields = [];
@@ -39,25 +41,31 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
39
41
  return [];
40
42
  }
41
43
  const poolValues = Object.values(pools);
42
- const sCoinValues = Object.values(sCoins);
43
44
  if (poolValues.length === 0) {
44
45
  return [];
45
46
  }
47
+ const sCoinValues = Object.values(sCoins);
48
+ // {'0x...': CoinMetaData }
49
+ const poolValuesMetadataMap = poolValues.reduce((acc, poolValue) => {
50
+ if (poolValue.metadata)
51
+ acc[poolValue.coinType] = poolValue.metadata;
52
+ return acc;
53
+ }, {});
46
54
  const client = (0, clients_1.getClientSui)();
47
55
  const filterOwnerObject = {
48
56
  MatchAny: [
49
57
  ...poolValues.map((value) => ({
50
- StructType: `0x2::coin::Coin<${constants_1.marketCoinPackageId}<${value.coinType}>>`,
58
+ StructType: `0x2::coin::Coin<${constants_1.marketCoinType}<${value.coinType}>>`,
51
59
  })),
52
60
  ...sCoinValues.map(({ coinType }) => ({
53
61
  StructType: `0x2::coin::Coin<${coinType}>`,
54
62
  })),
55
63
  {
56
- StructType: constants_1.spoolAccountPackageId,
64
+ StructType: constants_1.sPoolAccountType,
57
65
  },
58
66
  ],
59
67
  };
60
- const [allOwnedObjects, marketData, spoolData] = yield Promise.all([
68
+ const [allOwnedObjects, marketData, spoolData, addressData] = yield Promise.all([
61
69
  (0, getOwnedObjects_1.getOwnedObjects)(client, owner, { filter: filterOwnerObject }),
62
70
  cache.getItem(constants_1.marketKey, {
63
71
  prefix: constants_1.marketPrefix,
@@ -67,12 +75,18 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
67
75
  prefix: constants_1.spoolsPrefix,
68
76
  networkId: portfolio_core_1.NetworkId.sui,
69
77
  }),
78
+ cache.getItem(constants_1.addressKey, {
79
+ prefix: constants_1.addressPrefix,
80
+ networkId: portfolio_core_1.NetworkId.sui,
81
+ }),
70
82
  ]);
71
83
  const fetchedDataIncomplete = !marketData ||
72
84
  !spoolData ||
85
+ !addressData ||
73
86
  allOwnedObjects.length === 0 ||
74
87
  Object.keys(marketData).length === 0 ||
75
- Object.keys(spoolData).length === 0;
88
+ Object.keys(spoolData).length === 0 ||
89
+ Object.keys(addressData).length === 0;
76
90
  if (fetchedDataIncomplete) {
77
91
  return [];
78
92
  }
@@ -87,83 +101,140 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
87
101
  });
88
102
  // get user lending assets
89
103
  const lendingAssets = {};
90
- const stakedAccount = {};
91
- for (const ownedMarketCoin of allOwnedObjects) {
92
- const objType = (_a = ownedMarketCoin.data) === null || _a === void 0 ? void 0 : _a.type;
104
+ const stakedAccounts = {};
105
+ const isSpoolAccount = (obj) => {
106
+ var _a;
107
+ const objType = (_a = obj.data) === null || _a === void 0 ? void 0 : _a.type;
93
108
  if (!objType)
94
- continue;
95
- const parsed = (0, utils_1.parseStructTag)(objType);
96
- const coinType = (0, utils_1.normalizeStructTag)(objType.substring(objType.indexOf('MarketCoin<') + 11, objType.indexOf('>')));
97
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
98
- const fields = (_c = (_b = ownedMarketCoin.data) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.fields;
99
- const coinName = (_e = (_d = poolValues
100
- .find((value) => value.coinType === coinType)) === null || _d === void 0 ? void 0 : _d.metadata) === null || _e === void 0 ? void 0 : _e.symbol.toLowerCase();
101
- if (!coinName || !fields)
102
- continue;
103
- if (!lendingAssets[coinName]) {
104
- lendingAssets[coinName] = { coinType, amount: new bignumber_js_1.default(0) };
105
- }
106
- if (fields['stakes']) {
107
- if (!stakedAccount[`s${coinName}`]) {
108
- stakedAccount[`s${coinName}`] = [];
109
- }
110
- stakedAccount[`s${coinName}`].push({
111
- points: fields['points'],
112
- index: fields['index'],
113
- stakes: fields['stakes'],
114
- });
115
- }
116
- const balance = (0, bignumber_js_1.default)((_f = (parsed.name === 'Coin' ? fields['balance'] : fields['stakes'])) !== null && _f !== void 0 ? _f : 0);
117
- lendingAssets[coinName] = Object.assign(Object.assign({}, lendingAssets[coinName]), { amount: lendingAssets[coinName].amount.plus(balance) });
118
- }
119
- // add support for new sCoin
120
- allOwnedObjects
121
- .filter((obj) => {
109
+ return false;
110
+ const { address, module, name } = (0, utils_1.parseStructTag)((0, utils_1.normalizeStructTag)(objType));
111
+ return `${address}::${module}::${name}` === constants_1.sPoolAccountType;
112
+ };
113
+ const isSCoin = (obj) => {
122
114
  var _a;
123
115
  const objType = (_a = obj.data) === null || _a === void 0 ? void 0 : _a.type;
124
116
  if (!objType)
125
117
  return false;
126
118
  const parsed = (0, utils_1.parseStructTag)(objType);
127
- const subParsed = parsed.typeParams[0];
128
- return !(parsed.name !== 'Coin' ||
129
- !constants_1.sCoinToCoinName[subParsed.name.toLowerCase()]);
130
- })
131
- .forEach((sCoin) => {
132
- var _a, _b, _c, _d;
133
- if (!sCoin.data)
134
- return;
135
- const types = (0, utils_1.parseStructTag)(sCoin.data.type);
136
- const firstCoin = types.typeParams[0];
137
- const coinName = firstCoin.name.toLowerCase();
138
- const coinType = `${firstCoin.address}::${firstCoin.module}::${firstCoin.name}`;
139
- const lendingAssetName = constants_1.sCoinToCoinName[coinName];
140
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
141
- const fields = (_b = (_a = sCoin.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields;
142
- if (!lendingAssets[lendingAssetName]) {
143
- lendingAssets[lendingAssetName] = {
144
- amount: new bignumber_js_1.default((_c = fields['balance']) !== null && _c !== void 0 ? _c : 0),
145
- coinType,
146
- };
119
+ const isCoin = parsed.name === 'Coin';
120
+ const sCoinTypeParsed = parsed.typeParams[0];
121
+ const isObjectSCoin = !!types_1.sCoinToCoinName[sCoinTypeParsed.name.toLowerCase()];
122
+ return isCoin && isObjectSCoin;
123
+ };
124
+ const isMarketCoin = (obj) => {
125
+ var _a;
126
+ const objType = (_a = obj.data) === null || _a === void 0 ? void 0 : _a.type;
127
+ if (!objType)
128
+ return false;
129
+ const { address, module, name } = (0, utils_1.parseStructTag)(objType);
130
+ const isCoin = name === 'Coin';
131
+ const isObjectMarketCoin = address === addressData.mainnet.core.object &&
132
+ module === 'reserve' &&
133
+ name === 'MarketCoin';
134
+ return isCoin && isObjectMarketCoin;
135
+ };
136
+ allOwnedObjects.forEach((obj) => {
137
+ var _a, _b, _c, _d, _e, _f, _g, _h;
138
+ if (isMarketCoin(obj)) {
139
+ const marketCoinObj = obj.data;
140
+ if (!marketCoinObj)
141
+ return;
142
+ // access underlying asset type from market coin struct
143
+ // 0x2::coin::Coin<T>
144
+ const { address, module, name } = (0, utils_1.parseStructTag)((0, utils_1.normalizeStructTag)(marketCoinObj.type)).typeParams[0];
145
+ const coinType = `${address}::${module}::${name}`;
146
+ const coinName = (_a = poolValuesMetadataMap[coinType]) === null || _a === void 0 ? void 0 : _a.symbol.toLowerCase();
147
+ if (!coinName)
148
+ return;
149
+ const coinBalance = (0, bignumber_js_1.default)((_c = (_b = marketCoinObj.content) === null || _b === void 0 ? void 0 : _b.fields.balance) !== null && _c !== void 0 ? _c : 0);
150
+ if (!coinName)
151
+ return;
152
+ if (lendingAssets[coinName]) {
153
+ lendingAssets[coinName].amount =
154
+ lendingAssets[coinName].amount.plus(coinBalance);
155
+ }
156
+ else {
157
+ lendingAssets[coinName] = { coinType, amount: coinBalance };
158
+ }
147
159
  }
148
- else {
149
- lendingAssets[lendingAssetName].amount = lendingAssets[lendingAssetName].amount.plus(new bignumber_js_1.default((_d = fields['balance']) !== null && _d !== void 0 ? _d : 0));
160
+ else if (isSpoolAccount(obj)) {
161
+ const spoolObj = obj.data;
162
+ const fields = (_d = spoolObj === null || spoolObj === void 0 ? void 0 : spoolObj.content) === null || _d === void 0 ? void 0 : _d.fields;
163
+ if (!fields)
164
+ return;
165
+ // parse market coin struct inside the spoolAccount struct
166
+ // 0x...::spool_account::SpoolAccount<0x..::reserve::MarketCoin<T>>
167
+ const marketCoinStruct = (0, utils_1.parseStructTag)((0, utils_1.normalizeStructTag)(spoolObj.type))
168
+ .typeParams[0];
169
+ const { address, module, name } = marketCoinStruct
170
+ .typeParams[0];
171
+ const stakeType = `${address}::${module}::${name}`;
172
+ const coinName = (_e = poolValuesMetadataMap[stakeType]) === null || _e === void 0 ? void 0 : _e.symbol.toLowerCase();
173
+ if (!coinName)
174
+ return;
175
+ // sui -> ssui, usdc -> susdc, ...
176
+ const spoolName = `s${coinName}`;
177
+ const { stakes, points, index } = fields;
178
+ if (!stakedAccounts[spoolName]) {
179
+ stakedAccounts[spoolName] = [];
180
+ }
181
+ stakedAccounts[spoolName].push({
182
+ stakes,
183
+ points,
184
+ index,
185
+ });
186
+ const stakeBalance = (0, bignumber_js_1.default)(stakes);
187
+ if (lendingAssets[coinName]) {
188
+ lendingAssets[coinName].amount =
189
+ lendingAssets[coinName].amount.plus(stakeBalance);
190
+ }
191
+ else {
192
+ lendingAssets[coinName] = { coinType: stakeType, amount: stakeBalance };
193
+ }
194
+ }
195
+ else if (isSCoin(obj)) {
196
+ const marketCoinObj = obj.data;
197
+ if (!marketCoinObj)
198
+ return;
199
+ // access underlying asset type from market coin struct
200
+ // 0x2::coin::Coin<T>
201
+ const { address, module, name } = (0, utils_1.parseStructTag)((0, utils_1.normalizeStructTag)(marketCoinObj.type)).typeParams[0];
202
+ // convert sCoinType to coinType
203
+ const sCoinType = `${address}::${module}::${name}`;
204
+ const coinType = types_1.sCoinTypeToCoinTypeMap[sCoinType];
205
+ if (!coinType)
206
+ return;
207
+ const coinName = (_f = poolValuesMetadataMap[coinType]) === null || _f === void 0 ? void 0 : _f.symbol.toLowerCase();
208
+ if (!coinName)
209
+ return;
210
+ const coinBalance = (0, bignumber_js_1.default)((_h = (_g = marketCoinObj.content) === null || _g === void 0 ? void 0 : _g.fields.balance) !== null && _h !== void 0 ? _h : 0);
211
+ if (lendingAssets[coinName]) {
212
+ lendingAssets[coinName].amount =
213
+ lendingAssets[coinName].amount.plus(coinBalance);
214
+ }
215
+ else {
216
+ lendingAssets[coinName] = { coinType, amount: coinBalance };
217
+ }
150
218
  }
151
219
  });
152
220
  let pendingReward = (0, bignumber_js_1.default)(0);
153
- for (const spoolCoin of Object.keys(stakedAccount)) {
154
- for (const { points, index, stakes } of stakedAccount[spoolCoin]) {
155
- if (spoolData[spoolCoin]) {
156
- const increasedPointRate = spoolData[spoolCoin].currentPointIndex
157
- ? (0, bignumber_js_1.default)((0, bignumber_js_1.default)(spoolData[spoolCoin].currentPointIndex).minus(index)).dividedBy(constants_1.baseIndexRate)
221
+ constants_1.marketCoinNames.forEach((marketCoin) => {
222
+ if (!stakedAccounts[marketCoin])
223
+ return;
224
+ stakedAccounts[marketCoin].forEach(({ points, index, stakes }) => {
225
+ if (spoolData[marketCoin]) {
226
+ const { currentPointIndex, exchangeRateNumerator, exchangeRateDenominator, } = spoolData[marketCoin];
227
+ const increasedPointRate = currentPointIndex
228
+ ? (0, bignumber_js_1.default)((0, bignumber_js_1.default)(currentPointIndex).minus(index)).dividedBy(constants_1.baseIndexRate)
158
229
  : 0;
159
230
  pendingReward = pendingReward.plus((0, bignumber_js_1.default)(stakes)
160
231
  .multipliedBy(increasedPointRate)
161
232
  .plus(points)
162
- .multipliedBy(spoolData[spoolCoin].exchangeRateNumerator)
163
- .dividedBy(spoolData[spoolCoin].exchangeRateDenominator));
233
+ .multipliedBy(exchangeRateNumerator)
234
+ .dividedBy(exchangeRateDenominator));
164
235
  }
165
- }
166
- }
236
+ });
237
+ });
167
238
  const tokenAddresses = Object.values(lendingAssets).map((value) => value.coinType);
168
239
  const tokenPrices = yield cache.getTokenPricesAsMap([...tokenAddresses, portfolio_core_1.suiNetwork.native.address], portfolio_core_1.NetworkId.sui);
169
240
  if (pendingReward.isGreaterThan(0)) {
@@ -177,27 +248,26 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
177
248
  });
178
249
  rewardAssets.push(Object.assign({}, rewardAssetToken));
179
250
  }
180
- for (const [assetName, assetValue] of Object.entries(lendingAssets)) {
181
- if (assetValue.amount.isZero())
182
- continue;
183
- const market = marketData[assetName];
184
- if (!market)
185
- continue;
251
+ Object.entries(lendingAssets)
252
+ .filter(([assetName, assetValue]) => assetValue.amount.isGreaterThan(0) && marketData[assetName])
253
+ .forEach(([assetName, assetValue]) => {
254
+ var _a, _b, _c, _d;
255
+ const { supplyInterestRate } = marketData[assetName];
186
256
  const addressMove = (0, portfolio_core_1.formatMoveTokenAddress)(assetValue.coinType);
187
257
  const tokenPrice = tokenPrices.get(addressMove);
188
258
  const lendingAmount = assetValue.amount
189
- .multipliedBy((_g = lendingRate.get(assetName)) !== null && _g !== void 0 ? _g : 0)
190
- .shiftedBy(-1 * ((_k = (_j = (_h = pools[assetName]) === null || _h === void 0 ? void 0 : _h.metadata) === null || _j === void 0 ? void 0 : _j.decimals) !== null && _k !== void 0 ? _k : 0))
259
+ .multipliedBy((_a = lendingRate.get(assetName)) !== null && _a !== void 0 ? _a : 0)
260
+ .shiftedBy(-1 * ((_d = (_c = (_b = pools[assetName]) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.decimals) !== null && _d !== void 0 ? _d : 0))
191
261
  .toNumber();
192
262
  const assetToken = (0, tokenPriceToAssetToken_1.default)(addressMove, lendingAmount, portfolio_core_1.NetworkId.sui, tokenPrice);
193
263
  suppliedYields.push([
194
264
  {
195
- apy: (0, portfolio_core_1.aprToApy)(market.supplyInterestRate),
196
- apr: market.supplyInterestRate,
265
+ apy: (0, portfolio_core_1.aprToApy)(supplyInterestRate),
266
+ apr: supplyInterestRate,
197
267
  },
198
268
  ]);
199
269
  suppliedAssets.push(assetToken);
200
- }
270
+ });
201
271
  if (suppliedAssets.length === 0 &&
202
272
  borrowedAssets.length === 0 &&
203
273
  rewardAssets.length === 0) {