@sonarwatch/portfolio-plugins 0.8.94 → 0.8.96
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 +21 -13
- package/package.json +2 -2
- package/src/index.js +72 -64
- 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,22 +2,30 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
-
## [0.8.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
## [0.8.93](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.92...plugins-0.8.93) (2023-11-22)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
## [0.8.92](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.91...plugins-0.8.92) (2023-11-22)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
## [0.8.91](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.90...plugins-0.8.91) (2023-11-22)
|
5
|
+
## [0.8.96](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.95...plugins-0.8.96) (2023-11-22)
|
18
6
|
|
19
7
|
|
20
8
|
|
9
|
+
## [0.8.95](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.94...plugins-0.8.95) (2023-11-22)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.8.94](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.93...plugins-0.8.94) (2023-11-22)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [0.8.93](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.92...plugins-0.8.93) (2023-11-22)
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
## [0.8.92](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.91...plugins-0.8.92) (2023-11-22)
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
## [0.8.91](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.90...plugins-0.8.91) (2023-11-22)
|
26
|
+
|
27
|
+
|
28
|
+
|
21
29
|
## [0.8.90](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.89...plugins-0.8.90) (2023-11-21)
|
22
30
|
|
23
31
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.96",
|
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.96"
|
44
44
|
},
|
45
45
|
"main": "./src/index.js",
|
46
46
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -57,9 +57,17 @@ 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");
|
60
61
|
const balancer_1 = require("./plugins/balancer");
|
61
62
|
const paraswap_1 = require("./plugins/paraswap");
|
62
63
|
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");
|
63
71
|
var constants_1 = require("./plugins/tokens/constants");
|
64
72
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
65
73
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -111,12 +119,12 @@ exports.platforms = [
|
|
111
119
|
...balancer_1.platforms,
|
112
120
|
...paraswap_1.platforms,
|
113
121
|
...hawksight_1.platforms,
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
122
|
+
...realms_1.platforms,
|
123
|
+
...maple_1.platforms,
|
124
|
+
...flexlend_1.platforms,
|
125
|
+
...fluxbeam_1.platforms,
|
126
|
+
...zeta_1.platforms,
|
127
|
+
...venus_1.platforms,
|
120
128
|
// ...sushiswapPlatforms,
|
121
129
|
// ...yearnPlatforms,
|
122
130
|
];
|
@@ -124,7 +132,7 @@ exports.platforms = [
|
|
124
132
|
exports.jobs = [
|
125
133
|
...tokens_1.jobs,
|
126
134
|
...native_stake_1.jobs,
|
127
|
-
...
|
135
|
+
// ...thalaJobs,
|
128
136
|
...marginfi_1.jobs,
|
129
137
|
...raydium_1.jobs,
|
130
138
|
...solend_1.jobs,
|
@@ -132,84 +140,84 @@ exports.jobs = [
|
|
132
140
|
...orca_1.jobs,
|
133
141
|
...drift_1.jobs,
|
134
142
|
...mango_1.jobs,
|
135
|
-
...
|
136
|
-
...
|
143
|
+
// ...cetusJobs,
|
144
|
+
// ...turbosJobs,
|
137
145
|
...top_tokens_1.jobs,
|
138
146
|
...pancakeswap_1.jobs,
|
139
|
-
...
|
147
|
+
// ...auxexchangeJobs,
|
140
148
|
...saber_1.jobs,
|
141
149
|
...aave_1.jobs,
|
142
150
|
...orders_1.jobs,
|
143
151
|
...morpho_1.jobs,
|
144
152
|
...maker_1.jobs,
|
145
|
-
...
|
146
|
-
...
|
147
|
-
...
|
148
|
-
|
153
|
+
// ...liquidityPoolsSeiJobs,
|
154
|
+
// ...aftermathJobs,
|
155
|
+
// ...liquidswapJobs,
|
156
|
+
...kamino_1.jobs,
|
149
157
|
// ...naviJobs,
|
150
158
|
// ...scallopJobs,
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
159
|
+
...curve_1.jobs,
|
160
|
+
...compound_1.jobs,
|
161
|
+
...stargate_1.jobs,
|
162
|
+
...stader_1.jobs,
|
163
|
+
...uniswap_v2_1.jobs,
|
164
|
+
...uniswap_1.jobs,
|
165
|
+
...balancer_1.jobs,
|
166
|
+
...paraswap_1.jobs,
|
167
|
+
...realms_1.jobs,
|
168
|
+
...maple_1.jobs,
|
169
|
+
...flexlend_1.jobs,
|
170
|
+
...fluxbeam_1.jobs,
|
171
|
+
...jupiter_1.jobs,
|
172
|
+
...zeta_1.jobs,
|
173
|
+
...venus_1.jobs,
|
166
174
|
// ...sushiswapJobs,
|
167
175
|
// ...yearnJobs,
|
168
176
|
];
|
169
177
|
// FETCHERS //
|
170
178
|
exports.fetchers = [
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
179
|
+
...tokens_1.fetchers,
|
180
|
+
...native_stake_1.fetchers,
|
181
|
+
...tensor_1.fetchers,
|
182
|
+
...marginfi_1.fetchers,
|
183
|
+
...marinade_1.fetchers,
|
176
184
|
...solend_1.fetchers,
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
185
|
+
...thala_1.fetchers,
|
186
|
+
...raydium_1.fetchers,
|
187
|
+
...orca_1.fetchers,
|
188
|
+
...drift_1.fetchers,
|
189
|
+
...mango_1.fetchers,
|
190
|
+
...kamino_1.fetchers,
|
191
|
+
...cetus_1.fetchers,
|
184
192
|
// ...turbosFetchers,
|
185
193
|
// ...stakingAptosFetchers,
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
194
|
+
...pancakeswap_1.fetchers,
|
195
|
+
...aave_1.fetchers,
|
196
|
+
...orders_1.fetchers,
|
197
|
+
...morpho_1.fetchers,
|
190
198
|
// ...liquidityPoolsSeiFetchers,
|
191
199
|
// ...bucketFetchers,
|
192
200
|
// ...naviFetchers,
|
193
201
|
// ...scallopFetchers,
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
202
|
+
...rocket_pool_1.fetchers,
|
203
|
+
...curve_1.fetchers,
|
204
|
+
...stargate_1.fetchers,
|
205
|
+
...maker_1.fetchers,
|
206
|
+
...compound_1.fetchers,
|
207
|
+
...lido_1.fetchers,
|
208
|
+
...stader_1.fetchers,
|
209
|
+
...uniswap_v2_1.fetchers,
|
210
|
+
...uniswap_1.fetchers,
|
211
|
+
...balancer_1.fetchers,
|
212
|
+
...paraswap_1.fetchers,
|
213
|
+
...hawksight_1.fetchers,
|
214
|
+
...realms_1.fetchers,
|
215
|
+
...maple_1.fetchers,
|
216
|
+
...flexlend_1.fetchers,
|
217
|
+
...fluxbeam_1.fetchers,
|
218
|
+
...jupiter_1.fetchers,
|
219
|
+
...zeta_1.fetchers,
|
220
|
+
...venus_1.fetchers,
|
213
221
|
// ...sushiswapFetchers,
|
214
222
|
// ...yearnFetchers,
|
215
223
|
];
|
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;A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B;IACnB,sBAAsB;IACtB,GAAG,sBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,qBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,gBAAa;IAChB,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;
|