@sonarwatch/portfolio-plugins 0.12.123 → 0.12.124
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/quarry/constants.d.ts +10 -0
- package/src/plugins/quarry/constants.js +24 -0
- package/src/plugins/quarry/constants.js.map +1 -0
- package/src/plugins/quarry/helpers.d.ts +17 -0
- package/src/plugins/quarry/helpers.js +63 -0
- package/src/plugins/quarry/helpers.js.map +1 -0
- package/src/plugins/quarry/index.d.ts +6 -0
- package/src/plugins/quarry/index.js +13 -0
- package/src/plugins/quarry/index.js.map +1 -0
- package/src/plugins/quarry/mineIdl.d.ts +125 -0
- package/src/plugins/quarry/mineIdl.js +1333 -0
- package/src/plugins/quarry/mineIdl.js.map +1 -0
- package/src/plugins/quarry/positionsFetcher.d.ts +3 -0
- package/src/plugins/quarry/positionsFetcher.js +110 -0
- package/src/plugins/quarry/positionsFetcher.js.map +1 -0
- package/src/plugins/quarry/rewardersJob.d.ts +3 -0
- package/src/plugins/quarry/rewardersJob.js +42 -0
- package/src/plugins/quarry/rewardersJob.js.map +1 -0
- package/src/plugins/quarry/types.d.ts +54 -0
- package/src/plugins/quarry/types.js +3 -0
- package/src/plugins/quarry/types.js.map +1 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mineIdl.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/mineIdl.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG;IACrB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,CAAC,CAAC;oBACT,QAAQ,EAAE,CAAC,CAAC;iBACb;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,CAAC,CAAC;oBACT,QAAQ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E,iBAAiB;YACvB,GAAG,EAAE,oBAAoB;SAC1B;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,kBAAkB;YACxB,GAAG,EAAE,oBAAoB;SAC1B;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,oBAAoB;YAC1B,GAAG,EAAE,wBAAwB;SAC9B;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,8BAA8B;YACpC,GAAG,EAAE,mCAAmC;SACzC;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,qBAAqB;SAC3B;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,oBAAoB;YAC1B,GAAG,EAAE,+CAA+C;SACrD;KACF;CACF,CAAC"}
|
@@ -0,0 +1,110 @@
|
|
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
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
|
+
const constants_1 = require("./constants");
|
19
|
+
const clients_1 = require("../../utils/clients");
|
20
|
+
const solana_1 = require("../../utils/solana");
|
21
|
+
const helpers_1 = require("./helpers");
|
22
|
+
const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
23
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
24
|
+
const rewardersMemo = new MemoizedCache_1.MemoizedCache(constants_1.rewardersCacheKey, {
|
25
|
+
prefix: constants_1.platformId,
|
26
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
27
|
+
});
|
28
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
29
|
+
const connection = (0, clients_1.getClientSolana)();
|
30
|
+
const rewarders = yield rewardersMemo.getItem(cache);
|
31
|
+
if (!rewarders)
|
32
|
+
return [];
|
33
|
+
const quarryDatas = (0, helpers_1.getQuarryData)(rewarders, new web3_js_1.PublicKey(owner));
|
34
|
+
const accounts = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.mineIdlItem, quarryDatas.map((m) => m.ownerMiner)).then((accs) => accs.filter((acc) => acc !== null && acc.balance !== '0'));
|
35
|
+
if (accounts.length === 0)
|
36
|
+
return [];
|
37
|
+
const mints = new Set();
|
38
|
+
accounts.forEach((account) => {
|
39
|
+
const quarryData = quarryDatas.find((q) => q.ownerMiner === (account === null || account === void 0 ? void 0 : account.pubkey));
|
40
|
+
if (!quarryData)
|
41
|
+
return;
|
42
|
+
const rewarder = rewarders.find((r) => r.rewarder === quarryData.rewarder.toString());
|
43
|
+
if (!rewarder)
|
44
|
+
return;
|
45
|
+
mints.add(rewarder.rewardsTokenInfo.address);
|
46
|
+
const quarry = rewarder.quarries.find((q) => (account === null || account === void 0 ? void 0 : account.quarry) === q.quarry);
|
47
|
+
if (!quarry)
|
48
|
+
return;
|
49
|
+
mints.add(quarry.stakedToken.mint);
|
50
|
+
});
|
51
|
+
const tokenPrices = yield cache.getTokenPricesAsMap([...mints], portfolio_core_1.NetworkId.solana);
|
52
|
+
const elements = [];
|
53
|
+
accounts.forEach((account) => {
|
54
|
+
var _a;
|
55
|
+
if (!account)
|
56
|
+
return;
|
57
|
+
const quarryData = quarryDatas.find((q) => q.ownerMiner === (account === null || account === void 0 ? void 0 : account.pubkey));
|
58
|
+
if (!quarryData)
|
59
|
+
return;
|
60
|
+
const rewarder = rewarders.find((r) => r.rewarder === quarryData.rewarder.toString());
|
61
|
+
if (!rewarder)
|
62
|
+
return;
|
63
|
+
const quarry = rewarder.quarries.find((q) => (account === null || account === void 0 ? void 0 : account.quarry) === q.quarry);
|
64
|
+
if (!quarry)
|
65
|
+
return;
|
66
|
+
const assets = [];
|
67
|
+
const rewardAssets = [];
|
68
|
+
const stakedTokenPrice = tokenPrices.get(quarry.stakedToken.mint);
|
69
|
+
assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)((stakedTokenPrice === null || stakedTokenPrice === void 0 ? void 0 : stakedTokenPrice.address) || quarry.stakedToken.mint, new bignumber_js_1.default(account.balance)
|
70
|
+
.dividedBy(Math.pow(10, ((stakedTokenPrice === null || stakedTokenPrice === void 0 ? void 0 : stakedTokenPrice.decimals) || quarry.stakedToken.decimals)))
|
71
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, stakedTokenPrice)), { name: quarry.primaryTokenInfo.symbol }));
|
72
|
+
const rewardTokenPrice = tokenPrices.get(rewarder.rewardsTokenInfo.address);
|
73
|
+
if (account.rewardsEarned !== '0' && rewardTokenPrice) {
|
74
|
+
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(rewardTokenPrice.address, new bignumber_js_1.default(account.rewardsEarned)
|
75
|
+
.dividedBy(Math.pow(10, rewardTokenPrice.decimals))
|
76
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, rewardTokenPrice));
|
77
|
+
}
|
78
|
+
const assetsValue = (0, portfolio_core_1.getUsdValueSum)(assets.map((a) => a.value));
|
79
|
+
const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
|
80
|
+
const value = assetsValue;
|
81
|
+
elements.push({
|
82
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
83
|
+
label: 'Deposit',
|
84
|
+
platformId: constants_1.platformId,
|
85
|
+
type: portfolio_core_1.PortfolioElementType.liquidity,
|
86
|
+
value,
|
87
|
+
name: (_a = rewarder.info) === null || _a === void 0 ? void 0 : _a.name,
|
88
|
+
data: {
|
89
|
+
liquidities: [
|
90
|
+
{
|
91
|
+
assets,
|
92
|
+
assetsValue,
|
93
|
+
rewardAssets,
|
94
|
+
rewardAssetsValue,
|
95
|
+
value,
|
96
|
+
yields: [],
|
97
|
+
},
|
98
|
+
],
|
99
|
+
},
|
100
|
+
});
|
101
|
+
});
|
102
|
+
return elements;
|
103
|
+
});
|
104
|
+
const fetcher = {
|
105
|
+
id: `${constants_1.platformId}-positions`,
|
106
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
107
|
+
executor,
|
108
|
+
};
|
109
|
+
exports.default = fetcher;
|
110
|
+
//# sourceMappingURL=positionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAErC,2CAAyE;AAEzE,iDAAsD;AACtD,+CAAuE;AACvE,uCAA0C;AAE1C,kEAA+D;AAC/D,qGAA6E;AAE7E,MAAM,aAAa,GAAG,IAAI,6BAAa,CAAa,6BAAiB,EAAE;IACrE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC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C;QAE1B,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,SAAS;YAChB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,KAAK;YACL,IAAI,EAAE,MAAA,QAAQ,CAAC,IAAI,0CAAE,IAAI;YACzB,IAAI,EAAE;gBACJ,WAAW,EAAE;oBACX;wBACE,MAAM;wBACN,WAAW;wBACX,YAAY;wBACZ,iBAAiB;wBACjB,KAAK;wBACL,MAAM,EAAE,EAAE;qBACX;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,42 @@
|
|
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
|
+
const axios_1 = __importDefault(require("axios"));
|
16
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
+
const res = yield axios_1.default
|
20
|
+
.get(constants_1.rewardersUrl)
|
21
|
+
.catch((err) => {
|
22
|
+
throw Error(`QUARRY_API ERR: ${err}`);
|
23
|
+
});
|
24
|
+
if (!res.data) {
|
25
|
+
throw Error(`QUARRY_API NO RESPONSE`);
|
26
|
+
}
|
27
|
+
const { data } = res;
|
28
|
+
if (!data)
|
29
|
+
return;
|
30
|
+
const rewarders = Object.entries(data).map(([rewarder, rewarderData]) => (Object.assign({ rewarder }, rewarderData)));
|
31
|
+
yield cache.setItem(constants_1.rewardersCacheKey, rewarders, {
|
32
|
+
prefix: constants_1.platformId,
|
33
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
34
|
+
});
|
35
|
+
});
|
36
|
+
const job = {
|
37
|
+
id: `${constants_1.platformId}-rewarders`,
|
38
|
+
executor,
|
39
|
+
label: 'normal',
|
40
|
+
};
|
41
|
+
exports.default = job;
|
42
|
+
//# sourceMappingURL=rewardersJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rewardersJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/rewardersJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA0E;AAG1E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,GAAG,GAAmC,MAAM,eAAK;SACpD,GAAG,CAAC,wBAAY,CAAC;SACjB,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,MAAM,KAAK,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC;IAErB,IAAI,CAAC,IAAI;QAAE,OAAO;IAElB,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CACxC,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,EAAE,CAC3B,CAAC,gBACC,QAAQ,IACL,YAAY,CACH,CAAA,CACjB,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,6BAAiB,EAAE,SAAS,EAAE;QAChD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
export type TokenInfo = {
|
3
|
+
decimals: number;
|
4
|
+
mint: string;
|
5
|
+
};
|
6
|
+
export type DetailedTokenInfo = TokenInfo & {
|
7
|
+
address: string;
|
8
|
+
chainId: number;
|
9
|
+
name: string;
|
10
|
+
symbol: string;
|
11
|
+
};
|
12
|
+
export type Quarry = {
|
13
|
+
index: number;
|
14
|
+
isReplica: boolean;
|
15
|
+
mergePool: string;
|
16
|
+
primaryToken: TokenInfo;
|
17
|
+
primaryTokenInfo: DetailedTokenInfo;
|
18
|
+
quarry: string;
|
19
|
+
replicaMint: string;
|
20
|
+
slug: string;
|
21
|
+
stakedToken: TokenInfo;
|
22
|
+
};
|
23
|
+
export type RewardersApiRes = {
|
24
|
+
[rewarder: string]: Omit<Rewarder, 'rewarder'>;
|
25
|
+
};
|
26
|
+
export type RewarderInfo = {
|
27
|
+
address: string;
|
28
|
+
id: string;
|
29
|
+
name: string;
|
30
|
+
};
|
31
|
+
export type Rewarder = {
|
32
|
+
rewarder: string;
|
33
|
+
authority: string;
|
34
|
+
info?: RewarderInfo;
|
35
|
+
mintWrapper: string;
|
36
|
+
quarries: Quarry[];
|
37
|
+
rewardsToken: TokenInfo;
|
38
|
+
rewardsTokenInfo: DetailedTokenInfo;
|
39
|
+
slug: string;
|
40
|
+
};
|
41
|
+
export type QuarryAndMint = {
|
42
|
+
key: PublicKey;
|
43
|
+
rewardsMint: PublicKey;
|
44
|
+
};
|
45
|
+
export type Miner = {
|
46
|
+
quarry: string;
|
47
|
+
authority: string;
|
48
|
+
bump: string;
|
49
|
+
tokenVaultKey: string;
|
50
|
+
rewardsEarned: string;
|
51
|
+
rewardsPerTokenPaid: string;
|
52
|
+
balance: string;
|
53
|
+
index: string;
|
54
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/quarry/types.ts"],"names":[],"mappings":""}
|