@sonarwatch/portfolio-plugins 0.11.229 → 0.11.231
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1670 -1662
- package/README.md +3 -3
- package/package.json +5 -5
- package/src/index.js +8 -4
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/elixir/constants.d.ts +12 -0
- package/src/plugins/elixir/constants.js +79 -0
- package/src/plugins/elixir/constants.js.map +1 -0
- package/src/plugins/elixir/helpers.d.ts +2 -0
- package/src/plugins/elixir/helpers.js +40 -0
- package/src/plugins/elixir/helpers.js.map +1 -0
- package/src/plugins/{metadao → elixir}/index.js +3 -3
- package/src/plugins/elixir/index.js.map +1 -0
- package/src/plugins/elixir/positionsFetcher.d.ts +3 -0
- package/src/plugins/elixir/positionsFetcher.js +153 -0
- package/src/plugins/elixir/positionsFetcher.js.map +1 -0
- package/src/plugins/elixir/types.d.ts +43 -0
- package/src/plugins/elixir/types.js +3 -0
- package/src/plugins/elixir/types.js.map +1 -0
- package/src/plugins/elixir/vaultsJob.js +48 -0
- package/src/plugins/elixir/vaultsJob.js.map +1 -0
- package/src/plugins/{metadao → futarchy}/constants.d.ts +3 -3
- package/src/plugins/futarchy/constants.js +19 -0
- package/src/plugins/futarchy/constants.js.map +1 -0
- package/src/plugins/futarchy/daosJob.js +283 -0
- package/src/plugins/futarchy/daosJob.js.map +1 -0
- package/src/plugins/futarchy/index.d.ts +6 -0
- package/src/plugins/futarchy/index.js +12 -0
- package/src/plugins/futarchy/index.js.map +1 -0
- package/src/plugins/futarchy/structs.d.ts +96 -0
- package/src/plugins/futarchy/structs.js +94 -0
- package/src/plugins/futarchy/structs.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/texture/index.js +5 -0
- package/src/plugins/texture/index.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/aptos/getAccountResources.d.ts +1 -1
- package/src/utils/aptos/getCoinStoreResources.d.ts +1 -1
- package/src/utils/aptos/getView.d.ts +1 -1
- package/src/utils/clients/getClientCosmos.d.ts +84 -57
- package/src/utils/clients/getClientIbc.d.ts +144 -103
- package/src/utils/clients/getClientSei.d.ts +97 -97
- package/src/utils/misc/getLpUnderlyingTokenSource.d.ts +2 -0
- package/src/utils/misc/getLpUnderlyingTokenSource.js +3 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getAllBalances.d.ts +2 -2
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/metadao/constants.js +0 -16
- package/src/plugins/metadao/constants.js.map +0 -1
- package/src/plugins/metadao/index.js.map +0 -1
- package/src/plugins/metadao/poolsJob.js +0 -98
- package/src/plugins/metadao/poolsJob.js.map +0 -1
- package/src/plugins/metadao/structs.d.ts +0 -44
- package/src/plugins/metadao/structs.js +0 -45
- package/src/plugins/metadao/structs.js.map +0 -1
- package/src/plugins/metadao/vaultsJob.js +0 -113
- package/src/plugins/metadao/vaultsJob.js.map +0 -1
- /package/src/plugins/{metadao → elixir}/index.d.ts +0 -0
- /package/src/plugins/{metadao → elixir}/vaultsJob.d.ts +0 -0
- /package/src/plugins/{metadao/poolsJob.d.ts → futarchy/daosJob.d.ts} +0 -0
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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.231",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"@onsol/tldparser": "^0.6.1",
|
25
25
|
"@sei-js/core": "^3.0.1",
|
26
26
|
"@sei-js/proto": "^3.0.1",
|
27
|
-
"@solana/web3.js": "^1.91.
|
28
|
-
"axios": "^1.
|
29
|
-
"bignumber.js": "^9.1.
|
27
|
+
"@solana/web3.js": "^1.91.8",
|
28
|
+
"axios": "^1.7.2",
|
29
|
+
"bignumber.js": "^9.1.2",
|
30
30
|
"bitcoin-address-validation": "^2.2.1",
|
31
31
|
"bn.js": "^5.2.1",
|
32
32
|
"buffer": "6.0.1",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"web3-v1": "npm:web3@^1.5.0"
|
43
43
|
},
|
44
44
|
"peerDependencies": {
|
45
|
-
"@sonarwatch/portfolio-core": "0.11.
|
45
|
+
"@sonarwatch/portfolio-core": "0.11.232"
|
46
46
|
},
|
47
47
|
"main": "./src/index.js",
|
48
48
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -116,7 +116,8 @@ const bonfida_1 = require("./plugins/bonfida");
|
|
116
116
|
const cropper_1 = require("./plugins/cropper");
|
117
117
|
const hedgehog_1 = require("./plugins/hedgehog");
|
118
118
|
const whalesmarket_1 = require("./plugins/whalesmarket");
|
119
|
-
const
|
119
|
+
const futarchy_1 = require("./plugins/futarchy");
|
120
|
+
const elixir_1 = require("./plugins/elixir");
|
120
121
|
var constants_1 = require("./plugins/tokens/constants");
|
121
122
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
122
123
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -226,7 +227,8 @@ exports.platforms = [
|
|
226
227
|
...cropper_1.platforms,
|
227
228
|
...hedgehog_1.platforms,
|
228
229
|
...whalesmarket_1.platforms,
|
229
|
-
...
|
230
|
+
...futarchy_1.platforms,
|
231
|
+
...elixir_1.platforms,
|
230
232
|
];
|
231
233
|
// JOBS //
|
232
234
|
exports.jobs = [
|
@@ -319,7 +321,8 @@ exports.jobs = [
|
|
319
321
|
...cropper_1.jobs,
|
320
322
|
...hedgehog_1.jobs,
|
321
323
|
...whalesmarket_1.jobs,
|
322
|
-
...
|
324
|
+
...futarchy_1.jobs,
|
325
|
+
...elixir_1.jobs,
|
323
326
|
];
|
324
327
|
// FETCHERS //
|
325
328
|
exports.fetchers = [
|
@@ -414,7 +417,8 @@ exports.fetchers = [
|
|
414
417
|
...cropper_1.fetchers,
|
415
418
|
...hedgehog_1.fetchers,
|
416
419
|
...whalesmarket_1.fetchers,
|
417
|
-
...
|
420
|
+
...futarchy_1.fetchers,
|
421
|
+
...elixir_1.fetchers,
|
418
422
|
];
|
419
423
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
420
424
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,yCAIwB;AACxB,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAKyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,2CAIyB;AACzB,uDAI+B;AAC/B,6DAIkC;AAClC,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;AAC7B,6CAI0B;AAC1B,iEAIoC;AACpC,6DAIkC;AAClC,yCAIwB;AACxB,uCAIuB;AACvB,+CAI2B;AAC3B,iDAI4B;AAC5B,mDAI6B;AAC7B,2CAIyB;AACzB,+CAI2B;AAC3B,uCAIuB;AACvB,iDAI4B;AAC5B,yCAIwB;AACxB,6CAI0B;AAC1B,yCAIwB;AACxB,mDAI6B;AAC7B,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,+CAI2B;AAC3B,iDAI4B;AAC5B,yDAIgC;AAChC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2C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AgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;CAClB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,sBAAmB;IACnB,sBAAmB;CACpB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,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;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare const platformId = "elixir";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const vaults: {
|
5
|
+
address: string;
|
6
|
+
vaultName: string;
|
7
|
+
vaultDisplayName: string;
|
8
|
+
perpetualId: string;
|
9
|
+
}[];
|
10
|
+
export declare const vaultsPrefix = "elixir";
|
11
|
+
export declare const vaultsKey = "vaults";
|
12
|
+
export declare const vaultsTvlKey = "vaultstvl";
|
@@ -0,0 +1,79 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.vaultsTvlKey = exports.vaultsKey = exports.vaultsPrefix = exports.vaults = exports.platform = exports.platformId = void 0;
|
4
|
+
exports.platformId = 'elixir';
|
5
|
+
exports.platform = {
|
6
|
+
id: exports.platformId,
|
7
|
+
name: 'Elixir',
|
8
|
+
image: 'https://sonar.watch/img/platforms/elixir.webp',
|
9
|
+
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
10
|
+
website: 'https://agg.elixir.xyz/',
|
11
|
+
twitter: 'https://x.com/elixir',
|
12
|
+
};
|
13
|
+
// extracted from Elixir code
|
14
|
+
exports.vaults = [
|
15
|
+
{
|
16
|
+
address: '0xd91e4fab8b707009ef0093135bef3e39adbc6d43c5e01944f27d048ec9a84aaa',
|
17
|
+
vaultName: 'ETH_PERP',
|
18
|
+
vaultDisplayName: 'ETH ⇔ USDC',
|
19
|
+
perpetualId: '0x30b7baece69ecd1b1bea5c965f22e52ffbb3dd28b15b79449971945b2687fc35',
|
20
|
+
},
|
21
|
+
{
|
22
|
+
address: '0x2a58307c374970ae7ab31c7ab2d6881f6e3f30a6576a23cb2cdbf8400b806387',
|
23
|
+
vaultName: 'BTC_PERP',
|
24
|
+
vaultDisplayName: 'BTC ⇔ USDC',
|
25
|
+
perpetualId: '0x38d43822f621968460a642f47db2c5a20b3d59826c6dd34811c78ba3866cc2d1',
|
26
|
+
},
|
27
|
+
{
|
28
|
+
address: '0x12973df124a6d7e357e0eb9639f5c2bbb621214d1d7f58f17ca62789078bc287',
|
29
|
+
vaultName: 'SUI_PERP',
|
30
|
+
vaultDisplayName: 'SUI ⇔ USDC',
|
31
|
+
perpetualId: '0xdade62fa7a4b4f1eac97c76d61e70b68c91d3c60ce399c7f741dee43e8d93167',
|
32
|
+
},
|
33
|
+
{
|
34
|
+
address: '0x48d66ded5d13c2d04f0e88e23cdc52edceb25d28489d0604f467ca624cd989ee',
|
35
|
+
vaultName: 'SOL_PERP',
|
36
|
+
vaultDisplayName: 'SOL ⇔ USDC',
|
37
|
+
perpetualId: '0x876905808eefa9104ae3b569cd21d364346da791f1638aab5d4f89af53b8baec',
|
38
|
+
},
|
39
|
+
{
|
40
|
+
address: '0xa62c2ea87e494c70189e8c71721f4f695be602fd767de47a5d81e52832de1264',
|
41
|
+
vaultName: 'ARB_PERP',
|
42
|
+
vaultDisplayName: 'ARB ⇔ USDC',
|
43
|
+
perpetualId: '0x2da0b91d57ba9e0877ec0b93da18902e627be687e909df7c2e5111f3b34e27ab',
|
44
|
+
},
|
45
|
+
{
|
46
|
+
address: '0x2fd542335c9e9a5977fab67d211a315e707d136db807905594178428734eab81',
|
47
|
+
vaultName: 'APT_PERP',
|
48
|
+
vaultDisplayName: 'APT ⇔ USDC',
|
49
|
+
perpetualId: '0xd9a014692e3002d196107d5c58657c451ae7f8d00ebd61d45b71fd9a98cabff4',
|
50
|
+
},
|
51
|
+
{
|
52
|
+
address: '0x3018057a2ebf1aec510ff1f141ee358c4bacafa3ca8006abe9238f4d6caca5e0',
|
53
|
+
vaultName: 'AVAX_PERP',
|
54
|
+
vaultDisplayName: 'AVAX ⇔ USDC',
|
55
|
+
perpetualId: '0x1563fe1b1eda2b2427fa33d683c60464cc3a8912c0f9a9836fb6c3fd30810d0e',
|
56
|
+
},
|
57
|
+
{
|
58
|
+
address: '0x8b1e7c57e0befb8140ccf616f6b55dd048f5b7fb8e88e9ff79a9b5d479307541',
|
59
|
+
vaultName: 'TIA_PERP',
|
60
|
+
vaultDisplayName: 'TIA ⇔ USDC',
|
61
|
+
perpetualId: '0x69021f4991ac18fdbfc6b07914835811236008a797a51a56a6948ff3474bc8f6',
|
62
|
+
},
|
63
|
+
{
|
64
|
+
address: '0xed062a14ac075a338ab41763a5a53b14af3f0ceb0e003d3aea24d6a6281a7723',
|
65
|
+
vaultName: 'MATIC_PERP',
|
66
|
+
vaultDisplayName: 'MATIC ⇔ USDC',
|
67
|
+
perpetualId: '0x18a2f1a773b66b1d568cfa56cadbc9bfe91a1a16a09c7338897273a60a293a4b',
|
68
|
+
},
|
69
|
+
{
|
70
|
+
address: '0xb2f2b48055fa43ad36d05a46615c9d38b56e6a605e24ea4c278a4904af4ef9fc',
|
71
|
+
vaultName: 'SEI_PERP',
|
72
|
+
vaultDisplayName: 'SEI ⇔ USDC',
|
73
|
+
perpetualId: '0xcf84b2b99a65fd595e8bf03a9dc16c7002533ebdbc3ad035f9863594a9b356a1',
|
74
|
+
},
|
75
|
+
];
|
76
|
+
exports.vaultsPrefix = exports.platformId;
|
77
|
+
exports.vaultsKey = 'vaults';
|
78
|
+
exports.vaultsTvlKey = 'vaultstvl';
|
79
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,qEAAqE;IACrE,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,sBAAsB;CAChC,CAAC;AAEF,6BAA6B;AAChB,QAAA,MAAM,GAAG;IACpB;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,WAAW;QACtB,gBAAgB,EAAE,aAAa;QAC/B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,YAAY;QACvB,gBAAgB,EAAE,cAAc;QAChC,WAAW,EACT,oEAAoE;KACvE;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,SAAS,EAAE,UAAU;QACrB,gBAAgB,EAAE,YAAY;QAC9B,WAAW,EACT,oEAAoE;KACvE;CACF,CAAC;AAEW,QAAA,YAAY,GAAG,kBAAU,CAAC;AAC1B,QAAA,SAAS,GAAG,QAAQ,CAAC;AACrB,QAAA,YAAY,GAAG,WAAW,CAAC"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatAndCleanBigInt = exports.convertDecimalStringToScaledBigInt = void 0;
|
4
|
+
function convertDecimalStringToScaledBigInt(e, t = 18) {
|
5
|
+
const n = e.split('.');
|
6
|
+
if (n.length === 2) {
|
7
|
+
const [r, i] = n;
|
8
|
+
if (BigInt(r) > BigInt(0))
|
9
|
+
return BigInt(`${r}${i}${'0'.repeat(t - i.length)}`);
|
10
|
+
return i.length < t
|
11
|
+
? BigInt(`${i}${'0'.repeat(t - i.length)}`)
|
12
|
+
: BigInt(`${i}`.substring(0, t));
|
13
|
+
}
|
14
|
+
return BigInt(`${e}${'0'.repeat(t)}`);
|
15
|
+
}
|
16
|
+
exports.convertDecimalStringToScaledBigInt = convertDecimalStringToScaledBigInt;
|
17
|
+
function cleanNumericString(e) {
|
18
|
+
return e
|
19
|
+
.replace(/0+$/, '')
|
20
|
+
.replace(/\.$/, '')
|
21
|
+
.replace(/^0+/, '')
|
22
|
+
.replace(/^\./, '0.')
|
23
|
+
.replace(/^$/, '0');
|
24
|
+
}
|
25
|
+
function formatBigIntWithDecimals(e, t = 0) {
|
26
|
+
const n = e.toString();
|
27
|
+
const r = n.length;
|
28
|
+
if (r <= t)
|
29
|
+
return `0.${'0'.repeat(t - r)}${n}`;
|
30
|
+
{
|
31
|
+
const i = n.slice(0, r - t);
|
32
|
+
const s = n.slice(r - t);
|
33
|
+
return `${i}.${s}`;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
function formatAndCleanBigInt(e, t = 0) {
|
37
|
+
return cleanNumericString(formatBigIntWithDecimals(e, t));
|
38
|
+
}
|
39
|
+
exports.formatAndCleanBigInt = formatAndCleanBigInt;
|
40
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kCAAkC,CAAC,CAAS,EAAE,CAAC,GAAG,EAAE;IAClE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnB,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YACvB,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEvD,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC;YACjB,CAAC,CAAC,MAAM,CAAC,GAAG,CA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E,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAFD,oDAEC"}
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const constants_1 = require("./constants");
|
8
8
|
const vaultsJob_1 = __importDefault(require("./vaultsJob"));
|
9
|
-
const
|
9
|
+
const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
10
10
|
exports.platforms = [constants_1.platform];
|
11
|
-
exports.jobs = [vaultsJob_1.default
|
12
|
-
exports.fetchers = [];
|
11
|
+
exports.jobs = [vaultsJob_1.default];
|
12
|
+
exports.fetchers = [positionsFetcher_1.default];
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,4DAAoC;AACpC,0EAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
|
@@ -0,0 +1,153 @@
|
|
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 constants_1 = require("./constants");
|
17
|
+
const clients_1 = require("../../utils/clients");
|
18
|
+
const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
19
|
+
const aptos_1 = require("../../utils/aptos");
|
20
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
|
+
const helpers_1 = require("./helpers");
|
22
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
+
const client = (0, clients_1.getClientSui)();
|
24
|
+
const [vaultObjects, vaultTvls] = yield Promise.all([
|
25
|
+
cache.getItem(constants_1.vaultsKey, {
|
26
|
+
prefix: constants_1.vaultsPrefix,
|
27
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
28
|
+
}),
|
29
|
+
cache.getItem(constants_1.vaultsTvlKey, {
|
30
|
+
prefix: constants_1.vaultsPrefix,
|
31
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
32
|
+
}),
|
33
|
+
]);
|
34
|
+
if (!vaultObjects || !vaultTvls)
|
35
|
+
return [];
|
36
|
+
const activeShares = yield Promise.all(vaultObjects.map((v) => __awaiter(void 0, void 0, void 0, function* () {
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
38
|
+
if (!((_a = v.data) === null || _a === void 0 ? void 0 : _a.content))
|
39
|
+
return null;
|
40
|
+
const [userSharesFields, userPendingWithdrawalsFields] = yield Promise.all([
|
41
|
+
(0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
42
|
+
parentId: (_c = (_b = v.data) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.fields.user_shares.fields.id.id,
|
43
|
+
name: {
|
44
|
+
type: 'address',
|
45
|
+
value: owner,
|
46
|
+
},
|
47
|
+
}),
|
48
|
+
(0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
49
|
+
parentId: (_e = (_d = v.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.fields.user_pending_withdrawals.fields.id.id,
|
50
|
+
name: {
|
51
|
+
type: 'address',
|
52
|
+
value: owner,
|
53
|
+
},
|
54
|
+
}),
|
55
|
+
]);
|
56
|
+
if (!userSharesFields && !userPendingWithdrawalsFields)
|
57
|
+
return null;
|
58
|
+
if (userSharesFields.error && userPendingWithdrawalsFields.error)
|
59
|
+
return null;
|
60
|
+
if (!((_f = v.data) === null || _f === void 0 ? void 0 : _f.type))
|
61
|
+
return null;
|
62
|
+
const { keys: coinType } = (0, aptos_1.parseTypeString)((_g = v.data) === null || _g === void 0 ? void 0 : _g.type);
|
63
|
+
if (!coinType)
|
64
|
+
return null;
|
65
|
+
return {
|
66
|
+
vault: (_j = (_h = v.data) === null || _h === void 0 ? void 0 : _h.content) === null || _j === void 0 ? void 0 : _j.fields.id.id,
|
67
|
+
total_shares: (_l = (_k = v.data) === null || _k === void 0 ? void 0 : _k.content) === null || _l === void 0 ? void 0 : _l.fields.total_shares,
|
68
|
+
shares: (_o = (_m = userSharesFields.data) === null || _m === void 0 ? void 0 : _m.content) === null || _o === void 0 ? void 0 : _o.fields.value,
|
69
|
+
pending: (_q = (_p = userPendingWithdrawalsFields.data) === null || _p === void 0 ? void 0 : _p.content) === null || _q === void 0 ? void 0 : _q.fields.value,
|
70
|
+
coinType: coinType[0].type,
|
71
|
+
};
|
72
|
+
}))).then((dfs) => dfs.filter((df) => df !== null));
|
73
|
+
const coinsTypes = [];
|
74
|
+
activeShares.forEach((a) => {
|
75
|
+
if (a &&
|
76
|
+
a.coinType &&
|
77
|
+
!coinsTypes.includes((0, portfolio_core_1.formatMoveTokenAddress)(a.coinType)))
|
78
|
+
coinsTypes.push((0, portfolio_core_1.formatMoveTokenAddress)(a.coinType));
|
79
|
+
});
|
80
|
+
const tokenPrices = yield cache.getTokenPricesAsMap(coinsTypes, portfolio_core_1.NetworkId.sui);
|
81
|
+
const elements = [];
|
82
|
+
activeShares.forEach((a) => {
|
83
|
+
var _a;
|
84
|
+
const assets = [];
|
85
|
+
if (!a)
|
86
|
+
return;
|
87
|
+
const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatMoveTokenAddress)(a.coinType));
|
88
|
+
if (!tokenPrice)
|
89
|
+
return;
|
90
|
+
const yields = [];
|
91
|
+
if (a.shares) {
|
92
|
+
let tvl;
|
93
|
+
vaultTvls.forEach((t) => {
|
94
|
+
if (t.product_id === a.vault) {
|
95
|
+
tvl = t;
|
96
|
+
}
|
97
|
+
});
|
98
|
+
if (tvl) {
|
99
|
+
const userActiveAmounts = (0, helpers_1.formatAndCleanBigInt)(((0, helpers_1.convertDecimalStringToScaledBigInt)(a.shares, 6) *
|
100
|
+
BigInt(tvl.USDC.amount_wei)) /
|
101
|
+
BigInt(a.total_shares), 18);
|
102
|
+
if (Number(userActiveAmounts) > 0) {
|
103
|
+
assets.push((0, tokenPriceToAssetToken_1.default)(a.coinType, Number(userActiveAmounts) / Math.pow(10, tokenPrice.decimals), portfolio_core_1.NetworkId.sui, tokenPrice));
|
104
|
+
yields.push({
|
105
|
+
apr: (0, portfolio_core_1.apyToApr)(Number(tvl.pool_apy)),
|
106
|
+
apy: Number(tvl.pool_apy),
|
107
|
+
});
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
const pendingAmount = a.pending
|
112
|
+
? Number(a.pending) / Math.pow(10, tokenPrice.decimals)
|
113
|
+
: undefined;
|
114
|
+
if (pendingAmount) {
|
115
|
+
assets.push((0, tokenPriceToAssetToken_1.default)(a.coinType, pendingAmount, portfolio_core_1.NetworkId.sui, tokenPrice, undefined, {}));
|
116
|
+
yields.push({
|
117
|
+
apr: 0,
|
118
|
+
apy: 0,
|
119
|
+
});
|
120
|
+
}
|
121
|
+
const assetsValue = (0, portfolio_core_1.getUsdValueSum)(assets.map((as) => as.value));
|
122
|
+
const value = assetsValue;
|
123
|
+
if (assets.length > 0) {
|
124
|
+
const liquidities = [
|
125
|
+
{
|
126
|
+
value,
|
127
|
+
assets,
|
128
|
+
assetsValue,
|
129
|
+
rewardAssets: [],
|
130
|
+
rewardAssetsValue: null,
|
131
|
+
yields,
|
132
|
+
name: (_a = constants_1.vaults.find((v) => v.address === a.vault)) === null || _a === void 0 ? void 0 : _a.vaultName,
|
133
|
+
},
|
134
|
+
];
|
135
|
+
elements.push({
|
136
|
+
type: 'liquidity',
|
137
|
+
data: { liquidities },
|
138
|
+
label: 'LiquidityPool',
|
139
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
140
|
+
platformId: constants_1.platformId,
|
141
|
+
value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((liq) => liq.value)),
|
142
|
+
});
|
143
|
+
}
|
144
|
+
});
|
145
|
+
return elements;
|
146
|
+
});
|
147
|
+
const fetcher = {
|
148
|
+
id: `${constants_1.platformId}-positions`,
|
149
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
150
|
+
executor,
|
151
|
+
};
|
152
|
+
exports.default = fetcher;
|
153
|
+
//# sourceMappingURL=positionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAUoC;AAGpC,2CAMqB;AAErB,iDAAmD;AACnD,iFAA8E;AAE9E,6CAAoD;AACpD,qGAA6E;AAC7E,uCAGmB;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;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AEF,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,EAAE,WAAW,EAAE;gBACrB,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
export interface Vault {
|
2
|
+
id: {
|
3
|
+
id: string;
|
4
|
+
};
|
5
|
+
bank: string;
|
6
|
+
bank_account: string;
|
7
|
+
coin_balance: string;
|
8
|
+
operator: string;
|
9
|
+
perpetual_id: string;
|
10
|
+
total_shares: string;
|
11
|
+
type: string;
|
12
|
+
user_pending_withdrawals: {
|
13
|
+
fields: {
|
14
|
+
id: {
|
15
|
+
id: string;
|
16
|
+
};
|
17
|
+
size: string;
|
18
|
+
};
|
19
|
+
type: string;
|
20
|
+
};
|
21
|
+
user_shares: {
|
22
|
+
fields: {
|
23
|
+
id: {
|
24
|
+
id: string;
|
25
|
+
};
|
26
|
+
size: string;
|
27
|
+
};
|
28
|
+
type: string;
|
29
|
+
};
|
30
|
+
}
|
31
|
+
export type PositionField = {
|
32
|
+
id: string;
|
33
|
+
name: string;
|
34
|
+
value: string;
|
35
|
+
};
|
36
|
+
export type VaultTvl = {
|
37
|
+
USDC: {
|
38
|
+
amount_wei: number;
|
39
|
+
price_usd: number;
|
40
|
+
};
|
41
|
+
pool_apy: number;
|
42
|
+
product_id: string;
|
43
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,48 @@
|
|
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 axios_1 = __importDefault(require("axios"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const clients_1 = require("../../utils/clients");
|
19
|
+
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
20
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
|
+
const client = (0, clients_1.getClientSui)();
|
22
|
+
const [vaultObjects, res] = yield Promise.all([
|
23
|
+
(0, multiGetObjects_1.multiGetObjects)(client, constants_1.vaults.map((v) => v.address)),
|
24
|
+
axios_1.default
|
25
|
+
.get('https://metrics-api.trusted-mainnet.elixir.xyz/metrics/tvl-apy')
|
26
|
+
.catch((err) => {
|
27
|
+
throw Error(`ELIXIR_API ERR: ${err}`);
|
28
|
+
}),
|
29
|
+
]);
|
30
|
+
if (!res || !res.data.data.tvl_per_exchange.BLUEFIN.token_pairs) {
|
31
|
+
throw Error(`ELIXIR_API NO RESPONSE`);
|
32
|
+
}
|
33
|
+
yield cache.setItem(constants_1.vaultsKey, vaultObjects, {
|
34
|
+
prefix: constants_1.vaultsPrefix,
|
35
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
36
|
+
});
|
37
|
+
yield cache.setItem(constants_1.vaultsTvlKey, Object.values(res.data.data.tvl_per_exchange.BLUEFIN.token_pairs), {
|
38
|
+
prefix: constants_1.vaultsPrefix,
|
39
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
40
|
+
});
|
41
|
+
});
|
42
|
+
const job = {
|
43
|
+
id: `${constants_1.platformId}-vaults`,
|
44
|
+
executor,
|
45
|
+
label: 'normal',
|
46
|
+
};
|
47
|
+
exports.default = job;
|
48
|
+
//# sourceMappingURL=vaultsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA0B;AAG1B,2CAMqB;AACrB,iDAAmD;AACnD,qEAAkE;AAGlE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5C,IAAA,iCAAe,EACb,MAAM,EACN,kBAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAC7B;QACD,eAAK;aACF,GAAG,CAAC,gEAAgE,CAAC;aACrE,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,MAAM,KAAK,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAChE,MAAM,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,qBAAS,EAAE,YAAY,EAAE;QAC3C,MAAM,EAAE,wBAAY;QACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,OAAO,CACjB,wBAAY,EACZ,MAAM,CAAC,MAAM,CACX,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,CACvC,EACb;QACE,MAAM,EAAE,wBAAY;QACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
-
export declare const platformId = "
|
3
|
+
export declare const platformId = "futarchy";
|
4
4
|
export declare const platform: Platform;
|
5
|
-
export declare const
|
6
|
-
export declare const
|
5
|
+
export declare const daoPid: PublicKey;
|
6
|
+
export declare const daoNameById: Map<string, string>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.daoNameById = exports.daoPid = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'futarchy';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Futarchy',
|
9
|
+
image: 'https://sonar.watch/img/platforms/metadao.webp',
|
10
|
+
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
11
|
+
website: 'https://futarchy.metadao.fi/',
|
12
|
+
twitter: 'https://x.com/MetaDAOProject',
|
13
|
+
};
|
14
|
+
exports.daoPid = new web3_js_1.PublicKey('autoQP9RmUNkzzKRXsMkWicDVZ3h29vvyMDcAYjCxxg');
|
15
|
+
exports.daoNameById = new Map([
|
16
|
+
['CNMZgxYsQpygk8CLN9Su1igwXX2kHtcawaNAGuBPv3G9', 'MetaDAO '],
|
17
|
+
['5vVCYQHPd8o3pGejYWzKZtnUSdLjXzDZcjZQxiFumXXx', 'Drift '],
|
18
|
+
]);
|
19
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/futarchy/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,qEAAqE;IACrE,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,MAAM,GAAG,IAAI,mBAAS,CACjC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,WAAW,GAAwB,IAAI,GAAG,CAAC;IACtD,CAAC,8CAA8C,EAAE,UAAU,CAAC;IAC5D,CAAC,8CAA8C,EAAE,QAAQ,CAAC;CAC3D,CAAC,CAAC"}
|