@merkl/api 0.10.253 → 0.10.254

Sign up to get free protection for your applications and to get access to all the features.
@@ -593,7 +593,7 @@ declare const eden: {
593
593
  }) & {};
594
594
  };
595
595
  campaigns: {
596
- index: {
596
+ engine: {
597
597
  post: (body: {
598
598
  tags?: string[] | undefined;
599
599
  identifier?: string | undefined;
@@ -632,6 +632,8 @@ declare const eden: {
632
632
  creatorAddress: string;
633
633
  } | undefined;
634
634
  }>>;
635
+ };
636
+ index: {
635
637
  get: (options: {
636
638
  headers?: Record<string, unknown> | undefined;
637
639
  query: {
@@ -3480,7 +3482,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3480
3482
  } & {
3481
3483
  v4: {
3482
3484
  campaigns: {
3483
- index: {
3485
+ engine: {
3484
3486
  post: {
3485
3487
  body: {
3486
3488
  tags?: string[] | undefined;
@@ -6872,7 +6874,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6872
6874
  }) & {};
6873
6875
  };
6874
6876
  campaigns: {
6875
- index: {
6877
+ engine: {
6876
6878
  post: (body: {
6877
6879
  tags?: string[] | undefined;
6878
6880
  identifier?: string | undefined;
@@ -6911,6 +6913,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6911
6913
  creatorAddress: string;
6912
6914
  } | undefined;
6913
6915
  }>>;
6916
+ };
6917
+ index: {
6914
6918
  get: (options: {
6915
6919
  headers?: Record<string, unknown> | undefined;
6916
6920
  query: {
@@ -699,7 +699,7 @@ declare const app: Elysia<"", false, {
699
699
  } & {
700
700
  v4: {
701
701
  campaigns: {
702
- index: {
702
+ engine: {
703
703
  post: {
704
704
  body: {
705
705
  tags?: string[] | undefined;
@@ -13,7 +13,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
13
13
  macroFn: {};
14
14
  }, {
15
15
  campaigns: {
16
- index: {
16
+ engine: {
17
17
  post: {
18
18
  body: {
19
19
  tags?: string[] | undefined;
@@ -7,7 +7,7 @@ import { CampaignService } from "./campaign.service";
7
7
  // ─── Campaigns Controller ────────────────────────────────────────────────────
8
8
  export const CampaignController = new Elysia({ prefix: "/campaigns", detail: { tags: ["Campaigns"] } })
9
9
  // ─── Create A Campaign ───────────────────────────────────────────────
10
- .post("/", async ({ body }) => await CampaignService.create(body), {
10
+ .post("/engine", async ({ body }) => await CampaignService.create(body), {
11
11
  beforeHandle: EngineGuard,
12
12
  headers: AuthorizationHeadersDto,
13
13
  body: CreateCampaignDto,
@@ -43,6 +43,15 @@ export const getErc20Metadata = async (chainId, campaignId, rewardToken, amount,
43
43
  tokens.push({ chainId, address: dynamicData.typeInfo.token0 });
44
44
  tokens.push({ chainId, address: dynamicData.typeInfo.token1 });
45
45
  }
46
+ // Case of tripools
47
+ if (!!dynamicData &&
48
+ !!dynamicData.typeInfo?.token0Address &&
49
+ !!dynamicData.typeInfo?.token1Address &&
50
+ !!dynamicData.typeInfo?.token2Address) {
51
+ tokens.push({ chainId, address: dynamicData.typeInfo.token0Address });
52
+ tokens.push({ chainId, address: dynamicData.typeInfo.token1Address });
53
+ tokens.push({ chainId, address: dynamicData.typeInfo.token2Address });
54
+ }
46
55
  }
47
56
  catch {
48
57
  log.warn(`failed to fetch dynamic data for ERC20 campaign ${campaignId}`);
@@ -577,7 +577,7 @@ export declare const v4: Elysia<"/v4", false, {
577
577
  } & {
578
578
  v4: {
579
579
  campaigns: {
580
- index: {
580
+ engine: {
581
581
  post: {
582
582
  body: {
583
583
  tags?: string[] | undefined;