@merkl/api 0.19.22 → 0.19.24

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 (52) hide show
  1. package/dist/src/eden/index.d.ts +55 -55
  2. package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.js +2 -2
  3. package/dist/src/engine/erc20SubTypeProcessors/helpers/tokenType.d.ts +5 -5
  4. package/dist/src/engine/erc20SubTypeProcessors/helpers/tokenType.js +103 -94
  5. package/dist/src/engine/opportunityMetadata/implementations/Ajna.d.ts +2 -1
  6. package/dist/src/engine/opportunityMetadata/implementations/Ambient.d.ts +2 -1
  7. package/dist/src/engine/opportunityMetadata/implementations/Badger.d.ts +2 -1
  8. package/dist/src/engine/opportunityMetadata/implementations/Clamm.d.ts +2 -1
  9. package/dist/src/engine/opportunityMetadata/implementations/Clamm.js +17 -4
  10. package/dist/src/engine/opportunityMetadata/implementations/Compound.js +2 -1
  11. package/dist/src/engine/opportunityMetadata/implementations/Default.d.ts +0 -1
  12. package/dist/src/engine/opportunityMetadata/implementations/Default.js +0 -1
  13. package/dist/src/engine/opportunityMetadata/implementations/Dolomite.d.ts +2 -1
  14. package/dist/src/engine/opportunityMetadata/implementations/EigenLayer.d.ts +2 -1
  15. package/dist/src/engine/opportunityMetadata/implementations/Encompassing.js +5 -0
  16. package/dist/src/engine/opportunityMetadata/implementations/Euler.d.ts +2 -1
  17. package/dist/src/engine/opportunityMetadata/implementations/EventBased.d.ts +1 -1
  18. package/dist/src/engine/opportunityMetadata/implementations/EventBased.js +7 -6
  19. package/dist/src/engine/opportunityMetadata/implementations/Hyperdrive.d.ts +2 -1
  20. package/dist/src/engine/opportunityMetadata/implementations/Ion.d.ts +2 -1
  21. package/dist/src/engine/opportunityMetadata/implementations/JsonAirdrop.d.ts +2 -2
  22. package/dist/src/engine/opportunityMetadata/implementations/Morpho.d.ts +2 -1
  23. package/dist/src/engine/opportunityMetadata/implementations/Radiant.d.ts +2 -1
  24. package/dist/src/engine/opportunityMetadata/implementations/Silo.d.ts +2 -1
  25. package/dist/src/engine/opportunityMetadata/implementations/UniswapV4.d.ts +2 -1
  26. package/dist/src/engine/opportunityMetadata/implementations/Vest.d.ts +2 -1
  27. package/dist/src/index.d.ts +11 -11
  28. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
  29. package/dist/src/modules/v4/enso/enso.model.d.ts +2 -2
  30. package/dist/src/modules/v4/enso/enso.model.js +2 -2
  31. package/dist/src/modules/v4/interaction/interaction.model.d.ts +1 -1
  32. package/dist/src/modules/v4/interaction/interaction.model.js +3 -3
  33. package/dist/src/modules/v4/kyberzap/kyberzap.model.d.ts +4 -4
  34. package/dist/src/modules/v4/kyberzap/kyberzap.model.js +4 -4
  35. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +1 -1
  36. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +3 -3
  37. package/dist/src/modules/v4/protocol/protocol.model.d.ts +2 -3
  38. package/dist/src/modules/v4/protocol/protocol.model.js +49 -9
  39. package/dist/src/modules/v4/protocol/protocol.repository.js +12 -0
  40. package/dist/src/modules/v4/protocol/protocol.service.js +0 -4
  41. package/dist/src/modules/v4/router.d.ts +11 -11
  42. package/dist/src/modules/v4/status/status.service.js +6 -0
  43. package/dist/src/modules/v4/token/token.controller.d.ts +9 -9
  44. package/dist/src/modules/v4/token/token.model.d.ts +5 -5
  45. package/dist/src/modules/v4/token/token.model.js +7 -5
  46. package/dist/src/modules/v4/token/token.service.js +5 -5
  47. package/dist/src/utils/caseChanges.d.ts +1 -0
  48. package/dist/src/utils/caseChanges.js +3 -0
  49. package/dist/tsconfig.package.tsbuildinfo +1 -1
  50. package/package.json +1 -1
  51. package/dist/database/api/seeder/resources/protocol.d.ts +0 -373
  52. package/dist/database/api/seeder/resources/protocol.js +0 -344
@@ -1,3 +1,4 @@
1
+ import { type ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import { type Campaign as CampaignEnum, type CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.CLAMM;
@@ -34,7 +35,7 @@ export declare class ClammMetadata implements MetadataBuilder<campaignType> {
34
35
  chainId: ChainId;
35
36
  address: any;
36
37
  }[];
37
- mainProtocol: string | undefined;
38
+ mainProtocol: ProtocolId;
38
39
  depositUrl: string | undefined;
39
40
  }>;
40
41
  static generateUrl(computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"]): string | undefined;
@@ -1,4 +1,7 @@
1
+ import { protocolIdList } from "@/modules/v4/protocol/protocol.model";
2
+ import { ProtocolService } from "@/modules/v4/protocol/protocol.service";
1
3
  import { camelToKebabCase } from "@/utils/caseChanges";
4
+ import { log } from "@/utils/logger";
2
5
  import { OpportunityAction } from "@db/api";
3
6
  import { AMM, ChainId, NETWORK_LABELS, almName, ammName, } from "@sdk";
4
7
  import { getAddress } from "viem";
@@ -66,11 +69,21 @@ export class ClammMetadata {
66
69
  }
67
70
  }
68
71
  // Protocol id normalization
69
- let mainProtocol = AMM[params.amm]
72
+ let mainProtocolId = AMM[params.amm]
70
73
  ? camelToKebabCase(AMM[params.amm].replace(/\/?(V(\d+_)?\d+)/g, "").replaceAll("Algebra", ""))
71
74
  : undefined;
72
- if (mainProtocol?.includes("stryke"))
73
- mainProtocol = "stryke";
75
+ if (mainProtocolId?.includes("stryke"))
76
+ mainProtocolId = "stryke";
77
+ // Make sure the protocol exist in the correct type
78
+ const protocol = (await ProtocolService.findMany({ id: mainProtocolId }))?.[0];
79
+ if (!!protocol) {
80
+ mainProtocolId = protocol?.id;
81
+ }
82
+ if (mainProtocolId === "unknown") {
83
+ mainProtocolId = undefined;
84
+ }
85
+ if (!mainProtocolId || !protocolIdList.includes(mainProtocolId))
86
+ log.warn(`protocol not found for ${AMM[params.amm]}`);
74
87
  return {
75
88
  name: `Provide liquidity to ${whitelistNameString} ${platform} ${params.symbolToken0}-${params.symbolToken1}${params.poolFee ? ` ${params.poolFee}%` : ""}`,
76
89
  action: OpportunityAction.POOL,
@@ -78,7 +91,7 @@ export class ClammMetadata {
78
91
  { chainId: computeChainId, address: params.token0 },
79
92
  { chainId: computeChainId, address: params.token1 },
80
93
  ],
81
- mainProtocol,
94
+ mainProtocol: mainProtocolId,
82
95
  depositUrl: ClammMetadata.generateUrl(computeChainId, params),
83
96
  };
84
97
  }
@@ -1,3 +1,4 @@
1
+ import { camelToKebabCase } from "@/utils/caseChanges";
1
2
  import { OpportunityAction } from "@db/api";
2
3
  import { CompFork, CompoundSubCampaignType, } from "@sdk";
3
4
  export class CompoundMetadata {
@@ -14,7 +15,7 @@ export class CompoundMetadata {
14
15
  { chainId: computeChainId, address: params.underlyingToken },
15
16
  { chainId: computeChainId, address: params.targetToken },
16
17
  ],
17
- mainProtocol: CompFork[params.compFork].toLowerCase(),
18
+ mainProtocol: camelToKebabCase(CompFork[params.compFork].replace(/\/?(V(\d+_)?\d+)/g, "")),
18
19
  depositUrl: CompoundMetadata.generateUrl(computeChainId, params),
19
20
  };
20
21
  }
@@ -7,7 +7,6 @@ export declare class DefaultMetadata implements MetadataBuilder<campaignType> {
7
7
  action: "HOLD";
8
8
  name: string;
9
9
  tokens: never[];
10
- mainProtocol: string;
11
10
  }>;
12
11
  }
13
12
  export {};
@@ -5,7 +5,6 @@ export class DefaultMetadata {
5
5
  action: OpportunityAction.HOLD,
6
6
  name: "Reward Opportunity",
7
7
  tokens: [],
8
- mainProtocol: "",
9
8
  };
10
9
  }
11
10
  }
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.DOLOMITE;
@@ -9,7 +10,7 @@ export declare class DolomiteMetadata implements MetadataBuilder<campaignType> {
9
10
  address: any;
10
11
  }[];
11
12
  name: string;
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  }>;
14
15
  }
15
16
  export {};
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.EIGENLAYER;
@@ -9,7 +10,7 @@ export declare class EigenLayerMetadata implements MetadataBuilder<campaignType>
9
10
  chainId: ChainId;
10
11
  address: any;
11
12
  }[];
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  }>;
14
15
  }
15
16
  export {};
@@ -1,3 +1,4 @@
1
+ import { protocolIdList } from "@/modules/v4/protocol/protocol.model";
1
2
  import { log } from "@/utils/logger";
2
3
  import { OpportunityAction } from "@db/api";
3
4
  export class EncompassingMetadata {
@@ -7,6 +8,10 @@ export class EncompassingMetadata {
7
8
  if (!dataResponse.ok)
8
9
  throw new Error(`Response status: ${dataResponse.status}`);
9
10
  const data = await dataResponse.json();
11
+ if (!protocolIdList.includes(data.mainProtocol)) {
12
+ log.warn(`unknown Protocol ID: ${data.mainProtocol}`);
13
+ data.mainProtocol = undefined;
14
+ }
10
15
  return {
11
16
  action: OpportunityAction.DROP,
12
17
  name: data.opportunityName ?? `Distribution of ${params.symbolRewardToken}`,
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import { Campaign as CampaignEnum, type CampaignParameters, type ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.EULER;
@@ -9,7 +10,7 @@ export declare class EulerMetadata implements MetadataBuilder<campaignType> {
9
10
  address: any;
10
11
  }[];
11
12
  action: "LEND" | "BORROW";
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  depositUrl: string;
14
15
  }>;
15
16
  static generateUrl(_computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"]): string;
@@ -9,7 +9,7 @@ export declare class EventBasedMetadata implements MetadataBuilder<campaignType>
9
9
  chainId: ChainId;
10
10
  address: any;
11
11
  }[];
12
- mainProtocol: string;
12
+ mainProtocol: "hanji";
13
13
  depositUrl: any;
14
14
  } | {
15
15
  action: string;
@@ -1,26 +1,27 @@
1
+ import { capitalize } from "@/utils/caseChanges";
1
2
  export class EventBasedMetadata {
2
3
  async build(computeChainId, params, _subType) {
3
4
  try {
4
5
  const action = "SWAP";
5
- const mainProtocolId = "Hanji";
6
- let name = `${params.eventID.split("(")[0]} on ${mainProtocolId}`;
6
+ const mainProtocolId = "hanji";
7
+ let name = `${params.eventID.split("(")[0]} on ${capitalize(mainProtocolId)}`;
7
8
  let tokens = [{ chainId: computeChainId, address: params.contract }];
8
9
  if (params.contract.toLowerCase() === "0xd0bc067cf877f7b76ceb331891331d9e6acda1a7") {
9
- name = `Trade USDC/XTZ on ${mainProtocolId}`;
10
+ name = `Trade USDC/XTZ on ${capitalize(mainProtocolId)}`;
10
11
  tokens = [
11
12
  { chainId: computeChainId, address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9" },
12
13
  { chainId: computeChainId, address: "0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb" },
13
14
  ];
14
15
  }
15
16
  if (params.contract.toLowerCase() === "0x65ea4dd7f789c71c0f57ed84b3bdc3062898d3cb") {
16
- name = `Trade USDC/ETH on ${mainProtocolId}`;
17
+ name = `Trade USDC/ETH on ${capitalize(mainProtocolId)}`;
17
18
  tokens = [
18
19
  { chainId: computeChainId, address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9" },
19
20
  { chainId: computeChainId, address: "0xfc24f770F94edBca6D6f885E12d4317320BcB401" },
20
21
  ];
21
22
  }
22
23
  if (params.contract.toLowerCase() === "0xbb6b01d94e3f6ebae8647cb56d544f57928ab758") {
23
- name = `Trade USDC/BTC on ${mainProtocolId}`;
24
+ name = `Trade USDC/BTC on ${capitalize(mainProtocolId)}`;
24
25
  tokens = [
25
26
  { chainId: computeChainId, address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9" },
26
27
  { chainId: computeChainId, address: "0xbFc94CD2B1E55999Cfc7347a9313e88702B83d0F" },
@@ -30,7 +31,7 @@ export class EventBasedMetadata {
30
31
  action,
31
32
  name,
32
33
  tokens,
33
- mainProtocol: mainProtocolId.toLowerCase(),
34
+ mainProtocol: mainProtocolId,
34
35
  depositUrl: EventBasedMetadata.generateUrl(computeChainId, params),
35
36
  };
36
37
  }
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import { type Campaign as CampaignEnum, type CampaignParameters, type ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.HYPERDRIVELOGPROCESSOR | CampaignEnum.HYPERDRIVELOGFIXPROCESSOR;
@@ -9,7 +10,7 @@ export declare class HyperdriveMetadata implements MetadataBuilder<campaignType>
9
10
  chainId: ChainId;
10
11
  address: any;
11
12
  }[];
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  depositUrl: string;
14
15
  }>;
15
16
  static generateUrl(computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"], subType: CampaignParameters<campaignType>["campaignSubType"]): string;
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum } from "@sdk";
2
3
  import type { CampaignParameters, ChainId } from "@sdk";
3
4
  import type { MetadataBuilder } from "../interface";
@@ -10,7 +11,7 @@ export declare class IonMetadata implements MetadataBuilder<campaignType> {
10
11
  chainId: ChainId;
11
12
  address: any;
12
13
  }[];
13
- mainProtocol: string;
14
+ mainProtocol: ProtocolId;
14
15
  }>;
15
16
  }
16
17
  export {};
@@ -9,13 +9,13 @@ export declare class JsonAirdropMetadata implements MetadataBuilder<campaignType
9
9
  chainId: ChainId;
10
10
  address: string;
11
11
  }[];
12
- mainProtocol: string | undefined;
12
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
13
13
  depositUrl?: undefined;
14
14
  } | {
15
15
  action: "DROP";
16
16
  name: string;
17
17
  tokens: never[];
18
- mainProtocol: string | undefined;
18
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
19
19
  depositUrl: any;
20
20
  }>;
21
21
  static generateUrl(_computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"]): any;
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import { type Campaign as CampaignEnum, type CampaignParameters, type ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.MORPHO;
@@ -9,7 +10,7 @@ export declare class MorphoMetadata implements MetadataBuilder<campaignType> {
9
10
  address: any;
10
11
  }[];
11
12
  name: string;
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  depositUrl: string | undefined;
14
15
  }>;
15
16
  static generateUrl(computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"], subType: CampaignParameters<campaignType>["campaignSubType"]): string | undefined;
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.RADIANT;
@@ -9,7 +10,7 @@ export declare class RadiantMetadata implements MetadataBuilder<campaignType> {
9
10
  chainId: ChainId;
10
11
  address: any;
11
12
  }[];
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  }>;
14
15
  }
15
16
  export {};
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.SILO;
@@ -9,7 +10,7 @@ export declare class SiloMetadata implements MetadataBuilder<campaignType> {
9
10
  chainId: ChainId;
10
11
  address: any;
11
12
  }[];
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  }>;
14
15
  }
15
16
  export {};
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.UNISWAP_V4;
@@ -9,7 +10,7 @@ export declare class UniswapV4Metadata implements MetadataBuilder<campaignType>
9
10
  chainId: ChainId;
10
11
  address: any;
11
12
  }[];
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  }>;
14
15
  }
15
16
  export {};
@@ -1,3 +1,4 @@
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
1
2
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.VEST;
@@ -9,7 +10,7 @@ export declare class VestMetadata implements MetadataBuilder<campaignType> {
9
10
  chainId: ChainId;
10
11
  address: string;
11
12
  }[];
12
- mainProtocol: string;
13
+ mainProtocol: ProtocolId;
13
14
  }>;
14
15
  }
15
16
  export {};
@@ -238,7 +238,7 @@ declare const app: Elysia<"", false, {
238
238
  } & {
239
239
  price?: number | null | undefined;
240
240
  })[];
241
- mainProtocol: string | undefined;
241
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
242
242
  depositUrl: any;
243
243
  tags: string[];
244
244
  };
@@ -1303,7 +1303,7 @@ declare const app: Elysia<"", false, {
1303
1303
  } & {
1304
1304
  price?: number | null | undefined;
1305
1305
  })[][];
1306
- mainProtocol: string | undefined;
1306
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
1307
1307
  depositUrl: any;
1308
1308
  tags: string[];
1309
1309
  };
@@ -2282,30 +2282,30 @@ declare const app: Elysia<"", false, {
2282
2282
  body: {
2283
2283
  data: {
2284
2284
  properties: {
2285
- Symbol: {
2286
- rich_text: {
2287
- plain_text: string;
2288
- }[];
2289
- };
2290
- Icon: {
2285
+ "Icon (Required)": {
2291
2286
  files: {
2292
2287
  file: {
2293
2288
  url: string;
2294
2289
  };
2295
2290
  }[];
2296
2291
  };
2297
- Address: {
2292
+ "Address (in checksum format) (Required)": {
2298
2293
  rich_text: {
2299
2294
  plain_text: string;
2300
2295
  }[];
2301
2296
  };
2302
- "Chain ID": {
2297
+ "Chain ID (Required)": {
2303
2298
  number: number;
2304
2299
  };
2300
+ "Symbol (Optional)": {
2301
+ rich_text: {
2302
+ plain_text: string;
2303
+ }[];
2304
+ };
2305
2305
  Verified: {
2306
2306
  checkbox: boolean;
2307
2307
  };
2308
- "CoinGecko API ID": {
2308
+ "CoinGecko API ID (Recommended)": {
2309
2309
  rich_text: {
2310
2310
  plain_text: string;
2311
2311
  }[];
@@ -220,7 +220,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
220
220
  } & {
221
221
  price?: number | null | undefined;
222
222
  })[][];
223
- mainProtocol: string | undefined;
223
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
224
224
  depositUrl: any;
225
225
  tags: string[];
226
226
  };
@@ -21,8 +21,8 @@ export declare const slugToProtocolId: {
21
21
  "gearbox-v3": "gearbox";
22
22
  gearbox: "gearbox";
23
23
  moonwell: "moonwell";
24
- "pancakeswap-amm-v3": "pancakeswap";
25
- "quickswap-dex": "quickswap";
24
+ "pancakeswap-amm-v3": "pancake-swap";
25
+ "quickswap-dex": "quick-swap";
26
26
  "silo-protected": "silo";
27
27
  silo: "silo";
28
28
  "velodrome-v2-staking": "velodrome";
@@ -22,8 +22,8 @@ export const slugToProtocolId = {
22
22
  "gearbox-v3": "gearbox",
23
23
  gearbox: "gearbox",
24
24
  moonwell: "moonwell",
25
- "pancakeswap-amm-v3": "pancakeswap",
26
- "quickswap-dex": "quickswap",
25
+ "pancakeswap-amm-v3": "pancake-swap",
26
+ "quickswap-dex": "quick-swap",
27
27
  "silo-protected": "silo",
28
28
  silo: "silo",
29
29
  "velodrome-v2-staking": "velodrome",
@@ -1,5 +1,5 @@
1
1
  import type { Token } from "@/modules/v4/token/token.model";
2
- import type { ProtocolId } from "../protocol/protocol.model";
2
+ import { type ProtocolId } from "../protocol/protocol.model";
3
3
  /**
4
4
  * Interaction Route
5
5
  */
@@ -1,18 +1,18 @@
1
- import protocol from "database/api/seeder/resources/protocol";
2
1
  import { t } from "elysia";
2
+ import { protocolIdList } from "../protocol/protocol.model";
3
3
  export const participateInputTypes = ["tokenAmount", "token"];
4
4
  export const participateTypes = ["link", "deposit", "withdraw"];
5
5
  export const GetInteractionTargetsQueryDto = t.Object({
6
6
  chainId: t.Numeric(),
7
7
  protocolId: t.Optional(t.String({
8
- examples: Object.values(protocol).reduce((obj, i) => Object.assign(obj, { [i.name]: { value: i.id } }), {}),
8
+ examples: protocolIdList.join(", "),
9
9
  })),
10
10
  identifier: t.String(),
11
11
  });
12
12
  export const GetInteractionQuoteQueryDto = t.Object({
13
13
  chainId: t.Numeric(),
14
14
  protocolId: t.String({
15
- examples: Object.values(protocol).reduce((obj, i) => Object.assign(obj, { [i.name]: { value: i.id } }), {}),
15
+ examples: protocolIdList.join(", "),
16
16
  }),
17
17
  identifier: t.String(),
18
18
  userAddress: t.String(),
@@ -1,13 +1,13 @@
1
1
  export declare const dexIdToProtocolId: {
2
2
  DEX_UNISWAPV3: "uniswap";
3
3
  DEX_UNISWAPV2: "uniswap";
4
- DEX_PANCAKESWAPV3: "pancakeswap";
4
+ DEX_PANCAKESWAPV3: "pancake-swap";
5
5
  DEX_SUSHISWAPV3: "sushiswap";
6
6
  DEX_CURVE: "curve";
7
7
  DEX_SYNCSWAP_V3: "syncswap";
8
- DEX_ZKSWAP_V3: "zkswap";
9
- DEX_QUICKSWAPV3UNI: "quickswap";
10
- DEX_QUICKSWAPV3ALGEBRA: "quickswap";
8
+ DEX_ZKSWAP_V3: "zk-swap";
9
+ DEX_QUICKSWAPV3UNI: "quick-swap";
10
+ DEX_QUICKSWAPV3ALGEBRA: "quick-swap";
11
11
  DEX_THRUSTERV3: "thruster";
12
12
  DEX_CAMELOTV3: "camelot";
13
13
  DEX_BEEFY: "beefy";
@@ -3,14 +3,14 @@ import { t } from "elysia";
3
3
  export const dexIdToProtocolId = {
4
4
  DEX_UNISWAPV3: "uniswap",
5
5
  DEX_UNISWAPV2: "uniswap",
6
- DEX_PANCAKESWAPV3: "pancakeswap",
6
+ DEX_PANCAKESWAPV3: "pancake-swap",
7
7
  DEX_SUSHISWAPV3: "sushiswap",
8
8
  DEX_CURVE: "curve",
9
9
  DEX_SYNCSWAP_V3: "syncswap",
10
10
  // DEX_SYNCSWAP_V1_V2: "syncswap",
11
- DEX_ZKSWAP_V3: "zkswap",
12
- DEX_QUICKSWAPV3UNI: "quickswap",
13
- DEX_QUICKSWAPV3ALGEBRA: "quickswap",
11
+ DEX_ZKSWAP_V3: "zk-swap",
12
+ DEX_QUICKSWAPV3UNI: "quick-swap",
13
+ DEX_QUICKSWAPV3ALGEBRA: "quick-swap",
14
14
  DEX_THRUSTERV3: "thruster",
15
15
  DEX_CAMELOTV3: "camelot",
16
16
  DEX_BEEFY: "beefy",
@@ -93,7 +93,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
93
93
  } & {
94
94
  price?: number | null | undefined;
95
95
  })[];
96
- mainProtocol: string | undefined;
96
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
97
97
  depositUrl: any;
98
98
  tags: string[];
99
99
  };
@@ -49,7 +49,7 @@ export declare abstract class OpportunityService {
49
49
  } & {
50
50
  price?: number | null | undefined;
51
51
  })[][];
52
- mainProtocol: string | undefined;
52
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
53
53
  depositUrl: any;
54
54
  tags: string[];
55
55
  }>;
@@ -76,7 +76,7 @@ export declare abstract class OpportunityService {
76
76
  } & {
77
77
  price?: number | null | undefined;
78
78
  })[];
79
- mainProtocol: string | undefined;
79
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
80
80
  depositUrl: any;
81
81
  tags: string[];
82
82
  }>;
@@ -121,7 +121,7 @@ export declare abstract class OpportunityService {
121
121
  } & {
122
122
  price?: number | null | undefined;
123
123
  })[];
124
- mainProtocol: string | undefined;
124
+ mainProtocol: "splice" | "morpho" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quick-swap" | "ramses" | "retro" | "stryke" | "sushiswap" | "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" | "coumpound" | "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" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
125
125
  depositUrl: any;
126
126
  tags: string[];
127
127
  }>;
@@ -9,8 +9,8 @@ export type Protocol = Resource<"Protocol", undefined, {
9
9
  numberOfLiveCampaigns?: number;
10
10
  opportunityLiveTags?: string[];
11
11
  }>;
12
- declare const protocolTypes: readonly ["uniswap", "ambient", "arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap", "quickswap", "ramses", "retro", "stryke", "sushiswap", "swapr", "thruster", "voltage", "zero", "koi", "supswap", "zkswap", "thirdtrade", "velodrome", "aerodrome", "balancer", "curve", "cross_curve", "curveNPool", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap", "neptune", "zkSwapThreePool", "syncswap", "rfx", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest", "zerolend", "hyperdrive", "gamma", "oku", "hourglass", "veda", "kyo", "sonex", "velodrome"];
13
- export type ProtocolId = (typeof protocolTypes)[number];
12
+ export declare const protocolIdList: readonly ["uniswap", "ambient", "arthswap", "base-swap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancake-swap", "quick-swap", "ramses", "retro", "stryke", "sushiswap", "swapr", "thruster", "voltage", "zero", "koi", "supswap", "zk-swap", "thirdtrade", "swap-x", "velodrome", "aerodrome", "balancer", "curve", "cross_curve", "curveNPool", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap", "neptune", "zkSwapThreePool", "syncswap", "rfx", "ra", "maverick", "trader-joe", "velodrome", "hanji", "radiant", "aave", "fraxlend", "ironclad", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "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", "angles", "enzyme", "toros", "vicuna", "bunni", "beratrax", "concrete", "cian", "pendle", "splice", "sturdy", "yei", "filament", "gammaswap", "maha", "tempest", "uranium", "hanji", "holdstation", "katana", "satlayer"];
13
+ export type ProtocolId = (typeof protocolIdList)[number];
14
14
  export declare const ProtocolResourceDto: import("@sinclair/typebox").TObject<{
15
15
  id: import("@sinclair/typebox").TString;
16
16
  name: import("@sinclair/typebox").TString;
@@ -52,4 +52,3 @@ export type GetProtocolsQueryModel = typeof GetProtocolsQueryDto.static;
52
52
  export type GetProtocolModel = typeof GetProtocolParamsDto.static;
53
53
  export type UpdateProtocolModel = typeof UpdateProtocolDto.static;
54
54
  export type CreateProtocolModel = typeof CreateProtocolDto.static;
55
- export {};