@merkl/api 0.20.63 → 0.20.65

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.
Files changed (140) hide show
  1. package/dist/database/index.js +5 -1
  2. package/dist/src/eden/index.d.ts +115 -214
  3. package/dist/src/engine/dynamicData/implementations/Erc20.js +80 -42
  4. package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.d.ts +18 -18
  5. package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.js +33 -30
  6. package/dist/src/engine/erc20SubTypeProcessors/{helpers/tokenType.d.ts → constants.d.ts} +0 -6
  7. package/dist/src/engine/erc20SubTypeProcessors/factory.d.ts +6 -0
  8. package/dist/src/engine/erc20SubTypeProcessors/{implementations/processorMapping.js → factory.js} +49 -48
  9. package/dist/src/engine/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +1 -1
  10. package/dist/src/engine/erc20SubTypeProcessors/helpers/factoryFinder.js +1 -1
  11. package/dist/src/engine/erc20SubTypeProcessors/helpers/hardcoded.d.ts +1 -1
  12. package/dist/src/engine/erc20SubTypeProcessors/helpers/hardcoded.js +1 -1
  13. package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +1 -1
  14. package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.js +1 -1
  15. package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +1 -2
  16. package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.js +1 -2
  17. package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +2 -3
  18. package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.js +1 -5
  19. package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +1 -2
  20. package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.js +2 -2
  21. package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +3 -2
  22. package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.js +6 -7
  23. package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +3 -2
  24. package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +4 -5
  25. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +3 -2
  26. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.js +3 -4
  27. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +3 -2
  28. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.js +3 -4
  29. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +2 -2
  30. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.js +1 -2
  31. package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +2 -2
  32. package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.js +3 -3
  33. package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +2 -2
  34. package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.js +2 -2
  35. package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +2 -2
  36. package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.js +2 -3
  37. package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +1 -2
  38. package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.js +1 -1
  39. package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +3 -2
  40. package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.js +2 -2
  41. package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +1 -2
  42. package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.js +1 -1
  43. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +1 -2
  44. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.js +1 -1
  45. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +1 -2
  46. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.js +1 -1
  47. package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +2 -2
  48. package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.js +2 -3
  49. package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +1 -2
  50. package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.js +2 -2
  51. package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +2 -3
  52. package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.js +1 -4
  53. package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +2 -2
  54. package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.js +2 -3
  55. package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +3 -2
  56. package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.js +4 -5
  57. package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +1 -2
  58. package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.js +1 -1
  59. package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +2 -2
  60. package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.js +2 -3
  61. package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +2 -2
  62. package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.js +2 -2
  63. package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +2 -2
  64. package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.js +1 -2
  65. package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +2 -3
  66. package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +3 -6
  67. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +1 -2
  68. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.js +1 -1
  69. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +1 -2
  70. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.js +1 -1
  71. package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +2 -2
  72. package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.js +1 -2
  73. package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +2 -2
  74. package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.js +5 -6
  75. package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.d.ts +1 -2
  76. package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.js +1 -2
  77. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +1 -2
  78. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.js +1 -1
  79. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +1 -2
  80. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.js +1 -1
  81. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +2 -1
  82. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.js +0 -1
  83. package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +1 -2
  84. package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.js +1 -2
  85. package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +2 -2
  86. package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.js +2 -2
  87. package/dist/src/engine/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +2 -3
  88. package/dist/src/engine/erc20SubTypeProcessors/implementations/TemplateProcessor.js +0 -4
  89. package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +1 -2
  90. package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.js +1 -2
  91. package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +3 -2
  92. package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.js +3 -3
  93. package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +1 -2
  94. package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.js +1 -1
  95. package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +1 -2
  96. package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.js +1 -2
  97. package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +2 -2
  98. package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.js +7 -7
  99. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +3 -2
  100. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.js +5 -6
  101. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +1 -2
  102. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.js +2 -3
  103. package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +2 -2
  104. package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.js +3 -4
  105. package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +2 -2
  106. package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.js +3 -4
  107. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.d.ts +17 -3
  108. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.js +52 -62
  109. package/dist/src/engine/opportunityMetadata/implementations/JsonAirdrop.js +1 -1
  110. package/dist/src/index.d.ts +23 -50
  111. package/dist/src/jobs/update-dynamic-data.js +10 -12
  112. package/dist/src/jobs/update-rpc-calls-cache.js +9 -4
  113. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +23 -50
  114. package/dist/src/modules/v4/opportunity/opportunity.controller.js +1 -9
  115. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +0 -11
  116. package/dist/src/modules/v4/opportunity/opportunity.model.js +0 -5
  117. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +2 -2
  118. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +25 -14
  119. package/dist/src/modules/v4/opportunity/opportunity.service.js +2 -1
  120. package/dist/src/modules/v4/router.d.ts +23 -50
  121. package/dist/src/utils/decodeCalls.d.ts +1 -1
  122. package/dist/src/utils/decodeCalls.js +1 -1
  123. package/dist/src/utils/encodeCalls.d.ts +2 -2
  124. package/dist/src/utils/encodeCalls.js +15 -15
  125. package/dist/src/utils/generateCardName.d.ts +4 -3
  126. package/dist/src/utils/generateCardName.js +3 -3
  127. package/dist/tsconfig.package.tsbuildinfo +1 -1
  128. package/package.json +1 -1
  129. package/dist/src/engine/erc20SubTypeProcessors/implementations/processorMapping.d.ts +0 -6
  130. package/dist/src/engine/erc20SubTypeProcessors/subtypesPrices.d.ts +0 -4
  131. package/dist/src/engine/erc20SubTypeProcessors/subtypesPrices.js +0 -24
  132. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.d.ts +0 -4
  133. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.js +0 -22
  134. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound3.d.ts +0 -3
  135. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound3.js +0 -22
  136. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound4.d.ts +0 -3
  137. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound4.js +0 -22
  138. package/dist/src/utils/generateIcons.d.ts +0 -3
  139. package/dist/src/utils/generateIcons.js +0 -65
  140. /package/dist/src/engine/erc20SubTypeProcessors/{helpers/tokenType.js → constants.js} +0 -0
@@ -1,14 +1,14 @@
1
1
  import { CampaignService } from "@/modules/v4/campaign";
2
- import { ChainService } from "@/modules/v4/chain/chain.service";
3
2
  import { DynamicDataService } from "@/modules/v4/dynamicData/dynamicData.service";
4
3
  import { OpportunityService } from "@/modules/v4/opportunity";
5
4
  import { Campaign as CampaignEnum } from "@sdk";
6
5
  import moment from "moment";
7
6
  // ─── Required Env Variables ──────────────────────────────────────────────────
8
- // const chainId = Number(process.env.CHAIN_ID);
9
- // if (!chainId) throw new Error("Environment variable CHAIN_ID is required.");
7
+ const chainId = Number(process.env.CHAIN_ID);
8
+ if (!chainId)
9
+ throw new Error("Environment variable CHAIN_ID is required.");
10
10
  // ─── Update Dynamic Data (APR / TVL / Daily Rewards) ─────────────────────────
11
- const main = async (chainId) => {
11
+ const main = async () => {
12
12
  const liveCampaigns = (await CampaignService.getLiveCampaigns({ computeChainId: chainId })).map(c => {
13
13
  return {
14
14
  amount: c.amount,
@@ -58,13 +58,11 @@ const main = async (chainId) => {
58
58
  // 4. Update the status of the opportunities associated to live campaigns
59
59
  await OpportunityService.updateMany(liveOpportunityIds, { status: "LIVE" });
60
60
  };
61
- const chains = await ChainService.getSupportedIds();
62
- const promises = [];
63
- for (const chain of chains)
64
- promises.push(main(chain));
65
- await Promise.allSettled(promises)
66
- .then(success => (success ? process.exit(0) : process.exit(1)))
67
- .catch((err) => {
61
+ try {
62
+ await main();
63
+ process.exit(0);
64
+ }
65
+ catch (err) {
68
66
  console.error(err);
69
67
  process.exit(1);
70
- });
68
+ }
@@ -7,11 +7,16 @@ import { log } from "@/utils/logger";
7
7
  import { NETWORK_LABELS } from "@sdk";
8
8
  const main = async () => {
9
9
  try {
10
- const chains = await ChainService.getSupportedIds();
10
+ const chainIds = await ChainService.getSupportedIds();
11
11
  const promises = [];
12
- for (const chain of chains)
13
- promises.push(MerklRootRepository.fetch(chain).catch(_err => log.warn(`RPC calls cache update failed for ${NETWORK_LABELS[chain]}.`)));
14
- await Promise.allSettled(promises);
12
+ for (const chainId of chainIds)
13
+ promises.push(CacheService.set(TTLPresets.HOUR_12, MerklRootRepository.fetch, chainId));
14
+ const results = await Promise.allSettled(promises);
15
+ for (const [index, result] of results.entries()) {
16
+ if (result.status === "rejected") {
17
+ log.warn(`Failed to fetch Merkl root for ${NETWORK_LABELS[chainIds[index]]}: ${result.reason}`);
18
+ }
19
+ }
15
20
  // ─── Refresh Cache For GET /opportunities ────
16
21
  await CacheService.set(TTLPresets.MIN_5, OpportunityService.findMany, { items: 25, page: 0 });
17
22
  await CacheService.set(TTLPresets.MIN_5, OpportunityService.findMany, { items: 50, page: 0 });
@@ -116,20 +116,31 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
116
116
  response: {
117
117
  200: {
118
118
  id: string;
119
- name: string;
119
+ chainId: number;
120
120
  type: string;
121
- status: import("@db/api").$Enums.Status;
122
- tags: string[];
123
121
  identifier: string;
124
- action: import("@db/api").$Enums.OpportunityAction;
125
- manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
126
- chainId: number;
127
- depositUrl: string | null;
128
- explorerAddress: string | null;
129
- mainProtocolId: string | null;
130
- tvl: number;
131
- apr: number;
132
- dailyRewards: number;
122
+ name: string;
123
+ status: "PAST" | "LIVE" | "SOON";
124
+ action: any;
125
+ tokens: ({
126
+ symbol: string;
127
+ id: string;
128
+ name: string | null;
129
+ icon: string;
130
+ address: string;
131
+ chainId: number;
132
+ decimals: number;
133
+ verified: boolean;
134
+ isTest: boolean;
135
+ isPoint: boolean;
136
+ isNative: boolean;
137
+ } & {
138
+ price?: number | null | undefined;
139
+ })[];
140
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
141
+ depositUrl: any;
142
+ explorerAddress: string | undefined;
143
+ tags: string[];
133
144
  };
134
145
  };
135
146
  };
@@ -1013,44 +1024,6 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
1013
1024
  };
1014
1025
  };
1015
1026
  };
1016
- } & {
1017
- opportunities: {
1018
- ":id": {
1019
- patch: {
1020
- body: {
1021
- name?: string | undefined;
1022
- status?: "NONE" | "PAST" | "LIVE" | "SOON" | undefined;
1023
- tags?: string[] | undefined;
1024
- };
1025
- params: {
1026
- id: string;
1027
- };
1028
- query: unknown;
1029
- headers: {
1030
- authorization: string;
1031
- };
1032
- response: {
1033
- 200: {
1034
- id: string;
1035
- name: string;
1036
- type: string;
1037
- status: import("@db/api").$Enums.Status;
1038
- tags: string[];
1039
- identifier: string;
1040
- action: import("@db/api").$Enums.OpportunityAction;
1041
- manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
1042
- chainId: number;
1043
- depositUrl: string | null;
1044
- explorerAddress: string | null;
1045
- mainProtocolId: string | null;
1046
- tvl: number;
1047
- apr: number;
1048
- dailyRewards: number;
1049
- };
1050
- };
1051
- };
1052
- };
1053
- };
1054
1027
  }, {
1055
1028
  derive: {};
1056
1029
  resolve: {};
@@ -3,7 +3,7 @@ import { BackOfficeGuard } from "@/guards/BackOffice.guard";
3
3
  import { AuthorizationHeadersDto, TokenAuthGuard } from "@/guards/TokenAuth.guard";
4
4
  import Elysia, { t } from "elysia";
5
5
  import { GetCampaignQueryDto } from "../campaign";
6
- import { CreateOpportunityDto, GetOpportunitiesQueryDto, GetOpportunityQueryDto, OpportunityAggregateFieldDto, OpportunityDeleteOverrideDto, OpportunityIdDto, OpportunityOverrideDto, OpportunityResourceDto, OpportunityUniqueDto, OpportunityUniqueUpdateDto, OpportunityWithCampaignsResourceDto, UpdateOpportunityDto, } from "./opportunity.model";
6
+ import { CreateOpportunityDto, GetOpportunitiesQueryDto, GetOpportunityQueryDto, OpportunityAggregateFieldDto, OpportunityDeleteOverrideDto, OpportunityOverrideDto, OpportunityResourceDto, OpportunityUniqueDto, OpportunityUniqueUpdateDto, OpportunityWithCampaignsResourceDto, } from "./opportunity.model";
7
7
  import { OpportunityService } from "./opportunity.service";
8
8
  import { transformId } from "./transform-id.pipe";
9
9
  import { validateId } from "./validate-id.pipe";
@@ -158,12 +158,4 @@ export const OpportunityController = new Elysia({
158
158
  .get("/aggregate/min/:field", async ({ query, params }) => await OpportunityService.aggregateMin(query, params.field), {
159
159
  params: OpportunityAggregateFieldDto,
160
160
  query: GetOpportunitiesQueryDto,
161
- })
162
- // ─── Update An Opportunity ───────────────────────────────────────────
163
- .patch("/:id", async ({ params, body }) => await OpportunityService.update(params.id, body), {
164
- params: OpportunityIdDto,
165
- body: UpdateOpportunityDto,
166
- headers: AuthorizationHeadersDto,
167
- beforeHandle: BackOfficeGuard,
168
- detail: { hide: true },
169
161
  });
@@ -356,16 +356,6 @@ export declare const OpportunityAggregateFieldDto: import("@sinclair/typebox").T
356
356
  export declare const OpportunityIdDto: import("@sinclair/typebox").TObject<{
357
357
  id: import("@sinclair/typebox").TString;
358
358
  }>;
359
- export declare const UpdateOpportunityDto: import("@sinclair/typebox").TObject<{
360
- name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
361
- tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
362
- status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
363
- NONE: "NONE";
364
- PAST: "PAST";
365
- LIVE: "LIVE";
366
- SOON: "SOON";
367
- }>>;
368
- }>;
369
359
  export declare const OpportunityOverrideDto: import("@sinclair/typebox").TObject<{
370
360
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
371
361
  depositUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -392,7 +382,6 @@ export type GetOpportunitiesQueryModel = typeof GetOpportunitiesQueryDto.static;
392
382
  export type GetOpportunityQueryModel = typeof GetOpportunityQueryDto.static;
393
383
  export type CreateOpportunityModel = typeof CreateOpportunityDto.static;
394
384
  export type OpportunityAggregateField = typeof OpportunityAggregateFieldDto.static;
395
- export type UpdateOpportunityModel = typeof UpdateOpportunityDto.static;
396
385
  export type OpportunityResourceModel = typeof OpportunityResourceDto.static;
397
386
  export type OpportunityWithCampaignsResourceModel = typeof OpportunityWithCampaignsResourceDto.static;
398
387
  export type OpportunityOverrideModel = typeof OpportunityOverrideDto.static;
@@ -110,11 +110,6 @@ export const OpportunityAggregateFieldDto = t.Object({
110
110
  field: t.Union(["dailyRewards", "tvl", "apr"].map(v => t.Literal(v))),
111
111
  });
112
112
  export const OpportunityIdDto = t.Object({ id: t.String() });
113
- export const UpdateOpportunityDto = t.Object({
114
- name: t.Optional(t.String()),
115
- tags: t.Optional(t.Array(t.String())),
116
- status: t.Optional(t.Enum(Status)),
117
- });
118
113
  export const OpportunityOverrideDto = t.Object({
119
114
  name: t.Optional(t.String()),
120
115
  depositUrl: t.Optional(t.String({ format: "uri" })),
@@ -4,7 +4,7 @@ import { type AprRecord } from "../apr";
4
4
  import type { Campaign } from "../campaign";
5
5
  import { type DailyRewardsRecord } from "../reward";
6
6
  import { type TvlRecord } from "../tvl";
7
- import type { CreateOpportunityModel, GetOpportunitiesQueryModel, Opportunity, UpdateOpportunityModel } from "./opportunity.model";
7
+ import type { CreateOpportunityModel, GetOpportunitiesQueryModel, Opportunity } from "./opportunity.model";
8
8
  export declare abstract class OpportunityRepository {
9
9
  #private;
10
10
  static create(newOpp: CreateOpportunityModel & {
@@ -975,7 +975,7 @@ export declare abstract class OpportunityRepository {
975
975
  apr: number;
976
976
  dailyRewards: number;
977
977
  }>;
978
- static updateMany(ids: string[], data: UpdateOpportunityModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
978
+ static updateMany(ids: string[], data: Partial<Opportunity["raw"]>): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
979
979
  static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
980
980
  sum: string;
981
981
  }>;
@@ -1,7 +1,7 @@
1
1
  import { type CreateCampaignModel, type GetCampaignQueryModel } from "@/modules/v4/campaign";
2
2
  import { type OpportunityManualOverride, type Prisma } from "@db/api";
3
3
  import { type MerklChainId } from "@sdk";
4
- import type { CreateOpportunityModel, GetOpportunitiesQueryModel, LightOpportunityFromDB, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique, UpdateOpportunityModel } from "./opportunity.model";
4
+ import type { CreateOpportunityModel, GetOpportunitiesQueryModel, LightOpportunityFromDB, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
5
5
  import { OpportunityRepository } from "./opportunity.repository";
6
6
  export declare abstract class OpportunityService {
7
7
  #private;
@@ -25,20 +25,31 @@ export declare abstract class OpportunityService {
25
25
  }>;
26
26
  static deleteOverrides(id: string, overridesToDelete: OpportunityManualOverride[]): Promise<{
27
27
  id: string;
28
- name: string;
28
+ chainId: number;
29
29
  type: string;
30
- status: import("@db/api").$Enums.Status;
31
- tags: string[];
32
30
  identifier: string;
33
- action: import("@db/api").$Enums.OpportunityAction;
34
- manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
35
- chainId: number;
36
- depositUrl: string | null;
37
- explorerAddress: string | null;
38
- mainProtocolId: string | null;
39
- tvl: number;
40
- apr: number;
41
- dailyRewards: number;
31
+ name: string;
32
+ status: "PAST" | "LIVE" | "SOON";
33
+ action: OpportunityAction;
34
+ tokens: ({
35
+ symbol: string;
36
+ id: string;
37
+ name: string | null;
38
+ icon: string;
39
+ address: string;
40
+ chainId: number;
41
+ decimals: number;
42
+ verified: boolean;
43
+ isTest: boolean;
44
+ isPoint: boolean;
45
+ isNative: boolean;
46
+ } & {
47
+ price?: number | null | undefined;
48
+ })[];
49
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
50
+ depositUrl: any;
51
+ explorerAddress: string | undefined;
52
+ tags: string[];
42
53
  }>;
43
54
  /**
44
55
  * create an opportunity without campaigns
@@ -988,5 +999,5 @@ export declare abstract class OpportunityService {
988
999
  apr: number;
989
1000
  dailyRewards: number;
990
1001
  }>;
991
- static updateMany(ids: string[], data: UpdateOpportunityModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
1002
+ static updateMany(ids: string[], data: Partial<Opportunity["raw"]>): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
992
1003
  }
@@ -25,7 +25,8 @@ export class OpportunityService {
25
25
  const opportunity = await OpportunityRepository.findUniqueOrThrow(id);
26
26
  const overrides = opportunity.manualOverrides ?? [];
27
27
  const newOverrides = overrides.filter(override => !overridesToDelete.includes(override));
28
- return await OpportunityRepository.update(id, { manualOverrides: newOverrides });
28
+ await OpportunityRepository.update(id, { manualOverrides: newOverrides });
29
+ return await OpportunityService.recreate(id);
29
30
  }
30
31
  /**
31
32
  * create an opportunity without campaigns
@@ -131,20 +131,31 @@ export declare const v4: Elysia<"/v4", false, {
131
131
  response: {
132
132
  200: {
133
133
  id: string;
134
- name: string;
134
+ chainId: number;
135
135
  type: string;
136
- status: import("@db/api").$Enums.Status;
137
- tags: string[];
138
136
  identifier: string;
139
- action: import("@db/api").$Enums.OpportunityAction;
140
- manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
141
- chainId: number;
142
- depositUrl: string | null;
143
- explorerAddress: string | null;
144
- mainProtocolId: string | null;
145
- tvl: number;
146
- apr: number;
147
- dailyRewards: number;
137
+ name: string;
138
+ status: "PAST" | "LIVE" | "SOON";
139
+ action: any;
140
+ tokens: ({
141
+ symbol: string;
142
+ id: string;
143
+ name: string | null;
144
+ icon: string;
145
+ address: string;
146
+ chainId: number;
147
+ decimals: number;
148
+ verified: boolean;
149
+ isTest: boolean;
150
+ isPoint: boolean;
151
+ isNative: boolean;
152
+ } & {
153
+ price?: number | null | undefined;
154
+ })[];
155
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
156
+ depositUrl: any;
157
+ explorerAddress: string | undefined;
158
+ tags: string[];
148
159
  };
149
160
  };
150
161
  };
@@ -1028,44 +1039,6 @@ export declare const v4: Elysia<"/v4", false, {
1028
1039
  };
1029
1040
  };
1030
1041
  };
1031
- } & {
1032
- opportunities: {
1033
- ":id": {
1034
- patch: {
1035
- body: {
1036
- name?: string | undefined;
1037
- status?: "NONE" | "PAST" | "LIVE" | "SOON" | undefined;
1038
- tags?: string[] | undefined;
1039
- };
1040
- params: {
1041
- id: string;
1042
- };
1043
- query: unknown;
1044
- headers: {
1045
- authorization: string;
1046
- };
1047
- response: {
1048
- 200: {
1049
- id: string;
1050
- name: string;
1051
- type: string;
1052
- status: import("@db/api").$Enums.Status;
1053
- tags: string[];
1054
- identifier: string;
1055
- action: import("@db/api").$Enums.OpportunityAction;
1056
- manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
1057
- chainId: number;
1058
- depositUrl: string | null;
1059
- explorerAddress: string | null;
1060
- mainProtocolId: string | null;
1061
- tvl: number;
1062
- apr: number;
1063
- dailyRewards: number;
1064
- };
1065
- };
1066
- };
1067
- };
1068
- };
1069
1042
  };
1070
1043
  } & {
1071
1044
  v4: {
@@ -1,3 +1,3 @@
1
- import { tokenType } from "@/engine/erc20SubTypeProcessors/helpers/tokenType";
1
+ import { tokenType } from "@/engine/erc20SubTypeProcessors/constants";
2
2
  export declare function decodeCall(calls: string[], index: number, key: string, type?: tokenType): any;
3
3
  export declare function decodeReturnValue(returnData: string, key: string, type?: tokenType): any;
@@ -1,4 +1,4 @@
1
- import { tokenType } from "@/engine/erc20SubTypeProcessors/helpers/tokenType";
1
+ import { tokenType } from "@/engine/erc20SubTypeProcessors/constants";
2
2
  import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerV3StablePoolInterface, BalancerVaultInterface, BeefyInterface, BunniV2HubInterface, BunniV2TokenInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveLPTokenInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, ERC4626Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, HourglassERC20TBTInterface, HourglassVedaLockDepositorV2Interface, IonicInterface, LPManagerHelperInterface, LPManagerInterface, LayerBankERC20Interface, LayerBankInterface, LendleInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxInterface, RswEthStrategyInterface, SpectraYTInterface, SturdyInterface, SymetricAmbientStrategyInterface, SyncSwapClassicPoolInterface, TorosInterface, UniswapV2PoolInterface, UniswapV3PoolInterface, VePufferInterface, ZFStableLPINterface, ZFStableSwapThreePoolInterface, } from "@sdk";
3
3
  import { BigNumber } from "ethers";
4
4
  export function decodeCall(calls, index, key, type) {
@@ -1,3 +1,3 @@
1
- import { tokenType } from "@/engine/erc20SubTypeProcessors/helpers/tokenType";
1
+ import { tokenType } from "@/engine/erc20SubTypeProcessors/constants";
2
2
  import { type CallDto } from "@sdk";
3
- export declare function createCall(target: string, key: string, type?: tokenType, metaData?: any): CallDto;
3
+ export declare function createCall(target: string, key: string, type?: tokenType, callArgs?: any): CallDto;
@@ -1,17 +1,17 @@
1
- import { tokenType } from "@/engine/erc20SubTypeProcessors/helpers/tokenType";
1
+ import { tokenType } from "@/engine/erc20SubTypeProcessors/constants";
2
2
  import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerV3StablePoolInterface, BalancerVaultInterface, BeefyInterface, BunniV2HubInterface, BunniV2TokenInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveLPTokenInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, ERC4626Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, HourglassERC20TBTInterface, HourglassVedaLockDepositorV2Interface, IonicInterface, LPManagerHelperInterface, LPManagerInterface, LayerBankInterface, LendleInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxDatastoreInterface, RswEthStrategyInterface, SpectraYTInterface, SturdyInterface, SymetricAmbientStrategyInterface, SyncSwapClassicPoolInterface, TorosInterface, UniswapV2PoolInterface, UniswapV3PoolInterface, VePufferInterface, ZFStableLPINterface, } from "@sdk";
3
- export function createCall(target, key, type, metaData) {
3
+ export function createCall(target, key, type, callArgs) {
4
4
  switch (key) {
5
5
  case "sqrtPriceX96":
6
6
  return { allowFailure: true, callData: UniswapV3PoolInterface.encodeFunctionData("slot0"), target };
7
7
  case "tokens":
8
- return { allowFailure: true, callData: LPManagerInterface.encodeFunctionData("tokens", [metaData]), target };
8
+ return { allowFailure: true, callData: LPManagerInterface.encodeFunctionData("tokens", [callArgs]), target };
9
9
  case "getTokensCount":
10
10
  return { allowFailure: true, callData: LPManagerInterface.encodeFunctionData("getTokensCount"), target };
11
11
  case "getTotalValue":
12
12
  return {
13
13
  allowFailure: true,
14
- callData: LPManagerHelperInterface.encodeFunctionData("getTotalValue", [metaData]),
14
+ callData: LPManagerHelperInterface.encodeFunctionData("getTotalValue", [callArgs]),
15
15
  target,
16
16
  };
17
17
  case "SY":
@@ -38,13 +38,13 @@ export function createCall(target, key, type, metaData) {
38
38
  case "coin2":
39
39
  return { allowFailure: true, callData: CurveInterface.encodeFunctionData("coins", [2]), target };
40
40
  case "coins":
41
- return { allowFailure: true, callData: CurveInterface.encodeFunctionData("coins", [metaData]), target };
41
+ return { allowFailure: true, callData: CurveInterface.encodeFunctionData("coins", [callArgs]), target };
42
42
  case "N_COINS":
43
43
  return { allowFailure: true, callData: CurveStableSwapNGInterface.encodeFunctionData("N_COINS"), target };
44
44
  case "balances":
45
45
  return {
46
46
  allowFailure: true,
47
- callData: CurveStableSwapNGInterface.encodeFunctionData("balances", [metaData]),
47
+ callData: CurveStableSwapNGInterface.encodeFunctionData("balances", [callArgs]),
48
48
  target,
49
49
  };
50
50
  case "operator":
@@ -81,14 +81,14 @@ export function createCall(target, key, type, metaData) {
81
81
  case "shortToken": {
82
82
  return {
83
83
  allowFailure: true,
84
- callData: RfxDatastoreInterface.encodeFunctionData("getAddress", [metaData]),
84
+ callData: RfxDatastoreInterface.encodeFunctionData("getAddress", [callArgs]),
85
85
  target,
86
86
  };
87
87
  }
88
88
  case "longToken": {
89
89
  return {
90
90
  allowFailure: true,
91
- callData: RfxDatastoreInterface.encodeFunctionData("getAddress", [metaData]),
91
+ callData: RfxDatastoreInterface.encodeFunctionData("getAddress", [callArgs]),
92
92
  target,
93
93
  };
94
94
  }
@@ -183,7 +183,7 @@ export function createCall(target, key, type, metaData) {
183
183
  case "calcNetShareValue":
184
184
  return {
185
185
  allowFailure: true,
186
- callData: EnzymeInterface.encodeFunctionData("calcNetShareValue", [metaData]),
186
+ callData: EnzymeInterface.encodeFunctionData("calcNetShareValue", [callArgs]),
187
187
  target,
188
188
  };
189
189
  case "getPricePerFullShare":
@@ -237,7 +237,7 @@ export function createCall(target, key, type, metaData) {
237
237
  case "balanceOf":
238
238
  return {
239
239
  allowFailure: true,
240
- callData: ERC20Interface.encodeFunctionData("balanceOf", [metaData]),
240
+ callData: ERC20Interface.encodeFunctionData("balanceOf", [callArgs]),
241
241
  target,
242
242
  };
243
243
  case "getPoolId":
@@ -255,7 +255,7 @@ export function createCall(target, key, type, metaData) {
255
255
  case "poolInfo":
256
256
  return {
257
257
  allowFailure: true,
258
- callData: AuraOperatorInterface.encodeFunctionData("poolInfo", [metaData]),
258
+ callData: AuraOperatorInterface.encodeFunctionData("poolInfo", [callArgs]),
259
259
  target,
260
260
  };
261
261
  case "staker":
@@ -263,13 +263,13 @@ export function createCall(target, key, type, metaData) {
263
263
  case "getPoolTokens":
264
264
  return {
265
265
  allowFailure: true,
266
- callData: BalancerVaultInterface.encodeFunctionData("getPoolTokens", [metaData]),
266
+ callData: BalancerVaultInterface.encodeFunctionData("getPoolTokens", [callArgs]),
267
267
  target,
268
268
  };
269
269
  case "convertToAssets":
270
270
  return {
271
271
  allowFailure: true,
272
- callData: FluidInterface.encodeFunctionData("convertToAssets", [metaData]),
272
+ callData: FluidInterface.encodeFunctionData("convertToAssets", [callArgs]),
273
273
  target,
274
274
  };
275
275
  case "tokenPrice":
@@ -339,7 +339,7 @@ export function createCall(target, key, type, metaData) {
339
339
  case "boostedPositionInformation":
340
340
  return {
341
341
  allowFailure: true,
342
- callData: MaverickBPLensInterface.encodeFunctionData("boostedPositionInformation", [metaData]),
342
+ callData: MaverickBPLensInterface.encodeFunctionData("boostedPositionInformation", [callArgs]),
343
343
  target: target,
344
344
  };
345
345
  case "minter":
@@ -488,7 +488,7 @@ export function createCall(target, key, type, metaData) {
488
488
  case "poolState":
489
489
  return {
490
490
  allowFailure: true,
491
- callData: BunniV2HubInterface.encodeFunctionData("poolState", [metaData]),
491
+ callData: BunniV2HubInterface.encodeFunctionData("poolState", [callArgs]),
492
492
  target: target,
493
493
  };
494
494
  default:
@@ -1,6 +1,7 @@
1
- import { tokenType } from "@/engine/erc20SubTypeProcessors/helpers/tokenType";
2
- import type { Campaign, CampaignParameters } from "@sdk";
1
+ import type { ERC20SupportedCampaignType } from "@/engine/dynamicData/implementations/Erc20";
2
+ import { tokenType } from "@/engine/erc20SubTypeProcessors/constants";
3
+ import type { CampaignParameters } from "@sdk";
3
4
  export declare const stakingContractToStakingSymbol: {
4
5
  [key: string]: string;
5
6
  };
6
- export declare function generateCardName(type: tokenType, typeInfo: any, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>, symbols?: string[], displayName?: string): string;
7
+ export declare function generateCardName(type: tokenType, isStaking: boolean, typeInfo: any, campaign: CampaignParameters<ERC20SupportedCampaignType>, symbols?: string[], displayName?: string): string;
@@ -1,12 +1,12 @@
1
- import { tokenType } from "@/engine/erc20SubTypeProcessors/helpers/tokenType";
1
+ import { tokenType } from "@/engine/erc20SubTypeProcessors/constants";
2
2
  import { capitalize } from "lodash";
3
3
  export const stakingContractToStakingSymbol = {
4
4
  "0x18eeD20f71BEf84B605253C89A7576E3634134C0": "CyberStaking",
5
5
  "0x68754d29f2e97B837Cb622ccfF325adAC27E9977": "Karak",
6
6
  "0xcd28cF8f7755f03967D27E128B38022B63919836": "Llamalend",
7
7
  };
8
- export function generateCardName(type, typeInfo, campaign, symbols = [""], displayName) {
9
- if (typeInfo.isStaking === "true") {
8
+ export function generateCardName(type, isStaking, typeInfo, campaign, symbols = [""], displayName) {
9
+ if (isStaking) {
10
10
  if (typeInfo.stakingName !== undefined) {
11
11
  typeInfo.stakingSymbol = typeInfo.stakingName.includes("Deposit")
12
12
  ? typeInfo.stakingName.replace("Deposit", "").trim()