@sonarwatch/portfolio-plugins 0.14.16 → 0.14.18
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1660 -1652
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/aave/index.js +21 -17
- package/src/plugins/aave/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/jupiter/exchange/lockFetcher.js +31 -11
- package/src/plugins/jupiter/exchange/lockFetcher.js.map +1 -1
- package/src/plugins/maker/vaultsFetcher.js +5 -4
- package/src/plugins/maker/vaultsFetcher.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +39 -84
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/orca/helpers_fees.d.ts +1 -1
- package/src/plugins/orca/helpers_fees.js +13 -9
- package/src/plugins/orca/helpers_fees.js.map +1 -1
- package/src/plugins/staratlas/stakingFetcher.js +5 -6
- package/src/plugins/staratlas/stakingFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/vaultka/strategyFetcher.js +5 -5
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
@@ -4,9 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.fetchers = exports.jobs = exports.services = exports.platforms = void 0;
|
7
|
-
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
8
7
|
// import lendingPoolsJob from './lendingPoolsJob';
|
9
|
-
const getLendingFetcherExecutor_1 = __importDefault(require("./getLendingFetcherExecutor"));
|
10
8
|
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
11
9
|
const constants_1 = require("./constants");
|
12
10
|
const services_1 = require("./services");
|
@@ -16,21 +14,27 @@ exports.jobs = [
|
|
16
14
|
// lendingPoolsJob,
|
17
15
|
];
|
18
16
|
exports.fetchers = [
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
}
|
17
|
+
// WARNING !!!!
|
18
|
+
// These fetchers use an old version of web3 wich cause process to exit
|
19
|
+
// WARNING !!!!
|
20
|
+
// {
|
21
|
+
// id: `${platformId}-${NetworkId.ethereum}-lending`,
|
22
|
+
// networkId: NetworkId.ethereum,
|
23
|
+
// executor: getLendingFetcherExecutor(NetworkId.ethereum),
|
24
|
+
// },
|
25
|
+
// {
|
26
|
+
// id: `${platformId}-${NetworkId.polygon}-lending`,
|
27
|
+
// networkId: NetworkId.polygon,
|
28
|
+
// executor: getLendingFetcherExecutor(NetworkId.polygon),
|
29
|
+
// },
|
30
|
+
// {
|
31
|
+
// id: `${platformId}-${NetworkId.avalanche}-lending`,
|
32
|
+
// networkId: NetworkId.avalanche,
|
33
|
+
// executor: getLendingFetcherExecutor(NetworkId.avalanche),
|
34
|
+
// },
|
35
|
+
// WARNING !!!!
|
36
|
+
// These fetchers use an old version of web3 wich cause process to exit
|
37
|
+
// WARNING !!!!
|
34
38
|
stakingFetcher_1.default,
|
35
39
|
];
|
36
40
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aave/index.ts"],"names":[],"mappings":";;;;;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aave/index.ts"],"names":[],"mappings":";;;;;;AAGA,mDAAmD;AACnD,sEAA8C;AAC9C,2CAAuC;AACvC,yCAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc,CAAC,oBAAS,EAAE,oBAAS,CAAC,CAAC;AAC7C,QAAA,IAAI,GAAU;AACzB,mBAAmB;CACpB,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,eAAe;IACf,uEAAuE;IACvE,eAAe;IACf,IAAI;IACJ,uDAAuD;IACvD,mCAAmC;IACnC,6DAA6D;IAC7D,KAAK;IACL,IAAI;IACJ,sDAAsD;IACtD,kCAAkC;IAClC,4DAA4D;IAC5D,KAAK;IACL,IAAI;IACJ,wDAAwD;IACxD,oCAAoC;IACpC,8DAA8D;IAC9D,KAAK;IACL,eAAe;IACf,uEAAuE;IACvE,eAAe;IACf,wBAAc;CACf,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;
|
@@ -22,19 +22,39 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
22
22
|
if (vestingEscrowAccounts.length === 0)
|
23
23
|
return [];
|
24
24
|
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
25
|
-
const element = registry.addElementMultiple({
|
26
|
-
label: 'Vesting',
|
27
|
-
name: 'lock',
|
28
|
-
});
|
29
25
|
for (const lock of vestingEscrowAccounts) {
|
30
|
-
const
|
31
|
-
|
32
|
-
|
33
|
-
amount: lock.amountPerPeriod
|
34
|
-
.times(lock.numberOfPeriod)
|
35
|
-
.minus(lock.totalClaimedAmount),
|
36
|
-
attributes: { lockedUntil: endTime.toNumber() },
|
26
|
+
const element = registry.addElementMultiple({
|
27
|
+
label: 'Vesting',
|
28
|
+
name: 'Lock',
|
37
29
|
});
|
30
|
+
const endTime = lock.cliffTime
|
31
|
+
.plus(lock.numberOfPeriod.times(lock.frequency))
|
32
|
+
.times(1000);
|
33
|
+
if (lock.totalClaimedAmount.isZero()) {
|
34
|
+
// Unlock at cliff time
|
35
|
+
element.addAsset({
|
36
|
+
address: lock.tokenMint,
|
37
|
+
amount: lock.cliffUnlockAmount,
|
38
|
+
attributes: { lockedUntil: lock.cliffTime.times(1000).toNumber() },
|
39
|
+
});
|
40
|
+
// Remaining vesting with end date
|
41
|
+
element.addAsset({
|
42
|
+
address: lock.tokenMint,
|
43
|
+
amount: lock.amountPerPeriod.times(lock.numberOfPeriod),
|
44
|
+
attributes: { lockedUntil: endTime.toNumber() },
|
45
|
+
});
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
// Remaining vesting with end date, minus already claimed
|
49
|
+
element.addAsset({
|
50
|
+
address: lock.tokenMint,
|
51
|
+
amount: lock.amountPerPeriod
|
52
|
+
.times(lock.numberOfPeriod)
|
53
|
+
.plus(lock.cliffUnlockAmount)
|
54
|
+
.minus(lock.totalClaimedAmount),
|
55
|
+
attributes: { lockedUntil: endTime.toNumber() },
|
56
|
+
});
|
57
|
+
}
|
38
58
|
}
|
39
59
|
return registry.getElements(cache);
|
40
60
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lockFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/lockFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAwD;AACxD,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAAwC;AACxC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,qBAAqB,GAAG,MAAM,IAAA,iCAAwB,EAC1D,MAAM,EACN,6BAAmB,EACnB,yBAAa,EACb,IAAA,qBAAW,EAAC,KAAK,CAAC,CACnB,CAAC;IACF,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElD,MAAM,QAAQ,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"lockFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/lockFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAwD;AACxD,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAAwC;AACxC,mF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,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE;aAChD,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,yDAAyD;YACzD,OAAO,CAAC,QAAQ,CAAC;gBACf,OAAO,EAAE,IAAI,CAAC,SAAS;gBACvB,MAAM,EAAE,IAAI,CAAC,eAAe;qBACzB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;qBAC1B,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;qBAC5B,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC;gBACjC,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE;aAChD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -17,21 +17,22 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
19
|
const abis_1 = require("./abis");
|
20
|
-
const getDSA_1 = require("../../utils/evm/getDSA");
|
21
20
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
22
21
|
const constants_2 = require("../../utils/misc/constants");
|
23
22
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
23
|
// Get the user's proxy address
|
25
24
|
const client = (0, clients_1.getEvmClient)(portfolio_core_1.NetworkId.ethereum);
|
26
|
-
|
27
|
-
const
|
25
|
+
// WARNING: intadapp removed because it use an old version of web3 that cause process.exit
|
26
|
+
// const instadappDSA = getDSA(NetworkId.ethereum);
|
27
|
+
// const instadappAccounts = await instadappDSA.getAccounts(owner);
|
28
28
|
const ownerProxyRes = yield client.readContract({
|
29
29
|
abi: abis_1.proxyRegAbi,
|
30
30
|
address: constants_1.proxyRegAddress,
|
31
31
|
functionName: 'proxies',
|
32
32
|
args: [owner],
|
33
33
|
});
|
34
|
-
const proxyAddresses = [owner, ...instadappAccounts.map((a) => a.address)];
|
34
|
+
// const proxyAddresses = [owner, ...instadappAccounts.map((a) => a.address)];
|
35
|
+
const proxyAddresses = [owner];
|
35
36
|
if (ownerProxyRes !== portfolio_core_1.zeroAddressEvm)
|
36
37
|
proxyAddresses.push(ownerProxyRes);
|
37
38
|
if (proxyAddresses.length === 0)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/maker/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAErC,2CAQqB;AAErB,iDAAmD;AACnD,iCAA4D;
|
1
|
+
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/maker/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAErC,2CAQqB;AAErB,iDAAmD;AACnD,iCAA4D;AAE5D,qGAA6E;AAC7E,0DAAwD;AAExD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,+BAA+B;IAC/B,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,0BAAS,CAAC,QAAQ,CAAC,CAAC;IAEhD,0FAA0F;IAC1F,mDAAmD;IACnD,mEAAmE;IAEnE,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC;QAC9C,GAAG,EAAE,kBAAW;QAChB,OAAO,EAAE,2BAAe;QACxB,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,CAAC,KAAsB,CAAC;KAC/B,CAAC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AK,CAAC,CAAC;gBAC3B,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,IACE,cAAc,CAAC,MAAM,KAAK,CAAC;YAC3B,cAAc,CAAC,MAAM,KAAK,CAAC;YAC3B,YAAY,CAAC,MAAM,KAAK,CAAC;YAEzB,SAAS;QACX,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;QAC5E,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,QAAQ;YAC7B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -99,100 +99,55 @@ function getOrcaNftFetcher(platformId, programId) {
|
|
99
99
|
const tags = [];
|
100
100
|
if (tokenAmountA.isZero() || tokenAmountB.isZero())
|
101
101
|
tags.push('Out Of Range');
|
102
|
-
|
103
|
-
whirlpoolInfo,
|
104
|
-
positionInfo,
|
105
|
-
tickArrays
|
106
|
-
);
|
107
|
-
|
102
|
+
const feesAndRewards = (0, helpers_fees_1.calcFeesAndRewards)(whirlpoolInfo, positionInfo, tickArrays);
|
108
103
|
if (feesAndRewards) {
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
feesAndRewards.feeOwedA
|
114
|
-
.dividedBy(10 ** tokenPriceA.decimals)
|
115
|
-
.toNumber(),
|
116
|
-
NetworkId.solana,
|
117
|
-
tokenPriceA
|
118
|
-
)
|
119
|
-
);
|
120
|
-
}
|
121
|
-
|
122
|
-
if (feesAndRewards.feeOwedB.isGreaterThan(0)) {
|
123
|
-
rewardAssets.push(
|
124
|
-
tokenPriceToAssetToken(
|
125
|
-
tokenPriceB.address,
|
126
|
-
feesAndRewards.feeOwedB
|
127
|
-
.dividedBy(10 ** tokenPriceB.decimals)
|
128
|
-
.toNumber(),
|
129
|
-
NetworkId.solana,
|
130
|
-
tokenPriceB
|
131
|
-
)
|
132
|
-
);
|
133
|
-
}
|
134
|
-
|
135
|
-
if (feesAndRewards.rewardOwedA.isGreaterThan(0)) {
|
136
|
-
const tokenPriceRewardA = tokenPrices.get(
|
137
|
-
whirlpoolInfo.rewardInfos[0].mint.toString()
|
138
|
-
);
|
139
|
-
if (tokenPriceRewardA) {
|
140
|
-
rewardAssets.push(
|
141
|
-
tokenPriceToAssetToken(
|
142
|
-
tokenPriceRewardA.address,
|
143
|
-
feesAndRewards.rewardOwedA
|
144
|
-
.dividedBy(10 ** tokenPriceRewardA.decimals)
|
145
|
-
.toNumber(),
|
146
|
-
NetworkId.solana,
|
147
|
-
tokenPriceRewardA
|
148
|
-
)
|
149
|
-
);
|
104
|
+
if (feesAndRewards.feeOwedA.isGreaterThan(0)) {
|
105
|
+
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceA.address, feesAndRewards.feeOwedA
|
106
|
+
.dividedBy(Math.pow(10, tokenPriceA.decimals))
|
107
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceA));
|
150
108
|
}
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
whirlpoolInfo.rewardInfos[1].mint.toString()
|
156
|
-
);
|
157
|
-
if (tokenPriceRewardB) {
|
158
|
-
rewardAssets.push(
|
159
|
-
tokenPriceToAssetToken(
|
160
|
-
tokenPriceRewardB.address,
|
161
|
-
feesAndRewards.rewardOwedB
|
162
|
-
.dividedBy(10 ** tokenPriceRewardB.decimals)
|
163
|
-
.toNumber(),
|
164
|
-
NetworkId.solana,
|
165
|
-
tokenPriceRewardB
|
166
|
-
)
|
167
|
-
);
|
109
|
+
if (feesAndRewards.feeOwedB.isGreaterThan(0)) {
|
110
|
+
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceB.address, feesAndRewards.feeOwedB
|
111
|
+
.dividedBy(Math.pow(10, tokenPriceB.decimals))
|
112
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceB));
|
168
113
|
}
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
rewardAssets.push(
|
177
|
-
tokenPriceToAssetToken(
|
178
|
-
tokenPriceRewardC.address,
|
179
|
-
feesAndRewards.rewardOwedC
|
180
|
-
.dividedBy(10 ** tokenPriceRewardC.decimals)
|
181
|
-
.toNumber(),
|
182
|
-
NetworkId.solana,
|
183
|
-
tokenPriceRewardC
|
184
|
-
)
|
185
|
-
);
|
114
|
+
if (feesAndRewards.rewardOwedA.isGreaterThan(0)) {
|
115
|
+
const tokenPriceRewardA = tokenPrices.get(whirlpoolInfo.rewardInfos[0].mint.toString());
|
116
|
+
if (tokenPriceRewardA) {
|
117
|
+
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceRewardA.address, feesAndRewards.rewardOwedA
|
118
|
+
.dividedBy(Math.pow(10, tokenPriceRewardA.decimals))
|
119
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceRewardA));
|
120
|
+
}
|
186
121
|
}
|
187
|
-
|
188
|
-
|
122
|
+
if (feesAndRewards.rewardOwedB.isGreaterThan(0)) {
|
123
|
+
const tokenPriceRewardB = tokenPrices.get(whirlpoolInfo.rewardInfos[1].mint.toString());
|
124
|
+
if (tokenPriceRewardB) {
|
125
|
+
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceRewardB.address, feesAndRewards.rewardOwedB
|
126
|
+
.dividedBy(Math.pow(10, tokenPriceRewardB.decimals))
|
127
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceRewardB));
|
128
|
+
}
|
129
|
+
}
|
130
|
+
if (feesAndRewards.rewardOwedC.isGreaterThan(0)) {
|
131
|
+
const tokenPriceRewardC = tokenPrices.get(whirlpoolInfo.rewardInfos[2].mint.toString());
|
132
|
+
if (tokenPriceRewardC) {
|
133
|
+
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceRewardC.address, feesAndRewards.rewardOwedC
|
134
|
+
.dividedBy(Math.pow(10, tokenPriceRewardC.decimals))
|
135
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceRewardC));
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
189
139
|
if (!assetTokenA ||
|
190
140
|
!assetTokenB ||
|
191
141
|
assetTokenA.value === null ||
|
192
142
|
assetTokenB.value === null)
|
193
143
|
continue;
|
144
|
+
const assets = !tokenAmountA.isZero() && !tokenAmountB.isZero()
|
145
|
+
? [assetTokenA, assetTokenB]
|
146
|
+
: [];
|
194
147
|
const value = assetTokenA.value + assetTokenB.value;
|
195
148
|
const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
|
149
|
+
if (assets.length === 0 && rewardAssets.length === 0)
|
150
|
+
continue;
|
196
151
|
elements.push({
|
197
152
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
198
153
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -203,7 +158,7 @@ function getOrcaNftFetcher(platformId, programId) {
|
|
203
158
|
data: {
|
204
159
|
liquidities: [
|
205
160
|
{
|
206
|
-
assets
|
161
|
+
assets,
|
207
162
|
assetsValue: value,
|
208
163
|
rewardAssets,
|
209
164
|
rewardAssetsValue,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,0BAAc,EACd,uBAAuB,CACxB,CAAC;QACF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EA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,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CACjC,CAAC;YAEF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAE/D,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC;gBACvC,IAAI,EAAE;oBACJ,WAAW,EAAE;wBACX;4BACE,MAAM;4BACN,WAAW,EAAE,KAAK;4BAClB,YAAY;4BACZ,iBAAiB;4BACjB,KAAK,EAAE,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC;4BACvC,MAAM,EAAE,EAAE;yBACX;qBACF;iBACF;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AA5PD,8CA4PC"}
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
1
2
|
import { Position, Tick, TickArray, Whirlpool, WhirlpoolRewardInfo } from './structs/whirlpool';
|
2
3
|
import { ParsedAccount } from '../../utils/solana';
|
3
|
-
import BigNumber from 'bignumber.js';
|
4
4
|
export declare const getTickArraysAsMap: (positionsInfo: (ParsedAccount<Position> | null)[], whirlpoolMap: Map<string, Whirlpool>) => Promise<Map<string, TickArray>>;
|
5
5
|
export declare const calcFeesAndRewards: (whirlpool: Whirlpool, position: ParsedAccount<Position>, tickArrays: Map<string, TickArray>) => {
|
6
6
|
feeOwedA: BigNumber;
|
@@ -13,14 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
exports.getCollectRewardsQuoteInternal = exports.isRewardInitialized = exports.calcFeesAndRewards = exports.getTickArraysAsMap = void 0;
|
16
|
+
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const bn_js_1 = __importDefault(require("bn.js"));
|
18
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
16
19
|
const whirlpool_1 = require("./structs/whirlpool");
|
17
20
|
const solana_1 = require("../../utils/solana");
|
18
21
|
const constants_1 = require("./constants");
|
19
22
|
const clients_1 = require("../../utils/clients");
|
20
|
-
const web3_js_1 = require("@solana/web3.js");
|
21
|
-
const bn_js_1 = __importDefault(require("bn.js"));
|
22
23
|
const toBN_1 = require("../../utils/misc/toBN");
|
23
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
24
24
|
const TWO = new bn_js_1.default(2);
|
25
25
|
const U128 = TWO.pow(new bn_js_1.default(128));
|
26
26
|
const TICK_ARRAY_SIZE = 88;
|
@@ -67,8 +67,8 @@ const calcFeesAndRewards = (whirlpool, position, tickArrays) => {
|
|
67
67
|
const fees = getCollectFeesQuoteInternal({
|
68
68
|
whirlpool,
|
69
69
|
position,
|
70
|
-
tickUpper,
|
71
70
|
tickLower,
|
71
|
+
tickUpper,
|
72
72
|
});
|
73
73
|
return Object.assign(Object.assign({}, rewards), fees);
|
74
74
|
};
|
@@ -140,8 +140,12 @@ function getCollectFeesQuoteInternal(param) {
|
|
140
140
|
const updatedFeeOwedA = feeOwedA.plus(feeOwedADelta.toString());
|
141
141
|
const updatedFeeOwedB = feeOwedB.plus(feeOwedBDelta.toString());
|
142
142
|
return {
|
143
|
-
feeOwedA: updatedFeeOwedA,
|
144
|
-
|
143
|
+
feeOwedA: updatedFeeOwedA.isGreaterThan(Math.pow(10, 18))
|
144
|
+
? (0, bignumber_js_1.default)(0)
|
145
|
+
: updatedFeeOwedA,
|
146
|
+
feeOwedB: updatedFeeOwedB.isGreaterThan(Math.pow(10, 18))
|
147
|
+
? (0, bignumber_js_1.default)(0)
|
148
|
+
: updatedFeeOwedB,
|
145
149
|
};
|
146
150
|
}
|
147
151
|
function getTick(tickArray, tickIndex, tickSpacing) {
|
@@ -180,7 +184,7 @@ function getCollectRewardsQuoteInternal(param) {
|
|
180
184
|
for (const i of range) {
|
181
185
|
const rewardInfo = whirlpoolRewardsInfos[i];
|
182
186
|
invariant(!!rewardInfo, 'whirlpoolRewardsInfos cannot be undefined');
|
183
|
-
const growthGlobalX64 = rewardInfo
|
187
|
+
const { growthGlobalX64 } = rewardInfo;
|
184
188
|
const lowerRewardGrowthsOutside = tickLowerRewardGrowthsOutside[i];
|
185
189
|
const upperRewardGrowthsOutside = tickUpperRewardGrowthsOutside[i];
|
186
190
|
invariant(!!lowerRewardGrowthsOutside, 'lowerRewardGrowthsOutside cannot be undefined');
|
@@ -220,8 +224,8 @@ function getCollectRewardsQuoteInternal(param) {
|
|
220
224
|
for (const i of range) {
|
221
225
|
const growthInsideX64 = rewardGrowthsInsideX64[i];
|
222
226
|
invariant(!!growthInsideX64, 'growthInsideX64 cannot be undefined');
|
223
|
-
const [rewardGrowthInsideX64,
|
224
|
-
if (
|
227
|
+
const [rewardGrowthInsideX64, isRewardAlreadyInitialized] = growthInsideX64;
|
228
|
+
if (isRewardAlreadyInitialized) {
|
225
229
|
const rewardInfo = rewardInfos[i];
|
226
230
|
invariant(!!rewardInfo, 'rewardInfo cannot be undefined');
|
227
231
|
const amountOwedX64 = (0, toBN_1.toBN)(rewardInfo.amountOwed).shln(64);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers_fees.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/helpers_fees.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAO6B;AAC7B,+CAG4B;AAC5B,2CAA+C;AAC/C,iDAAsD;AACtD,6CAA4C;AAC5C,kDAAuB;AACvB,gDAA6C;AAC7C,gEAAqC;AAErC,MAAM,GAAG,GAAG,IAAI,eAAE,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,+BAA+B,CAChC,CAAC;IAEF,MAAM,aAAa,GAAG,MAAA,sBAAsB,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,CAAC;IACrD,MAAM,aAAa,GAAG,MAAA,sBAAsB,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,CAAC;IACrD,MAAM,aAAa,GAAG,MAAA,sBAAsB,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,CAAC;IAErD,MAAM,WAAW,GAAG,aAAa;QAC/B,CAAC,CAAC,IAAI,sBAAS,CAAC,MAAA,qBAAqB,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC;QAC9D,CAAC,CAAC,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,WAAW,GAAG,aAAa;QAC/B,CAAC,CAAC,IAAI,sBAAS,CAAC,MAAA,qBAAqB,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC;QAC9D,CAAC,CAAC,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,WAAW,GAAG,aAAa;QAC/B,CAAC,CAAC,IAAI,sBAAS,CAAC,MAAA,qBAAqB,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC;QAC9D,CAAC,CAAC,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC;IAErB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AACnD,CAAC;AAzID,wEAyIC"}
|
@@ -31,14 +31,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
31
31
|
const atlasTokenPrice = yield cache.getTokenPrice(constants_1.atlasMint, portfolio_core_1.NetworkId.solana);
|
32
32
|
const assets = [];
|
33
33
|
accounts.forEach((account) => {
|
34
|
-
if (
|
35
|
-
|
36
|
-
|
34
|
+
if (account.totalStake.isZero())
|
35
|
+
return;
|
36
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.atlasMint, account.totalStake.div(Math.pow(10, constants_1.atlasDecimals)).toNumber(), portfolio_core_1.NetworkId.solana, atlasTokenPrice);
|
37
37
|
if (!account.pendingRewards.isZero()) {
|
38
|
-
|
39
|
-
isClaimable: true,
|
40
|
-
}));
|
38
|
+
asset.attributes = { isClaimable: true };
|
41
39
|
}
|
40
|
+
assets.push(asset);
|
42
41
|
});
|
43
42
|
if (assets.length === 0)
|
44
43
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/staratlas/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAEpC,2CAA+E;AAE/E,iDAAsD;AACtD,qGAA6E;AAC7E,+CAA8D;AAC9D,uCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,sBAAU,EACV;QACE,EAAE,QAAQ,EAAE,uBAAa,CAAC,QAAQ,EAAE;QACpC;YACE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE;SACpC;KACF,CACF,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,aAAa,CAC/C,qBAAS,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,IAAI,
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../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