@sonarwatch/portfolio-plugins 0.8.33 → 0.8.34
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 +4 -0
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/aftermath/constants.js +1 -1
- package/src/plugins/aftermath/constants.js.map +1 -1
- package/src/plugins/compound/abis.d.ts +94 -0
- package/src/plugins/compound/abis.js +64 -0
- package/src/plugins/compound/abis.js.map +1 -0
- package/src/plugins/compound/constants.d.ts +6 -0
- package/src/plugins/compound/constants.js +100 -0
- package/src/plugins/compound/constants.js.map +1 -0
- package/src/plugins/compound/getPositionsV3Fetcher.d.ts +3 -0
- package/src/plugins/compound/getPositionsV3Fetcher.js +130 -0
- package/src/plugins/compound/getPositionsV3Fetcher.js.map +1 -0
- package/src/plugins/compound/index.d.ts +6 -0
- package/src/plugins/compound/index.js +17 -0
- package/src/plugins/compound/index.js.map +1 -0
- package/src/plugins/compound/marketsJob.d.ts +3 -0
- package/src/plugins/compound/marketsJob.js +39 -0
- package/src/plugins/compound/marketsJob.js.map +1 -0
- package/src/plugins/compound/types.d.ts +13 -0
- package/src/plugins/compound/types.js +3 -0
- package/src/plugins/compound/types.js.map +1 -0
- package/src/plugins/stargate/abis.d.ts +143 -0
- package/src/plugins/stargate/abis.js +161 -0
- package/src/plugins/stargate/abis.js.map +1 -0
- package/src/plugins/stargate/constants.d.ts +7 -0
- package/src/plugins/stargate/constants.js +37 -0
- package/src/plugins/stargate/constants.js.map +1 -0
- package/src/plugins/stargate/farmsJob.d.ts +3 -0
- package/src/plugins/stargate/farmsJob.js +48 -0
- package/src/plugins/stargate/farmsJob.js.map +1 -0
- package/src/plugins/stargate/gePoolPositionsFetcher.d.ts +3 -0
- package/src/plugins/stargate/gePoolPositionsFetcher.js +90 -0
- package/src/plugins/stargate/gePoolPositionsFetcher.js.map +1 -0
- package/src/plugins/stargate/getFarmPositionsFetcher.d.ts +3 -0
- package/src/plugins/stargate/getFarmPositionsFetcher.js +94 -0
- package/src/plugins/stargate/getFarmPositionsFetcher.js.map +1 -0
- package/src/plugins/stargate/getVoteTokensFetcher.d.ts +3 -0
- package/src/plugins/stargate/getVoteTokensFetcher.js +69 -0
- package/src/plugins/stargate/getVoteTokensFetcher.js.map +1 -0
- package/src/plugins/stargate/index.d.ts +6 -0
- package/src/plugins/stargate/index.js +24 -0
- package/src/plugins/stargate/index.js.map +1 -0
- package/src/plugins/stargate/poolsJob.d.ts +3 -0
- package/src/plugins/stargate/poolsJob.js +105 -0
- package/src/plugins/stargate/poolsJob.js.map +1 -0
- package/src/plugins/stargate/types.d.ts +8 -0
- package/src/plugins/stargate/types.js +3 -0
- package/src/plugins/stargate/types.js.map +1 -0
@@ -0,0 +1,143 @@
|
|
1
|
+
export declare const allPoolsLengthAbi: readonly [{
|
2
|
+
readonly inputs: readonly [];
|
3
|
+
readonly name: "allPoolsLength";
|
4
|
+
readonly outputs: readonly [{
|
5
|
+
readonly internalType: "uint256";
|
6
|
+
readonly name: "";
|
7
|
+
readonly type: "uint256";
|
8
|
+
}];
|
9
|
+
readonly stateMutability: "view";
|
10
|
+
readonly type: "function";
|
11
|
+
}];
|
12
|
+
export declare const poolLengthAbi: readonly [{
|
13
|
+
readonly inputs: readonly [];
|
14
|
+
readonly name: "poolLength";
|
15
|
+
readonly outputs: readonly [{
|
16
|
+
readonly internalType: "uint256";
|
17
|
+
readonly name: "";
|
18
|
+
readonly type: "uint256";
|
19
|
+
}];
|
20
|
+
readonly stateMutability: "view";
|
21
|
+
readonly type: "function";
|
22
|
+
}];
|
23
|
+
export declare const allPoolsAbi: readonly [{
|
24
|
+
readonly inputs: readonly [{
|
25
|
+
readonly internalType: "uint256";
|
26
|
+
readonly name: "";
|
27
|
+
readonly type: "uint256";
|
28
|
+
}];
|
29
|
+
readonly name: "allPools";
|
30
|
+
readonly outputs: readonly [{
|
31
|
+
readonly internalType: "address";
|
32
|
+
readonly name: "";
|
33
|
+
readonly type: "address";
|
34
|
+
}];
|
35
|
+
readonly stateMutability: "view";
|
36
|
+
readonly type: "function";
|
37
|
+
}];
|
38
|
+
export declare const balanceOfAbi: readonly [{
|
39
|
+
readonly inputs: readonly [{
|
40
|
+
readonly internalType: "address";
|
41
|
+
readonly name: "";
|
42
|
+
readonly type: "address";
|
43
|
+
}];
|
44
|
+
readonly name: "balanceOf";
|
45
|
+
readonly outputs: readonly [{
|
46
|
+
readonly internalType: "uint256";
|
47
|
+
readonly name: "";
|
48
|
+
readonly type: "uint256";
|
49
|
+
}];
|
50
|
+
readonly stateMutability: "view";
|
51
|
+
readonly type: "function";
|
52
|
+
}];
|
53
|
+
export declare const tokenAbi: readonly [{
|
54
|
+
readonly inputs: readonly [];
|
55
|
+
readonly name: "token";
|
56
|
+
readonly outputs: readonly [{
|
57
|
+
readonly internalType: "address";
|
58
|
+
readonly name: "";
|
59
|
+
readonly type: "address";
|
60
|
+
}];
|
61
|
+
readonly stateMutability: "view";
|
62
|
+
readonly type: "function";
|
63
|
+
}];
|
64
|
+
export declare const decimalsAbi: readonly [{
|
65
|
+
readonly inputs: readonly [];
|
66
|
+
readonly name: "decimals";
|
67
|
+
readonly outputs: readonly [{
|
68
|
+
readonly internalType: "uint256";
|
69
|
+
readonly name: "";
|
70
|
+
readonly type: "uint256";
|
71
|
+
}];
|
72
|
+
readonly stateMutability: "view";
|
73
|
+
readonly type: "function";
|
74
|
+
}];
|
75
|
+
export declare const poolInfoAbi: readonly [{
|
76
|
+
readonly inputs: readonly [{
|
77
|
+
readonly internalType: "uint256";
|
78
|
+
readonly name: "";
|
79
|
+
readonly type: "uint256";
|
80
|
+
}];
|
81
|
+
readonly name: "poolInfo";
|
82
|
+
readonly outputs: readonly [{
|
83
|
+
readonly internalType: "contract IERC20";
|
84
|
+
readonly name: "lpToken";
|
85
|
+
readonly type: "address";
|
86
|
+
}, {
|
87
|
+
readonly internalType: "uint256";
|
88
|
+
readonly name: "allocPoint";
|
89
|
+
readonly type: "uint256";
|
90
|
+
}, {
|
91
|
+
readonly internalType: "uint256";
|
92
|
+
readonly name: "lastRewardBlock";
|
93
|
+
readonly type: "uint256";
|
94
|
+
}, {
|
95
|
+
readonly internalType: "uint256";
|
96
|
+
readonly name: "accStargatePerShare";
|
97
|
+
readonly type: "uint256";
|
98
|
+
}];
|
99
|
+
readonly stateMutability: "view";
|
100
|
+
readonly type: "function";
|
101
|
+
}];
|
102
|
+
export declare const userInfoAbi: readonly [{
|
103
|
+
readonly inputs: readonly [{
|
104
|
+
readonly internalType: "uint256";
|
105
|
+
readonly name: "";
|
106
|
+
readonly type: "uint256";
|
107
|
+
}, {
|
108
|
+
readonly internalType: "address";
|
109
|
+
readonly name: "";
|
110
|
+
readonly type: "address";
|
111
|
+
}];
|
112
|
+
readonly name: "userInfo";
|
113
|
+
readonly outputs: readonly [{
|
114
|
+
readonly internalType: "uint256";
|
115
|
+
readonly name: "amount";
|
116
|
+
readonly type: "uint256";
|
117
|
+
}, {
|
118
|
+
readonly internalType: "uint256";
|
119
|
+
readonly name: "rewardDebt";
|
120
|
+
readonly type: "uint256";
|
121
|
+
}];
|
122
|
+
readonly stateMutability: "view";
|
123
|
+
readonly type: "function";
|
124
|
+
}];
|
125
|
+
export declare const lockedAbi: readonly [{
|
126
|
+
readonly inputs: readonly [{
|
127
|
+
readonly internalType: "address";
|
128
|
+
readonly name: "";
|
129
|
+
readonly type: "address";
|
130
|
+
}];
|
131
|
+
readonly name: "locked";
|
132
|
+
readonly outputs: readonly [{
|
133
|
+
readonly internalType: "int128";
|
134
|
+
readonly name: "amount";
|
135
|
+
readonly type: "int128";
|
136
|
+
}, {
|
137
|
+
readonly internalType: "uint256";
|
138
|
+
readonly name: "end";
|
139
|
+
readonly type: "uint256";
|
140
|
+
}];
|
141
|
+
readonly stateMutability: "view";
|
142
|
+
readonly type: "function";
|
143
|
+
}];
|
@@ -0,0 +1,161 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.lockedAbi = exports.userInfoAbi = exports.poolInfoAbi = exports.decimalsAbi = exports.tokenAbi = exports.balanceOfAbi = exports.allPoolsAbi = exports.poolLengthAbi = exports.allPoolsLengthAbi = void 0;
|
4
|
+
exports.allPoolsLengthAbi = [
|
5
|
+
{
|
6
|
+
inputs: [],
|
7
|
+
name: 'allPoolsLength',
|
8
|
+
outputs: [
|
9
|
+
{
|
10
|
+
internalType: 'uint256',
|
11
|
+
name: '',
|
12
|
+
type: 'uint256',
|
13
|
+
},
|
14
|
+
],
|
15
|
+
stateMutability: 'view',
|
16
|
+
type: 'function',
|
17
|
+
},
|
18
|
+
];
|
19
|
+
exports.poolLengthAbi = [
|
20
|
+
{
|
21
|
+
inputs: [],
|
22
|
+
name: 'poolLength',
|
23
|
+
outputs: [
|
24
|
+
{
|
25
|
+
internalType: 'uint256',
|
26
|
+
name: '',
|
27
|
+
type: 'uint256',
|
28
|
+
},
|
29
|
+
],
|
30
|
+
stateMutability: 'view',
|
31
|
+
type: 'function',
|
32
|
+
},
|
33
|
+
];
|
34
|
+
exports.allPoolsAbi = [
|
35
|
+
{
|
36
|
+
inputs: [
|
37
|
+
{
|
38
|
+
internalType: 'uint256',
|
39
|
+
name: '',
|
40
|
+
type: 'uint256',
|
41
|
+
},
|
42
|
+
],
|
43
|
+
name: 'allPools',
|
44
|
+
outputs: [
|
45
|
+
{
|
46
|
+
internalType: 'address',
|
47
|
+
name: '',
|
48
|
+
type: 'address',
|
49
|
+
},
|
50
|
+
],
|
51
|
+
stateMutability: 'view',
|
52
|
+
type: 'function',
|
53
|
+
},
|
54
|
+
];
|
55
|
+
exports.balanceOfAbi = [
|
56
|
+
{
|
57
|
+
inputs: [
|
58
|
+
{
|
59
|
+
internalType: 'address',
|
60
|
+
name: '',
|
61
|
+
type: 'address',
|
62
|
+
},
|
63
|
+
],
|
64
|
+
name: 'balanceOf',
|
65
|
+
outputs: [
|
66
|
+
{
|
67
|
+
internalType: 'uint256',
|
68
|
+
name: '',
|
69
|
+
type: 'uint256',
|
70
|
+
},
|
71
|
+
],
|
72
|
+
stateMutability: 'view',
|
73
|
+
type: 'function',
|
74
|
+
},
|
75
|
+
];
|
76
|
+
exports.tokenAbi = [
|
77
|
+
{
|
78
|
+
inputs: [],
|
79
|
+
name: 'token',
|
80
|
+
outputs: [
|
81
|
+
{
|
82
|
+
internalType: 'address',
|
83
|
+
name: '',
|
84
|
+
type: 'address',
|
85
|
+
},
|
86
|
+
],
|
87
|
+
stateMutability: 'view',
|
88
|
+
type: 'function',
|
89
|
+
},
|
90
|
+
];
|
91
|
+
exports.decimalsAbi = [
|
92
|
+
{
|
93
|
+
inputs: [],
|
94
|
+
name: 'decimals',
|
95
|
+
outputs: [
|
96
|
+
{
|
97
|
+
internalType: 'uint256',
|
98
|
+
name: '',
|
99
|
+
type: 'uint256',
|
100
|
+
},
|
101
|
+
],
|
102
|
+
stateMutability: 'view',
|
103
|
+
type: 'function',
|
104
|
+
},
|
105
|
+
];
|
106
|
+
exports.poolInfoAbi = [
|
107
|
+
{
|
108
|
+
inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
109
|
+
name: 'poolInfo',
|
110
|
+
outputs: [
|
111
|
+
{ internalType: 'contract IERC20', name: 'lpToken', type: 'address' },
|
112
|
+
{ internalType: 'uint256', name: 'allocPoint', type: 'uint256' },
|
113
|
+
{ internalType: 'uint256', name: 'lastRewardBlock', type: 'uint256' },
|
114
|
+
{ internalType: 'uint256', name: 'accStargatePerShare', type: 'uint256' },
|
115
|
+
],
|
116
|
+
stateMutability: 'view',
|
117
|
+
type: 'function',
|
118
|
+
},
|
119
|
+
];
|
120
|
+
exports.userInfoAbi = [
|
121
|
+
{
|
122
|
+
inputs: [
|
123
|
+
{ internalType: 'uint256', name: '', type: 'uint256' },
|
124
|
+
{ internalType: 'address', name: '', type: 'address' },
|
125
|
+
],
|
126
|
+
name: 'userInfo',
|
127
|
+
outputs: [
|
128
|
+
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
129
|
+
{ internalType: 'uint256', name: 'rewardDebt', type: 'uint256' },
|
130
|
+
],
|
131
|
+
stateMutability: 'view',
|
132
|
+
type: 'function',
|
133
|
+
},
|
134
|
+
];
|
135
|
+
exports.lockedAbi = [
|
136
|
+
{
|
137
|
+
inputs: [
|
138
|
+
{
|
139
|
+
internalType: 'address',
|
140
|
+
name: '',
|
141
|
+
type: 'address',
|
142
|
+
},
|
143
|
+
],
|
144
|
+
name: 'locked',
|
145
|
+
outputs: [
|
146
|
+
{
|
147
|
+
internalType: 'int128',
|
148
|
+
name: 'amount',
|
149
|
+
type: 'int128',
|
150
|
+
},
|
151
|
+
{
|
152
|
+
internalType: 'uint256',
|
153
|
+
name: 'end',
|
154
|
+
type: 'uint256',
|
155
|
+
},
|
156
|
+
],
|
157
|
+
stateMutability: 'view',
|
158
|
+
type: 'function',
|
159
|
+
},
|
160
|
+
];
|
161
|
+
//# sourceMappingURL=abis.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/abis.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACO,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACO,CAA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IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACO,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { StgConfig } from './types';
|
3
|
+
export declare const platformId = "stargate";
|
4
|
+
export declare const stargatePlatform: Platform;
|
5
|
+
export declare const poolsKey = "pools";
|
6
|
+
export declare const farmsKey = "farms";
|
7
|
+
export declare const stargateNetworksConfigs: StgConfig[];
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.stargateNetworksConfigs = exports.farmsKey = exports.poolsKey = exports.stargatePlatform = exports.platformId = void 0;
|
4
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
|
+
exports.platformId = 'stargate';
|
6
|
+
exports.stargatePlatform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Stargate',
|
9
|
+
image: 'https://sonar.watch/img/platforms/stargate.png',
|
10
|
+
defiLlamaId: 'stargate',
|
11
|
+
};
|
12
|
+
exports.poolsKey = 'pools';
|
13
|
+
exports.farmsKey = 'farms';
|
14
|
+
exports.stargateNetworksConfigs = [
|
15
|
+
{
|
16
|
+
networkId: portfolio_core_1.NetworkId.ethereum,
|
17
|
+
poolsContract: '0x06d538690af257da524f25d0cd52fd85b1c2173e',
|
18
|
+
farmsContract: '0xb0d502e938ed5f4df2e681fe6e419ff29631d62b',
|
19
|
+
votingEscrow: '0x0e42acbd23faee03249daff896b78d7e79fbd58e',
|
20
|
+
stgAddress: '0xaf5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6',
|
21
|
+
},
|
22
|
+
{
|
23
|
+
networkId: portfolio_core_1.NetworkId.avalanche,
|
24
|
+
poolsContract: '0x808d7c71ad2ba3fa531b068a2417c63106bc0949',
|
25
|
+
farmsContract: '0x8731d54e9d02c286767d56ac03e8037c07e01e98',
|
26
|
+
votingEscrow: '0xca0f57d295bbce554da2c07b005b7d6565a58fce',
|
27
|
+
stgAddress: '0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590',
|
28
|
+
},
|
29
|
+
{
|
30
|
+
networkId: portfolio_core_1.NetworkId.polygon,
|
31
|
+
farmsContract: '0x8731d54e9d02c286767d56ac03e8037c07e01e98',
|
32
|
+
poolsContract: '0x808d7c71ad2ba3fa531b068a2417c63106bc0949',
|
33
|
+
votingEscrow: '0x3ab2da31bbd886a7edf68a6b60d3cde657d3a15d',
|
34
|
+
stgAddress: '0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590',
|
35
|
+
},
|
36
|
+
];
|
37
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGpD,QAAA,UAAU,GAAG,UAAU,CAAC;AAExB,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,UAAU;CACxB,CAAC;AAEW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,uBAAuB,GAAgB;IAClD;QACE,SAAS,EAAE,0BAAS,CAAC,QAAQ;QAC7B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,SAAS;QAC9B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;CACF,CAAC"}
|
@@ -0,0 +1,48 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const viem_1 = require("viem");
|
13
|
+
const clients_1 = require("../../utils/clients");
|
14
|
+
const abis_1 = require("./abis");
|
15
|
+
const constants_1 = require("./constants");
|
16
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
17
|
+
for (const info of constants_1.stargateNetworksConfigs) {
|
18
|
+
const { farmsContract: address, networkId } = info;
|
19
|
+
const client = (0, clients_1.getEvmClient)(networkId);
|
20
|
+
const contract = {
|
21
|
+
address,
|
22
|
+
abi: abis_1.poolLengthAbi,
|
23
|
+
functionName: 'poolLength',
|
24
|
+
};
|
25
|
+
const poolsLength = yield client.readContract(contract);
|
26
|
+
const contracts = [];
|
27
|
+
for (let i = BigInt(0); i < Number(poolsLength); i++) {
|
28
|
+
contracts.push({
|
29
|
+
address,
|
30
|
+
abi: abis_1.poolInfoAbi,
|
31
|
+
functionName: 'poolInfo',
|
32
|
+
args: [i],
|
33
|
+
});
|
34
|
+
}
|
35
|
+
const results = yield client.multicall({ contracts });
|
36
|
+
const farms = results.map((res) => res.status === 'failure' ? viem_1.zeroAddress : res.result[0]);
|
37
|
+
yield cache.setItem(constants_1.farmsKey, farms, {
|
38
|
+
prefix: constants_1.platformId,
|
39
|
+
networkId,
|
40
|
+
});
|
41
|
+
}
|
42
|
+
});
|
43
|
+
const job = {
|
44
|
+
id: `${constants_1.platformId}-farms`,
|
45
|
+
executor,
|
46
|
+
};
|
47
|
+
exports.default = job;
|
48
|
+
//# sourceMappingURL=farmsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"farmsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/farmsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAAmC;AAGnC,iDAAmD;AACnD,iCAAoD;AACpD,2CAA4E;AAE5E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,KAAK,MAAM,IAAI,IAAI,mCAAuB,EAAE;QAC1C,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,SAAS,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG;YACf,OAAO;YACP,GAAG,EAAE,oBAAa;YAClB,YAAY,EAAE,YAAY;SAClB,CAAC;QACX,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACxD,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE;YACpD,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO;gBACP,GAAG,EAAE,kBAAW;gBAChB,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,CAAC,CAAC;aACD,CAAC,CAAC;SACb;QACD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACtD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAChC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,kBAAW,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CACvD,CAAC;QAEF,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,KAAK,EAAE;YACnC,MAAM,EAAE,sBAAU;YAClB,SAAS;SACV,CAAC,CAAC;KACJ;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;CACT,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,90 @@
|
|
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
|
+
exports.getPoolsPositionsFetcher = void 0;
|
16
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
|
+
const clients_1 = require("../../utils/clients");
|
18
|
+
const constants_1 = require("./constants");
|
19
|
+
const abis_1 = require("./abis");
|
20
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
|
+
function getPoolsPositionsFetcher(config) {
|
22
|
+
const { networkId } = config;
|
23
|
+
const executor = (owner, cache) => __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const client = (0, clients_1.getEvmClient)(networkId);
|
25
|
+
const poolsAddresses = yield cache.getItem(constants_1.poolsKey, {
|
26
|
+
prefix: constants_1.platformId,
|
27
|
+
networkId,
|
28
|
+
});
|
29
|
+
if (!poolsAddresses)
|
30
|
+
return [];
|
31
|
+
const tokenPrices = yield cache.getTokenPrices(poolsAddresses, networkId);
|
32
|
+
if (!tokenPrices)
|
33
|
+
return [];
|
34
|
+
const contracts = poolsAddresses.map((pool) => ({
|
35
|
+
address: pool,
|
36
|
+
abi: abis_1.balanceOfAbi,
|
37
|
+
functionName: 'balanceOf',
|
38
|
+
args: [owner],
|
39
|
+
}));
|
40
|
+
const results = yield client.multicall({ contracts });
|
41
|
+
const balances = results.map((res) => res.status === 'failure' ? BigInt(0) : res.result);
|
42
|
+
const poolLiquidities = [];
|
43
|
+
for (let i = 0; i < balances.length; i++) {
|
44
|
+
const tokenPrice = tokenPrices[i];
|
45
|
+
if (!tokenPrice)
|
46
|
+
continue;
|
47
|
+
if (!tokenPrice.underlyings || !tokenPrice.underlyings[0])
|
48
|
+
continue;
|
49
|
+
const underlyingTokenPrice = tokenPrice.underlyings[0];
|
50
|
+
const balance = Number(balances[i]) / Math.pow(10, underlyingTokenPrice.decimals);
|
51
|
+
if (balance === 0)
|
52
|
+
continue;
|
53
|
+
const assets = [
|
54
|
+
(0, tokenPriceToAssetToken_1.default)(underlyingTokenPrice.address, Number(balance), networkId, underlyingTokenPrice, underlyingTokenPrice.price),
|
55
|
+
];
|
56
|
+
const value = Number(balance) * tokenPrice.price;
|
57
|
+
const liquidity = {
|
58
|
+
assets,
|
59
|
+
assetsValue: value,
|
60
|
+
value,
|
61
|
+
yields: [],
|
62
|
+
rewardAssets: [],
|
63
|
+
rewardAssetsValue: null,
|
64
|
+
};
|
65
|
+
poolLiquidities.push(liquidity);
|
66
|
+
}
|
67
|
+
if (poolLiquidities.length === 0)
|
68
|
+
return [];
|
69
|
+
return [
|
70
|
+
{
|
71
|
+
networkId,
|
72
|
+
platformId: constants_1.platformId,
|
73
|
+
label: 'LiquidityPool',
|
74
|
+
name: 'Pools',
|
75
|
+
type: portfolio_core_1.PortfolioElementType.liquidity,
|
76
|
+
data: {
|
77
|
+
liquidities: poolLiquidities,
|
78
|
+
},
|
79
|
+
value: (0, portfolio_core_1.getUsdValueSum)(poolLiquidities.map((a) => a.value)),
|
80
|
+
},
|
81
|
+
];
|
82
|
+
});
|
83
|
+
return {
|
84
|
+
executor,
|
85
|
+
networkId,
|
86
|
+
id: `${constants_1.platformId}-${networkId}-${constants_1.poolsKey}`,
|
87
|
+
};
|
88
|
+
}
|
89
|
+
exports.getPoolsPositionsFetcher = getPoolsPositionsFetcher;
|
90
|
+
//# sourceMappingURL=gePoolPositionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"gePoolPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/gePoolPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAKoC;AAEpC,iDAAmD;AAEnD,2CAAmD;AACnD,iCAAsC;AACtC,qGAA6E;AAG7E,SAAgB,wBAAwB,CAAC,MAAiB;IACxD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;QACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,SAAS,CAAC,CAAC;QACvC,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,OAAO,CAAkB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,EAAI,oBAAoB,CAAC,QAAQ,CAAA,CAAC;YAC1E,IAAI,OAAO,KAAK,CAAC;gBAAE,SAAS;YAE5B,MAAM,MAAM,GAA0B;gBACpC,IAAA,gCAAsB,EACpB,oBAAoB,CAAC,OAAO,EAC5B,MAAM,CAAC,OAAO,CAAC,EACf,SAAS,EACT,oBAAoB,EACpB,oBAAoB,CAAC,KAAK,CAC3B;aACF,CAAC;YACF,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC;YACjD,MAAM,SAAS,GAAuB;gBACpC,MAAM;gBACN,WAAW,EAAE,KAAK;gBAClB,KAAK;gBACL,MAAM,EAAE,EAAE;gBACV,YAAY,EAAE,EAAE;gBAChB,iBAAiB,EAAE,IAAI;aACxB,CAAC;YACF,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACjC;QAED,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE5C,OAAO;YACL;gBACE,SAAS;gBACT,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,IAAI,EAAE;oBACJ,WAAW,EAAE,eAAe;iBAC7B;gBACD,KAAK,EAAE,IAAA,+BAAc,EAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC3D;SACF,CAAC;IACJ,CAAC,CAAA,CAAC;IACF,OAAO;QACL,QAAQ;QACR,SAAS;QACT,EAAE,EAAE,GAAG,sBAAU,IAAI,SAAS,IAAI,oBAAQ,EAAE;KAC7C,CAAC;AACJ,CAAC;AAnFD,4DAmFC"}
|
@@ -0,0 +1,94 @@
|
|
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
|
+
exports.getFarmsPositionsFetcher = void 0;
|
16
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const abis_1 = require("./abis");
|
19
|
+
const clients_1 = require("../../utils/clients");
|
20
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
|
+
function getFarmsPositionsFetcher(config) {
|
22
|
+
const { farmsContract, networkId } = config;
|
23
|
+
const executor = (owner, cache) => __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const client = (0, clients_1.getEvmClient)(networkId);
|
25
|
+
const farms = yield cache.getItem(constants_1.farmsKey, {
|
26
|
+
prefix: constants_1.platformId,
|
27
|
+
networkId,
|
28
|
+
});
|
29
|
+
if (!farms)
|
30
|
+
return [];
|
31
|
+
const lpTokenPrices = yield cache.getTokenPrices(farms, networkId);
|
32
|
+
if (!lpTokenPrices)
|
33
|
+
return [];
|
34
|
+
const contracts = [];
|
35
|
+
for (let i = BigInt(0); i < farms.length; i++) {
|
36
|
+
contracts.push({
|
37
|
+
address: farmsContract,
|
38
|
+
abi: abis_1.userInfoAbi,
|
39
|
+
functionName: 'userInfo',
|
40
|
+
args: [i, owner],
|
41
|
+
});
|
42
|
+
}
|
43
|
+
const results = yield client.multicall({ contracts });
|
44
|
+
const balances = results.map((res) => res.status === 'failure' ? BigInt(0) : res.result[0]);
|
45
|
+
const farmsLiquidities = [];
|
46
|
+
for (let i = 0; i < balances.length; i++) {
|
47
|
+
const lpTokenPrice = lpTokenPrices[i];
|
48
|
+
if (!lpTokenPrice ||
|
49
|
+
!lpTokenPrice.underlyings ||
|
50
|
+
!lpTokenPrice.underlyings[0])
|
51
|
+
continue;
|
52
|
+
const underlyingTokenPrice = lpTokenPrice.underlyings[0];
|
53
|
+
const lpAmount = Number(balances[i]);
|
54
|
+
if (lpAmount === 0)
|
55
|
+
continue;
|
56
|
+
const tokenAmount = lpAmount / Math.pow(10, lpTokenPrice.decimals);
|
57
|
+
const assets = [
|
58
|
+
(0, tokenPriceToAssetToken_1.default)(underlyingTokenPrice.address, tokenAmount, networkId, underlyingTokenPrice, underlyingTokenPrice.price),
|
59
|
+
];
|
60
|
+
const value = tokenAmount * underlyingTokenPrice.price;
|
61
|
+
const liquidity = {
|
62
|
+
assets,
|
63
|
+
assetsValue: value,
|
64
|
+
value,
|
65
|
+
yields: [],
|
66
|
+
rewardAssets: [],
|
67
|
+
rewardAssetsValue: null,
|
68
|
+
};
|
69
|
+
farmsLiquidities.push(liquidity);
|
70
|
+
}
|
71
|
+
if (farmsLiquidities.length === 0)
|
72
|
+
return [];
|
73
|
+
return [
|
74
|
+
{
|
75
|
+
networkId,
|
76
|
+
platformId: constants_1.platformId,
|
77
|
+
label: 'LiquidityPool',
|
78
|
+
name: 'Farms',
|
79
|
+
type: portfolio_core_1.PortfolioElementType.liquidity,
|
80
|
+
data: {
|
81
|
+
liquidities: farmsLiquidities,
|
82
|
+
},
|
83
|
+
value: (0, portfolio_core_1.getUsdValueSum)(farmsLiquidities.map((a) => a.value)),
|
84
|
+
},
|
85
|
+
];
|
86
|
+
});
|
87
|
+
return {
|
88
|
+
executor,
|
89
|
+
networkId,
|
90
|
+
id: `${constants_1.platformId}-${networkId}-${constants_1.farmsKey}`,
|
91
|
+
};
|
92
|
+
}
|
93
|
+
exports.getFarmsPositionsFetcher = getFarmsPositionsFetcher;
|
94
|
+
//# sourceMappingURL=getFarmPositionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getFarmPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/getFarmPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAKoC;AAEpC,2CAAmD;AAEnD,iCAAqC;AACrC,iDAAmD;AACnD,qGAA6E;AAG7E,SAAgB,wBAAwB,CAAC,MAAiB;IACxD,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC5C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;QACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,SAAS,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAkB,oBAAQ,EAAE;YAC3D,MAAM,EAAE,sBAAU;YAClB,SAAS;SACV,CAAC,CAAC;QACH,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,CAAC;QAEtB,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,aAAa;YAAE,OAAO,EAAE,CAAC;QAE9B,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO,EAAE,aAAa;gBACtB,GAAG,EAAE,kBAAW;gBAChB,YAAY,EAAE,UAAU;gBACxB,IAAI,EAAE,CAAC,CAAC,EAAE,KAAsB,CAAC;aACzB,CAAC,CAAC;SACb;QAED,MAAM,OAAO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