@merkl/api 0.20.65 → 0.20.67

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 (130) hide show
  1. package/dist/src/engine/dynamicData/factory.js +2 -0
  2. package/dist/src/engine/dynamicData/implementations/Erc20.js +42 -80
  3. package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.d.ts +18 -18
  4. package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.js +30 -33
  5. package/dist/src/engine/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +1 -1
  6. package/dist/src/engine/erc20SubTypeProcessors/helpers/factoryFinder.js +1 -1
  7. package/dist/src/engine/erc20SubTypeProcessors/helpers/hardcoded.d.ts +1 -1
  8. package/dist/src/engine/erc20SubTypeProcessors/helpers/hardcoded.js +1 -1
  9. package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +1 -1
  10. package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.js +1 -1
  11. package/dist/src/engine/erc20SubTypeProcessors/{constants.d.ts → helpers/tokenType.d.ts} +6 -0
  12. package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +2 -1
  13. package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.js +2 -1
  14. package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +3 -2
  15. package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.js +5 -1
  16. package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +2 -1
  17. package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.js +2 -2
  18. package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +2 -3
  19. package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.js +7 -6
  20. package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +2 -3
  21. package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +5 -4
  22. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +2 -3
  23. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.js +4 -3
  24. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +2 -3
  25. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.js +4 -3
  26. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +2 -2
  27. package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.js +2 -1
  28. package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +2 -2
  29. package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.js +3 -3
  30. package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +2 -2
  31. package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.js +2 -2
  32. package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +2 -2
  33. package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.js +3 -2
  34. package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +2 -1
  35. package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.js +1 -1
  36. package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +2 -3
  37. package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.js +2 -2
  38. package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +2 -1
  39. package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.js +1 -1
  40. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +2 -1
  41. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.js +1 -1
  42. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +2 -1
  43. package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.js +1 -1
  44. package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +2 -2
  45. package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.js +3 -2
  46. package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +2 -1
  47. package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.js +2 -2
  48. package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +3 -2
  49. package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.js +4 -1
  50. package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +2 -2
  51. package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.js +3 -2
  52. package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +2 -3
  53. package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.js +5 -4
  54. package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +2 -1
  55. package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.js +1 -1
  56. package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +2 -2
  57. package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.js +3 -2
  58. package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +2 -2
  59. package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.js +2 -2
  60. package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +2 -2
  61. package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.js +2 -1
  62. package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +3 -2
  63. package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +6 -3
  64. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +2 -1
  65. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.js +1 -1
  66. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +2 -1
  67. package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.js +1 -1
  68. package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +2 -2
  69. package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.js +2 -1
  70. package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +2 -2
  71. package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.js +6 -5
  72. package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.d.ts +2 -1
  73. package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.js +2 -1
  74. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +2 -1
  75. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.js +1 -1
  76. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +2 -1
  77. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.js +1 -1
  78. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +1 -2
  79. package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.js +1 -0
  80. package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +2 -1
  81. package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.js +2 -1
  82. package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +2 -2
  83. package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.js +2 -2
  84. package/dist/src/engine/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +3 -2
  85. package/dist/src/engine/erc20SubTypeProcessors/implementations/TemplateProcessor.js +4 -0
  86. package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +2 -1
  87. package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.js +2 -1
  88. package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +2 -3
  89. package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.js +3 -3
  90. package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +2 -1
  91. package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.js +1 -1
  92. package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +2 -1
  93. package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.js +2 -1
  94. package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +2 -2
  95. package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.js +7 -7
  96. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +2 -3
  97. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.js +6 -5
  98. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +2 -1
  99. package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.js +3 -2
  100. package/dist/src/engine/erc20SubTypeProcessors/implementations/processorMapping.d.ts +6 -0
  101. package/dist/src/engine/erc20SubTypeProcessors/{factory.js → implementations/processorMapping.js} +48 -49
  102. package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +2 -2
  103. package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.js +4 -3
  104. package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +2 -2
  105. package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.js +4 -3
  106. package/dist/src/engine/erc20SubTypeProcessors/subtypesPrices.d.ts +4 -0
  107. package/dist/src/engine/erc20SubTypeProcessors/subtypesPrices.js +24 -0
  108. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.d.ts +3 -17
  109. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.js +62 -52
  110. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.d.ts +4 -0
  111. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.js +22 -0
  112. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound3.d.ts +3 -0
  113. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound3.js +22 -0
  114. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound4.d.ts +3 -0
  115. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound4.js +22 -0
  116. package/dist/src/engine/opportunityMetadata/factory.js +2 -0
  117. package/dist/src/engine/opportunityMetadata/implementations/CompoundV3.js +4 -1
  118. package/dist/src/engine/opportunityMetadata/implementations/JsonAirdrop.js +1 -1
  119. package/dist/src/utils/decodeCalls.d.ts +1 -1
  120. package/dist/src/utils/decodeCalls.js +1 -1
  121. package/dist/src/utils/encodeCalls.d.ts +2 -2
  122. package/dist/src/utils/encodeCalls.js +15 -15
  123. package/dist/src/utils/generateCardName.d.ts +3 -4
  124. package/dist/src/utils/generateCardName.js +3 -3
  125. package/dist/src/utils/generateIcons.d.ts +3 -0
  126. package/dist/src/utils/generateIcons.js +65 -0
  127. package/dist/tsconfig.package.tsbuildinfo +1 -1
  128. package/package.json +1 -1
  129. package/dist/src/engine/erc20SubTypeProcessors/factory.d.ts +0 -6
  130. /package/dist/src/engine/erc20SubTypeProcessors/{constants.js → helpers/tokenType.js} +0 -0
@@ -1,13 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callType = {
7
6
  key: keyof dataRawHanjiN;
8
7
  call: string;
9
8
  target: keyof callKeysHanjiN;
10
- callArgs?: keyof callKeysHanjiN | string;
9
+ metaData?: keyof callKeysHanjiN | string;
11
10
  optional?: boolean;
12
11
  };
13
12
  type callKeysHanjiN = mandatoryCallKeys & {
@@ -7,17 +7,18 @@ export class HanjiVaultProcessor extends GenericProcessor {
7
7
  round2: [],
8
8
  round3: [],
9
9
  round4: [
10
- { key: "tvl", call: "getTotalValue", target: "helper", callArgs: "owner" },
10
+ { key: "tvl", call: "getTotalValue", target: "helper", metaData: "owner" },
11
11
  { key: "totalSupply", call: "totalSupply", target: "tokenAddress" },
12
12
  ],
13
13
  };
14
+ // override computeRound1(): void {}
14
15
  processingRound2(typeInfo) {
15
16
  typeInfo.helper = "0x6b285F02DE1a48B3D58Ab65759494f8ab83cF64d";
16
17
  typeInfo.numberTokens = Number(typeInfo.numberTokens);
17
18
  for (let i = 0; i < typeInfo.numberTokens; i++) {
18
19
  typeInfo[`${i}`] = i.toString();
19
20
  this.rounds.round2 = this.rounds.round2.concat([
20
- { key: `token${i}`, call: "tokens", target: "owner", callArgs: i.toString() },
21
+ { key: `token${i}`, call: "tokens", target: "owner", metaData: i.toString() },
21
22
  ]);
22
23
  }
23
24
  }
@@ -29,7 +30,7 @@ export class HanjiVaultProcessor extends GenericProcessor {
29
30
  computeRound3(index, type, typeInfo, calls) {
30
31
  for (let i = 0; i < typeInfo.numberTokens; i++) {
31
32
  this.rounds.round2 = this.rounds.round2.concat([
32
- { key: `token${i}`, call: "tokens", target: "tokenAddress", callArgs: i.toString() },
33
+ { key: `token${i}`, call: "tokens", target: "tokenAddress", metaData: i.toString() },
33
34
  ]);
34
35
  }
35
36
  return super.computeRound3(index, type, typeInfo, calls);
@@ -55,7 +56,7 @@ export class HanjiVaultProcessor extends GenericProcessor {
55
56
  whitelistedSupplyTargetToken,
56
57
  blacklistedSupply,
57
58
  priceTargetToken,
58
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
59
+ cardName: generateCardName(type, typeInfo, campaign),
59
60
  tokensDisplay,
60
61
  };
61
62
  }
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawHS;
7
7
  call: string;
8
8
  target: keyof callKeysHS;
9
+ metaData?: keyof callKeysHS;
9
10
  };
10
11
  type callKeysHS = mandatoryCallKeys & {
11
12
  tvl: string;
@@ -27,7 +27,7 @@ export class HoldStationProcessor extends GenericProcessor {
27
27
  tvl,
28
28
  whitelistedSupplyTargetToken,
29
29
  priceTargetToken: priceTargetToken,
30
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
30
+ cardName: generateCardName(type, typeInfo, campaign),
31
31
  blacklistedSupply,
32
32
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
33
33
  };
@@ -2,12 +2,12 @@ import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { BigNumber } from "ethers";
4
4
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
5
- import type { tokenType } from "../constants";
5
+ import type { tokenType } from "../helpers/tokenType";
6
6
  type callType = {
7
7
  key: keyof dataRawHourglass;
8
8
  call: string;
9
9
  target: keyof callKeysHourglass;
10
- callArgs?: keyof callKeysHourglass;
10
+ metaData?: keyof callKeysHourglass;
11
11
  };
12
12
  export type callKeysHourglass = mandatoryCallKeys & {
13
13
  depositor: string;
@@ -9,10 +9,11 @@ export class HourglassProcessor extends GenericProcessor {
9
9
  round3: [
10
10
  { key: "symbolUnderlyingToken", call: "symbol", target: "underlying" },
11
11
  { key: "decimalsUnderlying", call: "decimals", target: "underlying" },
12
- { key: "balanceOfUnderlying", call: "balanceOf", target: "underlying", callArgs: "depositor" },
12
+ { key: "balanceOfUnderlying", call: "balanceOf", target: "underlying", metaData: "depositor" },
13
13
  ],
14
14
  round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
15
15
  };
16
+ // // override computeRound1(): void {}
16
17
  async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
17
18
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
18
19
  const priceUnderlying = (await pricer.get({ symbol: typeInfo.symbolUnderlyingToken })) ?? 0;
@@ -25,7 +26,7 @@ export class HourglassProcessor extends GenericProcessor {
25
26
  whitelistedSupplyTargetToken,
26
27
  tvl: tvl,
27
28
  priceTargetToken,
28
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
29
+ cardName: generateCardName(type, typeInfo, campaign),
29
30
  blacklistedSupply,
30
31
  totalSupply,
31
32
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawMaverickBP;
7
7
  call: string;
8
8
  target: keyof callKeysMaverickBP;
9
- callArgs?: keyof callKeysMaverickBP;
9
+ metaData?: keyof callKeysMaverickBP;
10
10
  };
11
11
  type callKeysMaverickBP = mandatoryCallKeys & {
12
12
  boostedPositionInformation: string;
@@ -9,7 +9,7 @@ export class MaverickBPProcessor extends GenericProcessor {
9
9
  key: "bpInfoReturnData",
10
10
  call: "boostedPositionInformation",
11
11
  target: "lensAddress",
12
- callArgs: "tokenAddress",
12
+ metaData: "tokenAddress",
13
13
  },
14
14
  ],
15
15
  round2: [
@@ -64,7 +64,7 @@ export class MaverickBPProcessor extends GenericProcessor {
64
64
  amount1,
65
65
  decimalsToken0,
66
66
  decimalsToken1,
67
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
67
+ cardName: generateCardName(type, typeInfo, campaign),
68
68
  priceTargetToken: priceTargetToken,
69
69
  totalSupply,
70
70
  tvl,
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callType = {
7
6
  key: keyof dataRawMetamorpho;
8
7
  call: string;
9
8
  target: keyof callKeysMetamorpho;
9
+ metaData?: keyof callKeysMetamorpho;
10
10
  };
11
11
  type callKeysMetamorpho = mandatoryCallKeys & {
12
12
  underlying: string;
@@ -11,6 +11,7 @@ export class MetamorphoProcessor extends GenericProcessor {
11
11
  ],
12
12
  round4: [{ key: "totalAssets", call: "totalAssets", target: "tokenAddress" }],
13
13
  };
14
+ // override computeRound1(): void {}
14
15
  async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
15
16
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
16
17
  const totalAssets = BN2Number(typeInfo.totalAssets, Number(typeInfo.decimalsUnderlyingToken));
@@ -23,7 +24,7 @@ export class MetamorphoProcessor extends GenericProcessor {
23
24
  whitelistedSupplyTargetToken,
24
25
  blacklistedSupply,
25
26
  priceTargetToken: underlyingTokenPrice,
26
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
27
+ cardName: generateCardName(type, typeInfo, campaign),
27
28
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
28
29
  };
29
30
  }
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import { tokenType, type tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callType = {
7
6
  key: keyof dataRawNoLinkVault;
8
7
  call: string;
9
8
  target: keyof callKeysNoLinkVault;
9
+ metaData?: keyof callKeysNoLinkVault;
10
10
  };
11
11
  type callKeysNoLinkVault = mandatoryCallKeys & {
12
12
  rateAccountant: string;
@@ -29,6 +29,7 @@ export declare class NoLinkVaultProcessor extends GenericProcessor<callKeysNoLin
29
29
  };
30
30
  processingRound1(typeInfo: dataRawNoLinkVault): void;
31
31
  processingRound5(index: number, type: tokenType, typeInfo: dataRawNoLinkVault, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeNoLinkVault>;
32
+ computeRound1(type: tokenType, typeInfo: dataRawNoLinkVault): tokenTypeStruct;
32
33
  computeRound2(index: number, type: tokenType, typeInfo: dataRawNoLinkVault, calls: string[]): tokenTypeStruct;
33
34
  computeRound3(index: number, type: tokenType, typeInfo: dataRawNoLinkVault, calls: string[]): tokenTypeStruct;
34
35
  computeRound4(index: number, type: tokenType, typeInfo: dataRawNoLinkVault, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
@@ -1,7 +1,7 @@
1
1
  import { generateCardName } from "@/utils/generateCardName";
2
2
  import { BN2Number } from "@sdk";
3
3
  import { GenericProcessor } from "../GenericProcessor";
4
- import { tokenType } from "../constants";
4
+ import { tokenType } from "../helpers/tokenType";
5
5
  export class NoLinkVaultProcessor extends GenericProcessor {
6
6
  rounds = {
7
7
  round1: [],
@@ -25,7 +25,7 @@ export class NoLinkVaultProcessor extends GenericProcessor {
25
25
  typeInfo.protocol = "Unifi";
26
26
  typeInfo.rateAccountant = "0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be";
27
27
  }
28
- if (this.type === tokenType.veda) {
28
+ if (typeInfo.type === tokenType.veda) {
29
29
  // To retrieve the rateAccountant, look at a transaction, find the teller, then find the accountant.
30
30
  if (typeInfo.tokenAddress === "0x08c6F91e2B681FaF5e17227F2a44C307b3C1364C")
31
31
  typeInfo.rateAccountant = "0xc315D6e14DDCDC7407784e2Caf815d131Bc1D3E7";
@@ -60,10 +60,13 @@ export class NoLinkVaultProcessor extends GenericProcessor {
60
60
  priceTargetToken,
61
61
  tvl,
62
62
  blacklistedSupply,
63
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
63
+ cardName: generateCardName(type, typeInfo, campaign),
64
64
  tokensDisplay: [{ symbol: typeInfo.baseSymbol, address: typeInfo.base }],
65
65
  };
66
66
  }
67
+ computeRound1(type, typeInfo) {
68
+ return super.computeRound1(type, typeInfo);
69
+ }
67
70
  computeRound2(index, type, typeInfo, calls) {
68
71
  return super.computeRound2(index, type, typeInfo, calls);
69
72
  }
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawPendle;
7
7
  call: string;
8
8
  target: keyof callKeysPendle;
9
+ metaData?: keyof callKeysPendle;
9
10
  };
10
11
  type callKeysPendle = mandatoryCallKeys & {
11
12
  SYToken: string;
@@ -22,7 +22,7 @@ export class PendleProcessor extends GenericProcessor {
22
22
  tvl,
23
23
  whitelistedSupplyTargetToken,
24
24
  priceTargetToken: priceTargetToken,
25
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
25
+ cardName: generateCardName(type, typeInfo, campaign),
26
26
  blacklistedSupply,
27
27
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
28
28
  };
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawPendleYT;
7
7
  call: string;
8
8
  target: keyof callKeysPendleYT;
9
+ metaData?: keyof callKeysPendleYT;
9
10
  };
10
11
  type callKeysPendleYT = mandatoryCallKeys & {
11
12
  SYToken: string;
@@ -22,7 +22,7 @@ export class PendleYTProcessor extends GenericProcessor {
22
22
  tvl,
23
23
  whitelistedSupplyTargetToken,
24
24
  priceTargetToken: priceTargetToken,
25
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
25
+ cardName: generateCardName(type, typeInfo, campaign),
26
26
  blacklistedSupply,
27
27
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
28
28
  };
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callType = {
7
6
  key: keyof dataRawRadiant;
8
7
  call: string;
9
8
  target: keyof callKeysRadiant;
9
+ metaData?: keyof callKeysRadiant;
10
10
  };
11
11
  type callKeysRadiant = mandatoryCallKeys & {
12
12
  underlyingToken: string;
@@ -11,6 +11,7 @@ export class RadiantProcessor extends GenericProcessor {
11
11
  round3: [],
12
12
  round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
13
13
  };
14
+ // override computeRound1(): void {}
14
15
  async processingRound5(_index, type, typeInfo, _calls, campaign, _pricer) {
15
16
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
16
17
  const priceTargetToken = BN2Number(typeInfo.priceBN, 8);
@@ -33,7 +34,7 @@ export class RadiantProcessor extends GenericProcessor {
33
34
  totalSupply,
34
35
  blacklistedSupply,
35
36
  tvl,
36
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
37
+ cardName: generateCardName(type, typeInfo, campaign),
37
38
  symbolUnderlyingToken: finalSymbol,
38
39
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlyingToken }],
39
40
  };
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawTemplate;
7
7
  call: string;
8
8
  target: keyof callKeysRfx;
9
- callArgs?: keyof callKeysRfx;
9
+ metaData?: keyof callKeysRfx;
10
10
  };
11
11
  type callKeysRfx = mandatoryCallKeys & {
12
12
  shortToken: string;
@@ -10,13 +10,13 @@ export class RfxProcessor extends GenericProcessor {
10
10
  key: "shortToken",
11
11
  call: "shortToken",
12
12
  target: "RFX_DATASTORE",
13
- callArgs: "metaDataShort",
13
+ metaData: "metaDataShort",
14
14
  },
15
15
  {
16
16
  key: "longToken",
17
17
  call: "longToken",
18
18
  target: "RFX_DATASTORE",
19
- callArgs: "metaDataLong",
19
+ metaData: "metaDataLong",
20
20
  },
21
21
  { key: "decimalsToken", call: "decimals", target: "tokenAddress" },
22
22
  ],
@@ -25,12 +25,13 @@ export class RfxProcessor extends GenericProcessor {
25
25
  { key: "symbolLongToken", call: "symbol", target: "longToken" },
26
26
  { key: "decimalsShortToken", call: "decimals", target: "shortToken" },
27
27
  { key: "decimalsLongToken", call: "decimals", target: "longToken" },
28
- { key: "balanceShortToken", call: "balanceOf", target: "shortToken", callArgs: "tokenAddress" },
29
- { key: "balanceLongToken", call: "balanceOf", target: "longToken", callArgs: "tokenAddress" },
28
+ { key: "balanceShortToken", call: "balanceOf", target: "shortToken", metaData: "tokenAddress" },
29
+ { key: "balanceLongToken", call: "balanceOf", target: "longToken", metaData: "tokenAddress" },
30
30
  ],
31
31
  round3: [],
32
32
  round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
33
33
  };
34
+ // override computeRound1(): void {}
34
35
  processingRound1(typeInfo) {
35
36
  const hexShortToken = ethers.utils.keccak256(ethers.utils.defaultAbiCoder.encode(["string"], ["SHORT_TOKEN"]));
36
37
  const hexLongToken = ethers.utils.keccak256(ethers.utils.defaultAbiCoder.encode(["string"], ["LONG_TOKEN"]));
@@ -56,7 +57,7 @@ export class RfxProcessor extends GenericProcessor {
56
57
  totalSupply,
57
58
  whitelistedSupplyTargetToken,
58
59
  blacklistedSupply,
59
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
60
+ cardName: generateCardName(type, typeInfo, campaign),
60
61
  priceTargetToken: priceTargetToken, // Add the appropriate value here
61
62
  tvl,
62
63
  symbolShortToken: typeInfo.symbolShortToken,
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawSatlayer;
7
7
  call: string;
8
8
  target: keyof callKeysSatlayer;
9
+ metaData?: keyof callKeysSatlayer;
9
10
  };
10
11
  export type callKeysSatlayer = mandatoryCallKeys & {
11
12
  owner: string;
@@ -7,6 +7,7 @@ export class SatlayerProcessor extends GenericProcessor {
7
7
  round3: [],
8
8
  round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
9
9
  };
10
+ // // override computeRound1(): void {}
10
11
  async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
11
12
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
12
13
  typeInfo.symbolUnderlyingToken = typeInfo.symbol.replace("sat", "");
@@ -18,7 +19,7 @@ export class SatlayerProcessor extends GenericProcessor {
18
19
  whitelistedSupplyTargetToken,
19
20
  tvl: tvl,
20
21
  priceTargetToken,
21
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
22
+ cardName: generateCardName(type, typeInfo, campaign),
22
23
  blacklistedSupply,
23
24
  totalSupply,
24
25
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawSpectra;
7
7
  call: string;
8
8
  target: keyof callKeysSpectra;
9
+ metaData?: any;
9
10
  };
10
11
  type callKeysSpectra = mandatoryCallKeys & {
11
12
  tokenPrice: string;
@@ -35,7 +35,7 @@ export class SpectraProcessor extends GenericProcessor {
35
35
  whitelistedSupplyTargetToken,
36
36
  blacklistedSupply,
37
37
  priceTargetToken,
38
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
38
+ cardName: generateCardName(type, typeInfo, campaign),
39
39
  tokensDisplay: [{ address: poolData.lpt.address }],
40
40
  };
41
41
  }
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawSpectra;
7
7
  call: string;
8
8
  target: keyof callKeysSpectra;
9
+ metaData?: any;
9
10
  };
10
11
  type callKeysSpectra = mandatoryCallKeys & {
11
12
  tokenPrice: string;
@@ -33,7 +33,7 @@ export class SpectraYTProcessor extends GenericProcessor {
33
33
  whitelistedSupplyTargetToken,
34
34
  blacklistedSupply,
35
35
  priceTargetToken,
36
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
36
+ cardName: generateCardName(type, typeInfo, campaign),
37
37
  tokensDisplay: [{ address: poolData.yt.address }],
38
38
  };
39
39
  }
@@ -1,8 +1,7 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callKeysSplice = mandatoryCallKeys & {
7
6
  priceTargetToken: string;
8
7
  };
@@ -1,6 +1,7 @@
1
1
  import { GenericProcessor } from "../GenericProcessor";
2
2
  import { fetchSpliceInformation } from "../helpers/spliceTVL";
3
3
  export class SpliceProcessor extends GenericProcessor {
4
+ // override computeRound1(): void {}
4
5
  async processingRound5(_index, _type, typeInfo, _calls, campaign, _pricer) {
5
6
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
6
7
  const { symbolUnderlyingToken, address, priceTargetToken, tvl } = await fetchSpliceInformation(campaign.campaignParameters.targetToken);
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawSturdySilo;
7
7
  call: string;
8
8
  target: keyof callKeysSturdySilo;
9
+ metaData?: keyof callKeysSturdySilo;
9
10
  };
10
11
  type callKeysSturdySilo = mandatoryCallKeys & {
11
12
  underlying: string;
@@ -16,6 +16,7 @@ export class SturdySiloProcessor extends GenericProcessor {
16
16
  round3: [],
17
17
  round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
18
18
  };
19
+ // override computeRound1(): void {}
19
20
  async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
20
21
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
21
22
  const sharePrice = BN2Number(typeInfo.sharePrice, 18);
@@ -30,7 +31,7 @@ export class SturdySiloProcessor extends GenericProcessor {
30
31
  tvl,
31
32
  sharePrice,
32
33
  priceTargetToken,
33
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
34
+ cardName: generateCardName(type, typeInfo, campaign),
34
35
  tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
35
36
  };
36
37
  }
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import { tokenType, type tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callType = {
7
6
  key: keyof dataRawTempest;
8
7
  call: string;
9
8
  target: keyof callKeysTempest;
9
+ metaData?: keyof callKeysTempest;
10
10
  };
11
11
  type callKeysTempest = mandatoryCallKeys & {
12
12
  addressToken0: string;
@@ -1,7 +1,7 @@
1
1
  import { generateCardName } from "@/utils/generateCardName";
2
2
  import { BN2Number, NULL_ADDRESS } from "@sdk";
3
3
  import { GenericProcessor } from "../GenericProcessor";
4
- import { tokenType } from "../constants";
4
+ import { tokenType } from "../helpers/tokenType";
5
5
  export class TempestVaultProcessor extends GenericProcessor {
6
6
  rounds = {
7
7
  round1: [
@@ -69,7 +69,7 @@ export class TempestVaultProcessor extends GenericProcessor {
69
69
  return {
70
70
  ...rest,
71
71
  blacklistedSupply,
72
- cardName: generateCardName(type, this.isStaking, typeInfo, campaign),
72
+ cardName: generateCardName(type, typeInfo, campaign),
73
73
  priceTargetToken: priceTargetToken,
74
74
  totalSupply,
75
75
  tvl,
@@ -1,12 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import type { Campaign, CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
5
- import type { tokenTypeStruct } from "../interface";
4
+ import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
6
5
  type callType = {
7
6
  key: keyof dataRawTemplate;
8
7
  call: string;
9
8
  target: keyof callKeysTemplate;
9
+ metaData?: keyof callKeysTemplate;
10
10
  };
11
11
  type callKeysTemplate = mandatoryCallKeys & {};
12
12
  type dataRawTemplate = callKeysTemplate & {};
@@ -23,6 +23,7 @@ export declare class TemplateProcessor extends GenericProcessor<callKeysTemplate
23
23
  processingRound3(typeInfo: dataRawTemplate): void;
24
24
  processingRound4(typeInfo: dataRawTemplate): void;
25
25
  processingRound5(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeTemplate>;
26
+ computeRound1(type: tokenType, typeInfo: dataRawTemplate): tokenTypeStruct;
26
27
  computeRound2(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[]): tokenTypeStruct;
27
28
  computeRound3(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[]): tokenTypeStruct;
28
29
  computeRound4(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
@@ -6,6 +6,7 @@ export class TemplateProcessor extends GenericProcessor {
6
6
  round3: [],
7
7
  round4: [],
8
8
  };
9
+ // override computeRound1(): void {}
9
10
  processingRound1(typeInfo) {
10
11
  super.processingRound1(typeInfo);
11
12
  }
@@ -21,6 +22,9 @@ export class TemplateProcessor extends GenericProcessor {
21
22
  async processingRound5(index, type, typeInfo, calls, campaign, pricer) {
22
23
  return super.processingRound5(index, type, typeInfo, calls, campaign, pricer);
23
24
  }
25
+ computeRound1(type, typeInfo) {
26
+ return super.computeRound1(type, typeInfo);
27
+ }
24
28
  computeRound2(index, type, typeInfo, calls) {
25
29
  return super.computeRound2(index, type, typeInfo, calls);
26
30
  }
@@ -1,11 +1,12 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
3
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
4
- import type { tokenType } from "../constants";
4
+ import type { tokenType } from "../helpers/tokenType";
5
5
  type callType = {
6
6
  key: keyof dataRawToros;
7
7
  call: string;
8
8
  target: keyof callKeysToros;
9
+ metaData?: any;
9
10
  };
10
11
  type callKeysToros = mandatoryCallKeys & {
11
12
  tokenPrice: string;