@sonarwatch/portfolio-plugins 0.12.148 → 0.12.149
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/plugins/aftermath/poolsJob.js +5 -9
- package/src/plugins/aftermath/poolsJob.js.map +1 -1
- package/src/plugins/cetus/constants.d.ts +2 -0
- package/src/plugins/cetus/constants.js +3 -1
- package/src/plugins/cetus/constants.js.map +1 -1
- package/src/plugins/cetus/poolsJob.js +36 -28
- package/src/plugins/cetus/poolsJob.js.map +1 -1
- package/src/plugins/cetus/types.d.ts +35 -0
- package/src/plugins/flash/constants.js +1 -0
- package/src/plugins/flash/constants.js.map +1 -1
- package/src/plugins/jupiter/launchpad/constants.js +19 -0
- package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
- package/src/plugins/kamino/index.js +1 -4
- package/src/plugins/kamino/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.149](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.148...plugins-0.12.149) (2024-08-20)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.12.148](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.147...plugins-0.12.148) (2024-08-20)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -44,12 +44,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
44
|
var _a, _b, _c, _d, _e, _f;
|
45
45
|
return ((_c = (_b = (_a = pool.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields) === null || _c === void 0 ? void 0 : _c.type_names)
|
46
46
|
? (_f = (_e = (_d = pool.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.fields) === null || _f === void 0 ? void 0 : _f.type_names.map((type) => {
|
47
|
-
|
47
|
+
if ((0, portfolio_core_1.isMoveTokenAddress)(type)) {
|
48
48
|
return (0, portfolio_core_1.formatMoveTokenAddress)(type);
|
49
49
|
}
|
50
|
-
|
51
|
-
return [];
|
52
|
-
}
|
50
|
+
return [];
|
53
51
|
}).flat()
|
54
52
|
: [];
|
55
53
|
})
|
@@ -69,14 +67,12 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
67
|
const poolUnderlyingsRaw = [];
|
70
68
|
poolInfo.normalized_balances.forEach((nBalance, i) => {
|
71
69
|
let cAddress;
|
72
|
-
|
73
|
-
cAddress = (0, portfolio_core_1.
|
70
|
+
if ((0, portfolio_core_1.isMoveTokenAddress)(poolInfo.type_names[i])) {
|
71
|
+
cAddress = (0, portfolio_core_1.formatMoveTokenAddress)(poolInfo.type_names[i]);
|
74
72
|
}
|
75
|
-
|
73
|
+
else {
|
76
74
|
return;
|
77
75
|
}
|
78
|
-
if (!cAddress)
|
79
|
-
return;
|
80
76
|
const tokenPrice = tokenPriceById.get(cAddress);
|
81
77
|
if (!tokenPrice || !poolInfo.coin_decimals)
|
82
78
|
return;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAKoC;AAGpC,iDAAmD;AACnD,2CAAuD;AAEvD,uEAAoE;AACpE,qEAAkE;AAClE,8EAG8C;AAE9C,MAAM,SAAS,GAAG,0BAAS,CAAC,GAAG,CAAC;AAEhC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,wBAAY,CAAC,CAAC;IAEtE,MAAM,cAAc,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE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";
|
|
5
5
|
export declare const clmmPoolPackageId = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb";
|
6
6
|
export declare const clmmType = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::position::Position";
|
7
7
|
export declare const createPoolEvent = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::factory::CreatePoolEvent";
|
8
|
+
export declare const poolParentId = "0x4c9ab808d50ca1358cc699bb53b6334b9471d4718fb19bb621ff41c2e93bbce4";
|
9
|
+
export declare const firstPool = "0x58ec75646f31c384f485bd92a5f1d19aa60713eabe2447cbc1354c8c229b10b7";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createPoolEvent = exports.clmmType = exports.clmmPoolPackageId = exports.clmmPoolsPrefix = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.firstPool = exports.poolParentId = exports.createPoolEvent = exports.clmmType = exports.clmmPoolPackageId = exports.clmmPoolsPrefix = exports.platform = exports.platformId = void 0;
|
4
4
|
exports.platformId = 'cetus';
|
5
5
|
exports.platform = {
|
6
6
|
id: exports.platformId,
|
@@ -13,4 +13,6 @@ exports.clmmPoolsPrefix = `${exports.platformId}-clmmPools`;
|
|
13
13
|
exports.clmmPoolPackageId = '0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb';
|
14
14
|
exports.clmmType = `${exports.clmmPoolPackageId}::position::Position`;
|
15
15
|
exports.createPoolEvent = `${exports.clmmPoolPackageId}::factory::CreatePoolEvent`;
|
16
|
+
exports.poolParentId = '0x4c9ab808d50ca1358cc699bb53b6334b9471d4718fb19bb621ff41c2e93bbce4';
|
17
|
+
exports.firstPool = '0x58ec75646f31c384f485bd92a5f1d19aa60713eabe2447cbc1354c8c229b10b7';
|
16
18
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE5C,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAE1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AAEtD,QAAA,eAAe,GAAG,GAAG,yBAAiB,4BAA4B,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE5C,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAE1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AAEtD,QAAA,eAAe,GAAG,GAAG,yBAAiB,4BAA4B,CAAC;AACnE,QAAA,YAAY,GACvB,oEAAoE,CAAC;AAC1D,QAAA,SAAS,GACpB,oEAAoE,CAAC"}
|
@@ -19,39 +19,47 @@ const constants_1 = require("./constants");
|
|
19
19
|
const helpers_1 = require("./helpers");
|
20
20
|
const tokenPricesFromSqrt_1 = __importDefault(require("../../utils/clmm/tokenPricesFromSqrt"));
|
21
21
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
22
|
-
const
|
22
|
+
const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
23
23
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
-
var _a;
|
24
|
+
var _a, _b, _c, _d, _e, _f;
|
25
25
|
const client = (0, clients_1.getClientSui)();
|
26
26
|
const promises = [];
|
27
27
|
const cacheItems = [];
|
28
|
-
const
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
.map((eventData) => eventData.parsedJson ? eventData.parsedJson.pool_id : [])
|
38
|
-
.flat();
|
39
|
-
poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsAddresses);
|
40
|
-
let poolId;
|
41
|
-
let pool;
|
42
|
-
for (let i = 0; i < poolsObjects.length; i++) {
|
43
|
-
poolId = (_a = poolsObjects[i].data) === null || _a === void 0 ? void 0 : _a.objectId;
|
44
|
-
if (!poolId)
|
45
|
-
continue;
|
46
|
-
pool = (0, helpers_1.getPoolFromObject)(poolsObjects[i]);
|
47
|
-
if (!pool)
|
48
|
-
continue;
|
49
|
-
promises.push((0, tokenPricesFromSqrt_1.default)(cache, portfolio_core_1.NetworkId.sui, pool.poolAddress, new bignumber_js_1.default(pool.coinAmountA), new bignumber_js_1.default(pool.coinAmountB), new bignumber_js_1.default(pool.current_sqrt_price), pool.coinTypeA, pool.coinTypeB));
|
50
|
-
cacheItems.push({
|
51
|
-
key: poolId,
|
52
|
-
value: pool,
|
53
|
-
});
|
28
|
+
const poolsAddresses = [];
|
29
|
+
let poolInfo;
|
30
|
+
let value;
|
31
|
+
do {
|
32
|
+
if (!poolInfo) {
|
33
|
+
value = constants_1.firstPool;
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
value = (_b = (_a = poolInfo.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.value.fields.next;
|
54
37
|
}
|
38
|
+
poolInfo = yield (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
39
|
+
parentId: constants_1.poolParentId,
|
40
|
+
name: {
|
41
|
+
type: '0x2::object::ID',
|
42
|
+
value,
|
43
|
+
},
|
44
|
+
});
|
45
|
+
if ((_c = poolInfo.data) === null || _c === void 0 ? void 0 : _c.content)
|
46
|
+
poolsAddresses.push(poolInfo.data.content.fields.value.fields.value.fields.pool_id);
|
47
|
+
} while (poolInfo && ((_e = (_d = poolInfo.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.fields.value.fields.next));
|
48
|
+
const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsAddresses);
|
49
|
+
let poolId;
|
50
|
+
let pool;
|
51
|
+
for (let i = 0; i < poolsObjects.length; i++) {
|
52
|
+
poolId = (_f = poolsObjects[i].data) === null || _f === void 0 ? void 0 : _f.objectId;
|
53
|
+
if (!poolId)
|
54
|
+
continue;
|
55
|
+
pool = (0, helpers_1.getPoolFromObject)(poolsObjects[i]);
|
56
|
+
if (!pool)
|
57
|
+
continue;
|
58
|
+
promises.push((0, tokenPricesFromSqrt_1.default)(cache, portfolio_core_1.NetworkId.sui, pool.poolAddress, new bignumber_js_1.default(pool.coinAmountA), new bignumber_js_1.default(pool.coinAmountB), new bignumber_js_1.default(pool.current_sqrt_price), pool.coinTypeA, pool.coinTypeB));
|
59
|
+
cacheItems.push({
|
60
|
+
key: poolId,
|
61
|
+
value: pool,
|
62
|
+
});
|
55
63
|
}
|
56
64
|
yield cache.setItems(cacheItems, {
|
57
65
|
prefix: constants_1.clmmPoolsPrefix,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../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
94
|
pool_id: string;
|
95
95
|
tick_spacing: number;
|
96
96
|
};
|
97
|
+
export type ID = {
|
98
|
+
id: string;
|
99
|
+
};
|
100
|
+
export type TablePoolInfo = {
|
101
|
+
id: ID;
|
102
|
+
name: string;
|
103
|
+
value: TablePoolInfoValue;
|
104
|
+
};
|
105
|
+
export type TablePoolInfoValue = {
|
106
|
+
fields: TableFields;
|
107
|
+
type: string;
|
108
|
+
};
|
109
|
+
export type TableFields = {
|
110
|
+
next: string;
|
111
|
+
prev: string;
|
112
|
+
value: PoolValue;
|
113
|
+
};
|
114
|
+
export type PoolValue = {
|
115
|
+
fields: PoolFields;
|
116
|
+
type: string;
|
117
|
+
};
|
118
|
+
export type PoolFields = {
|
119
|
+
coin_type_a: CoinType;
|
120
|
+
coin_type_b: CoinType;
|
121
|
+
pool_id: string;
|
122
|
+
pool_key: string;
|
123
|
+
tick_spacing: number;
|
124
|
+
};
|
125
|
+
export type CoinType = {
|
126
|
+
fields: CoinTypeFields;
|
127
|
+
type: string;
|
128
|
+
};
|
129
|
+
export type CoinTypeFields = {
|
130
|
+
name: string;
|
131
|
+
};
|
@@ -18,6 +18,7 @@ exports.poolsPkeys = [
|
|
18
18
|
new web3_js_1.PublicKey('KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X'),
|
19
19
|
new web3_js_1.PublicKey('D6bfytnxoZBSzJM7fcixg5sgWJ2hj8SbwkPvb2r8XpbH'),
|
20
20
|
new web3_js_1.PublicKey('6HukhSeVVLQekKaGJYkwztBacjhKLKywVPrmcvccaYMz'),
|
21
|
+
new web3_js_1.PublicKey('KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X'),
|
21
22
|
];
|
22
23
|
exports.custodiesKey = 'custodies';
|
23
24
|
exports.marketsKey = 'markets';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,6CAA6C,CAAC;IAC5D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,6CAA6C,CAAC;IAC5D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,6CAA6C,CAAC;CAC7D,CAAC;AAEW,QAAA,YAAY,GAAG,WAAW,CAAC;AAC3B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAG,OAAO,CAAC"}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.airdropConfigs = exports.lfgDisProgram = exports.lfgApiBaseUrl = exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
const constants_1 = require("../../kamino/constants");
|
5
6
|
exports.platformId = 'jupiter-launchpad';
|
6
7
|
const platformImage = 'https://sonar.watch/img/platforms/jupiter.webp';
|
7
8
|
exports.platform = {
|
@@ -104,5 +105,23 @@ exports.airdropConfigs = [
|
|
104
105
|
image: 'https://sonar.watch/img/platforms/uprock.webp',
|
105
106
|
},
|
106
107
|
},
|
108
|
+
{
|
109
|
+
mint: 'KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS',
|
110
|
+
decimals: 6,
|
111
|
+
distributorProgram: 'KdisqEcXbXKaTrBFqeDLhMmBvymLTwj9GmhDcdJyGat',
|
112
|
+
label: 'KMNO',
|
113
|
+
platformId: constants_1.platformId,
|
114
|
+
getApiPath: (owner) => `https://api.kamino.finance/distributor/user/${owner}`,
|
115
|
+
statics: {
|
116
|
+
claimStart: 1724158800000,
|
117
|
+
claimEnd: 1724340000000,
|
118
|
+
id: 'kamino-s2',
|
119
|
+
emitterName: 'Kamino',
|
120
|
+
emitterLink: 'https://app.kamino.finance/',
|
121
|
+
claimLink: 'https://app.kamino.finance/season-2-airdrop',
|
122
|
+
image: 'https://sonar.watch/img/platforms/kamino.webp',
|
123
|
+
name: 'S2',
|
124
|
+
},
|
125
|
+
},
|
107
126
|
];
|
108
127
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,sDAAwE;AAE3D,QAAA,UAAU,GAAG,mBAAmB,CAAC;AAC9C,MAAM,aAAa,GAAG,gDAAgD,CAAC;AAC1D,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,aAAa,GAAG,uCAAuC,CAAC;AACxD,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAE/D,QAAA,cAAc,GAAoB;IAC7C;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,6CAA6C;QACjE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,GAAG,qBAAa,gDAAgD,KAAK,EAAE;QACzE,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,wBAAwB;YACnC,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E,2BAA2B;YACtC,KAAK,EAAE,+CAA+C;SACvD;KACF;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,qBAAa;QACjC,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,GAAG,qBAAa,gDAAgD,KAAK,EAAE;QACzE,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,YAAY;YAChB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,qBAAqB;YAClC,SAAS,EAAE,2BAA2B;YACtC,KAAK,EAAE,+CAA+C;SACvD;KACF;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,6CAA6C;QACjE,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,sBAAgB;QAC5B,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,+CAA+C,KAAK,EAAE;QACxD,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,WAAW;YACf,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,6CAA6C;YACxD,KAAK,EAAE,+CAA+C;YACtD,IAAI,EAAE,IAAI;SACX;KACF;CACF,CAAC"}
|
@@ -21,8 +21,5 @@ exports.fetchers = [
|
|
21
21
|
s1AirdropFetcher_1.fetcher,
|
22
22
|
s2AirdropFetcher_1.fetcher,
|
23
23
|
];
|
24
|
-
exports.airdropFetchers = [
|
25
|
-
s1AirdropFetcher_1.airdropFetcher,
|
26
|
-
s2AirdropFetcher_1.airdropFetcher,
|
27
|
-
];
|
24
|
+
exports.airdropFetchers = [s1AirdropFetcher_1.airdropFetcher];
|
28
25
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/index.ts"],"names":[],"mappings":";;;;;;AAIA,2CAAuC;AACvC,0DAAkC;AAClC,0DAAkC;AAClC,gEAAwC;AACxC,8DAAsC;AACtC,kEAA0C;AAC1C,kEAA0C;AAC1C,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/index.ts"],"names":[],"mappings":";;;;;;AAIA,2CAAuC;AACvC,0DAAkC;AAClC,0DAAkC;AAClC,gEAAwC;AACxC,8DAAsC;AACtC,kEAA0C;AAC1C,kEAA0C;AAC1C,yDAA0D;AAC1D,yDAG4B;AAEf,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,qBAAW,EAAE,kBAAQ,EAAE,oBAAU,CAAC,CAAC;AAC5D,QAAA,QAAQ,GAAc;IACjC,sBAAY;IACZ,sBAAY;IACZ,0BAAS;IACT,0BAAS;CACV,CAAC;AACW,QAAA,eAAe,GAAqB,CAAC,iCAAgB,CAAC,CAAC"}
|