@sonarwatch/portfolio-plugins 0.14.119 → 0.14.120
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 +4 -0
- package/package.json +1 -1
- package/src/Job.d.ts +2 -1
- package/src/plugins/stargate/getPoolsJob.d.ts +3 -0
- package/src/plugins/stargate/{poolsJob.js → getPoolsJob.js} +14 -12
- package/src/plugins/stargate/getPoolsJob.js.map +1 -0
- package/src/plugins/stargate/index.js +5 -2
- package/src/plugins/stargate/index.js.map +1 -1
- package/src/plugins/yearn/getVaultsJob.js +1 -1
- package/src/plugins/yearn/getVaultsJob.js.map +1 -1
- package/src/plugins/stargate/poolsJob.d.ts +0 -3
- package/src/plugins/stargate/poolsJob.js.map +0 -1
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.14.120](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.119...plugins-0.14.120) (2025-02-21)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.14.119](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.118...plugins-0.14.119) (2025-02-21)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
package/src/Job.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
+
import { NetworkIdType } from '@sonarwatch/portfolio-core';
|
1
2
|
import { Cache } from './Cache';
|
2
3
|
export type JobExecutor = (cache: Cache) => Promise<void>;
|
3
|
-
export type JobLabel = 'normal' | 'coingecko' | 'realtime' | 'evm' |
|
4
|
+
export type JobLabel = 'normal' | 'coingecko' | 'realtime' | 'evm' | NetworkIdType;
|
4
5
|
export type Job = {
|
5
6
|
id: string;
|
6
7
|
executor: JobExecutor;
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.getPoolsJob = void 0;
|
12
13
|
const viem_1 = require("viem");
|
13
14
|
const clients_1 = require("../../utils/clients");
|
14
15
|
const constants_1 = require("./constants");
|
15
16
|
const abis_1 = require("./abis");
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
function getPoolsJob(config) {
|
18
|
+
const { poolsContract: address, networkId } = config;
|
19
|
+
const executor = (cache) => __awaiter(this, void 0, void 0, function* () {
|
19
20
|
const client = (0, clients_1.getEvmClient)(networkId);
|
20
21
|
const contract = {
|
21
22
|
address,
|
@@ -95,12 +96,13 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
95
96
|
prefix: constants_1.platformId,
|
96
97
|
networkId,
|
97
98
|
});
|
98
|
-
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
99
|
+
});
|
100
|
+
const job = {
|
101
|
+
id: `${constants_1.platformId}-${networkId}-pools`,
|
102
|
+
executor,
|
103
|
+
labels: ['normal', 'evm', networkId],
|
104
|
+
};
|
105
|
+
return job;
|
106
|
+
}
|
107
|
+
exports.getPoolsJob = getPoolsJob;
|
108
|
+
//# sourceMappingURL=getPoolsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getPoolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/getPoolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAmC;AAGnC,iDAAmD;AACnD,2CAAmD;AACnD,iCAA+E;AAG/E,SAAgB,WAAW,CAAC,MAAiB;IAC3C,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAErD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;QACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,SAAS,CAAC,CAAC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CAAC,YAAY,CAAC;gBAC9B,EAAE,EAAE,sBAAU;gBACd,SAAS;gBACT,UAAU,EAAV,sBAAU;gBACV,KAAK;gBACL,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,MAAM,EAAE,CAAC;gBACT,WAAW,EAAE;oBACX;wBACE,OAAO,EAAE,UAAU,CAAC,OAAO;wBAC3B,WAAW,EAAE,CAAC;wBACd,QAAQ,EAAE,UAAU,CAAC,QAAQ;wBAC7B,SAAS;wBACT,KAAK,EAAE,UAAU,CAAC,KAAK;qBACxB;iBACF;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,cAAc,EAAE;YAC5C,MAAM,EAAE,sBAAU;YAClB,SAAS;SACV,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;IAEF,MAAM,GAAG,GAAQ;QACf,EAAE,EAAE,GAAG,sBAAU,IAAI,SAAS,QAAQ;QACtC,QAAQ;QACR,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC;KACrC,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC;AA5GD,kCA4GC"}
|
@@ -5,12 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.platforms = exports.fetchers = exports.jobs = void 0;
|
7
7
|
const gePoolPositionsFetcher_1 = require("./gePoolPositionsFetcher");
|
8
|
-
const
|
8
|
+
const getPoolsJob_1 = require("./getPoolsJob");
|
9
9
|
const farmsJob_1 = __importDefault(require("./farmsJob"));
|
10
10
|
const constants_1 = require("./constants");
|
11
11
|
const getFarmPositionsFetcher_1 = require("./getFarmPositionsFetcher");
|
12
12
|
const getVoteTokensFetcher_1 = require("./getVoteTokensFetcher");
|
13
|
-
exports.jobs = [
|
13
|
+
exports.jobs = [
|
14
|
+
...constants_1.stargateNetworksConfigs.map((config) => (0, getPoolsJob_1.getPoolsJob)(config)),
|
15
|
+
farmsJob_1.default,
|
16
|
+
];
|
14
17
|
exports.fetchers = [
|
15
18
|
...constants_1.stargateNetworksConfigs
|
16
19
|
.map((config) => [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/index.ts"],"names":[],"mappings":";;;;;;AAGA,qEAAoE;AACpE
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/index.ts"],"names":[],"mappings":";;;;;;AAGA,qEAAoE;AACpE,+CAA4C;AAC5C,0DAAkC;AAClC,2CAAgE;AAChE,uEAAqE;AACrE,iEAA8D;AAEjD,QAAA,IAAI,GAAU;IACzB,GAAG,mCAAuB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,MAAM,CAAC,CAAC;IAC/D,kBAAQ;CACT,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,GAAG,mCAAuB;SACvB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACf,IAAA,iDAAwB,EAAC,MAAM,CAAC;QAChC,IAAA,kDAAwB,EAAC,MAAM,CAAC;QAChC,IAAA,2CAAoB,EAAC,MAAM,CAAC;KAC7B,CAAC;SACD,IAAI,EAAE;CACV,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getVaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/yearn/getVaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAwE;AAGxE,2CAAwC;AACxC,uCAAsC;AAEtC,SAAwB,YAAY,CAClC,SAA2B,EAC3B,UAAkB;IAElB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;QACnD,MAAM,MAAM,GAAG,CACb,MAAM,IAAA,mBAAS,EAAC;YAC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