@sonarwatch/portfolio-plugins 0.14.136 → 0.14.137
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 +2156 -2152
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +0 -4
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/drift/depositsFetcher.js +1 -1
- package/src/plugins/drift/depositsFetcher.js.map +1 -1
- package/src/plugins/drift/perpHelpers/margin.js +8 -1
- package/src/plugins/drift/perpHelpers/margin.js.map +1 -1
- package/src/plugins/drift/perpHelpers/position.js +1 -0
- package/src/plugins/drift/perpHelpers/position.js.map +1 -1
- package/src/plugins/drift/perpHelpers/pyth.js +5 -3
- package/src/plugins/drift/perpHelpers/pyth.js.map +1 -1
- package/src/plugins/drift/perpHelpers/switchboard_on_demand.js +2 -1
- package/src/plugins/drift/perpHelpers/switchboard_on_demand.js.map +1 -1
- package/src/plugins/drift/perpHelpers/types.d.ts +1 -0
- package/src/plugins/drift/perpHelpers/types.js.map +1 -1
- package/src/plugins/echelon/index.js +3 -9
- package/src/plugins/echelon/index.js.map +1 -1
- package/src/plugins/iloop/depositsFetcher.js +8 -15
- package/src/plugins/iloop/depositsFetcher.js.map +1 -1
- package/src/plugins/iloop/structs.d.ts +1 -1
- package/src/plugins/iloop/structs.js +1 -1
- package/src/plugins/iloop/structs.js.map +1 -1
- package/src/plugins/kamino/ordersFetcher.js +14 -13
- package/src/plugins/kamino/ordersFetcher.js.map +1 -1
- package/src/plugins/kamino/structs/order.d.ts +6 -1
- package/src/plugins/kamino/structs/order.js +7 -1
- package/src/plugins/kamino/structs/order.js.map +1 -1
- package/src/plugins/kriya/constants.d.ts +3 -3
- package/src/plugins/kriya/constants.js +3 -3
- package/src/plugins/kriya/constants.js.map +1 -1
- package/src/plugins/kriya/poolsFarmsV2Job.js +2 -6
- package/src/plugins/kriya/poolsFarmsV2Job.js.map +1 -1
- package/src/plugins/kriya/poolsV3Fetcher.js +1 -1
- package/src/plugins/kriya/poolsV3Fetcher.js.map +1 -1
- package/src/plugins/kriya/poolsV3StatsJob.js +5 -8
- package/src/plugins/kriya/poolsV3StatsJob.js.map +1 -1
- package/src/plugins/kriya/strategyLeverageLendingFetcher.js +2 -2
- package/src/plugins/kriya/strategyLeverageLendingFetcher.js.map +1 -1
- package/src/plugins/kriya/strategyLeverageLendingJob.js +2 -4
- package/src/plugins/kriya/strategyLeverageLendingJob.js.map +1 -1
- package/src/plugins/kriya/types/pools.d.ts +3 -4
- package/src/plugins/kriya/types/vaults.d.ts +5 -4
- package/src/plugins/lulo/depositsFetcher.js +2 -2
- package/src/plugins/lulo/depositsFetcher.js.map +1 -1
- package/src/plugins/solayer/airdropFetcher.js +17 -1
- package/src/plugins/solayer/airdropFetcher.js.map +1 -1
- 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
package/src/index.js
CHANGED
@@ -127,7 +127,6 @@ const sanctum_1 = require("./plugins/sanctum");
|
|
127
127
|
const allbridge_1 = require("./plugins/allbridge");
|
128
128
|
const famousfoxfederation_1 = require("./plugins/famousfoxfederation");
|
129
129
|
const nxfinance_1 = require("./plugins/nxfinance");
|
130
|
-
const echelon_1 = require("./plugins/echelon");
|
131
130
|
const solayer_1 = require("./plugins/solayer");
|
132
131
|
const picasso_1 = require("./plugins/picasso");
|
133
132
|
const quarry_1 = require("./plugins/quarry");
|
@@ -300,7 +299,6 @@ exports.platforms = [
|
|
300
299
|
...allbridge_1.platforms,
|
301
300
|
...famousfoxfederation_1.platforms,
|
302
301
|
...nxfinance_1.platforms,
|
303
|
-
...echelon_1.platforms,
|
304
302
|
...solayer_1.platforms,
|
305
303
|
...picasso_1.platforms,
|
306
304
|
...quarry_1.platforms,
|
@@ -452,7 +450,6 @@ exports.jobs = [
|
|
452
450
|
...allbridge_1.jobs,
|
453
451
|
...famousfoxfederation_1.jobs,
|
454
452
|
...nxfinance_1.jobs,
|
455
|
-
...echelon_1.jobs,
|
456
453
|
...solayer_1.jobs,
|
457
454
|
...picasso_1.jobs,
|
458
455
|
...quarry_1.jobs,
|
@@ -606,7 +603,6 @@ exports.fetchers = [
|
|
606
603
|
...allbridge_1.fetchers,
|
607
604
|
...famousfoxfederation_1.fetchers,
|
608
605
|
...nxfinance_1.fetchers,
|
609
|
-
...echelon_1.fetchers,
|
610
606
|
...solayer_1.fetchers,
|
611
607
|
...picasso_1.fetchers,
|
612
608
|
...quarry_1.fetchers,
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,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AC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;IAC1B,wBAAqB;IACrB,wBAAqB;IACrB,sBAAmB;IACnB,GAAG,4BAAyB;IAC5B,0BAAuB;IACvB,+BAA+B;IAC/B,qBAAkB;IAClB,GAAG,8BAAqB;IACxB,sBAAmB;IACnB,wBAAqB;CACtB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,yCAIwB;AACxB,iDAI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,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,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;
|
@@ -124,7 +124,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
124
124
|
if (!market)
|
125
125
|
continue;
|
126
126
|
const oraclePriceData = yield (0, getOraclePrice_1.getOraclePrice)(market.amm.oracle.toString(), market.amm.oracleSource, client);
|
127
|
-
if (!oraclePriceData)
|
127
|
+
if (!oraclePriceData || oraclePriceData.price.isZero())
|
128
128
|
continue;
|
129
129
|
const pnl = new bignumber_js_1.default((0, position_1.calculatePositionPNL)(market, perpPosition, oraclePriceData).toString())
|
130
130
|
.div(constants_2.PRICE_PRECISION_BIG_NUMBER)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAA+E;AAC/E,gEAAqC;AACrC,6CAA4C;AAG5C,2CAKqB;AACrB,qCAKkB;AAClB,uCAMmB;AAEnB,+CAM4B;AAC5B,iDAAsD;AACtD,qDAGgC;AAChC,uDAAqE;AACrE,+CAAwD;AACxD,iEAA8D;AAC9D,+DAA4D;AAC5D,uEAAoE;AACpE,gFAA6E;AAC7E,kEAA+D;AAElD,QAAA,eAAe,GAAG,IAAI,6BAAa,CAC9C,0BAAc,EACd;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CACF,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,MAAM,gBAAgB,GAAG,MAAM,uBAAe,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAoC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,mCAAmC,GAAgB,EAAE,CAAC;IAC5D,MAAM,oBAAoB,GAAgB,EAAE,CAAC;IAC7C,KAAK,MAAM,cAAc,IAAI,gBAAgB,IAAI,EAAE,EAAE,CAAC;QACpD,mCAAmC,CAAC,cAAc,CAAC,WAAW,CAAC;YAC7D,IAAA,mDAAyC,EACvC,wBAAY,EACZ,IAAI,m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|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAA+E;AAC/E,gEAAqC;AACrC,6CAA4C;AAG5C,2CAKqB;AACrB,qCAKkB;AAClB,uCAMmB;AAEnB,+CAM4B;AAC5B,iDAAsD;AACtD,qDAGgC;AAChC,uDAAqE;AACrE,+CAAwD;AACxD,iEAA8D;AAC9D,+DAA4D;AAC5D,uEAAoE;AACpE,gFAA6E;AAC7E,kEAA+D;AAElD,QAAA,eAAe,GAAG,IAAI,6BAAa,CAC9C,0BAAc,EACd;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CACF,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,MAAM,gBAAgB,GAAG,MAAM,uBAAe,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAoC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,mCAAmC,GAAgB,EAAE,CAAC;IAC5D,MAAM,oBAAoB,GAAgB,EAAE,CAAC;IAC7C,KAAK,MAAM,cAAc,IAAI,gBAAgB,IAAI,EAAE,EAAE,CAAC;QACpD,mCAAmC,CAAC,cAAc,CAAC,WAAW,CAAC;YAC7D,IAAA,mDAAyC,EACvC,wBAAY,EACZ,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,cAAc,CAAC,WAAW,CAC3B,CAAC;QACJ,oBAAoB,CAAC,IAAI,CACvB,IAAI,mBAAS,CAAC,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAClD,CAAC;QACF,iB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F,CAAC,CAAC;gBACH,OAAO,CAAC,gBAAgB,CAAC;oBACvB;wBACE,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS;wBAC1B,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,UAAU,CAAC,SAAS,CAAC;qBACrC;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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"}
|
@@ -61,13 +61,20 @@ function calculateOraclePriceForPerpMargin(perpPosition, market, oraclePriceData
|
|
61
61
|
exports.calculateOraclePriceForPerpMargin = calculateOraclePriceForPerpMargin;
|
62
62
|
function calculateBaseAssetValueWithOracle(market, perpPosition, oraclePriceData, includeOpenOrders = false) {
|
63
63
|
let { price } = oraclePriceData;
|
64
|
+
const { precision } = oraclePriceData;
|
64
65
|
if (market.status === struct_1.MarketStatus.Settlement) {
|
65
66
|
price = new bn_js_1.default(market.expiryPrice.toString(10), 10);
|
66
67
|
}
|
67
68
|
const baseAssetAmount = includeOpenOrders
|
68
69
|
? calculateWorstCaseBaseAssetAmount(perpPosition)
|
69
70
|
: perpPosition.baseAssetAmount;
|
70
|
-
|
71
|
+
const baseAssetValue = baseAssetAmount
|
72
|
+
.abs()
|
73
|
+
.mul(price)
|
74
|
+
.div(constants_1.AMM_RESERVE_PRECISION);
|
75
|
+
return precision
|
76
|
+
? baseAssetValue.div(new bn_js_1.default(10).pow(precision))
|
77
|
+
: baseAssetValue;
|
71
78
|
}
|
72
79
|
exports.calculateBaseAssetValueWithOracle = calculateBaseAssetValueWithOracle;
|
73
80
|
function calculateWorstCaseBaseAssetAmount(perpPosition) {
|
@@ -1 +1 @@
|
|
1
|
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B,CAAC,CACjC,CACF,CAAC;IAEF,IAAI,WAAe,CAAC;IACpB,IAAI,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC,gBAAI,CAAC,EAAE,CAAC;QAC1C,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC7D,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAxBD,8EAwBC;AAED,SAAgB,iCAAiC,CAC/C,MAAkB,EAClB,YAA0B,EAC1B,eAAgC,EAChC,iBAAiB,GAAG,KAAK;IAEzB,IAAI,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC;IAChC,IAAI,MAAM,CAAC,MAAM,KAAK,qBAAY,CAAC,UAAU,EAAE,CAAC;QAC9C,KAAK,GAAG,IAAI,eAAE,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,iCAAiC,CAAC,YAAY,CAAC;QACjD,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC;IAEjC,
|
1
|
+
{"version":3,"file":"margin.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/margin.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AACvB,sCAAmE;AAEnE,2CAMqB;AACrB,iCAAsC;AACtC,qCAAkC;AAElC,SAAgB,mCAAmC,CACjD,IAAQ,EAAE,wBAAwB;AAClC,SAAa,EACb,eAAmB,EACnB,SAAa;IAEb,IAAI,SAAS,CAAC,EAAE,CAAC,gBAAI,CAAC,EAAE,CAAC;QACvB,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,MAAM,QAAQ,GAAG,IAAA,mBAAY,EAAC,IAAI,CAA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default(1);
|
70
70
|
let pnl = baseAssetValue
|
71
71
|
.mul(baseAssetValueSign)
|
72
|
+
.mul(constants_1.PRICE_PRECISION)
|
72
73
|
.add(perpPosition.quoteAssetAmount);
|
73
74
|
if (withFunding) {
|
74
75
|
const fundingRatePnL = calculatePositionFundingPNL(market, perpPosition);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"position.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/position.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AAEvB,2CAQqB;AACrB,mCAA6D;AAC7D,+BAKe;AACf,qCAA6D;AAE7D,SAAgB,uBAAuB,CACrC,MAAkB,EAClB,YAA0B,EAC1B,eAAgC,EAChC,SAAS,GAAG,IAAI,EAChB,UAAU,GAAG,KAAK;IAElB,IAAI,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC,gBAAI,CAAC,EAAE,CAAC;QAC1C,OAAO,gBAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,SAA8D,CAAC;IAEnE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,IAAI,MAAM,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,IAAI,SAAS,EAAE,CAAC;YAC3C,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,GAC1D,IAAA,uCAAiC,EAC/B,MAAM,CAAC,GAAG,EACV,gBAAgB,EAChB,eAAe,CAChB,CAAC;YACJ,SAAS,GAAG;gBACV,gBAAgB;gBAChB,iBAAiB;gBACjB,KAAK;gBACL,aAAa,EAAE,MAAM;aACtB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,SAAS,GAAG,IAAA,yBAAmB,EAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;SAAM,CAAC;QACN,SAAS,GAAG,MAAM,C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,IAAI,GAAG,GAAG,cAAc;SACrB,GAAG,CAAC,kBAAkB,CAAC;SACvB,GAAG,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAEtC,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,cAAc,GAAG,2BAA2B,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAEzE,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;
|
1
|
+
{"version":3,"file":"position.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/position.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AAEvB,2CAQqB;AACrB,mCAA6D;AAC7D,+BAKe;AACf,qCAA6D;AAE7D,SAAgB,uBAAuB,CACrC,MAAkB,EAClB,YAA0B,EAC1B,eAAgC,EAChC,SAAS,GAAG,IAAI,EAChB,UAAU,GAAG,KAAK;IAElB,IAAI,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC,gBAAI,CAAC,EAAE,CAAC;QAC1C,OAAO,gBAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,SAA8D,CAAC;IAEnE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,IAAI,MAAM,CAAC,GAAG,CAAC,UAAU,GAAG,CAAC,IAAI,SAAS,EAAE,CAAC;YAC3C,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,GAC1D,IAAA,uCAAiC,EAC/B,MAAM,CAAC,GAAG,EACV,gBAAgB,EAChB,eAAe,CAChB,CAAC;YACJ,SAAS,GAAG;gBACV,gBAAgB;gBAChB,iBAAiB;gBACjB,KAAK;gBACL,aAAa,EAAE,MAAM;aACtB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,SAAS,GAAG,IAAA,yBAAmB,EAAC,M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CAAC,CAAC,CAAC,gBAAI,CAAC;SACvD,GAAG,CAAC,2BAAe,CAAC;SACpB,GAAG,CAAC,wCAA4B,CAAC;SACjC,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC;SACjC,GAAG,EAAE,CAAC;AACX,CAAC;AAdD,gDAcC;AAED,SAAgB,oBAAoB,CAClC,YAA0B;IAE1B,OAAO,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC,gBAAI,CAAC;QAC1C,CAAC,CAAC,yBAAiB,CAAC,KAAK;QACzB,CAAC,CAAC,yBAAiB,CAAC,IAAI,CAAC;AAC7B,CAAC;AAND,oDAMC;AAED,SAAgB,wBAAwB,CACtC,YAA0B;IAE1B,OAAO,YAAY,CAAC,eAAe,CAAC,GAAG,CAAC,gBAAI,CAAC;QAC3C,CAAC,CAAC,yBAAiB,CAAC,IAAI;QACxB,CAAC,CAAC,yBAAiB,CAAC,KAAK,CAAC;AAC9B,CAAC;AAND,4DAMC;AAED,SAAgB,eAAe,CAAC,YAA0B;IACxD,OAAO,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC,gBAAI,CAAC,IAAI,YAAY,CAAC,UAAU,KAAK,CAAC,CAAC;AAChF,CAAC;AAFD,0CAEC;AAED,SAAgB,aAAa,CAAC,QAAsB;IAClD,OAAO,CACL,QAAQ,CAAC,UAAU,KAAK,CAAC;QACzB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,gBAAI,CAAC;QAC3B,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,gBAAI,CAAC,CAC5B,CAAC;AACJ,CAAC;AAND,sCAMC"}
|
@@ -9,6 +9,7 @@ const bn_js_1 = __importDefault(require("bn.js"));
|
|
9
9
|
const helpersOld_1 = require("../../../utils/solana/pyth/helpersOld");
|
10
10
|
const constants_1 = require("./constants");
|
11
11
|
const struct_1 = require("../struct");
|
12
|
+
const toBN_1 = require("../../../utils/misc/toBN");
|
12
13
|
function getPythOraclePriceDataFromBuffer(buffer, multiple, stableCoin) {
|
13
14
|
const priceData = (0, helpersOld_1.parsePriceData)(buffer);
|
14
15
|
const confidence = convertPythPrice(priceData.confidence || 0, priceData.exponent, multiple);
|
@@ -43,9 +44,10 @@ function getStableCoinPrice(price, confidence) {
|
|
43
44
|
function pythLazerPriceToOraclePrice(buffer) {
|
44
45
|
const pythLazer = struct_1.pythLazerOracleStruct.deserialize(buffer)[0];
|
45
46
|
return {
|
46
|
-
price:
|
47
|
-
|
48
|
-
|
47
|
+
price: (0, toBN_1.toBN)(pythLazer.price.toNumber()),
|
48
|
+
precision: new bn_js_1.default(pythLazer.exponent).abs(),
|
49
|
+
slot: (0, toBN_1.toBN)(pythLazer.postedSlot.toNumber()),
|
50
|
+
confidence: (0, toBN_1.toBN)(pythLazer.conf.toNumber()),
|
49
51
|
hasSufficientNumberOfDataPoints: true,
|
50
52
|
};
|
51
53
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pyth.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/pyth.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAsC;AACtC,kDAAuB;AACvB,sEAAuE;AACvE,2CAAoE;AAEpE,sCAAkD;
|
1
|
+
{"version":3,"file":"pyth.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/pyth.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAsC;AACtC,kDAAuB;AACvB,sEAAuE;AACvE,2CAAoE;AAEpE,sCAAkD;AAClD,mDAAgD;AAEhD,SAAgB,gCAAgC,CAC9C,MAAc,EACd,QAAY,EACZ,UAAmB;IAEnB,MAAM,SAAS,GAAG,IAAA,2BAAc,EAAC,MAAM,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,gBAAgB,CACjC,SAAS,CAAC,UAAU,IAAI,CAAC,EACzB,SAAS,CAAC,QAAQ,EAClB,QAAQ,CACT,CAAC;IACF,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG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,IAAI,KAAK,CAAC,GAAG,CAAC,2BAAe,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,eAAE,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;QACrE,OAAO,2BAAe,CAAC;IACzB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,2BAA2B,CAAC,MAAc;IACxD,MAAM,SAAS,GAAG,8BAAqB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/D,OAAO;QACL,KAAK,EAAE,IAAA,WAAI,EAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvC,SAAS,EAAE,IAAI,eAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE;QAC3C,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3C,UAAU,EAAE,IAAA,WAAI,EAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC3C,+BAA+B,EAAE,IAAI;KACtC,CAAC;AACJ,CAAC;AAVD,kEAUC"}
|
@@ -13,7 +13,8 @@ const SB_PRECISION = new bn_js_1.default(10).pow(SB_PRECISION_EXP.sub(constants_
|
|
13
13
|
function getSwitchboardOnDemandOraclePriceDataFromBuffer(buffer) {
|
14
14
|
const [pullFeedAccountData] = structs_1.pullFeedAccountDataStruct.deserialize(buffer);
|
15
15
|
return {
|
16
|
-
price:
|
16
|
+
price: new bn_js_1.default(pullFeedAccountData.result.value.toString()),
|
17
|
+
precision: SB_PRECISION,
|
17
18
|
slot: (0, toBN_1.toBN)(pullFeedAccountData.result.slot),
|
18
19
|
confidence: (0, toBN_1.toBN)(pullFeedAccountData.result.range).div(SB_PRECISION),
|
19
20
|
hasSufficientNumberOfDataPoints: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"switchboard_on_demand.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/switchboard_on_demand.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AAEvB,2CAAkD;AAClD,mDAAgD;AAChD,uDAAsE;AAEtE,MAAM,gBAAgB,GAAG,IAAI,eAAE,CAAC,EAAE,CAAC,CAAC;AACpC,MAAM,YAAY,GAAG,IAAI,eAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,+BAAmB,CAAC,CAAC,CAAC;AAE/E,SAAgB,+CAA+C,CAC7D,MAAc;IAEd,MAAM,CAAC,mBAAmB,CAAC,GAAG,mCAAyB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAE5E,OAAO;QACL,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"switchboard_on_demand.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/switchboard_on_demand.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AAEvB,2CAAkD;AAClD,mDAAgD;AAChD,uDAAsE;AAEtE,MAAM,gBAAgB,GAAG,IAAI,eAAE,CAAC,EAAE,CAAC,CAAC;AACpC,MAAM,YAAY,GAAG,IAAI,eAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,+BAAmB,CAAC,CAAC,CAAC;AAE/E,SAAgB,+CAA+C,CAC7D,MAAc;IAEd,MAAM,CAAC,mBAAmB,CAAC,GAAG,mCAAyB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAE5E,OAAO;QACL,KAAK,EAAE,IAAI,eAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC1D,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,IAAA,WAAI,EAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3C,UAAU,EAAE,IAAA,WAAI,EAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;QACpE,+BAA+B,EAAE,IAAI;KACtC,CAAC;AACJ,CAAC;AAZD,0GAYC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/types.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/types.ts"],"names":[],"mappings":";;;AAcA,MAAa,iBAAiB;;AAA9B,8CAGC;AAFiB,sBAAI,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AACpB,uBAAK,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAGxC,MAAa,aAAa;;AAA1B,sCAGC;AAFiB,iBAAG,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AAClB,oBAAM,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAK1C,SAAgB,SAAS,CAAC,MAAc,EAAE,IAAY;IACpD,iDAAiD;IACjD,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAHD,8BAGC"}
|
@@ -1,13 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
exports.platforms = [constants_1.platform];
|
11
|
-
exports.jobs = [marketsJob_1.default];
|
12
|
-
exports.fetchers = [depositsFetcher_1.default];
|
4
|
+
exports.platforms = [];
|
5
|
+
exports.jobs = [];
|
6
|
+
exports.fetchers = [];
|
13
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/index.ts"],"names":[],"mappings":";;;AAIa,QAAA,SAAS,GAAe,EAAE,CAAC;AAC3B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,EAAE,CAAC"}
|
@@ -10,13 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
13
14
|
const clients_1 = require("../../utils/clients");
|
14
|
-
const solana_1 = require("../../utils/solana");
|
15
15
|
const constants_1 = require("./constants");
|
16
16
|
const structs_1 = require("./structs");
|
17
17
|
const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
18
18
|
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
19
19
|
const arrayToMap_1 = require("../../utils/misc/arrayToMap");
|
20
|
+
const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
|
20
21
|
const marketsMemo = new MemoizedCache_1.MemoizedCache(constants_1.marketsCacheKey, {
|
21
22
|
prefix: constants_1.platformId,
|
22
23
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -25,23 +26,15 @@ const marketsMemo = new MemoizedCache_1.MemoizedCache(constants_1.marketsCacheKe
|
|
25
26
|
: new Map());
|
26
27
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
27
28
|
const client = (0, clients_1.getClientSolana)();
|
28
|
-
const accounts = yield
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
bytes: 'VEdzkJnDweW',
|
33
|
-
},
|
34
|
-
},
|
35
|
-
{
|
36
|
-
memcmp: {
|
37
|
-
offset: 8,
|
38
|
-
bytes: owner,
|
39
|
-
},
|
40
|
-
},
|
41
|
-
]);
|
29
|
+
const accounts = yield ParsedGpa_1.ParsedGpa.build(client, structs_1.obligationStruct, constants_1.programId)
|
30
|
+
.addFilter('accountDiscriminator', [168, 206, 141, 106, 88, 76, 172, 167])
|
31
|
+
.addFilter('owner', new web3_js_1.PublicKey(owner))
|
32
|
+
.run();
|
42
33
|
if (accounts.length === 0)
|
43
34
|
return [];
|
44
35
|
const markets = yield marketsMemo.getItem(cache);
|
36
|
+
if (!markets)
|
37
|
+
throw new Error('Markets not cached');
|
45
38
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
46
39
|
accounts.forEach((account) => {
|
47
40
|
const element = elementRegistry.addElementBorrowlend({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/iloop/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/iloop/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,iDAAsD;AAEtD,2CAAqE;AACrE,uCAA4D;AAC5D,kEAA+D;AAC/D,gFAA6E;AAC7E,4DAAyD;AACzD,kEAA+D;AAE/D,MAAM,WAAW,GAAG,IAAI,6BAAa,CAInC,2BAAe,EACf;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,OAAO,EAAE,EAAE,CACV,OAAO;IACL,CAAC,CAAC,IAAA,uBAAU,EACR,OAAO,CAAC,MAAM,CACZ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CACW,EACnC,QAAQ,CACT;IACH,CAAC,CAA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,gBAAgB,CAAC,iBAAiB;gBAClD,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE;iBACrE;aACF,CAAC,CAAC;QACL,CAAC;QAED,IAAI,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAC9B,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,CAC3C,CAAC;YACF,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,CAAC,gBAAgB,CAAC;oBACvB,OAAO,EAAE,YAAY,CAAC,YAAY;oBAClC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,eAAe;oBAC/C,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE;qBACpE;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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"}
|
@@ -26,7 +26,7 @@ export type BorrowPosition = {
|
|
26
26
|
};
|
27
27
|
export declare const borrowPositionStruct: BeetStruct<BorrowPosition, Partial<BorrowPosition>>;
|
28
28
|
export type Obligation = {
|
29
|
-
|
29
|
+
accountDiscriminator: number[];
|
30
30
|
owner: PublicKey;
|
31
31
|
lending_market: PublicKey;
|
32
32
|
tag: BigNumber;
|
@@ -23,7 +23,7 @@ exports.borrowPositionStruct = new beet_1.BeetStruct([
|
|
23
23
|
['updated_at', solana_1.i64],
|
24
24
|
], (args) => args);
|
25
25
|
exports.obligationStruct = new beet_1.BeetStruct([
|
26
|
-
['
|
26
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
27
27
|
['owner', beet_solana_1.publicKey],
|
28
28
|
['lending_market', beet_solana_1.publicKey],
|
29
29
|
['tag', solana_1.u64],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/iloop/structs.ts"],"names":[],"mappings":";;;AAEA,
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/iloop/structs.ts"],"names":[],"mappings":";;;AAEA,oDAImC;AACnC,kEAA6D;AAC7D,+CAAoD;AASvC,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,cAAc,EAAE,uBAAS,CAAC;IAC3B,CAAC,gBAAgB,EAAE,YAAG,CAAC;CACxB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC;AASW,QAAA,qBAAqB,GAAG,IAAI,iBAAU,CACjD;IACE,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,YAAY,EAAE,YAAG,CAAC;CACpB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAuB,CAClC,CAAC;AASW,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,4BAA4B,EAAE,YAAG,CAAC;IACnC,CAAC,YAAY,EAAE,YAAG,CAAC;CACpB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AAWW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,sBAAsB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,gBAAgB,EAAE,uBAAS,CAAC;IAC7B,CAAC,KAAK,EAAE,YAAG,CAAC;IACZ,CAAC,kBAAkB,EAAE,6BAAqB,CAAC;IAC3C,CAAC,iBAAiB,EAAE,4BAAoB,CAAC;CAC1C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC"}
|
@@ -43,19 +43,20 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
43
43
|
ref: account.pubkey,
|
44
44
|
link: `https://swap.kamino.finance/swap`,
|
45
45
|
});
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
46
|
+
if (account.status === order_1.Status.Active)
|
47
|
+
element.setTrade({
|
48
|
+
inputAsset: {
|
49
|
+
address: account.inputMint,
|
50
|
+
amount: account.remainingInputAmount,
|
51
|
+
},
|
52
|
+
outputAsset: {
|
53
|
+
address: account.outputMint,
|
54
|
+
amount: account.filledOutputAmount,
|
55
|
+
},
|
56
|
+
initialInputAmount: account.initialInputAmount,
|
57
|
+
expectedOutputAmount: account.expectedOutputAmount,
|
58
|
+
withdrawnOutputAmount: 0,
|
59
|
+
});
|
59
60
|
if (account.tipAmount.isPositive()) {
|
60
61
|
const tipElement = elementRegistry.addElementMultiple({
|
61
62
|
label: 'Rewards',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ordersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/ordersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAG5E,2CAA8D;AAC9D,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAC7E,
|
1
|
+
{"version":3,"file":"ordersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/ordersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAG5E,2CAA8D;AAC9D,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAC7E,2CAAsD;AAEtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAW,EACX,+BAAmB,EACnB;QACE;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC;gBACT,KAAK,EAAE,aAAa;aACrB;SACF;QACD;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,KAAK;aACb;SACF;QACD;YACE,QAAQ,EAAE,GAAG;SACd;KACF,CACF,CAAC;IACF,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,MAAM,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC;YAC9C,KAAK,EAAE,YAAY;YACnB,GAAG,EAAE,OAAO,CAAC,MAAM;YACnB,IAAI,EAAE,kCAAkC;SACzC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,KAAK,cAAM,CAAC,MAAM;YAClC,OAAO,CAAC,QAAQ,CAAC;gBACf,UAAU,EAAE;oBACV,OAAO,EAAE,OAAO,CAAC,SAAS;oBAC1B,MAAM,EAAE,OAAO,CAAC,oBAAoB;iBACrC;gBACD,WAAW,EAAE;oBACX,OAAO,EAAE,OAAO,CAAC,UAAU;oBAC3B,MAAM,EAAE,OAAO,CAAC,kBAAkB;iBACnC;gBACD,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;gBAC9C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;gBAClD,qBAAqB,EAAE,CAAC;aACzB,CAAC,CAAC;QAEL,IAAI,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,CAAC;YACnC,MAAM,UAAU,GAAG,eAAe,CAAC,kBAAkB,CAAC;gBACpD,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,WAAW;gBACjB,GAAG,EAAE,OAAO,CAAC,MAAM;gBACnB,IAAI,EAAE,kCAAkC;aACzC,CAAC,CAAC;YACH,UAAU,CAAC,QAAQ,CAAC;gBAClB,OAAO,EAAE,oCAAmB;gBAC5B,MAAM,EAAE,OAAO,CAAC,SAAS;aAC1B,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -4,6 +4,11 @@
|
|
4
4
|
import { PublicKey } from '@solana/web3.js';
|
5
5
|
import BigNumber from 'bignumber.js';
|
6
6
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
7
|
+
export declare enum Status {
|
8
|
+
Active = 0,
|
9
|
+
Filled = 1,
|
10
|
+
Canceled = 2
|
11
|
+
}
|
7
12
|
export type Order = {
|
8
13
|
buffer: Buffer;
|
9
14
|
globalConfig: PublicKey;
|
@@ -19,7 +24,7 @@ export type Order = {
|
|
19
24
|
tipAmount: BigNumber;
|
20
25
|
numberOfFills: BigNumber;
|
21
26
|
orderType: number;
|
22
|
-
status:
|
27
|
+
status: Status;
|
23
28
|
inVaultBump: number;
|
24
29
|
flashIxLock: number;
|
25
30
|
padding0: number[];
|
@@ -1,9 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.orderStruct = void 0;
|
3
|
+
exports.orderStruct = exports.Status = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../../utils/solana");
|
7
|
+
var Status;
|
8
|
+
(function (Status) {
|
9
|
+
Status[Status["Active"] = 0] = "Active";
|
10
|
+
Status[Status["Filled"] = 1] = "Filled";
|
11
|
+
Status[Status["Canceled"] = 2] = "Canceled";
|
12
|
+
})(Status || (exports.Status = Status = {}));
|
7
13
|
exports.orderStruct = new beet_1.BeetStruct([
|
8
14
|
['buffer', (0, solana_1.blob)(8)],
|
9
15
|
['globalConfig', beet_solana_1.publicKey],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/structs/order.ts"],"names":[],"mappings":";;;AAEA,oDAImC;AACnC,kEAA6D;AAC7D,kDAAkD;
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/structs/order.ts"],"names":[],"mappings":";;;AAEA,oDAImC;AACnC,kEAA6D;AAC7D,kDAAkD;AAElD,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,uCAAM,CAAA;IACN,uCAAM,CAAA;IACN,2CAAQ,CAAA;AACV,CAAC,EAJW,MAAM,sBAAN,MAAM,QAIjB;AA0BY,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,cAAc,EAAE,uBAAS,CAAC;IAC3B,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,oBAAoB,EAAE,uBAAS,CAAC;IACjC,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,qBAAqB,EAAE,uBAAS,CAAC;IAClC,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,sBAAsB,EAAE,YAAG,CAAC;IAC7B,CAAC,sBAAsB,EAAE,YAAG,CAAC;IAC7B,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,WAAW,EAAE,SAAE,CAAC;IACjB,CAAC,QAAQ,EAAE,SAAE,CAAC;IACd,CAAC,aAAa,EAAE,SAAE,CAAC;IACnB,CAAC,aAAa,EAAE,SAAE,CAAC;IACnB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC,sBAAsB,EAAE,YAAG,CAAC;IAC7B,CAAC,8BAA8B,EAAE,YAAG,CAAC;IACrC,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,EAAE,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAa,CACxB,CAAC"}
|
@@ -8,12 +8,12 @@ export declare const dynamicFieldPositionTypeCetus = "0x2::dynamic_field::Field<
|
|
8
8
|
export declare const dynamicFieldPositionTypeKriya = "0x2::dynamic_field::Field<vector<u8>, 0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1::position::Position>";
|
9
9
|
export declare const poolsV2PackageId = "0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66";
|
10
10
|
export declare const lpPositionTypeV2 = "0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66::spot_dex::KriyaLPToken";
|
11
|
-
export declare const poolsUrl = "https://
|
11
|
+
export declare const poolsUrl = "https://api-service-81678480858.asia-northeast1.run.app/pools/v2";
|
12
12
|
export declare const poolsV2InfoKey = "poolsV2Infos";
|
13
13
|
export declare const farmsPackageId = "0x88701243d0445aa38c0a13f02a9af49a58092dfadb93af9754edb41c52f40085";
|
14
|
-
export declare const poolsStats = "https://
|
14
|
+
export declare const poolsStats = "https://api-service-81678480858.asia-northeast1.run.app/pools/v3";
|
15
15
|
export declare const clmmPoolPackageId = "0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1";
|
16
16
|
export declare const clmmType = "0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1::position::Position";
|
17
17
|
export declare const poolsV3StatsInfoKey = "poolsV3StatsInfos";
|
18
18
|
export declare const leverageLendingVaultsInfoKey = "leverageLendingVaultsInfos";
|
19
|
-
export declare const leverageLendingVaultsUrl = "https://
|
19
|
+
export declare const leverageLendingVaultsUrl = "https://api-service-81678480858.asia-northeast1.run.app/vaults/";
|
@@ -20,15 +20,15 @@ exports.dynamicFieldPositionTypeKriya = '0x2::dynamic_field::Field<vector<u8>, 0
|
|
20
20
|
exports.poolsV2PackageId = '0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66';
|
21
21
|
exports.lpPositionTypeV2 = `${exports.poolsV2PackageId}::spot_dex::KriyaLPToken`;
|
22
22
|
// liquidity / LP Pools/Farms v2
|
23
|
-
exports.poolsUrl = 'https://
|
23
|
+
exports.poolsUrl = 'https://api-service-81678480858.asia-northeast1.run.app/pools/v2';
|
24
24
|
exports.poolsV2InfoKey = 'poolsV2Infos';
|
25
25
|
exports.farmsPackageId = '0x88701243d0445aa38c0a13f02a9af49a58092dfadb93af9754edb41c52f40085';
|
26
26
|
// liquidity / lp Pools v3
|
27
|
-
exports.poolsStats = 'https://
|
27
|
+
exports.poolsStats = 'https://api-service-81678480858.asia-northeast1.run.app/pools/v3';
|
28
28
|
exports.clmmPoolPackageId = '0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1';
|
29
29
|
exports.clmmType = `${exports.clmmPoolPackageId}::position::Position`;
|
30
30
|
exports.poolsV3StatsInfoKey = 'poolsV3StatsInfos';
|
31
31
|
// strategies / leverage lending
|
32
32
|
exports.leverageLendingVaultsInfoKey = 'leverageLendingVaultsInfos';
|
33
|
-
exports.leverageLendingVaultsUrl = 'https://
|
33
|
+
exports.leverageLendingVaultsUrl = 'https://api-service-81678480858.asia-northeast1.run.app/vaults/';
|
34
34
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,iBAAiB,EAAE,sCAAsC;IACtE,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEF,8BAA8B;AACjB,QAAA,wBAAwB,GACnC,iEAAiE,CAAC;AACvD,QAAA,4BAA4B,GAAG,4BAA4B,CAAC;AAC5D,QAAA,iCAAiC,GAC5C,wFAAwF,CAAC;AAC9E,QAAA,6BAA6B,GACxC,+HAA+H,CAAC;AACrH,QAAA,6BAA6B,GACxC,+HAA+H,CAAC;AAElI,0BAA0B;AACb,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAAG,GAAG,wBAAgB,0BAA0B,CAAC;AAE9E,gCAAgC;AACnB,QAAA,QAAQ,GACnB,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,iBAAiB,EAAE,sCAAsC;IACtE,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEF,8BAA8B;AACjB,QAAA,wBAAwB,GACnC,iEAAiE,CAAC;AACvD,QAAA,4BAA4B,GAAG,4BAA4B,CAAC;AAC5D,QAAA,iCAAiC,GAC5C,wFAAwF,CAAC;AAC9E,QAAA,6BAA6B,GACxC,+HAA+H,CAAC;AACrH,QAAA,6BAA6B,GACxC,+HAA+H,CAAC;AAElI,0BAA0B;AACb,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAAG,GAAG,wBAAgB,0BAA0B,CAAC;AAE9E,gCAAgC;AACnB,QAAA,QAAQ,GACnB,kEAAkE,CAAC;AACxD,QAAA,cAAc,GAAG,cAAc,CAAC;AAChC,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAEvE,0BAA0B;AACb,QAAA,UAAU,GACrB,kEAAkE,CAAC;AACxD,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAC1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AACtD,QAAA,mBAAmB,GAAG,mBAAmB,CAAC;AAEvD,gCAAgC;AACnB,QAAA,4BAA4B,GAAG,4BAA4B,CAAC;AAC5D,QAAA,wBAAwB,GACnC,iEAAiE,CAAC"}
|