@sonarwatch/portfolio-plugins 0.14.162 → 0.14.164
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 +13 -0
- package/package.json +1 -1
- package/src/plugins/divvy/housePoolFetcher.js +0 -1
- package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
- package/src/plugins/jupiter/constants.d.ts +8 -0
- package/src/plugins/jupiter/constants.js +10 -0
- package/src/plugins/jupiter/constants.js.map +1 -0
- package/src/plugins/jupiter/exchange/dcaFetcher.js +7 -1
- package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js +11 -4
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
- package/src/plugins/jupiter/governance/asrAirdropFetcher.js +2 -1
- package/src/plugins/jupiter/governance/asrAirdropFetcher.js.map +1 -1
- package/src/plugins/jupiter/governance/constants.js +9 -9
- package/src/plugins/jupiter/governance/constants.js.map +1 -1
- package/src/plugins/jupiter/governance/voteFetcher.js +7 -7
- package/src/plugins/jupiter/governance/voteFetcher.js.map +1 -1
- package/src/plugins/jupiter/helpers.js +3 -2
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/launchpad/constants.d.ts +0 -8
- package/src/plugins/jupiter/launchpad/constants.js +8 -13
- package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +2 -2
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +0 -3
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/lifinity/lockerFetcher.js +2 -8
- package/src/plugins/lifinity/lockerFetcher.js.map +1 -1
- package/src/plugins/sanctum/s1AirdropFetcher.js +16 -15
- package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.14.164](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.163...plugins-0.14.164) (2025-03-31)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* **jupiter:** move jupMint and jupDecimals constants ([99b5c04](https://github.com/sonarwatch/portfolio/commit/99b5c04d38b30f59ca0f2978d3e1111107d29f50))
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [0.14.163](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.162...plugins-0.14.163) (2025-03-28)
|
15
|
+
|
16
|
+
|
17
|
+
|
5
18
|
## [0.14.162](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.161...plugins-0.14.162) (2025-03-27)
|
6
19
|
|
7
20
|
|
package/package.json
CHANGED
@@ -27,7 +27,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
27
27
|
const accounts = yield ParsedGpa_1.ParsedGpa.build(connection, structs_1.positionStruct, constants_1.divvyProgram)
|
28
28
|
.addFilter('accountDiscriminator', [170, 188, 143, 228, 122, 64, 247, 208])
|
29
29
|
.addFilter('user', new web3_js_1.PublicKey(owner))
|
30
|
-
.debug()
|
31
30
|
.run();
|
32
31
|
if (accounts.length === 0)
|
33
32
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"housePoolFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/divvy/housePoolFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAsE;AAEtE,iDAAsD;AAEtD,kEAA+D;AAC/D,4DAAyD;AACzD,gFAA6E;AAC7E,uCAAkD;AAClD,kEAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,6BAAa,CAIlC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,CACzC,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,qBAAS,CAAC,KAAK,CACpC,UAAU,EACV,wBAAc,EACd,wBAAY,CACb;SACE,SAAS,CAAC,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;SAC1E,SAAS,CAAC,MAAM,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;SACvC,
|
1
|
+
{"version":3,"file":"housePoolFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/divvy/housePoolFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAsE;AAEtE,iDAAsD;AAEtD,kEAA+D;AAC/D,4DAAyD;AACzD,gFAA6E;AAC7E,uCAAkD;AAClD,kEAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,6BAAa,CAIlC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,CACzC,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,qBAAS,CAAC,KAAK,CACpC,UAAU,EACV,wBAAc,EACd,wBAAY,CACb;SACE,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,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
|
2
|
+
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
export declare const jupApiParams: string | undefined;
|
5
|
+
export declare const voteProgramId: PublicKey;
|
6
|
+
export declare const lockerPubkey: PublicKey;
|
7
|
+
export declare const jupMint = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
|
8
|
+
export declare const jupDecimals = 6;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.jupApiParams = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.jupApiParams = process.env['PORTFOLIO_JUP_API_PARAM'];
|
6
|
+
exports.voteProgramId = new web3_js_1.PublicKey('voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj');
|
7
|
+
exports.lockerPubkey = new web3_js_1.PublicKey('CVMdMd79no569tjc5Sq7kzz8isbfCcFyBS5TLGsrZ5dN');
|
8
|
+
exports.jupMint = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN';
|
9
|
+
exports.jupDecimals = 6;
|
10
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAEtD,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC"}
|
@@ -21,6 +21,7 @@ const filters_1 = require("./filters");
|
|
21
21
|
const getCachedDecimalsForToken_1 = require("../../../utils/misc/getCachedDecimalsForToken");
|
22
22
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../../utils/misc/tokenPriceToAssetToken"));
|
23
23
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
+
var _a;
|
24
25
|
const client = (0, clients_1.getClientSolana)({ commitment: 'processed' });
|
25
26
|
const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.dcaStruct, constants_1.dcaProgramId, (0, filters_1.DCAFilters)(owner));
|
26
27
|
if (accounts.length === 0)
|
@@ -31,10 +32,15 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
31
32
|
account.outputMint.toString(),
|
32
33
|
])
|
33
34
|
.flat();
|
34
|
-
const pricesMap = yield
|
35
|
+
const [pricesMap, tokenAccounts] = yield Promise.all([
|
36
|
+
cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana),
|
37
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, accounts.map((account) => account.inAccount)),
|
38
|
+
]);
|
35
39
|
const elements = [];
|
36
40
|
for (let i = 0; i < accounts.length; i++) {
|
37
41
|
const account = accounts[i];
|
42
|
+
if ((_a = tokenAccounts[i]) === null || _a === void 0 ? void 0 : _a.amount.isZero())
|
43
|
+
continue;
|
38
44
|
const inputMint = account.inputMint.toString();
|
39
45
|
const inputTokenPrice = pricesMap.get(inputMint);
|
40
46
|
const outputMint = account.outputMint.toString();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,oDAAyD;AACzD,
|
1
|
+
{"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,oDAAyD;AACzD,kDAI+B;AAC/B,2CAAuD;AACvD,uCAAsC;AACtC,uCAAuC;AACvC,6FAA0F;AAC1F,wGAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;IAE5D,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAS,EACT,wBAAY,EACZ,IAAA,oBAAU,EAAC,KAAK,CAAC,CAClB,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,KAAK,GAAG,QAAQ;SACnB,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QAChB,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;QAC5B,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,IAAI,EAAE,CAAC;IACV,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC;QAC9D,IAAA,sCAA6B,EAC3B,MAAM,EACN,2BAAkB,EAClB,QAAQ,CAAC,GA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AAI;gBAC5C,IAAI,EAAE,2BAA2B;gBACjC,QAAQ,EAAE,wBAAY,CAAC,QAAQ,EAAE;gBACjC,kBAAkB;gBAClB,qBAAqB,EAAE,OAAO,CAAC,YAAY;qBACxC,GAAG,CAAC,SAAA,EAAE,EAAI,cAAc,CAAA,CAAC;qBACzB,QAAQ,EAAE;gBACb,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,IAAI;aAC/C;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KAAI,CAAC,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACzE,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,MAAM;IACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -24,11 +24,18 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
24
24
|
const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.valueAverageStruct, constants_1.valueAverageProgramId, (0, filters_1.valueAverageFilters)(owner));
|
25
25
|
if (accounts.length === 0)
|
26
26
|
return [];
|
27
|
-
const tokenPrices = yield
|
28
|
-
.
|
29
|
-
|
27
|
+
const [tokenPrices, inputTokenAccounts, outputTokenAccounts] = yield Promise.all([
|
28
|
+
cache.getTokenPricesAsMap(accounts
|
29
|
+
.map((a) => [a.inputMint.toString(), a.outputMint.toString()])
|
30
|
+
.flat(), portfolio_core_1.NetworkId.solana),
|
31
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, accounts.map((a) => a.inputVault)),
|
32
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, accounts.map((a) => a.outputVault)),
|
33
|
+
]);
|
30
34
|
const elements = [];
|
31
|
-
for (
|
35
|
+
for (let i = 0; i < accounts.length; i++) {
|
36
|
+
const account = accounts[i];
|
37
|
+
if (!inputTokenAccounts[i] || !outputTokenAccounts[i])
|
38
|
+
continue;
|
32
39
|
const inputAddress = account.inputMint.toString();
|
33
40
|
const outputAddress = account.outputMint.toString();
|
34
41
|
const inputTokenPrice = tokenPrices.get(inputAddress);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,
|
1
|
+
{"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAI+B;AAC/B,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,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,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,CAAC,WAAW,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,GAC1D,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,KAAK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I,CAAC,CAAC,QAAQ,EAAE;gBACnD,qBAAqB,EAAE,OAAO,CAAC,YAAY;qBACxC,GAAG,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;qBACpC,QAAQ,EAAE;gBACb,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC9B,QAAQ,EAAE,iCAAqB,CAAC,QAAQ,EAAE;gBAC1C,IAAI,EAAE,2BAA2B;aAClC;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACnE,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -21,6 +21,7 @@ const getMultipleAccountsInfoSafe_1 = require("../../../utils/solana/getMultiple
|
|
21
21
|
const clients_1 = require("../../../utils/clients");
|
22
22
|
const constants_2 = require("../launchpad/constants");
|
23
23
|
const deriveClaimStatus_1 = require("../../../utils/solana/jupiter/deriveClaimStatus");
|
24
|
+
const constants_3 = require("../constants");
|
24
25
|
function getInegibleItems(items) {
|
25
26
|
return Array.from(items).map(([address, { label }]) => ({
|
26
27
|
amount: 0,
|
@@ -30,7 +31,7 @@ function getInegibleItems(items) {
|
|
30
31
|
}));
|
31
32
|
}
|
32
33
|
function asrDeriveClaimStatus(claimant, claimProof) {
|
33
|
-
if (claimProof.mint ===
|
34
|
+
if (claimProof.mint === constants_3.jupMint) {
|
34
35
|
return (0, deriveClaimStatus_1.deriveClaimStatus)(claimant, claimProof.merkle_tree, constants_1.jupDisProgram);
|
35
36
|
}
|
36
37
|
return (0, deriveClaimStatus_1.deriveClaimStatus)(claimant, claimProof.merkle_tree, constants_2.lfgDisProgram);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"asrAirdropFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/asrAirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,2CAAiE;AACjE,4DAAgF;AAEhF,mGAAgG;AAChG,oDAAyD;AACzD,
|
1
|
+
{"version":3,"file":"asrAirdropFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/asrAirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,2CAAiE;AACjE,4DAAgF;AAEhF,mGAAgG;AAChG,oDAAyD;AACzD,sDAAuD;AACvD,uFAAoF;AACpF,4CAAuC;AAEvC,SAAS,gBAAgB,CAAC,KAAe;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACtD,MAAM,EAAE,CAAC;QACT,KAAK;QACL,OAAO;QACP,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAgB,EAAE,UAAsB;IACpE,IAAI,UAAU,CAAC,IAAI,KAAK,mBAAO,EAAE,CAAC;QAChC,OAAO,IAAA,qCAAiB,EAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,EAAE,yBAAa,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,IAAA,qCAAiB,EAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,EAAE,yBAAa,CAAC,CAAC;AAC5E,CAAC;AAED,SAAgB,qBAAqB,C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,CAAC,OAAO;oBAAE,OAAO,EAAE,CAAC;gBACxB,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;gBACpC,OAAO;oBACL;wBACE,MAAM,EAAE,IAAI,sBAAS,CAAC,aAAa,CAAC,MAAM,CAAC;6BACxC,GAAG,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAA,CAAC;6BACnB,QAAQ,EAAE;wBACb,SAAS,EAAE,CAAC,CAAC,QAAQ;wBACrB,KAAK;wBACL,OAAO,EAAE,aAAa,CAAC,IAAI;qBAC5B;iBACF,CAAC;YACJ,CAAC,CAAC;iBACD,IAAI,EAAE;SACV,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AApDD,sDAoDC"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.asr3Config = exports.asr2Config = exports.asr1Config = exports.jupuaryStatics = exports.asr3Statics = exports.asr2Statics = exports.asr1Statics = exports.jupDisProgram = exports.platformId = void 0;
|
4
|
-
const constants_1 = require("
|
5
|
-
const constants_2 = require("
|
4
|
+
const constants_1 = require("../../debridge/constants");
|
5
|
+
const constants_2 = require("../constants");
|
6
6
|
exports.platformId = 'jupiter-governance';
|
7
7
|
const platformImage = 'https://sonar.watch/img/platforms/jupiterdao.webp';
|
8
8
|
const platformWebsite = 'https://vote.jup.ag/';
|
@@ -48,7 +48,7 @@ exports.jupuaryStatics = {
|
|
48
48
|
exports.asr1Config = {
|
49
49
|
statics: exports.asr1Statics,
|
50
50
|
items: new Map([
|
51
|
-
[
|
51
|
+
[constants_2.jupMint, { label: 'JUP', decimals: 6 }],
|
52
52
|
[
|
53
53
|
'ZEUS1aR7aX8DFFJf5QjWj2ftDDdNTroMNGo8YoQm3Gq',
|
54
54
|
{ label: 'ZEUS', decimals: 6 },
|
@@ -66,25 +66,25 @@ exports.asr1Config = {
|
|
66
66
|
{ label: 'SHARK', decimals: 6 },
|
67
67
|
],
|
68
68
|
]),
|
69
|
-
api: (owner) => `https://worker.jup.ag/jup-asr-july-2024-claim-proof/${owner}?${
|
69
|
+
api: (owner) => `https://worker.jup.ag/jup-asr-july-2024-claim-proof/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
70
70
|
};
|
71
71
|
exports.asr2Config = {
|
72
72
|
statics: exports.asr2Statics,
|
73
73
|
items: new Map([
|
74
|
-
[
|
74
|
+
[constants_2.jupMint, { label: 'JUP', decimals: 6 }],
|
75
75
|
[
|
76
76
|
'CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu',
|
77
77
|
{ label: 'CLOUD', decimals: 9 },
|
78
78
|
],
|
79
79
|
]),
|
80
|
-
api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=oct-2024&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CCLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu&${
|
80
|
+
api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=oct-2024&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CCLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu&${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
81
81
|
};
|
82
82
|
exports.asr3Config = {
|
83
83
|
statics: exports.asr3Statics,
|
84
84
|
items: new Map([
|
85
|
-
[
|
86
|
-
[
|
85
|
+
[constants_2.jupMint, { label: 'JUP', decimals: constants_2.jupDecimals }],
|
86
|
+
[constants_1.dbrMint, { label: 'DBR', decimals: constants_1.dbrDecimals }],
|
87
87
|
]),
|
88
|
-
api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=jan-2025&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CDBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5&${
|
88
|
+
api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=jan-2025&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CDBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5&${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
89
89
|
};
|
90
90
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/constants.ts"],"names":[],"mappings":";;;AACA,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/constants.ts"],"names":[],"mappings":";;;AACA,wDAAgE;AAChE,4CAAkE;AAErD,QAAA,UAAU,GAAG,oBAAoB,CAAC;AAC/C,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAC1E,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAElC,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAE/D,QAAA,WAAW,GAAmB;IACzC,EAAE,EAAE,GAAG,kBAAU,YAAY;IAC7B,SAAS,EAAE,yBAAyB;IACpC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,IAAI,EAAE,QAAQ;CACf,CAAC;AACW,QAAA,WAAW,GAAmB;IACzC,EAAE,EAAE,GAAG,kBAAU,YAAY;IAC7B,SAAS,EAAE,yBAAyB;IACpC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa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AAC;QACb,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QACxC;YACE,8CAA8C;YAC9C,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE;SAChC;KACF,CAAC;IACF,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CACrB,yCAAyC,KAAK,0HAC5C,wBAAY,aAAZ,wBAAY,cAAZ,wBAAY,GAAI,EAClB,EAAE;CACL,CAAC;AAEW,QAAA,UAAU,GAAc;IACnC,OAAO,EAAE,mBAAW;IACpB,KAAK,EAAE,IAAI,GAAG,CAAC;QACb,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,uBAAW,EAAE,CAAC;QAClD,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,uBAAW,EAAE,CAAC;KACnD,CAAC;IACF,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CACrB,yCAAyC,KAAK,0HAC5C,wBAAY,aAAZ,wBAAY,cAAZ,wBAAY,GAAI,EAClB,EAAE;CACL,CAAC"}
|
@@ -14,25 +14,25 @@ const clients_1 = require("../../../utils/clients");
|
|
14
14
|
const getParsedAccountInfo_1 = require("../../../utils/solana/getParsedAccountInfo");
|
15
15
|
const helpers_1 = require("../helpers");
|
16
16
|
const structs_1 = require("../launchpad/structs");
|
17
|
-
const constants_1 = require("
|
18
|
-
const constants_2 = require("./constants");
|
17
|
+
const constants_1 = require("./constants");
|
19
18
|
const solana_1 = require("../../../utils/solana");
|
20
19
|
const filters_1 = require("../filters");
|
21
20
|
const ElementRegistry_1 = require("../../../utils/elementbuilder/ElementRegistry");
|
21
|
+
const constants_2 = require("../constants");
|
22
22
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
23
|
const client = (0, clients_1.getClientSolana)();
|
24
24
|
const escrowPubkey = (0, helpers_1.getVotePda)(owner);
|
25
25
|
const escrowAccount = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, structs_1.escrowStruct, escrowPubkey);
|
26
26
|
if (!escrowAccount)
|
27
27
|
return [];
|
28
|
-
const partialUnstakingAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.partialUnstakeStruct,
|
29
|
-
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana,
|
28
|
+
const partialUnstakingAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.partialUnstakeStruct, constants_2.voteProgramId, (0, filters_1.partialUnstakeFilter)(escrowAccount.pubkey.toString()));
|
29
|
+
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
30
30
|
const element = registry.addElementMultiple({
|
31
31
|
label: 'Staked',
|
32
32
|
link: 'https://vote.jup.ag',
|
33
33
|
});
|
34
34
|
element.addAsset({
|
35
|
-
address:
|
35
|
+
address: constants_2.jupMint,
|
36
36
|
amount: escrowAccount.amount,
|
37
37
|
attributes: {
|
38
38
|
lockedUntil: escrowAccount.escrowStartedAt.isZero()
|
@@ -43,7 +43,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
43
43
|
});
|
44
44
|
partialUnstakingAccounts.forEach((account) => {
|
45
45
|
element.addAsset({
|
46
|
-
address:
|
46
|
+
address: constants_2.jupMint,
|
47
47
|
amount: account.amount,
|
48
48
|
attributes: { lockedUntil: account.expiration.times(1000).toNumber() },
|
49
49
|
ref: account.pubkey.toString(),
|
@@ -52,7 +52,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
52
52
|
return registry.getElements(cache);
|
53
53
|
});
|
54
54
|
const fetcher = {
|
55
|
-
id: `${
|
55
|
+
id: `${constants_1.platformId}-vote`,
|
56
56
|
networkId: portfolio_core_1.NetworkId.solana,
|
57
57
|
executor,
|
58
58
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"voteFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/voteFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,qFAAkF;AAClF,wCAAwC;AACxC,kDAA0E;AAC1E,
|
1
|
+
{"version":3,"file":"voteFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/voteFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,qFAAkF;AAClF,wCAAwC;AACxC,kDAA0E;AAC1E,2CAAyC;AACzC,kDAAiE;AACjE,wCAAkD;AAClD,mFAAgF;AAChF,4CAAsD;AAEtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,IAAA,oBAAU,EAAC,KAAK,CAAC,CAAC;IACvC,MAAM,aAAa,GAAG,MAAM,IAAA,2CAAoB,EAC9C,MAAM,EACN,sBAAY,EACZ,YAAY,CACb,CAAC;IACF,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,wBAAwB,GAAG,MAAM,IAAA,iCAAwB,EAC7D,MAAM,EACN,8BAAoB,EACpB,yBAAa,EACb,IAAA,8BAAoB,EAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CACtD,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAEnE,MAAM,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC;QAC1C,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,qBAAqB;KAC5B,CAAC,CAAC;IAEH,OAAO,CAAC,QAAQ,CAAC;QACf,OAAO,EAAE,mBAAO;QAChB,MAAM,EAAE,aAAa,CAAC,MAAM;QAC5B,UAAU,EAAE;YACV,WAAW,EAAE,aAAa,CAAC,eAAe,CAAC,MAAM,EAAE;gBACjD,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;SACtD;QACD,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC;IAEH,wBAAwB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3C,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,mBAAO;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACtE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;SAC/B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.getJupiterPrices = exports.getVotePda = void 0;
|
16
16
|
const web3_js_1 = require("@solana/web3.js");
|
17
17
|
const axios_1 = __importDefault(require("axios"));
|
18
|
-
const constants_1 = require("./
|
18
|
+
const constants_1 = require("./constants");
|
19
19
|
function getVotePda(owner) {
|
20
20
|
return web3_js_1.PublicKey.findProgramAddressSync([
|
21
21
|
Buffer.from('Escrow'),
|
@@ -25,14 +25,15 @@ function getVotePda(owner) {
|
|
25
25
|
}
|
26
26
|
exports.getVotePda = getVotePda;
|
27
27
|
const maxIdsPerRequest = 100;
|
28
|
+
const jupPriceApiUrl = 'https://api.jup.ag/price/v2';
|
28
29
|
function getJupiterPrices(mints, vsMint) {
|
29
30
|
return __awaiter(this, void 0, void 0, function* () {
|
30
|
-
const endpoint = process.env['PORTFOLIO_JUP_PRICE_API_URL'] || 'https://api.jup.ag/price/v2';
|
31
31
|
let res;
|
32
32
|
const pricesData = [];
|
33
33
|
let subMints;
|
34
34
|
let start = 0;
|
35
35
|
let end = maxIdsPerRequest - 1;
|
36
|
+
const endpoint = `${jupPriceApiUrl}?${constants_1.jupApiParams !== null && constants_1.jupApiParams !== void 0 ? constants_1.jupApiParams : ''}`;
|
36
37
|
do {
|
37
38
|
subMints = mints.slice(start, end);
|
38
39
|
res = yield axios_1.default.get(endpoint, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAA6C;AAE7C,
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAA6C;AAE7C,2CAAwE;AAExE,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrB,wBAAY,CAAC,OAAO,EAAE;QACtB,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;KAC/B,EACD,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AATD,gCASC;AAED,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAErD,SAAsB,gBAAgB,CAAC,KAAkB,EAAE,MAAiB;;QAC1E,I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-1,13 +1,5 @@
|
|
1
|
-
/// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
|
2
|
-
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
|
-
import { PublicKey } from '@solana/web3.js';
|
4
1
|
import { AirdropConfig } from './types';
|
5
2
|
export declare const platformId = "jupiter-launchpad";
|
6
|
-
export declare const voteProgramId: PublicKey;
|
7
|
-
export declare const lockerPubkey: PublicKey;
|
8
|
-
export declare const jupMint = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
|
9
|
-
export declare const jupDecimals = 6;
|
10
|
-
export declare const jupApiToken: string | undefined;
|
11
3
|
export declare const lfgApiBaseUrl = "https://worker.jup.ag/jup-claim-proof";
|
12
4
|
export declare const lfgDisProgram = "DiSLRwcSFvtwvMWSs7ubBMvYRaYNYupa76ZSuYLe6D7j";
|
13
5
|
export declare const airdropConfigs: AirdropConfig[];
|
@@ -1,15 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.airdropConfigs = exports.lfgDisProgram = exports.lfgApiBaseUrl = exports.
|
4
|
-
const web3_js_1 = require("@solana/web3.js");
|
3
|
+
exports.airdropConfigs = exports.lfgDisProgram = exports.lfgApiBaseUrl = exports.platformId = void 0;
|
5
4
|
const constants_1 = require("../../kamino/constants");
|
5
|
+
const constants_2 = require("../constants");
|
6
6
|
exports.platformId = 'jupiter-launchpad';
|
7
7
|
const platformImage = 'https://sonar.watch/img/platforms/jupiter.webp';
|
8
|
-
exports.voteProgramId = new web3_js_1.PublicKey('voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj');
|
9
|
-
exports.lockerPubkey = new web3_js_1.PublicKey('CVMdMd79no569tjc5Sq7kzz8isbfCcFyBS5TLGsrZ5dN');
|
10
|
-
exports.jupMint = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN';
|
11
|
-
exports.jupDecimals = 6;
|
12
|
-
exports.jupApiToken = process.env['PORTFOLIO_JUP_API_PARAM'];
|
13
8
|
exports.lfgApiBaseUrl = 'https://worker.jup.ag/jup-claim-proof';
|
14
9
|
exports.lfgDisProgram = 'DiSLRwcSFvtwvMWSs7ubBMvYRaYNYupa76ZSuYLe6D7j';
|
15
10
|
exports.airdropConfigs = [
|
@@ -19,7 +14,7 @@ exports.airdropConfigs = [
|
|
19
14
|
distributorProgram: 'meRjbQXFNf5En86FXT2YPz1dQzLj4Yb3xK8u1MVgqpb',
|
20
15
|
label: 'JUP',
|
21
16
|
platformId: exports.platformId,
|
22
|
-
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN/${owner}?${
|
17
|
+
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
23
18
|
statics: {
|
24
19
|
claimStart: 1706659200000,
|
25
20
|
claimEnd: 1722430800000,
|
@@ -37,7 +32,7 @@ exports.airdropConfigs = [
|
|
37
32
|
distributorProgram: exports.lfgDisProgram,
|
38
33
|
label: 'ZEUS',
|
39
34
|
platformId: exports.platformId,
|
40
|
-
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/ZEUS1aR7aX8DFFJf5QjWj2ftDDdNTroMNGo8YoQm3Gq/${owner}?${
|
35
|
+
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/ZEUS1aR7aX8DFFJf5QjWj2ftDDdNTroMNGo8YoQm3Gq/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
41
36
|
statics: {
|
42
37
|
claimStart: 1712235600000,
|
43
38
|
claimEnd: 1713445200000,
|
@@ -54,7 +49,7 @@ exports.airdropConfigs = [
|
|
54
49
|
distributorProgram: exports.lfgDisProgram,
|
55
50
|
label: 'TNSR',
|
56
51
|
platformId: exports.platformId,
|
57
|
-
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6/${owner}?${
|
52
|
+
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
58
53
|
statics: {
|
59
54
|
claimStart: 1712534400000,
|
60
55
|
claimEnd: 1728086400000,
|
@@ -71,7 +66,7 @@ exports.airdropConfigs = [
|
|
71
66
|
distributorProgram: exports.lfgDisProgram,
|
72
67
|
label: 'SHARKY',
|
73
68
|
platformId: exports.platformId,
|
74
|
-
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s/${owner}?${
|
69
|
+
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
75
70
|
statics: {
|
76
71
|
claimStart: 1713225600000,
|
77
72
|
claimEnd: 1714435200000,
|
@@ -88,7 +83,7 @@ exports.airdropConfigs = [
|
|
88
83
|
distributorProgram: exports.lfgDisProgram,
|
89
84
|
label: 'UPT',
|
90
85
|
platformId: exports.platformId,
|
91
|
-
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/UPTx1d24aBWuRgwxVnFmX4gNraj3QGFzL3QqBgxtWQG/${owner}?${
|
86
|
+
getApiPath: (owner) => `${exports.lfgApiBaseUrl}/UPTx1d24aBWuRgwxVnFmX4gNraj3QGFzL3QqBgxtWQG/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
92
87
|
statics: {
|
93
88
|
claimStart: 1717077600000,
|
94
89
|
claimEnd: 1719878400000,
|
@@ -123,7 +118,7 @@ exports.airdropConfigs = [
|
|
123
118
|
distributorProgram: 'DiS3nNjFVMieMgmiQFm6wgJL7nevk4NrhXKLbtEH1Z2R',
|
124
119
|
label: 'JUP',
|
125
120
|
platformId: exports.platformId,
|
126
|
-
getApiPath: (owner) => `https://jupuary-api.jup.ag/claim-proof-2025/${owner}?${
|
121
|
+
getApiPath: (owner) => `https://jupuary-api.jup.ag/claim-proof-2025/${owner}?${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`,
|
127
122
|
statics: {
|
128
123
|
claimStart: 1737547200000,
|
129
124
|
claimEnd: 1745323200000,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/constants.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/constants.ts"],"names":[],"mappings":";;;AACA,sDAAwE;AACxE,4CAA4C;AAE/B,QAAA,UAAU,GAAG,mBAAmB,CAAC;AAC9C,MAAM,aAAa,GAAG,gDAAgD,CAAC;AAE1D,QAAA,aAAa,GAAG,uCAAuC,CAAC;AACxD,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAE/D,QAAA,cAAc,GAAoB;IAC7C;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,6CAA6C;QACjE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,GAAG,qBAAa,gDAAgD,KAAK,IACnE,wBAAY,aAAZ,wBAAY,cAAZ,wBAAY,GAAI,EAClB,EAAE;QACJ,OAAO,EAAE;YACP,UAAU,EAAE,aA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H,4EAA4E;YAC9E,IAAI,EAAE,IAAI;SACX;KACF;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,8CAA8C;QAClE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,+CAA+C,KAAK,IAClD,wBAAY,aAAZ,wBAAY,cAAZ,wBAAY,GAAI,EAClB,EAAE;QACJ,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,iCAAiC;YACrC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,yBAAyB;YACpC,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,cAAc;SACrB;KACF;CACF,CAAC"}
|
@@ -21,7 +21,7 @@ const getMultipleDecimalsAsMap_1 = require("../../utils/solana/getMultipleDecima
|
|
21
21
|
const clients_1 = require("../../utils/clients");
|
22
22
|
const constants_2 = require("../sanctum/constants");
|
23
23
|
const solana_1 = require("../../utils/solana");
|
24
|
-
const constants_3 = require("./
|
24
|
+
const constants_3 = require("./constants");
|
25
25
|
const mints = [
|
26
26
|
'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu', // xLifinity
|
27
27
|
'DdFPRnccQqLD4zCHrBqdY95D6hvw6PLWp9DEXj1fLCL9', // Wrapped USDC (Allbridge from Ethereum)
|
@@ -53,7 +53,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
53
|
const connection = (0, clients_1.getClientSolana)();
|
54
54
|
const [solSources, verifiedTokens] = yield Promise.all([
|
55
55
|
(0, helpers_1.getJupiterPrices)([new web3_js_1.PublicKey(vsToken)], new web3_js_1.PublicKey(solana_1.usdcSolanaMint)),
|
56
|
-
axios_1.default.get(`https://tokens.jup.ag/tokens?tags=verified&${constants_3.
|
56
|
+
axios_1.default.get(`https://tokens.jup.ag/tokens?tags=verified&${constants_3.jupApiParams !== null && constants_3.jupApiParams !== void 0 ? constants_3.jupApiParams : ''}`),
|
57
57
|
]);
|
58
58
|
const solPrice = solSources.get(vsToken);
|
59
59
|
if (!solPrice)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAC5C,kDAA0B;AAG1B,oDAAkD;AAClD,uCAA6C;AAC7C,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;AAChF,+CAAoD;AAEpD,
|
1
|
+
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAC5C,kDAA0B;AAG1B,oDAAkD;AAClD,uCAA6C;AAC7C,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;AAChF,+CAAoD;AAEpD,2CAA2C;AAE3C,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,yCAAyC;IACzF,6CAA6C,EAAE,wCAAwC;IACvF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,oBAAoB;IACpE,8CAA8C,EAAE,QAAQ;IACxD,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,6BAA6B;IAC7E,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,+BAA+B;IAC/E,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,MAAM;IACrD,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AG,CAAC"}
|
@@ -148,9 +148,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
148
148
|
const elevationGroup = elevationGroups.get(obligation.elevationGroup);
|
149
149
|
if (elevationGroup)
|
150
150
|
element.addSuppliedLtv(elevationGroup.liquidationThresholdPct / 100);
|
151
|
-
else {
|
152
|
-
element.addSuppliedLtv(0);
|
153
|
-
}
|
154
151
|
}
|
155
152
|
else {
|
156
153
|
element.addSuppliedLtv(reserve.config.liquidationThresholdPct / 100);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AACrC,2CAMqB;AAGrB,iDAAsD;AACtD,2CAAmE;AAEnE,+CAAmE;AACnE,yCAIwB;AACxB,6CAAsE;AACtE,gFAA6E;AAC7E,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,WAAW,GAAG,IAAI,6BAAa,CAAW,sBAAU,EAAE;IAC1D,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,2BAA2B,GAAG,IAAI,6BAAa,CAInD,8BAAkB,EAClB;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAyB,GAAG,IAAI,EAAE,EAAE,IAAI,CAAC,CAC7D,CAAC;AAEF,MAAM,YAAY,GAAG,IAAI,6BAAa,CACpC,uBAAW,EACX;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CACF,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EA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AAC,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;qBAChE,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC;gBAClC,cAAc,EAAE,IAAI;gBACpB,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE;iBAChE;aACF,CAAC,CAAC;YAEH,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;gBACxB,MAAM,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;gBACtE,IAAI,cAAc;oBAChB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,uBAAuB,GAAG,GAAG,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AACrC,2CAMqB;AAGrB,iDAAsD;AACtD,2CAAmE;AAEnE,+CAAmE;AACnE,yCAIwB;AACxB,6CAAsE;AACtE,gFAA6E;AAC7E,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,WAAW,GAAG,IAAI,6BAAa,CAAW,sBAAU,EAAE;IAC1D,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,2BAA2B,GAAG,IAAI,6BAAa,CAInD,8BAAkB,EAClB;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAyB,GAAG,IAAI,EAAE,EAAE,IAAI,CAAC,CAC7D,CAAC;AAEF,MAAM,YAAY,GAAG,IAAI,6BAAa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CAAC,CAAC;YACxE,OAAO,CAAC,gBAAgB,CAAC;gBACvB,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,UAAU,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5C,MAAM,eAAe,GAAG,gBAAgB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAChE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;YAE7D,OAAO,CAAC,OAAO,CACb,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAC3D,CAAC;QACJ,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"}
|
@@ -22,26 +22,20 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
22
22
|
if (accounts.length !== 1)
|
23
23
|
return [];
|
24
24
|
const escrowAccount = accounts[0];
|
25
|
-
const { amount, escrowEndsAt
|
25
|
+
const { amount, escrowEndsAt } = escrowAccount;
|
26
26
|
if (amount.isZero())
|
27
27
|
return [];
|
28
|
-
const yearsLocked = duration.dividedBy(60 * 60 * 24 * 365).decimalPlaces(0);
|
29
|
-
let name = 'Locked';
|
30
|
-
if (escrowEndsAt.isZero()) {
|
31
|
-
name += ` (${yearsLocked.toString()} year${yearsLocked.isGreaterThan(1) ? 's' : ''})`;
|
32
|
-
}
|
33
28
|
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
34
29
|
const element = registry.addElementMultiple({
|
35
30
|
label: 'Vesting',
|
36
31
|
link: 'https://lifinity.io/reward',
|
37
32
|
ref: escrowAccount.pubkey,
|
38
|
-
name,
|
39
33
|
});
|
40
34
|
element.addAsset({
|
41
35
|
address: constants_1.lfntyMint,
|
42
36
|
amount,
|
43
37
|
attributes: {
|
44
|
-
lockedUntil: escrowEndsAt.times(1000).toNumber() ||
|
38
|
+
lockedUntil: escrowEndsAt.times(1000).toNumber() || -1,
|
45
39
|
},
|
46
40
|
});
|
47
41
|
return registry.getElements(cache);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lockerFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lifinity/lockerFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAA6E;AAC7E,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAyC;AACzC,uCAAyC;AACzC,gFAA6E;AAE7E,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,sBAAY,EACZ,mCAAuB,EACvB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,
|
1
|
+
{"version":3,"file":"lockerFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lifinity/lockerFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAA6E;A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AO,CAAC"}
|
@@ -16,11 +16,12 @@ exports.fetcher = exports.airdropFetcher = void 0;
|
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
17
|
const axios_1 = __importDefault(require("axios"));
|
18
18
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
19
|
+
const constants_1 = require("../jupiter/constants");
|
19
20
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
20
21
|
const deriveClaimStatus_1 = require("../../utils/solana/jupiter/deriveClaimStatus");
|
21
22
|
const clients_1 = require("../../utils/clients");
|
22
|
-
const
|
23
|
-
const
|
23
|
+
const constants_2 = require("../jupiter/launchpad/constants");
|
24
|
+
const constants_3 = require("./constants");
|
24
25
|
const claimStart = new bignumber_js_1.default(1721314800000);
|
25
26
|
const earnestClaimDuration = 180 * 24 * 60 * 60 * 1000;
|
26
27
|
const earnestClaimEnd = claimStart.plus(earnestClaimDuration);
|
@@ -28,7 +29,7 @@ const capitalClaimDuration = 14 * 24 * 60 * 60 * 1000;
|
|
28
29
|
const capitalClaimEnd = claimStart.plus(capitalClaimDuration);
|
29
30
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
30
31
|
const claimProofBase = yield axios_1.default
|
31
|
-
.get(`${
|
32
|
+
.get(`${constants_2.lfgApiBaseUrl}/CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu/${owner}?${constants_1.jupApiParams !== null && constants_1.jupApiParams !== void 0 ? constants_1.jupApiParams : ''}`, {
|
32
33
|
timeout: 5000,
|
33
34
|
})
|
34
35
|
.catch((e) => {
|
@@ -39,18 +40,18 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
40
|
});
|
40
41
|
if (!claimProofBase || typeof claimProofBase.data === 'string')
|
41
42
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
42
|
-
statics:
|
43
|
+
statics: constants_3.s1AirdropStatics,
|
43
44
|
items: [
|
44
45
|
{
|
45
46
|
amount: 0,
|
46
47
|
isClaimed: false,
|
47
48
|
label: 'CLOUD',
|
48
|
-
address:
|
49
|
+
address: constants_3.cloudMint,
|
49
50
|
},
|
50
51
|
],
|
51
52
|
});
|
52
53
|
const client = (0, clients_1.getClientSolana)();
|
53
|
-
const claimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofBase.data.merkle_tree,
|
54
|
+
const claimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofBase.data.merkle_tree, constants_2.lfgDisProgram);
|
54
55
|
const claimStatusAccount = yield client.getAccountInfo(claimStatusAddress);
|
55
56
|
let capitalAmount = new bignumber_js_1.default(0);
|
56
57
|
if (claimStatusAccount) {
|
@@ -80,15 +81,15 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
80
81
|
}
|
81
82
|
const items = [
|
82
83
|
{
|
83
|
-
amount: capitalAmount.div(Math.pow(10,
|
84
|
+
amount: capitalAmount.div(Math.pow(10, constants_3.cloudDecimals)).toNumber(),
|
84
85
|
isClaimed: claimStatusAccount !== null,
|
85
86
|
label: 'CLOUD',
|
86
|
-
address:
|
87
|
+
address: constants_3.cloudMint,
|
87
88
|
},
|
88
89
|
];
|
89
90
|
// Check Earnestness
|
90
91
|
const claimProofEarn = yield axios_1.default
|
91
|
-
.get(`${
|
92
|
+
.get(`${constants_2.lfgApiBaseUrl}/earnestness-CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu/${owner}?${constants_1.jupApiParams !== null && constants_1.jupApiParams !== void 0 ? constants_1.jupApiParams : ''}`, {
|
92
93
|
timeout: 5000,
|
93
94
|
})
|
94
95
|
.catch((e) => {
|
@@ -99,7 +100,7 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
99
100
|
});
|
100
101
|
// If Earnestness elligible
|
101
102
|
if (claimProofEarn && typeof claimProofEarn.data !== 'string') {
|
102
|
-
const earnClaimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofEarn.data.merkle_tree,
|
103
|
+
const earnClaimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofEarn.data.merkle_tree, constants_2.lfgDisProgram);
|
103
104
|
const earnClaimStatusAccount = yield client.getAccountInfo(earnClaimStatusAddress);
|
104
105
|
let earnestAmount = new bignumber_js_1.default(0);
|
105
106
|
if (earnClaimStatusAccount) {
|
@@ -128,21 +129,21 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
128
129
|
earnestAmount = new bignumber_js_1.default(claimProofEarn.data.amount).times(ratio);
|
129
130
|
}
|
130
131
|
items.push({
|
131
|
-
amount: earnestAmount.div(Math.pow(10,
|
132
|
+
amount: earnestAmount.div(Math.pow(10, constants_3.cloudDecimals)).toNumber(),
|
132
133
|
isClaimed: earnClaimStatusAccount !== null,
|
133
134
|
label: 'CLOUD',
|
134
|
-
address:
|
135
|
+
address: constants_3.cloudMint,
|
135
136
|
});
|
136
137
|
}
|
137
138
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
138
|
-
statics:
|
139
|
+
statics: constants_3.s1AirdropStatics,
|
139
140
|
items,
|
140
141
|
});
|
141
142
|
});
|
142
143
|
exports.airdropFetcher = {
|
143
|
-
id:
|
144
|
+
id: constants_3.s1AirdropStatics.id,
|
144
145
|
networkId: portfolio_core_1.NetworkId.solana,
|
145
146
|
executor,
|
146
147
|
};
|
147
|
-
exports.fetcher = (0, AirdropFetcher_1.airdropFetcherToFetcher)(exports.airdropFetcher,
|
148
|
+
exports.fetcher = (0, AirdropFetcher_1.airdropFetcherToFetcher)(exports.airdropFetcher, constants_3.platformId, `${constants_3.platformId}-airdrop`, constants_3.s1AirdropStatics.claimEnd);
|
148
149
|
//# sourceMappingURL=s1AirdropFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"s1AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/s1AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAAuD;AACvD,yDAK8B;AAC9B,oFAAiF;AACjF,iDAAsD;AAEtD,
|
1
|
+
{"version":3,"file":"s1AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/s1AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAAuD;AACvD,oDAAoD;AACpD,yDAK8B;AAC9B,oFAAiF;AACjF,iDAAsD;AAEtD,8DAA8E;AAC9E,2CAKqB;AAErB,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,CAAC;AAChD,MAAM,oBAAoB,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACvD,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAC9D,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACtD,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAE9D,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,cAAc,GAA6C,MAAM,eAAK;SACzE,GAAG,CACF,GAAG,yBAAa,iDAAiD,KAAK,IACpE,wBAAY,aAAZ,wBAAY,cAAZ,wBAAY,GAAI,EAClB,EAAE,EACF;QACE,OAAO,EAAE,IAAI;KACd,CACF;SACA,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACX,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC,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