@sonarwatch/portfolio-plugins 0.14.78 → 0.14.80
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 +9 -1
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/debridge/airdropFetcher.d.ts +6 -3
- package/src/plugins/debridge/airdropFetcher.js +59 -71
- package/src/plugins/debridge/airdropFetcher.js.map +1 -1
- package/src/plugins/debridge/constants.d.ts +1 -2
- package/src/plugins/debridge/constants.js +3 -10
- package/src/plugins/debridge/constants.js.map +1 -1
- package/src/plugins/debridge/distributions.json +1 -0
- package/src/plugins/debridge/index.js +9 -3
- package/src/plugins/debridge/index.js.map +1 -1
- package/src/plugins/fragmetric/constants.d.ts +9 -0
- package/src/plugins/fragmetric/constants.js +17 -0
- package/src/plugins/fragmetric/constants.js.map +1 -0
- package/src/plugins/fragmetric/index.d.ts +6 -0
- package/src/plugins/fragmetric/index.js +12 -0
- package/src/plugins/fragmetric/index.js.map +1 -0
- package/src/plugins/fragmetric/pricingJob.d.ts +3 -0
- package/src/plugins/fragmetric/pricingJob.js +112 -0
- package/src/plugins/fragmetric/pricingJob.js.map +1 -0
- package/src/plugins/fragmetric/structs.d.ts +23 -0
- package/src/plugins/fragmetric/structs.js +23 -0
- package/src/plugins/fragmetric/structs.js.map +1 -0
- package/src/plugins/fragmetric/types.d.ts +5 -0
- package/src/plugins/fragmetric/types.js +3 -0
- package/src/plugins/fragmetric/types.js.map +1 -0
- package/src/plugins/jito/constants.d.ts +9 -0
- package/src/plugins/jito/constants.js +26 -1
- package/src/plugins/jito/constants.js.map +1 -1
- package/src/plugins/jito/index.js +5 -3
- package/src/plugins/jito/index.js.map +1 -1
- package/src/plugins/jito/structs.d.ts +58 -0
- package/src/plugins/jito/structs.js +56 -1
- package/src/plugins/jito/structs.js.map +1 -1
- package/src/plugins/jito/ticketFetcher.d.ts +3 -0
- package/src/plugins/jito/ticketFetcher.js +64 -0
- package/src/plugins/jito/ticketFetcher.js.map +1 -0
- package/src/plugins/jito/types.d.ts +5 -0
- package/src/plugins/jito/vaultsJob.d.ts +3 -0
- package/src/plugins/jito/vaultsJob.js +40 -0
- package/src/plugins/jito/vaultsJob.js.map +1 -0
- package/src/plugins/zeta/airdropFetcher.js +14 -14
@@ -0,0 +1,40 @@
|
|
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 clients_1 = require("../../utils/clients");
|
14
|
+
const constants_1 = require("./constants");
|
15
|
+
const structs_1 = require("./structs");
|
16
|
+
const filters_1 = require("../../utils/solana/filters");
|
17
|
+
const solana_1 = require("../../utils/solana");
|
18
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
+
const client = (0, clients_1.getClientSolana)();
|
20
|
+
const vaultsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, constants_1.restakingPid, (0, filters_1.dataSizeFilter)(structs_1.vaultStruct.byteSize));
|
21
|
+
const vaultInfo = vaultsAccounts.map((acc) => {
|
22
|
+
const vaultPlatformId = constants_1.platformIdByVault.get(acc.pubkey.toString());
|
23
|
+
return {
|
24
|
+
pubkey: acc.pubkey.toString(),
|
25
|
+
vrtMint: acc.vrtMint.toString(),
|
26
|
+
platformId: vaultPlatformId,
|
27
|
+
};
|
28
|
+
});
|
29
|
+
yield cache.setItem(constants_1.restakingVaultsKey, vaultInfo, {
|
30
|
+
prefix: constants_1.platformId,
|
31
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
32
|
+
});
|
33
|
+
});
|
34
|
+
const job = {
|
35
|
+
id: `${constants_1.platformId}-vaults`,
|
36
|
+
executor,
|
37
|
+
label: 'normal',
|
38
|
+
};
|
39
|
+
exports.default = job;
|
40
|
+
//# sourceMappingURL=vaultsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,iDAAsD;AACtD,2CAKqB;AACrB,uCAAwC;AACxC,wDAA4D;AAE5D,+CAA8D;AAI9D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,MAAM,EACN,qBAAW,EACX,wBAAY,EACZ,IAAA,wBAAc,EAAC,qBAAW,CAAC,QAAQ,CAAC,CACrC,CAAC;IAEF,MAAM,SAAS,GAAyB,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACjE,MAAM,eAAe,GAAG,6BAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QAErE,OAAO;YACL,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC7B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE;YAC/B,UAAU,EAAE,eAAe;SAC5B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,OAAO,CAAC,8BAAkB,EAAE,SAAS,EAAE;QACjD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -40,20 +40,20 @@ const clients_1 = require("../../utils/clients");
|
|
40
40
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
41
41
|
const helpers_1 = require("./helpers");
|
42
42
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
45
|
-
getAirdropFinalFrontend(authority: $authority) {
|
46
|
-
authority
|
47
|
-
community_allocation
|
48
|
-
eligibility
|
49
|
-
main_allocation
|
50
|
-
og_allocation
|
51
|
-
s1_allocation
|
52
|
-
s2_allocation
|
53
|
-
total_allocation
|
54
|
-
__typename
|
55
|
-
}
|
56
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
45
|
+
getAirdropFinalFrontend(authority: $authority) {
|
46
|
+
authority
|
47
|
+
community_allocation
|
48
|
+
eligibility
|
49
|
+
main_allocation
|
50
|
+
og_allocation
|
51
|
+
s1_allocation
|
52
|
+
s2_allocation
|
53
|
+
total_allocation
|
54
|
+
__typename
|
55
|
+
}
|
56
|
+
}
|
57
57
|
`;
|
58
58
|
const networkId = portfolio_core_1.NetworkId.solana;
|
59
59
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|