@sonarwatch/portfolio-plugins 0.11.192 → 0.11.194
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 +2 -2
- package/src/AirdropFetcher.d.ts +11 -0
- package/src/AirdropFetcher.js +92 -0
- package/src/AirdropFetcher.js.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +11 -1
- package/src/index.js.map +1 -1
- package/src/plugins/aftermath/constants.d.ts +2 -0
- package/src/plugins/aftermath/constants.js +3 -1
- package/src/plugins/aftermath/constants.js.map +1 -1
- package/src/plugins/aftermath/index.js +2 -1
- package/src/plugins/aftermath/index.js.map +1 -1
- package/src/plugins/aftermath/stakingFetcher.d.ts +3 -0
- package/src/plugins/aftermath/stakingFetcher.js +102 -0
- package/src/plugins/aftermath/stakingFetcher.js.map +1 -0
- package/src/plugins/aftermath/types.d.ts +17 -0
- package/src/plugins/drift/airdropFetcher.d.ts +3 -0
- package/src/plugins/drift/airdropFetcher.js +65 -0
- package/src/plugins/drift/airdropFetcher.js.map +1 -0
- package/src/plugins/drift/constants.d.ts +6 -0
- package/src/plugins/drift/constants.js +10 -4
- package/src/plugins/drift/constants.js.map +1 -1
- package/src/plugins/drift/helpersAirdrop.d.ts +3 -0
- package/src/plugins/drift/helpersAirdrop.js +59 -0
- package/src/plugins/drift/helpersAirdrop.js.map +1 -0
- package/src/plugins/drift/index.d.ts +1 -0
- package/src/plugins/drift/index.js +5 -2
- package/src/plugins/drift/index.js.map +1 -1
- package/src/plugins/drift/types.d.ts +12 -0
- package/src/plugins/jito/airdropFetcher.js +1 -2
- package/src/plugins/jito/airdropFetcher.js.map +1 -1
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js +1 -1
- package/src/plugins/kamino/airdropFetcher.js +1 -1
- package/src/plugins/parcl/airdropFetcher.js +8 -47
- package/src/plugins/parcl/airdropFetcher.js.map +1 -1
- package/src/plugins/parcl/constants.d.ts +3 -0
- package/src/plugins/parcl/constants.js +7 -4
- package/src/plugins/parcl/constants.js.map +1 -1
- package/src/plugins/parcl/helpersAirdrop.d.ts +19 -0
- package/src/plugins/parcl/helpersAirdrop.js +99 -0
- package/src/plugins/parcl/helpersAirdrop.js.map +1 -0
- package/src/plugins/parcl/index.d.ts +1 -0
- package/src/plugins/parcl/index.js +3 -1
- package/src/plugins/parcl/index.js.map +1 -1
- package/src/plugins/parcl/types.d.ts +6 -1
- package/src/plugins/sandglass/constants.d.ts +6 -0
- package/src/plugins/sandglass/constants.js +16 -0
- package/src/plugins/sandglass/constants.js.map +1 -0
- package/src/plugins/sandglass/depositFetcher.d.ts +3 -0
- package/src/plugins/sandglass/depositFetcher.js +82 -0
- package/src/plugins/sandglass/depositFetcher.js.map +1 -0
- package/src/plugins/sandglass/filters.d.ts +3 -0
- package/src/plugins/sandglass/filters.js +21 -0
- package/src/plugins/sandglass/filters.js.map +1 -0
- package/src/plugins/sandglass/index.d.ts +6 -0
- package/src/plugins/sandglass/index.js +13 -0
- package/src/plugins/sandglass/index.js.map +1 -0
- package/src/plugins/sandglass/marketsJob.d.ts +3 -0
- package/src/plugins/sandglass/marketsJob.js +97 -0
- package/src/plugins/sandglass/marketsJob.js.map +1 -0
- package/src/plugins/sandglass/structs.d.ts +150 -0
- package/src/plugins/sandglass/structs.js +144 -0
- package/src/plugins/sandglass/structs.js.map +1 -0
- package/src/plugins/sandglass/types.d.ts +7 -0
- package/src/plugins/sandglass/types.js +3 -0
- package/src/plugins/sandglass/types.js.map +1 -0
- package/src/plugins/tensor/airdropPowerUsersFetcher.d.ts +3 -0
- package/src/plugins/tensor/airdropPowerUsersFetcher.js +45 -0
- package/src/plugins/tensor/airdropPowerUsersFetcher.js.map +1 -0
- package/src/plugins/tensor/constants.d.ts +2 -0
- package/src/plugins/tensor/constants.js +3 -1
- package/src/plugins/tensor/constants.js.map +1 -1
- package/src/plugins/tensor/helpers.d.ts +1 -0
- package/src/plugins/tensor/helpers.js +16 -0
- package/src/plugins/tensor/helpers.js.map +1 -0
- package/src/plugins/tensor/index.js +6 -1
- package/src/plugins/tensor/index.js.map +1 -1
- package/src/plugins/tensor/powerUsers.json +2898 -0
- package/src/plugins/wormhole/airdropFetcher.js +1 -2
- package/src/plugins/wormhole/airdropFetcher.js.map +1 -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.11.194](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.193...plugins-0.11.194) (2024-05-04)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.11.193](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.192...plugins-0.11.193) (2024-05-02)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.11.192](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.191...plugins-0.11.192) (2024-05-02)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.194",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"web3-v1": "npm:web3@^1.5.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
|
-
"@sonarwatch/portfolio-core": "0.11.
|
44
|
+
"@sonarwatch/portfolio-core": "0.11.194"
|
45
45
|
},
|
46
46
|
"main": "./src/index.js",
|
47
47
|
"types": "./src/index.d.ts"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { AddressSystemType, Airdrop, AirdropFetcherResult, AirdropFetchersResult, NetworkIdType } from '@sonarwatch/portfolio-core';
|
2
|
+
import { Cache } from './Cache';
|
3
|
+
export type AirdropFetcherExecutor = (owner: string, cache: Cache) => Promise<Airdrop>;
|
4
|
+
export type AirdropFetcher = {
|
5
|
+
id: string;
|
6
|
+
networkId: NetworkIdType;
|
7
|
+
executor: AirdropFetcherExecutor;
|
8
|
+
};
|
9
|
+
export declare function runAirdropFetchersByNetworkId(owner: string, networkId: NetworkIdType, fetchers: AirdropFetcher[], cache: Cache): Promise<AirdropFetchersResult>;
|
10
|
+
export declare function runAirdropFetchers(owner: string, addressSystem: AddressSystemType, fetchers: AirdropFetcher[], cache: Cache): Promise<AirdropFetchersResult>;
|
11
|
+
export declare function runAirdropFetcher(owner: string, fetcher: AirdropFetcher, cache: Cache): Promise<AirdropFetcherResult>;
|
@@ -0,0 +1,92 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.runAirdropFetcher = exports.runAirdropFetchers = exports.runAirdropFetchersByNetworkId = void 0;
|
16
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
|
+
const promiseTimeout_1 = __importDefault(require("./utils/misc/promiseTimeout"));
|
18
|
+
const runAirdropFetcherTimeout = 10000;
|
19
|
+
function runAirdropFetchersByNetworkId(owner, networkId, fetchers, cache) {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const isFetchersValids = fetchers.every((f) => f.networkId === networkId);
|
22
|
+
if (!isFetchersValids)
|
23
|
+
throw new Error(`Not all airdrop fetchers have the right network id: ${networkId}`);
|
24
|
+
const { addressSystem } = portfolio_core_1.networks[networkId];
|
25
|
+
return runAirdropFetchers(owner, addressSystem, fetchers, cache);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
exports.runAirdropFetchersByNetworkId = runAirdropFetchersByNetworkId;
|
29
|
+
function runAirdropFetchers(owner, addressSystem, fetchers, cache) {
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
31
|
+
const fOwner = (0, portfolio_core_1.formatAddress)(owner, addressSystem);
|
32
|
+
const isFetchersValids = fetchers.every((f) => portfolio_core_1.networks[f.networkId].addressSystem === addressSystem);
|
33
|
+
if (!isFetchersValids)
|
34
|
+
throw new Error(`Not all fetchers have the right address system: ${addressSystem}`);
|
35
|
+
const promises = fetchers.map((f) => runAirdropFetcher(fOwner, f, cache));
|
36
|
+
const result = yield Promise.allSettled(promises);
|
37
|
+
const fReports = [];
|
38
|
+
const airdrops = result.flatMap((r, index) => {
|
39
|
+
let fReport;
|
40
|
+
if (r.status === 'fulfilled') {
|
41
|
+
fReport = {
|
42
|
+
id: fetchers[index].id,
|
43
|
+
status: 'succeeded',
|
44
|
+
duration: r.value.duration,
|
45
|
+
error: undefined,
|
46
|
+
};
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
fReport = {
|
50
|
+
id: fetchers[index].id,
|
51
|
+
status: 'failed',
|
52
|
+
duration: undefined,
|
53
|
+
error: r.reason.message || 'Unknown error',
|
54
|
+
};
|
55
|
+
}
|
56
|
+
fReports.push(fReport);
|
57
|
+
if (r.status === 'rejected')
|
58
|
+
return [];
|
59
|
+
return r.value.airdrop;
|
60
|
+
});
|
61
|
+
return {
|
62
|
+
date: Date.now(),
|
63
|
+
owner: fOwner,
|
64
|
+
addressSystem,
|
65
|
+
fetcherReports: fReports,
|
66
|
+
airdrops,
|
67
|
+
};
|
68
|
+
});
|
69
|
+
}
|
70
|
+
exports.runAirdropFetchers = runAirdropFetchers;
|
71
|
+
function runAirdropFetcher(owner, fetcher, cache) {
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
73
|
+
const startDate = Date.now();
|
74
|
+
const fOwner = (0, portfolio_core_1.formatAddressByNetworkId)(owner, fetcher.networkId);
|
75
|
+
const fetcherPromise = fetcher
|
76
|
+
.executor(fOwner, cache)
|
77
|
+
.then((airdrop) => {
|
78
|
+
const now = Date.now();
|
79
|
+
return {
|
80
|
+
owner: fOwner,
|
81
|
+
fetcherId: fetcher.id,
|
82
|
+
networdkId: fetcher.networkId,
|
83
|
+
duration: now - startDate,
|
84
|
+
airdrop,
|
85
|
+
date: now,
|
86
|
+
};
|
87
|
+
});
|
88
|
+
return (0, promiseTimeout_1.default)(fetcherPromise, runAirdropFetcherTimeout, `Fetcher timed out: ${fetcher.id}`);
|
89
|
+
});
|
90
|
+
}
|
91
|
+
exports.runAirdropFetcher = runAirdropFetcher;
|
92
|
+
//# sourceMappingURL=AirdropFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAUoC;AAEpC,iFAAyD;AAazD,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;QAC9C,OAAO,kBAAkB,CAAC,KAAK,EAAE,aAAa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form } from '@sonarwatch/portfolio-core';
|
2
2
|
import { Fetcher } from './Fetcher';
|
3
|
+
import { AirdropFetcher } from './AirdropFetcher';
|
3
4
|
import { Job } from './Job';
|
4
5
|
export { walletTokensPlatform, walletNftsPlatform, } from './plugins/tokens/constants';
|
5
6
|
export { getFetchersByAddressSystem } from './utils/misc/getFetchersByAddressSystem';
|
6
7
|
export * from './Cache';
|
7
8
|
export * from './Fetcher';
|
9
|
+
export * from './AirdropFetcher';
|
8
10
|
export * from './Job';
|
9
11
|
export * from './utils/name-service';
|
10
12
|
export * from './utils/blank';
|
@@ -13,3 +15,4 @@ export declare const platforms: Platform[];
|
|
13
15
|
export declare const jobs: Job[];
|
14
16
|
export declare const fetchers: Fetcher[];
|
15
17
|
export declare const fetchersByAddressSystem: Record<import("@sonarwatch/portfolio-core").AddressSystemType, Fetcher[]>;
|
18
|
+
export declare const airdropFetchers: AirdropFetcher[];
|
package/src/index.js
CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.fetchersByAddressSystem = exports.fetchers = exports.jobs = exports.platforms = exports.getLlamaProtocolsJob = exports.getFetchersByAddressSystem = exports.walletNftsPlatform = exports.walletTokensPlatform = void 0;
|
20
|
+
exports.airdropFetchers = exports.fetchersByAddressSystem = exports.fetchers = exports.jobs = exports.platforms = exports.getLlamaProtocolsJob = exports.getFetchersByAddressSystem = exports.walletNftsPlatform = exports.walletTokensPlatform = void 0;
|
21
21
|
const getFetchersByAddressSystem_1 = require("./utils/misc/getFetchersByAddressSystem");
|
22
22
|
const orphanPlatorms_1 = __importDefault(require("./orphanPlatorms"));
|
23
23
|
const tokens_1 = require("./plugins/tokens");
|
@@ -107,6 +107,7 @@ const nosana_1 = require("./plugins/nosana");
|
|
107
107
|
const jito_1 = require("./plugins/jito");
|
108
108
|
const magiceden_1 = require("./plugins/magiceden");
|
109
109
|
const clone_1 = require("./plugins/clone");
|
110
|
+
const sandglass_1 = require("./plugins/sandglass");
|
110
111
|
var constants_1 = require("./plugins/tokens/constants");
|
111
112
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
112
113
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -114,6 +115,7 @@ var getFetchersByAddressSystem_2 = require("./utils/misc/getFetchersByAddressSys
|
|
114
115
|
Object.defineProperty(exports, "getFetchersByAddressSystem", { enumerable: true, get: function () { return getFetchersByAddressSystem_2.getFetchersByAddressSystem; } });
|
115
116
|
__exportStar(require("./Cache"), exports);
|
116
117
|
__exportStar(require("./Fetcher"), exports);
|
118
|
+
__exportStar(require("./AirdropFetcher"), exports);
|
117
119
|
__exportStar(require("./Job"), exports);
|
118
120
|
__exportStar(require("./utils/name-service"), exports);
|
119
121
|
__exportStar(require("./utils/blank"), exports);
|
@@ -206,6 +208,7 @@ exports.platforms = [
|
|
206
208
|
...jito_1.platforms,
|
207
209
|
...magiceden_1.platforms,
|
208
210
|
...clone_1.platforms,
|
211
|
+
...sandglass_1.platforms,
|
209
212
|
];
|
210
213
|
// JOBS //
|
211
214
|
exports.jobs = [
|
@@ -289,6 +292,7 @@ exports.jobs = [
|
|
289
292
|
...magiceden_1.jobs,
|
290
293
|
...clone_1.jobs,
|
291
294
|
...switchboard_1.jobs,
|
295
|
+
...sandglass_1.jobs,
|
292
296
|
];
|
293
297
|
// FETCHERS //
|
294
298
|
exports.fetchers = [
|
@@ -308,6 +312,7 @@ exports.fetchers = [
|
|
308
312
|
...turbos_1.fetchers,
|
309
313
|
...staking_aptos_1.fetchers,
|
310
314
|
...pancakeswap_1.fetchers,
|
315
|
+
...aftermath_1.fetchers,
|
311
316
|
...aave_1.fetchers,
|
312
317
|
...orders_1.fetchers,
|
313
318
|
...morpho_1.fetchers,
|
@@ -373,6 +378,11 @@ exports.fetchers = [
|
|
373
378
|
...jito_1.fetchers,
|
374
379
|
...magiceden_1.fetchers,
|
375
380
|
...clone_1.fetchers,
|
381
|
+
...sandglass_1.fetchers,
|
376
382
|
];
|
377
383
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
384
|
+
exports.airdropFetchers = [
|
385
|
+
drift_1.airdropFetcher,
|
386
|
+
parcl_1.airdropFetcher,
|
387
|
+
];
|
378
388
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;A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AAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,eAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;CACrB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,sBAAmB;IACnB,sBAAmB;CACpB,CAAC"}
|
@@ -2,3 +2,5 @@ import { Platform } from '@sonarwatch/portfolio-core';
|
|
2
2
|
export declare const platformId = "aftermath";
|
3
3
|
export declare const platform: Platform;
|
4
4
|
export declare const lpCoinsTable = "0x7f3bb65251feccacc7f48461239be1008233b85594114f7bf304e5e5b340bf59";
|
5
|
+
export declare const stakingPackageId = "0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b";
|
6
|
+
export declare const stakingType = "0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b::staked_position::StakedPosition";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.lpCoinsTable = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.stakingType = exports.stakingPackageId = exports.lpCoinsTable = exports.platform = exports.platformId = void 0;
|
4
4
|
exports.platformId = 'aftermath';
|
5
5
|
exports.platform = {
|
6
6
|
id: exports.platformId,
|
@@ -10,4 +10,6 @@ exports.platform = {
|
|
10
10
|
website: 'https://aftermath.finance/',
|
11
11
|
};
|
12
12
|
exports.lpCoinsTable = '0x7f3bb65251feccacc7f48461239be1008233b85594114f7bf304e5e5b340bf59';
|
13
|
+
exports.stakingPackageId = '0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b';
|
14
|
+
exports.stakingType = `${exports.stakingPackageId}::staked_position::StakedPosition`;
|
13
15
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,WAAW,CAAC;AAEzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iDAAiD;IACxD,WAAW,EAAE,0BAA0B;IACvC,OAAO,EAAE,4BAA4B;CACtC,CAAC;AAEW,QAAA,YAAY,GACvB,oEAAoE,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,WAAW,CAAC;AAEzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iDAAiD;IACxD,WAAW,EAAE,0BAA0B;IACvC,OAAO,EAAE,4BAA4B;CACtC,CAAC;AAEW,QAAA,YAAY,GACvB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAE1D,QAAA,WAAW,GAAG,GAAG,wBAAgB,mCAAmC,CAAC"}
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const poolsJob_1 = __importDefault(require("./poolsJob"));
|
8
8
|
const constants_1 = require("./constants");
|
9
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
10
|
exports.platforms = [constants_1.platform];
|
10
11
|
exports.jobs = [poolsJob_1.default];
|
11
|
-
exports.fetchers = [];
|
12
|
+
exports.fetchers = [stakingFetcher_1.default];
|
12
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,2CAAuC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,kBAAQ,CAAC,CAAC;AACzB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,102 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const clients_1 = require("../../utils/clients");
|
19
|
+
const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
|
20
|
+
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
21
|
+
const aptos_1 = require("../../utils/aptos");
|
22
|
+
const tokenPriceToAssetTokens_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetTokens"));
|
23
|
+
const farmFactor = new bignumber_js_1.default(Math.pow(10, 9));
|
24
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
+
var _a;
|
26
|
+
const client = (0, clients_1.getClientSui)();
|
27
|
+
const stakedPositions = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
|
28
|
+
filter: {
|
29
|
+
StructType: constants_1.stakingType,
|
30
|
+
},
|
31
|
+
options: {
|
32
|
+
showContent: true,
|
33
|
+
},
|
34
|
+
});
|
35
|
+
if (stakedPositions.length === 0)
|
36
|
+
return [];
|
37
|
+
const burnerVaults = stakedPositions.map((object) => {
|
38
|
+
var _a, _b;
|
39
|
+
if ((_b = (_a = object.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.afterburner_vault_id)
|
40
|
+
return object.data.content.fields.afterburner_vault_id;
|
41
|
+
return '';
|
42
|
+
});
|
43
|
+
const burnerVaultsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, burnerVaults);
|
44
|
+
const burnerVaultsTypes = burnerVaultsObjects.map((vault) => { var _a; return (_a = vault.data) === null || _a === void 0 ? void 0 : _a.type; });
|
45
|
+
const lpMints = burnerVaultsTypes
|
46
|
+
.map((type) => {
|
47
|
+
var _a, _b;
|
48
|
+
if (!type)
|
49
|
+
return undefined;
|
50
|
+
const lp = (_b = (_a = (0, aptos_1.parseTypeString)(type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
|
51
|
+
if (!lp || !lp.includes('af_lp'))
|
52
|
+
return undefined;
|
53
|
+
return (0, portfolio_core_1.formatTokenAddress)(lp, portfolio_core_1.NetworkId.sui);
|
54
|
+
})
|
55
|
+
.flat();
|
56
|
+
const lpTokenPriceById = yield cache.getTokenPricesAsMap(lpMints.map((lp) => (lp !== undefined ? lp : [])).flat(), portfolio_core_1.NetworkId.sui);
|
57
|
+
const liquidities = [];
|
58
|
+
for (let i = 0; i < stakedPositions.length; i++) {
|
59
|
+
const object = stakedPositions[i];
|
60
|
+
if (!((_a = object.data) === null || _a === void 0 ? void 0 : _a.content))
|
61
|
+
continue;
|
62
|
+
const lp = lpMints[i];
|
63
|
+
if (!lp)
|
64
|
+
continue;
|
65
|
+
const lpPrice = lpTokenPriceById.get(lp);
|
66
|
+
if (!lpPrice)
|
67
|
+
continue;
|
68
|
+
const position = object.data.content.fields;
|
69
|
+
const amount = new bignumber_js_1.default(position.balance)
|
70
|
+
.dividedBy(farmFactor)
|
71
|
+
.toNumber();
|
72
|
+
const assets = (0, tokenPriceToAssetTokens_1.default)(lpPrice.address, amount, portfolio_core_1.NetworkId.sui, lpPrice);
|
73
|
+
const value = (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value));
|
74
|
+
liquidities.push({
|
75
|
+
assets,
|
76
|
+
assetsValue: value,
|
77
|
+
rewardAssets: [],
|
78
|
+
rewardAssetsValue: null,
|
79
|
+
value,
|
80
|
+
yields: [],
|
81
|
+
});
|
82
|
+
}
|
83
|
+
if (liquidities.length === 0)
|
84
|
+
return [];
|
85
|
+
return [
|
86
|
+
{
|
87
|
+
type: 'liquidity',
|
88
|
+
data: { liquidities },
|
89
|
+
label: 'Farming',
|
90
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
91
|
+
platformId: constants_1.platformId,
|
92
|
+
value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((liq) => liq.value)),
|
93
|
+
},
|
94
|
+
];
|
95
|
+
});
|
96
|
+
const fetcher = {
|
97
|
+
id: `${constants_1.platformId}-staking`,
|
98
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
99
|
+
executor,
|
100
|
+
};
|
101
|
+
exports.default = fetcher;
|
102
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AACnD,qEAAkE;AAElE,qEAAkE;AAClE,6CAAoD;AACpD,uGAA+E;AAE/E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAe,EAC3C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE;YACN,UAAU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X,CAAC,CAAC;IACL,CAAC;IAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAExC,OAAO;QACL;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE;YACrB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC3D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -31,3 +31,20 @@ export type PoolInfo = {
|
|
31
31
|
type_names: string[];
|
32
32
|
weights: string[];
|
33
33
|
};
|
34
|
+
export type StakingPosition = {
|
35
|
+
afterburner_vault_id: string;
|
36
|
+
balance: string;
|
37
|
+
base_rewards_accumulated: string[];
|
38
|
+
base_rewards_debt: string[];
|
39
|
+
id: ID;
|
40
|
+
last_reward_timestamp_ms: string;
|
41
|
+
lock_duration_ms: string;
|
42
|
+
lock_multiplier: string;
|
43
|
+
lock_start_timestamp_ms: string;
|
44
|
+
multiplier_rewards_accumulated: string[];
|
45
|
+
multiplier_rewards_debt: string[];
|
46
|
+
multiplier_staked_amount: string;
|
47
|
+
};
|
48
|
+
export type ID = {
|
49
|
+
id: string;
|
50
|
+
};
|
@@ -0,0 +1,65 @@
|
|
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
|
+
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
|
+
const helpersAirdrop_1 = require("./helpersAirdrop");
|
19
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
// const client = getClientSolana();
|
21
|
+
// const claimStatus = deriveClaimStatus(owner, res.data.merkle_tree, '');
|
22
|
+
// const account = await client.getAccountInfo(claimStatus);
|
23
|
+
// if (account) return [];
|
24
|
+
const amount = yield (0, helpersAirdrop_1.fetchAirdropAmount)(owner);
|
25
|
+
if (amount === 0)
|
26
|
+
return [];
|
27
|
+
const tokenPrice = constants_1.driftMint
|
28
|
+
? yield cache.getTokenPrice(constants_1.driftMint, portfolio_core_1.NetworkId.solana)
|
29
|
+
: undefined;
|
30
|
+
const asset = tokenPrice
|
31
|
+
? (0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, portfolio_core_1.NetworkId.solana, tokenPrice)
|
32
|
+
: {
|
33
|
+
type: 'generic',
|
34
|
+
data: {
|
35
|
+
amount,
|
36
|
+
name: 'DRIFT',
|
37
|
+
price: null,
|
38
|
+
imageUri: constants_1.platform.image,
|
39
|
+
},
|
40
|
+
attributes: {
|
41
|
+
lockedUntil: -1,
|
42
|
+
},
|
43
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
44
|
+
value: null,
|
45
|
+
};
|
46
|
+
return [
|
47
|
+
{
|
48
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
49
|
+
platformId: constants_1.platformId,
|
50
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
51
|
+
data: {
|
52
|
+
assets: [asset],
|
53
|
+
},
|
54
|
+
value: null,
|
55
|
+
label: 'Airdrop',
|
56
|
+
},
|
57
|
+
];
|
58
|
+
});
|
59
|
+
const fetcher = {
|
60
|
+
id: `${constants_1.platformId}-airdrop`,
|
61
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
62
|
+
executor,
|
63
|
+
};
|
64
|
+
exports.default = fetcher;
|
65
|
+
//# sourceMappingURL=airdropFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAGpC,2CAA8D;AAC9D,qGAA6E;AAC7E,qDAAsD;AAEtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,oCAAoC;IACpC,0EAA0E;IAC1E,4DAA4D;IAC5D,0BAA0B;IAE1B,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAkB,EAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,UAAU,GAAG,qBAAS;QAC1B,CAAC,CAAC,MAAM,KAAK,CAAC,aAAa,CAAC,qBAAS,EAAE,0BAAS,CAAC,MAAM,CAAC;QACxD,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,KAAK,GAAmB,UAAU;QACtC,CAAC,CAAC,IAAA,gCAAsB,EACpB,UAAU,CAAC,OAAO,EAClB,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX;QACH,CAAC,CAAC;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE;gBACJ,MAAM;gBACN,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;gBACX,QAAQ,EAAE,oBAAQ,CAAC,KAAK;aACzB;YACD,UAAU,EAAE;gBACV,WAAW,EAAE,CAAC,CAAC;aAChB;YACD,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,IAAI;SACZ,CAAC;IAEN,OAAO;QACL;YACE,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,SAAS;SACjB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,7 +1,13 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
3
|
export declare const platformId = "drift";
|
4
|
+
export declare const platformName = "Drift";
|
5
|
+
export declare const platformImage = "https://sonar.watch/img/platforms/drift.png";
|
6
|
+
export declare const platformWebsite = "https://www.drift.trade/";
|
4
7
|
export declare const platform: Platform;
|
5
8
|
export declare const prefixSpotMarkets = "drift-spotMarkets";
|
6
9
|
export declare const driftProgram: PublicKey;
|
7
10
|
export declare const preMarketPriceKey = "premarketPrice";
|
11
|
+
export declare const airdropUrl = "https://airdrop.drift.trade/eligibility/";
|
12
|
+
export declare const driftDecimals = 6;
|
13
|
+
export declare const driftMint: undefined;
|
@@ -1,16 +1,22 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.preMarketPriceKey = exports.driftProgram = exports.prefixSpotMarkets = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.driftMint = exports.driftDecimals = exports.airdropUrl = 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
|
+
exports.platformName = 'Drift';
|
7
|
+
exports.platformImage = 'https://sonar.watch/img/platforms/drift.png';
|
8
|
+
exports.platformWebsite = 'https://www.drift.trade/';
|
6
9
|
exports.platform = {
|
7
10
|
id: exports.platformId,
|
8
|
-
name:
|
9
|
-
image:
|
11
|
+
name: exports.platformName,
|
12
|
+
image: exports.platformImage,
|
10
13
|
defiLlamaId: 'drift',
|
11
|
-
website:
|
14
|
+
website: exports.platformWebsite,
|
12
15
|
};
|
13
16
|
exports.prefixSpotMarkets = `${exports.platformId}-spotMarkets`;
|
14
17
|
exports.driftProgram = new web3_js_1.PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH');
|
15
18
|
exports.preMarketPriceKey = 'premarketPrice';
|
19
|
+
exports.airdropUrl = 'https://airdrop.drift.trade/eligibility/';
|
20
|
+
exports.driftDecimals = 6;
|
21
|
+
exports.driftMint = undefined;
|
16
22
|
//# 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;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,YAAY,GAAG,OAAO,CAAC;AACvB,QAAA,aAAa,GAAG,6CAA6C,CAAC;AAC9D,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;AAErC,QAAA,UAAU,GAAG,0CAA0C,CAAC;AACxD,QAAA,aAAa,GAAG,CAAC,CAAC;AAClB,QAAA,SAAS,GAAG,SAAS,CAAC"}
|
@@ -0,0 +1,59 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.airdropFetcher = exports.fetchAirdropAmount = void 0;
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
18
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
19
|
+
const constants_1 = require("./constants");
|
20
|
+
const driftFactor = new bignumber_js_1.default(Math.pow(10, constants_1.driftDecimals));
|
21
|
+
function fetchAirdropAmount(owner) {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const res = yield axios_1.default.get(constants_1.airdropUrl + owner, {
|
24
|
+
headers: {
|
25
|
+
Origin: 'https://drift.foundation',
|
26
|
+
Referer: 'https://drift.foundation/',
|
27
|
+
},
|
28
|
+
timeout: 1000,
|
29
|
+
validateStatus(status) {
|
30
|
+
return status === 404 || status === 200;
|
31
|
+
},
|
32
|
+
});
|
33
|
+
return new bignumber_js_1.default(res.data.start_amount || 0)
|
34
|
+
.dividedBy(driftFactor)
|
35
|
+
.toNumber();
|
36
|
+
});
|
37
|
+
}
|
38
|
+
exports.fetchAirdropAmount = fetchAirdropAmount;
|
39
|
+
const airdropStatics = {
|
40
|
+
claimLink: 'https://drift.foundation/eligibility',
|
41
|
+
id: 'drift-airdrop-1',
|
42
|
+
image: constants_1.platformImage,
|
43
|
+
label: 'DRIFT',
|
44
|
+
name: undefined,
|
45
|
+
organizerName: constants_1.platformName,
|
46
|
+
organizerLink: constants_1.platformWebsite,
|
47
|
+
claimStart: undefined,
|
48
|
+
claimEnd: undefined,
|
49
|
+
};
|
50
|
+
const fetchAirdropExecutor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
51
|
+
const amount = yield fetchAirdropAmount(owner);
|
52
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, airdropStatics), { amount }), (0, portfolio_core_1.getAirdropStatus)(airdropStatics.claimStart, airdropStatics.claimEnd, amount)), { price: null });
|
53
|
+
});
|
54
|
+
exports.airdropFetcher = {
|
55
|
+
id: airdropStatics.id,
|
56
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
57
|
+
executor: fetchAirdropExecutor,
|
58
|
+
};
|
59
|
+
//# sourceMappingURL=helpersAirdrop.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAAyE;AACzE,2CAMqB;AAIrB,MAAM,WAAW,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC;AACvD,SAAsB,kBAAkB,CAAC,KAAa;;QACpD,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;YAC1C,CAAC;SACF,CACF,CAAC;QACF,OAAO,IAAI,sBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC;aAC7C,SAAS,CAAC,WAAW,CAAC;aACtB,QAAQ,EAAE,CAAC;IAChB,CAAC;CAAA;AAjBD,gDAiBC;AAED,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE,sCAAsC;IACjD,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,yBAAa;IACpB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,SAAS;IACf,aAAa,EAAE,wBAAY;IAC3B,aAAa,EAAE,2BAAe;IAC9B,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,SAAS;CACpB,CAAC;AACF,MAAM,oBAAoB,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,mEACK,cAAc,KACjB,M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