@sonarwatch/portfolio-plugins 0.12.54 → 0.12.56
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/AirdropFetcher.d.ts +24 -1
- package/src/AirdropFetcher.js +64 -1
- package/src/AirdropFetcher.js.map +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/allbridge/positionsFetcher.js +1 -1
- package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
- package/src/plugins/drift/airdropFetcher.js +3 -66
- package/src/plugins/drift/airdropFetcher.js.map +1 -1
- package/src/plugins/drift/constants.d.ts +2 -1
- package/src/plugins/drift/constants.js +11 -2
- package/src/plugins/drift/constants.js.map +1 -1
- package/src/plugins/drift/helpersAirdrop.d.ts +6 -2
- package/src/plugins/drift/helpersAirdrop.js +21 -21
- package/src/plugins/drift/helpersAirdrop.js.map +1 -1
- package/src/plugins/drift/types.d.ts +0 -16
- package/src/plugins/echelon/constants.d.ts +10 -0
- package/src/plugins/echelon/constants.js +20 -0
- package/src/plugins/echelon/constants.js.map +1 -0
- package/src/plugins/echelon/depositsFetcher.d.ts +3 -0
- package/src/plugins/echelon/depositsFetcher.js +178 -0
- package/src/plugins/echelon/depositsFetcher.js.map +1 -0
- package/src/plugins/echelon/helpers.d.ts +1 -0
- package/src/plugins/echelon/helpers.js +39 -0
- package/src/plugins/echelon/helpers.js.map +1 -0
- package/src/plugins/echelon/index.d.ts +6 -0
- package/src/plugins/echelon/index.js +13 -0
- package/src/plugins/echelon/index.js.map +1 -0
- package/src/plugins/echelon/marketsJob.d.ts +3 -0
- package/src/plugins/echelon/marketsJob.js +80 -0
- package/src/plugins/echelon/marketsJob.js.map +1 -0
- package/src/plugins/echelon/types.d.ts +78 -0
- package/src/plugins/echelon/types.js +3 -0
- package/src/plugins/echelon/types.js.map +1 -0
- package/src/plugins/jupiter/governance/asrFetcher.js +3 -3
- package/src/plugins/jupiter/governance/asrFetcher.js.map +1 -1
- package/src/plugins/jupiter/helpers.d.ts +0 -1
- package/src/plugins/jupiter/helpers.js +1 -9
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js +2 -2
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
- package/src/plugins/kamino/airdropFetcher.js +2 -2
- package/src/plugins/kamino/airdropFetcher.js.map +1 -1
- package/src/plugins/parcl/airdropFetcher.js +2 -41
- package/src/plugins/parcl/airdropFetcher.js.map +1 -1
- package/src/plugins/parcl/constants.d.ts +2 -0
- package/src/plugins/parcl/constants.js +11 -1
- package/src/plugins/parcl/constants.js.map +1 -1
- package/src/plugins/parcl/helpersAirdrop.d.ts +0 -17
- package/src/plugins/parcl/helpersAirdrop.js +21 -24
- package/src/plugins/parcl/helpersAirdrop.js.map +1 -1
- package/src/plugins/zeta/airdropFetcher.js +2 -2
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/utils/solana/jupiter/deriveClaimStatus.d.ts +2 -0
- package/src/utils/solana/jupiter/deriveClaimStatus.js +13 -0
- package/src/utils/solana/jupiter/deriveClaimStatus.js.map +1 -0
- package/src/utils/solana/jupiter/deriveClaimStatuses.d.ts +2 -0
- package/src/utils/solana/jupiter/deriveClaimStatuses.js +9 -0
- package/src/utils/solana/jupiter/deriveClaimStatuses.js.map +1 -0
- package/src/plugins/jito/helper.d.ts +0 -3
- package/src/plugins/jito/helper.js +0 -21
- package/src/plugins/jito/helper.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.56](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.55...plugins-0.12.56) (2024-07-12)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.12.55](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.54...plugins-0.12.55) (2024-07-11)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.12.54](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.53...plugins-0.12.54) (2024-07-09)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
package/src/AirdropFetcher.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import { AddressSystemType, Airdrop, AirdropFetcherResult, AirdropFetchersResult, NetworkIdType } from '@sonarwatch/portfolio-core';
|
1
|
+
import { AddressSystemType, Airdrop, AirdropFetcherResult, AirdropFetchersResult, AirdropItem, AirdropStatus, IsClaimed, NetworkIdType, UsdValue } from '@sonarwatch/portfolio-core';
|
2
2
|
import { Cache } from './Cache';
|
3
|
+
import { Fetcher } from './Fetcher';
|
3
4
|
export type AirdropFetcherExecutor = (owner: string, cache: Cache) => Promise<Airdrop>;
|
4
5
|
export type AirdropFetcher = {
|
5
6
|
id: string;
|
@@ -7,5 +8,27 @@ export type AirdropFetcher = {
|
|
7
8
|
executor: AirdropFetcherExecutor;
|
8
9
|
};
|
9
10
|
export declare function runAirdropFetchersByNetworkId(owner: string, networkId: NetworkIdType, fetchers: AirdropFetcher[], cache: Cache): Promise<AirdropFetchersResult>;
|
11
|
+
export type AirdropStatics = Omit<Airdrop, 'status' | 'item'>;
|
12
|
+
export declare function getAirdrop(params: {
|
13
|
+
statics: AirdropStatics;
|
14
|
+
item: {
|
15
|
+
amount: number;
|
16
|
+
label: string;
|
17
|
+
price: UsdValue;
|
18
|
+
imageUri?: string;
|
19
|
+
address?: string;
|
20
|
+
isClaimed: IsClaimed;
|
21
|
+
};
|
22
|
+
}): Airdrop;
|
23
|
+
export declare function getAirdropItem(params: {
|
24
|
+
airdropStatus: AirdropStatus;
|
25
|
+
amount: number;
|
26
|
+
label: string;
|
27
|
+
price: UsdValue;
|
28
|
+
imageUri?: string;
|
29
|
+
address?: string;
|
30
|
+
isClaimed: IsClaimed;
|
31
|
+
}): AirdropItem;
|
10
32
|
export declare function runAirdropFetchers(owner: string, addressSystem: AddressSystemType, fetchers: AirdropFetcher[], cache: Cache): Promise<AirdropFetchersResult>;
|
11
33
|
export declare function runAirdropFetcher(owner: string, fetcher: AirdropFetcher, cache: Cache): Promise<AirdropFetcherResult>;
|
34
|
+
export declare function airdropFetcherToFetcher(airdropFetcher: AirdropFetcher, platformId: string, id: string, claimEnd?: number): Fetcher;
|
package/src/AirdropFetcher.js
CHANGED
@@ -12,9 +12,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.runAirdropFetcher = exports.runAirdropFetchers = exports.runAirdropFetchersByNetworkId = void 0;
|
15
|
+
exports.airdropFetcherToFetcher = exports.runAirdropFetcher = exports.runAirdropFetchers = exports.getAirdropItem = exports.getAirdrop = exports.runAirdropFetchersByNetworkId = void 0;
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const promiseTimeout_1 = __importDefault(require("./utils/misc/promiseTimeout"));
|
18
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("./utils/misc/tokenPriceToAssetToken"));
|
18
19
|
const runAirdropFetcherTimeout = 10000;
|
19
20
|
function runAirdropFetchersByNetworkId(owner, networkId, fetchers, cache) {
|
20
21
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -26,6 +27,25 @@ function runAirdropFetchersByNetworkId(owner, networkId, fetchers, cache) {
|
|
26
27
|
});
|
27
28
|
}
|
28
29
|
exports.runAirdropFetchersByNetworkId = runAirdropFetchersByNetworkId;
|
30
|
+
function getAirdrop(params) {
|
31
|
+
const status = (0, portfolio_core_1.getAirdropStatus)(params.statics.claimStart, params.statics.claimEnd);
|
32
|
+
return Object.assign(Object.assign({}, params.statics), { status, item: getAirdropItem(Object.assign(Object.assign({}, params.item), { airdropStatus: status })) });
|
33
|
+
}
|
34
|
+
exports.getAirdrop = getAirdrop;
|
35
|
+
function getAirdropItem(params) {
|
36
|
+
const isEligible = (0, portfolio_core_1.getIsEligible)(params.amount);
|
37
|
+
return {
|
38
|
+
amount: params.amount,
|
39
|
+
isClaimed: isEligible === false ? false : params.isClaimed,
|
40
|
+
isEligible,
|
41
|
+
label: params.label,
|
42
|
+
price: params.price,
|
43
|
+
status: (0, portfolio_core_1.getAirdropItemStatus)(params.airdropStatus, params.amount, params.isClaimed),
|
44
|
+
address: params.address,
|
45
|
+
imageUri: params.imageUri,
|
46
|
+
};
|
47
|
+
}
|
48
|
+
exports.getAirdropItem = getAirdropItem;
|
29
49
|
function runAirdropFetchers(owner, addressSystem, fetchers, cache) {
|
30
50
|
return __awaiter(this, void 0, void 0, function* () {
|
31
51
|
const fOwner = (0, portfolio_core_1.formatAddress)(owner, addressSystem);
|
@@ -89,4 +109,47 @@ function runAirdropFetcher(owner, fetcher, cache) {
|
|
89
109
|
});
|
90
110
|
}
|
91
111
|
exports.runAirdropFetcher = runAirdropFetcher;
|
112
|
+
function airdropFetcherToFetcher(airdropFetcher, platformId, id, claimEnd) {
|
113
|
+
return {
|
114
|
+
id,
|
115
|
+
networkId: airdropFetcher.networkId,
|
116
|
+
executor: (owner, cache) => __awaiter(this, void 0, void 0, function* () {
|
117
|
+
if (claimEnd && Date.now() > claimEnd)
|
118
|
+
return [];
|
119
|
+
const airdrop = yield airdropFetcher.executor(owner, cache);
|
120
|
+
if (airdrop.item.status !== portfolio_core_1.AirdropItemStatus.claimable &&
|
121
|
+
airdrop.item.status !== portfolio_core_1.AirdropItemStatus.claimableLater)
|
122
|
+
return [];
|
123
|
+
const { item } = airdrop;
|
124
|
+
const asset = item.address
|
125
|
+
? (0, tokenPriceToAssetToken_1.default)(item.address, item.amount, airdropFetcher.networkId, undefined, item.price || undefined, { isClaimable: true, lockedUntil: airdrop.claimStart })
|
126
|
+
: {
|
127
|
+
type: portfolio_core_1.PortfolioAssetType.generic,
|
128
|
+
data: {
|
129
|
+
amount: item.amount,
|
130
|
+
price: item.price,
|
131
|
+
},
|
132
|
+
name: item.label,
|
133
|
+
networkId: airdropFetcher.networkId,
|
134
|
+
attributes: { isClaimable: true, lockedUntil: airdrop.claimStart },
|
135
|
+
value: item.price ? item.price * item.amount : null,
|
136
|
+
imageUri: item.imageUri,
|
137
|
+
};
|
138
|
+
return [
|
139
|
+
{
|
140
|
+
networkId: airdropFetcher.networkId,
|
141
|
+
label: 'Airdrop',
|
142
|
+
data: {
|
143
|
+
assets: [asset],
|
144
|
+
},
|
145
|
+
platformId,
|
146
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
147
|
+
value: asset.value,
|
148
|
+
name: airdrop.name,
|
149
|
+
},
|
150
|
+
];
|
151
|
+
}),
|
152
|
+
};
|
153
|
+
}
|
154
|
+
exports.airdropFetcherToFetcher = airdropFetcherToFetcher;
|
92
155
|
//# sourceMappingURL=AirdropFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAsBoC;AAEpC,iFAAyD;AAEzD,iGAAyE;AAazE,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAEvC,SAAsB,6BAA6B,CACjD,KAAa,EACb,SAAwB,EACxB,QAA0B,EAC1B,KAAY;;QAEZ,MAAM,gBAAgB,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;QAC1E,IAAI,CAAC,gBAAgB;YACnB,MAAM,IAAI,KAAK,CACb,uDAAuD,SAAS,EAAE,CACnE,CAAC;QAEJ,MAAM,EAAE,aAAa,EAAE,GAAG,yBAAQ,CAAC,SAAS,CAAC,CAAC;QAC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,CAAC,CAAA;KACF,CAAC;AACJ,CAAC;AA3DD,0DA2DC"}
|
package/src/index.js
CHANGED
@@ -127,6 +127,7 @@ 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");
|
130
131
|
var constants_1 = require("./plugins/tokens/constants");
|
131
132
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
132
133
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -247,6 +248,7 @@ exports.platforms = [
|
|
247
248
|
...allbridge_1.platforms,
|
248
249
|
...famousfoxfederation_1.platforms,
|
249
250
|
...nxfinance_1.platforms,
|
251
|
+
...echelon_1.platforms,
|
250
252
|
];
|
251
253
|
// JOBS //
|
252
254
|
exports.jobs = [
|
@@ -350,6 +352,7 @@ exports.jobs = [
|
|
350
352
|
...allbridge_1.jobs,
|
351
353
|
...famousfoxfederation_1.jobs,
|
352
354
|
...nxfinance_1.jobs,
|
355
|
+
...echelon_1.jobs,
|
353
356
|
];
|
354
357
|
// FETCHERS //
|
355
358
|
exports.fetchers = [
|
@@ -455,6 +458,7 @@ exports.fetchers = [
|
|
455
458
|
...allbridge_1.fetchers,
|
456
459
|
...famousfoxfederation_1.fetchers,
|
457
460
|
...nxfinance_1.fetchers,
|
461
|
+
...echelon_1.fetchers,
|
458
462
|
];
|
459
463
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
460
464
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;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;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
@@ -30,7 +30,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
30
30
|
if (!poolInfo)
|
31
31
|
return [];
|
32
32
|
const userDepositPublicKeys = (0, helpers_1.getUserDepositPublicKeys)(poolInfo, owner);
|
33
|
-
const userDeposits = (yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.allbridgeIdlItem, userDepositPublicKeys)).filter((userDeposit) => (userDeposit === null || userDeposit === void 0 ? void 0 : userDeposit.lpAmount) !== '0');
|
33
|
+
const userDeposits = (yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.allbridgeIdlItem, userDepositPublicKeys)).filter((userDeposit) => userDeposit !== null && (userDeposit === null || userDeposit === void 0 ? void 0 : userDeposit.lpAmount) !== '0');
|
34
34
|
if (userDeposits.length === 0)
|
35
35
|
return [];
|
36
36
|
const tokenPrices = yield cache.getTokenPricesAsMap(poolInfo.tokens.map((pi) => pi.tokenAddress), portfolio_core_1.NetworkId.solana);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAG4B;AAC5B,qGAA6E;AAE7E,uCAAgE;AAChE,kEAA+D;AAE/D,MAAM,YAAY,GAAG,IAAI,6BAAa,CAAQ,yBAAa,EAAE;IAC3D,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,qBAAqB,GAAG,IAAA,kCAAwB,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAExE,MAAM,YAAY,GAAG,CACnB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,4BAAgB,EAChB,qBAAqB,CACtB,CACF,CAAC,MAAM,CACN,CAAC,WAAW,EAA6C,EAAE,CACzD,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAAQ,MAAK,GAAG,
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAG4B;AAC5B,qGAA6E;AAE7E,uCAAgE;AAChE,kEAA+D;AAE/D,MAAM,YAAY,GAAG,IAAI,6BAAa,CAAQ,yBAAa,EAAE;IAC3D,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,qBAAqB,GAAG,IAAA,kCAAwB,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAExE,MAAM,YAAY,GAAG,CACnB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,4BAAgB,EAChB,qBAAqB,CACtB,CACF,CAAC,MAAM,CACN,CAAC,WAAW,EAA6C,EAAE,C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YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,71 +1,8 @@
|
|
1
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
-
const constants_1 = require("./constants");
|
17
|
-
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
18
3
|
const helpersAirdrop_1 = require("./helpersAirdrop");
|
19
|
-
const
|
20
|
-
const
|
21
|
-
const
|
22
|
-
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
-
if (Date.now() > claimEnds)
|
24
|
-
return [];
|
25
|
-
const { amount, merkle } = yield (0, helpersAirdrop_1.fetchAirdropInfo)(owner);
|
26
|
-
if (amount === 0)
|
27
|
-
return [];
|
28
|
-
const client = (0, clients_1.getClientSolana)();
|
29
|
-
const claimStatus = (0, helpers_1.deriveClaimStatus)(owner, merkle, constants_1.distributorPid);
|
30
|
-
const account = yield client.getAccountInfo(claimStatus);
|
31
|
-
if (account)
|
32
|
-
return [];
|
33
|
-
const tokenPrice = constants_1.driftMint
|
34
|
-
? yield cache.getTokenPrice(constants_1.driftMint, portfolio_core_1.NetworkId.solana)
|
35
|
-
: undefined;
|
36
|
-
const asset = tokenPrice
|
37
|
-
? (0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, portfolio_core_1.NetworkId.solana, tokenPrice)
|
38
|
-
: {
|
39
|
-
type: 'generic',
|
40
|
-
data: {
|
41
|
-
amount,
|
42
|
-
name: 'DRIFT',
|
43
|
-
price: null,
|
44
|
-
imageUri: constants_1.platform.image,
|
45
|
-
},
|
46
|
-
attributes: {
|
47
|
-
lockedUntil: helpersAirdrop_1.claimStart,
|
48
|
-
},
|
49
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
50
|
-
value: null,
|
51
|
-
};
|
52
|
-
return [
|
53
|
-
{
|
54
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
55
|
-
platformId: constants_1.platformId,
|
56
|
-
type: portfolio_core_1.PortfolioElementType.multiple,
|
57
|
-
data: {
|
58
|
-
assets: [asset],
|
59
|
-
},
|
60
|
-
value: null,
|
61
|
-
label: 'Airdrop',
|
62
|
-
},
|
63
|
-
];
|
64
|
-
});
|
65
|
-
const fetcher = {
|
66
|
-
id: `${constants_1.platformId}-airdrop`,
|
67
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
68
|
-
executor,
|
69
|
-
};
|
4
|
+
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
5
|
+
const constants_1 = require("./constants");
|
6
|
+
const fetcher = (0, AirdropFetcher_1.airdropFetcherToFetcher)(helpersAirdrop_1.airdropFetcher, constants_1.platformId, `${constants_1.platformId}-airdrop`, constants_1.airdropStatics.claimEnd);
|
70
7
|
exports.default = fetcher;
|
71
8
|
//# sourceMappingURL=airdropFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/airdropFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/airdropFetcher.ts"],"names":[],"mappings":";;AACA,qDAAkD;AAClD,yDAA+D;AAC/D,2CAAyD;AAEzD,MAAM,OAAO,GAAY,IAAA,wCAAuB,EAC9C,+BAAc,EACd,sBAAU,EACV,GAAG,sBAAU,UAAU,EACvB,0BAAc,CAAC,QAAQ,CACxB,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
import { AirdropStatics } from '../../AirdropFetcher';
|
3
4
|
export declare const platformId = "drift";
|
4
5
|
export declare const platformName = "Drift";
|
5
6
|
export declare const platformImage = "https://sonar.watch/img/platforms/drift.webp";
|
@@ -11,6 +12,6 @@ export declare const preMarketPriceKey = "premarketPrice";
|
|
11
12
|
export declare const perpMarketsIndexesKey = "perp-markets-indexes";
|
12
13
|
export declare const oracleToMintKey = "oracle-to-mint";
|
13
14
|
export declare const airdropUrl = "https://airdrop.drift.trade/eligibility/";
|
14
|
-
export declare const distributorPid = "E7HtfkEMhmn9uwL7EFNydcXBWy5WCYN1vFmKKjipEH1x";
|
15
15
|
export declare const driftDecimals = 6;
|
16
16
|
export declare const driftMint = "DriFtupJYLTosbwoN8koMbEYSx54aFAVLddWsbksjwg7";
|
17
|
+
export declare const airdropStatics: AirdropStatics;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.airdropStatics = exports.driftMint = exports.driftDecimals = exports.airdropUrl = exports.oracleToMintKey = exports.perpMarketsIndexesKey = exports.preMarketPriceKey = exports.driftProgram = exports.prefixSpotMarkets = exports.platform = exports.platformWebsite = exports.platformImage = exports.platformName = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'drift';
|
6
6
|
exports.platformName = 'Drift';
|
@@ -19,7 +19,16 @@ exports.preMarketPriceKey = 'premarketPrice';
|
|
19
19
|
exports.perpMarketsIndexesKey = 'perp-markets-indexes';
|
20
20
|
exports.oracleToMintKey = 'oracle-to-mint';
|
21
21
|
exports.airdropUrl = 'https://airdrop.drift.trade/eligibility/';
|
22
|
-
exports.distributorPid = 'E7HtfkEMhmn9uwL7EFNydcXBWy5WCYN1vFmKKjipEH1x';
|
23
22
|
exports.driftDecimals = 6;
|
24
23
|
exports.driftMint = 'DriFtupJYLTosbwoN8koMbEYSx54aFAVLddWsbksjwg7';
|
24
|
+
exports.airdropStatics = {
|
25
|
+
id: 'drift-airdrop-1',
|
26
|
+
claimLink: 'https://drift.foundation',
|
27
|
+
image: exports.platformImage,
|
28
|
+
name: undefined,
|
29
|
+
emitterName: exports.platformName,
|
30
|
+
emitterLink: exports.platformWebsite,
|
31
|
+
claimStart: 1715860800000,
|
32
|
+
claimEnd: 1723831200000,
|
33
|
+
};
|
25
34
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,YAAY,GAAG,OAAO,CAAC;AACvB,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAC/D,QAAA,eAAe,GAAG,0BAA0B,CAAC;AAC7C,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,oBAAY;IAClB,KAAK,EAAE,qBAAa;IACpB,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,uBAAe;CACzB,CAAC;AACW,QAAA,iBAAiB,GAAG,GAAG,kBAAU,cAAc,CAAC;AAEhD,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,iBAAiB,GAAG,gBAAgB,CAAC;AACrC,QAAA,qBAAqB,GAAG,sBAAsB,CAAC;AAC/C,QAAA,eAAe,GAAG,gBAAgB,CAAC;AAEnC,QAAA,UAAU,GAAG,0CAA0C,CAAC;AACxD,QAAA,aAAa,GAAG,CAAC,CAAC;AAClB,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAE3D,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,iBAAiB;IACrB,SAAS,EAAE,0BAA0B;IACrC,KAAK,EAAE,qBAAa;IACpB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,oBAAY;IACzB,WAAW,EAAE,uBAAe;IAC5B,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;CACxB,CAAC"}
|
@@ -1,5 +1,9 @@
|
|
1
|
-
import { AirdropInfo } from './types';
|
2
1
|
import { AirdropFetcher } from '../../AirdropFetcher';
|
3
|
-
|
2
|
+
type AirdropInfo = {
|
3
|
+
merkle?: string;
|
4
|
+
amount: number;
|
5
|
+
isClaimed: boolean;
|
6
|
+
};
|
4
7
|
export declare function fetchAirdropInfo(owner: string): Promise<AirdropInfo>;
|
5
8
|
export declare const airdropFetcher: AirdropFetcher;
|
9
|
+
export {};
|
@@ -12,13 +12,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.airdropFetcher = exports.fetchAirdropInfo =
|
15
|
+
exports.airdropFetcher = exports.fetchAirdropInfo = 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
19
|
const constants_1 = require("./constants");
|
20
|
+
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
20
21
|
const driftFactor = new bignumber_js_1.default(Math.pow(10, constants_1.driftDecimals));
|
21
|
-
exports.claimStart = 1715860800000;
|
22
22
|
function fetchAirdropInfo(owner) {
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
24
24
|
const res = yield axios_1.default.get(constants_1.airdropUrl + owner, {
|
@@ -31,6 +31,9 @@ function fetchAirdropInfo(owner) {
|
|
31
31
|
return status === 404 || status === 200;
|
32
32
|
},
|
33
33
|
});
|
34
|
+
if (res.data.error) {
|
35
|
+
return { amount: 0, merkle: undefined, isClaimed: false };
|
36
|
+
}
|
34
37
|
const availableAmount = Date.now() > res.data.end_ts * 1000
|
35
38
|
? res.data.end_amount
|
36
39
|
: res.data.start_amount;
|
@@ -39,31 +42,28 @@ function fetchAirdropInfo(owner) {
|
|
39
42
|
.dividedBy(driftFactor)
|
40
43
|
.toNumber(),
|
41
44
|
merkle: res.data.merkle_tree,
|
45
|
+
isClaimed: res.data.unvested_amount === 0,
|
42
46
|
};
|
43
47
|
});
|
44
48
|
}
|
45
49
|
exports.fetchAirdropInfo = fetchAirdropInfo;
|
46
|
-
const
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
amount = -1;
|
61
|
-
const claimStatus = (0, portfolio_core_1.getAirdropClaimStatus)(airdropStatics.claimStart, airdropStatics.claimEnd);
|
62
|
-
return Object.assign(Object.assign({}, airdropStatics), { amount,
|
63
|
-
claimStatus, isClaimed: false, price: null });
|
50
|
+
const fetchAirdropExecutor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
51
|
+
const airdropInfo = yield fetchAirdropInfo(owner);
|
52
|
+
const { isClaimed, amount } = airdropInfo;
|
53
|
+
const driftPrice = yield cache.getTokenPrice(constants_1.driftMint, portfolio_core_1.NetworkId.solana);
|
54
|
+
return (0, AirdropFetcher_1.getAirdrop)({
|
55
|
+
statics: constants_1.airdropStatics,
|
56
|
+
item: {
|
57
|
+
amount,
|
58
|
+
label: 'DRIFT',
|
59
|
+
address: constants_1.driftMint,
|
60
|
+
price: (driftPrice === null || driftPrice === void 0 ? void 0 : driftPrice.price) || null,
|
61
|
+
isClaimed,
|
62
|
+
},
|
63
|
+
});
|
64
64
|
});
|
65
65
|
exports.airdropFetcher = {
|
66
|
-
id: airdropStatics.id,
|
66
|
+
id: constants_1.airdropStatics.id,
|
67
67
|
networkId: portfolio_core_1.NetworkId.solana,
|
68
68
|
executor: fetchAirdropExecutor,
|
69
69
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+
|
1
|
+
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAAuD;AACvD,2CAKqB;AACrB,yDAI8B;AAG9B,MAAM,WAAW,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC;AAmBvD,SAAsB,gBAAgB,CAAC,KAAa;;QAClD,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CACzD,sBAAU,GAAG,KAAK,EAClB;YACE,OAAO,EAAE;gBACP,MAAM,EAAE,0BAA0B;gBAClC,OAAO,EAAE,2BAA2B;aACrC;YACD,OAAO,EAAE,IAAI;YACb,cAAc,CAAC,MAAM;gBACnB,OAAO,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,CAAC;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AA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,oBAAoB;CAC/B,CAAC"}
|
@@ -7,20 +7,4 @@ export type PreMarketPrice = {
|
|
7
7
|
id: string;
|
8
8
|
price: number;
|
9
9
|
};
|
10
|
-
export type AirdropResponse = {
|
11
|
-
claimant: string;
|
12
|
-
merkle_tree: string;
|
13
|
-
mint: string;
|
14
|
-
start_ts: number;
|
15
|
-
end_ts: number;
|
16
|
-
start_amount: number;
|
17
|
-
end_amount: number;
|
18
|
-
unvested_amount: number;
|
19
|
-
claimed_amount: number;
|
20
|
-
error: string;
|
21
|
-
};
|
22
|
-
export type AirdropInfo = {
|
23
|
-
merkle: string;
|
24
|
-
amount: number;
|
25
|
-
};
|
26
10
|
export type PerpMarketIndexes = Array<[number, string]>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare const platformId = "echelon";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const packageId = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba";
|
5
|
+
export declare const echelonLendingPackage = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::";
|
6
|
+
export declare const echelonFarmingPackage = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::farming::";
|
7
|
+
export declare const marketKey = "markets";
|
8
|
+
export declare const vaultType = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::Vault";
|
9
|
+
export declare const stakerType = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::farming::Staker";
|
10
|
+
export declare const marketType = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::Market";
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.marketType = exports.stakerType = exports.vaultType = exports.marketKey = exports.echelonFarmingPackage = exports.echelonLendingPackage = exports.packageId = exports.platform = exports.platformId = void 0;
|
4
|
+
exports.platformId = 'echelon';
|
5
|
+
exports.platform = {
|
6
|
+
id: exports.platformId,
|
7
|
+
name: 'Echelon',
|
8
|
+
image: 'https://sonar.watch/img/platforms/echelon.webp',
|
9
|
+
defiLlamaId: 'echelon-market', // from https://defillama.com/docs/api
|
10
|
+
website: 'https://app.echelon.market',
|
11
|
+
twitter: 'https://twitter.com/EchelonMarket',
|
12
|
+
};
|
13
|
+
exports.packageId = '0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba';
|
14
|
+
exports.echelonLendingPackage = `${exports.packageId}::lending::`;
|
15
|
+
exports.echelonFarmingPackage = `${exports.packageId}::farming::`;
|
16
|
+
exports.marketKey = `markets`;
|
17
|
+
exports.vaultType = `${exports.echelonLendingPackage}Vault`;
|
18
|
+
exports.stakerType = `${exports.echelonFarmingPackage}Staker`;
|
19
|
+
exports.marketType = `${exports.echelonLendingPackage}Market`;
|
20
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,gBAAgB,EAAE,sCAAsC;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAC1D,QAAA,qBAAqB,GAAG,GAAG,iBAAS,aAAa,CAAC;AAClD,QAAA,qBAAqB,GAAG,GAAG,iBAAS,aAAa,CAAC;AAClD,QAAA,SAAS,GAAG,SAAS,CAAC;AACtB,QAAA,SAAS,GAAG,GAAG,6BAAqB,OAAO,CAAC;AAC5C,QAAA,UAAU,GAAG,GAAG,6BAAqB,QAAQ,CAAC;AAC9C,QAAA,UAAU,GAAG,GAAG,6BAAqB,QAAQ,CAAC"}
|