@merkl/api 1.0.47 → 1.0.49
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.
- package/dist/src/eden/index.d.ts +4 -604
- package/dist/src/engine/implementations/Ajna/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Ambient/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Badger/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Clamm/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Compound/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/CompoundV3/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Default/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Dolomite/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/EigenLayer/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Encompassing/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/bunni/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/bunni/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gamma/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/mimswap/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc721/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/EventBased/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/FraxLend/metadataBorrow.d.ts +2 -2
- package/dist/src/engine/implementations/FraxLend/metadataCollateral.d.ts +1 -1
- package/dist/src/engine/implementations/Hyperdrive/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Ion/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Locker/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Morpho/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/MultiLog/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Radiant/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Silo/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/UniswapV4/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Vest/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/morphoBorrow/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/morphoCollateral/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/morphoSupply/metadata.d.ts +1 -1
- package/dist/src/index.d.ts +2 -307
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +0 -55
- package/dist/src/modules/v4/campaign/campaign.convertor.d.ts +6 -0
- package/dist/src/modules/v4/campaign/campaign.formatter.d.ts +6 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +11 -9
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +32 -31
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +18 -702
- package/dist/src/modules/v4/creator/creator.controller.d.ts +2 -162
- package/dist/src/modules/v4/creator/creator.service.d.ts +2 -162
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +0 -90
- package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +2 -6
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +174 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +15 -5
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +2 -4
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +14 -460
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +125 -1
- package/dist/src/modules/v4/reward/reward.service.d.ts +8 -88
- package/dist/src/modules/v4/router.d.ts +2 -307
- package/dist/src/modules/v4/status/status.model.d.ts +0 -1
- package/dist/src/modules/v4/status/status.service.d.ts +2 -2
- package/dist/src/utils/prices/services/coinGeckoService.d.ts +1 -1
- package/dist/src/utils/prices/services/defillamaService.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1,16 +1,12 @@
|
|
1
1
|
import { type CampaignParameters, Campaign as CampaignType, type ChainId } from "@angleprotocol/sdk/ts";
|
2
2
|
import type { CampaignManualOverride } from "@package/databases/api";
|
3
|
-
import type { CampaignConfigMinimalModel, CampaignUnique, CampaignWithParams, CreateCampaignModel,
|
3
|
+
import type { CampaignConfigMinimalModel, CampaignUnique, CampaignWithParams, CreateCampaignModel, FindCampaignModel, TransactionModel, UpdateCampaignCreatorModel, UpdateCampaignModel, findCampaignWithStatusModel } from "../../../modules/v4/campaign/campaign.model";
|
4
4
|
import type { GetCampaignComputedValueModel } from "../computedValue/computedValue.model";
|
5
|
-
import {
|
5
|
+
import { CampaignFormatter } from "./campaign.formatter";
|
6
6
|
export declare abstract class CampaignService {
|
7
7
|
static hashId(campaign: CampaignUnique): string;
|
8
8
|
static splitIdOrThrow(chainAndCampaignId: `${number}-${string}` | string): CampaignUnique;
|
9
|
-
static getPastCampaigns(query?: {
|
10
|
-
computeChainId?: number;
|
11
|
-
type?: string;
|
12
|
-
creatorAddress?: string;
|
13
|
-
}): Promise<({
|
9
|
+
static getPastCampaigns(query?: findCampaignWithStatusModel): Promise<({
|
14
10
|
Opportunity: {
|
15
11
|
name: string;
|
16
12
|
apr: number;
|
@@ -52,11 +48,7 @@ export declare abstract class CampaignService {
|
|
52
48
|
rootCampaignId: string | null;
|
53
49
|
parentCampaignId: string | null;
|
54
50
|
})[]>;
|
55
|
-
static getFutureCampaigns(query?: {
|
56
|
-
computeChainId?: number;
|
57
|
-
type?: string;
|
58
|
-
creatorAddress?: string;
|
59
|
-
}): Promise<({
|
51
|
+
static getFutureCampaigns(query?: findCampaignWithStatusModel): Promise<({
|
60
52
|
Opportunity: {
|
61
53
|
name: string;
|
62
54
|
apr: number;
|
@@ -98,12 +90,7 @@ export declare abstract class CampaignService {
|
|
98
90
|
rootCampaignId: string | null;
|
99
91
|
parentCampaignId: string | null;
|
100
92
|
})[]>;
|
101
|
-
static getLiveCampaigns(query?: {
|
102
|
-
distributionChainId?: number;
|
103
|
-
computeChainId?: number;
|
104
|
-
type?: string;
|
105
|
-
creatorAddress?: string;
|
106
|
-
}): Promise<({
|
93
|
+
static getLiveCampaigns(query?: findCampaignWithStatusModel): Promise<({
|
107
94
|
RewardToken: {
|
108
95
|
symbol: string;
|
109
96
|
name: string | null;
|
@@ -183,11 +170,7 @@ export declare abstract class CampaignService {
|
|
183
170
|
rootCampaignId: string | null;
|
184
171
|
parentCampaignId: string | null;
|
185
172
|
})[]>;
|
186
|
-
static countLives(query?:
|
187
|
-
distributionChainId?: number;
|
188
|
-
computeChainId?: number;
|
189
|
-
type?: string;
|
190
|
-
}): Promise<number>;
|
173
|
+
static countLives(query?: findCampaignWithStatusModel): Promise<number>;
|
191
174
|
static create(body: Omit<CreateCampaignModel, "id">, dryRun?: boolean): Promise<{
|
192
175
|
campaignId: string;
|
193
176
|
description: string | null;
|
@@ -286,31 +269,6 @@ export declare abstract class CampaignService {
|
|
286
269
|
lastCampaignCreatedAt: Date;
|
287
270
|
}) | undefined>;
|
288
271
|
static getCampaignIdsFromCreationTxHash(query: TransactionModel): Promise<string[]>;
|
289
|
-
/**
|
290
|
-
* @dev back-office function
|
291
|
-
* @dev deprecated should be replaced with a manual override
|
292
|
-
*/
|
293
|
-
static updateMetaData(campaign: Omit<UpdateMetaDataCampaignModel, "id">): Promise<{
|
294
|
-
campaignId: string;
|
295
|
-
description: string | null;
|
296
|
-
id: string;
|
297
|
-
params: import("@prisma/client/runtime/library").JsonValue;
|
298
|
-
amount: string;
|
299
|
-
startTimestamp: bigint;
|
300
|
-
type: string;
|
301
|
-
computeChainId: number;
|
302
|
-
distributionChainId: number;
|
303
|
-
endTimestamp: bigint;
|
304
|
-
opportunityId: string;
|
305
|
-
creatorAddress: string;
|
306
|
-
distributionType: import("@package/databases").DistributionType;
|
307
|
-
subType: number | null;
|
308
|
-
rewardTokenId: string;
|
309
|
-
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
310
|
-
createdAt: Date;
|
311
|
-
rootCampaignId: string | null;
|
312
|
-
parentCampaignId: string | null;
|
313
|
-
}>;
|
314
272
|
/**
|
315
273
|
* @dev back-office function for manual overrides
|
316
274
|
*/
|
@@ -319,570 +277,19 @@ export declare abstract class CampaignService {
|
|
319
277
|
* @dev back-office function
|
320
278
|
*/
|
321
279
|
static moveToOpportunity(data: Omit<UpdateCampaignModel, "id">, upsert?: boolean): Promise<string>;
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
static
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
icon: string;
|
333
|
-
};
|
334
|
-
endTimestamp: number;
|
335
|
-
startTimestamp: number;
|
336
|
-
rewardToken: {
|
337
|
-
symbol: string;
|
338
|
-
name: string | null;
|
339
|
-
decimals: number;
|
340
|
-
address: string;
|
341
|
-
id: string;
|
342
|
-
chainId: number;
|
343
|
-
icon: string;
|
344
|
-
isNative: boolean;
|
345
|
-
isPoint: boolean;
|
346
|
-
isPreTGE: boolean;
|
347
|
-
isTest: boolean;
|
348
|
-
verified: boolean;
|
349
|
-
} & {
|
350
|
-
price?: number | null | undefined;
|
351
|
-
isTokenWrapper?: boolean | undefined;
|
352
|
-
tokenWrapperAddress?: string | undefined;
|
353
|
-
};
|
354
|
-
distributionChain: {
|
355
|
-
name: string;
|
356
|
-
id: number;
|
357
|
-
icon: string;
|
358
|
-
} | undefined;
|
359
|
-
campaignStatus: {
|
360
|
-
computedUntil: number;
|
361
|
-
processingStarted: number;
|
362
|
-
campaignId: string;
|
363
|
-
error: string;
|
364
|
-
status: import("@package/databases").RunStatus;
|
365
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
366
|
-
} | undefined;
|
367
|
-
creatorAddress: string;
|
368
|
-
creator: {
|
369
|
-
address: string;
|
370
|
-
tags: string[];
|
371
|
-
creatorId: string | null;
|
372
|
-
};
|
373
|
-
createdAt: string;
|
374
|
-
description: string | undefined;
|
375
|
-
parentCampaignId: string | undefined;
|
376
|
-
rootCampaignId: string | undefined;
|
377
|
-
Opportunity: {
|
378
|
-
name: string;
|
379
|
-
apr: number;
|
380
|
-
tvl: number;
|
381
|
-
description: string;
|
382
|
-
id: string;
|
383
|
-
status: import("@package/databases").Status;
|
384
|
-
chainId: number;
|
385
|
-
action: import("@package/databases").OpportunityAction;
|
386
|
-
type: string;
|
387
|
-
depositUrl: string | null;
|
388
|
-
explorerAddress: string | null;
|
389
|
-
howToSteps: string[];
|
390
|
-
mainProtocolId: string | null;
|
391
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
392
|
-
identifier: string;
|
393
|
-
dailyRewards: number;
|
394
|
-
tags: string[];
|
395
|
-
lastCampaignCreatedAt: Date;
|
396
|
-
};
|
397
|
-
campaignId: string;
|
398
|
-
id: string;
|
399
|
-
amount: string;
|
400
|
-
type: string;
|
401
|
-
computeChainId: number;
|
402
|
-
distributionChainId: number;
|
403
|
-
opportunityId: string;
|
404
|
-
distributionType: import("@package/databases").DistributionType;
|
405
|
-
subType: number | null;
|
406
|
-
rewardTokenId: string;
|
407
|
-
}[]>;
|
408
|
-
static findFirst(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<{
|
409
|
-
params: any;
|
410
|
-
chain: {
|
411
|
-
name: string;
|
412
|
-
id: number;
|
413
|
-
icon: string;
|
414
|
-
};
|
415
|
-
endTimestamp: number;
|
416
|
-
startTimestamp: number;
|
417
|
-
rewardToken: {
|
418
|
-
symbol: string;
|
419
|
-
name: string | null;
|
420
|
-
decimals: number;
|
421
|
-
address: string;
|
422
|
-
id: string;
|
423
|
-
chainId: number;
|
424
|
-
icon: string;
|
425
|
-
isNative: boolean;
|
426
|
-
isPoint: boolean;
|
427
|
-
isPreTGE: boolean;
|
428
|
-
isTest: boolean;
|
429
|
-
verified: boolean;
|
430
|
-
} & {
|
431
|
-
price?: number | null | undefined;
|
432
|
-
isTokenWrapper?: boolean | undefined;
|
433
|
-
tokenWrapperAddress?: string | undefined;
|
434
|
-
};
|
435
|
-
distributionChain: {
|
436
|
-
name: string;
|
437
|
-
id: number;
|
438
|
-
icon: string;
|
439
|
-
} | undefined;
|
440
|
-
campaignStatus: {
|
441
|
-
computedUntil: number;
|
442
|
-
processingStarted: number;
|
443
|
-
campaignId: string;
|
444
|
-
error: string;
|
445
|
-
status: import("@package/databases").RunStatus;
|
446
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
447
|
-
} | undefined;
|
448
|
-
creatorAddress: string;
|
449
|
-
creator: {
|
450
|
-
address: string;
|
451
|
-
tags: string[];
|
452
|
-
creatorId: string | null;
|
453
|
-
};
|
454
|
-
createdAt: string;
|
455
|
-
description: string | undefined;
|
456
|
-
parentCampaignId: string | undefined;
|
457
|
-
rootCampaignId: string | undefined;
|
458
|
-
Opportunity: {
|
459
|
-
name: string;
|
460
|
-
apr: number;
|
461
|
-
tvl: number;
|
462
|
-
description: string;
|
463
|
-
id: string;
|
464
|
-
status: import("@package/databases").Status;
|
465
|
-
chainId: number;
|
466
|
-
action: import("@package/databases").OpportunityAction;
|
467
|
-
type: string;
|
468
|
-
depositUrl: string | null;
|
469
|
-
explorerAddress: string | null;
|
470
|
-
howToSteps: string[];
|
471
|
-
mainProtocolId: string | null;
|
472
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
473
|
-
identifier: string;
|
474
|
-
dailyRewards: number;
|
475
|
-
tags: string[];
|
476
|
-
lastCampaignCreatedAt: Date;
|
477
|
-
};
|
478
|
-
campaignId: string;
|
479
|
-
id: string;
|
480
|
-
amount: string;
|
481
|
-
type: string;
|
482
|
-
computeChainId: number;
|
483
|
-
distributionChainId: number;
|
484
|
-
opportunityId: string;
|
485
|
-
distributionType: import("@package/databases").DistributionType;
|
486
|
-
subType: number | null;
|
487
|
-
rewardTokenId: string;
|
488
|
-
} | null>;
|
489
|
-
static findAndGroupByChains(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<Map<number, {
|
490
|
-
params: any;
|
491
|
-
chain: {
|
492
|
-
name: string;
|
493
|
-
id: number;
|
494
|
-
icon: string;
|
495
|
-
};
|
496
|
-
endTimestamp: number;
|
497
|
-
startTimestamp: number;
|
498
|
-
rewardToken: {
|
499
|
-
symbol: string;
|
500
|
-
name: string | null;
|
501
|
-
decimals: number;
|
502
|
-
address: string;
|
503
|
-
id: string;
|
504
|
-
chainId: number;
|
505
|
-
icon: string;
|
506
|
-
isNative: boolean;
|
507
|
-
isPoint: boolean;
|
508
|
-
isPreTGE: boolean;
|
509
|
-
isTest: boolean;
|
510
|
-
verified: boolean;
|
511
|
-
} & {
|
512
|
-
price?: number | null | undefined;
|
513
|
-
isTokenWrapper?: boolean | undefined;
|
514
|
-
tokenWrapperAddress?: string | undefined;
|
515
|
-
};
|
516
|
-
distributionChain: {
|
517
|
-
name: string;
|
518
|
-
id: number;
|
519
|
-
icon: string;
|
520
|
-
} | undefined;
|
521
|
-
campaignStatus: {
|
522
|
-
computedUntil: number;
|
523
|
-
processingStarted: number;
|
524
|
-
campaignId: string;
|
525
|
-
error: string;
|
526
|
-
status: import("@package/databases").RunStatus;
|
527
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
528
|
-
} | undefined;
|
529
|
-
creatorAddress: string;
|
530
|
-
creator: {
|
531
|
-
address: string;
|
532
|
-
tags: string[];
|
533
|
-
creatorId: string | null;
|
534
|
-
};
|
535
|
-
createdAt: string;
|
536
|
-
description: string | undefined;
|
537
|
-
parentCampaignId: string | undefined;
|
538
|
-
rootCampaignId: string | undefined;
|
539
|
-
Opportunity: {
|
540
|
-
name: string;
|
541
|
-
apr: number;
|
542
|
-
tvl: number;
|
543
|
-
description: string;
|
544
|
-
id: string;
|
545
|
-
status: import("@package/databases").Status;
|
546
|
-
chainId: number;
|
547
|
-
action: import("@package/databases").OpportunityAction;
|
548
|
-
type: string;
|
549
|
-
depositUrl: string | null;
|
550
|
-
explorerAddress: string | null;
|
551
|
-
howToSteps: string[];
|
552
|
-
mainProtocolId: string | null;
|
553
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
554
|
-
identifier: string;
|
555
|
-
dailyRewards: number;
|
556
|
-
tags: string[];
|
557
|
-
lastCampaignCreatedAt: Date;
|
558
|
-
};
|
559
|
-
campaignId: string;
|
560
|
-
id: string;
|
561
|
-
amount: string;
|
562
|
-
type: string;
|
563
|
-
computeChainId: number;
|
564
|
-
distributionChainId: number;
|
565
|
-
opportunityId: string;
|
566
|
-
distributionType: import("@package/databases").DistributionType;
|
567
|
-
subType: number | null;
|
568
|
-
rewardTokenId: string;
|
569
|
-
}[]>>;
|
570
|
-
static countByChains(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<Record<string, number>>;
|
571
|
-
static findAndGroupByTypes(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<Map<string, {
|
572
|
-
params: any;
|
573
|
-
chain: {
|
574
|
-
name: string;
|
575
|
-
id: number;
|
576
|
-
icon: string;
|
577
|
-
};
|
578
|
-
endTimestamp: number;
|
579
|
-
startTimestamp: number;
|
580
|
-
rewardToken: {
|
581
|
-
symbol: string;
|
582
|
-
name: string | null;
|
583
|
-
decimals: number;
|
584
|
-
address: string;
|
585
|
-
id: string;
|
586
|
-
chainId: number;
|
587
|
-
icon: string;
|
588
|
-
isNative: boolean;
|
589
|
-
isPoint: boolean;
|
590
|
-
isPreTGE: boolean;
|
591
|
-
isTest: boolean;
|
592
|
-
verified: boolean;
|
593
|
-
} & {
|
594
|
-
price?: number | null | undefined;
|
595
|
-
isTokenWrapper?: boolean | undefined;
|
596
|
-
tokenWrapperAddress?: string | undefined;
|
597
|
-
};
|
598
|
-
distributionChain: {
|
599
|
-
name: string;
|
600
|
-
id: number;
|
601
|
-
icon: string;
|
602
|
-
} | undefined;
|
603
|
-
campaignStatus: {
|
604
|
-
computedUntil: number;
|
605
|
-
processingStarted: number;
|
606
|
-
campaignId: string;
|
607
|
-
error: string;
|
608
|
-
status: import("@package/databases").RunStatus;
|
609
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
610
|
-
} | undefined;
|
611
|
-
creatorAddress: string;
|
612
|
-
creator: {
|
613
|
-
address: string;
|
614
|
-
tags: string[];
|
615
|
-
creatorId: string | null;
|
616
|
-
};
|
617
|
-
createdAt: string;
|
618
|
-
description: string | undefined;
|
619
|
-
parentCampaignId: string | undefined;
|
620
|
-
rootCampaignId: string | undefined;
|
621
|
-
Opportunity: {
|
622
|
-
name: string;
|
623
|
-
apr: number;
|
624
|
-
tvl: number;
|
625
|
-
description: string;
|
626
|
-
id: string;
|
627
|
-
status: import("@package/databases").Status;
|
628
|
-
chainId: number;
|
629
|
-
action: import("@package/databases").OpportunityAction;
|
630
|
-
type: string;
|
631
|
-
depositUrl: string | null;
|
632
|
-
explorerAddress: string | null;
|
633
|
-
howToSteps: string[];
|
634
|
-
mainProtocolId: string | null;
|
635
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
636
|
-
identifier: string;
|
637
|
-
dailyRewards: number;
|
638
|
-
tags: string[];
|
639
|
-
lastCampaignCreatedAt: Date;
|
640
|
-
};
|
641
|
-
campaignId: string;
|
642
|
-
id: string;
|
643
|
-
amount: string;
|
644
|
-
type: string;
|
645
|
-
computeChainId: number;
|
646
|
-
distributionChainId: number;
|
647
|
-
opportunityId: string;
|
648
|
-
distributionType: import("@package/databases").DistributionType;
|
649
|
-
subType: number | null;
|
650
|
-
rewardTokenId: string;
|
651
|
-
}[]>>;
|
652
|
-
static countByTypes(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<Record<string, number>>;
|
653
|
-
static findAndGroupByProtocols(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<Map<string | null, {
|
654
|
-
params: any;
|
655
|
-
chain: {
|
656
|
-
name: string;
|
657
|
-
id: number;
|
658
|
-
icon: string;
|
659
|
-
};
|
660
|
-
endTimestamp: number;
|
661
|
-
startTimestamp: number;
|
662
|
-
rewardToken: {
|
663
|
-
symbol: string;
|
664
|
-
name: string | null;
|
665
|
-
decimals: number;
|
666
|
-
address: string;
|
667
|
-
id: string;
|
668
|
-
chainId: number;
|
669
|
-
icon: string;
|
670
|
-
isNative: boolean;
|
671
|
-
isPoint: boolean;
|
672
|
-
isPreTGE: boolean;
|
673
|
-
isTest: boolean;
|
674
|
-
verified: boolean;
|
675
|
-
} & {
|
676
|
-
price?: number | null | undefined;
|
677
|
-
isTokenWrapper?: boolean | undefined;
|
678
|
-
tokenWrapperAddress?: string | undefined;
|
679
|
-
};
|
680
|
-
distributionChain: {
|
681
|
-
name: string;
|
682
|
-
id: number;
|
683
|
-
icon: string;
|
684
|
-
} | undefined;
|
685
|
-
campaignStatus: {
|
686
|
-
computedUntil: number;
|
687
|
-
processingStarted: number;
|
688
|
-
campaignId: string;
|
689
|
-
error: string;
|
690
|
-
status: import("@package/databases").RunStatus;
|
691
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
692
|
-
} | undefined;
|
693
|
-
creatorAddress: string;
|
694
|
-
creator: {
|
695
|
-
address: string;
|
696
|
-
tags: string[];
|
697
|
-
creatorId: string | null;
|
698
|
-
};
|
699
|
-
createdAt: string;
|
700
|
-
description: string | undefined;
|
701
|
-
parentCampaignId: string | undefined;
|
702
|
-
rootCampaignId: string | undefined;
|
703
|
-
Opportunity: {
|
704
|
-
name: string;
|
705
|
-
apr: number;
|
706
|
-
tvl: number;
|
707
|
-
description: string;
|
708
|
-
id: string;
|
709
|
-
status: import("@package/databases").Status;
|
710
|
-
chainId: number;
|
711
|
-
action: import("@package/databases").OpportunityAction;
|
712
|
-
type: string;
|
713
|
-
depositUrl: string | null;
|
714
|
-
explorerAddress: string | null;
|
715
|
-
howToSteps: string[];
|
716
|
-
mainProtocolId: string | null;
|
717
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
718
|
-
identifier: string;
|
719
|
-
dailyRewards: number;
|
720
|
-
tags: string[];
|
721
|
-
lastCampaignCreatedAt: Date;
|
722
|
-
};
|
723
|
-
campaignId: string;
|
724
|
-
id: string;
|
725
|
-
amount: string;
|
726
|
-
type: string;
|
727
|
-
computeChainId: number;
|
728
|
-
distributionChainId: number;
|
729
|
-
opportunityId: string;
|
730
|
-
distributionType: import("@package/databases").DistributionType;
|
731
|
-
subType: number | null;
|
732
|
-
rewardTokenId: string;
|
733
|
-
}[]>>;
|
734
|
-
static countByProtocols(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<Record<string, number>>;
|
735
|
-
static countBy<T>(campaignsMap: Map<T, ReturnType<(typeof CampaignService)["format"]>[]>): Record<string, number>;
|
736
|
-
/**
|
737
|
-
* Counts the number of campaigns that complies to query
|
738
|
-
* @description used for pagination purposes
|
739
|
-
* @param query
|
740
|
-
* @returns the number of campaigns
|
741
|
-
*/
|
742
|
-
static countMany(query: Omit<GetCampaignQueryModel, "page" | "items">): Promise<number>;
|
280
|
+
static findMany(query: FindCampaignModel): Promise<Omit<CampaignWithParams, "manualOverrides">[]>;
|
281
|
+
static countMany(query: Omit<FindCampaignModel, "page" | "items">): Promise<number>;
|
282
|
+
static findFirst(query: Omit<FindCampaignModel, "page" | "items">): Promise<Omit<CampaignWithParams, "manualOverrides"> | null>;
|
283
|
+
static findAndGroupByChains(query: Omit<FindCampaignModel, "page" | "items">): Promise<Map<number, Omit<CampaignWithParams, "manualOverrides">[]>>;
|
284
|
+
static countByChains(query: Omit<FindCampaignModel, "page" | "items">): Promise<Record<string, number>>;
|
285
|
+
static findAndGroupByTypes(query: Omit<FindCampaignModel, "page" | "items">): Promise<Map<string, Omit<CampaignWithParams, "manualOverrides">[]>>;
|
286
|
+
static countByTypes(query: Omit<FindCampaignModel, "page" | "items">): Promise<Record<string, number>>;
|
287
|
+
static findAndGroupByProtocols(query: Omit<FindCampaignModel, "page" | "items">): Promise<Map<string | undefined, Omit<CampaignWithParams, "manualOverrides">[]>>;
|
288
|
+
static countByProtocols(query: Omit<FindCampaignModel, "page" | "items">): Promise<Record<string, number>>;
|
289
|
+
static countBy<T>(campaignsMap: Map<T, ReturnType<(typeof CampaignFormatter)["format"]>[]>): Record<string, number>;
|
743
290
|
static checkIfExist(campaign: CampaignUnique | string): Promise<boolean>;
|
744
|
-
static findUnique(campaign: CampaignUnique | string): Promise<
|
745
|
-
|
746
|
-
name: string;
|
747
|
-
id: number;
|
748
|
-
icon: string;
|
749
|
-
};
|
750
|
-
DistributionChain: {
|
751
|
-
name: string;
|
752
|
-
id: number;
|
753
|
-
icon: string;
|
754
|
-
};
|
755
|
-
RewardToken: {
|
756
|
-
symbol: string;
|
757
|
-
name: string | null;
|
758
|
-
decimals: number;
|
759
|
-
price: number | null;
|
760
|
-
address: string;
|
761
|
-
id: string;
|
762
|
-
chainId: number;
|
763
|
-
icon: string;
|
764
|
-
isNative: boolean;
|
765
|
-
isPoint: boolean;
|
766
|
-
isPreTGE: boolean;
|
767
|
-
isTest: boolean;
|
768
|
-
verified: boolean;
|
769
|
-
displaySymbol: string;
|
770
|
-
};
|
771
|
-
Creator: {
|
772
|
-
address: string;
|
773
|
-
tags: string[];
|
774
|
-
creatorId: string | null;
|
775
|
-
};
|
776
|
-
CampaignStatus: {
|
777
|
-
campaignId: string;
|
778
|
-
error: string;
|
779
|
-
status: import("@package/databases").RunStatus;
|
780
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
781
|
-
computedUntil: bigint;
|
782
|
-
processingStarted: bigint;
|
783
|
-
}[];
|
784
|
-
} & {
|
785
|
-
campaignId: string;
|
786
|
-
description: string | null;
|
787
|
-
id: string;
|
788
|
-
params: import("@prisma/client/runtime/library").JsonValue;
|
789
|
-
amount: string;
|
790
|
-
startTimestamp: bigint;
|
791
|
-
type: string;
|
792
|
-
computeChainId: number;
|
793
|
-
distributionChainId: number;
|
794
|
-
endTimestamp: bigint;
|
795
|
-
opportunityId: string;
|
796
|
-
creatorAddress: string;
|
797
|
-
distributionType: import("@package/databases").DistributionType;
|
798
|
-
subType: number | null;
|
799
|
-
rewardTokenId: string;
|
800
|
-
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
801
|
-
createdAt: Date;
|
802
|
-
rootCampaignId: string | null;
|
803
|
-
parentCampaignId: string | null;
|
804
|
-
}) | null>;
|
805
|
-
static findUniqueOrThrow(campaign: CampaignUnique | string, withOpportunity?: boolean): Promise<{
|
806
|
-
ComputeChain: {
|
807
|
-
name: string;
|
808
|
-
id: number;
|
809
|
-
icon: string;
|
810
|
-
};
|
811
|
-
DistributionChain: {
|
812
|
-
name: string;
|
813
|
-
id: number;
|
814
|
-
icon: string;
|
815
|
-
};
|
816
|
-
RewardToken: {
|
817
|
-
symbol: string;
|
818
|
-
name: string | null;
|
819
|
-
decimals: number;
|
820
|
-
price: number | null;
|
821
|
-
address: string;
|
822
|
-
id: string;
|
823
|
-
chainId: number;
|
824
|
-
icon: string;
|
825
|
-
isNative: boolean;
|
826
|
-
isPoint: boolean;
|
827
|
-
isPreTGE: boolean;
|
828
|
-
isTest: boolean;
|
829
|
-
verified: boolean;
|
830
|
-
displaySymbol: string;
|
831
|
-
};
|
832
|
-
Opportunity: {
|
833
|
-
name: string;
|
834
|
-
apr: number;
|
835
|
-
tvl: number;
|
836
|
-
description: string;
|
837
|
-
id: string;
|
838
|
-
status: import("@package/databases").Status;
|
839
|
-
chainId: number;
|
840
|
-
action: import("@package/databases").OpportunityAction;
|
841
|
-
type: string;
|
842
|
-
depositUrl: string | null;
|
843
|
-
explorerAddress: string | null;
|
844
|
-
howToSteps: string[];
|
845
|
-
mainProtocolId: string | null;
|
846
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
847
|
-
identifier: string;
|
848
|
-
dailyRewards: number;
|
849
|
-
tags: string[];
|
850
|
-
lastCampaignCreatedAt: Date;
|
851
|
-
};
|
852
|
-
Creator: {
|
853
|
-
address: string;
|
854
|
-
tags: string[];
|
855
|
-
creatorId: string | null;
|
856
|
-
};
|
857
|
-
CampaignStatus: {
|
858
|
-
campaignId: string;
|
859
|
-
error: string;
|
860
|
-
status: import("@package/databases").RunStatus;
|
861
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
862
|
-
computedUntil: bigint;
|
863
|
-
processingStarted: bigint;
|
864
|
-
}[];
|
865
|
-
} & {
|
866
|
-
campaignId: string;
|
867
|
-
description: string | null;
|
868
|
-
id: string;
|
869
|
-
params: import("@prisma/client/runtime/library").JsonValue;
|
870
|
-
amount: string;
|
871
|
-
startTimestamp: bigint;
|
872
|
-
type: string;
|
873
|
-
computeChainId: number;
|
874
|
-
distributionChainId: number;
|
875
|
-
endTimestamp: bigint;
|
876
|
-
opportunityId: string;
|
877
|
-
creatorAddress: string;
|
878
|
-
distributionType: import("@package/databases").DistributionType;
|
879
|
-
subType: number | null;
|
880
|
-
rewardTokenId: string;
|
881
|
-
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
882
|
-
createdAt: Date;
|
883
|
-
rootCampaignId: string | null;
|
884
|
-
parentCampaignId: string | null;
|
885
|
-
}>;
|
291
|
+
static findUnique(campaign: CampaignUnique | string): Promise<Omit<CampaignWithParams, "manualOverrides"> | null>;
|
292
|
+
static findUniqueOrThrow(campaign: CampaignUnique | string, withOpportunity?: boolean): Promise<Omit<CampaignWithParams, "manualOverrides">>;
|
886
293
|
static findCampaignValue(params: GetCampaignComputedValueModel): Promise<{
|
887
294
|
apr: number | null;
|
888
295
|
tvl: number | null;
|
@@ -948,97 +355,6 @@ export declare abstract class CampaignService {
|
|
948
355
|
live: C[];
|
949
356
|
soon: C[];
|
950
357
|
};
|
951
|
-
/**
|
952
|
-
* Convert raw
|
953
|
-
* @param query
|
954
|
-
* @returns A list of opportunities
|
955
|
-
* TODO: remove CampaignService function in favor of prisma client extensions
|
956
|
-
*/
|
957
|
-
static format(campaign: NonNullable<Awaited<ReturnType<(typeof CampaignRepository)["findMany"]>>>[number]): {
|
958
|
-
params: any;
|
959
|
-
chain: {
|
960
|
-
name: string;
|
961
|
-
id: number;
|
962
|
-
icon: string;
|
963
|
-
};
|
964
|
-
endTimestamp: number;
|
965
|
-
startTimestamp: number;
|
966
|
-
rewardToken: {
|
967
|
-
symbol: string;
|
968
|
-
name: string | null;
|
969
|
-
decimals: number;
|
970
|
-
address: string;
|
971
|
-
id: string;
|
972
|
-
chainId: number;
|
973
|
-
icon: string;
|
974
|
-
isNative: boolean;
|
975
|
-
isPoint: boolean;
|
976
|
-
isPreTGE: boolean;
|
977
|
-
isTest: boolean;
|
978
|
-
verified: boolean;
|
979
|
-
} & {
|
980
|
-
price?: number | null | undefined;
|
981
|
-
isTokenWrapper?: boolean | undefined;
|
982
|
-
tokenWrapperAddress?: string | undefined;
|
983
|
-
};
|
984
|
-
distributionChain: {
|
985
|
-
name: string;
|
986
|
-
id: number;
|
987
|
-
icon: string;
|
988
|
-
} | undefined;
|
989
|
-
campaignStatus: {
|
990
|
-
computedUntil: number;
|
991
|
-
processingStarted: number;
|
992
|
-
campaignId: string;
|
993
|
-
error: string;
|
994
|
-
status: import("@package/databases").RunStatus;
|
995
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
996
|
-
} | undefined;
|
997
|
-
creatorAddress: string;
|
998
|
-
creator: {
|
999
|
-
address: string;
|
1000
|
-
tags: string[];
|
1001
|
-
creatorId: string | null;
|
1002
|
-
};
|
1003
|
-
createdAt: string;
|
1004
|
-
description: string | undefined;
|
1005
|
-
parentCampaignId: string | undefined;
|
1006
|
-
rootCampaignId: string | undefined;
|
1007
|
-
Opportunity: {
|
1008
|
-
name: string;
|
1009
|
-
apr: number;
|
1010
|
-
tvl: number;
|
1011
|
-
description: string;
|
1012
|
-
id: string;
|
1013
|
-
status: import("@package/databases").Status;
|
1014
|
-
chainId: number;
|
1015
|
-
action: import("@package/databases").OpportunityAction;
|
1016
|
-
type: string;
|
1017
|
-
depositUrl: string | null;
|
1018
|
-
explorerAddress: string | null;
|
1019
|
-
howToSteps: string[];
|
1020
|
-
mainProtocolId: string | null;
|
1021
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
1022
|
-
identifier: string;
|
1023
|
-
dailyRewards: number;
|
1024
|
-
tags: string[];
|
1025
|
-
lastCampaignCreatedAt: Date;
|
1026
|
-
};
|
1027
|
-
campaignId: string;
|
1028
|
-
id: string;
|
1029
|
-
amount: string;
|
1030
|
-
type: string;
|
1031
|
-
computeChainId: number;
|
1032
|
-
distributionChainId: number;
|
1033
|
-
opportunityId: string;
|
1034
|
-
distributionType: import("@package/databases").DistributionType;
|
1035
|
-
subType: number | null;
|
1036
|
-
rewardTokenId: string;
|
1037
|
-
};
|
1038
|
-
/**
|
1039
|
-
* @deprecated Used only in tentative position fetcher
|
1040
|
-
*/
|
1041
|
-
static formatAsCampaignParameters<C extends CampaignType>(campaign: CampaignWithParams): CampaignParameters<C>;
|
1042
358
|
/**
|
1043
359
|
* Shortcut to get daily amount from total
|
1044
360
|
* @param start timestamp
|