@sonarwatch/portfolio-plugins 0.12.151 → 0.12.153

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/CHANGELOG.md +1389 -1375
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +2 -2
  5. package/src/index.js.map +1 -1
  6. package/src/orphanPlatforms.d.ts +5 -0
  7. package/src/{orphanPlatorms.js → orphanPlatforms.js} +21 -3
  8. package/src/orphanPlatforms.js.map +1 -0
  9. package/src/plugins/balancer/helpers/pools.js +21 -21
  10. package/src/plugins/nxfinance/constants.d.ts +4 -0
  11. package/src/plugins/nxfinance/constants.js +14 -3
  12. package/src/plugins/nxfinance/constants.js.map +1 -1
  13. package/src/plugins/nxfinance/helpers.d.ts +13 -1
  14. package/src/plugins/nxfinance/helpers.js +66 -1
  15. package/src/plugins/nxfinance/helpers.js.map +1 -1
  16. package/src/plugins/nxfinance/index.js +4 -2
  17. package/src/plugins/nxfinance/index.js.map +1 -1
  18. package/src/plugins/nxfinance/lendIdl.d.ts +256 -0
  19. package/src/plugins/nxfinance/lendIdl.js +3387 -0
  20. package/src/plugins/nxfinance/lendIdl.js.map +1 -0
  21. package/src/plugins/nxfinance/lendPositionsFetcher.d.ts +3 -0
  22. package/src/plugins/nxfinance/lendPositionsFetcher.js +97 -0
  23. package/src/plugins/nxfinance/lendPositionsFetcher.js.map +1 -0
  24. package/src/plugins/nxfinance/lendingPoolsJob.d.ts +3 -0
  25. package/src/plugins/nxfinance/lendingPoolsJob.js +30 -0
  26. package/src/plugins/nxfinance/lendingPoolsJob.js.map +1 -0
  27. package/src/plugins/nxfinance/{idl.js → leverageIdl.js} +1 -1
  28. package/src/plugins/nxfinance/leverageIdl.js.map +1 -0
  29. package/src/plugins/nxfinance/positionsFetcher.js +1 -1
  30. package/src/plugins/nxfinance/types.d.ts +26 -0
  31. package/src/plugins/scallop/cnyAirdropFetcher.js +2 -2
  32. package/src/plugins/scallop/cnyAirdropFetcher.js.map +1 -1
  33. package/src/plugins/scallop/constants.d.ts +13 -0
  34. package/src/plugins/scallop/constants.js +64 -1
  35. package/src/plugins/scallop/constants.js.map +1 -1
  36. package/src/plugins/scallop/index.js +2 -1
  37. package/src/plugins/scallop/index.js.map +1 -1
  38. package/src/plugins/scallop/lendingsFetcher.js +58 -8
  39. package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
  40. package/src/plugins/scallop/marketJob.js +1 -1
  41. package/src/plugins/scallop/marketJob.js.map +1 -1
  42. package/src/plugins/scallop/obligationsFetcher.js +2 -2
  43. package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
  44. package/src/plugins/scallop/poolsJob.js +2 -2
  45. package/src/plugins/scallop/poolsJob.js.map +1 -1
  46. package/src/plugins/scallop/sCoinJob.d.ts +3 -0
  47. package/src/plugins/scallop/sCoinJob.js +43 -0
  48. package/src/plugins/scallop/sCoinJob.js.map +1 -0
  49. package/src/plugins/scallop/spoolsMarketJob.js +2 -2
  50. package/src/plugins/scallop/spoolsMarketJob.js.map +1 -1
  51. package/src/plugins/scallop/types/coin.d.ts +1 -3
  52. package/src/plugins/scallop/types/coin.js +1 -21
  53. package/src/plugins/scallop/types/coin.js.map +1 -1
  54. package/src/plugins/scallop/types/data.d.ts +4 -0
  55. package/src/plugins/scallop/veScaFetcher.js +1 -1
  56. package/src/plugins/scallop/veScaFetcher.js.map +1 -1
  57. package/src/plugins/stargate/constants.js +1 -1
  58. package/src/plugins/stargate/constants.js.map +1 -1
  59. package/src/plugins/sushiswap/helpers.js +24 -24
  60. package/src/plugins/uniswap-v2/helpers.js +22 -22
  61. package/src/plugins/x-staking-solana/constants.d.ts +0 -7
  62. package/src/plugins/x-staking-solana/constants.js +6 -28
  63. package/src/plugins/x-staking-solana/constants.js.map +1 -1
  64. package/src/plugins/x-staking-solana/index.js +1 -6
  65. package/src/plugins/x-staking-solana/index.js.map +1 -1
  66. package/src/plugins/zeta/airdropFetcher.js +14 -14
  67. package/src/utils/sei/constants.js +8 -8
  68. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  69. package/src/orphanPlatorms.d.ts +0 -3
  70. package/src/orphanPlatorms.js.map +0 -1
  71. package/src/plugins/nxfinance/idl.js.map +0 -1
  72. /package/src/plugins/nxfinance/{idl.d.ts → leverageIdl.d.ts} +0 -0
@@ -31,17 +31,27 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
31
31
  prefix: constants_1.poolsPrefix,
32
32
  networkId: portfolio_core_1.NetworkId.sui,
33
33
  });
34
- if (!pools)
34
+ const sCoins = yield cache.getItem(constants_1.scoinKey, {
35
+ prefix: constants_1.scoinPrefix,
36
+ networkId: portfolio_core_1.NetworkId.sui,
37
+ });
38
+ if (!pools || !sCoins) {
35
39
  return [];
40
+ }
36
41
  const poolValues = Object.values(pools);
37
- if (poolValues.length === 0)
42
+ const sCoinValues = Object.values(sCoins);
43
+ if (poolValues.length === 0) {
38
44
  return [];
45
+ }
39
46
  const client = (0, clients_1.getClientSui)();
40
47
  const filterOwnerObject = {
41
48
  MatchAny: [
42
49
  ...poolValues.map((value) => ({
43
50
  StructType: `0x2::coin::Coin<${constants_1.marketCoinPackageId}<${value.coinType}>>`,
44
51
  })),
52
+ ...sCoinValues.map(({ coinType }) => ({
53
+ StructType: `0x2::coin::Coin<${coinType}>`,
54
+ })),
45
55
  {
46
56
  StructType: constants_1.spoolAccountPackageId,
47
57
  },
@@ -58,16 +68,20 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
58
68
  networkId: portfolio_core_1.NetworkId.sui,
59
69
  }),
60
70
  ]);
61
- if (!marketData || allOwnedObjects.length === 0 || !spoolData)
62
- return [];
63
- if (Object.keys(marketData).length === 0 ||
64
- Object.keys(spoolData).length === 0)
71
+ const fetchedDataIncomplete = !marketData ||
72
+ !spoolData ||
73
+ allOwnedObjects.length === 0 ||
74
+ Object.keys(marketData).length === 0 ||
75
+ Object.keys(spoolData).length === 0;
76
+ if (fetchedDataIncomplete) {
65
77
  return [];
78
+ }
66
79
  const lendingRate = new Map();
67
80
  Object.keys(pools).forEach((coinName) => {
68
81
  const market = marketData[coinName];
69
- if (!market)
82
+ if (!market) {
70
83
  return;
84
+ }
71
85
  lendingRate.set(coinName, (Number(market.debt) + Number(market.cash) - Number(market.reserve)) /
72
86
  Number(market.marketCoinSupply));
73
87
  });
@@ -102,6 +116,41 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
102
116
  const balance = (0, bignumber_js_1.default)((_f = (parsed.name === 'Coin' ? fields['balance'] : fields['stakes'])) !== null && _f !== void 0 ? _f : 0);
103
117
  lendingAssets[coinName] = Object.assign(Object.assign({}, lendingAssets[coinName]), { amount: lendingAssets[coinName].amount.plus(balance) });
104
118
  }
119
+ // add support for new sCoin
120
+ allOwnedObjects
121
+ .filter((obj) => {
122
+ var _a;
123
+ const objType = (_a = obj.data) === null || _a === void 0 ? void 0 : _a.type;
124
+ if (!objType)
125
+ return false;
126
+ const parsed = (0, utils_1.parseStructTag)(objType);
127
+ const subParsed = parsed.typeParams[0];
128
+ if (parsed.name !== 'Coin' ||
129
+ !constants_1.sCoinToCoinName[subParsed.name.toLowerCase()])
130
+ return false;
131
+ return true;
132
+ })
133
+ .forEach((sCoin) => {
134
+ var _a, _b, _c, _d;
135
+ if (!sCoin.data)
136
+ return;
137
+ const types = (0, utils_1.parseStructTag)(sCoin.data.type);
138
+ const firstCoin = types.typeParams[0];
139
+ const coinName = firstCoin.name.toLowerCase();
140
+ const coinType = `${firstCoin.address}::${firstCoin.module}::${firstCoin.name}`;
141
+ const lendingAssetName = constants_1.sCoinToCoinName[coinName];
142
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
143
+ const fields = (_b = (_a = sCoin.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields;
144
+ if (!lendingAssets[lendingAssetName]) {
145
+ lendingAssets[lendingAssetName] = {
146
+ amount: new bignumber_js_1.default((_c = fields['balance']) !== null && _c !== void 0 ? _c : 0),
147
+ coinType,
148
+ };
149
+ }
150
+ else {
151
+ lendingAssets[lendingAssetName].amount = lendingAssets[lendingAssetName].amount.plus(new bignumber_js_1.default((_d = fields['balance']) !== null && _d !== void 0 ? _d : 0));
152
+ }
153
+ });
105
154
  let pendingReward = (0, bignumber_js_1.default)(0);
106
155
  for (const spoolCoin of Object.keys(stakedAccount)) {
107
156
  for (const { points, index, stakes } of stakedAccount[spoolCoin]) {
@@ -153,8 +202,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
153
202
  }
154
203
  if (suppliedAssets.length === 0 &&
155
204
  borrowedAssets.length === 0 &&
156
- rewardAssets.length === 0)
205
+ rewardAssets.length === 0) {
157
206
  return [];
207
+ }
158
208
  const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
159
209
  elements.push({
160
210
  type: portfolio_core_1.PortfolioElementType.borrowlend,
@@ -1 +1 @@
1
- {"version":3,"file":"lendingsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/lendingsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAUoC;AACpC,gDAA0E;AAC1E,gEAAqC;AAIrC,2CAWqB;AACrB,qGAA6E;AAQ7E,qEAAkE;AAClE,iDAAmD;AAEnD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,MAAM,cAAc,GAAqB,EAAE,CAAC;IAC5C,MAAM,cAAc,GAAc,EAAE,CAAC;IACrC,MAAM,cAAc,GAAqB,EAAE,CAAC;IAC5C,MAAM,cAAc,GAAc,EAAE,CAAC;IACrC,MAAM,YAAY,GAAqB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAQ,oBAAQ,EAAE;QACjD,MAAM,EAAE,uBAAW;QACnB,SAAS,EAAE,0BA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CAAC,kBAAkB;aAC/B;SACF,CAAC,CAAC;QACH,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACD,IACE,cAAc,CAAC,MAAM,KAAK,CAAC;QAC3B,cAAc,CAAC,MAAM,KAAK,CAAC;QAC3B,YAAY,CAAC,MAAM,KAAK,CAAC;QAEzB,OAAO,EAAE,CAAC;IACZ,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5E,QAAQ,CAAC,IAAI,CAAC;QACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,WAAW;YACX,YAAY;YACZ,WAAW;YACX,KAAK;SACN;KACF,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"lendingsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/lendingsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAUoC;AACpC,gDAA0E;AAC1E,gEAAqC;AAKrC,2CAeqB;AACrB,qGAA6E;AAS7E,qEAAkE;AAClE,iDAAmD;AAEnD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,QAAQ,GAAuB,EAAE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QAC3B,cAAc,CAAC,MAAM,KAAK,CAAC;QAC3B,YAAY,CAAC,MAAM,KAAK,CAAC,EACzB,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5E,QAAQ,CAAC,IAAI,CAAC;QACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,WAAW;YACX,YAAY;YACZ,WAAW;YACX,KAAK;SACN;KACF,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -14,11 +14,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
- const clients_1 = require("../../utils/clients");
18
17
  const constants_1 = require("./constants");
19
18
  const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
20
19
  const getObject_1 = require("../../utils/sui/getObject");
21
20
  const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
21
+ const clients_1 = require("../../utils/clients");
22
22
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
23
23
  var _a, _b, _c, _d, _e, _f;
24
24
  const client = (0, clients_1.getClientSui)();
@@ -1 +1 @@
1
- {"version":3,"file":"marketJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/marketJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAOqB;AAarB,6EAAqD;AACrD,yDAAsD;AACtD,iFAA8E;AAE9E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,OAAO,CAAc,sBAAU,EAAE;QAC/D,MAAM,EAAE,yBAAa;QACrB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IACH,IAAI,CAAC,WAAW;QAAE,OAAO;IAEzB,wBAAwB;IACxB,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAQ,oBAAQ,EAAE;QACjD,MAAM,EAAE,uBAAW;QACnB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IACH,IAAI,CAAC,KAAK;QAAE,OAAO;IAEnB,MAAM,QAAQ,GAAY,WAAW,CAAC,OAAO,CAAC,IAAa,CAAC,MAAM,CAAC;IAEnE,kBAAkB;IAClB,MAAM,YAAY,GAAG,MAAM,IAAA,qBAAS,EAAa,MAAM,EAAE,QAAQ,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,MAAA,MAAA,YAAY,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC;IACtD,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,oBAAoB;IACpB,MAAM,aAAa,GAAiB,EAAE,CAAC;IACvC,MAAM,oBAAoB,GACxB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;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kBAAkB,EAAE,UAAU,CAAC,QAAQ,EAAE;YACzC,IAAI;YACJ,IAAI;YACJ,gBAAgB;YAChB,OAAO;SACR,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,qBAAS,EAAE,MAAM,EAAE;QACrC,MAAM,EAAN,wBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,wBAAM;IACV,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,kBAAe,GAAG,CAAC"}
@@ -17,15 +17,14 @@ const utils_1 = require("@mysten/sui.js/utils");
17
17
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
18
  const constants_1 = require("./constants");
19
19
  const helpers_1 = require("./helpers");
20
- const clients_1 = require("../../utils/clients");
21
20
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
21
  const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
23
22
  const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
24
23
  const getObject_1 = require("../../utils/sui/getObject");
25
24
  const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
25
+ const clients_1 = require("../../utils/clients");
26
26
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
27
27
  var _a, _b, _c, _d, _e, _f;
28
- const client = (0, clients_1.getClientSui)();
29
28
  const elements = [];
30
29
  const rewardAssets = [];
31
30
  const coinTypeMetadata = yield cache.getItem(constants_1.poolsKey, {
@@ -44,6 +43,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
44
43
  },
45
44
  ],
46
45
  };
46
+ const client = (0, clients_1.getClientSui)();
47
47
  const [ownedObligationKeys, marketData] = yield Promise.all([
48
48
  (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
49
49
  filter: filterOwnerObject,
@@ -1 +1 @@
1
- {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gDAA0D;AAC1D,gEAAqC;AAIrC,2CAOqB;AAQrB,uCAA2C;AAC3C,iDAAmD;AACnD,qGAA6E;AAC7E,6EAAqD;AAErD,qEAAkE;AAClE,yDAAsD;AACtD,iFAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,MAAM,YAAY,GAAqB,EAAE,CAAC;IAE1C,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAQ,oBAAQ,EAAE;QAC5D,MAAM,EAAE,uBAAW;QACnB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IACH,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAClD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,iBAAiB,GAAwB;QAC7C,QAAQ,EAAE;YACR;gBACE,UAAU,EAAE,kCAAsB;aACnC;SACF;KACF,CAAC;IAEF,MAAM,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1D,IAAA,iCAAe,EAAsB,MAAM,EAAE,KAAK,EAAE;YAClD,MAAM,EAAE,iBAAiB;SAC1B,CAAC;QACF,KAAK,CAAC,OAAO,CAAkB,qBAAS,EAAE;YACxC,MAAM,EAAN,wBAAM;YACN,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;KACH,CAAC,CAAC;I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AAC,MAAM,KAAK,CAAC;YAEzB,SAAS;QACX,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;QAC5E,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,GAAG,IAAA,wBAAc,EAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,cAAc;YACpD,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gDAA0D;AAC1D,gEAAqC;AAIrC,2CAOqB;AAQrB,uCAA2C;AAC3C,qGAA6E;AAC7E,6EAAqD;AAErD,qEAAkE;AAClE,yDAAsD;AACtD,iFAA8E;AAC9E,iDAAmD;AAEnD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,MAAM,YAAY,GAAqB,E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C,CAAC,cAAc;YACpD,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -12,10 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
13
  const utils_1 = require("@mysten/sui.js/utils");
14
14
  const constants_1 = require("./constants");
15
- const clients_1 = require("../../utils/clients");
16
15
  const getObject_1 = require("../../utils/sui/getObject");
16
+ const clients_1 = require("../../utils/clients");
17
17
  const SUI_TYPE = (0, utils_1.normalizeStructTag)(utils_1.SUI_TYPE_ARG);
18
- const client = (0, clients_1.getClientSui)();
19
18
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
20
19
  var _a, _b, _c;
21
20
  const address = yield cache.getItem(constants_1.addressKey, {
@@ -27,6 +26,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
27
26
  const coinTypes = {};
28
27
  const coins = new Map(Object.entries(address.mainnet.core.coins));
29
28
  const coinNames = Array.from(coins.keys());
29
+ const client = (0, clients_1.getClientSui)();
30
30
  for (const coinName of coinNames) {
31
31
  const detail = coins.get(coinName);
32
32
  if (!detail)
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,gDAAwE;AAIxE,2CAKqB;AAErB,iDAAmD;AACnD,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AM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,SAAS,EAAE;QACvC,MAAM,EAAN,uBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,uBAAM;IACV,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const clients_1 = require("../../utils/clients");
15
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
16
+ const client = (0, clients_1.getClientSui)();
17
+ const sCoinTypes = Object.entries(constants_1.sCoinTypesMap).reduce((prev, curr) => {
18
+ const [coinName, coinType] = curr;
19
+ // eslint-disable-next-line no-param-reassign
20
+ prev[coinName] = {
21
+ coinType,
22
+ metadata: null,
23
+ };
24
+ return prev;
25
+ }, {});
26
+ // get metadata for each coin type
27
+ yield Promise.all(Object.entries(sCoinTypes).map(([coinName, coinTypeMetadata]) => __awaiter(void 0, void 0, void 0, function* () {
28
+ const { coinType } = coinTypeMetadata;
29
+ const metadata = yield client.getCoinMetadata({ coinType });
30
+ sCoinTypes[coinName].metadata = metadata;
31
+ })));
32
+ yield cache.setItem(constants_1.scoinKey, sCoinTypes, {
33
+ prefix: constants_1.scoinPrefix,
34
+ networkId: portfolio_core_1.NetworkId.sui,
35
+ });
36
+ });
37
+ const job = {
38
+ id: constants_1.scoinPrefix,
39
+ executor,
40
+ label: 'normal',
41
+ };
42
+ exports.default = job;
43
+ //# sourceMappingURL=sCoinJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sCoinJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/sCoinJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAKqB;AAGrB,iDAAmD;AAEnD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,UAAU,GAAsB,MAAM,CAAC,OAAO,CAAC,yBAAa,CAAC,CAAC,MAAM,CACxE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC;QAClC,6CAA6C;QAC7C,IAAI,CAAC,QAAsB,CAAC,GAAG;YAC7B,QAAQ;YACR,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC,EACD,EAAuB,CACxB,CAAC;IAEF,kCAAkC;IAClC,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAO,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,EAAE;QACpE,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5D,UAAU,CAAC,QAAsB,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACzD,CAAC,CAAA,CAAC,CACH,CAAC;IACF,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,UAAU,EAAE;QACxC,MAAM,EAAN,uBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,uBAAM;IACV,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -15,9 +15,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
17
  const constants_1 = require("./constants");
18
- const clients_1 = require("../../utils/clients");
19
18
  const getObject_1 = require("../../utils/sui/getObject");
20
- const client = (0, clients_1.getClientSui)();
19
+ const clients_1 = require("../../utils/clients");
21
20
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
22
21
  var _a, _b;
23
22
  const address = yield cache.getItem(constants_1.addressKey, {
@@ -29,6 +28,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
29
28
  const spoolCoin = new Map(Object.entries(address.mainnet.spool.pools));
30
29
  const spoolCoinNames = Array.from(spoolCoin.keys());
31
30
  const spoolMarketData = {};
31
+ const client = (0, clients_1.getClientSui)();
32
32
  for (const coinName of spoolCoinNames) {
33
33
  const detail = spoolCoin.get(coinName);
34
34
  if (!detail)
@@ -1 +1 @@
1
- {"version":3,"file":"spoolsMarketJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/spoolsMarketJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAMqB;AAErB,iDAAmD;AACnD,yDAAsD;AAEtD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;AAE9B,MAAM,QA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,CAAC,IAAA,sBAAS,EAAC,yBAAa,CAAC;yBACrB,YAAY,CAAC,iBAAiB,CAAC;yBAC/B,SAAS,CAAC,MAAM,CAAC;oBACtB,CAAC,CAAC,IAAA,sBAAS,EAAC,CAAC,CAAC,CACjB;gBACD,uBAAuB,EAAE,MAAM,CAC7B,YAAY,CAAC,yBAAyB,CAAC,CACxC;gBACD,qBAAqB,EAAE,MAAM,CAC3B,YAAY,CAAC,2BAA2B,CAAC,CAC1C;aACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,qBAAS,EAAE,eAAe,EAAE;QAC9C,MAAM,EAAN,wBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,wBAAM;IACV,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"spoolsMarketJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/spoolsMarketJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAMqB;AAErB,yDAAsD;AACtD,iDAAmD;AAEnD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAc,sBAAU,EAAE;QAC3D,MAAM,EAAE,yBAAa;QACrB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,SAAS,GAAG,IAAI,GAAG,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAC5C,CAAC;IACF,MAAM,cAAc,GAAa,KAAK,CAAC,IAAI,CAAC,SAAS,CA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AO,CAAC,qBAAS,EAAE,eAAe,EAAE;QAC9C,MAAM,EAAN,wBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,wBAAM;IACV,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import { CoinMetadata } from '@mysten/sui.js/client';
2
- export declare const COIN_NAMES: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus"];
3
- export declare const MARKET_COIN_NAMES: readonly ["seth", "sbtc", "susdc", "susdt", "ssui", "sapt", "ssol", "scetus"];
2
+ import { CoinNames, MARKET_COIN_NAMES } from '../constants';
4
3
  export declare const SUPPORTED_SPOOL_COIN_NAMES: readonly ["ssui", "susdc"];
5
- export type CoinNames = (typeof COIN_NAMES)[number];
6
4
  export type MarketCoinNames = (typeof MARKET_COIN_NAMES)[number];
7
5
  export type SupportedSpoolCoinNames = (typeof SUPPORTED_SPOOL_COIN_NAMES)[number];
8
6
  export type AllCoinNames = CoinNames | MarketCoinNames;
@@ -1,25 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUPPORTED_SPOOL_COIN_NAMES = exports.MARKET_COIN_NAMES = exports.COIN_NAMES = void 0;
4
- exports.COIN_NAMES = [
5
- 'eth',
6
- 'btc',
7
- 'usdc',
8
- 'usdt',
9
- 'sui',
10
- 'apt',
11
- 'sol',
12
- 'cetus',
13
- ];
14
- exports.MARKET_COIN_NAMES = [
15
- 'seth',
16
- 'sbtc',
17
- 'susdc',
18
- 'susdt',
19
- 'ssui',
20
- 'sapt',
21
- 'ssol',
22
- 'scetus',
23
- ];
3
+ exports.SUPPORTED_SPOOL_COIN_NAMES = void 0;
24
4
  exports.SUPPORTED_SPOOL_COIN_NAMES = ['ssui', 'susdc'];
25
5
  //# sourceMappingURL=coin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coin.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/scallop/types/coin.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;CACC,CAAC;AAEE,QAAA,iBAAiB,GAAG;IAC/B,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;CACA,CAAC;AAEE,QAAA,0BAA0B,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC"}
1
+ {"version":3,"file":"coin.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/scallop/types/coin.ts"],"names":[],"mappings":";;;AAGa,QAAA,0BAA0B,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import BigNumber from 'bignumber.js';
2
2
  import { CoinTypeMetadata } from './coin';
3
+ import { sCoinNames } from '../constants';
3
4
  export type UserLending = {
4
5
  coinType: string;
5
6
  amount: BigNumber;
@@ -24,6 +25,9 @@ export type UserStakeAccounts = {
24
25
  export type Pools = {
25
26
  [T in string]: CoinTypeMetadata;
26
27
  };
28
+ export type SCoinTypeMetadata = {
29
+ [T in sCoinNames]: CoinTypeMetadata;
30
+ };
27
31
  export type ClaimStatus = {
28
32
  name: string;
29
33
  value: number;
@@ -17,8 +17,8 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
17
  const constants_1 = require("./constants");
18
18
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
19
19
  const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
20
- const clients_1 = require("../../utils/clients");
21
20
  const multiDynamicFieldObjects_1 = require("../../utils/sui/multiDynamicFieldObjects");
21
+ const clients_1 = require("../../utils/clients");
22
22
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
23
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
24
24
  const client = (0, clients_1.getClientSui)();
@@ -1 +1 @@
1
- {"version":3,"file":"veScaFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/veScaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAAkE;AAClE,qGAA6E;AAC7E,qEAAkE;AAClE,iDAAmD;AACnD,uFAAoF;AAGpF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAe,EAAC,MAAM,EAAE,KAAK,EAAE;QACrD,MAAM,EAAE;YACN,UAAU,EACR,sFAAsF;SACzF;KACF,CAAC,CAAC;IACH,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,SAAS,GAAG,SAAS;SACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,QAAQ,CAAA,EAAA,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAa,CAAC;IAC9C,MAAM,YAAY,GAAG,MAAM,IAAA,mDAAwB,EAAQ,MAAM,EAAE;QACjE,QAAQ,EACN,oEAAoE;QACtE,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,sBAAU,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;I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GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,EAAE,OAAO;SACd;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -7,7 +7,7 @@ exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Stargate',
9
9
  image: 'https://sonar.watch/img/platforms/stargate.webp',
10
- defiLlamaId: 'stargate',
10
+ defiLlamaId: 'stargate-v1',
11
11
  website: 'https://stargate.finance/',
12
12
  };
13
13
  exports.poolsKey = 'pools';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGpD,QAAA,UAAU,GAAG,UAAU,CAAC;AAExB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,uBAAuB,GAAgB;IAClD;QACE,SAAS,EAAE,0BAAS,CAAC,QAAQ;QAC7B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,SAAS;QAC9B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGpD,QAAA,UAAU,GAAG,UAAU,CAAC;AAExB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,uBAAuB,GAAgB;IAClD;QACE,SAAS,EAAE,0BAAS,CAAC,QAAQ;QAC7B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,SAAS;QAC9B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;CACF,CAAC"}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -1,10 +1,3 @@
1
- import { Platform } from '@sonarwatch/portfolio-core';
2
- export declare const stepFinancePlatformId = "stepfinance";
3
- export declare const stepFinancePlatform: Platform;
4
- export declare const allbridgePlatformId = "allbridge";
5
- export declare const allbridgePlatform: Platform;
6
- export declare const ligmaPlatformId = "ligma";
7
- export declare const ligmaPlatform: Platform;
8
1
  export declare const xStakingConfigs: StakingConfig[];
9
2
  export type StakingConfig = {
10
3
  mint: string;