@sonarwatch/portfolio-plugins 0.12.147 → 0.12.149
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1388 -1375
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/aftermath/poolsJob.js +28 -14
- package/src/plugins/aftermath/poolsJob.js.map +1 -1
- package/src/plugins/aftermath/types.d.ts +7 -0
- package/src/plugins/balancer/helpers/pools.js +21 -21
- 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 +27 -19
- 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/src/plugins/scallop/constants.d.ts +1 -1
- package/src/plugins/scallop/constants.js +1 -1
- package/src/plugins/scallop/constants.js.map +1 -1
- package/src/plugins/scallop/obligationsFetcher.js +1 -7
- package/src/plugins/scallop/obligationsFetcher.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 +16 -16
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/sui/queryEvents.js +3 -1
- package/src/utils/sui/queryEvents.js.map +1 -1
- package/src/utils/sui/queryEventsSafe.js +2 -1
- package/src/utils/sui/queryEventsSafe.js.map +1 -1
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
@@ -30,21 +30,29 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
30
|
const pObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolFactoryIds);
|
31
31
|
const poolsIds = pObjects
|
32
32
|
.map((poolObject) => {
|
33
|
-
var _a, _b
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
return fields.value;
|
38
|
-
}
|
39
|
-
return [];
|
33
|
+
var _a, _b;
|
34
|
+
return ((_b = (_a = poolObject.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields)
|
35
|
+
? poolObject.data.content.fields.value
|
36
|
+
: [];
|
40
37
|
})
|
41
38
|
.flat();
|
42
39
|
if (!poolsIds.length)
|
43
40
|
return;
|
44
41
|
const poolsInfo = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsIds);
|
45
|
-
const
|
46
|
-
.map((pool) => {
|
47
|
-
|
42
|
+
const mints = poolsInfo
|
43
|
+
.map((pool) => {
|
44
|
+
var _a, _b, _c, _d, _e, _f;
|
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
|
+
? (_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
|
+
if ((0, portfolio_core_1.isMoveTokenAddress)(type)) {
|
48
|
+
return (0, portfolio_core_1.formatMoveTokenAddress)(type);
|
49
|
+
}
|
50
|
+
return [];
|
51
|
+
}).flat()
|
52
|
+
: [];
|
53
|
+
})
|
54
|
+
.flat();
|
55
|
+
const tokenPriceById = yield cache.getTokenPricesAsMap(mints, networkId);
|
48
56
|
const sources = [];
|
49
57
|
for (const pool of poolsInfo) {
|
50
58
|
if (!((_b = (_a = pool.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields))
|
@@ -58,14 +66,20 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
66
|
const lpAddress = moveType.keys[0].type;
|
59
67
|
const poolUnderlyingsRaw = [];
|
60
68
|
poolInfo.normalized_balances.forEach((nBalance, i) => {
|
61
|
-
|
62
|
-
|
69
|
+
let cAddress;
|
70
|
+
if ((0, portfolio_core_1.isMoveTokenAddress)(poolInfo.type_names[i])) {
|
71
|
+
cAddress = (0, portfolio_core_1.formatMoveTokenAddress)(poolInfo.type_names[i]);
|
72
|
+
}
|
73
|
+
else {
|
74
|
+
return;
|
75
|
+
}
|
76
|
+
const tokenPrice = tokenPriceById.get(cAddress);
|
63
77
|
if (!tokenPrice || !poolInfo.coin_decimals)
|
64
78
|
return;
|
65
79
|
poolUnderlyingsRaw.push({
|
66
|
-
address:
|
80
|
+
address: cAddress,
|
67
81
|
decimals: poolInfo.coin_decimals[i],
|
68
|
-
reserveAmountRaw: new bignumber_js_1.default(
|
82
|
+
reserveAmountRaw: new bignumber_js_1.default(nBalance).dividedBy(poolInfo.decimal_scalars[i]),
|
69
83
|
tokenPrice,
|
70
84
|
weight: new bignumber_js_1.default(poolInfo.weights[i]).div(Math.pow(10, 18)).toNumber(),
|
71
85
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+
|
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,8EAG8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E,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
|
|
36
36
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
37
37
|
function getBalancerPoolsV2(url) {
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const query = (0, graphql_request_1.gql) `
|
40
|
-
query pools {
|
41
|
-
pools(
|
42
|
-
first: 1000
|
43
|
-
orderBy: totalLiquidity
|
44
|
-
orderDirection: desc
|
45
|
-
where: { totalLiquidity_gt: "500" }
|
46
|
-
) {
|
47
|
-
id
|
48
|
-
address
|
49
|
-
symbol
|
50
|
-
totalLiquidity
|
51
|
-
totalShares
|
52
|
-
tokens {
|
53
|
-
balance
|
54
|
-
decimals
|
55
|
-
symbol
|
56
|
-
address
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
39
|
+
const query = (0, graphql_request_1.gql) `
|
40
|
+
query pools {
|
41
|
+
pools(
|
42
|
+
first: 1000
|
43
|
+
orderBy: totalLiquidity
|
44
|
+
orderDirection: desc
|
45
|
+
where: { totalLiquidity_gt: "500" }
|
46
|
+
) {
|
47
|
+
id
|
48
|
+
address
|
49
|
+
symbol
|
50
|
+
totalLiquidity
|
51
|
+
totalShares
|
52
|
+
tokens {
|
53
|
+
balance
|
54
|
+
decimals
|
55
|
+
symbol
|
56
|
+
address
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
`;
|
61
61
|
const res = yield (0, graphql_request_1.default)(url, query);
|
62
62
|
const pools = res.pools;
|
@@ -5,3 +5,5 @@ export declare const clmmPoolsPrefix = "cetus-clmmPools";
|
|
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,32 +19,40 @@ 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
|
23
|
-
let lastFetchTime;
|
22
|
+
const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
24
23
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
-
var _a;
|
24
|
+
var _a, _b, _c, _d, _e, _f;
|
26
25
|
const client = (0, clients_1.getClientSui)();
|
27
|
-
const eventsData = yield (0, queryEvents_1.queryEvents)(client, {
|
28
|
-
MoveEventType: constants_1.createPoolEvent,
|
29
|
-
TimeRange: lastFetchTime
|
30
|
-
? {
|
31
|
-
startTime: lastFetchTime.toString(),
|
32
|
-
endTime: Date.now().toString(),
|
33
|
-
}
|
34
|
-
: undefined,
|
35
|
-
});
|
36
|
-
lastFetchTime = Date.now();
|
37
|
-
const poolsAddresses = eventsData
|
38
|
-
.map((eventData) => eventData.parsedJson ? eventData.parsedJson.pool_id : [])
|
39
|
-
.flat();
|
40
|
-
const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsAddresses);
|
41
26
|
const promises = [];
|
42
27
|
const cacheItems = [];
|
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;
|
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;
|
43
51
|
for (let i = 0; i < poolsObjects.length; i++) {
|
44
|
-
|
52
|
+
poolId = (_f = poolsObjects[i].data) === null || _f === void 0 ? void 0 : _f.objectId;
|
45
53
|
if (!poolId)
|
46
54
|
continue;
|
47
|
-
|
55
|
+
pool = (0, helpers_1.getPoolFromObject)(poolsObjects[i]);
|
48
56
|
if (!pool)
|
49
57
|
continue;
|
50
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));
|
@@ -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":["../../../../../../packages/plugins/src/plugins/cetus/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAKqB;AACrB,uCAA8C;AAC9C,+FAA4E;AAE5E,qEAAkE;AAClE,iFAA8E;AAE9E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,MAAM,UAAU,GAAG,EAAE,CAAC;IAEtB,MAAM,cAAc,GAAa,EAAE,CAAC;IACpC,IAAI,QAAQ,CAAC;IACb,IAAI,KAAK,CAAC;IACV,GAAG,CAAC;QACF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,KAAK,GAAG,qBAAS,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,OAAO,0CAAE,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B,IAAI,sBAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,EACtC,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,SAAS,CACf,CACF,CAAC;QACF,UAAU,CAAC,IAAI,CAAC;YACd,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC/B,MAAM,EAAE,2BAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -94,3 +94,38 @@ export type ParsedJsonEvent = {
|
|
94
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,8CAA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,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"}
|
@@ -5,7 +5,7 @@ export declare const addressPrefix = "scallop-address";
|
|
5
5
|
export declare const marketPrefix = "scallop-market";
|
6
6
|
export declare const poolsPrefix = "scallop-pools";
|
7
7
|
export declare const spoolsPrefix = "scallop-spoolsmarket";
|
8
|
-
export declare const addressEndpoint = "https://sui.
|
8
|
+
export declare const addressEndpoint = "https://sui.apis.scallop.io/addresses/664dfe22898c36c159e28bc8";
|
9
9
|
export declare const addressKey = "scallop-address-key";
|
10
10
|
export declare const marketKey = "scallop-market-key";
|
11
11
|
export declare const poolsKey = "scallop-pools-key";
|
@@ -13,7 +13,7 @@ exports.addressPrefix = `${exports.platformId}-address`;
|
|
13
13
|
exports.marketPrefix = `${exports.platformId}-market`;
|
14
14
|
exports.poolsPrefix = `${exports.platformId}-pools`;
|
15
15
|
exports.spoolsPrefix = `${exports.platformId}-spoolsmarket`;
|
16
|
-
exports.addressEndpoint = 'https://sui.
|
16
|
+
exports.addressEndpoint = 'https://sui.apis.scallop.io/addresses/664dfe22898c36c159e28bc8';
|
17
17
|
exports.addressKey = 'scallop-address-key';
|
18
18
|
exports.marketKey = 'scallop-market-key';
|
19
19
|
exports.poolsKey = 'scallop-pools-key';
|
@@ -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,OAAO;IAC7D,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
|
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,OAAO;IAC7D,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,gEAAgE,CAAC;AACtD,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"}
|
@@ -132,13 +132,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
132
132
|
}));
|
133
133
|
yield (0, runInBatch_1.default)(debtsAndCollateralCalculationPromises, 5); // run in batch of size 2, calculate 5 obligation account per batch
|
134
134
|
const tokenAddresses = ctmValues.map((value) => value.coinType);
|
135
|
-
const
|
136
|
-
const tokenPrices = new Map();
|
137
|
-
tokenPriceResult.forEach((r) => {
|
138
|
-
if (!r)
|
139
|
-
return;
|
140
|
-
tokenPrices.set(r.address, r);
|
141
|
-
});
|
135
|
+
const tokenPrices = yield cache.getTokenPricesAsMap(tokenAddresses, portfolio_core_1.NetworkId.sui);
|
142
136
|
for (const account of Object.keys(userObligations)) {
|
143
137
|
const borrowedAssets = [];
|
144
138
|
const borrowedYields = [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gDAA0D;AAC1D,gEAAqC;AAIrC,2CAOqB;AAQrB,uCAA2C;AAC3C,iDAAmD;AACnD,qGAA6E;AAC7E,6EAAqD;AAErD,qEAAkE;AAClE,yDAAsD;AACtD,iFAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,MAAM,YAAY,GAAqB,EAAE,CAAC;IAE1C,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAQ,oBAAQ,EAAE;QAC5D,MAAM,E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AAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,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"}
|
@@ -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;
|
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
42
42
|
const clients_1 = require("../../utils/clients");
|
43
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
44
|
const helpers_1 = require("./helpers");
|
45
|
-
const query = (0, graphql_request_1.gql) `
|
46
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
-
getAirdropFinalFrontend(authority: $authority) {
|
48
|
-
authority
|
49
|
-
community_allocation
|
50
|
-
eligibility
|
51
|
-
main_allocation
|
52
|
-
og_allocation
|
53
|
-
s1_allocation
|
54
|
-
s2_allocation
|
55
|
-
total_allocation
|
56
|
-
__typename
|
57
|
-
}
|
58
|
-
}
|
45
|
+
const query = (0, graphql_request_1.gql) `
|
46
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
+
getAirdropFinalFrontend(authority: $authority) {
|
48
|
+
authority
|
49
|
+
community_allocation
|
50
|
+
eligibility
|
51
|
+
main_allocation
|
52
|
+
og_allocation
|
53
|
+
s1_allocation
|
54
|
+
s2_allocation
|
55
|
+
total_allocation
|
56
|
+
__typename
|
57
|
+
}
|
58
|
+
}
|
59
59
|
`;
|
60
60
|
const networkId = portfolio_core_1.NetworkId.solana;
|
61
61
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -66,10 +66,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
66
66
|
referrer: 'https://token.zeta.markets/',
|
67
67
|
'X-Api-Key': 'da2-rrupjjccivdndc6rvltixlmsma',
|
68
68
|
}).catch(() => null);
|
69
|
-
if (!res)
|
69
|
+
if (!res || !res.getAirdropFinalFrontend)
|
70
70
|
return [];
|
71
71
|
const amount = res.getAirdropFinalFrontend.total_allocation;
|
72
|
-
if (amount === 0)
|
72
|
+
if (!amount || amount === 0)
|
73
73
|
return [];
|
74
74
|
const claimStatuses = (0, helpers_1.deriveZetaClaimStatuses)(owner, constants_1.distributors);
|
75
75
|
const client = (0, clients_1.getClientSolana)();
|