@sonarwatch/portfolio-plugins 0.14.70 → 0.14.71
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 +1876 -1872
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/kriya/constants.d.ts +1 -1
- package/src/plugins/kriya/constants.js +2 -3
- package/src/plugins/kriya/constants.js.map +1 -1
- package/src/plugins/kriya/leverageVaultsFetcher.js +61 -49
- package/src/plugins/kriya/leverageVaultsFetcher.js.map +1 -1
- package/src/plugins/kriya/leverageVaultsJob.js +8 -14
- package/src/plugins/kriya/leverageVaultsJob.js.map +1 -1
- package/src/plugins/streamflow/airdropAddresses.d.ts +3 -0
- package/src/plugins/streamflow/airdropAddresses.js +125415 -0
- package/src/plugins/streamflow/airdropAddresses.js.map +1 -0
- package/src/plugins/streamflow/helpers.js +18 -0
- package/src/plugins/streamflow/helpers.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.d.ts +3 -2
- package/src/plugins/zeta/airdropFetcher.js +64 -52
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/plugins/zeta/constants.d.ts +3 -1
- package/src/plugins/zeta/constants.js +11 -2
- package/src/plugins/zeta/constants.js.map +1 -1
- package/src/plugins/zeta/index.d.ts +2 -0
- package/src/plugins/zeta/index.js +4 -7
- package/src/plugins/zeta/index.js.map +1 -1
- package/src/plugins/zeta/stakingFetcher.js +1 -1
- package/src/plugins/zeta/stakingFetcher.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -17,6 +17,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
17
17
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
18
|
const constants_1 = require("./constants");
|
19
19
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
20
|
+
const airdropAddresses_1 = require("./airdropAddresses");
|
20
21
|
function getAirdropApiUrlFromNetworkId(owner, networkId) {
|
21
22
|
switch (networkId) {
|
22
23
|
case 'aptos':
|
@@ -32,8 +33,25 @@ function getAirdropApiUrlFromNetworkId(owner, networkId) {
|
|
32
33
|
}
|
33
34
|
}
|
34
35
|
exports.getAirdropApiUrlFromNetworkId = getAirdropApiUrlFromNetworkId;
|
36
|
+
function isElible(owner, networdkId) {
|
37
|
+
var _a;
|
38
|
+
return (_a = airdropAddresses_1.eligibleAddresses[networdkId]) === null || _a === void 0 ? void 0 : _a.includes(owner);
|
39
|
+
}
|
35
40
|
function getAirdropItems(owner, networdkId) {
|
36
41
|
return __awaiter(this, void 0, void 0, function* () {
|
42
|
+
if (!isElible(owner, networdkId))
|
43
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
44
|
+
statics: constants_1.airdropStatics,
|
45
|
+
items: [
|
46
|
+
{
|
47
|
+
amount: 0,
|
48
|
+
isClaimed: false,
|
49
|
+
label: 'STREAM',
|
50
|
+
address: constants_1.streamMint,
|
51
|
+
imageUri: constants_1.platform.image,
|
52
|
+
},
|
53
|
+
],
|
54
|
+
});
|
37
55
|
const link = getAirdropApiUrlFromNetworkId(owner, networdkId);
|
38
56
|
if (!link)
|
39
57
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/streamflow/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAC7C,gEAAqC;AACrC,2CAA+E;AAC/E,yDAAqD;
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/streamflow/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAC7C,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BAAU;wBACnB,QAAQ,EAAE,oBAAQ,CAAC,KAAK;qBACzB;iBACF;aACF,CAAC,CAAC;QAEL,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU;YACtB,OAAO,IAAA,8BAAa,EAAC;gBACnB,OAAO,EAAE,0BAAc;gBACvB,KAAK,EAAE;oBACL;wBACE,MAAM,EAAE,CAAC;wBACT,SAAS,EAAE,KAAK;wBAChB,KAAK,EAAE,QAAQ;wBACf,OAAO,EAAE,sBAAU;wBACnB,QAAQ,EAAE,oBAAQ,CAAC,KAAK;qBACzB;iBACF;aACF,CAAC,CAAC;QAEL,MAAM,MAAM,GAAG,IAAA,sBAAS,EAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;aAC/C,SAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC;aAClB,QAAQ,EAAE,CAAC;QACd,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM;oBACN,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,QAAQ;oBACf,OAAO,EAAE,sBAAU;oBACnB,QAAQ,EAAE,oBAAQ,CAAC,KAAK;iBACzB;aACF;SACF,CAAC,CAAC;IACL,CAAC;CAAA;AAjED,0CAiEC"}
|
@@ -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;
|
@@ -31,34 +31,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
32
32
|
});
|
33
33
|
};
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
36
|
-
};
|
37
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35
|
+
exports.fetcher = exports.airdropFetcher = void 0;
|
38
36
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
39
37
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
40
38
|
const constants_1 = require("./constants");
|
41
|
-
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
42
39
|
const clients_1 = require("../../utils/clients");
|
43
40
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
41
|
const helpers_1 = require("./helpers");
|
45
|
-
const
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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
|
+
}
|
59
57
|
`;
|
60
58
|
const networkId = portfolio_core_1.NetworkId.solana;
|
61
|
-
const executor = (owner
|
59
|
+
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
62
60
|
const res = yield (0, graphql_request_1.default)(constants_1.graphqlApi, query, {
|
63
61
|
authority: owner,
|
64
62
|
}, {
|
@@ -67,48 +65,62 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
67
65
|
'X-Api-Key': 'da2-rrupjjccivdndc6rvltixlmsma',
|
68
66
|
}).catch(() => null);
|
69
67
|
if (!res || !res.getAirdropFinalFrontend)
|
70
|
-
return
|
68
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
69
|
+
statics: constants_1.airdropStatics,
|
70
|
+
items: [
|
71
|
+
{
|
72
|
+
amount: 0,
|
73
|
+
isClaimed: false,
|
74
|
+
label: 'ZEX',
|
75
|
+
address: constants_1.zexMint,
|
76
|
+
},
|
77
|
+
],
|
78
|
+
});
|
71
79
|
const amount = res.getAirdropFinalFrontend.total_allocation;
|
72
80
|
if (!amount || amount === 0)
|
73
|
-
return
|
81
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
82
|
+
statics: constants_1.airdropStatics,
|
83
|
+
items: [
|
84
|
+
{
|
85
|
+
amount: 0,
|
86
|
+
isClaimed: false,
|
87
|
+
label: 'ZEX',
|
88
|
+
address: constants_1.zexMint,
|
89
|
+
},
|
90
|
+
],
|
91
|
+
});
|
74
92
|
const claimStatuses = (0, helpers_1.deriveZetaClaimStatuses)(owner, constants_1.distributors);
|
75
93
|
const client = (0, clients_1.getClientSolana)();
|
76
94
|
const claimStatusesAccount = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, claimStatuses);
|
95
|
+
console.log('constexecutor:AirdropFetcherExecutor= ~ claimStatusesAccount:', claimStatusesAccount);
|
77
96
|
if (claimStatusesAccount.some((account) => account))
|
78
|
-
return
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
97
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
98
|
+
statics: constants_1.airdropStatics,
|
99
|
+
items: [
|
100
|
+
{
|
101
|
+
amount,
|
102
|
+
isClaimed: true,
|
103
|
+
label: 'ZEX',
|
104
|
+
address: constants_1.zexMint,
|
105
|
+
},
|
106
|
+
],
|
107
|
+
});
|
108
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
109
|
+
statics: constants_1.airdropStatics,
|
110
|
+
items: [
|
111
|
+
{
|
88
112
|
amount,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
networkId,
|
93
|
-
attributes: { lockedUntil: 1719475200000 },
|
94
|
-
};
|
95
|
-
return [
|
96
|
-
{
|
97
|
-
type: 'multiple',
|
98
|
-
label: 'Airdrop',
|
99
|
-
networkId,
|
100
|
-
platformId: constants_1.platformId,
|
101
|
-
data: {
|
102
|
-
assets: [asset],
|
113
|
+
isClaimed: false,
|
114
|
+
label: 'ZEX',
|
115
|
+
address: constants_1.zexMint,
|
103
116
|
},
|
104
|
-
|
105
|
-
|
106
|
-
];
|
117
|
+
],
|
118
|
+
});
|
107
119
|
});
|
108
|
-
|
109
|
-
id:
|
110
|
-
networkId,
|
120
|
+
exports.airdropFetcher = {
|
121
|
+
id: constants_1.airdropStatics.id,
|
122
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
111
123
|
executor,
|
112
124
|
};
|
113
|
-
exports.
|
125
|
+
exports.fetcher = (0, AirdropFetcher_1.airdropFetcherToFetcher)(exports.airdropFetcher, constants_1.platform.id, 'zeta-airdrop', constants_1.airdropStatics.claimEnd);
|
114
126
|
//# sourceMappingURL=airdropFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAE/C,2CAMqB;AAErB,iDAAsD;AACtD,gGAA6F;AAC7F,uCAAoD;AACpD,yDAK8B;AAE9B,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAchB,CAAC;AAEF,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,GAAG,GAAG,MAAM,IAAA,yBAAO,EACvB,sBAAU,EACV,KAAK,EACL;QACE,SAAS,EAAE,KAAK;KACjB,EACD;QACE,MAAM,EAAE,4BAA4B;QACpC,QAAQ,EAAE,6BAA6B;QACvC,WAAW,EAAE,gCAAgC;KAC9C,CACF,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACpB,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,uBAAuB;QACtC,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,mBAAO;iBACjB;aACF;SACF,CAAC,CAAC;IAEL,MAAM,MAAM,GAAG,GAAG,CAAC,uBAAuB,CAAC,gBAAgB,CAAC;IAC5D,IAAI,CAAC,MAAM,IAAI,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,CACxB,CAAC"}
|
@@ -2,13 +2,15 @@
|
|
2
2
|
import { PublicKey } from '@solana/web3.js';
|
3
3
|
import { Platform } from '@sonarwatch/portfolio-core';
|
4
4
|
import { IdlItem } from '@solanafm/explorer-kit-idls';
|
5
|
+
import { AirdropStatics } from '../../AirdropFetcher';
|
5
6
|
export declare const platformId = "zeta";
|
6
7
|
export declare const platform: Platform;
|
7
8
|
export declare const programId: PublicKey;
|
8
9
|
export declare const graphqlApi = "https://api-gql.zeta.markets/graphql";
|
10
|
+
export declare const airdropStatics: AirdropStatics;
|
9
11
|
export declare const zexMint = "ZEXy1pqteRu3n13kdyh4LwPQknkFk3GzmMYMuNadWPo";
|
10
12
|
export declare const zexDecimals = 6;
|
11
13
|
export declare const distributorPid = "4JSALTb4QbipG7NNLryAFJg4y8X5C1ELErSncsVMA3gZ";
|
12
14
|
export declare const distributors: string[];
|
13
15
|
export declare const stakingPid: PublicKey;
|
14
|
-
export declare const
|
16
|
+
export declare const zetaIdlItem: IdlItem;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.zetaIdlItem = exports.stakingPid = exports.distributors = exports.distributorPid = exports.zexDecimals = exports.zexMint = exports.airdropStatics = exports.graphqlApi = exports.programId = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
const idls_1 = require("./idls");
|
6
6
|
exports.platformId = 'zeta';
|
@@ -13,6 +13,15 @@ exports.platform = {
|
|
13
13
|
};
|
14
14
|
exports.programId = new web3_js_1.PublicKey('ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD');
|
15
15
|
exports.graphqlApi = 'https://api-gql.zeta.markets/graphql';
|
16
|
+
exports.airdropStatics = {
|
17
|
+
claimLink: 'https://token.zeta.markets/',
|
18
|
+
emitterLink: 'https://www.zeta.markets/',
|
19
|
+
emitterName: 'Zeta',
|
20
|
+
id: 'zeta-airdrop',
|
21
|
+
image: 'https://sonar.watch/img/platforms/zeta.webp',
|
22
|
+
claimStart: 1719475200000,
|
23
|
+
claimEnd: 1727251200000,
|
24
|
+
};
|
16
25
|
exports.zexMint = 'ZEXy1pqteRu3n13kdyh4LwPQknkFk3GzmMYMuNadWPo';
|
17
26
|
exports.zexDecimals = 6;
|
18
27
|
exports.distributorPid = '4JSALTb4QbipG7NNLryAFJg4y8X5C1ELErSncsVMA3gZ';
|
@@ -54,7 +63,7 @@ exports.distributors = [
|
|
54
63
|
'6o1ZexNBJnQCDXiWtJgDPkE4u5WndgUb1wKDjofRuWme',
|
55
64
|
];
|
56
65
|
exports.stakingPid = new web3_js_1.PublicKey('4DUapvWZDDCkfWJpdwvX2QjwAE9Yq4wU8792RMMv7Csg');
|
57
|
-
exports.
|
66
|
+
exports.zetaIdlItem = {
|
58
67
|
programId: exports.stakingPid.toString(),
|
59
68
|
idl: idls_1.idls,
|
60
69
|
idlType: 'anchor',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,iCAA+C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,iCAA+C;AAGlC,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AACW,QAAA,UAAU,GAAG,sCAAsC,CAAC;AAEpD,QAAA,cAAc,GAAmB;IAC5C,SAAS,EAAE,6BAA6B;IACxC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,MAAM;IACnB,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,6CAA6C;IACpD,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;CACxB,CAAC;AAEW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAChE,QAAA,YAAY,GAAG;IAC1B,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,6CAA6C;IAC7C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,kBAAU,CAAC,QAAQ,EAAE;IAChC,GAAG,EAAE,WAAa;IAClB,OAAO,EAAE,QAAQ;CACP,CAAC"}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
2
|
import { Fetcher } from '../../Fetcher';
|
3
3
|
import { Job } from '../../Job';
|
4
|
+
import { airdropFetcher } from './airdropFetcher';
|
4
5
|
export declare const jobs: Job[];
|
5
6
|
export declare const fetchers: Fetcher[];
|
6
7
|
export declare const platforms: Platform[];
|
8
|
+
export { airdropFetcher };
|
@@ -3,16 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.platforms = exports.fetchers = exports.jobs = void 0;
|
6
|
+
exports.airdropFetcher = exports.platforms = exports.fetchers = exports.jobs = void 0;
|
7
7
|
const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
|
8
|
-
const airdropFetcher_1 =
|
8
|
+
const airdropFetcher_1 = require("./airdropFetcher");
|
9
|
+
Object.defineProperty(exports, "airdropFetcher", { enumerable: true, get: function () { return airdropFetcher_1.airdropFetcher; } });
|
9
10
|
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
10
11
|
const constants_1 = require("./constants");
|
11
12
|
exports.jobs = [];
|
12
|
-
exports.fetchers = [
|
13
|
-
depositsFetcher_1.default,
|
14
|
-
airdropFetcher_1.default,
|
15
|
-
stakingFetcher_1.default,
|
16
|
-
];
|
13
|
+
exports.fetchers = [depositsFetcher_1.default, airdropFetcher_1.fetcher, stakingFetcher_1.default];
|
17
14
|
exports.platforms = [constants_1.platform];
|
18
15
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,qDAA2D;AAOlD,+FAPA,+BAAc,OAOA;AANvB,sEAA8C;AAC9C,2CAAuC;AAE1B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,EAAE,wBAAO,EAAE,wBAAc,CAAC,CAAC;AACjE,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
|
@@ -27,7 +27,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
27
27
|
const accounts = [];
|
28
28
|
do {
|
29
29
|
const stakeAccountsAddresses = (0, helpers_1.getStakeAccountsAddresses)(owner, index, index + step);
|
30
|
-
const stakeAccounts = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(client, constants_1.
|
30
|
+
const stakeAccounts = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(client, constants_1.zetaIdlItem, stakeAccountsAddresses);
|
31
31
|
index += step;
|
32
32
|
accounts.push(...stakeAccounts);
|
33
33
|
} while (!accounts.some((acc) => !acc));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAA4E;AAC5E,qGAA6E;AAC7E,iDAAsD;AACtD,uCAAoE;AACpE,+CAG4B;AAG5B,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG,CAAC,CAAC;IACf,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,GAAG,CAAC;QACF,MAAM,sBAAsB,GA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;YACT,UAAU,EAAV,sBAAU;YACV,IAAI;YACJ,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -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;
|