@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.
- package/dist/src/eden/index.d.ts +7 -3
- package/dist/src/index.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.js +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.js +9 -0
- package/dist/src/modules/v4/router.d.ts +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -593,7 +593,7 @@ declare const eden: {
|
|
593
593
|
}) & {};
|
594
594
|
};
|
595
595
|
campaigns: {
|
596
|
-
|
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
|
-
|
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
|
-
|
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: {
|
package/dist/src/index.d.ts
CHANGED
@@ -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}`);
|