@sonarwatch/portfolio-plugins 0.14.136 → 0.14.137
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 +2156 -2152
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +0 -4
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/drift/depositsFetcher.js +1 -1
- package/src/plugins/drift/depositsFetcher.js.map +1 -1
- package/src/plugins/drift/perpHelpers/margin.js +8 -1
- package/src/plugins/drift/perpHelpers/margin.js.map +1 -1
- package/src/plugins/drift/perpHelpers/position.js +1 -0
- package/src/plugins/drift/perpHelpers/position.js.map +1 -1
- package/src/plugins/drift/perpHelpers/pyth.js +5 -3
- package/src/plugins/drift/perpHelpers/pyth.js.map +1 -1
- package/src/plugins/drift/perpHelpers/switchboard_on_demand.js +2 -1
- package/src/plugins/drift/perpHelpers/switchboard_on_demand.js.map +1 -1
- package/src/plugins/drift/perpHelpers/types.d.ts +1 -0
- package/src/plugins/drift/perpHelpers/types.js.map +1 -1
- package/src/plugins/echelon/index.js +3 -9
- package/src/plugins/echelon/index.js.map +1 -1
- package/src/plugins/iloop/depositsFetcher.js +8 -15
- package/src/plugins/iloop/depositsFetcher.js.map +1 -1
- package/src/plugins/iloop/structs.d.ts +1 -1
- package/src/plugins/iloop/structs.js +1 -1
- package/src/plugins/iloop/structs.js.map +1 -1
- package/src/plugins/kamino/ordersFetcher.js +14 -13
- package/src/plugins/kamino/ordersFetcher.js.map +1 -1
- package/src/plugins/kamino/structs/order.d.ts +6 -1
- package/src/plugins/kamino/structs/order.js +7 -1
- package/src/plugins/kamino/structs/order.js.map +1 -1
- package/src/plugins/kriya/constants.d.ts +3 -3
- package/src/plugins/kriya/constants.js +3 -3
- package/src/plugins/kriya/constants.js.map +1 -1
- package/src/plugins/kriya/poolsFarmsV2Job.js +2 -6
- package/src/plugins/kriya/poolsFarmsV2Job.js.map +1 -1
- package/src/plugins/kriya/poolsV3Fetcher.js +1 -1
- package/src/plugins/kriya/poolsV3Fetcher.js.map +1 -1
- package/src/plugins/kriya/poolsV3StatsJob.js +5 -8
- package/src/plugins/kriya/poolsV3StatsJob.js.map +1 -1
- package/src/plugins/kriya/strategyLeverageLendingFetcher.js +2 -2
- package/src/plugins/kriya/strategyLeverageLendingFetcher.js.map +1 -1
- package/src/plugins/kriya/strategyLeverageLendingJob.js +2 -4
- package/src/plugins/kriya/strategyLeverageLendingJob.js.map +1 -1
- package/src/plugins/kriya/types/pools.d.ts +3 -4
- package/src/plugins/kriya/types/vaults.d.ts +5 -4
- package/src/plugins/lulo/depositsFetcher.js +2 -2
- package/src/plugins/lulo/depositsFetcher.js.map +1 -1
- package/src/plugins/solayer/airdropFetcher.js +17 -1
- package/src/plugins/solayer/airdropFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -16,21 +16,17 @@ const axios_1 = __importDefault(require("axios"));
|
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
-
const pools = yield axios_1.default
|
20
|
-
.get(constants_1.poolsUrl, {
|
19
|
+
const pools = yield axios_1.default.get(constants_1.poolsUrl, {
|
21
20
|
headers: {
|
22
21
|
Origin: 'https://www.app.kriya.finance/',
|
23
22
|
Referer: 'https://www.app.kriya.finance',
|
24
23
|
'X-Api-Key': '5cWNE5fK92jWsfeidBCD4eMBP23TYPL1Xdo3Bew9',
|
25
24
|
},
|
26
|
-
})
|
27
|
-
.catch((er) => {
|
28
|
-
throw new Error(`[Kriya] Unable to get pools info from APi. \n Error : ${er}`);
|
29
25
|
});
|
30
26
|
if (!pools)
|
31
27
|
return;
|
32
28
|
const poolsInfo = [];
|
33
|
-
for (const pool of pools.data) {
|
29
|
+
for (const pool of pools.data.data) {
|
34
30
|
if (pool.lspSupply === '0')
|
35
31
|
continue;
|
36
32
|
poolsInfo.push(pool);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsFarmsV2Job.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/poolsFarmsV2Job.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAAmE;AAGnE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,KAAK,
|
1
|
+
{"version":3,"file":"poolsFarmsV2Job.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/poolsFarmsV2Job.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAAmE;AAGnE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,KAAK,GAA+C,MAAM,eAAK,CAAC,GAAG,CACvE,oBAAQ,EACR;QACE,OAAO,EAAE;YACP,MAAM,EAAE,gCAAgC;YACxC,OAAO,EAAE,+BAA+B;YACxC,WAAW,EAAE,0CAA0C;SACxD;KACF,CACF,CAAC;IAEF,IAAI,CAAC,KAAK;QAAE,OAAO;IAEnB,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,SAAS,KAAK,GAAG;YAAE,SAAS;QAErC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,0BAAc,EAAE,SAAS,EAAE;QAC7C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -64,7 +64,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
64
64
|
currentSqrtPrice: pool.sqrt_price,
|
65
65
|
poolLiquidity: pool.liquidity,
|
66
66
|
feeRate: Number(pool.swap_fee_rate) / 10000,
|
67
|
-
swapVolume24h: (_a = (poolsStats || []).find((p) => p.
|
67
|
+
swapVolume24h: (_a = (poolsStats || []).find((p) => p.poolId === clmmPosition.pool_id)) === null || _a === void 0 ? void 0 : _a.volume24h,
|
68
68
|
});
|
69
69
|
});
|
70
70
|
return elementRegistry.getElements(cache);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsV3Fetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/poolsV3Fetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAwE;AACxE,iDAAmD;AACnD,qEAAkE;AAClE,gFAA6E;AAC7E,+DAA4D;AAE5D,uFAAoF;AAEpF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,MAAM,IAAA,mDAAwB,EAAe,MAAM,EAAE,KAAK,EAAE;QAC3E,MAAM,EAAE,EAAE,UAAU,EAAE,oBAAQ,EAAE;KACjC,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,aAAa,GAAmB,EAAE,CAAC;IACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAA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C,CAAC,CAAC;IAEH,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,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -16,18 +16,15 @@ const axios_1 = __importDefault(require("axios"));
|
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
-
const apiRes = yield axios_1.default
|
20
|
-
.get(constants_1.poolsStats)
|
21
|
-
.catch(() => null);
|
19
|
+
const apiRes = yield axios_1.default.get(constants_1.poolsStats);
|
22
20
|
if (!apiRes)
|
23
21
|
return;
|
24
22
|
const poolsInfo = [];
|
25
|
-
for (const pool of apiRes.data) {
|
23
|
+
for (const pool of apiRes.data.data) {
|
26
24
|
poolsInfo.push({
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
fee_rate: pool.fee_rate,
|
25
|
+
poolId: pool.poolId,
|
26
|
+
volume24h: pool.volume24h,
|
27
|
+
fees24h: pool.fees24h,
|
31
28
|
apy: pool.apy,
|
32
29
|
tvl: pool.tvl,
|
33
30
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsV3StatsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/poolsV3StatsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA0E;AAG1E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"poolsV3StatsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/poolsV3StatsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA0E;AAG1E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAA+C,MAAM,eAAK,CAAC,GAAG,CACxE,sBAAU,CACX,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACpC,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,+BAAmB,EAAE,SAAS,EAAE;QAClD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -28,7 +28,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
28
28
|
const leverageVaults = yield leverageVaultsMemo.getItem(cache);
|
29
29
|
const receipts = yield (0, getOwnedObjectsPreloaded_1.getOwnedObjectsPreloaded)(client, owner, {
|
30
30
|
filter: {
|
31
|
-
MatchAny: Array.from(new Set(leverageVaults.map((v) => v.
|
31
|
+
MatchAny: Array.from(new Set(leverageVaults.map((v) => { var _a; return (_a = v.farm) === null || _a === void 0 ? void 0 : _a.vtType; })))
|
32
32
|
.map((s) => s
|
33
33
|
? {
|
34
34
|
StructType: s,
|
@@ -49,7 +49,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
49
49
|
throw new Error(`Unsupported receipt type ${(_b = receipt.data) === null || _b === void 0 ? void 0 : _b.type}`);
|
50
50
|
}
|
51
51
|
const receiptContent = (_c = receipt.data) === null || _c === void 0 ? void 0 : _c.content;
|
52
|
-
const vault = leverageVaults.find((v) => v.
|
52
|
+
const vault = leverageVaults.find((v) => v.farm.id === receiptContent.fields.farm_id);
|
53
53
|
if (!vault)
|
54
54
|
return;
|
55
55
|
const sharesPercentage = new bignumber_js_1.default(receiptContent.fields.shares).dividedBy(vault.lpSupply);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"strategyLeverageLendingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/strategyLeverageLendingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAuE;AACvE,iDAAmD;AAEnD,kEAA+D;AAC/D,uFAAoF;AACpF,gFAA6E;AAG7E,MAAM,kBAAkB,GAAG,IAAI,6BAAa,CAC1C,wCAA4B,EAC5B;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;CACzB,CACF,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAE/D,MAAM,QAAQ,GAAG,MAAM,IAAA,mDAAwB,EAAC,MAAM,EAAE,KAAK,EAAE;QAC7D,MAAM,EAAE;YACN,QAAQ,EAAE,KAAK,CAAC,IAAI,
|
1
|
+
{"version":3,"file":"strategyLeverageLendingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plug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CAAC,CAAC,QAAQ,EAAE;YACjE,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,4BAA4B;IAC7C,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -16,12 +16,10 @@ const axios_1 = __importDefault(require("axios"));
|
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
-
const
|
20
|
-
axios_1.default.get(constants_1.leverageLendingVaultsUrl).catch(() => null),
|
21
|
-
]);
|
19
|
+
const leverageLendingVaults = yield axios_1.default.get(constants_1.leverageLendingVaultsUrl);
|
22
20
|
if (!leverageLendingVaults)
|
23
21
|
return;
|
24
|
-
yield cache.setItem(constants_1.leverageLendingVaultsInfoKey, leverageLendingVaults.data, {
|
22
|
+
yield cache.setItem(constants_1.leverageLendingVaultsInfoKey, leverageLendingVaults.data.data, {
|
25
23
|
prefix: constants_1.platformId,
|
26
24
|
networkId: portfolio_core_1.NetworkId.sui,
|
27
25
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"strategyLeverageLendingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/strategyLeverageLendingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAAuD;AAGvD,2CAIqB;AAGrB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,
|
1
|
+
{"version":3,"file":"strategyLeverageLendingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/strategyLeverageLendingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAAuD;AAGvD,2CAIqB;AAGrB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,qBAAqB,GAAG,MAAM,eAAK,CAAC,GAAG,CAC3C,oCAAwB,CACzB,CAAC;IAEF,IAAI,CAAC,qBAAqB;QAAE,OAAO;IAEnC,MAAM,KAAK,CAAC,OAAO,CACjB,wCAA4B,EAC5B,qBAAqB,CAAC,IAAI,CAAC,IAAI,EAC/B;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,4BAA4B;IAC7C,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -130,10 +130,9 @@ export type TickBitmapFields = {
|
|
130
130
|
size: string;
|
131
131
|
};
|
132
132
|
export type PoolStat = {
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
fee_rate: string;
|
133
|
+
poolId: string;
|
134
|
+
volume24h: string;
|
135
|
+
fees24h: string;
|
137
136
|
tvl: string;
|
138
137
|
apy: string;
|
139
138
|
};
|
@@ -107,10 +107,12 @@ export type LeverageVaultInfo = {
|
|
107
107
|
depositedA: string;
|
108
108
|
apr: string;
|
109
109
|
borrowedBUsd: string;
|
110
|
-
|
110
|
+
farm: {
|
111
|
+
id: string;
|
112
|
+
vtType: string;
|
113
|
+
};
|
111
114
|
decimalA: string;
|
112
115
|
createdAt: string;
|
113
|
-
farmSource: string;
|
114
116
|
coinB: string;
|
115
117
|
decimalB: string;
|
116
118
|
tvl: string;
|
@@ -120,11 +122,10 @@ export type LeverageVaultInfo = {
|
|
120
122
|
depositedAUsd: string;
|
121
123
|
lpSupply: string;
|
122
124
|
vaultSource: string;
|
123
|
-
farmId: string;
|
124
125
|
fees: string;
|
125
126
|
coinA: string;
|
126
127
|
updatedAt: string;
|
127
|
-
|
128
|
+
vaultId: string;
|
128
129
|
};
|
129
130
|
export type DynFieldPositionVault = {
|
130
131
|
name: Name;
|
@@ -154,7 +154,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
154
154
|
const userBoostedAllocation = userAccount.regularAllocations[i];
|
155
155
|
lendingElement.addSuppliedAsset({
|
156
156
|
address: allocationInfo.mint,
|
157
|
-
amount: userBoostedAllocation.toNumber(),
|
157
|
+
amount: userBoostedAllocation.times(allocationInfo.lPrice).toNumber(),
|
158
158
|
attributes: {
|
159
159
|
tags: ['Boosted'],
|
160
160
|
},
|
@@ -168,7 +168,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
168
168
|
const userProtectedAllocation = userAccount.protectedAllocations[i];
|
169
169
|
lendingElement.addSuppliedAsset({
|
170
170
|
address: allocationInfo.mint,
|
171
|
-
amount: userProtectedAllocation.toNumber(),
|
171
|
+
amount: userProtectedAllocation.times(allocationInfo.pPrice).toNumber(),
|
172
172
|
attributes: {
|
173
173
|
tags: ['Protected'],
|
174
174
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,2CAAmD;AACnD,uCAA0E;AAC1E,+EAA4D;AAC5D,0EAA8D;AAC9D,mFAA6D;AAC7D,mDAA2D;AAC3D,kFAA+E;AAC/E,iDAAsD;AACtD,qCAAsE;AACtE,6CAAmD;AACnD,iDAA8E;AAE9E,6CAA6D;AAC7D,yEAA4E;AAC5E,+CAG4B;AAE5B,qDAA2D;AAC3D,iDAA4D;AAE5D,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KA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AAc,CAAC,IAAI;oBACxB,GAAG,EAAE,IAAA,yBAAQ,EAAC,cAAc,CAAC,IAAI,CAAC;iBACnC;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtD,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,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"}
|
@@ -19,7 +19,23 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
19
19
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
20
20
|
const constants_1 = require("./constants");
|
21
21
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
|
22
|
+
let res;
|
23
|
+
try {
|
24
|
+
res = yield axios_1.default.get(constants_1.airdropApi + owner);
|
25
|
+
}
|
26
|
+
catch (err) {
|
27
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
28
|
+
statics: constants_1.airdropStatics,
|
29
|
+
items: [
|
30
|
+
{
|
31
|
+
amount: 0,
|
32
|
+
isClaimed: false,
|
33
|
+
label: 'LAYER',
|
34
|
+
address: constants_1.layerMint,
|
35
|
+
},
|
36
|
+
],
|
37
|
+
});
|
38
|
+
}
|
23
39
|
if (!res.data || res.data.totalAmount === '0')
|
24
40
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
25
41
|
statics: constants_1.airdropStatics,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solayer/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAC7C,gEAAqC;AACrC,yDAK8B;AAC9B,2CAMqB;AAGrB,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solayer/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAC7C,gEAAqC;AACrC,yDAK8B;AAC9B,2CAMqB;AAGrB,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,IAAI,GAAmC,CAAC;IACxC,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,sBAAU,GAAG,KAAK,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,OAAO;oBACd,OAAO,EAAE,qBAAS;iBACnB;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,GAAG;QAC3C,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,OAAO;oBACd,OAAO,EAAE,qBAAS;iBACnB;aACF;SACF,CAAC,CAAC;IAEL,MAAM,MAAM,GAAG,IAAA,sBAAS,EAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAExE,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,0BAAc;QACvB,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,cAAc;oBACpB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC,QAAQ,EAAE;oBAClD,CAAC,CAAC,MAAM;yBACH,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;yBAC7B,SAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC;yBAC9B,QAAQ,EAAE;gBACjB,SAAS,EAAE,cAAc;gBACzB,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,qBAAS;aACnB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACW,QAAA,OAAO,GAAG,IAAA,wCAAuB,EAC5C,sBAAc,EACd,oBAAQ,CAAC,EAAE,EACX,iBAAiB,EACjB,0BAAc,CAAC,QAAQ,CACxB,CAAC"}
|
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
|
|
54
54
|
}
|
55
55
|
function getV3PairsAddresses(url, length = 300) {
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
57
|
-
const query = (0, graphql_request_1.gql) `
|
58
|
-
{
|
59
|
-
pools(
|
60
|
-
orderBy: totalValueLockedUSD
|
61
|
-
first: ${length}
|
62
|
-
orderDirection: desc
|
63
|
-
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
-
) {
|
65
|
-
id
|
66
|
-
token0Price
|
67
|
-
token1Price
|
68
|
-
liquidity
|
69
|
-
token0 {
|
70
|
-
id
|
71
|
-
totalSupply
|
72
|
-
decimals
|
73
|
-
}
|
74
|
-
token1 {
|
75
|
-
id
|
76
|
-
totalSupply
|
77
|
-
decimals
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
57
|
+
const query = (0, graphql_request_1.gql) `
|
58
|
+
{
|
59
|
+
pools(
|
60
|
+
orderBy: totalValueLockedUSD
|
61
|
+
first: ${length}
|
62
|
+
orderDirection: desc
|
63
|
+
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
+
) {
|
65
|
+
id
|
66
|
+
token0Price
|
67
|
+
token1Price
|
68
|
+
liquidity
|
69
|
+
token0 {
|
70
|
+
id
|
71
|
+
totalSupply
|
72
|
+
decimals
|
73
|
+
}
|
74
|
+
token1 {
|
75
|
+
id
|
76
|
+
totalSupply
|
77
|
+
decimals
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
81
|
`;
|
82
82
|
const res = yield (0, graphql_request_1.default)(url, query);
|
83
83
|
const pools = res.pools;
|
@@ -40,28 +40,28 @@ function getPairKey(version) {
|
|
40
40
|
exports.getPairKey = getPairKey;
|
41
41
|
function getPairsV2FromTheGraph(url, length = 300) {
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
{
|
45
|
-
pairs(
|
46
|
-
orderBy: reserveUSD
|
47
|
-
first: ${length}
|
48
|
-
orderDirection: desc
|
49
|
-
where: { trackedReserveETH_not: "0" }
|
50
|
-
) {
|
51
|
-
id
|
52
|
-
reserve0
|
53
|
-
reserve1
|
54
|
-
totalSupply
|
55
|
-
token0 {
|
56
|
-
id
|
57
|
-
decimals
|
58
|
-
}
|
59
|
-
token1 {
|
60
|
-
id
|
61
|
-
decimals
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
{
|
45
|
+
pairs(
|
46
|
+
orderBy: reserveUSD
|
47
|
+
first: ${length}
|
48
|
+
orderDirection: desc
|
49
|
+
where: { trackedReserveETH_not: "0" }
|
50
|
+
) {
|
51
|
+
id
|
52
|
+
reserve0
|
53
|
+
reserve1
|
54
|
+
totalSupply
|
55
|
+
token0 {
|
56
|
+
id
|
57
|
+
decimals
|
58
|
+
}
|
59
|
+
token1 {
|
60
|
+
id
|
61
|
+
decimals
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
65
|
`;
|
66
66
|
const res = yield (0, graphql_request_1.default)(url, query);
|
67
67
|
const pairs = res.pairs;
|
@@ -40,20 +40,20 @@ const clients_1 = require("../../utils/clients");
|
|
40
40
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
41
41
|
const helpers_1 = require("./helpers");
|
42
42
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
45
|
-
getAirdropFinalFrontend(authority: $authority) {
|
46
|
-
authority
|
47
|
-
community_allocation
|
48
|
-
eligibility
|
49
|
-
main_allocation
|
50
|
-
og_allocation
|
51
|
-
s1_allocation
|
52
|
-
s2_allocation
|
53
|
-
total_allocation
|
54
|
-
__typename
|
55
|
-
}
|
56
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
45
|
+
getAirdropFinalFrontend(authority: $authority) {
|
46
|
+
authority
|
47
|
+
community_allocation
|
48
|
+
eligibility
|
49
|
+
main_allocation
|
50
|
+
og_allocation
|
51
|
+
s1_allocation
|
52
|
+
s2_allocation
|
53
|
+
total_allocation
|
54
|
+
__typename
|
55
|
+
}
|
56
|
+
}
|
57
57
|
`;
|
58
58
|
const networkId = portfolio_core_1.NetworkId.solana;
|
59
59
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
|
4
|
-
exports.infoQueryMsg = JSON.parse(`{
|
5
|
-
"info": {}
|
4
|
+
exports.infoQueryMsg = JSON.parse(`{
|
5
|
+
"info": {}
|
6
6
|
}`);
|
7
|
-
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
-
"token_info": {}
|
7
|
+
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
+
"token_info": {}
|
9
9
|
}`);
|
10
|
-
exports.minterQueryMsg = JSON.parse(`{
|
11
|
-
"minter": {}
|
10
|
+
exports.minterQueryMsg = JSON.parse(`{
|
11
|
+
"minter": {}
|
12
12
|
}`);
|
13
|
-
exports.poolQueryMsg = JSON.parse(`{
|
14
|
-
"pool": {}
|
13
|
+
exports.poolQueryMsg = JSON.parse(`{
|
14
|
+
"pool": {}
|
15
15
|
}`);
|
16
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
function getQueryBalanceByOwner(owner) {
|
4
|
-
return JSON.parse(`{
|
5
|
-
"balance": {
|
6
|
-
"address": "${owner}"
|
7
|
-
}
|
4
|
+
return JSON.parse(`{
|
5
|
+
"balance": {
|
6
|
+
"address": "${owner}"
|
7
|
+
}
|
8
8
|
}`);
|
9
9
|
}
|
10
10
|
exports.default = getQueryBalanceByOwner;
|