@sonarwatch/portfolio-plugins 0.11.96 → 0.11.98

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. package/CHANGELOG.md +1095 -1087
  2. package/README.md +3 -3
  3. package/package.json +3 -3
  4. package/src/plugins/aftermath/poolsJob.js +22 -20
  5. package/src/plugins/aftermath/poolsJob.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/bucket/collateralFetcher.js +5 -8
  8. package/src/plugins/bucket/collateralFetcher.js.map +1 -1
  9. package/src/plugins/cetus/clmmsFetcher.js +5 -5
  10. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  11. package/src/plugins/cetus/helpers.d.ts +4 -4
  12. package/src/plugins/cetus/helpers.js +23 -12
  13. package/src/plugins/cetus/helpers.js.map +1 -1
  14. package/src/plugins/cetus/poolsJob.js +5 -10
  15. package/src/plugins/cetus/poolsJob.js.map +1 -1
  16. package/src/plugins/jupiter/constants.d.ts +2 -0
  17. package/src/plugins/jupiter/constants.js +3 -1
  18. package/src/plugins/jupiter/constants.js.map +1 -1
  19. package/src/plugins/jupiter/filters.d.ts +1 -0
  20. package/src/plugins/jupiter/filters.js +11 -1
  21. package/src/plugins/jupiter/filters.js.map +1 -1
  22. package/src/plugins/jupiter/helpers.d.ts +1 -0
  23. package/src/plugins/jupiter/helpers.js +10 -1
  24. package/src/plugins/jupiter/helpers.js.map +1 -1
  25. package/src/plugins/jupiter/index.js +6 -1
  26. package/src/plugins/jupiter/index.js.map +1 -1
  27. package/src/plugins/jupiter/structs.d.ts +14 -0
  28. package/src/plugins/jupiter/structs.js +14 -1
  29. package/src/plugins/jupiter/structs.js.map +1 -1
  30. package/src/plugins/jupiter/voteFetcher.d.ts +3 -0
  31. package/src/plugins/jupiter/voteFetcher.js +56 -0
  32. package/src/plugins/jupiter/voteFetcher.js.map +1 -0
  33. package/src/plugins/navi/collateralFetcher.js +8 -7
  34. package/src/plugins/navi/collateralFetcher.js.map +1 -1
  35. package/src/plugins/navi/reservesJob.js +5 -4
  36. package/src/plugins/navi/reservesJob.js.map +1 -1
  37. package/src/plugins/scallop/helpers.d.ts +0 -49
  38. package/src/plugins/scallop/helpers.js +1 -39
  39. package/src/plugins/scallop/helpers.js.map +1 -1
  40. package/src/plugins/scallop/lendingsFetcher.js +17 -14
  41. package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
  42. package/src/plugins/scallop/marketJob.js +16 -16
  43. package/src/plugins/scallop/marketJob.js.map +1 -1
  44. package/src/plugins/scallop/obligationsFetcher.js +25 -21
  45. package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
  46. package/src/plugins/scallop/poolsJob.js +7 -12
  47. package/src/plugins/scallop/poolsJob.js.map +1 -1
  48. package/src/plugins/scallop/spoolsMarketJob.js +8 -15
  49. package/src/plugins/scallop/spoolsMarketJob.js.map +1 -1
  50. package/src/plugins/scallop/types/coin.d.ts +1 -1
  51. package/src/plugins/scallop/types/market.d.ts +3 -4
  52. package/src/plugins/scallop/types/market.js.map +1 -1
  53. package/src/plugins/sushiswap/helpers.js +24 -24
  54. package/src/plugins/tokens/fetchers/sui-nfts.js +47 -107
  55. package/src/plugins/tokens/fetchers/sui-nfts.js.map +1 -1
  56. package/src/plugins/tokens/types.d.ts +0 -48
  57. package/src/plugins/turbos/clmmsPositionsFetcher.js +18 -16
  58. package/src/plugins/turbos/clmmsPositionsFetcher.js.map +1 -1
  59. package/src/plugins/turbos/helper.d.ts +3 -3
  60. package/src/plugins/turbos/helper.js +6 -4
  61. package/src/plugins/turbos/helper.js.map +1 -1
  62. package/src/plugins/turbos/poolsJob.js +10 -10
  63. package/src/plugins/turbos/poolsJob.js.map +1 -1
  64. package/src/plugins/uniswap-v2/helpers.js +22 -22
  65. package/src/utils/clients/getClientSui.d.ts +2 -2
  66. package/src/utils/clients/getClientSui.js +8 -3
  67. package/src/utils/clients/getClientSui.js.map +1 -1
  68. package/src/utils/clients/types.d.ts +2 -0
  69. package/src/utils/sei/constants.js +8 -8
  70. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  71. package/src/utils/sui/getDynamicFieldObject.d.ts +4 -0
  72. package/src/utils/sui/{getMultipleObjectsSafe.js → getDynamicFieldObject.js} +9 -13
  73. package/src/utils/sui/getDynamicFieldObject.js.map +1 -0
  74. package/src/utils/sui/getDynamicFields.d.ts +3 -0
  75. package/src/utils/sui/getDynamicFields.js +38 -0
  76. package/src/utils/sui/getDynamicFields.js.map +1 -0
  77. package/src/utils/sui/getObject.d.ts +4 -0
  78. package/src/utils/sui/{getDynamicFieldsSafe.js → getObject.js} +8 -16
  79. package/src/utils/sui/getObject.js.map +1 -0
  80. package/src/utils/sui/getObjectDeletedResponse.d.ts +3 -0
  81. package/src/utils/sui/getObjectDeletedResponse.js +19 -0
  82. package/src/utils/sui/getObjectDeletedResponse.js.map +1 -0
  83. package/src/utils/sui/getObjectNotExistsResponse.d.ts +2 -0
  84. package/src/utils/sui/getObjectNotExistsResponse.js +14 -0
  85. package/src/utils/sui/getObjectNotExistsResponse.js.map +1 -0
  86. package/src/utils/sui/getOwnedObjects.d.ts +4 -0
  87. package/src/utils/sui/getOwnedObjects.js +36 -0
  88. package/src/utils/sui/getOwnedObjects.js.map +1 -0
  89. package/src/utils/sui/multiGetObjects.d.ts +4 -0
  90. package/src/utils/sui/multiGetObjects.js +32 -0
  91. package/src/utils/sui/multiGetObjects.js.map +1 -0
  92. package/src/utils/sui/queryEvents.d.ts +4 -0
  93. package/src/utils/sui/{queryEventSafe.js → queryEvents.js} +16 -12
  94. package/src/utils/sui/queryEvents.js.map +1 -0
  95. package/src/utils/sui/structs/kiosk.d.ts +7 -0
  96. package/src/utils/sui/structs/kiosk.js +3 -0
  97. package/src/utils/sui/structs/kiosk.js.map +1 -0
  98. package/src/utils/sui/structs/nft.d.ts +41 -0
  99. package/src/utils/sui/structs/nft.js +3 -0
  100. package/src/utils/sui/structs/nft.js.map +1 -0
  101. package/src/utils/sui/types.d.ts +23 -0
  102. package/src/utils/sui/types.js +3 -0
  103. package/src/utils/sui/types.js.map +1 -0
  104. package/src/utils/sui/getDynamicFieldsSafe.d.ts +0 -13
  105. package/src/utils/sui/getDynamicFieldsSafe.js.map +0 -1
  106. package/src/utils/sui/getFormattedCollectionNameAndId.d.ts +0 -4
  107. package/src/utils/sui/getFormattedCollectionNameAndId.js +0 -19
  108. package/src/utils/sui/getFormattedCollectionNameAndId.js.map +0 -1
  109. package/src/utils/sui/getMultipleObjectsSafe.d.ts +0 -67
  110. package/src/utils/sui/getMultipleObjectsSafe.js.map +0 -1
  111. package/src/utils/sui/queryEventSafe.d.ts +0 -14
  112. package/src/utils/sui/queryEventSafe.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"marketJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/marketJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,2CAAiD;AACjD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAOqB;AAarB,6EAAqD;AAErD,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,MAAM,C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,QAAQ,0CAAE,QAAQ,mCAAI,CAAC;YAC7C,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ;YAC/B,cAAc,EAAE,cAAc,CAAC,QAAQ,EAAE;YACzC,kBAAkB,EAAE,IAAI,CAAC,GAAG,CAC1B,oBAAoB,EACpB,uBAAuB,CACxB;YACD,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"}
@@ -13,13 +13,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
- const sui_js_1 = require("@mysten/sui.js");
16
+ 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
20
  const clients_1 = require("../../utils/clients");
21
21
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
22
  const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
23
+ const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
24
+ const getObject_1 = require("../../utils/sui/getObject");
25
+ const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
23
26
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
27
  var _a, _b, _c, _d, _e, _f;
25
28
  const client = (0, clients_1.getClientSui)();
@@ -42,7 +45,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
42
45
  ],
43
46
  };
44
47
  const [ownedObligationKeys, marketData] = yield Promise.all([
45
- (0, helpers_1.getOwnerObject)(owner, { filter: filterOwnerObject }),
48
+ (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
49
+ filter: filterOwnerObject,
50
+ }),
46
51
  cache.getItem(constants_1.marketKey, {
47
52
  prefix: constants_1.marketPrefix,
48
53
  networkId: portfolio_core_1.NetworkId.sui,
@@ -52,7 +57,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
52
57
  return [];
53
58
  const userObligations = {};
54
59
  const debtsAndCollateralCalculationPromises = ownedObligationKeys.map((obligationKey) => () => __awaiter(void 0, void 0, void 0, function* () {
55
- const obligationKeyFields = (0, sui_js_1.getObjectFields)(obligationKey);
60
+ var _g, _h, _j, _k;
61
+ const obligationKeyFields = (_h = (_g = obligationKey.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.fields;
56
62
  if (!obligationKeyFields)
57
63
  return;
58
64
  const obligationId = obligationKeyFields.ownership.fields.of;
@@ -62,12 +68,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
62
68
  debts: {},
63
69
  };
64
70
  }
65
- const account = (0, sui_js_1.getObjectFields)(yield client.getObject({
66
- id: obligationId,
67
- options: {
68
- showContent: true,
69
- },
70
- }));
71
+ const getObjectRes = yield (0, getObject_1.getObject)(client, obligationId);
72
+ const account = (_k = (_j = getObjectRes.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields;
71
73
  if (!account)
72
74
  return;
73
75
  const accountCollateralsId = account.collaterals.fields.table.fields.id.id;
@@ -76,12 +78,12 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
76
78
  const accountDebtsAssets = account.debts.fields.keys.fields.contents;
77
79
  // get user collateral
78
80
  const accountCollateralsAssetsPromises = accountCollateralsAssets.map(({ fields }) => () => __awaiter(void 0, void 0, void 0, function* () {
79
- var _g;
81
+ var _l, _m, _o;
80
82
  if (!userObligations[obligationId].collaterals[fields.name]) {
81
83
  userObligations[obligationId].collaterals[fields.name] =
82
84
  (0, bignumber_js_1.default)(0);
83
85
  }
84
- const asset = (0, sui_js_1.getObjectFields)(yield client.getDynamicFieldObject({
86
+ const rAsset = yield (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
85
87
  parentId: accountCollateralsId,
86
88
  name: {
87
89
  type: '0x1::type_name::TypeName',
@@ -89,17 +91,18 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
89
91
  name: fields.name,
90
92
  },
91
93
  },
92
- }));
94
+ });
95
+ const asset = (_m = (_l = rAsset.data) === null || _l === void 0 ? void 0 : _l.content) === null || _m === void 0 ? void 0 : _m.fields;
93
96
  if (!asset)
94
97
  return;
95
98
  userObligations[obligationId].collaterals[fields.name] =
96
- userObligations[obligationId].collaterals[fields.name].plus((0, bignumber_js_1.default)((_g = asset.value.fields.amount) !== null && _g !== void 0 ? _g : 0));
99
+ userObligations[obligationId].collaterals[fields.name].plus((0, bignumber_js_1.default)((_o = asset.value.fields.amount) !== null && _o !== void 0 ? _o : 0));
97
100
  }));
98
101
  // get user debt
99
102
  const accountDebtsAssetsPromises = accountDebtsAssets.map(({ fields }) => () => __awaiter(void 0, void 0, void 0, function* () {
100
- var _h, _j, _k;
101
- const coinName = (_j = (_h = ctmValues
102
- .find((value) => value.coinType === (0, sui_js_1.normalizeStructTag)(fields.name))) === null || _h === void 0 ? void 0 : _h.metadata) === null || _j === void 0 ? void 0 : _j.symbol.toLowerCase();
103
+ var _p, _q, _r, _s, _t;
104
+ const coinName = (_q = (_p = ctmValues
105
+ .find((value) => value.coinType === (0, utils_1.normalizeStructTag)(fields.name))) === null || _p === void 0 ? void 0 : _p.metadata) === null || _q === void 0 ? void 0 : _q.symbol.toLowerCase();
103
106
  if (!coinName)
104
107
  return;
105
108
  const market = marketData[coinName];
@@ -108,7 +111,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
108
111
  if (!userObligations[obligationId].debts[fields.name]) {
109
112
  userObligations[obligationId].debts[fields.name] = (0, bignumber_js_1.default)(0);
110
113
  }
111
- const asset = (0, sui_js_1.getObjectFields)(yield client.getDynamicFieldObject({
114
+ const rAsset = yield (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
112
115
  parentId: accountDebtsId,
113
116
  name: {
114
117
  type: '0x1::type_name::TypeName',
@@ -116,10 +119,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
116
119
  name: fields.name,
117
120
  },
118
121
  },
119
- }));
122
+ });
123
+ const asset = (_s = (_r = rAsset.data) === null || _r === void 0 ? void 0 : _r.content) === null || _s === void 0 ? void 0 : _s.fields;
120
124
  if (!asset)
121
125
  return;
122
- userObligations[obligationId].debts[fields.name] = userObligations[obligationId].debts[fields.name].plus((0, bignumber_js_1.default)((_k = asset.value.fields.amount) !== null && _k !== void 0 ? _k : 0).multipliedBy(market.growthInterest + 1));
126
+ userObligations[obligationId].debts[fields.name] = userObligations[obligationId].debts[fields.name].plus((0, bignumber_js_1.default)((_t = asset.value.fields.amount) !== null && _t !== void 0 ? _t : 0).multipliedBy(market.growthInterest + 1));
123
127
  }));
124
128
  yield Promise.all([
125
129
  (0, runInBatch_1.default)(accountCollateralsAssetsPromises, 5),
@@ -142,14 +146,14 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
142
146
  const suppliedYields = [];
143
147
  const { collaterals, debts } = userObligations[account];
144
148
  for (const coinType of Object.keys(collaterals)) {
145
- const metadata = ctmValues.find((value) => value.coinType === (0, sui_js_1.normalizeStructTag)(coinType));
149
+ const metadata = ctmValues.find((value) => value.coinType === (0, utils_1.normalizeStructTag)(coinType));
146
150
  const address = (0, portfolio_core_1.formatMoveTokenAddress)(`0x${coinType}`);
147
151
  suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(address, collaterals[coinType]
148
152
  .shiftedBy(-1 * ((_b = (_a = metadata === null || metadata === void 0 ? void 0 : metadata.metadata) === null || _a === void 0 ? void 0 : _a.decimals) !== null && _b !== void 0 ? _b : 0))
149
153
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPrices.get(address)));
150
154
  }
151
155
  for (const coinType of Object.keys(debts)) {
152
- const metadata = ctmValues.find((value) => value.coinType === (0, sui_js_1.normalizeStructTag)(coinType));
156
+ const metadata = ctmValues.find((value) => value.coinType === (0, utils_1.normalizeStructTag)(coinType));
153
157
  const coinName = (_d = (_c = metadata === null || metadata === void 0 ? void 0 : metadata.metadata) === null || _c === void 0 ? void 0 : _c.symbol.toLowerCase()) !== null && _d !== void 0 ? _d : '';
154
158
  const market = marketData[coinName];
155
159
  if (!market)
@@ -1 +1 @@
1
- {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAUoC;AACpC,2CAIwB;AACxB,gEAAqC;AAGrC,2CAOqB;AAQrB,uCAA2D;AAC3D,iDAAmD;AACnD,qGAA6E;AAC7E,6EAAqD;AAGrD,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,MAA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AC;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,+DAUoC;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;S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|| function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const sui_js_1 = require("@mysten/sui.js");
13
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const utils_1 = require("@mysten/sui.js/utils");
14
14
  const constants_1 = require("./constants");
15
15
  const clients_1 = require("../../utils/clients");
16
- const SUI_TYPE = (0, sui_js_1.normalizeStructTag)(sui_js_1.SUI_TYPE_ARG);
16
+ const getObject_1 = require("../../utils/sui/getObject");
17
+ const SUI_TYPE = (0, utils_1.normalizeStructTag)(utils_1.SUI_TYPE_ARG);
17
18
  const client = (0, clients_1.getClientSui)();
18
19
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
- var _a;
20
+ var _a, _b, _c;
20
21
  const address = yield cache.getItem(constants_1.addressKey, {
21
22
  prefix: constants_1.addressPrefix,
22
23
  networkId: portfolio_core_1.NetworkId.sui,
@@ -37,15 +38,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
37
38
  };
38
39
  }
39
40
  else {
40
- const object = yield client.getObject({
41
- id: detail.metaData,
42
- options: {
43
- showType: true,
44
- showContent: true,
45
- },
46
- });
47
- const objType = (0, sui_js_1.normalizeStructTag)((_a = (0, sui_js_1.getObjectType)(object)) !== null && _a !== void 0 ? _a : '');
48
- const objFields = (0, sui_js_1.getObjectFields)(object);
41
+ const object = yield (0, getObject_1.getObject)(client, detail.metaData);
42
+ const objType = (0, utils_1.normalizeStructTag)(((_a = object.data) === null || _a === void 0 ? void 0 : _a.type) || '');
43
+ const objFields = (_c = (_b = object.data) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.fields;
49
44
  if (!objType || !objFields)
50
45
  return;
51
46
  coinTypes[coinName] = {
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA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AO,CAAC,OAAO,CAAC,GAAG,CAAC,CACrB;gBACD,QAAQ,EAAE,SAAS;aACpB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,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"}
@@ -13,12 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
- const sui_js_1 = require("@mysten/sui.js");
17
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
17
  const constants_1 = require("./constants");
19
18
  const clients_1 = require("../../utils/clients");
19
+ const getObject_1 = require("../../utils/sui/getObject");
20
20
  const client = (0, clients_1.getClientSui)();
21
21
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ var _a, _b;
22
23
  const address = yield cache.getItem(constants_1.addressKey, {
23
24
  prefix: constants_1.addressPrefix,
24
25
  networkId: portfolio_core_1.NetworkId.sui,
@@ -34,22 +35,14 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
34
35
  continue;
35
36
  const { id: poolId, rewardPoolId } = detail;
36
37
  const [stakeObjectResponse, rewardObjectResponse] = yield Promise.all([
37
- client.getObject({
38
- id: poolId,
39
- options: {
40
- showContent: true,
41
- },
42
- }),
43
- client.getObject({
44
- id: rewardPoolId,
45
- options: {
46
- showContent: true,
47
- },
48
- }),
38
+ (0, getObject_1.getObject)(client, poolId),
39
+ (0, getObject_1.getObject)(client, rewardPoolId),
49
40
  ]);
50
41
  if (stakeObjectResponse.data && rewardObjectResponse.data) {
51
- const stakeFields = (0, sui_js_1.getObjectFields)(stakeObjectResponse);
52
- const rewardFields = (0, sui_js_1.getObjectFields)(rewardObjectResponse);
42
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
+ const stakeFields = (_a = stakeObjectResponse.data.content) === null || _a === void 0 ? void 0 : _a.fields;
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ const rewardFields = (_b = rewardObjectResponse.data.content) === null || _b === void 0 ? void 0 : _b.fields;
53
46
  if (!stakeFields || !rewardFields)
54
47
  continue;
55
48
  const staked = stakeFields['stakes'];
@@ -1 +1 @@
1
- {"version":3,"file":"spoolsMarketJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/spoolsMarketJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,2CAAiD;AACjD,gEAAqC;AAGrC,2CAMqB;AAErB,iDAAmD;AAEnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;AAE9B,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,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9D,MAAM,eAAe,GAAmB,EAAE,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,cAAc,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACv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Ae,CAAC,QAAQ,CAAC,GAAG;oBAC1B,iBAAiB,EAAE,IAAA,sBAAS,EAAC,CAAC,CAAC;oBAC/B,uBAAuB,EAAE,CAAC;oBAC1B,qBAAqB,EAAE,CAAC;iBACzB,CAAC;YACJ,CAAC;YAED,eAAe,CAAC,QAAQ,CAAC,GAAG;gBAC1B,iBAAiB,EAAE,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC,IAAI,CACtC,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;oBAC5C,CAAC,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,4 +1,4 @@
1
- import { CoinMetadata } from '@mysten/sui.js';
1
+ import { CoinMetadata } from '@mysten/sui.js/client';
2
2
  export declare const COIN_NAMES: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus"];
3
3
  export declare const MARKET_COIN_NAMES: readonly ["seth", "sbtc", "susdc", "susdt", "ssui", "sapt", "ssol", "scetus"];
4
4
  export declare const SUPPORTED_SPOOL_COIN_NAMES: readonly ["ssui", "susdc"];
@@ -1,14 +1,13 @@
1
- import { ObjectContentFields } from '@mysten/sui.js';
2
1
  import BigNumber from 'bignumber.js';
3
2
  import { BasicField, IdField, WitTable } from './basic';
4
3
  export type BalanceSheet = {
5
- [k in string]?: ObjectContentFields;
4
+ [k in string]?: any;
6
5
  };
7
6
  export type BorrowIndexes = {
8
- [k in string]?: ObjectContentFields;
7
+ [k in string]?: any;
9
8
  };
10
9
  export type InterestModel = {
11
- [k in string]?: ObjectContentFields;
10
+ [k in string]?: any;
12
11
  };
13
12
  export type InterestModelData = {
14
13
  base_borrow_rate_per_sec: {
@@ -1 +1 @@
1
- {"version":3,"file":"market.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/scallop/types/market.ts"],"names":[],"mappings":";;AAuFA,MAAM,kBAAkB,GAAG;IACzB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,IAAI;IACJ,iBAAiB;IACjB,UAAU;IACV,gBAAgB;IAChB,aAAa;IACb,OAAO;CACC,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,IAAI;IACJ,sBAAsB;IACtB,qBAAqB;CACb,CAAC"}
1
+ {"version":3,"file":"market.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/scallop/types/market.ts"],"names":[],"mappings":";;AAsFA,MAAM,kBAAkB,GAAG;IACzB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,IAAI;IACJ,iBAAiB;IACjB,UAAU;IACV,gBAAgB;IAChB,aAAa;IACb,OAAO;CACC,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,IAAI;IACJ,sBAAsB;IACtB,qBAAqB;CACb,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;
@@ -8,124 +8,64 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
- const sui_js_1 = require("@mysten/sui.js");
17
13
  const clients_1 = require("../../../utils/clients");
18
- const getFormattedCollectionNameAndId_1 = __importDefault(require("../../../utils/sui/getFormattedCollectionNameAndId"));
19
14
  const constants_1 = require("../constants");
20
15
  const constants_2 = require("../../../utils/sui/constants");
21
- const getMultipleObjectsSafe_1 = __importDefault(require("../../../utils/sui/getMultipleObjectsSafe"));
16
+ const getOwnedObjects_1 = require("../../../utils/sui/getOwnedObjects");
17
+ const getDynamicFields_1 = require("../../../utils/sui/getDynamicFields");
18
+ const multiGetObjects_1 = require("../../../utils/sui/multiGetObjects");
22
19
  const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
20
+ var _a;
23
21
  const client = (0, clients_1.getClientSui)();
22
+ const ownedObjects = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
23
+ options: {
24
+ showDisplay: true,
25
+ },
26
+ });
27
+ if (ownedObjects.length === 0)
28
+ return [];
29
+ const nftObjects = [...ownedObjects.filter((o) => { var _a, _b; return (_b = (_a = o.data) === null || _a === void 0 ? void 0 : _a.display) === null || _b === void 0 ? void 0 : _b.data; })];
30
+ const obKioskObject = ownedObjects.find((o) => { var _a; return ((_a = o.data) === null || _a === void 0 ? void 0 : _a.type) === constants_2.obKioskStructType; });
31
+ if (obKioskObject) {
32
+ const kioskDynamicObjects = yield (0, getDynamicFields_1.getDynamicFields)(client, ((_a = obKioskObject === null || obKioskObject === void 0 ? void 0 : obKioskObject.data) === null || _a === void 0 ? void 0 : _a.content).fields.kiosk, true);
33
+ const ownerKioskObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, kioskDynamicObjects.map((o) => o.objectId));
34
+ nftObjects.push(...ownerKioskObjects);
35
+ }
36
+ // TODO add Kiosk objects
24
37
  const assets = [];
25
- let obKioskObjects;
26
- let ownedNFTsObjects;
27
- let cursor;
28
- const kioskItemsAddresses = new Set();
29
- do {
30
- obKioskObjects = yield client.getOwnedObjects({
31
- owner,
32
- filter: {
33
- StructType: constants_2.obKioskStructType,
34
- },
35
- options: {
36
- showContent: true,
37
- },
38
- cursor,
39
- });
40
- cursor = obKioskObjects.nextCursor;
41
- for (const obKioskObject of obKioskObjects.data) {
42
- if (!obKioskObject.data || !obKioskObject.data.content)
43
- continue;
44
- const contentObject = obKioskObject.data.content;
45
- if (!contentObject.fields.kiosk)
46
- continue;
47
- const dynamicFields = yield client.getDynamicFields({
48
- parentId: contentObject.fields.kiosk,
49
- });
50
- if (dynamicFields.data.length === 0)
51
- continue;
52
- const dynamicObjects = dynamicFields.data.filter((field) => field.type === 'DynamicObject');
53
- if (dynamicObjects.length !== 1 ||
54
- dynamicObjects[0].name.type !== constants_2.kioskItemType)
55
- continue;
56
- kioskItemsAddresses.add(dynamicObjects[0].objectId);
38
+ nftObjects.forEach((object) => {
39
+ var _a, _b, _c;
40
+ if (!object.data)
41
+ return;
42
+ if (object.data.type === obKioskObject)
43
+ return;
44
+ const display = (_a = object.data.display) === null || _a === void 0 ? void 0 : _a.data;
45
+ const content = object.data.content;
46
+ let attributes;
47
+ if ((_b = content.fields.attributes) === null || _b === void 0 ? void 0 : _b.fields.map.fields.contents) {
48
+ attributes = (_c = content.fields.attributes) === null || _c === void 0 ? void 0 : _c.fields.map.fields.contents.map((c) => ({
49
+ trait_type: c.fields.key,
50
+ value: c.fields.value,
51
+ }));
57
52
  }
58
- } while (obKioskObjects.hasNextPage);
59
- let nftKioskObjects = yield (0, getMultipleObjectsSafe_1.default)(client, Array.from(kioskItemsAddresses), {
60
- showContent: true,
61
- showDisplay: true,
62
- showType: true,
63
- showOwner: true,
64
- });
65
- cursor = undefined;
66
- do {
67
- ownedNFTsObjects = yield client.getOwnedObjects({
68
- owner,
69
- options: {
70
- showContent: true,
71
- showType: true,
72
- showDisplay: true,
73
- showOwner: true,
53
+ assets.push({
54
+ networkId: portfolio_core_1.NetworkId.sui,
55
+ type: portfolio_core_1.PortfolioAssetType.collectible,
56
+ value: null,
57
+ attributes: {},
58
+ data: {
59
+ address: object.data.type,
60
+ amount: Number(content.fields.amount || 1),
61
+ price: null,
62
+ description: (display === null || display === void 0 ? void 0 : display.description) || content.fields.description,
63
+ imageUri: (display === null || display === void 0 ? void 0 : display.image_url) || content.fields.url,
64
+ name: (display === null || display === void 0 ? void 0 : display.name) || content.fields.name || content.fields.tick,
65
+ attributes,
74
66
  },
75
- cursor,
76
67
  });
77
- cursor = ownedNFTsObjects.nextCursor;
78
- const ownedObjects = nftKioskObjects.length > 0
79
- ? [...ownedNFTsObjects.data, ...nftKioskObjects]
80
- : ownedNFTsObjects.data;
81
- for (const ownedObject of ownedObjects) {
82
- if (!ownedObject.data || !ownedObject.data.content)
83
- continue;
84
- const type = (0, sui_js_1.getObjectType)(ownedObject);
85
- if (!type)
86
- continue;
87
- const object = ownedObject.data.content;
88
- const display = (0, sui_js_1.getObjectDisplay)(ownedObject);
89
- const displayData = display.data;
90
- const metadatas = (0, sui_js_1.getObjectFields)(object);
91
- if (displayData === null && metadatas === null)
92
- continue;
93
- const objectId = (0, sui_js_1.getObjectId)(ownedObject);
94
- const { collectionName, collectionId } = (0, getFormattedCollectionNameAndId_1.default)(type);
95
- let imageUri;
96
- let name;
97
- if (displayData && displayData.image_url) {
98
- imageUri = displayData.image_url;
99
- name = displayData.name;
100
- }
101
- else if (metadatas && (metadatas.image_url || metadatas.url)) {
102
- imageUri = metadatas.image_url || metadatas.url;
103
- name = metadatas.name;
104
- }
105
- else
106
- continue;
107
- assets.push({
108
- networkId: portfolio_core_1.NetworkId.sui,
109
- type: portfolio_core_1.PortfolioAssetType.collectible,
110
- value: null,
111
- attributes: {},
112
- data: {
113
- address: objectId,
114
- amount: 1,
115
- price: null,
116
- imageUri,
117
- name,
118
- collection: {
119
- floorPrice: null,
120
- id: collectionId || '',
121
- name: collectionName || '',
122
- },
123
- },
124
- });
125
- continue;
126
- }
127
- nftKioskObjects = [];
128
- } while (ownedNFTsObjects.hasNextPage);
68
+ });
129
69
  if (assets.length === 0)
130
70
  return [];
131
71
  const element = {
@@ -1 +1 @@
1
- {"version":3,"file":"sui-nfts.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui-nfts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,2CAMwB;AAExB,oDAAsD;AAEtD,yHAAiG;AACjG,4CAAkD;AAClD,4DAAgF;AAChF,uGAAkF;AAElF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,EAAE;IACxD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM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,GAA6B;QACxC,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAE,8BAAkB,CAAC,EAAE;QACjC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACJ,MAAM;SACP;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,8BAAkB,CAAC,EAAE,IAAI,0BAAS,CAAC,GAAG,EAAE;IAC/C,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"sui-nfts.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui-nfts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAOoC;AAEpC,oDAAsD;AACtD,4CAAkD;AAClD,4DAAiE;AACjE,wEAAqE;AAIrE,0EAAuE;AACvE,wEAAqE;AAErE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,EAAE;;IACxD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAe,EAAC,MAAM,EAAE,KAAK,EAAE;QACxD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,UAAU,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,OAAO,0CAAE,IAAI,CAAA,EAAA,CAAC,CAAC,CAAC;IAE1E,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CACrC,CAAC,CAA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