@merkl/api 0.20.115 → 0.20.117

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 (47) hide show
  1. package/dist/database/api/.generated/drizzle/schema.d.ts +17 -0
  2. package/dist/database/api/.generated/drizzle/schema.js +1 -0
  3. package/dist/database/api/.generated/drizzle/schema.ts +1 -0
  4. package/dist/database/api/.generated/edge.js +4 -3
  5. package/dist/database/api/.generated/index-browser.js +1 -0
  6. package/dist/database/api/.generated/index.d.ts +58 -1
  7. package/dist/database/api/.generated/index.js +4 -3
  8. package/dist/database/api/.generated/package.json +1 -1
  9. package/dist/database/api/.generated/schema.prisma +1 -0
  10. package/dist/database/api/.generated/wasm.js +1 -0
  11. package/dist/src/eden/index.d.ts +568 -18
  12. package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.js +4 -2
  13. package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.js +4 -2
  14. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.js +4 -2
  15. package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.d.ts +0 -1
  16. package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.js +0 -8
  17. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +1 -1
  18. package/dist/src/index.d.ts +190 -6
  19. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +29 -1
  20. package/dist/src/modules/v4/campaign/campaign.model.d.ts +2 -0
  21. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +4 -0
  22. package/dist/src/modules/v4/campaign/campaign.service.d.ts +37 -3
  23. package/dist/src/modules/v4/campaign/campaign.service.js +4 -2
  24. package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +52 -2
  25. package/dist/src/modules/v4/dynamicData/dynamicData.service.js +7 -7
  26. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +96 -3
  27. package/dist/src/modules/v4/opportunity/opportunity.controller.js +2 -0
  28. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +10 -0
  29. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +39 -1
  30. package/dist/src/modules/v4/opportunity/opportunity.repository.js +1 -1
  31. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +135 -10
  32. package/dist/src/modules/v4/opportunity/opportunity.service.js +1 -1
  33. package/dist/src/modules/v4/reward/reward.model.d.ts +4 -0
  34. package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -0
  35. package/dist/src/modules/v4/reward/reward.service.d.ts +14 -0
  36. package/dist/src/modules/v4/router.d.ts +190 -6
  37. package/dist/src/modules/v4/token/token.controller.d.ts +9 -0
  38. package/dist/src/modules/v4/token/token.model.d.ts +3 -0
  39. package/dist/src/modules/v4/token/token.model.js +3 -0
  40. package/dist/src/modules/v4/token/token.repository.d.ts +4 -0
  41. package/dist/src/modules/v4/token/token.service.d.ts +13 -0
  42. package/dist/src/modules/v4/token/token.service.js +1 -0
  43. package/dist/src/modules/v4/user/user.controller.d.ts +4 -0
  44. package/dist/src/utils/parseDistributionType.d.ts +1 -0
  45. package/dist/src/utils/parseDistributionType.js +16 -0
  46. package/dist/tsconfig.package.tsbuildinfo +1 -1
  47. package/package.json +1 -1
@@ -411,6 +411,7 @@ export declare abstract class CampaignRepository {
411
411
  verified: boolean;
412
412
  isTest: boolean;
413
413
  isPoint: boolean;
414
+ isPreTGE: boolean;
414
415
  isNative: boolean;
415
416
  price: number | null;
416
417
  };
@@ -536,6 +537,7 @@ export declare abstract class CampaignRepository {
536
537
  verified: boolean;
537
538
  isTest: boolean;
538
539
  isPoint: boolean;
540
+ isPreTGE: boolean;
539
541
  isNative: boolean;
540
542
  price: number | null;
541
543
  };
@@ -593,6 +595,7 @@ export declare abstract class CampaignRepository {
593
595
  verified: boolean;
594
596
  isTest: boolean;
595
597
  isPoint: boolean;
598
+ isPreTGE: boolean;
596
599
  isNative: boolean;
597
600
  price: number | null;
598
601
  };
@@ -677,6 +680,7 @@ export declare abstract class CampaignRepository {
677
680
  verified: boolean;
678
681
  isTest: boolean;
679
682
  isPoint: boolean;
683
+ isPreTGE: boolean;
680
684
  isNative: boolean;
681
685
  price: number | null;
682
686
  };
@@ -103,6 +103,7 @@ export declare abstract class CampaignService {
103
103
  verified: boolean;
104
104
  isTest: boolean;
105
105
  isPoint: boolean;
106
+ isPreTGE: boolean;
106
107
  isNative: boolean;
107
108
  price: number | null;
108
109
  };
@@ -147,7 +148,32 @@ export declare abstract class CampaignService {
147
148
  computeChainId?: number;
148
149
  type?: string;
149
150
  }): Promise<number>;
150
- static create(body: Omit<CreateCampaignModel, "id">, dryRun?: boolean): Promise<{
151
+ static create(body: Omit<CreateCampaignModel, "id">, dryRun?: boolean): Promise<({
152
+ Tokens: {
153
+ symbol: string;
154
+ id: string;
155
+ name: string | null;
156
+ icon: string;
157
+ address: string;
158
+ chainId: number;
159
+ decimals: number;
160
+ displaySymbol: string;
161
+ verified: boolean;
162
+ isTest: boolean;
163
+ isPoint: boolean;
164
+ isPreTGE: boolean;
165
+ isNative: boolean;
166
+ price: number | null;
167
+ }[];
168
+ Protocols: {
169
+ id: string;
170
+ name: string;
171
+ url: string;
172
+ description: string;
173
+ tags: string[];
174
+ icon: string;
175
+ }[];
176
+ } & {
151
177
  id: string;
152
178
  name: string;
153
179
  type: string;
@@ -164,7 +190,7 @@ export declare abstract class CampaignService {
164
190
  apr: number;
165
191
  dailyRewards: number;
166
192
  lastCampaignCreatedAt: Date;
167
- } | {
193
+ }) | {
168
194
  id: string;
169
195
  chainId: number;
170
196
  type: string;
@@ -183,6 +209,7 @@ export declare abstract class CampaignService {
183
209
  verified: boolean;
184
210
  isTest: boolean;
185
211
  isPoint: boolean;
212
+ isPreTGE: boolean;
186
213
  isNative: boolean;
187
214
  } & {
188
215
  price?: number | null | undefined;
@@ -191,7 +218,7 @@ export declare abstract class CampaignService {
191
218
  depositUrl: string | undefined;
192
219
  explorerAddress: string | undefined;
193
220
  tags: string[];
194
- } | null | undefined>;
221
+ } | undefined>;
195
222
  /**
196
223
  * @dev back-office function
197
224
  * @dev deprecated should be replaced with a manual override
@@ -247,6 +274,7 @@ export declare abstract class CampaignService {
247
274
  verified: boolean;
248
275
  isTest: boolean;
249
276
  isPoint: boolean;
277
+ isPreTGE: boolean;
250
278
  isNative: boolean;
251
279
  } & {
252
280
  price?: number | null | undefined;
@@ -320,6 +348,7 @@ export declare abstract class CampaignService {
320
348
  verified: boolean;
321
349
  isTest: boolean;
322
350
  isPoint: boolean;
351
+ isPreTGE: boolean;
323
352
  isNative: boolean;
324
353
  } & {
325
354
  price?: number | null | undefined;
@@ -394,6 +423,7 @@ export declare abstract class CampaignService {
394
423
  verified: boolean;
395
424
  isTest: boolean;
396
425
  isPoint: boolean;
426
+ isPreTGE: boolean;
397
427
  isNative: boolean;
398
428
  } & {
399
429
  price?: number | null | undefined;
@@ -468,6 +498,7 @@ export declare abstract class CampaignService {
468
498
  verified: boolean;
469
499
  isTest: boolean;
470
500
  isPoint: boolean;
501
+ isPreTGE: boolean;
471
502
  isNative: boolean;
472
503
  } & {
473
504
  price?: number | null | undefined;
@@ -554,6 +585,7 @@ export declare abstract class CampaignService {
554
585
  verified: boolean;
555
586
  isTest: boolean;
556
587
  isPoint: boolean;
588
+ isPreTGE: boolean;
557
589
  isNative: boolean;
558
590
  price: number | null;
559
591
  };
@@ -611,6 +643,7 @@ export declare abstract class CampaignService {
611
643
  verified: boolean;
612
644
  isTest: boolean;
613
645
  isPoint: boolean;
646
+ isPreTGE: boolean;
614
647
  isNative: boolean;
615
648
  price: number | null;
616
649
  };
@@ -749,6 +782,7 @@ export declare abstract class CampaignService {
749
782
  verified: boolean;
750
783
  isTest: boolean;
751
784
  isPoint: boolean;
785
+ isPreTGE: boolean;
752
786
  isNative: boolean;
753
787
  } & {
754
788
  price?: number | null | undefined;
@@ -4,6 +4,7 @@ import { StatusService } from "@/modules/v4/status/status.service";
4
4
  import { TokenService } from "@/modules/v4/token/token.service";
5
5
  import { CannotParseOpportunity, InvalidParameter } from "@/utils/error";
6
6
  import { log } from "@/utils/logger";
7
+ import { parseDistributionType } from "@/utils/parseDistributionType";
7
8
  import { Campaign as CampaignType, NETWORK_LABELS, } from "@sdk";
8
9
  import { utils } from "ethers";
9
10
  import moment from "moment";
@@ -42,6 +43,7 @@ export class CampaignService {
42
43
  throw new Error(`unable to fetch data for token ${body.rewardTokenAddress}`);
43
44
  }
44
45
  const chain = await ChainService.findUniqueOrThrow(body.chainId);
46
+ const params = JSON.parse(body.params);
45
47
  const campaign = {
46
48
  distributionChainId: body.chainId,
47
49
  computeChainId: body.computeChainId,
@@ -50,12 +52,12 @@ export class CampaignService {
50
52
  type: campaignType,
51
53
  subType: body.subType ?? null,
52
54
  rewardToken,
53
- params: JSON.parse(body.params),
55
+ params,
54
56
  endTimestamp: Number(body.endTimestamp),
55
57
  startTimestamp: Number(body.startTimestamp),
58
+ distributionType: parseDistributionType(params),
56
59
  amount: body.amount,
57
60
  creatorAddress: body.creator,
58
- distributionType: "DUTCH_AUCTION",
59
61
  createdAt: new Date().toISOString(),
60
62
  chain,
61
63
  };
@@ -149,6 +149,30 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
149
149
  };
150
150
  response: {
151
151
  200: {
152
+ Tokens: {
153
+ symbol: string;
154
+ id: string;
155
+ name: string | null;
156
+ icon: string;
157
+ address: string;
158
+ chainId: number;
159
+ decimals: number;
160
+ displaySymbol: string;
161
+ verified: boolean;
162
+ isTest: boolean;
163
+ isPoint: boolean;
164
+ isPreTGE: boolean;
165
+ isNative: boolean;
166
+ price: number | null;
167
+ }[];
168
+ Protocols: {
169
+ id: string;
170
+ name: string;
171
+ url: string;
172
+ description: string;
173
+ tags: string[];
174
+ icon: string;
175
+ }[];
152
176
  id: string;
153
177
  name: string;
154
178
  type: string;
@@ -184,6 +208,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
184
208
  verified: boolean;
185
209
  isTest: boolean;
186
210
  isPoint: boolean;
211
+ isPreTGE: boolean;
187
212
  isNative: boolean;
188
213
  } & {
189
214
  price?: number | null | undefined;
@@ -192,7 +217,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
192
217
  depositUrl: string | undefined;
193
218
  explorerAddress: string | undefined;
194
219
  tags: string[];
195
- } | null | undefined;
220
+ } | undefined;
196
221
  };
197
222
  };
198
223
  };
@@ -212,6 +237,30 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
212
237
  };
213
238
  response: {
214
239
  200: {
240
+ Tokens: {
241
+ symbol: string;
242
+ id: string;
243
+ name: string | null;
244
+ icon: string;
245
+ address: string;
246
+ chainId: number;
247
+ decimals: number;
248
+ displaySymbol: string;
249
+ verified: boolean;
250
+ isTest: boolean;
251
+ isPoint: boolean;
252
+ isPreTGE: boolean;
253
+ isNative: boolean;
254
+ price: number | null;
255
+ }[];
256
+ Protocols: {
257
+ id: string;
258
+ name: string;
259
+ url: string;
260
+ description: string;
261
+ tags: string[];
262
+ icon: string;
263
+ }[];
215
264
  id: string;
216
265
  name: string;
217
266
  type: string;
@@ -247,6 +296,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
247
296
  verified: boolean;
248
297
  isTest: boolean;
249
298
  isPoint: boolean;
299
+ isPreTGE: boolean;
250
300
  isNative: boolean;
251
301
  } & {
252
302
  price?: number | null | undefined;
@@ -255,7 +305,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
255
305
  depositUrl: string | undefined;
256
306
  explorerAddress: string | undefined;
257
307
  tags: string[];
258
- } | null | undefined;
308
+ } | undefined;
259
309
  };
260
310
  };
261
311
  };
@@ -1,5 +1,4 @@
1
1
  import { dynamicDataBuilderFactory } from "@/engine/deprecated/dynamicData/factory";
2
- import { hasFixedAprConfig } from "@/engine/deprecated/dynamicData/utils/getFixedApr";
3
2
  import { campaignTVLBuilderFactory } from "@/engine/tvl/factory";
4
3
  import { HttpError } from "@/errors";
5
4
  import { InvalidParameter } from "@/errors/InvalidParameter.error";
@@ -9,7 +8,8 @@ import { RewardService } from "@/modules/v4/reward/reward.service";
9
8
  import { TvlService } from "@/modules/v4/tvl/tvl.service";
10
9
  import bigintToString from "@/utils/bigintToString";
11
10
  import { log } from "@/utils/logger";
12
- import { AprType } from "@db/api";
11
+ import { parseDistributionType } from "@/utils/parseDistributionType";
12
+ import { AprType, DistributionType } from "@db/api";
13
13
  import { Campaign as CampaignType, DAY, NETWORK_LABELS, bigIntToNumber, } from "@sdk";
14
14
  import moment from "moment";
15
15
  import { AprService } from "../apr";
@@ -95,17 +95,17 @@ export class DynamicDataService {
95
95
  }
96
96
  let campaignDailyValue = await TokenService.getValueByTokenId(TokenService.hashId({ address: rewardTokenAddress, chainId: record.campaign.chainId }), dailyAmount);
97
97
  // Fixed APR campaigns
98
- if (hasFixedAprConfig(campaignParameters)) {
98
+ const distributionType = parseDistributionType(campaignParameters);
99
+ if (distributionType !== DistributionType.DUTCH_AUCTION) {
99
100
  log.local(`[${NETWORK_LABELS[chainId]}][${CampaignType[type]}] calculating fixed APR for ${record.campaign.campaignId}`);
100
- const { targetTokenPricing, rewardTokenPricing, apr: fixedApr } = campaignParameters;
101
+ const { apr: fixedApr } = campaignParameters;
101
102
  const targetApr = Number(fixedApr);
102
- if (targetTokenPricing && rewardTokenPricing) {
103
+ if (distributionType === DistributionType.FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE) {
103
104
  // Case 1: Fixed $ amount of reward per $ of liquidity
104
105
  campaignDailyValue = targetApr * tvl.total;
105
106
  dailyAmount = BigInt((campaignDailyValue / (rewardToken.price ?? 1)) * 10 ** rewardToken.decimals);
106
107
  }
107
- if (targetTokenPricing && !rewardTokenPricing) {
108
- // Case 2: Fixed # amount of reward per $ of liquidity
108
+ if (distributionType === DistributionType.FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE) {
109
109
  // Return 0 if reward token price is invalid
110
110
  // targetApr represents a yearly # amount of reward per $ of liquidity
111
111
  dailyAmount =
@@ -39,6 +39,30 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
39
39
  };
40
40
  response: {
41
41
  200: {
42
+ Tokens: {
43
+ symbol: string;
44
+ id: string;
45
+ name: string | null;
46
+ icon: string;
47
+ address: string;
48
+ chainId: number;
49
+ decimals: number;
50
+ displaySymbol: string;
51
+ verified: boolean;
52
+ isTest: boolean;
53
+ isPoint: boolean;
54
+ isPreTGE: boolean;
55
+ isNative: boolean;
56
+ price: number | null;
57
+ }[];
58
+ Protocols: {
59
+ id: string;
60
+ name: string;
61
+ url: string;
62
+ description: string;
63
+ tags: string[];
64
+ icon: string;
65
+ }[];
42
66
  id: string;
43
67
  name: string;
44
68
  type: string;
@@ -55,7 +79,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
55
79
  apr: number;
56
80
  dailyRewards: number;
57
81
  lastCampaignCreatedAt: Date;
58
- } | null;
82
+ };
59
83
  };
60
84
  };
61
85
  };
@@ -117,6 +141,30 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
117
141
  };
118
142
  response: {
119
143
  200: {
144
+ Tokens: {
145
+ symbol: string;
146
+ id: string;
147
+ name: string | null;
148
+ icon: string;
149
+ address: string;
150
+ chainId: number;
151
+ decimals: number;
152
+ displaySymbol: string;
153
+ verified: boolean;
154
+ isTest: boolean;
155
+ isPoint: boolean;
156
+ isPreTGE: boolean;
157
+ isNative: boolean;
158
+ price: number | null;
159
+ }[];
160
+ Protocols: {
161
+ id: string;
162
+ name: string;
163
+ url: string;
164
+ description: string;
165
+ tags: string[];
166
+ icon: string;
167
+ }[];
120
168
  id: string;
121
169
  name: string;
122
170
  type: string;
@@ -152,6 +200,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
152
200
  verified: boolean;
153
201
  isTest: boolean;
154
202
  isPoint: boolean;
203
+ isPreTGE: boolean;
155
204
  isNative: boolean;
156
205
  } & {
157
206
  price?: number | null | undefined;
@@ -160,7 +209,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
160
209
  depositUrl: string | undefined;
161
210
  explorerAddress: string | undefined;
162
211
  tags: string[];
163
- } | null;
212
+ };
164
213
  };
165
214
  };
166
215
  };
@@ -181,6 +230,30 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
181
230
  };
182
231
  response: {
183
232
  200: {
233
+ Tokens: {
234
+ symbol: string;
235
+ id: string;
236
+ name: string | null;
237
+ icon: string;
238
+ address: string;
239
+ chainId: number;
240
+ decimals: number;
241
+ displaySymbol: string;
242
+ verified: boolean;
243
+ isTest: boolean;
244
+ isPoint: boolean;
245
+ isPreTGE: boolean;
246
+ isNative: boolean;
247
+ price: number | null;
248
+ }[];
249
+ Protocols: {
250
+ id: string;
251
+ name: string;
252
+ url: string;
253
+ description: string;
254
+ tags: string[];
255
+ icon: string;
256
+ }[];
184
257
  id: string;
185
258
  name: string;
186
259
  type: string;
@@ -216,6 +289,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
216
289
  verified: boolean;
217
290
  isTest: boolean;
218
291
  isPoint: boolean;
292
+ isPreTGE: boolean;
219
293
  isNative: boolean;
220
294
  } & {
221
295
  price?: number | null | undefined;
@@ -224,7 +298,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
224
298
  depositUrl: string | undefined;
225
299
  explorerAddress: string | undefined;
226
300
  tags: string[];
227
- } | null;
301
+ };
228
302
  };
229
303
  };
230
304
  };
@@ -306,6 +380,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
306
380
  verified: boolean;
307
381
  isTest: boolean;
308
382
  isPoint: boolean;
383
+ isPreTGE: boolean;
309
384
  isNative: boolean;
310
385
  price: number | null;
311
386
  };
@@ -333,6 +408,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
333
408
  verified: boolean;
334
409
  isTest: boolean;
335
410
  isPoint: boolean;
411
+ isPreTGE: boolean;
336
412
  isNative: boolean;
337
413
  } & {
338
414
  price?: number | null | undefined;
@@ -401,6 +477,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
401
477
  verified: boolean;
402
478
  isTest: boolean;
403
479
  isPoint: boolean;
480
+ isPreTGE: boolean;
404
481
  isNative: boolean;
405
482
  } & {
406
483
  price?: number | null | undefined;
@@ -533,6 +610,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
533
610
  decimals: number;
534
611
  verified: boolean;
535
612
  isTest: boolean;
613
+ isPoint: boolean;
614
+ isPreTGE: boolean;
536
615
  };
537
616
  value: number;
538
617
  campaignId: string;
@@ -555,6 +634,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
555
634
  decimals: number;
556
635
  verified: boolean;
557
636
  isTest: boolean;
637
+ isPoint: boolean;
638
+ isPreTGE: boolean;
558
639
  }[];
559
640
  tags: string[];
560
641
  identifier: string;
@@ -666,6 +747,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
666
747
  decimals: number;
667
748
  verified: boolean;
668
749
  isTest: boolean;
750
+ isPoint: boolean;
751
+ isPreTGE: boolean;
669
752
  };
670
753
  value: number;
671
754
  campaignId: string;
@@ -688,6 +771,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
688
771
  decimals: number;
689
772
  verified: boolean;
690
773
  isTest: boolean;
774
+ isPoint: boolean;
775
+ isPreTGE: boolean;
691
776
  }[];
692
777
  tags: string[];
693
778
  identifier: string;
@@ -751,6 +836,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
751
836
  decimals: number;
752
837
  verified: boolean;
753
838
  isTest: boolean;
839
+ isPoint: boolean;
840
+ isPreTGE: boolean;
754
841
  };
755
842
  }[];
756
843
  }[];
@@ -833,6 +920,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
833
920
  decimals: number;
834
921
  verified: boolean;
835
922
  isTest: boolean;
923
+ isPoint: boolean;
924
+ isPreTGE: boolean;
836
925
  };
837
926
  value: number;
838
927
  campaignId: string;
@@ -855,6 +944,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
855
944
  decimals: number;
856
945
  verified: boolean;
857
946
  isTest: boolean;
947
+ isPoint: boolean;
948
+ isPreTGE: boolean;
858
949
  }[];
859
950
  tags: string[];
860
951
  identifier: string;
@@ -918,6 +1009,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
918
1009
  decimals: number;
919
1010
  verified: boolean;
920
1011
  isTest: boolean;
1012
+ isPoint: boolean;
1013
+ isPreTGE: boolean;
921
1014
  };
922
1015
  }[];
923
1016
  };
@@ -1,6 +1,7 @@
1
1
  import { HttpErrorDto, NotFoundError, NotFoundErrorDto } from "@/errors";
2
2
  import { BackOfficeGuard } from "@/guards/BackOffice.guard";
3
3
  import { AuthorizationHeadersDto, TokenAuthGuard } from "@/guards/TokenAuth.guard";
4
+ import { log } from "@/utils/logger";
4
5
  import { ChainId } from "@sdk";
5
6
  import Elysia, { t } from "elysia";
6
7
  import { GetCampaignQueryDto } from "../campaign";
@@ -49,6 +50,7 @@ export const OpportunityController = new Elysia({
49
50
  }));
50
51
  }
51
52
  catch (err) {
53
+ log.error("error recreating opportunity", err);
52
54
  if (err.code && err.code === "P2025")
53
55
  throw new NotFoundError();
54
56
  throw err;
@@ -61,6 +61,8 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
61
61
  icon: import("@sinclair/typebox").TString;
62
62
  verified: import("@sinclair/typebox").TBoolean;
63
63
  isTest: import("@sinclair/typebox").TBoolean;
64
+ isPoint: import("@sinclair/typebox").TBoolean;
65
+ isPreTGE: import("@sinclair/typebox").TBoolean;
64
66
  price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
65
67
  symbol: import("@sinclair/typebox").TString;
66
68
  }>>;
@@ -116,6 +118,8 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
116
118
  icon: import("@sinclair/typebox").TString;
117
119
  verified: import("@sinclair/typebox").TBoolean;
118
120
  isTest: import("@sinclair/typebox").TBoolean;
121
+ isPoint: import("@sinclair/typebox").TBoolean;
122
+ isPreTGE: import("@sinclair/typebox").TBoolean;
119
123
  price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
120
124
  symbol: import("@sinclair/typebox").TString;
121
125
  }>;
@@ -154,6 +158,8 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
154
158
  icon: import("@sinclair/typebox").TString;
155
159
  verified: import("@sinclair/typebox").TBoolean;
156
160
  isTest: import("@sinclair/typebox").TBoolean;
161
+ isPoint: import("@sinclair/typebox").TBoolean;
162
+ isPreTGE: import("@sinclair/typebox").TBoolean;
157
163
  price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
158
164
  symbol: import("@sinclair/typebox").TString;
159
165
  }>>;
@@ -226,6 +232,8 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
226
232
  icon: import("@sinclair/typebox").TString;
227
233
  verified: import("@sinclair/typebox").TBoolean;
228
234
  isTest: import("@sinclair/typebox").TBoolean;
235
+ isPoint: import("@sinclair/typebox").TBoolean;
236
+ isPreTGE: import("@sinclair/typebox").TBoolean;
229
237
  price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
230
238
  symbol: import("@sinclair/typebox").TString;
231
239
  }>;
@@ -265,6 +273,8 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
265
273
  icon: import("@sinclair/typebox").TString;
266
274
  verified: import("@sinclair/typebox").TBoolean;
267
275
  isTest: import("@sinclair/typebox").TBoolean;
276
+ isPoint: import("@sinclair/typebox").TBoolean;
277
+ isPreTGE: import("@sinclair/typebox").TBoolean;
268
278
  price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
269
279
  symbol: import("@sinclair/typebox").TString;
270
280
  }>;