@sonarwatch/portfolio-plugins 0.14.4 → 0.14.5

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.14.5](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.4...plugins-0.14.5) (2024-10-17)
6
+
7
+
8
+ ### Reverts
9
+
10
+ * Revert "nxfinance fix" ([771326b](https://github.com/sonarwatch/portfolio/commit/771326b2733e529f7b90a7827978822b4f640349))
11
+
12
+
13
+
5
14
  ## [0.14.4](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.3...plugins-0.14.4) (2024-10-17)
6
15
 
7
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -40,9 +40,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
40
40
  const mint = constants_1.mints[i];
41
41
  if (mint === '1111111111111111111111111111111111111111111')
42
42
  continue;
43
- const amount = mint ===
44
- ('So11111111111111111111111111111111111111112' ||
45
- 'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So')
43
+ const amount = [
44
+ 'So11111111111111111111111111111111111111112',
45
+ 'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So',
46
+ ].includes(mint)
46
47
  ? rawAmount.dividedBy(1000)
47
48
  : rawAmount;
48
49
  if (amount.isLessThan('0.0001'))
@@ -1 +1 @@
1
- {"version":3,"file":"depostisFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/01/depostisFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAG5C,2CAAgD;AAChD,uCAAmC;AACnC,kF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MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;QAErE,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,IAAI,EACJ,MAAM,CAAC,QAAQ,EAAE,EACjB,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE3C,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5E,QAAQ,CAAC,IAAI,EAAE,CAAC;IAChB,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,KAAK;aACN;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"depostisFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/01/depostisFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAG5C,2CAAgD;AAChD,uCAAmC;AACnC,kFAA+E;AAC/E,qC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MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;QAErE,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,IAAI,EACJ,MAAM,CAAC,QAAQ,EAAE,EACjB,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE3C,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5E,QAAQ,CAAC,IAAI,EAAE,CAAC;IAChB,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,KAAK;aACN;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { AirdropFetcher } from '../../AirdropFetcher';
2
2
  export declare const airdropFetcherEvm: AirdropFetcher;
3
3
  export declare const airdropFetcherSolana: AirdropFetcher;
4
+ export declare const fetcher: import("../..").Fetcher;
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.airdropFetcherSolana = exports.airdropFetcherEvm = void 0;
15
+ exports.fetcher = exports.airdropFetcherSolana = exports.airdropFetcherEvm = void 0;
16
16
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
18
  const axios_1 = __importDefault(require("axios"));
@@ -23,9 +23,9 @@ const realDistributions = [
23
23
  'Claim 50% vested with bonus in 6 months after TGE',
24
24
  'First distribution',
25
25
  ];
26
- const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
26
+ const executorSolana = (owner) => __awaiter(void 0, void 0, void 0, function* () {
27
27
  const apiRes = yield axios_1.default.get(constants_1.apiUrl + owner, {
28
- timeout: 1000,
28
+ timeout: 3000,
29
29
  });
30
30
  if (!apiRes.data.distributions || apiRes.data.distributions.length === 0) {
31
31
  return (0, AirdropFetcher_1.getAirdropRaw)({
@@ -59,20 +59,51 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
59
59
  items,
60
60
  });
61
61
  });
62
+ const executorEvm = (owner) => __awaiter(void 0, void 0, void 0, function* () {
63
+ const apiRes = yield axios_1.default.get(constants_1.apiUrl + owner, {
64
+ timeout: 3000,
65
+ });
66
+ if (!apiRes.data.distributions || apiRes.data.distributions.length === 0) {
67
+ return (0, AirdropFetcher_1.getAirdropRaw)({
68
+ statics: constants_1.firstDistribStatics,
69
+ items: [
70
+ {
71
+ amount: 0,
72
+ isClaimed: false,
73
+ label: 'DBR',
74
+ address: undefined,
75
+ imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
76
+ },
77
+ ],
78
+ });
79
+ }
80
+ const items = [];
81
+ for (const distribution of apiRes.data.distributions) {
82
+ if (!realDistributions.includes(distribution.title))
83
+ continue;
84
+ const tokens = new bignumber_js_1.default(distribution.tokens).div(dbrFactor);
85
+ items.push({
86
+ amount: tokens.toNumber(),
87
+ isClaimed: false,
88
+ label: 'DBR',
89
+ address: undefined,
90
+ imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
91
+ });
92
+ }
93
+ return (0, AirdropFetcher_1.getAirdropRaw)({
94
+ statics: constants_1.firstDistribStatics,
95
+ items,
96
+ });
97
+ });
62
98
  exports.airdropFetcherEvm = {
63
99
  id: `${constants_1.firstDistribStatics.id}-evm`,
64
100
  networkId: portfolio_core_1.NetworkId.ethereum,
65
- executor,
101
+ executor: executorEvm,
66
102
  };
67
103
  exports.airdropFetcherSolana = {
68
104
  id: `${constants_1.firstDistribStatics.id}-solana`,
69
105
  networkId: portfolio_core_1.NetworkId.solana,
70
- executor,
106
+ executor: executorSolana,
71
107
  };
72
- // export const fetcher = airdropFetcherToFetcher(
73
- // airdropFetcher,
74
- // platform.id,
75
- // 'deepbook-airdrop',
76
- // airdropStatics.claimEnd
77
- // );
108
+ exports.fetcher = (0, AirdropFetcher_1.airdropFetcherToFetcher)(exports.airdropFetcherSolana, constants_1.platform.id, 'debridge-airdrop', constants_1.firstDistribStatics.claimEnd);
78
109
  //# sourceMappingURL=airdropFetcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AACrC,kDAA6C;AAC7C,yDAI8B;AAC9B,2CAMqB;AAGrB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AACnD,MAAM,iBAAiB,GAAG;IACxB,mDAAmD;IACnD,oBAAoB;CACrB,CAAC;AACF,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,MAAM,GAA+B,MAAM,eAAK,CAAC,GAAG,CAAC,kBAAM,GAAG,KAAK,EAAE;QACzE,OAAO,E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AAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEW,QAAA,oBAAoB,GAAmB;IAClD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACF,kDAAkD;AAClD,oBAAoB;AACpB,iBAAiB;AACjB,wBAAwB;AACxB,4BAA4B;AAC5B,KAAK"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AACrC,kDAA6C;AAC7C,yDAK8B;AAC9B,2CAOqB;AAGrB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AACnD,MAAM,iBAAiB,GAAG;IACxB,mDAAmD;IACnD,oBAAoB;CACrB,CAAC;AACF,MAAM,cAAc,GAA2B,CAAO,KAAa,EAAE,EAAE;IACrE,MAAM,MAAM,GAA+B,MAAM,eAAK,CAAC,GAAG,CAAC,kBAAM,GAAG,KAAK,EAAE;QACzE,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzE,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,+BAAmB;YAC5B,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,mBAAO;oBAChB,QAAQ,EAAE,mBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAW,CAAC,KAAK;iBAClD;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,GA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CAAC;IACL,CAAC;IAED,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QACrD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC;YAAE,SAAS;QAE9D,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEjE,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;YACzB,SAAS,EAAE,KAAK;YAChB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,mBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAW,CAAC,KAAK;SAClD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,+BAAmB;QAC5B,KAAK;KACN,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,iBAAiB,GAAmB;IAC/C,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,MAAM;IACnC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ,EAAE,WAAW;CACtB,CAAC;AAEW,QAAA,oBAAoB,GAAmB;IAClD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,cAAc;CACzB,CAAC;AACW,QAAA,OAAO,GAAG,IAAA,wCAAuB,EAC5C,4BAAoB,EACpB,oBAAQ,CAAC,EAAE,EACX,kBAAkB,EAClB,+BAAmB,CAAC,QAAQ,CAC7B,CAAC"}
@@ -15,7 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
18
- const bignumber_js_1 = __importDefault(require("bignumber.js"));
19
18
  const clients_1 = require("../../utils/clients");
20
19
  const constants_1 = require("./constants");
21
20
  const solana_1 = require("../../utils/solana");
@@ -25,31 +24,9 @@ const constants_2 = require("../meteora/constants");
25
24
  const slotTtl = 30000;
26
25
  let slot = null;
27
26
  let slotUpdate = 0;
27
+ const pricePerDbrToken = 0.025;
28
28
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
29
29
  const client = (0, clients_1.getClientSolana)();
30
- const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.escrowStruct, constants_1.dlmmVaultProgramId, [
31
- { dataSize: struct_1.escrowStruct.byteSize },
32
- {
33
- memcmp: {
34
- offset: 40,
35
- bytes: owner,
36
- },
37
- },
38
- // {
39
- // memcmp: {
40
- // offset: 8,
41
- // bytes: 'CGZvC5MWsu1bc3vRis619ZBEtvuPqoXrtBMeV9RrKFJp',
42
- // },
43
- // },
44
- // {
45
- // memcmp: {
46
- // offset: 96,
47
- // bytes: '1', // refunded === false
48
- // },
49
- // },
50
- ]);
51
- if (accounts.length === 0)
52
- return [];
53
30
  const vaults = yield cache.getItem(constants_2.dlmmVaultsKey, {
54
31
  prefix: constants_1.platformId,
55
32
  networkId: portfolio_core_1.NetworkId.solana,
@@ -62,6 +39,17 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
62
39
  }
63
40
  if (!slot)
64
41
  return [];
42
+ const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.escrowStruct, constants_1.dlmmVaultProgramId, [
43
+ { dataSize: struct_1.escrowStruct.byteSize },
44
+ {
45
+ memcmp: {
46
+ offset: 40,
47
+ bytes: owner,
48
+ },
49
+ },
50
+ ]);
51
+ if (accounts.length === 0)
52
+ return [];
65
53
  const tokenPrices = yield cache.getTokenPricesAsMap(accounts
66
54
  .map((a) => {
67
55
  const v = vaults[a.dlmmVault.toString()];
@@ -69,70 +57,24 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
69
57
  })
70
58
  .flat(), portfolio_core_1.NetworkId.solana);
71
59
  const assets = [];
72
- accounts.forEach((escrow) => {
73
- if (!slot)
74
- return;
60
+ for (const escrow of accounts) {
75
61
  const vault = vaults[escrow.dlmmVault.toString()];
76
62
  if (!vault)
77
- return;
78
- // Vesting not started yet
79
- if (slot < Number(vault.startVestingSlot)) {
80
- const tpQuote = tokenPrices.get(vault.quoteMint);
81
- if (!tpQuote)
82
- return;
83
- assets.push((0, tokenPriceToAssetToken_1.default)(vault.quoteMint, new bignumber_js_1.default(escrow.totalDeposit)
84
- .div(Math.pow(10, tpQuote.decimals))
85
- .toNumber(), portfolio_core_1.NetworkId.solana, tpQuote, undefined, {}));
86
- }
87
- else {
88
- // Vesting started
89
- // If not refunded yet
90
- const filledRatio = new bignumber_js_1.default(vault.totalDeposit)
91
- .div(vault.maxCap)
92
- .toNumber();
93
- if (escrow.refunded === 0 && filledRatio > 1) {
94
- const tpQuote = tokenPrices.get(vault.quoteMint);
95
- if (!tpQuote)
96
- return;
97
- const amount = new bignumber_js_1.default(escrow.totalDeposit)
98
- .div(Math.pow(10, tpQuote.decimals))
99
- .times(1 - 1 / filledRatio)
100
- .toNumber();
101
- assets.push((0, tokenPriceToAssetToken_1.default)(vault.quoteMint, amount, portfolio_core_1.NetworkId.solana, tpQuote, undefined, {
102
- isClaimable: true,
103
- }));
104
- }
105
- const tpBase = tokenPrices.get(vault.baseMint);
106
- if (!tpBase)
107
- return;
108
- const shares = new bignumber_js_1.default(escrow.totalDeposit).div(vault.totalDeposit);
109
- const totalAmount = new bignumber_js_1.default(vault.boughtToken).times(shares);
110
- const remainingAmount = totalAmount.minus(escrow.claimedToken);
111
- if (remainingAmount.isZero())
112
- return;
113
- let claimableAmount = new bignumber_js_1.default(remainingAmount.toString());
114
- if (slot < Number(vault.endVestingSlot)) {
115
- const amountPerSlot = new bignumber_js_1.default(totalAmount).div(Number(vault.endVestingSlot) - Number(vault.startVestingSlot));
116
- let lastClaimedSlot = escrow.lastClaimedSlot.isZero()
117
- ? Number(vault.startVestingSlot)
118
- : escrow.lastClaimedSlot.toNumber();
119
- if (lastClaimedSlot > slot)
120
- lastClaimedSlot = slot;
121
- claimableAmount = amountPerSlot.times(Math.min(slot, Number(vault.endVestingSlot)) - lastClaimedSlot);
122
- }
123
- if (claimableAmount.isGreaterThan(0)) {
124
- assets.push((0, tokenPriceToAssetToken_1.default)(vault.baseMint, claimableAmount.div(Math.pow(10, tpBase.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tpBase, undefined, {
125
- isClaimable: true,
126
- }));
127
- }
128
- const vestingAmount = remainingAmount.minus(claimableAmount);
129
- if (vestingAmount.isGreaterThan(0)) {
130
- assets.push((0, tokenPriceToAssetToken_1.default)(vault.baseMint, vestingAmount.div(Math.pow(10, tpBase.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tpBase, undefined, {
131
- tags: ['Vesting'],
132
- }));
133
- }
134
- }
135
- });
63
+ continue;
64
+ const [quoteTokenPrice, baseTokenPrice] = [
65
+ tokenPrices.get(vault.quoteMint),
66
+ tokenPrices.get(vault.baseMint),
67
+ ];
68
+ if (!quoteTokenPrice)
69
+ continue;
70
+ const totalTokenEligible = escrow.totalDeposit
71
+ .dividedBy(Math.pow(10, quoteTokenPrice.decimals))
72
+ .dividedBy(pricePerDbrToken);
73
+ const remainingClaimableTokens = totalTokenEligible.minus(escrow.claimedToken.dividedBy(Math.pow(10, constants_1.dbrDecimals)));
74
+ if (remainingClaimableTokens.isLessThanOrEqualTo(0))
75
+ continue;
76
+ assets.push((0, tokenPriceToAssetToken_1.default)(vault.baseMint, remainingClaimableTokens.toNumber(), portfolio_core_1.NetworkId.solana, baseTokenPrice, undefined, { lockedUntil: 1744876800000 }));
77
+ }
136
78
  if (assets.length === 0)
137
79
  return [];
138
80
  return [
@@ -141,7 +83,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
141
83
  type: portfolio_core_1.PortfolioElementType.multiple,
142
84
  label: 'Vesting',
143
85
  platformId: constants_1.platformId,
144
- name: 'Alpha Vault',
86
+ name: 'LFG Vault',
145
87
  data: {
146
88
  assets,
147
89
  },
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmVaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/dlmmVaultsFetcher.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,mBAAmB;;;;;;;;;;;;;;AAEnB,+DAKoC;AACpC,gEAAqC;AAGrC,iDAAsD;AACtD,2CAA6D;AAC7D,+CAA8D;AAC9D,qGAA6E;AAC7E,8CAAiD;AAEjD,oDAAqD;AAErD,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,IAAI,IAAI,GAAkB,IAAI,CAAC;AAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,qBAAY,EACZ,8BAAkB,EAClB;QACE,EAAE,QAAQ,EAAE,qBAAY,CAAC,QAAQ,EAAE;QACnC;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,KAAK;aACb;SACF;QACD,IAAI;QACJ,cAAc;QACd,iBAAiB;QACjB,6DAA6D;QAC7D,OAAO;QACP,KAAK;QACL,IAAI;QACJ,cAAc;QACd,kBAAkB;QAClB,wCAAwC;QACxC,OAAO;QACP,KAAK;KACN,CACF,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,CAAmB,yBAAa,EAAE;QAClE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE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EAAE,IAAI;iBAClB,CACF,CACF,CAAC;YACJ,CAAC;YAED,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAC7D,IAAI,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnC,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,KAAK,CAAC,QAAQ,EACd,aAAa,CAAC,GAAG,CAAC,SAAA,EAAE,EAAI,MAAM,CAAC,QAAQ,CAAA,CAAC,CAAC,QAAQ,EAAE,EACnD,0BAAS,CAAC,MAAM,EAChB,MAAM,EACN,SAAS,EACT;oBACE,IAAI,EAAE,CAAC,SAAS,CAAC;iBAClB,CACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE;gBACJ,MAAM;aACP;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAClD;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"dlmmVaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/dlmmVaultsFetcher.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,mBAAmB;;;;;;;;;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AI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACJ,MAAM;aACP;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAClD;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -10,7 +10,7 @@ const dlmmVaultsJob_1 = __importDefault(require("./dlmmVaultsJob"));
10
10
  const dlmmVaultsFetcher_1 = __importDefault(require("./dlmmVaultsFetcher"));
11
11
  exports.platforms = [constants_1.platform];
12
12
  exports.jobs = [dlmmVaultsJob_1.default];
13
- exports.fetchers = [dlmmVaultsFetcher_1.default];
13
+ exports.fetchers = [dlmmVaultsFetcher_1.default, airdropFetcher_1.fetcher];
14
14
  exports.airdropFetchers = [
15
15
  airdropFetcher_1.airdropFetcherEvm,
16
16
  airdropFetcher_1.airdropFetcherSolana,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,qDAA2E;AAE3E,oEAA4C;AAC5C,4EAAoD;AAEvC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,uBAAa,CAAC,CAAC;AAC9B,QAAA,QAAQ,GAAc,CAAC,2BAAiB,CAAC,CAAC;AAC1C,QAAA,eAAe,GAAqB;IAC/C,kCAAiB;IACjB,qCAAoB;CACrB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,qDAI0B;AAE1B,oEAA4C;AAC5C,4EAAoD;AAEvC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,uBAAa,CAAC,CAAC;AAC9B,QAAA,QAAQ,GAAc,CAAC,2BAAiB,EAAE,wBAAO,CAAC,CAAC;AACnD,QAAA,eAAe,GAAqB;IAC/C,kCAAiB;IACjB,qCAAoB;CACrB,CAAC"}
@@ -12,7 +12,7 @@ export type Distribution = {
12
12
  distributionEndTimestamp: number;
13
13
  points: number;
14
14
  tokens: string;
15
- merkleTreeRoute: null;
15
+ merkleTreeRoute: string[];
16
16
  };
17
17
  export type Notification = {
18
18
  id: string;
@@ -19,6 +19,7 @@ exports.leverageVaultsMints = [
19
19
  '27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4', // JLP
20
20
  'jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v', // JupSOL
21
21
  'vSoLxydx6akxyMD9XEcPvGYNGq6Nn66oqVb3UkGkei7', // vSOL
22
+ 'sSo14endRuUbvQaJS3dq36Q829a3A6BEfoeeRGJywEh', // sSOL
22
23
  ];
23
24
  exports.nxfinanceLeverageIdlItem = {
24
25
  programId: exports.leverageFiProgramID.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+CAAqD;AACrD,uCAA6C;AAEhC,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,YAAY,EAAE,sCAAsC;CAClE,CAAC;AAEW,QAAA,EAAE,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AAElE,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,8CAA8C,EAAE,MAAM;IACtD,6CAA6C,EAAE,SAAS;IACxD,6CAA6C,EAAE,OAAO;CACvD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,kCAAoB;IACzB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,0BAAgB;IACrB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,cAAc,GAAG,eAAe,CAAC;AAEjC,QAAA,YAAY,GAAG;IAC1B,IAAI,mBAAS,CAAC,8CAA8C,CAAC;CAC9D,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+CAAqD;AACrD,uCAA6C;AAEhC,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,YAAY,EAAE,sCAAsC;CAClE,CAAC;AAEW,QAAA,EAAE,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AAElE,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,8CAA8C,EAAE,MAAM;IACtD,6CAA6C,EAAE,SAAS;IACxD,6CAA6C,EAAE,OAAO;IACtD,6CAA6C,EAAE,OAAO;CACvD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,kCAAoB;IACzB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,0BAAgB;IACrB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,cAAc,GAAG,eAAe,CAAC;AAEjC,QAAA,YAAY,GAAG;IAC1B,IAAI,mBAAS,CAAC,8CAA8C,CAAC;CAC9D,CAAC"}
@@ -48,7 +48,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
48
48
  name: `JLP Leverage x${new bignumber_js_1.default(marginAccount.leverage)
49
49
  .dividedBy(100)
50
50
  .decimalPlaces(2)}`,
51
- leveraged: true,
52
51
  });
53
52
  marginAccount.deposits.forEach((deposit) => {
54
53
  const marginPool = marginPools.find((mp) => (mp === null || mp === void 0 ? void 0 : mp.tokenMint) === deposit.tokenMint);
@@ -61,6 +60,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
61
60
  amount,
62
61
  };
63
62
  if (constants_1.leverageVaultsMints.includes(deposit.tokenMint)) {
63
+ asset.amount = asset.amount
64
+ .multipliedBy(marginAccount.leverage)
65
+ .dividedBy(100);
64
66
  elementBorrowlend.addSuppliedAsset(asset);
65
67
  }
66
68
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAiE;AACjE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,sBAAsB,GAAG,mBAAS,CAAC,sBAAsB,CAC7D;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,cAAE,CAAC,QAAQ,EAAE,CAAC,EACf,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACf,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KACvB,EACD,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC;IAEL,MAAM,aAAa,GAAG,CACpB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,oCAAwB,EACxB,CAAC,sBAAsB,CAAC,CACzB,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAE3D,MAAM,qBAA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AAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAiE;AACjE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,sBAAsB,GAAG,mBAAS,CAAC,sBAAsB,CAC7D;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,cAAE,CAAC,QAAQ,EAAE,CAAC,EACf,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACf,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KACvB,EACD,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC;IAEL,MAAM,aAAa,GAAG,CACpB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,oCAAwB,EACxB,CAAC,sBAAsB,CAAC,CACzB,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAE3D,MAAM,qBAAqB,GAAG,CAA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,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -75,7 +75,6 @@ class ElementBorrowlendBuilder extends ElementBuilder_1.ElementBuilder {
75
75
  ? this.borrowedWeights
76
76
  : undefined,
77
77
  unsettledAssets,
78
- leveraged: this.leveraged,
79
78
  });
80
79
  if (!suppliedValue && !borrowedValue && !rewardValue)
81
80
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBorrowlendBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBorrowlendBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAClD,iDAA8C;AAK9C,MAAa,wBAAyB,SAAQ,+BAAc;IAU1D,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,MAA4B;QAC3C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,gBAAgB,CAAC,MAA4B;QAC3C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,cAAc,CAAC,MAA4B;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CA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AW;YAAE,OAAO,IAAI,CAAC;QAElE,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS;YACT,UAAU;YACV,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,SAAS,EAAE;oBACT,MAAM,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;aACN;YACD,KAAK;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAA2B,CAAC;IACrC,CAAC;CACF;AA9ID,4DA8IC"}
1
+ {"version":3,"file":"ElementBorrowlendBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBorrowlendBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAClD,iDAA8C;AAK9C,MAAa,wBAAyB,SAAQ,+BAAc;IAU1D,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,MAA4B;QAC3C,IAAI,CAAC,cAAc,CAAC,I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YACf,eAAe,EACb,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM;gBACnD,CAAC,CAAC,IAAI,CAAC,eAAe;gBACtB,CAAC,CAAC,SAAS;YACf,eAAe;SAChB,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAC;QAElE,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS;YACT,UAAU;YACV,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,SAAS,EAAE;oBACT,MAAM,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;aACN;YACD,KAAK;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAA2B,CAAC;IACrC,CAAC;CACF;AA7ID,4DA6IC"}
@@ -6,7 +6,6 @@ export declare abstract class ElementBuilder {
6
6
  readonly label: PortfolioElementLabel;
7
7
  readonly name?: string;
8
8
  readonly tags?: string[];
9
- readonly leveraged?: boolean;
10
9
  protected constructor(params: ElementParams);
11
10
  abstract mints(): string[];
12
11
  abstract get(networkId: NetworkIdType, platformId: string, tokenPrices: TokenPriceMap): PortfolioElement | null;
@@ -7,7 +7,6 @@ class ElementBuilder {
7
7
  this.label = params.label;
8
8
  this.name = params.name;
9
9
  this.tags = params.tags;
10
- this.leveraged = params.leveraged;
11
10
  }
12
11
  }
13
12
  exports.ElementBuilder = ElementBuilder;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBuilder.ts"],"names":[],"mappings":";;;AASA,MAAsB,cAAc;IAOlC,YAAsB,MAAqB;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACpC,CAAC;CASF;AAtBD,wCAsBC"}
1
+ {"version":3,"file":"ElementBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBuilder.ts"],"names":[],"mappings":";;;AASA,MAAsB,cAAc;IAMlC,YAAsB,MAAqB;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;CASF;AApBD,wCAoBC"}
@@ -4,5 +4,4 @@ export type ElementParams = {
4
4
  label: PortfolioElementLabel;
5
5
  name?: string;
6
6
  tags?: string[];
7
- leveraged?: boolean;
8
7
  };