@sonarwatch/portfolio-plugins 0.8.89 → 0.8.91
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 +26 -31
- 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/src/plugins/yearn/abis.d.ts +185 -0
- package/src/plugins/yearn/abis.js +144 -0
- package/src/plugins/yearn/abis.js.map +1 -0
- package/src/plugins/yearn/constants.d.ts +9 -0
- package/src/plugins/yearn/constants.js +33 -0
- package/src/plugins/yearn/constants.js.map +1 -0
- package/src/plugins/yearn/getLockersBalancesFetcher.d.ts +4 -0
- package/src/plugins/yearn/getLockersBalancesFetcher.js +56 -0
- package/src/plugins/yearn/getLockersBalancesFetcher.js.map +1 -0
- package/src/plugins/yearn/getStakesBalancesFetcher.d.ts +4 -0
- package/src/plugins/yearn/getStakesBalancesFetcher.js +70 -0
- package/src/plugins/yearn/getStakesBalancesFetcher.js.map +1 -0
- package/src/plugins/yearn/getVaultsBalancesFetcher.d.ts +3 -0
- package/src/plugins/yearn/getVaultsBalancesFetcher.js +95 -0
- package/src/plugins/yearn/getVaultsBalancesFetcher.js.map +1 -0
- package/src/plugins/yearn/getVaultsJob.d.ts +3 -0
- package/src/plugins/yearn/getVaultsJob.js +29 -0
- package/src/plugins/yearn/getVaultsJob.js.map +1 -0
- package/src/plugins/yearn/getYearnStakeBalancesFetcher.d.ts +4 -0
- package/src/plugins/yearn/getYearnStakeBalancesFetcher.js +85 -0
- package/src/plugins/yearn/getYearnStakeBalancesFetcher.js.map +1 -0
- package/src/plugins/yearn/helpers.d.ts +5 -0
- package/src/plugins/yearn/helpers.js +67 -0
- package/src/plugins/yearn/helpers.js.map +1 -0
- package/src/plugins/yearn/index.d.ts +6 -0
- package/src/plugins/yearn/index.js +22 -0
- package/src/plugins/yearn/index.js.map +1 -0
- package/src/plugins/yearn/types.d.ts +75 -0
- package/src/plugins/yearn/types.js +3 -0
- package/src/plugins/yearn/types.js.map +1 -0
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.91](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.90...plugins-0.8.91) (2023-11-22)
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
+
## [0.8.90](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.89...plugins-0.8.90) (2023-11-21)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.8.89](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.88...plugins-0.8.89) (2023-11-21)
|
14
|
+
|
15
|
+
|
16
|
+
|
9
17
|
## [0.8.88](https://github.com/sonarwatch/portfolio/compare/plugins-0.8.87...plugins-0.8.88) (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.91",
|
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.91"
|
44
44
|
},
|
45
45
|
"main": "./src/index.js",
|
46
46
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -61,14 +61,6 @@ const uniswap_v2_1 = require("./plugins/uniswap-v2");
|
|
61
61
|
const balancer_1 = require("./plugins/balancer");
|
62
62
|
const paraswap_1 = require("./plugins/paraswap");
|
63
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");
|
71
|
-
const sushiswap_1 = require("./plugins/sushiswap");
|
72
64
|
var constants_1 = require("./plugins/tokens/constants");
|
73
65
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
74
66
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -120,13 +112,14 @@ exports.platforms = [
|
|
120
112
|
...balancer_1.platforms,
|
121
113
|
...paraswap_1.platforms,
|
122
114
|
...hawksight_1.platforms,
|
123
|
-
...
|
124
|
-
...
|
125
|
-
...
|
126
|
-
...
|
127
|
-
...
|
128
|
-
...
|
129
|
-
...
|
115
|
+
// ...realmsPlatforms,
|
116
|
+
// ...maplePlatforms,
|
117
|
+
// ...flexlendPlatforms,
|
118
|
+
// ...fluxbeamPlatforms,
|
119
|
+
// ...zetaPlatforms,
|
120
|
+
// ...venusPlatforms,
|
121
|
+
// ...sushiswapPlatforms,
|
122
|
+
// ...yearnPlatforms,
|
130
123
|
];
|
131
124
|
// JOBS //
|
132
125
|
exports.jobs = [
|
@@ -164,14 +157,15 @@ exports.jobs = [
|
|
164
157
|
...uniswap_1.jobs,
|
165
158
|
...balancer_1.jobs,
|
166
159
|
...paraswap_1.jobs,
|
167
|
-
...
|
168
|
-
...
|
169
|
-
...
|
170
|
-
...
|
171
|
-
...
|
172
|
-
...
|
173
|
-
...
|
174
|
-
...
|
160
|
+
// ...realmsJobs,
|
161
|
+
// ...mapleJobs,
|
162
|
+
// ...flexlendJobs,
|
163
|
+
// ...fluxbeamJobs,
|
164
|
+
// ...jupiterJobs,
|
165
|
+
// ...zetaJobs,
|
166
|
+
// ...venusJobs,
|
167
|
+
// ...sushiswapJobs,
|
168
|
+
// ...yearnJobs,
|
175
169
|
];
|
176
170
|
// FETCHERS //
|
177
171
|
exports.fetchers = [
|
@@ -210,14 +204,15 @@ exports.fetchers = [
|
|
210
204
|
...balancer_1.fetchers,
|
211
205
|
...paraswap_1.fetchers,
|
212
206
|
...hawksight_1.fetchers,
|
213
|
-
...
|
214
|
-
...
|
215
|
-
...
|
216
|
-
...
|
217
|
-
...
|
218
|
-
...
|
219
|
-
...
|
220
|
-
...
|
207
|
+
// ...realmsFetchers,
|
208
|
+
// ...mapleFetchers,
|
209
|
+
// ...flexlendFetchers,
|
210
|
+
// ...fluxbeamFetchers,
|
211
|
+
// ...jupiterFetchers,
|
212
|
+
// ...zetaFetchers,
|
213
|
+
// ...venusFetchers,
|
214
|
+
// ...sushiswapFetchers,
|
215
|
+
// ...yearnFetchers,
|
221
216
|
];
|
222
217
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
223
218
|
//# 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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IACpB,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;
|
@@ -0,0 +1,185 @@
|
|
1
|
+
export declare const lockersAbi: {
|
2
|
+
readonly locks: {
|
3
|
+
readonly stateMutability: "view";
|
4
|
+
readonly type: "function";
|
5
|
+
readonly name: "locked";
|
6
|
+
readonly inputs: readonly [{
|
7
|
+
readonly name: "arg0";
|
8
|
+
readonly type: "address";
|
9
|
+
}];
|
10
|
+
readonly outputs: readonly [{
|
11
|
+
readonly name: "amount";
|
12
|
+
readonly type: "int128";
|
13
|
+
}, {
|
14
|
+
readonly name: "end";
|
15
|
+
readonly type: "uint256";
|
16
|
+
}];
|
17
|
+
readonly gas: 5653;
|
18
|
+
};
|
19
|
+
readonly claimableRewards: {
|
20
|
+
readonly inputs: readonly [{
|
21
|
+
readonly internalType: "address";
|
22
|
+
readonly name: "_account";
|
23
|
+
readonly type: "address";
|
24
|
+
}];
|
25
|
+
readonly name: "claimableRewards";
|
26
|
+
readonly outputs: readonly [{
|
27
|
+
readonly components: readonly [{
|
28
|
+
readonly internalType: "address";
|
29
|
+
readonly name: "token";
|
30
|
+
readonly type: "address";
|
31
|
+
}, {
|
32
|
+
readonly internalType: "uint256";
|
33
|
+
readonly name: "amount";
|
34
|
+
readonly type: "uint256";
|
35
|
+
}];
|
36
|
+
readonly internalType: "struct AuraLocker.EarnedData[]";
|
37
|
+
readonly name: "userRewards";
|
38
|
+
readonly type: "tuple[]";
|
39
|
+
}];
|
40
|
+
readonly stateMutability: "view";
|
41
|
+
readonly type: "function";
|
42
|
+
};
|
43
|
+
readonly lockedBalances: {
|
44
|
+
readonly noBoost: {
|
45
|
+
readonly inputs: readonly [{
|
46
|
+
readonly internalType: "address";
|
47
|
+
readonly name: "_user";
|
48
|
+
readonly type: "address";
|
49
|
+
}];
|
50
|
+
readonly name: "lockedBalances";
|
51
|
+
readonly outputs: readonly [{
|
52
|
+
readonly internalType: "uint256";
|
53
|
+
readonly name: "total";
|
54
|
+
readonly type: "uint256";
|
55
|
+
}, {
|
56
|
+
readonly internalType: "uint256";
|
57
|
+
readonly name: "unlockable";
|
58
|
+
readonly type: "uint256";
|
59
|
+
}, {
|
60
|
+
readonly internalType: "uint256";
|
61
|
+
readonly name: "locked";
|
62
|
+
readonly type: "uint256";
|
63
|
+
}, {
|
64
|
+
readonly components: readonly [{
|
65
|
+
readonly internalType: "uint112";
|
66
|
+
readonly name: "amount";
|
67
|
+
readonly type: "uint112";
|
68
|
+
}, {
|
69
|
+
readonly internalType: "uint32";
|
70
|
+
readonly name: "unlockTime";
|
71
|
+
readonly type: "uint32";
|
72
|
+
}];
|
73
|
+
readonly internalType: "struct AuraLocker.LockedBalance[]";
|
74
|
+
readonly name: "lockData";
|
75
|
+
readonly type: "tuple[]";
|
76
|
+
}];
|
77
|
+
readonly stateMutability: "view";
|
78
|
+
readonly type: "function";
|
79
|
+
};
|
80
|
+
readonly boost: {
|
81
|
+
readonly inputs: readonly [{
|
82
|
+
readonly internalType: "address";
|
83
|
+
readonly name: "_user";
|
84
|
+
readonly type: "address";
|
85
|
+
}];
|
86
|
+
readonly name: "lockedBalances";
|
87
|
+
readonly outputs: readonly [{
|
88
|
+
readonly internalType: "uint256";
|
89
|
+
readonly name: "total";
|
90
|
+
readonly type: "uint256";
|
91
|
+
}, {
|
92
|
+
readonly internalType: "uint256";
|
93
|
+
readonly name: "unlockable";
|
94
|
+
readonly type: "uint256";
|
95
|
+
}, {
|
96
|
+
readonly internalType: "uint256";
|
97
|
+
readonly name: "locked";
|
98
|
+
readonly type: "uint256";
|
99
|
+
}, {
|
100
|
+
readonly components: readonly [{
|
101
|
+
readonly internalType: "uint112";
|
102
|
+
readonly name: "amount";
|
103
|
+
readonly type: "uint112";
|
104
|
+
}, {
|
105
|
+
readonly internalType: "uint112";
|
106
|
+
readonly name: "boosted";
|
107
|
+
readonly type: "uint112";
|
108
|
+
}, {
|
109
|
+
readonly internalType: "uint32";
|
110
|
+
readonly name: "unlockTime";
|
111
|
+
readonly type: "uint32";
|
112
|
+
}];
|
113
|
+
readonly internalType: "struct CvxLockerV2.LockedBalance[]";
|
114
|
+
readonly name: "lockData";
|
115
|
+
readonly type: "tuple[]";
|
116
|
+
}];
|
117
|
+
readonly stateMutability: "view";
|
118
|
+
readonly type: "function";
|
119
|
+
};
|
120
|
+
};
|
121
|
+
readonly tokenOfOwnerByIndex: {
|
122
|
+
readonly inputs: readonly [{
|
123
|
+
readonly internalType: "address";
|
124
|
+
readonly name: "owner";
|
125
|
+
readonly type: "address";
|
126
|
+
}, {
|
127
|
+
readonly internalType: "uint256";
|
128
|
+
readonly name: "index";
|
129
|
+
readonly type: "uint256";
|
130
|
+
}];
|
131
|
+
readonly name: "tokenOfOwnerByIndex";
|
132
|
+
readonly outputs: readonly [{
|
133
|
+
readonly internalType: "uint256";
|
134
|
+
readonly name: "";
|
135
|
+
readonly type: "uint256";
|
136
|
+
}];
|
137
|
+
readonly stateMutability: "view";
|
138
|
+
readonly type: "function";
|
139
|
+
};
|
140
|
+
readonly nftLocked: {
|
141
|
+
readonly inputs: readonly [{
|
142
|
+
readonly internalType: "uint256";
|
143
|
+
readonly name: "";
|
144
|
+
readonly type: "uint256";
|
145
|
+
}];
|
146
|
+
readonly name: "nftLocked";
|
147
|
+
readonly outputs: readonly [{
|
148
|
+
readonly internalType: "int256";
|
149
|
+
readonly name: "amount";
|
150
|
+
readonly type: "int256";
|
151
|
+
}, {
|
152
|
+
readonly internalType: "uint256";
|
153
|
+
readonly name: "end";
|
154
|
+
readonly type: "uint256";
|
155
|
+
}];
|
156
|
+
readonly stateMutability: "view";
|
157
|
+
readonly type: "function";
|
158
|
+
};
|
159
|
+
};
|
160
|
+
export declare const yearnStakeAbi: {
|
161
|
+
readonly pricePerShare: {
|
162
|
+
readonly stateMutability: "view";
|
163
|
+
readonly type: "function";
|
164
|
+
readonly name: "pricePerShare";
|
165
|
+
readonly inputs: readonly [];
|
166
|
+
readonly outputs: readonly [{
|
167
|
+
readonly name: "";
|
168
|
+
readonly type: "uint256";
|
169
|
+
}];
|
170
|
+
readonly gas: 43519;
|
171
|
+
};
|
172
|
+
readonly convertToAssets: {
|
173
|
+
readonly stateMutability: "view";
|
174
|
+
readonly type: "function";
|
175
|
+
readonly name: "convertToAssets";
|
176
|
+
readonly inputs: readonly [{
|
177
|
+
readonly name: "_shares";
|
178
|
+
readonly type: "uint256";
|
179
|
+
}];
|
180
|
+
readonly outputs: readonly [{
|
181
|
+
readonly name: "";
|
182
|
+
readonly type: "uint256";
|
183
|
+
}];
|
184
|
+
};
|
185
|
+
};
|
@@ -0,0 +1,144 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.yearnStakeAbi = exports.lockersAbi = void 0;
|
4
|
+
exports.lockersAbi = {
|
5
|
+
locks: {
|
6
|
+
stateMutability: 'view',
|
7
|
+
type: 'function',
|
8
|
+
name: 'locked',
|
9
|
+
inputs: [{ name: 'arg0', type: 'address' }],
|
10
|
+
outputs: [
|
11
|
+
{ name: 'amount', type: 'int128' },
|
12
|
+
{ name: 'end', type: 'uint256' },
|
13
|
+
],
|
14
|
+
gas: 5653,
|
15
|
+
},
|
16
|
+
claimableRewards: {
|
17
|
+
inputs: [{ internalType: 'address', name: '_account', type: 'address' }],
|
18
|
+
name: 'claimableRewards',
|
19
|
+
outputs: [
|
20
|
+
{
|
21
|
+
components: [
|
22
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
23
|
+
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
24
|
+
],
|
25
|
+
internalType: 'struct AuraLocker.EarnedData[]',
|
26
|
+
name: 'userRewards',
|
27
|
+
type: 'tuple[]',
|
28
|
+
},
|
29
|
+
],
|
30
|
+
stateMutability: 'view',
|
31
|
+
type: 'function',
|
32
|
+
},
|
33
|
+
lockedBalances: {
|
34
|
+
noBoost: {
|
35
|
+
inputs: [{ internalType: 'address', name: '_user', type: 'address' }],
|
36
|
+
name: 'lockedBalances',
|
37
|
+
outputs: [
|
38
|
+
{ internalType: 'uint256', name: 'total', type: 'uint256' },
|
39
|
+
{ internalType: 'uint256', name: 'unlockable', type: 'uint256' },
|
40
|
+
{ internalType: 'uint256', name: 'locked', type: 'uint256' },
|
41
|
+
{
|
42
|
+
components: [
|
43
|
+
{ internalType: 'uint112', name: 'amount', type: 'uint112' },
|
44
|
+
{ internalType: 'uint32', name: 'unlockTime', type: 'uint32' },
|
45
|
+
],
|
46
|
+
internalType: 'struct AuraLocker.LockedBalance[]',
|
47
|
+
name: 'lockData',
|
48
|
+
type: 'tuple[]',
|
49
|
+
},
|
50
|
+
],
|
51
|
+
stateMutability: 'view',
|
52
|
+
type: 'function',
|
53
|
+
},
|
54
|
+
boost: {
|
55
|
+
inputs: [
|
56
|
+
{
|
57
|
+
internalType: 'address',
|
58
|
+
name: '_user',
|
59
|
+
type: 'address',
|
60
|
+
},
|
61
|
+
],
|
62
|
+
name: 'lockedBalances',
|
63
|
+
outputs: [
|
64
|
+
{
|
65
|
+
internalType: 'uint256',
|
66
|
+
name: 'total',
|
67
|
+
type: 'uint256',
|
68
|
+
},
|
69
|
+
{
|
70
|
+
internalType: 'uint256',
|
71
|
+
name: 'unlockable',
|
72
|
+
type: 'uint256',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
internalType: 'uint256',
|
76
|
+
name: 'locked',
|
77
|
+
type: 'uint256',
|
78
|
+
},
|
79
|
+
{
|
80
|
+
components: [
|
81
|
+
{
|
82
|
+
internalType: 'uint112',
|
83
|
+
name: 'amount',
|
84
|
+
type: 'uint112',
|
85
|
+
},
|
86
|
+
{
|
87
|
+
internalType: 'uint112',
|
88
|
+
name: 'boosted',
|
89
|
+
type: 'uint112',
|
90
|
+
},
|
91
|
+
{
|
92
|
+
internalType: 'uint32',
|
93
|
+
name: 'unlockTime',
|
94
|
+
type: 'uint32',
|
95
|
+
},
|
96
|
+
],
|
97
|
+
internalType: 'struct CvxLockerV2.LockedBalance[]',
|
98
|
+
name: 'lockData',
|
99
|
+
type: 'tuple[]',
|
100
|
+
},
|
101
|
+
],
|
102
|
+
stateMutability: 'view',
|
103
|
+
type: 'function',
|
104
|
+
},
|
105
|
+
},
|
106
|
+
tokenOfOwnerByIndex: {
|
107
|
+
inputs: [
|
108
|
+
{ internalType: 'address', name: 'owner', type: 'address' },
|
109
|
+
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
110
|
+
],
|
111
|
+
name: 'tokenOfOwnerByIndex',
|
112
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
113
|
+
stateMutability: 'view',
|
114
|
+
type: 'function',
|
115
|
+
},
|
116
|
+
nftLocked: {
|
117
|
+
inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
118
|
+
name: 'nftLocked',
|
119
|
+
outputs: [
|
120
|
+
{ internalType: 'int256', name: 'amount', type: 'int256' },
|
121
|
+
{ internalType: 'uint256', name: 'end', type: 'uint256' },
|
122
|
+
],
|
123
|
+
stateMutability: 'view',
|
124
|
+
type: 'function',
|
125
|
+
},
|
126
|
+
};
|
127
|
+
exports.yearnStakeAbi = {
|
128
|
+
pricePerShare: {
|
129
|
+
stateMutability: 'view',
|
130
|
+
type: 'function',
|
131
|
+
name: 'pricePerShare',
|
132
|
+
inputs: [],
|
133
|
+
outputs: [{ name: '', type: 'uint256' }],
|
134
|
+
gas: 43519,
|
135
|
+
},
|
136
|
+
convertToAssets: {
|
137
|
+
stateMutability: 'view',
|
138
|
+
type: 'function',
|
139
|
+
name: 'convertToAssets',
|
140
|
+
inputs: [{ name: '_shares', type: 'uint256' }],
|
141
|
+
outputs: [{ name: '', type: 'uint256' }],
|
142
|
+
},
|
143
|
+
};
|
144
|
+
//# sourceMappingURL=abis.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/yearn/abis.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE;QACL,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC3C,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;YAClC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE;SACjC;QACD,GAAG,EAAE,IAAI;KACV;IACD,gBAAgB,EAAE;QAChB,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACxE,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE;YACP;gBACE,UAAU,EAAE;oBACV,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC3D,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAA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,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1D,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE;SAC1D;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACO,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,aAAa,EAAE;QACb,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACxC,GAAG,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QACf,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC9C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KACzC;CACO,CAAC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { Contract } from './types';
|
3
|
+
export declare const platformId = "yearn";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const vaultsKey = "vaults";
|
6
|
+
export declare const yearnApiUrl = "https://api.yexporter.io/v1/chains";
|
7
|
+
export declare const lockersEth: Contract[];
|
8
|
+
export declare const yETHStake: Contract[];
|
9
|
+
export declare const styETHStake: Contract[];
|