@sonarwatch/portfolio-plugins 0.11.220 → 0.11.222
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1634 -1626
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/hedgehog/ammJob.d.ts +3 -0
- package/src/plugins/hedgehog/ammJob.js +119 -0
- package/src/plugins/hedgehog/ammJob.js.map +1 -0
- package/src/plugins/hedgehog/constants.d.ts +6 -0
- package/src/plugins/hedgehog/constants.js +16 -0
- package/src/plugins/hedgehog/constants.js.map +1 -0
- package/src/plugins/hedgehog/index.d.ts +6 -0
- package/src/plugins/hedgehog/index.js +12 -0
- package/src/plugins/hedgehog/index.js.map +1 -0
- package/src/plugins/hedgehog/structs.d.ts +40 -0
- package/src/plugins/hedgehog/structs.js +41 -0
- package/src/plugins/hedgehog/structs.js.map +1 -0
- package/src/plugins/orca/getWhirlpoolPositions.d.ts +3 -3
- package/src/plugins/orca/getWhirlpoolPositions.js +4 -4
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/raydium/clmmJob.js +1 -1
- package/src/plugins/raydium/clmmJob.js.map +1 -1
- package/src/plugins/raydium/constants.d.ts +1 -0
- package/src/plugins/raydium/constants.js +2 -1
- package/src/plugins/raydium/constants.js.map +1 -1
- package/src/plugins/raydium/cpmmJob.d.ts +3 -0
- package/src/plugins/raydium/cpmmJob.js +98 -0
- package/src/plugins/raydium/cpmmJob.js.map +1 -0
- package/src/plugins/raydium/filters.d.ts +2 -1
- package/src/plugins/raydium/filters.js +5 -2
- package/src/plugins/raydium/filters.js.map +1 -1
- package/src/plugins/raydium/index.js +2 -1
- package/src/plugins/raydium/index.js.map +1 -1
- package/src/plugins/raydium/structs/cpmm.d.ts +30 -0
- package/src/plugins/raydium/structs/cpmm.js +32 -0
- package/src/plugins/raydium/structs/cpmm.js.map +1 -0
- package/src/plugins/scallop/cnyAirdropFetcher.d.ts +3 -0
- package/src/plugins/scallop/cnyAirdropFetcher.js +79 -0
- package/src/plugins/scallop/cnyAirdropFetcher.js.map +1 -0
- package/src/plugins/scallop/constants.d.ts +2 -0
- package/src/plugins/scallop/constants.js +3 -1
- package/src/plugins/scallop/constants.js.map +1 -1
- package/src/plugins/scallop/index.js +2 -0
- package/src/plugins/scallop/index.js.map +1 -1
- package/src/plugins/scallop/types/data.d.ts +29 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js +39 -24
- package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js.map +1 -1
- package/src/plugins/tokens/fetchers/solana.js +2 -0
- package/src/plugins/tokens/fetchers/solana.js.map +1 -1
- package/src/plugins/tokens/types.d.ts +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/whalesmarket/constants.d.ts +5 -0
- package/src/plugins/whalesmarket/constants.js +15 -0
- package/src/plugins/whalesmarket/constants.js.map +1 -0
- package/src/plugins/whalesmarket/depositFetcher.d.ts +3 -0
- package/src/plugins/whalesmarket/depositFetcher.js +81 -0
- package/src/plugins/whalesmarket/depositFetcher.js.map +1 -0
- package/src/plugins/whalesmarket/filters.d.ts +10 -0
- package/src/plugins/whalesmarket/filters.js +16 -0
- package/src/plugins/whalesmarket/filters.js.map +1 -0
- package/src/plugins/whalesmarket/index.d.ts +6 -0
- package/src/plugins/whalesmarket/index.js +12 -0
- package/src/plugins/whalesmarket/index.js.map +1 -0
- package/src/plugins/whalesmarket/structs.d.ts +58 -0
- package/src/plugins/whalesmarket/structs.js +61 -0
- package/src/plugins/whalesmarket/structs.js.map +1 -0
- package/src/plugins/x-staking-solana/constants.d.ts +0 -2
- package/src/plugins/x-staking-solana/constants.js +3 -11
- package/src/plugins/x-staking-solana/constants.js.map +1 -1
- package/src/plugins/x-staking-solana/index.js +1 -4
- package/src/plugins/x-staking-solana/index.js.map +1 -1
- package/src/utils/misc/getLpTokenSourceRaw.js +1 -1
- package/src/utils/misc/getLpTokenSourceRaw.js.map +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js +6 -6
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -0,0 +1,98 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const constants_1 = require("./constants");
|
14
|
+
const solana_1 = require("../../utils/solana");
|
15
|
+
const clients_1 = require("../../utils/clients");
|
16
|
+
const filters_1 = require("./filters");
|
17
|
+
const cpmm_1 = require("./structs/cpmm");
|
18
|
+
const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
|
19
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const client = (0, clients_1.getClientSolana)();
|
21
|
+
const clmmPoolsInfo = yield (0, solana_1.getParsedProgramAccounts)(client, cpmm_1.poolStateStruct, constants_1.cpmmProgramId, filters_1.cpmmPoolsStateFilter);
|
22
|
+
const tokenAccountsPkeys = [];
|
23
|
+
const mints = new Set();
|
24
|
+
clmmPoolsInfo.forEach((pI) => {
|
25
|
+
mints.add(pI.token0Mint.toString());
|
26
|
+
mints.add(pI.token1Mint.toString());
|
27
|
+
tokenAccountsPkeys.push(...[pI.token0Vault, pI.token1Vault]);
|
28
|
+
});
|
29
|
+
const [tokenAccounts, tokenPriceById] = yield Promise.all([
|
30
|
+
(0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, tokenAccountsPkeys),
|
31
|
+
cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana),
|
32
|
+
]);
|
33
|
+
const tokenAccountsMap = new Map();
|
34
|
+
tokenAccounts.forEach((tA) => {
|
35
|
+
if (!tA)
|
36
|
+
return;
|
37
|
+
tokenAccountsMap.set(tA.pubkey.toString(), tA);
|
38
|
+
});
|
39
|
+
const tokenPriceSources = [];
|
40
|
+
for (let id = 0; id < clmmPoolsInfo.length; id++) {
|
41
|
+
const poolState = clmmPoolsInfo[id];
|
42
|
+
const mintA = poolState.token0Mint.toString();
|
43
|
+
const mintB = poolState.token1Mint.toString();
|
44
|
+
const tokenAccountA = tokenAccountsMap.get(poolState.token0Vault.toString());
|
45
|
+
const tokenAccountB = tokenAccountsMap.get(poolState.token1Vault.toString());
|
46
|
+
if (!tokenAccountA || !tokenAccountB)
|
47
|
+
continue;
|
48
|
+
const decimalsA = poolState.mint0Decimals;
|
49
|
+
const decimalsB = poolState.mint1Decimals;
|
50
|
+
const tokenAmountARaw = tokenAccountA.amount;
|
51
|
+
const tokenAmountBRaw = tokenAccountB.amount;
|
52
|
+
if (tokenAmountARaw.isZero() && tokenAmountBRaw.isZero())
|
53
|
+
continue;
|
54
|
+
const [tokenPriceA, tokenPriceB] = [
|
55
|
+
tokenPriceById.get(mintA),
|
56
|
+
tokenPriceById.get(mintB),
|
57
|
+
];
|
58
|
+
const { lpMint, lpMintDecimals, lpSupply } = poolState;
|
59
|
+
if (lpSupply.isZero())
|
60
|
+
continue;
|
61
|
+
tokenPriceSources.push(...(0, getLpTokenSourceRaw_1.getLpTokenSourceRaw)({
|
62
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
63
|
+
lpDetails: {
|
64
|
+
address: lpMint.toString(),
|
65
|
+
decimals: lpMintDecimals,
|
66
|
+
supplyRaw: lpSupply,
|
67
|
+
},
|
68
|
+
poolUnderlyingsRaw: [
|
69
|
+
{
|
70
|
+
address: mintA,
|
71
|
+
decimals: decimalsA,
|
72
|
+
tokenPrice: tokenPriceA,
|
73
|
+
reserveAmountRaw: tokenAmountARaw,
|
74
|
+
weight: 0.5,
|
75
|
+
},
|
76
|
+
{
|
77
|
+
address: mintB,
|
78
|
+
decimals: decimalsB,
|
79
|
+
tokenPrice: tokenPriceB,
|
80
|
+
reserveAmountRaw: tokenAmountBRaw,
|
81
|
+
weight: 0.5,
|
82
|
+
},
|
83
|
+
],
|
84
|
+
sourceId: poolState.pubkey.toString(),
|
85
|
+
elementName: 'CPMM',
|
86
|
+
platformId: constants_1.platformId,
|
87
|
+
priceUnderlyings: true,
|
88
|
+
}));
|
89
|
+
}
|
90
|
+
yield cache.setTokenPriceSources(tokenPriceSources);
|
91
|
+
});
|
92
|
+
const job = {
|
93
|
+
id: `${constants_1.platformId}-cpmm`,
|
94
|
+
executor,
|
95
|
+
label: 'normal',
|
96
|
+
};
|
97
|
+
exports.default = job;
|
98
|
+
//# sourceMappingURL=cpmmJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cpmmJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/cpmmJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAAwD;AACxD,+CAK4B;AAC5B,iDAAsD;AAGtD,uCAAiD;AACjD,yCAAiD;AACjD,8EAA2E;AAE3E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,sBAAe,EACf,yBAAa,EACb,8BAAoB,CACrB,CAA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GAAG;iBACZ;gBACD;oBACE,OAAO,EAAE,KAAK;oBACd,QAAQ,EAAE,SAAS;oBACnB,UAAU,EAAE,WAAW;oBACvB,gBAAgB,EAAE,eAAe;oBACjC,MAAM,EAAE,GAAG;iBACZ;aACF;YACD,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE;YACrC,WAAW,EAAE,MAAM;YACnB,UAAU,EAAV,sBAAU;YACV,gBAAgB,EAAE,IAAI;SACvB,CAAC,CACH,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACtD,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { GetProgramAccountsFilter } from '@solana/web3.js';
|
2
2
|
export declare const ammV4Filter: GetProgramAccountsFilter[];
|
3
3
|
export declare const ammV5Filter: GetProgramAccountsFilter[];
|
4
|
-
export declare const
|
4
|
+
export declare const clmmPoolsStateFilter: GetProgramAccountsFilter[];
|
5
|
+
export declare const cpmmPoolsStateFilter: GetProgramAccountsFilter[];
|
5
6
|
export declare const stakingFilters: (owner: string) => GetProgramAccountsFilter[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.stakingFilters = exports.
|
3
|
+
exports.stakingFilters = exports.cpmmPoolsStateFilter = exports.clmmPoolsStateFilter = exports.ammV5Filter = exports.ammV4Filter = void 0;
|
4
4
|
const amms_1 = require("./structs/amms");
|
5
5
|
exports.ammV4Filter = [
|
6
6
|
{ dataSize: amms_1.ammInfoV4Struct.byteSize },
|
@@ -8,9 +8,12 @@ exports.ammV4Filter = [
|
|
8
8
|
exports.ammV5Filter = [
|
9
9
|
{ dataSize: amms_1.ammInfoV5Struct.byteSize },
|
10
10
|
];
|
11
|
-
exports.
|
11
|
+
exports.clmmPoolsStateFilter = [
|
12
12
|
{ dataSize: 1544 },
|
13
13
|
];
|
14
|
+
exports.cpmmPoolsStateFilter = [
|
15
|
+
{ dataSize: 637 },
|
16
|
+
];
|
14
17
|
const stakingFilters = (owner) => [
|
15
18
|
{
|
16
19
|
memcmp: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/filters.ts"],"names":[],"mappings":";;;AACA,yCAAkE;AAErD,QAAA,WAAW,GAA+B;IACrD,EAAE,QAAQ,EAAE,sBAAe,CAAC,QAAQ,EAAE;CACvC,CAAC;AAEW,QAAA,WAAW,GAA+B;IACrD,EAAE,QAAQ,EAAE,sBAAe,CAAC,QAAQ,EAAE;CACvC,CAAC;AAEW,QAAA,
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/filters.ts"],"names":[],"mappings":";;;AACA,yCAAkE;AAErD,QAAA,WAAW,GAA+B;IACrD,EAAE,QAAQ,EAAE,sBAAe,CAAC,QAAQ,EAAE;CACvC,CAAC;AAEW,QAAA,WAAW,GAA+B;IACrD,EAAE,QAAQ,EAAE,sBAAe,CAAC,QAAQ,EAAE;CACvC,CAAC;AAEW,QAAA,oBAAoB,GAA+B;IAC9D,EAAE,QAAQ,EAAE,IAAI,EAAE;CACnB,CAAC;AAEW,QAAA,oBAAoB,GAA+B;IAC9D,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAEK,MAAM,cAAc,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC3E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,cAAc,kBAQzB"}
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const lpTokensJob_1 = __importDefault(require("./lpTokensJob"));
|
8
8
|
const clmmJob_1 = __importDefault(require("./clmmJob"));
|
9
|
+
const cpmmJob_1 = __importDefault(require("./cpmmJob"));
|
9
10
|
const constants_1 = require("./constants");
|
10
11
|
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
11
12
|
exports.platforms = [constants_1.platform];
|
12
|
-
exports.jobs = [lpTokensJob_1.default, clmmJob_1.default];
|
13
|
+
exports.jobs = [lpTokensJob_1.default, clmmJob_1.default, cpmmJob_1.default];
|
13
14
|
exports.fetchers = [stakingFetcher_1.default];
|
14
15
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,wDAAgC;AAChC,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,qBAAW,EAAE,iBAAO,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,wDAAgC;AAChC,wDAAgC;AAChC,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,qBAAW,EAAE,iBAAO,EAAE,iBAAO,CAAC,CAAC;AAC9C,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@metaplex-foundation/js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export type PoolState = {
|
6
|
+
buffer: Buffer;
|
7
|
+
ammConfig: PublicKey;
|
8
|
+
poolCreator: PublicKey;
|
9
|
+
token0Vault: PublicKey;
|
10
|
+
token1Vault: PublicKey;
|
11
|
+
lpMint: PublicKey;
|
12
|
+
token0Mint: PublicKey;
|
13
|
+
token1Mint: PublicKey;
|
14
|
+
token0Program: PublicKey;
|
15
|
+
token1Program: PublicKey;
|
16
|
+
observationKey: PublicKey;
|
17
|
+
authBump: number;
|
18
|
+
status: number;
|
19
|
+
lpMintDecimals: number;
|
20
|
+
mint0Decimals: number;
|
21
|
+
mint1Decimals: number;
|
22
|
+
lpSupply: BigNumber;
|
23
|
+
protocolFeesToken0: BigNumber;
|
24
|
+
protocolFeesToken1: BigNumber;
|
25
|
+
fundFeesToken0: BigNumber;
|
26
|
+
fundFeesToken1: BigNumber;
|
27
|
+
openTime: BigNumber;
|
28
|
+
padding: BigNumber[];
|
29
|
+
};
|
30
|
+
export declare const poolStateStruct: BeetStruct<PoolState, Partial<PoolState>>;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.poolStateStruct = void 0;
|
4
|
+
const beet_1 = require("@metaplex-foundation/beet");
|
5
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
|
+
const solana_1 = require("../../../utils/solana");
|
7
|
+
exports.poolStateStruct = new beet_1.BeetStruct([
|
8
|
+
['buffer', (0, solana_1.blob)(8)],
|
9
|
+
['ammConfig', beet_solana_1.publicKey],
|
10
|
+
['poolCreator', beet_solana_1.publicKey],
|
11
|
+
['token0Vault', beet_solana_1.publicKey],
|
12
|
+
['token1Vault', beet_solana_1.publicKey],
|
13
|
+
['lpMint', beet_solana_1.publicKey],
|
14
|
+
['token0Mint', beet_solana_1.publicKey],
|
15
|
+
['token1Mint', beet_solana_1.publicKey],
|
16
|
+
['token0Program', beet_solana_1.publicKey],
|
17
|
+
['token1Program', beet_solana_1.publicKey],
|
18
|
+
['observationKey', beet_solana_1.publicKey],
|
19
|
+
['authBump', beet_1.u8],
|
20
|
+
['status', beet_1.u8],
|
21
|
+
['lpMintDecimals', beet_1.u8],
|
22
|
+
['mint0Decimals', beet_1.u8],
|
23
|
+
['mint1Decimals', beet_1.u8],
|
24
|
+
['lpSupply', solana_1.u64],
|
25
|
+
['protocolFeesToken0', solana_1.u64],
|
26
|
+
['protocolFeesToken1', solana_1.u64],
|
27
|
+
['fundFeesToken0', solana_1.u64],
|
28
|
+
['fundFeesToken1', solana_1.u64],
|
29
|
+
['openTime', solana_1.u64],
|
30
|
+
['padding', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 32)],
|
31
|
+
], (args) => args);
|
32
|
+
//# sourceMappingURL=cpmm.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cpmm.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/raydium/structs/cpmm.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AAGnC,kEAA6D;AAC7D,kDAAkD;AA4BrC,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,eAAe,EAAE,uBAAS,CAAC;IAC5B,CAAC,eAAe,EAAE,uBAAS,CAAC;IAC5B,CAAC,gBAAgB,EAAE,uBAAS,CAAC;IAC7B,CAAC,UAAU,EAAE,SAAE,CAAC;IAChB,CAAC,QAAQ,EAAE,SAAE,CAAC;IACd,CAAC,gBAAgB,EAAE,SAAE,CAAC;IACtB,CAAC,eAAe,EAAE,SAAE,CAAC;IACrB,CAAC,eAAe,EAAE,SAAE,CAAC;IACrB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,EAAE,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
|
@@ -0,0 +1,79 @@
|
|
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 bcs_1 = require("@mysten/bcs");
|
17
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
|
+
const axios_1 = __importDefault(require("axios"));
|
19
|
+
const constants_1 = require("./constants");
|
20
|
+
const clients_1 = require("../../utils/clients");
|
21
|
+
const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
22
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
23
|
+
const constants_2 = require("../pyth/constants");
|
24
|
+
function getAmount(claimData) {
|
25
|
+
if (!claimData)
|
26
|
+
return undefined;
|
27
|
+
const bcs = new bcs_1.BCS((0, bcs_1.getSuiMoveConfig)());
|
28
|
+
bcs.registerStructType('Validation', {
|
29
|
+
prefix: 'vector<u8>',
|
30
|
+
address: 'address',
|
31
|
+
amount: 'u64',
|
32
|
+
});
|
33
|
+
const eligibility = bcs.de('Validation', claimData, 'base64');
|
34
|
+
return (0, bignumber_js_1.default)(eligibility.amount)
|
35
|
+
.shiftedBy(-1 * 6)
|
36
|
+
.toNumber();
|
37
|
+
}
|
38
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
39
|
+
const signature = yield axios_1.default
|
40
|
+
.get(constants_1.airdropUrl + owner)
|
41
|
+
.catch(() => null);
|
42
|
+
if (!(signature === null || signature === void 0 ? void 0 : signature.data.data) || signature.status === 404)
|
43
|
+
return [];
|
44
|
+
const client = (0, clients_1.getClientSui)();
|
45
|
+
const amount = getAmount(signature.data.data);
|
46
|
+
if (!amount)
|
47
|
+
return [];
|
48
|
+
const claimStatus = yield (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
49
|
+
name: {
|
50
|
+
type: 'address',
|
51
|
+
value: owner,
|
52
|
+
},
|
53
|
+
parentId: constants_1.tableId,
|
54
|
+
});
|
55
|
+
if (claimStatus.data)
|
56
|
+
return [];
|
57
|
+
const pythPrice = yield cache.getTokenPrice(constants_2.pythMint, portfolio_core_1.NetworkId.solana);
|
58
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_2.pythMint, amount, portfolio_core_1.NetworkId.solana, pythPrice, undefined, { isClaimable: true });
|
59
|
+
return [
|
60
|
+
{
|
61
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
62
|
+
label: 'Airdrop',
|
63
|
+
name: 'CNY',
|
64
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
65
|
+
platformId: constants_1.platformId,
|
66
|
+
data: {
|
67
|
+
assets: [asset],
|
68
|
+
},
|
69
|
+
value: asset.value,
|
70
|
+
},
|
71
|
+
];
|
72
|
+
});
|
73
|
+
const fetcher = {
|
74
|
+
id: `${constants_1.platformId}-cny-airdrop`,
|
75
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
76
|
+
executor,
|
77
|
+
};
|
78
|
+
exports.default = fetcher;
|
79
|
+
//# sourceMappingURL=cnyAirdropFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cnyAirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/cnyAirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,qCAAoD;AACpD,gEAAqC;AACrC,kDAA6C;AAG7C,2CAA8D;AAC9D,iDAAmD;AACnD,iFAA8E;AAE9E,qGAA6E;AAC7E,iDAA6C;AAE7C,SAAS,SAAS,CAAC,SAAiB;IAClC,IAAI,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IAEjC,MAAM,GAAG,GAAG,IAAI,SAAG,CAAC,IAAA,sBAAgB,GAAE,CAAC,CAAC;IACxC,GAAG,CAAC,kBAAkB,CAAC,YAAY,EAAE;QACnC,MAAM,EAAE,YAAY;QACpB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9D,OAAO,IAAA,sBAAS,EAAC,WAAW,CAAC,MAAM,CAAC;SACjC,SAAS,CAAC,CAAC,CA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AU;YACV,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -16,3 +16,5 @@ export declare const obligationKeyPackageId = "0xefe8b36d5b2e43728cc323298626b83
|
|
16
16
|
export declare const baseIndexRate = 1000000000;
|
17
17
|
export declare const scaAddress = "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
|
18
18
|
export declare const scaDecimals = 9;
|
19
|
+
export declare const tableId = "0xbfbbbdf1fe9b70cdd1ebd1444ca273000177f81a405935f6007b7727d2ff90c2";
|
20
|
+
export declare const airdropUrl = "https://airdrop.apis.scallop.io/cny-campaign/claim-signature/";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.scaDecimals = exports.scaAddress = exports.baseIndexRate = exports.obligationKeyPackageId = exports.marketCoinPackageId = exports.spoolAccountPackageId = exports.spoolsKey = exports.poolsKey = exports.marketKey = exports.addressKey = exports.addressEndpoint = exports.spoolsPrefix = exports.poolsPrefix = exports.marketPrefix = exports.addressPrefix = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.airdropUrl = exports.tableId = exports.scaDecimals = exports.scaAddress = exports.baseIndexRate = exports.obligationKeyPackageId = exports.marketCoinPackageId = exports.spoolAccountPackageId = exports.spoolsKey = exports.poolsKey = exports.marketKey = exports.addressKey = exports.addressEndpoint = exports.spoolsPrefix = exports.poolsPrefix = exports.marketPrefix = exports.addressPrefix = exports.platform = exports.platformId = void 0;
|
4
4
|
exports.platformId = 'scallop';
|
5
5
|
exports.platform = {
|
6
6
|
id: exports.platformId,
|
@@ -25,4 +25,6 @@ exports.obligationKeyPackageId = `${PROTOCOL_OBJECT_ID}::obligation::ObligationK
|
|
25
25
|
exports.baseIndexRate = 1000000000;
|
26
26
|
exports.scaAddress = '0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA';
|
27
27
|
exports.scaDecimals = 9;
|
28
|
+
exports.tableId = '0xbfbbbdf1fe9b70cdd1ebd1444ca273000177f81a405935f6007b7727d2ff90c2';
|
29
|
+
exports.airdropUrl = 'https://airdrop.apis.scallop.io/cny-campaign/claim-signature/';
|
28
30
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/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,qCAAqC,kBAAU,MAAM;IAC5D,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,YAAY,GAAG,GAAG,kBAAU,SAAS,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,YAAY,GAAG,GAAG,kBAAU,eAAe,CAAC;AAE5C,QAAA,eAAe,GAC1B,+DAA+D,CAAC;AACrD,QAAA,UAAU,GAAG,qBAAqB,CAAC;AACnC,QAAA,SAAS,GAAG,oBAAoB,CAAC;AACjC,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,SAAS,GAAG,0BAA0B,CAAC;AAEvC,QAAA,qBAAqB,GAAG,iGAAiG,CAAC;AACvI,MAAM,kBAAkB,GACtB,oEAAoE,CAAC;AAC1D,QAAA,mBAAmB,GAAG,GAAG,kBAAkB,uBAAuB,CAAC;AACnE,QAAA,sBAAsB,GAAG,GAAG,kBAAkB,6BAA6B,CAAC;AAC5E,QAAA,aAAa,GAAG,UAAa,CAAC;AAC9B,QAAA,UAAU,GACrB,8EAA8E,CAAC;AACpE,QAAA,WAAW,GAAG,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/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,qCAAqC,kBAAU,MAAM;IAC5D,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,YAAY,GAAG,GAAG,kBAAU,SAAS,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,YAAY,GAAG,GAAG,kBAAU,eAAe,CAAC;AAE5C,QAAA,eAAe,GAC1B,+DAA+D,CAAC;AACrD,QAAA,UAAU,GAAG,qBAAqB,CAAC;AACnC,QAAA,SAAS,GAAG,oBAAoB,CAAC;AACjC,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,SAAS,GAAG,0BAA0B,CAAC;AAEvC,QAAA,qBAAqB,GAAG,iGAAiG,CAAC;AACvI,MAAM,kBAAkB,GACtB,oEAAoE,CAAC;AAC1D,QAAA,mBAAmB,GAAG,GAAG,kBAAkB,uBAAuB,CAAC;AACnE,QAAA,sBAAsB,GAAG,GAAG,kBAAkB,6BAA6B,CAAC;AAC5E,QAAA,aAAa,GAAG,UAAa,CAAC;AAC9B,QAAA,UAAU,GACrB,8EAA8E,CAAC;AACpE,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,OAAO,GAClB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GACrB,+DAA+D,CAAC"}
|
@@ -11,12 +11,14 @@ const spoolsMarketJob_1 = __importDefault(require("./spoolsMarketJob"));
|
|
11
11
|
const lendingsFetcher_1 = __importDefault(require("./lendingsFetcher"));
|
12
12
|
const veScaFetcher_1 = __importDefault(require("./veScaFetcher"));
|
13
13
|
const obligationsFetcher_1 = __importDefault(require("./obligationsFetcher"));
|
14
|
+
const cnyAirdropFetcher_1 = __importDefault(require("./cnyAirdropFetcher"));
|
14
15
|
const constants_1 = require("./constants");
|
15
16
|
exports.jobs = [addressJob_1.default, poolsJob_1.default, marketJob_1.default, spoolsMarketJob_1.default];
|
16
17
|
exports.fetchers = [
|
17
18
|
lendingsFetcher_1.default,
|
18
19
|
obligationsFetcher_1.default,
|
19
20
|
veScaFetcher_1.default,
|
21
|
+
cnyAirdropFetcher_1.default,
|
20
22
|
];
|
21
23
|
exports.platforms = [constants_1.platform];
|
22
24
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,8DAAsC;AACtC,4DAAoC;AACpC,wEAAgD;AAEhD,wEAAgD;AAChD,kEAA0C;AAC1C,8EAAsD;AACtD,2CAAuC;AAE1B,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,kBAAQ,EAAE,mBAAS,EAAE,yBAAe,CAAC,CAAC;AACjE,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,4BAAkB;IAClB,sBAAY;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,8DAAsC;AACtC,4DAAoC;AACpC,wEAAgD;AAEhD,wEAAgD;AAChD,kEAA0C;AAC1C,8EAAsD;AACtD,4EAAmD;AACnD,2CAAuC;AAE1B,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,kBAAQ,EAAE,mBAAS,EAAE,yBAAe,CAAC,CAAC;AACjE,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,4BAAkB;IAClB,sBAAY;IACZ,2BAAgB;CACjB,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
|
@@ -24,3 +24,32 @@ export type UserStakeAccounts = {
|
|
24
24
|
export type Pools = {
|
25
25
|
[T in string]: CoinTypeMetadata;
|
26
26
|
};
|
27
|
+
export type ClaimStatus = {
|
28
|
+
name: string;
|
29
|
+
value: number;
|
30
|
+
id: ID;
|
31
|
+
};
|
32
|
+
export type TreasuryInfo = {
|
33
|
+
claim_enabled: boolean;
|
34
|
+
claim_record: ClaimRecord;
|
35
|
+
id: ID;
|
36
|
+
msg_author_pubkey: number[];
|
37
|
+
treasury: string;
|
38
|
+
};
|
39
|
+
export type ClaimRecord = {
|
40
|
+
fields: Fields;
|
41
|
+
type: string;
|
42
|
+
};
|
43
|
+
export type Fields = {
|
44
|
+
id: ID;
|
45
|
+
size: string;
|
46
|
+
};
|
47
|
+
export type ID = {
|
48
|
+
id: string;
|
49
|
+
};
|
50
|
+
export type ApiResponse = {
|
51
|
+
signature: {
|
52
|
+
[key: string]: number;
|
53
|
+
};
|
54
|
+
data: string;
|
55
|
+
};
|
@@ -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;
|
@@ -25,16 +25,32 @@ const getAssetsByOwnerDas_1 = require("../../../utils/solana/das/getAssetsByOwne
|
|
25
25
|
const heliusAssetToAssetCollectible_1 = require("../../../utils/solana/das/heliusAssetToAssetCollectible");
|
26
26
|
const constants_2 = require("../../orca/constants");
|
27
27
|
const constants_3 = require("../../cropper/constants");
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
28
|
+
const nftsUnderlyingsMap = new Map([
|
29
|
+
[
|
30
|
+
'raydium',
|
31
|
+
{ checker: helpers_1.isARaydiumPosition, fetcher: getRaydiumCLMMPositions_1.getRaydiumCLMMPositions },
|
32
|
+
],
|
33
|
+
[
|
34
|
+
'orca',
|
35
|
+
{
|
36
|
+
checker: helpers_2.isAnOrcaPosition,
|
37
|
+
fetcher: (0, getWhirlpoolPositions_1.getOrcaNftFetcher)(constants_2.platformId, constants_2.whirlpoolProgram),
|
38
|
+
},
|
39
|
+
],
|
40
|
+
[
|
41
|
+
'cropper',
|
42
|
+
{
|
43
|
+
checker: helpers_3.isClmmPosition,
|
44
|
+
fetcher: (0, getWhirlpoolPositions_1.getOrcaNftFetcher)(constants_3.platformId, constants_3.clmmPid),
|
45
|
+
},
|
46
|
+
],
|
47
|
+
[
|
48
|
+
'helium',
|
49
|
+
{
|
50
|
+
checker: helpers_4.isAnHeliumNFTVote,
|
51
|
+
fetcher: helpers_4.getHeliumElementsFromNFTs,
|
52
|
+
},
|
53
|
+
],
|
38
54
|
]);
|
39
55
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
40
56
|
var _a, _b;
|
@@ -49,30 +65,29 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
49
65
|
};
|
50
66
|
const assets = yield (0, getAssetsByOwnerDas_1.getAssetsByOwnerDas)(dasEndpoint, owner, displayOptions);
|
51
67
|
const nftsByIndentifier = new Map();
|
52
|
-
for (let n = 0; n < assets.length; n
|
68
|
+
for (let n = 0; n < assets.length; n += 1) {
|
53
69
|
const nft = (0, heliusAssetToAssetCollectible_1.heliusAssetToAssetCollectible)(assets[n]);
|
54
70
|
if (!nft)
|
55
71
|
continue;
|
56
72
|
if ((_a = nft.attributes.tags) === null || _a === void 0 ? void 0 : _a.includes('compressed'))
|
57
73
|
continue;
|
58
|
-
for (const
|
59
|
-
if (
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
else {
|
64
|
-
(_b = nftsByIndentifier.get(identifier)) === null || _b === void 0 ? void 0 : _b.push(nft);
|
65
|
-
}
|
74
|
+
for (const [key, { checker }] of nftsUnderlyingsMap.entries()) {
|
75
|
+
if (!checker(nft))
|
76
|
+
continue;
|
77
|
+
if (!nftsByIndentifier.get(key)) {
|
78
|
+
nftsByIndentifier.set(key, []);
|
66
79
|
}
|
80
|
+
(_b = nftsByIndentifier.get(key)) === null || _b === void 0 ? void 0 : _b.push(nft);
|
81
|
+
break;
|
67
82
|
}
|
68
83
|
}
|
69
|
-
const
|
70
|
-
for (const [
|
71
|
-
const nfts = nftsByIndentifier.get(
|
84
|
+
const results = [];
|
85
|
+
for (const [key, { fetcher }] of nftsUnderlyingsMap) {
|
86
|
+
const nfts = nftsByIndentifier.get(key);
|
72
87
|
if (nfts)
|
73
|
-
|
88
|
+
results.push(fetcher(cache, nfts));
|
74
89
|
}
|
75
|
-
const result = yield Promise.allSettled(
|
90
|
+
const result = yield Promise.allSettled(results);
|
76
91
|
const elements = result
|
77
92
|
.map((res) => (res.status === 'rejected' ? [] : res.value))
|
78
93
|
.flat();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solana-nfts-underlyings.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana-nfts-underlyings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAGpC,4CAAoD;AAEpD,mFAAgF;AAChF,
|
1
|
+
{"version":3,"file":"solana-nfts-underlyings.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana-nfts-underlyings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAGpC,4CAAoD;AAEpD,mFAAgF;AAChF,4EAAqE;AACrE,mDAA2D;AAC3D,gDAAsD;AACtD,mDAA4E;AAE5E,gDAG4B;AAC5B,uGAA+E;AAC/E,uFAAoF;AAEpF,2GAAwG;AAExG,oDAG8B;AAC9B,uDAGiC;AAIjC,MAAM,kBAAkB,GAGpB,IAAI,GAAG,CAAC;IACV;QACE,SAAS;QACT,EAAE,OAAO,EAAE,4BAAkB,EAAE,OAAO,EAAE,iDAAuB,EAAE;KAClE;IACD;QACE,MAAM;QACN;YACE,OAAO,EAAE,0BAAgB;YACzB,OAAO,EAAE,IAAA,yCAAiB,EAAC,sBAAc,EAAE,4BAAgB,CAAC;SAC7D;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C;gBAChC,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACjC,CAAC;YACD,MAAA,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,0CAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YACtC,MAAM;QACR,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAkC,EAAE,CAAC;IAClD,KAAK,MAAM,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,IAAI,kBAAkB,EAAE,CAAC;QACpD,MAAM,IAAI,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,IAAI;YAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjD,MAAM,QAAQ,GAAG,MAAM;SACpB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC1D,IAAI,EAAE,CAAC;IAEV,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,0BAA0B;IACxD,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -26,6 +26,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
26
26
|
const dasEndpoint = (0, getSolanaDasEndpoint_1.default)();
|
27
27
|
const items = yield (0, getAssetsByOwnerDas_1.getAssetsByOwnerDas)(dasEndpoint, owner, {
|
28
28
|
showNativeBalance: false,
|
29
|
+
showGrandTotal: false,
|
30
|
+
showInscription: false,
|
29
31
|
});
|
30
32
|
const fungibleAddresses = items.reduce((addresses, curr) => {
|
31
33
|
if ((0, isHeliusFungibleAsset_1.isHeliusFungibleAsset)(curr))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAErC,4CAAwE;AAExE,wCAAkD;AAClD,wGAAgF;AAChF,sGAA8E;AAC9E,2GAAwG;AACxG,uFAAoF;AACpF,2FAAwF;AACxF,uGAA+E;AAE/E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,WAAW,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,MAAM,IAAA,yCAAmB,EAAC,WAAW,EAAE,KAAK,EAAE;QAC1D,iBAAiB,EAAE,KAAK;
|
1
|
+
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAErC,4CAAwE;AAExE,wCAAkD;AAClD,wGAAgF;AAChF,sGAA8E;AAC9E,2GAAwG;AACxG,uFAAoF;AACpF,2FAAwF;AACxF,uGAA+E;AAE/E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,WAAW,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,MAAM,IAAA,yCAAmB,EAAC,WAAW,EAAE,KAAK,EAAE;QAC1D,iBAAiB,EAAE,KAAK;QACxB,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,KAAK;KACvB,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,SAAmB,EA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ACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -35,4 +35,4 @@ export type Token = {
|
|
35
35
|
index?: string;
|
36
36
|
};
|
37
37
|
};
|
38
|
-
export type
|
38
|
+
export type NftFetcher = (cache: Cache, nfts: PortfolioAssetCollectible[]) => Promise<PortfolioElement[]>;
|