@sonarwatch/portfolio-plugins 0.11.154 → 0.11.156
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/meteora/index.js +2 -1
- package/src/plugins/meteora/index.js.map +1 -1
- package/src/plugins/meteora/multiTokenPools.json +139 -0
- package/src/plugins/meteora/multiTokenPoolsJob.d.ts +3 -0
- package/src/plugins/meteora/multiTokenPoolsJob.js +76 -0
- package/src/plugins/meteora/multiTokenPoolsJob.js.map +1 -0
- package/src/plugins/meteora/poolsJob.js +8 -86
- package/src/plugins/meteora/poolsJob.js.map +1 -1
- package/src/plugins/meteora/vaultsJob.js +7 -8
- package/src/plugins/meteora/vaultsJob.js.map +1 -1
- package/src/plugins/tulip/constants.d.ts +10 -0
- package/src/plugins/tulip/constants.js +20 -0
- package/src/plugins/tulip/constants.js.map +1 -0
- package/src/plugins/tulip/depositsFetcher.d.ts +3 -0
- package/src/plugins/tulip/depositsFetcher.js +73 -0
- package/src/plugins/tulip/depositsFetcher.js.map +1 -0
- package/src/plugins/tulip/filters.d.ts +13 -0
- package/src/plugins/tulip/filters.js +18 -0
- package/src/plugins/tulip/filters.js.map +1 -0
- package/src/plugins/tulip/index.d.ts +6 -0
- package/src/plugins/tulip/index.js +14 -0
- package/src/plugins/tulip/index.js.map +1 -0
- package/src/plugins/tulip/lendingTokensJob.d.ts +3 -0
- package/src/plugins/tulip/lendingTokensJob.js +90 -0
- package/src/plugins/tulip/lendingTokensJob.js.map +1 -0
- package/src/plugins/tulip/strategyTokensJob.d.ts +3 -0
- package/src/plugins/tulip/strategyTokensJob.js +75 -0
- package/src/plugins/tulip/strategyTokensJob.js.map +1 -0
- package/src/plugins/tulip/structs.d.ts +178 -0
- package/src/plugins/tulip/structs.js +174 -0
- package/src/plugins/tulip/structs.js.map +1 -0
- package/src/plugins/uxd/constants.d.ts +9 -0
- package/src/plugins/uxd/constants.js +22 -0
- package/src/plugins/uxd/constants.js.map +1 -0
- package/src/plugins/uxd/filters.d.ts +6 -0
- package/src/plugins/uxd/filters.js +13 -0
- package/src/plugins/uxd/filters.js.map +1 -0
- package/src/plugins/uxd/index.d.ts +6 -0
- package/src/plugins/uxd/index.js +12 -0
- package/src/plugins/uxd/index.js.map +1 -0
- package/src/plugins/uxd/stakingFetcher.d.ts +3 -0
- package/src/plugins/uxd/stakingFetcher.js +60 -0
- package/src/plugins/uxd/stakingFetcher.js.map +1 -0
- package/src/plugins/uxd/structs.d.ts +16 -0
- package/src/plugins/uxd/structs.js +17 -0
- package/src/plugins/uxd/structs.js.map +1 -0
- package/src/plugins/meteora/pools.d.ts +0 -5
- package/src/plugins/meteora/pools.js +0 -143
- package/src/plugins/meteora/pools.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.11.156](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.155...plugins-0.11.156) (2024-04-01)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.11.155](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.154...plugins-0.11.155) (2024-03-28)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.11.154](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.153...plugins-0.11.154) (2024-03-28)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.156",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"web3-v1": "npm:web3@^1.5.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
|
-
"@sonarwatch/portfolio-core": "0.11.
|
44
|
+
"@sonarwatch/portfolio-core": "0.11.156"
|
45
45
|
},
|
46
46
|
"main": "./src/index.js",
|
47
47
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -96,7 +96,9 @@ const kai_1 = require("./plugins/kai");
|
|
96
96
|
const suilend_1 = require("./plugins/suilend");
|
97
97
|
const symmetry_1 = require("./plugins/symmetry");
|
98
98
|
const staratlas_1 = require("./plugins/staratlas");
|
99
|
+
const tulip_1 = require("./plugins/tulip");
|
99
100
|
const phoenix_1 = require("./plugins/phoenix");
|
101
|
+
const uxd_1 = require("./plugins/uxd");
|
100
102
|
var constants_1 = require("./plugins/tokens/constants");
|
101
103
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
102
104
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -186,7 +188,9 @@ exports.platforms = [
|
|
186
188
|
...suilend_1.platforms,
|
187
189
|
...symmetry_1.platforms,
|
188
190
|
...staratlas_1.platforms,
|
191
|
+
...tulip_1.platforms,
|
189
192
|
...phoenix_1.platforms,
|
193
|
+
...uxd_1.platforms,
|
190
194
|
];
|
191
195
|
// JOBS //
|
192
196
|
exports.jobs = [
|
@@ -259,7 +263,9 @@ exports.jobs = [
|
|
259
263
|
...suilend_1.jobs,
|
260
264
|
...symmetry_1.jobs,
|
261
265
|
...staratlas_1.jobs,
|
266
|
+
...tulip_1.jobs,
|
262
267
|
...phoenix_1.jobs,
|
268
|
+
...uxd_1.jobs,
|
263
269
|
];
|
264
270
|
// FETCHERS //
|
265
271
|
exports.fetchers = [
|
@@ -334,7 +340,9 @@ exports.fetchers = [
|
|
334
340
|
...suilend_1.fetchers,
|
335
341
|
...symmetry_1.fetchers,
|
336
342
|
...staratlas_1.fetchers,
|
343
|
+
...tulip_1.fetchers,
|
337
344
|
...phoenix_1.fetchers,
|
345
|
+
...uxd_1.fetchers,
|
338
346
|
];
|
339
347
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
340
348
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAIyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,2CAIyB;A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W;CACf,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const vaultsJob_1 = __importDefault(require("./vaultsJob"));
|
8
8
|
const poolsJob_1 = __importDefault(require("./poolsJob"));
|
9
|
+
const multiTokenPoolsJob_1 = __importDefault(require("./multiTokenPoolsJob"));
|
9
10
|
const farmsJob_1 = __importDefault(require("./farmsJob"));
|
10
11
|
const constants_1 = require("./constants");
|
11
12
|
const farmsFetcher_1 = __importDefault(require("./farmsFetcher"));
|
12
13
|
const dlmmPositionsFetcher_1 = __importDefault(require("./dlmmPositionsFetcher"));
|
13
14
|
exports.platforms = [constants_1.meteoraPlatform];
|
14
|
-
exports.jobs = [vaultsJob_1.default, poolsJob_1.default, farmsJob_1.default];
|
15
|
+
exports.jobs = [vaultsJob_1.default, poolsJob_1.default, farmsJob_1.default, multiTokenPoolsJob_1.default];
|
15
16
|
exports.fetchers = [farmsFetcher_1.default, dlmmPositionsFetcher_1.default];
|
16
17
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/index.ts"],"names":[],"mappings":";;;;;;AACA,4DAAoC;AACpC,0DAAkC;AAClC,0DAAkC;AAGlC,2CAA8C;AAC9C,kEAA0C;AAC1C,kFAAyD;AAE5C,QAAA,SAAS,GAAe,CAAC,2BAAe,CAAC,CAAC;AAC1C,QAAA,IAAI,GAAU,CAAC,mBAAS,EAAE,kBAAQ,EAAE,kBAAQ,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/index.ts"],"names":[],"mappings":";;;;;;AACA,4DAAoC;AACpC,0DAAkC;AAClC,8EAAsD;AACtD,0DAAkC;AAGlC,2CAA8C;AAC9C,kEAA0C;AAC1C,kFAAyD;AAE5C,QAAA,SAAS,GAAe,CAAC,2BAAe,CAAC,CAAC;AAC1C,QAAA,IAAI,GAAU,CAAC,mBAAS,EAAE,kBAAQ,EAAE,kBAAQ,EAAE,4BAAkB,CAAC,CAAC;AAClE,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,8BAAmB,CAAC,CAAC"}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"symbol": "PAI-3Pool",
|
4
|
+
"address": "9s6dXtMgV5E6v3rHqBF2LejHcA2GWoZb7xNUkgXgsBqt",
|
5
|
+
"reserveAccounts": [
|
6
|
+
"J7xkQZ4eCsyHR7XDMcGbHeiFZo6vXPmQC2Va8aqo8jLx",
|
7
|
+
"bqPxs71QGXNW2SXEvjAaBgLzjhSZfQpmhcVBYoisBo6",
|
8
|
+
"EpehbDhGq8xEc3Yy5nJ2dgY2zWRHaRsbUiMTgh36N8J7"
|
9
|
+
]
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"symbol": "UST-3Pool",
|
13
|
+
"address": "57h4LEnBooHrKbacYWGCFghmrTzYPVn8PwZkzTzRLvHa",
|
14
|
+
"reserveAccounts": [
|
15
|
+
"Go93HBNLMK6QnSHyZTViAoti9GCmSRhkeZMiVoJmcrud",
|
16
|
+
"2uZVPMdS8VFwMEZjZNzP1f78m1zaqvT3R2JwMs1w9fU3",
|
17
|
+
"5nazSj6MfaEeuAoQezMG3raWuZiyFjE7fmURUgDeP8cF"
|
18
|
+
]
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"symbol": "pSOL-SOL",
|
22
|
+
"address": "GHhDU9Y7HM37v6cQyaie1A3aZdfpCDp6ScJ5zZn2c3uk",
|
23
|
+
"reserveAccounts": [
|
24
|
+
"9odMAiRbk5aDEbFWeYrsLZAS54C7XdBUv63t4oMRcWkM",
|
25
|
+
"9AnyD3bAeTsFvFPjYj12FMaDERBHX3vNKuuHJqZsKH6D"
|
26
|
+
]
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"symbol": "wUSD-4Pool",
|
30
|
+
"address": "DSmqf5Je3FEUmZntxBzG7c7EYJN3WK3feBV5Zgidukjj",
|
31
|
+
"reserveAccounts": [
|
32
|
+
"54q2ct7kTknGvADuHSXjtnKqMbmNQ4xpDVK2xgcnh1xv",
|
33
|
+
"5cvqiPREvEYmhvBt3cZ7fmrCE6tbYvwkAiuvf1pHUPBq",
|
34
|
+
"9gVstb8HkuYX8PqjLSc9b9zLMhFZwWX7k3ofLcWy7wyS",
|
35
|
+
"HLdcfovcXkHKm4iQWNQZhJypySmuGa1PGoTuB6L68hhZ"
|
36
|
+
]
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"symbol": "stSOL-2Pool",
|
40
|
+
"address": "4q19vhpG6y4ZeMPLQiUNNaJStb8XivCFQy4m4mdnVnQZ",
|
41
|
+
"reserveAccounts": [
|
42
|
+
"9gizzFG33czvcTzn5N4V23uunV6YR55UNW8ow6qNPoX3",
|
43
|
+
"FqLtqRJvoVNYU5Xpcgp5FNPv8cXCZw7CiNddjQ4nqkRo"
|
44
|
+
]
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"symbol": "mSOL-2Pool",
|
48
|
+
"address": "7HqhfUqig7kekN8FbJCtQ36VgdXKriZWQ62rTve9ZmQ",
|
49
|
+
"reserveAccounts": [
|
50
|
+
"EWy2hPdVT4uGrYokx65nAyn2GFBv7bUYA2pFPY96pw7Y",
|
51
|
+
"GM48qFn8rnqhyNMrBHyPJgUVwXQ1JvMbcu3b9zkThW9L"
|
52
|
+
]
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"symbol": "wbBUSD-4Pool",
|
56
|
+
"address": "FcjViE1oVbXFza5ry9Q7WZ9XNd95zu1LqEiSUdeJMPTP",
|
57
|
+
"reserveAccounts": [
|
58
|
+
"2FRWh8BZfpeuh8Pmg7ezHvBezW8yiEGG6Fy8pCnHVyq1",
|
59
|
+
"8m5D8rtDdP67qZyZTXwLozVCsXJMcSiXnroWoRn9GZga",
|
60
|
+
"3CF2cmVJxnWKt4J4u5tzsNSYVcSvmWqbbb4iJMEmzSRr",
|
61
|
+
"5Nn1Fm15FqjD5DbMFBQ93Rrwppzei5GghENMmJt5qRpR"
|
62
|
+
]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"symbol": "UXD-3Pool",
|
66
|
+
"address": "HG2UzJS8rbgsd16tZorT1mNiPJBjE7Xq4ifqsfZNK6h6",
|
67
|
+
"reserveAccounts": [
|
68
|
+
"BLcaKjTnX3ggFMxhUeiZz32mpgiLeKYV2QWQ72JxgjdV",
|
69
|
+
"GgstY3wF2avMfPd7pAgVWUXaHaPFDkvyjMkTTsPNqmwE",
|
70
|
+
"BZRKweQTuVGWKZAL6Qrtgi1HPkuqzKxnJWLLJrqSm8Xs"
|
71
|
+
]
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"symbol": "USTv2-3Pool",
|
75
|
+
"address": "DJjevoCBomzgNe76pNDd8stAcMS4x7Y99giuNpqGLa2f",
|
76
|
+
"reserveAccounts": [
|
77
|
+
"65sR8agQm768HYCjktunDJG3bbQszi7U8VD4pAKEYiXW",
|
78
|
+
"G5Q7dTUPYw5pEXbfzZbAFSaPstP9bdFmEJ7XXcyrkxVJ",
|
79
|
+
"EZd87x1Fu1ufV7pVRuXAEcL9y6aEMWWqtpcr7AHdU8ms"
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"symbol": "USDH-3Pool",
|
84
|
+
"address": "HcpqAC3QTAZ1h3BuRCXtRfaUwFxjMCneuoqwAni4c2qm",
|
85
|
+
"reserveAccounts": [
|
86
|
+
"3bFWy2hz9yGxvbgoRmzjUqkoYbCTWUDu7sZPHUYV39Pf",
|
87
|
+
"49gyyvxzf61PknHoTg2cFGYQCJRnUrC7Web8h8go7ceM",
|
88
|
+
"92P9U8L43ZCAKfdZxJaBAwmbb3MazdoVgrCm7R3xRnhn"
|
89
|
+
]
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"symbol": "aUSDC-4Pool",
|
93
|
+
"address": "5ZDQYA8LN5tooABpPFCrDwx5wcaTgXMragLwFim27mar",
|
94
|
+
"reserveAccounts": [
|
95
|
+
"66guLcMF3qXkrMyLqDfuNKcHc7B6B36id9ZDDww4hiMv",
|
96
|
+
"8KX8TLQHfq9UyqNvzUrUCLiECNBdMspMmU8mghdM2SAM",
|
97
|
+
"2vhaJumb3hbRLUSDDy3Qk8KGGfzqThdwo8ai4tAvztGh",
|
98
|
+
"CC3FtDKTueNP1pmgtNWvKHZwbznyigSaiGhKsQYAfufD"
|
99
|
+
]
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"symbol": "fUSD-3Pool",
|
103
|
+
"address": "ALkfYpjMp1Bzn1JHCJkAKm4sU1EQt8RiFfX1ufVawuLV",
|
104
|
+
"reserveAccounts": [
|
105
|
+
"3tu1Pac9N8sP8R9zHwmFvU258CPhbRSweVjdb2K2SVjt",
|
106
|
+
"9SbaPafChbA5aCm2ZB52viFVTEb6Mf9VeHxGeJetdHCf",
|
107
|
+
"9AWmAX6AgzVBWYHLRbjbHH5g9XJuoHM1vvaa3HfHxDx3"
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"symbol": "abBUSD-4Pool",
|
112
|
+
"address": "JAQai7Pd6TP2ca3qowQoRw2Qygrhh7PpoLPAf9jvvgMQ",
|
113
|
+
"reserveAccounts": [
|
114
|
+
"FEPtjpdDrEMfUTjCkimXH2e3h8KJTjsZYMLC6FtviTUW",
|
115
|
+
"CRj4DCzp7hDXyNgVhagNJmTmKjtsVLBtPDzjk6JeE2CL",
|
116
|
+
"2hHSmtBb7WzCaNFVun7CCmNq445dyQ9e1Tf66GCQGtjV",
|
117
|
+
"4ZYrDMtLE3HGWjeE9W2L3psZP7SMASnez9rzqmpfnTxa"
|
118
|
+
]
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"symbol": "avaxUSD-3Pool",
|
122
|
+
"address": "2jDEKWC4LYcyhxtQ6ZGZzK1Q9NYDrmZcR2EPRoHyx6Vy",
|
123
|
+
"reserveAccounts": [
|
124
|
+
"CJNW2xGWHzyfZ2y2up9i11p7ZUm1ARvgfQ9Smzzj9arb",
|
125
|
+
"FaqLJMJNLs1cFULzHFzhmoJd4FJukq9f1HHTHJnvbEyx",
|
126
|
+
"V1pdBYfXxCx1sidPpQ3HoQfoEiHBCnPZe3iPEBSDJBr"
|
127
|
+
]
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"symbol": "aaUSDT-4Pool",
|
131
|
+
"address": "FFM9rneg7pFbedUbuJdrwzje9WfKzJzv7jqcpeUQuGCy",
|
132
|
+
"reserveAccounts": [
|
133
|
+
"7AiubbXXefRK3Tw83Y2XGovBwZ691pcdkts2S7zNE43Q",
|
134
|
+
"9UMESFcuCBj8bUw6kGDx8zut1g495Y6TcyATm3ht2kqP",
|
135
|
+
"FznWTeu44sR9WvqVtekzGQn82z7BxErkcpDDDSmvncYY",
|
136
|
+
"Ez1dYUW8FGhrJGHe4e84JTmyZYFwpjwM7GuhSaBth5Xh"
|
137
|
+
]
|
138
|
+
}
|
139
|
+
]
|
@@ -0,0 +1,76 @@
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const multiTokenPools_json_1 = __importDefault(require("./multiTokenPools.json"));
|
19
|
+
const solana_1 = require("../../utils/solana");
|
20
|
+
const clients_1 = require("../../utils/clients");
|
21
|
+
const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
|
22
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
+
const connection = (0, clients_1.getClientSolana)();
|
24
|
+
const reserveAddresses = multiTokenPools_json_1.default
|
25
|
+
.map((p) => p.reserveAccounts.map((a) => new web3_js_1.PublicKey(a)))
|
26
|
+
.flat();
|
27
|
+
const reserveAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, solana_1.tokenAccountStruct, reserveAddresses);
|
28
|
+
const reserves = new Map();
|
29
|
+
const tokenAddresses = [];
|
30
|
+
reserveAccounts.forEach((acc) => {
|
31
|
+
if (!acc)
|
32
|
+
return;
|
33
|
+
reserves.set(acc.pubkey.toString(), acc);
|
34
|
+
tokenAddresses.push(acc.mint.toString());
|
35
|
+
});
|
36
|
+
const tokenPrices = yield cache.getTokenPricesAsMap(tokenAddresses, portfolio_core_1.NetworkId.solana);
|
37
|
+
const lpMintAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, solana_1.mintAccountStruct, multiTokenPools_json_1.default.map((p) => new web3_js_1.PublicKey(p.address)));
|
38
|
+
const lpSources = [];
|
39
|
+
for (let i = 0; i < multiTokenPools_json_1.default.length; i++) {
|
40
|
+
const pool = multiTokenPools_json_1.default[i];
|
41
|
+
const lpMintAccount = lpMintAccounts[i];
|
42
|
+
if (!lpMintAccount)
|
43
|
+
continue;
|
44
|
+
const poolUnderlyingsRaw = [];
|
45
|
+
pool.reserveAccounts.forEach((reserveAddress) => {
|
46
|
+
const reserveAccount = reserves.get(reserveAddress);
|
47
|
+
if (!reserveAccount)
|
48
|
+
return;
|
49
|
+
const tokenPrice = tokenPrices.get(reserveAccount.mint.toString());
|
50
|
+
if (!tokenPrice)
|
51
|
+
return;
|
52
|
+
poolUnderlyingsRaw.push({
|
53
|
+
address: reserveAccount.mint.toString(),
|
54
|
+
decimals: tokenPrice.decimals,
|
55
|
+
price: tokenPrice.price,
|
56
|
+
reserveAmountRaw: reserveAccount.amount,
|
57
|
+
});
|
58
|
+
});
|
59
|
+
if (poolUnderlyingsRaw.length !== pool.reserveAccounts.length)
|
60
|
+
continue;
|
61
|
+
const lpSource = (0, getLpTokenSourceRaw_1.default)(portfolio_core_1.NetworkId.solana, pool.address, constants_1.platformId, {
|
62
|
+
address: pool.address,
|
63
|
+
decimals: lpMintAccount.decimals,
|
64
|
+
supplyRaw: lpMintAccount.supply,
|
65
|
+
}, poolUnderlyingsRaw);
|
66
|
+
lpSources.push(lpSource);
|
67
|
+
}
|
68
|
+
yield cache.setTokenPriceSources(lpSources);
|
69
|
+
});
|
70
|
+
const job = {
|
71
|
+
id: `${constants_1.platformId}-multitoken-pools`,
|
72
|
+
executor,
|
73
|
+
label: 'normal',
|
74
|
+
};
|
75
|
+
exports.default = job;
|
76
|
+
//# sourceMappingURL=multiTokenPoolsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"multiTokenPoolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/multiTokenPoolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAG5C,2CAAyC;AACzC,kFAAqD;AACrD,+CAM4B;AAC5B,iDAAsD;AACtD,+FAE8C;AAE9C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,gBAA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,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 web3_js_1 = require("@solana/web3.js");
|
17
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
17
|
const constants_1 = require("./constants");
|
19
18
|
const clients_1 = require("../../utils/clients");
|
20
19
|
const solana_1 = require("../../utils/solana");
|
21
|
-
const pools_1 = require("./pools");
|
22
|
-
const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
|
23
20
|
const struct_1 = require("./struct");
|
24
21
|
const filters_1 = require("./filters");
|
25
|
-
const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
|
26
22
|
const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
|
27
23
|
const getLpUnderlyingTokenSource_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSource"));
|
28
24
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -30,22 +26,6 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
26
|
// Get all 2-tokens pool (permissionless)
|
31
27
|
const constantPoolsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.poolStateStruct, constants_1.poolsProgramId, filters_1.constantPoolsFilters);
|
32
28
|
const stablePoolsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.poolStateStruct, constants_1.poolsProgramId, filters_1.stablePoolsFilters);
|
33
|
-
// 4pools
|
34
|
-
const meteoraPools = pools_1.pools;
|
35
|
-
// Get all multi-tokens pools
|
36
|
-
const reserverAddresses = new Set();
|
37
|
-
meteoraPools.forEach((pool) => {
|
38
|
-
pool.reserveAccounts.forEach((reserve) => {
|
39
|
-
reserverAddresses.add(new web3_js_1.PublicKey(reserve));
|
40
|
-
});
|
41
|
-
});
|
42
|
-
const reserveAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, Array.from(reserverAddresses));
|
43
|
-
const reservesAccountByAddress = new Map();
|
44
|
-
reserveAccounts.forEach((reserve) => {
|
45
|
-
if (!reserve)
|
46
|
-
return;
|
47
|
-
reservesAccountByAddress.set(reserve.pubkey.toString(), reserve);
|
48
|
-
});
|
49
29
|
const poolsAcountsUnfiltered = [
|
50
30
|
...stablePoolsAccounts,
|
51
31
|
...constantPoolsAccounts,
|
@@ -70,12 +50,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
50
|
tokensMint.add(poolAccount.tokenBMint.toString());
|
71
51
|
lpMints.add(poolAccount.lpMint);
|
72
52
|
});
|
73
|
-
const
|
74
|
-
...Array.from(tokensMint),
|
75
|
-
...reserveAccounts
|
76
|
-
.map((account) => (account ? account.mint.toString() : []))
|
77
|
-
.flat(),
|
78
|
-
], portfolio_core_1.NetworkId.solana, cache);
|
53
|
+
const tokenPrices = yield cache.getTokenPricesAsMap([...Array.from(tokensMint)], portfolio_core_1.NetworkId.solana);
|
79
54
|
// Get all vaults token accounts
|
80
55
|
const tokensAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, Array.from(vaultsLpAddresses));
|
81
56
|
if (!tokensAccounts)
|
@@ -97,12 +72,13 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
97
72
|
return;
|
98
73
|
mintsAccountByAddress.set(mintAccount.pubkey.toString(), mintAccount);
|
99
74
|
});
|
75
|
+
const lpSources = [];
|
100
76
|
for (let id = 0; id < poolsAccounts.length; id++) {
|
101
77
|
const poolAccount = poolsAccounts[id];
|
102
78
|
const aTokenMint = poolAccount.tokenAMint.toString();
|
103
79
|
const bTokenMint = poolAccount.tokenBMint.toString();
|
104
|
-
const aTokenPrice =
|
105
|
-
const bTokenPrice =
|
80
|
+
const aTokenPrice = tokenPrices.get(aTokenMint);
|
81
|
+
const bTokenPrice = tokenPrices.get(bTokenMint);
|
106
82
|
const aMintAccount = mintsAccountByAddress.get(aTokenMint);
|
107
83
|
const bMintAccount = mintsAccountByAddress.get(bTokenMint);
|
108
84
|
const tAccountA = tokenAccountsMap.get(poolAccount.aVaultLp.toString());
|
@@ -127,9 +103,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
127
103
|
reserveAmountRaw: tAccountB.amount,
|
128
104
|
tokenPrice: bTokenPrice,
|
129
105
|
});
|
130
|
-
if (underlyingSource)
|
131
|
-
|
132
|
-
}
|
106
|
+
if (underlyingSource)
|
107
|
+
lpSources.push(underlyingSource);
|
133
108
|
}
|
134
109
|
if (!bTokenPrice || !aTokenPrice)
|
135
110
|
continue;
|
@@ -151,62 +126,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
151
126
|
reserveAmountRaw: tAccountB.amount,
|
152
127
|
},
|
153
128
|
], undefined);
|
154
|
-
|
155
|
-
}
|
156
|
-
// 4 pools
|
157
|
-
for (let id = 0; id < meteoraPools.length; id++) {
|
158
|
-
const pool = meteoraPools[id];
|
159
|
-
const { address } = pool;
|
160
|
-
const underlyings = [];
|
161
|
-
let supplyValue = 0;
|
162
|
-
let checkedTokensPrices = 0;
|
163
|
-
const numberOfUnderlyings = pool.reserveAccounts.length;
|
164
|
-
for (let index = 0; index < numberOfUnderlyings; index++) {
|
165
|
-
const reserveAccount = reservesAccountByAddress.get(pool.reserveAccounts[index]);
|
166
|
-
if (!reserveAccount)
|
167
|
-
continue;
|
168
|
-
const reserveTokenPrice = tokenPriceById.get(reserveAccount.mint.toString());
|
169
|
-
if (!reserveTokenPrice)
|
170
|
-
continue;
|
171
|
-
checkedTokensPrices += 1;
|
172
|
-
const reserveAmount = new bignumber_js_1.default(reserveAccount.amount.toString()).div(Math.pow(10, reserveTokenPrice.decimals));
|
173
|
-
const reserveValue = reserveAmount.multipliedBy(reserveTokenPrice.price);
|
174
|
-
const underlying = {
|
175
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
176
|
-
address: reserveTokenPrice.address,
|
177
|
-
decimals: reserveTokenPrice.decimals,
|
178
|
-
price: reserveTokenPrice.price,
|
179
|
-
amountPerLp: reserveAmount
|
180
|
-
.dividedBy(reserveValue)
|
181
|
-
.dividedBy(numberOfUnderlyings)
|
182
|
-
.toNumber(),
|
183
|
-
};
|
184
|
-
underlyings.push(underlying);
|
185
|
-
supplyValue += reserveValue.toNumber();
|
186
|
-
}
|
187
|
-
// don't push the LP if one tokenPrice was not found.
|
188
|
-
if (checkedTokensPrices < pool.reserveAccounts.length)
|
189
|
-
continue;
|
190
|
-
const tokenSupplyAndDecimalsRes = yield (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(new web3_js_1.PublicKey(address), client, 0);
|
191
|
-
if (!tokenSupplyAndDecimalsRes)
|
192
|
-
continue;
|
193
|
-
const { supply, decimals } = tokenSupplyAndDecimalsRes;
|
194
|
-
if (supplyValue <= 0)
|
195
|
-
continue;
|
196
|
-
const price = supplyValue / supply;
|
197
|
-
yield cache.setTokenPriceSource({
|
198
|
-
id: constants_1.platformId,
|
199
|
-
weight: 1,
|
200
|
-
address,
|
201
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
202
|
-
platformId: constants_1.platformId,
|
203
|
-
decimals,
|
204
|
-
price,
|
205
|
-
underlyings,
|
206
|
-
timestamp: Date.now(),
|
207
|
-
liquidityName: pool.symbol,
|
208
|
-
});
|
129
|
+
lpSources.push(lpSource);
|
209
130
|
}
|
131
|
+
yield cache.setTokenPriceSources(lpSources);
|
210
132
|
});
|
211
133
|
const job = {
|
212
134
|
id: `${constants_1.platformId}-pools`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRo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ACF,EACD,SAAS,CACV,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -8,9 +8,6 @@ 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
13
|
const constants_1 = require("./constants");
|
@@ -19,16 +16,16 @@ const solana_1 = require("../../utils/solana");
|
|
19
16
|
const struct_1 = require("./struct");
|
20
17
|
const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
|
21
18
|
const filters_1 = require("./filters");
|
22
|
-
const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
|
23
19
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
20
|
const client = (0, clients_1.getClientSolana)();
|
25
21
|
const vaultAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.vaultStruct, constants_1.vaultsProgramId, filters_1.vaultsFilters);
|
26
|
-
const
|
22
|
+
const tokenPrices = yield cache.getTokenPricesAsMap(vaultAccounts.map((vault) => vault.token_mint.toString()), portfolio_core_1.NetworkId.solana);
|
23
|
+
const lpSources = [];
|
27
24
|
for (let i = 0; i < vaultAccounts.length; i += 1) {
|
28
25
|
const vault = vaultAccounts[i];
|
29
26
|
if (vault.total_amount.isZero())
|
30
27
|
continue;
|
31
|
-
const vaultTokenPrice =
|
28
|
+
const vaultTokenPrice = tokenPrices.get(vault.token_mint.toString());
|
32
29
|
if (!vaultTokenPrice)
|
33
30
|
continue;
|
34
31
|
const lpSupplyRes = yield (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(vault.lp_mint, client, 0);
|
@@ -40,7 +37,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
37
|
.toNumber();
|
41
38
|
const vaultValue = vaultAmount * vaultTokenPrice.price;
|
42
39
|
const price = vaultValue / lpSupply;
|
43
|
-
|
40
|
+
const lpSource = {
|
44
41
|
id: constants_1.platformId,
|
45
42
|
weight: 1,
|
46
43
|
address: vault.lp_mint.toString(),
|
@@ -59,8 +56,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
56
|
},
|
60
57
|
],
|
61
58
|
timestamp: Date.now(),
|
62
|
-
}
|
59
|
+
};
|
60
|
+
lpSources.push(lpSource);
|
63
61
|
}
|
62
|
+
yield cache.setTokenPriceSources(lpSources);
|
64
63
|
});
|
65
64
|
const job = {
|
66
65
|
id: `${constants_1.platformId}-vaults`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/vaultsJob.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAyE;AACzE,2CAA0D;AAC1D,iDAAsD;AACtD,+CAA8D;AAC9D,qCAAuC;AACvC,gGAA6F;AAC7F,uCAA0C;AAI1C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAA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AO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE;YACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,UAAU;YACpB,KAAK;YACL,WAAW,EAAE;gBACX;oBACE,SAAS,EAAE,0BAAS,CAAC,MAAM;oBAC3B,OAAO,EAAE,eAAe,CAAC,OAAO;oBAChC,QAAQ,EAAE,eAAe,CAAC,QAAQ;oBAClC,KAAK,EAAE,eAAe,CAAC,KAAK;oBAC5B,WAAW,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK;iBAC3C;aACF;YACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
export declare const platformId = "tulip";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const tulipV2ProgramId: PublicKey;
|
6
|
+
export declare const tulipLendingProgramId: PublicKey;
|
7
|
+
export declare const leverageProgramId: PublicKey;
|
8
|
+
export declare const tulipMint = "TuLipcqtGVXP9XR62wM8WWCm6a9vhLs7T1uoWBk6FDs";
|
9
|
+
export declare const tulipDecimals = 6;
|
10
|
+
export declare const vaultsKey = "vaults";
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.vaultsKey = exports.tulipDecimals = exports.tulipMint = exports.leverageProgramId = exports.tulipLendingProgramId = exports.tulipV2ProgramId = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'tulip';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Tulip',
|
9
|
+
image: 'https://sonar.watch/img/platforms/tulip.webp',
|
10
|
+
defiLlamaId: 'tulip-protocol',
|
11
|
+
website: 'https://tulip.garden/',
|
12
|
+
twitter: 'https://twitter.com/TulipProtocol',
|
13
|
+
};
|
14
|
+
exports.tulipV2ProgramId = new web3_js_1.PublicKey('TLPv2tuSVvn3fSk8RgW3yPddkp5oFivzZV3rA9hQxtX');
|
15
|
+
exports.tulipLendingProgramId = new web3_js_1.PublicKey('4bcFeLv4nydFrsZqV5CgwCVrPhkQKsXtzfy2KyMz7ozM');
|
16
|
+
exports.leverageProgramId = new web3_js_1.PublicKey('Bt2WPMmbwHPk36i4CRucNDyLcmoGdC7xEdrVuxgJaNE6');
|
17
|
+
exports.tulipMint = 'TuLipcqtGVXP9XR62wM8WWCm6a9vhLs7T1uoWBk6FDs';
|
18
|
+
exports.tulipDecimals = 6;
|
19
|
+
exports.vaultsKey = 'vaults';
|
20
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,SAAS,GAAG,6CAA6C,CAAC;AAC1D,QAAA,aAAa,GAAG,CAAC,CAAC;AAClB,QAAA,SAAS,GAAG,QAAQ,CAAC"}
|