@sonarwatch/portfolio-plugins 0.8.90 → 0.8.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/package.json +2 -2
- package/src/index.js +62 -72
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
package/CHANGELOG.md
CHANGED
@@ -2,10 +2,18 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
-
## [0.8.
|
5
|
+
## [0.8.92](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.91...plugins-0.8.92) (2023-11-22)
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
+
## [0.8.91](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.90...plugins-0.8.91) (2023-11-22)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.8.90](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.89...plugins-0.8.90) (2023-11-21)
|
14
|
+
|
15
|
+
|
16
|
+
|
9
17
|
## [0.8.89](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.88...plugins-0.8.89) (2023-11-21)
|
10
18
|
|
11
19
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.92",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"web3-v1": "npm:web3@^1.5.0"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
|
-
"@sonarwatch/portfolio-core": "0.8.
|
43
|
+
"@sonarwatch/portfolio-core": "0.8.92"
|
44
44
|
},
|
45
45
|
"main": "./src/index.js",
|
46
46
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -57,19 +57,9 @@ const compound_1 = require("./plugins/compound");
|
|
57
57
|
const stargate_1 = require("./plugins/stargate");
|
58
58
|
const stader_1 = require("./plugins/stader");
|
59
59
|
const uniswap_1 = require("./plugins/uniswap");
|
60
|
-
const uniswap_v2_1 = require("./plugins/uniswap-v2");
|
61
60
|
const balancer_1 = require("./plugins/balancer");
|
62
61
|
const paraswap_1 = require("./plugins/paraswap");
|
63
62
|
const hawksight_1 = require("./plugins/hawksight");
|
64
|
-
const realms_1 = require("./plugins/realms");
|
65
|
-
const maple_1 = require("./plugins/maple");
|
66
|
-
const flexlend_1 = require("./plugins/flexlend");
|
67
|
-
const fluxbeam_1 = require("./plugins/fluxbeam");
|
68
|
-
const jupiter_1 = require("./plugins/jupiter");
|
69
|
-
const zeta_1 = require("./plugins/zeta");
|
70
|
-
const venus_1 = require("./plugins/venus");
|
71
|
-
const sushiswap_1 = require("./plugins/sushiswap");
|
72
|
-
const yearn_1 = require("./plugins/yearn");
|
73
63
|
var constants_1 = require("./plugins/tokens/constants");
|
74
64
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
75
65
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -121,14 +111,14 @@ exports.platforms = [
|
|
121
111
|
...balancer_1.platforms,
|
122
112
|
...paraswap_1.platforms,
|
123
113
|
...hawksight_1.platforms,
|
124
|
-
...
|
125
|
-
...
|
126
|
-
...
|
127
|
-
...
|
128
|
-
...
|
129
|
-
...
|
130
|
-
...
|
131
|
-
...
|
114
|
+
// ...realmsPlatforms,
|
115
|
+
// ...maplePlatforms,
|
116
|
+
// ...flexlendPlatforms,
|
117
|
+
// ...fluxbeamPlatforms,
|
118
|
+
// ...zetaPlatforms,
|
119
|
+
// ...venusPlatforms,
|
120
|
+
// ...sushiswapPlatforms,
|
121
|
+
// ...yearnPlatforms,
|
132
122
|
];
|
133
123
|
// JOBS //
|
134
124
|
exports.jobs = [
|
@@ -155,26 +145,26 @@ exports.jobs = [
|
|
155
145
|
...liquiditypools_sei_1.jobs,
|
156
146
|
...aftermath_1.jobs,
|
157
147
|
...liquidswap_1.jobs,
|
158
|
-
...
|
159
|
-
...
|
160
|
-
...
|
161
|
-
...
|
162
|
-
...
|
163
|
-
...
|
164
|
-
...
|
165
|
-
...
|
166
|
-
...
|
167
|
-
...
|
168
|
-
...
|
169
|
-
...
|
170
|
-
...
|
171
|
-
...
|
172
|
-
...
|
173
|
-
...
|
174
|
-
...
|
175
|
-
...
|
176
|
-
...
|
177
|
-
...
|
148
|
+
// ...kaminoJobs,
|
149
|
+
// ...naviJobs,
|
150
|
+
// ...scallopJobs,
|
151
|
+
// ...curveJobs,
|
152
|
+
// ...compoundJobs,
|
153
|
+
// ...stargateJobs,
|
154
|
+
// ...staderJobs,
|
155
|
+
// ...uniswapV2Jobs,
|
156
|
+
// ...uniswapJobs,
|
157
|
+
// ...balancerJobs,
|
158
|
+
// ...paraswapJobs,
|
159
|
+
// ...realmsJobs,
|
160
|
+
// ...mapleJobs,
|
161
|
+
// ...flexlendJobs,
|
162
|
+
// ...fluxbeamJobs,
|
163
|
+
// ...jupiterJobs,
|
164
|
+
// ...zetaJobs,
|
165
|
+
// ...venusJobs,
|
166
|
+
// ...sushiswapJobs,
|
167
|
+
// ...yearnJobs,
|
178
168
|
];
|
179
169
|
// FETCHERS //
|
180
170
|
exports.fetchers = [
|
@@ -188,40 +178,40 @@ exports.fetchers = [
|
|
188
178
|
...raydium_1.fetchers,
|
189
179
|
...orca_1.fetchers,
|
190
180
|
...drift_1.fetchers,
|
191
|
-
...
|
192
|
-
...
|
193
|
-
...
|
194
|
-
...
|
195
|
-
...
|
196
|
-
...
|
197
|
-
...
|
198
|
-
...
|
199
|
-
...
|
200
|
-
...
|
201
|
-
...
|
202
|
-
...
|
203
|
-
...
|
204
|
-
...
|
205
|
-
...
|
206
|
-
...
|
207
|
-
...
|
208
|
-
...
|
209
|
-
...
|
210
|
-
...
|
211
|
-
...
|
212
|
-
...
|
213
|
-
...
|
214
|
-
...
|
215
|
-
...
|
216
|
-
...
|
217
|
-
...
|
218
|
-
...
|
219
|
-
...
|
220
|
-
...
|
221
|
-
...
|
222
|
-
...
|
223
|
-
...
|
224
|
-
...
|
181
|
+
// ...mangoFetchers,
|
182
|
+
// ...kaminoFetchers,
|
183
|
+
// ...cetusFetchers,
|
184
|
+
// ...turbosFetchers,
|
185
|
+
// ...stakingAptosFetchers,
|
186
|
+
// ...pancakeswapFetchers,
|
187
|
+
// ...aaveFetchers,
|
188
|
+
// ...ordersFetchers,
|
189
|
+
// ...morphoFetchers,
|
190
|
+
// ...liquidityPoolsSeiFetchers,
|
191
|
+
// ...bucketFetchers,
|
192
|
+
// ...naviFetchers,
|
193
|
+
// ...scallopFetchers,
|
194
|
+
// ...rocketpoolFetchers,
|
195
|
+
// ...curveFetchers,
|
196
|
+
// ...stargateFetchers,
|
197
|
+
// ...makerFetchers,
|
198
|
+
// ...compoundFetchers,
|
199
|
+
// ...lidoFetchers,
|
200
|
+
// ...staderFetchers,
|
201
|
+
// ...uniswapV2Fetchers,
|
202
|
+
// ...uniswapFetchers,
|
203
|
+
// ...balancerFetchers,
|
204
|
+
// ...paraswapFetchers,
|
205
|
+
// ...hawksightFetchers,
|
206
|
+
// ...realmsFetchers,
|
207
|
+
// ...mapleFetchers,
|
208
|
+
// ...flexlendFetchers,
|
209
|
+
// ...fluxbeamFetchers,
|
210
|
+
// ...jupiterFetchers,
|
211
|
+
// ...zetaFetchers,
|
212
|
+
// ...venusFetchers,
|
213
|
+
// ...sushiswapFetchers,
|
214
|
+
// ...yearnFetchers,
|
225
215
|
];
|
226
216
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
227
217
|
//# 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,+CAG2B;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;
|
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,+CAG2B;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;AA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AgC;IAChC,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;IACtB,yBAAyB;IACzB,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;IACpB,uBAAuB;IACvB,mBAAmB;IACnB,qBAAqB;IACrB,wBAAwB;IACxB,sBAAsB;IACtB,uBAAuB;IACvB,uBAAuB;IACvB,wBAAwB;IACxB,qBAAqB;IACrB,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,wBAAwB;IACxB,oBAAoB;CACrB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
|
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
|
|
36
36
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
37
37
|
function getBalancerPoolsV2(url) {
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const query = (0, graphql_request_1.gql) `
|
40
|
-
query pools {
|
41
|
-
pools(
|
42
|
-
first: 1000
|
43
|
-
orderBy: totalLiquidity
|
44
|
-
orderDirection: desc
|
45
|
-
where: { totalLiquidity_gt: "500" }
|
46
|
-
) {
|
47
|
-
id
|
48
|
-
address
|
49
|
-
symbol
|
50
|
-
totalLiquidity
|
51
|
-
totalShares
|
52
|
-
tokens {
|
53
|
-
balance
|
54
|
-
decimals
|
55
|
-
symbol
|
56
|
-
address
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
39
|
+
const query = (0, graphql_request_1.gql) `
|
40
|
+
query pools {
|
41
|
+
pools(
|
42
|
+
first: 1000
|
43
|
+
orderBy: totalLiquidity
|
44
|
+
orderDirection: desc
|
45
|
+
where: { totalLiquidity_gt: "500" }
|
46
|
+
) {
|
47
|
+
id
|
48
|
+
address
|
49
|
+
symbol
|
50
|
+
totalLiquidity
|
51
|
+
totalShares
|
52
|
+
tokens {
|
53
|
+
balance
|
54
|
+
decimals
|
55
|
+
symbol
|
56
|
+
address
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
`;
|
61
61
|
const res = yield (0, graphql_request_1.default)(url, query);
|
62
62
|
const pools = res.pools;
|
@@ -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;
|