@sonarwatch/portfolio-plugins 0.12.154 → 0.12.156
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1422 -1414
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/flash/constants.js +1 -1
- package/src/plugins/flash/constants.js.map +1 -1
- package/src/plugins/kamino/helpers/common.d.ts +4 -1
- package/src/plugins/kamino/helpers/common.js +16 -1
- package/src/plugins/kamino/helpers/common.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +6 -1
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/kamino/reservesJob.js +3 -1
- package/src/plugins/kamino/reservesJob.js.map +1 -1
- package/src/plugins/kamino/types.d.ts +2 -0
- 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/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- 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
@@ -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;
|
@@ -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"}
|
@@ -1,9 +1,12 @@
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
1
2
|
import { ParsedAccount } from '../../../utils/solana';
|
2
|
-
import { Reserve } from '../structs/klend';
|
3
|
+
import { BigFractionBytes, Reserve } from '../structs/klend';
|
3
4
|
export declare function getEchangeRate(reserve: ParsedAccount<Reserve>): number;
|
4
5
|
type Allocation = {
|
5
6
|
quantity: string;
|
6
7
|
name: string;
|
7
8
|
};
|
8
9
|
export declare function getAllocationsBySeason(owner: string, season: 1 | 2): Promise<Allocation[] | undefined>;
|
10
|
+
export declare function getCumulativeBorrowRate(borrowRatesSf: BigFractionBytes): BigNumber;
|
11
|
+
export declare function sfToValue(sf: BigNumber): BigNumber;
|
9
12
|
export {};
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.getAllocationsBySeason = exports.getEchangeRate = void 0;
|
15
|
+
exports.sfToValue = exports.getCumulativeBorrowRate = exports.getAllocationsBySeason = exports.getEchangeRate = void 0;
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
17
|
const axios_1 = __importDefault(require("axios"));
|
18
18
|
const apr_1 = require("./apr");
|
@@ -40,4 +40,19 @@ function getAllocationsBySeason(owner, season) {
|
|
40
40
|
});
|
41
41
|
}
|
42
42
|
exports.getAllocationsBySeason = getAllocationsBySeason;
|
43
|
+
function getCumulativeBorrowRate(borrowRatesSf) {
|
44
|
+
return [
|
45
|
+
(0, bignumber_js_1.default)(borrowRatesSf.value0),
|
46
|
+
(0, bignumber_js_1.default)(borrowRatesSf.value1),
|
47
|
+
(0, bignumber_js_1.default)(borrowRatesSf.value2),
|
48
|
+
(0, bignumber_js_1.default)(borrowRatesSf.value3),
|
49
|
+
].reduce((prev, curr, i) => prev.plus(curr.shiftedBy(-i * 64)), new bignumber_js_1.default(0));
|
50
|
+
}
|
51
|
+
exports.getCumulativeBorrowRate = getCumulativeBorrowRate;
|
52
|
+
const FRACTIONS = 60;
|
53
|
+
const MULTIPLIER_NUMBER = Math.pow(2, FRACTIONS);
|
54
|
+
function sfToValue(sf) {
|
55
|
+
return sf.dividedBy(MULTIPLIER_NUMBER);
|
56
|
+
}
|
57
|
+
exports.sfToValue = sfToValue;
|
43
58
|
//# sourceMappingURL=common.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/helpers/common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAG7C,+BAAuC;AACvC,4CAAgD;AAEhD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,cAAc,CAAC,OAA+B;IAC5D,MAAM,WAAW,GAAG,IAAI,sBAAS,CAC/B,IAAA,oBAAc,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAC7C,CAAC;IACF,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAC/C,IAAI,eAAe,CAAC,MAAM,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACrD,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,sBAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;SAC7C,SAAS,CAAC,WAAW,CAAC;SACtB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAXD,wCAWC;AAOD,SAAsB,sBAAsB,CAC1C,KAAa,EACb,MAAa;;QAEb,MAAM,GAAG,GAAuC,MAAM,eAAK;aACxD,GAAG,CAAC,GAAG,4BAAgB,GAAG,KAAK,6BAA6B,MAAM,EAAE,EAAE;YACrE,OAAO,EAAE,IAAI;SACd,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACpC,CAAC;CAAA;AAVD,wDAUC"}
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/helpers/common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAG7C,+BAAuC;AACvC,4CAAgD;AAEhD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,cAAc,CAAC,OAA+B;IAC5D,MAAM,WAAW,GAAG,IAAI,sBAAS,CAC/B,IAAA,oBAAc,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAC7C,CAAC;IACF,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAC/C,IAAI,eAAe,CAAC,MAAM,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACrD,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,sBAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;SAC7C,SAAS,CAAC,WAAW,CAAC;SACtB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAXD,wCAWC;AAOD,SAAsB,sBAAsB,CAC1C,KAAa,EACb,MAAa;;QAEb,MAAM,GAAG,GAAuC,MAAM,eAAK;aACxD,GAAG,CAAC,GAAG,4BAAgB,GAAG,KAAK,6BAA6B,MAAM,EAAE,EAAE;YACrE,OAAO,EAAE,IAAI;SACd,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACpC,CAAC;CAAA;AAVD,wDAUC;AAED,SAAgB,uBAAuB,CAAC,aAA+B;IACrE,OAAO;QACL,IAAA,sBAAS,EAAC,aAAa,CAAC,MAAM,CAAC;QAC/B,IAAA,sBAAS,EAAC,aAAa,CAAC,MAAM,CAAC;QAC/B,IAAA,sBAAS,EAAC,aAAa,CAAC,MAAM,CAAC;QAC/B,IAAA,sBAAS,EAAC,aAAa,CAAC,MAAM,CAAC;KAChC,CAAC,MAAM,CACN,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EACrD,IAAI,sBAAS,CAAC,CAAC,CAAC,CACjB,CAAC;AACJ,CAAC;AAVD,0DAUC;AAED,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,iBAAiB,GAAG,SAAA,CAAC,EAAI,SAAS,CAAA,CAAC;AAEzC,SAAgB,SAAS,CAAC,EAAa;IACrC,OAAO,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;AACzC,CAAC;AAFD,8BAEC"}
|
@@ -20,6 +20,7 @@ const klend_1 = require("./structs/klend");
|
|
20
20
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
21
|
const solana_1 = require("../../utils/solana");
|
22
22
|
const pdas_1 = require("./helpers/pdas");
|
23
|
+
const common_1 = require("./helpers/common");
|
23
24
|
const zeroAdressValue = '11111111111111111111111111111111';
|
24
25
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
26
|
const client = (0, clients_1.getClientSolana)();
|
@@ -90,10 +91,14 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
90
91
|
if (borrow.borrowReserve.toString() === zeroAdressValue ||
|
91
92
|
borrow.borrowedAmountSf.isLessThanOrEqualTo(0))
|
92
93
|
continue;
|
93
|
-
const amountRaw = borrow.borrowedAmountSf.dividedBy(borrow.cumulativeBorrowRateBsf.value0);
|
94
94
|
const reserve = reserves[borrow.borrowReserve.toString()];
|
95
95
|
if (!reserve)
|
96
96
|
continue;
|
97
|
+
const { cumulativeBorrowRate } = reserve;
|
98
|
+
const obligationCumulativeBorrowRate = (0, common_1.getCumulativeBorrowRate)(borrow.cumulativeBorrowRateBsf);
|
99
|
+
const amountRaw = (0, common_1.sfToValue)(borrow.borrowedAmountSf
|
100
|
+
.multipliedBy(cumulativeBorrowRate)
|
101
|
+
.dividedBy(obligationCumulativeBorrowRate));
|
97
102
|
const mint = reserve.liquidity.mintPubkey;
|
98
103
|
const tokenPrice = tokenPriceById.get(mint);
|
99
104
|
const amount = amountRaw
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAKqB;AAGrB,iDAAsD;AACtD,2CAAmD;AACnD,qGAA6E;AAE7E,+CAAmE;AACnE,yCAIwB;AAExB,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;IAEnC,MAAM,OAAO,GAAG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AAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,CAAC;YACnE,cAAc,CAAC,IAAI,CAAC;gBAClB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE;aAC/D,CAAC,CAAC;QACL,CAAC;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EAAC;gBACtB,cAAc;gBACd,cAAc;gBACd,YAAY;gBACZ,YAAY;gBACZ,eAAe;aAChB,CAAC,CAAC;YAEL,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,SAAS;gBACT,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,KAAK;gBACL,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,WAAW,EAAE,IAAI;oBACjB,YAAY;oBACZ,WAAW;oBACX,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
1
|
+
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;A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oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,WAAW,EAAE,IAAI;oBACjB,YAAY;oBACZ,WAAW;oBACX,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -29,9 +29,11 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
29
|
const borrowApr = (0, apr_1.calculateBorrowAPR)(reserve);
|
30
30
|
const supplyApr = (0, apr_1.calculateSupplyAPR)(reserve);
|
31
31
|
const exchangeRate = (0, common_1.getEchangeRate)(reserve);
|
32
|
+
const cumulativeBorrowRate = (0, common_1.getCumulativeBorrowRate)(reserve.liquidity.cumulativeBorrowRateBsf).toString();
|
32
33
|
reserveById[reserve.pubkey.toString()] = Object.assign(Object.assign({}, reserve), { borrowApr,
|
33
34
|
supplyApr,
|
34
|
-
exchangeRate
|
35
|
+
exchangeRate,
|
36
|
+
cumulativeBorrowRate });
|
35
37
|
}
|
36
38
|
yield cache.setItem(constants_1.reservesKey, reserveById, {
|
37
39
|
prefix: constants_1.platformId,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reservesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/reservesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAAsE;AACtE,2CAAgD;AAChD,uCAAuE;AAEvE,
|
1
|
+
{"version":3,"file":"reservesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/reservesJob.ts"],"names":[],"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AE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -4,11 +4,13 @@ export type ReserveDataEnhanced = ReserveData & {
|
|
4
4
|
supplyApr: number;
|
5
5
|
borrowApr: number;
|
6
6
|
exchangeRate: number;
|
7
|
+
cumulativeBorrowRate: string;
|
7
8
|
};
|
8
9
|
export type ReserveEnhanced = Reserve & {
|
9
10
|
supplyApr: number;
|
10
11
|
borrowApr: number;
|
11
12
|
exchangeRate: number;
|
13
|
+
cumulativeBorrowRate: string;
|
12
14
|
};
|
13
15
|
export type ReserveConfig = {
|
14
16
|
status: number;
|
@@ -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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AAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,67 @@
|
|
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 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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AAC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjC,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,mBAAmB;IACpC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -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;
|
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
42
42
|
const clients_1 = require("../../utils/clients");
|
43
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
44
|
const helpers_1 = require("./helpers");
|
45
|
-
const query = (0, graphql_request_1.gql) `
|
46
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
-
getAirdropFinalFrontend(authority: $authority) {
|
48
|
-
authority
|
49
|
-
community_allocation
|
50
|
-
eligibility
|
51
|
-
main_allocation
|
52
|
-
og_allocation
|
53
|
-
s1_allocation
|
54
|
-
s2_allocation
|
55
|
-
total_allocation
|
56
|
-
__typename
|
57
|
-
}
|
58
|
-
}
|
45
|
+
const query = (0, graphql_request_1.gql) `
|
46
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
+
getAirdropFinalFrontend(authority: $authority) {
|
48
|
+
authority
|
49
|
+
community_allocation
|
50
|
+
eligibility
|
51
|
+
main_allocation
|
52
|
+
og_allocation
|
53
|
+
s1_allocation
|
54
|
+
s2_allocation
|
55
|
+
total_allocation
|
56
|
+
__typename
|
57
|
+
}
|
58
|
+
}
|
59
59
|
`;
|
60
60
|
const networkId = portfolio_core_1.NetworkId.solana;
|
61
61
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
|
4
|
-
exports.infoQueryMsg = JSON.parse(`{
|
5
|
-
"info": {}
|
4
|
+
exports.infoQueryMsg = JSON.parse(`{
|
5
|
+
"info": {}
|
6
6
|
}`);
|
7
|
-
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
-
"token_info": {}
|
7
|
+
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
+
"token_info": {}
|
9
9
|
}`);
|
10
|
-
exports.minterQueryMsg = JSON.parse(`{
|
11
|
-
"minter": {}
|
10
|
+
exports.minterQueryMsg = JSON.parse(`{
|
11
|
+
"minter": {}
|
12
12
|
}`);
|
13
|
-
exports.poolQueryMsg = JSON.parse(`{
|
14
|
-
"pool": {}
|
13
|
+
exports.poolQueryMsg = JSON.parse(`{
|
14
|
+
"pool": {}
|
15
15
|
}`);
|
16
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
function getQueryBalanceByOwner(owner) {
|
4
|
-
return JSON.parse(`{
|
5
|
-
"balance": {
|
6
|
-
"address": "${owner}"
|
7
|
-
}
|
4
|
+
return JSON.parse(`{
|
5
|
+
"balance": {
|
6
|
+
"address": "${owner}"
|
7
|
+
}
|
8
8
|
}`);
|
9
9
|
}
|
10
10
|
exports.default = getQueryBalanceByOwner;
|