@merkl/api 0.17.29 → 0.17.31

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.
@@ -6922,9 +6922,7 @@ declare const eden: {
6922
6922
  };
6923
6923
  fetch?: RequestInit | undefined;
6924
6924
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
6925
- 200: {
6926
- message: string;
6927
- };
6925
+ 200: unknown;
6928
6926
  }>>;
6929
6927
  };
6930
6928
  campaigns: {
@@ -11778,9 +11776,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
11778
11776
  };
11779
11777
  headers: unknown;
11780
11778
  response: {
11781
- 200: {
11782
- message: string;
11783
- };
11779
+ 200: unknown;
11784
11780
  };
11785
11781
  };
11786
11782
  };
@@ -19400,9 +19396,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
19400
19396
  };
19401
19397
  fetch?: RequestInit | undefined;
19402
19398
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
19403
- 200: {
19404
- message: string;
19405
- };
19399
+ 200: unknown;
19406
19400
  }>>;
19407
19401
  };
19408
19402
  campaigns: {
@@ -4313,9 +4313,7 @@ declare const app: Elysia<"", false, {
4313
4313
  };
4314
4314
  headers: unknown;
4315
4315
  response: {
4316
- 200: {
4317
- message: string;
4318
- };
4316
+ 200: unknown;
4319
4317
  };
4320
4318
  };
4321
4319
  };
@@ -1,5 +1,6 @@
1
+ import { log } from "../../../utils/logger";
1
2
  import { RunStatus } from "../../../../database/api/.generated";
2
- import { HOUR, MAX_COMPUTE_JOB_TIME, getMultisigURL, registry } from "@sdk";
3
+ import { HOUR, MAX_COMPUTE_JOB_TIME, NETWORK_LABELS, getMultisigURL, registry } from "@sdk";
3
4
  import moment from "moment";
4
5
  import { CampaignService } from "../campaign";
5
6
  import { MerklRootService } from "../merklRoot";
@@ -86,9 +87,8 @@ export class StatusService {
86
87
  const chainId = Number.parseInt(chainIdString);
87
88
  const delayedCampaigns = delayedCampaignArray[index].status === "rejected" ? [] : delayedCampaignArray[index].value;
88
89
  const liveCampaigns = liveCampaignArray[index].status === "rejected" ? 0 : liveCampaignArray[index].value;
89
- if (!registry(chainId)?.Merkl?.DistributionCreator ||
90
- !registry(chainId)?.Merkl?.Distributor ||
91
- !registry(chainId)?.AngleLabs) {
90
+ if (!registry(chainId)?.Merkl?.DistributionCreator || !registry(chainId)?.Merkl?.Distributor) {
91
+ log.warn(`Missing registry for ${NETWORK_LABELS[chainId]}`);
92
92
  continue;
93
93
  }
94
94
  let adminUrl = undefined;
@@ -98,7 +98,7 @@ export class StatusService {
98
98
  catch { }
99
99
  res[chainId] = {
100
100
  ...merklRoots[chainId],
101
- admin: registry(chainId)?.AngleLabs,
101
+ admin: registry(chainId)?.AngleLabs ?? "0xb08AB4332AD871F89da24df4751968A61e58013c",
102
102
  adminUrl,
103
103
  distributor: registry(chainId)?.Merkl?.Distributor,
104
104
  distributionCreator: registry(chainId)?.Merkl?.DistributionCreator,
@@ -106,6 +106,7 @@ export class StatusService {
106
106
  delayed: delayedCampaigns,
107
107
  };
108
108
  }
109
+ console.log(res[146]);
109
110
  return res;
110
111
  }
111
112
  static async findManyDelay(query) {
@@ -1,4 +1,8 @@
1
1
  import type Elysia from "elysia";
2
+ /**
3
+ * @deprecated
4
+ * This whole file is deprecated but is still used by Pancakeswap to populate their db so we can't remove it yet.
5
+ */
2
6
  export declare const query: import("@sinclair/typebox").TObject<{
3
7
  campaignId: import("@sinclair/typebox").TString;
4
8
  chainId: import("@sinclair/typebox").TNumber;
@@ -28,9 +32,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
28
32
  };
29
33
  headers: unknown;
30
34
  response: {
31
- 200: {
32
- message: string;
33
- };
35
+ 200: unknown;
34
36
  };
35
37
  };
36
38
  };
@@ -1,14 +1,28 @@
1
1
  import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
2
+ import { engineDbClient } from "../../utils/prisma";
3
+ import { Prisma } from "../../../database/engine/.generated";
2
4
  import { t } from "elysia";
5
+ /**
6
+ * @deprecated
7
+ * This whole file is deprecated but is still used by Pancakeswap to populate their db so we can't remove it yet.
8
+ */
3
9
  export const query = t.Object({
4
10
  campaignId: t.String(),
5
11
  chainId: t.Numeric(),
6
12
  byReason: t.Optional(t.BooleanString()),
7
13
  });
8
- export default (app) => app.use(checkQueryChainIdValidity()).get("/campaignClaims", async () => {
9
- return {
10
- message: "This route is now deprecated removed for performance improvement, please reach out to the team for more information.",
11
- };
14
+ const CLAIMS_OVER_TIME = (chainId, campaignId) => Prisma.sql `
15
+ SELECT timestamp, recipient, reason, claimed
16
+ FROM "ClaimsOverTime"
17
+ WHERE
18
+ "chainId"=${chainId} AND
19
+ "campaignId"=${campaignId}
20
+ ORDER BY timestamp ASC
21
+ `;
22
+ export default (app) => app.use(checkQueryChainIdValidity()).get("/campaignClaims", async ({ query }) => {
23
+ const campaignId = query.campaignId;
24
+ const chainId = query.chainId;
25
+ return await engineDbClient.$queryRaw(CLAIMS_OVER_TIME(chainId, campaignId));
12
26
  }, {
13
27
  query,
14
28
  tags: ["Campaigns"],
@@ -57,9 +57,7 @@ export declare const v3: Elysia<"/v3", false, {
57
57
  };
58
58
  headers: unknown;
59
59
  response: {
60
- 200: {
61
- message: string;
62
- };
60
+ 200: unknown;
63
61
  };
64
62
  };
65
63
  };