@sonarwatch/portfolio-plugins 0.12.154 → 0.12.155
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/plugins/flash/constants.js +1 -1
- package/src/plugins/flash/constants.js.map +1 -1
- package/src/plugins/save/constants.d.ts +2 -2
- package/src/plugins/save/constants.js +2 -2
- package/src/plugins/save/constants.js.map +1 -1
- package/src/plugins/save/index.js +7 -1
- package/src/plugins/save/index.js.map +1 -1
- package/src/plugins/save/obligationsFetcher.js +1 -2
- package/src/plugins/save/obligationsFetcher.js.map +1 -1
- package/src/plugins/save/token2022wrapperJob.d.ts +3 -0
- package/src/plugins/save/token2022wrapperJob.js +67 -0
- package/src/plugins/save/token2022wrapperJob.js.map +1 -0
- package/src/plugins/save/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.155](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.154...plugins-0.12.155) (2024-08-27)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.12.154](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.153...plugins-0.12.154) (2024-08-27)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -18,7 +18,7 @@ exports.poolsPkeys = [
|
|
18
18
|
new web3_js_1.PublicKey('KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X'),
|
19
19
|
new web3_js_1.PublicKey('D6bfytnxoZBSzJM7fcixg5sgWJ2hj8SbwkPvb2r8XpbH'),
|
20
20
|
new web3_js_1.PublicKey('6HukhSeVVLQekKaGJYkwztBacjhKLKywVPrmcvccaYMz'),
|
21
|
-
new web3_js_1.PublicKey('
|
21
|
+
new web3_js_1.PublicKey('DP1FnZjWzDjSMQA64BcMzUdpDpyAQ6723d5fpX4yTk5G'),
|
22
22
|
];
|
23
23
|
exports.custodiesKey = 'custodies';
|
24
24
|
exports.marketsKey = 'markets';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,6CAA6C,CAAC;IAC5D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,6CAA6C,CAAC;IAC5D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;CAC9D,CAAC;AAEW,QAAA,YAAY,GAAG,WAAW,CAAC;AAC3B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAG,OAAO,CAAC"}
|
@@ -9,8 +9,8 @@ export declare const rewardStatsPrefix = "save-reward-stats";
|
|
9
9
|
export declare const rewardStatsKey = "reward-stats";
|
10
10
|
export declare const pid: PublicKey;
|
11
11
|
export declare const merkleProgramId: PublicKey;
|
12
|
-
export declare const marketsEndpoint = "https://api.
|
13
|
-
export declare const reserveEndpoint = "https://api.
|
12
|
+
export declare const marketsEndpoint = "https://api.save.finance/v1/markets/configs";
|
13
|
+
export declare const reserveEndpoint = "https://api.save.finance/v1/reserves/?ids=";
|
14
14
|
export declare const wadsDecimal = 18;
|
15
15
|
export declare const mainMarket = "4UpD2fh7xH3VP9QQaXtsS1YY3bxzWhtfpks7FatyKvdY";
|
16
16
|
export declare const rewardProofsEndpoint = "https://api.save.finance/liquidity-mining/reward-proofs?obligation=";
|
@@ -17,8 +17,8 @@ exports.rewardStatsPrefix = `${exports.platformId}-reward-stats`;
|
|
17
17
|
exports.rewardStatsKey = 'reward-stats';
|
18
18
|
exports.pid = new web3_js_1.PublicKey('So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo');
|
19
19
|
exports.merkleProgramId = new web3_js_1.PublicKey('mrksLcZ6rMs9xkmJgw6oKiR3GECw44Gb5NeDqu64kiw');
|
20
|
-
exports.marketsEndpoint = 'https://api.
|
21
|
-
exports.reserveEndpoint = 'https://api.
|
20
|
+
exports.marketsEndpoint = 'https://api.save.finance/v1/markets/configs';
|
21
|
+
exports.reserveEndpoint = 'https://api.save.finance/v1/reserves/?ids=';
|
22
22
|
exports.wadsDecimal = 18;
|
23
23
|
exports.mainMarket = '4UpD2fh7xH3VP9QQaXtsS1YY3bxzWhtfpks7FatyKvdY';
|
24
24
|
exports.rewardProofsEndpoint = 'https://api.save.finance/liquidity-mining/reward-proofs?obligation=';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,uBAAuB;CACjC,CAAC;AACW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,iBAAiB,GAAG,GAAG,kBAAU,eAAe,CAAC;AACjD,QAAA,cAAc,GAAG,cAAc,CAAC;AAEhC,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AACnE,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AACW,QAAA,eAAe,GAAG,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,uBAAuB;CACjC,CAAC;AACW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,iBAAiB,GAAG,GAAG,kBAAU,eAAe,CAAC;AACjD,QAAA,cAAc,GAAG,cAAc,CAAC;AAEhC,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AACnE,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AACW,QAAA,eAAe,GAAG,6CAA6C,CAAC;AAChE,QAAA,eAAe,GAAG,4CAA4C,CAAC;AAC/D,QAAA,WAAW,GAAG,EAAE,CAAC;AACjB,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAC5D,QAAA,oBAAoB,GAC/B,qEAAqE,CAAC;AAC3D,QAAA,2BAA2B,GACtC,8EAA8E,CAAC;AAEpE,QAAA,QAAQ,GAAG,6CAA6C,CAAC"}
|
@@ -10,7 +10,13 @@ const obligationsFetcher_1 = __importDefault(require("./obligationsFetcher"));
|
|
10
10
|
const constants_1 = require("./constants");
|
11
11
|
const rewardsFetcher_1 = __importDefault(require("./rewardsFetcher"));
|
12
12
|
const rewardStatsJob_1 = __importDefault(require("./rewardStatsJob"));
|
13
|
+
const token2022wrapperJob_1 = __importDefault(require("./token2022wrapperJob"));
|
13
14
|
exports.platforms = [constants_1.platform];
|
14
|
-
exports.jobs = [
|
15
|
+
exports.jobs = [
|
16
|
+
marketsJob_1.default,
|
17
|
+
reservesJob_1.default,
|
18
|
+
rewardStatsJob_1.default,
|
19
|
+
token2022wrapperJob_1.default,
|
20
|
+
];
|
15
21
|
exports.fetchers = [obligationsFetcher_1.default, rewardsFetcher_1.default];
|
16
22
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,8DAAsC;AACtC,8EAAqD;AACrD,2CAAuC;AACvC,sEAA8C;AAC9C,sEAA8C;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,8DAAsC;AACtC,8EAAqD;AACrD,2CAAuC;AACvC,sEAA8C;AAC9C,sEAA8C;AAC9C,gFAAwD;AAE3C,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;IACzB,oBAAU;IACV,qBAAW;IACX,wBAAc;IACd,6BAAmB;CACpB,CAAC;AACW,QAAA,QAAQ,GAAc,CAAC,4BAAiB,EAAE,wBAAc,CAAC,CAAC"}
|
@@ -88,8 +88,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
88
88
|
continue;
|
89
89
|
pythAccByAddress.set(pythAddresses[i].toString(), account);
|
90
90
|
}
|
91
|
-
|
92
|
-
return elements;
|
91
|
+
return (0, helpers_1.getElementsFromObligations)(obligations, reserveByAddress, marketsByAddress, tokenPriceByAddress, pythAccByAddress);
|
93
92
|
});
|
94
93
|
const fetcher = {
|
95
94
|
id: `${constants_1.platformId}-obligations`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAAyD;AAGzD,2CAA0E;AAC1E,uCAA0E;AAE1E,+CAG4B;AAC5B,iDAAsD;AACtD,uCAAyD;AACzD,gGAA6F;AAE7F,MAAM,QAAQ,GAAoB,CAA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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 portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const constants_1 = require("./constants");
|
14
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
15
|
+
const markets = yield cache.getItem(constants_1.marketsKey, {
|
16
|
+
prefix: constants_1.platformId,
|
17
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
18
|
+
});
|
19
|
+
if (!markets)
|
20
|
+
return;
|
21
|
+
const wrappers = new Map();
|
22
|
+
markets.forEach((market) => {
|
23
|
+
market.reserves.forEach((reserve) => {
|
24
|
+
if (reserve.liquidityToken.token2022Mint) {
|
25
|
+
wrappers.set(reserve.liquidityToken.mint, reserve.liquidityToken.token2022Mint);
|
26
|
+
}
|
27
|
+
});
|
28
|
+
});
|
29
|
+
if (wrappers.size === 0)
|
30
|
+
return;
|
31
|
+
const tokenPrices = yield cache.getTokenPricesAsMap([...wrappers.values()], portfolio_core_1.NetworkId.solana);
|
32
|
+
const sources = [];
|
33
|
+
wrappers.forEach((token2022Mint, mint) => {
|
34
|
+
const tokenPrice = tokenPrices.get(token2022Mint);
|
35
|
+
if (!tokenPrice)
|
36
|
+
return;
|
37
|
+
sources.push({
|
38
|
+
address: mint,
|
39
|
+
decimals: tokenPrice.decimals,
|
40
|
+
id: constants_1.platformId,
|
41
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
42
|
+
platformId: constants_1.platformId,
|
43
|
+
price: tokenPrice.price,
|
44
|
+
timestamp: Date.now(),
|
45
|
+
weight: 1,
|
46
|
+
underlyings: [
|
47
|
+
{
|
48
|
+
address: token2022Mint,
|
49
|
+
decimals: tokenPrice.decimals,
|
50
|
+
amountPerLp: 1,
|
51
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
52
|
+
price: tokenPrice.price,
|
53
|
+
},
|
54
|
+
],
|
55
|
+
});
|
56
|
+
});
|
57
|
+
if (sources.length === 0)
|
58
|
+
return;
|
59
|
+
yield cache.setTokenPriceSources(sources);
|
60
|
+
});
|
61
|
+
const job = {
|
62
|
+
id: `${constants_1.platformId}-token2002wrapper`,
|
63
|
+
executor,
|
64
|
+
label: 'normal',
|
65
|
+
};
|
66
|
+
exports.default = job;
|
67
|
+
//# sourceMappingURL=token2022wrapperJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"token2022wrapperJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/token2022wrapperJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAyE;AACzE,2CAAqD;AAKrD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAe,sBAAU,EAAE;QAC5D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,QAAQ,GAAwB,IAAI,GAAG,EAAE,CAAC;IAEhD,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAClC,IAAI,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;gBACzC,QAAQ,CAAC,GAA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