@merkl/api 0.18.14 → 0.19.1

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 (68) hide show
  1. package/dist/database/api/.generated/drizzle/schema.d.ts +2 -2
  2. package/dist/database/api/.generated/drizzle/schema.js +2 -2
  3. package/dist/database/api/.generated/drizzle/schema.ts +2 -2
  4. package/dist/database/api/.generated/edge.js +3 -3
  5. package/dist/database/api/.generated/index.d.ts +12 -12
  6. package/dist/database/api/.generated/index.js +3 -3
  7. package/dist/database/api/.generated/package.json +1 -1
  8. package/dist/database/api/.generated/schema.prisma +2 -2
  9. package/dist/src/backgroundJobs/index.js +0 -4
  10. package/dist/src/eden/index.d.ts +35 -30
  11. package/dist/src/factories/opportunityMetadata/implementations/EventBased.d.ts +1 -1
  12. package/dist/src/index.d.ts +7 -6
  13. package/dist/src/jobs/{etl/dynamic-data.js → dynamic-data.js} +1 -1
  14. package/dist/src/jobs/set-dungeon-keeper.js +82 -0
  15. package/dist/src/jobs/update-dynamic-data.d.ts +1 -0
  16. package/dist/src/jobs/update-uniswap-v4-pools.d.ts +1 -0
  17. package/dist/src/jobs/update-uniswap-v4-pools.js +14 -0
  18. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/hardcoded.js +2 -4
  19. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HourglassProcessor.d.ts +1 -1
  20. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HourglassProcessor.js +3 -0
  21. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SpliceProcessor.js +1 -0
  22. package/dist/src/libs/campaigns/campaignTypes/SILODynamicData.js +2 -2
  23. package/dist/src/libs/campaigns/utils/fetchAmbientInfo.d.ts +2 -2
  24. package/dist/src/libs/campaigns/utils/getDolomiteMarkets.js +1 -1
  25. package/dist/src/libs/positions/dolomite/index.js +2 -0
  26. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +5 -5
  27. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +52 -1
  28. package/dist/src/modules/v4/programPayload/programPayload.repository.js +48 -13
  29. package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +5 -4
  30. package/dist/src/modules/v4/programPayload/programPayload.service.js +24 -10
  31. package/dist/src/modules/v4/router.d.ts +7 -6
  32. package/dist/src/modules/v4/status/status.repository.js +1 -0
  33. package/dist/src/modules/v4/token/token.controller.d.ts +2 -1
  34. package/dist/src/modules/v4/token/token.repository.d.ts +15 -1
  35. package/dist/src/modules/v4/token/token.service.d.ts +19 -5
  36. package/dist/src/modules/v4/token/token.service.js +7 -10
  37. package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.d.ts +2 -2
  38. package/dist/src/modules/v4/uniswapV4/uniswapV4.model.d.ts +9 -0
  39. package/dist/src/modules/v4/uniswapV4/uniswapV4.repository.d.ts +11 -0
  40. package/dist/src/modules/v4/uniswapV4/uniswapV4.repository.js +10 -0
  41. package/dist/src/modules/v4/uniswapV4/uniswapV4.service.d.ts +4 -2
  42. package/dist/src/modules/v4/uniswapV4/uniswapV4.service.js +175 -1
  43. package/dist/src/utils/prices/services/coinGeckoService.js +3 -3
  44. package/dist/src/utils/prices/services/defillamaService.js +3 -3
  45. package/dist/src/utils/prices/services/erc4626Service.js +6 -4
  46. package/dist/tsconfig.package.tsbuildinfo +1 -1
  47. package/package.json +11 -8
  48. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.controller.d.ts +0 -34
  49. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.controller.js +0 -8
  50. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.model.d.ts +0 -0
  51. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.model.js +0 -1
  52. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.repository.d.ts +0 -5
  53. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.repository.js +0 -71
  54. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.service.d.ts +0 -3
  55. package/dist/src/modules/v4/dungeonKeeper/dungeonKeeper.service.js +0 -15
  56. /package/dist/src/jobs/{etl/dynamic-data.d.ts → dynamic-data.d.ts} +0 -0
  57. /package/dist/src/jobs/{etl/pendings.d.ts → pendings.d.ts} +0 -0
  58. /package/dist/src/jobs/{etl/pendings.js → pendings.js} +0 -0
  59. /package/dist/src/jobs/{etl/prices.d.ts → prices.d.ts} +0 -0
  60. /package/dist/src/jobs/{etl/prices.js → prices.js} +0 -0
  61. /package/dist/src/jobs/{etl/reward-breakdowns.d.ts → reward-breakdowns.d.ts} +0 -0
  62. /package/dist/src/jobs/{etl/reward-breakdowns.js → reward-breakdowns.js} +0 -0
  63. /package/dist/src/jobs/{etl/rewards.d.ts → rewards.d.ts} +0 -0
  64. /package/dist/src/jobs/{etl/rewards.js → rewards.js} +0 -0
  65. /package/dist/src/jobs/{etl/update-dynamic-data.d.ts → set-dungeon-keeper.d.ts} +0 -0
  66. /package/dist/src/jobs/{etl/update-dynamic-data.js → update-dynamic-data.js} +0 -0
  67. /package/dist/src/jobs/{etl/update-euler-vaults.d.ts → update-euler-vaults.d.ts} +0 -0
  68. /package/dist/src/jobs/{etl/update-euler-vaults.js → update-euler-vaults.js} +0 -0
@@ -54,8 +54,8 @@ model Campaign {
54
54
  model CampaignStatus {
55
55
  campaignId String @id
56
56
  Campaign Campaign @relation(fields: [campaignId], references: [id])
57
- computedUntil BigInt @default(0)
58
- processingStarted BigInt @default(0)
57
+ computedUntil BigInt
58
+ processingStarted BigInt
59
59
  status RunStatus @default(SUCCESS)
60
60
  error String @default("")
61
61
  details Json @default("{}")
@@ -3,7 +3,6 @@ import { Redis } from "@/cache";
3
3
  import { redisClient } from "@/cache/redis";
4
4
  import { getEulerV2Vaults, updateEulerVaultsCollatInDatabase } from "@/libs/campaigns/utils/getEulerV2Vaults";
5
5
  import { getUniswapV4Pools } from "@/libs/campaigns/utils/getUniswapV4Pools";
6
- import { DungeonKeeperController } from "@/modules/v4/dungeonKeeper/dungeonKeeper.controller";
7
6
  import { log } from "@/utils/logger";
8
7
  import { engineDbClient } from "@db";
9
8
  import { swagger } from "@elysiajs/swagger";
@@ -33,9 +32,6 @@ new Elysia({
33
32
  .get("/uniswapv4Update", async () => {
34
33
  log.info("🔃 updating UniswapV4 pools...");
35
34
  await Redis.safeSet("UniswapV4Pools", await getUniswapV4Pools());
36
- })
37
- .group("/v4", app => {
38
- return app.use(DungeonKeeperController);
39
35
  })
40
36
  .onError(ctx => {
41
37
  console.error(ctx.error.message);
@@ -475,9 +475,9 @@ declare const eden: {
475
475
  chainId?: string | undefined;
476
476
  mainProtocolId?: string | undefined;
477
477
  campaigns?: boolean | undefined;
478
+ test?: boolean | undefined;
478
479
  rewardTokenSymbol?: string | undefined;
479
480
  order?: string | undefined;
480
- test?: boolean | undefined;
481
481
  minimumTvl?: number | undefined;
482
482
  };
483
483
  fetch?: RequestInit | undefined;
@@ -663,9 +663,9 @@ declare const eden: {
663
663
  chainId?: string | undefined;
664
664
  mainProtocolId?: string | undefined;
665
665
  campaigns?: boolean | undefined;
666
+ test?: boolean | undefined;
666
667
  rewardTokenSymbol?: string | undefined;
667
668
  order?: string | undefined;
668
- test?: boolean | undefined;
669
669
  minimumTvl?: number | undefined;
670
670
  };
671
671
  fetch?: RequestInit | undefined;
@@ -866,9 +866,9 @@ declare const eden: {
866
866
  chainId?: string | undefined;
867
867
  mainProtocolId?: string | undefined;
868
868
  campaigns?: boolean | undefined;
869
+ test?: boolean | undefined;
869
870
  rewardTokenSymbol?: string | undefined;
870
871
  order?: string | undefined;
871
- test?: boolean | undefined;
872
872
  minimumTvl?: number | undefined;
873
873
  };
874
874
  fetch?: RequestInit | undefined;
@@ -898,9 +898,9 @@ declare const eden: {
898
898
  chainId?: string | undefined;
899
899
  mainProtocolId?: string | undefined;
900
900
  campaigns?: boolean | undefined;
901
+ test?: boolean | undefined;
901
902
  rewardTokenSymbol?: string | undefined;
902
903
  order?: string | undefined;
903
- test?: boolean | undefined;
904
904
  minimumTvl?: number | undefined;
905
905
  };
906
906
  fetch?: RequestInit | undefined;
@@ -930,9 +930,9 @@ declare const eden: {
930
930
  chainId?: string | undefined;
931
931
  mainProtocolId?: string | undefined;
932
932
  campaigns?: boolean | undefined;
933
+ test?: boolean | undefined;
933
934
  rewardTokenSymbol?: string | undefined;
934
935
  order?: string | undefined;
935
- test?: boolean | undefined;
936
936
  minimumTvl?: number | undefined;
937
937
  };
938
938
  fetch?: RequestInit | undefined;
@@ -1655,11 +1655,12 @@ declare const eden: {
1655
1655
  address: string;
1656
1656
  chainId: number;
1657
1657
  decimals: number;
1658
+ displaySymbol: string;
1658
1659
  verified: boolean;
1659
1660
  isTest: boolean;
1660
1661
  isPoint: boolean;
1661
1662
  isNative: boolean;
1662
- price?: number | null | undefined;
1663
+ price: number | null;
1663
1664
  } | undefined;
1664
1665
  }>>;
1665
1666
  };
@@ -3950,9 +3951,9 @@ declare const eden: {
3950
3951
  chainId?: string | undefined;
3951
3952
  mainProtocolId?: string | undefined;
3952
3953
  campaigns?: boolean | undefined;
3954
+ test?: boolean | undefined;
3953
3955
  rewardTokenSymbol?: string | undefined;
3954
3956
  order?: string | undefined;
3955
- test?: boolean | undefined;
3956
3957
  minimumTvl?: number | undefined;
3957
3958
  };
3958
3959
  fetch?: RequestInit | undefined;
@@ -4138,9 +4139,9 @@ declare const eden: {
4138
4139
  chainId?: string | undefined;
4139
4140
  mainProtocolId?: string | undefined;
4140
4141
  campaigns?: boolean | undefined;
4142
+ test?: boolean | undefined;
4141
4143
  rewardTokenSymbol?: string | undefined;
4142
4144
  order?: string | undefined;
4143
- test?: boolean | undefined;
4144
4145
  minimumTvl?: number | undefined;
4145
4146
  };
4146
4147
  fetch?: RequestInit | undefined;
@@ -4341,9 +4342,9 @@ declare const eden: {
4341
4342
  chainId?: string | undefined;
4342
4343
  mainProtocolId?: string | undefined;
4343
4344
  campaigns?: boolean | undefined;
4345
+ test?: boolean | undefined;
4344
4346
  rewardTokenSymbol?: string | undefined;
4345
4347
  order?: string | undefined;
4346
- test?: boolean | undefined;
4347
4348
  minimumTvl?: number | undefined;
4348
4349
  };
4349
4350
  fetch?: RequestInit | undefined;
@@ -4373,9 +4374,9 @@ declare const eden: {
4373
4374
  chainId?: string | undefined;
4374
4375
  mainProtocolId?: string | undefined;
4375
4376
  campaigns?: boolean | undefined;
4377
+ test?: boolean | undefined;
4376
4378
  rewardTokenSymbol?: string | undefined;
4377
4379
  order?: string | undefined;
4378
- test?: boolean | undefined;
4379
4380
  minimumTvl?: number | undefined;
4380
4381
  };
4381
4382
  fetch?: RequestInit | undefined;
@@ -4405,9 +4406,9 @@ declare const eden: {
4405
4406
  chainId?: string | undefined;
4406
4407
  mainProtocolId?: string | undefined;
4407
4408
  campaigns?: boolean | undefined;
4409
+ test?: boolean | undefined;
4408
4410
  rewardTokenSymbol?: string | undefined;
4409
4411
  order?: string | undefined;
4410
- test?: boolean | undefined;
4411
4412
  minimumTvl?: number | undefined;
4412
4413
  };
4413
4414
  fetch?: RequestInit | undefined;
@@ -5130,11 +5131,12 @@ declare const eden: {
5130
5131
  address: string;
5131
5132
  chainId: number;
5132
5133
  decimals: number;
5134
+ displaySymbol: string;
5133
5135
  verified: boolean;
5134
5136
  isTest: boolean;
5135
5137
  isPoint: boolean;
5136
5138
  isNative: boolean;
5137
- price?: number | null | undefined;
5139
+ price: number | null;
5138
5140
  } | undefined;
5139
5141
  }>>;
5140
5142
  };
@@ -7891,9 +7893,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7891
7893
  chainId?: string | undefined;
7892
7894
  mainProtocolId?: string | undefined;
7893
7895
  campaigns?: boolean | undefined;
7896
+ test?: boolean | undefined;
7894
7897
  rewardTokenSymbol?: string | undefined;
7895
7898
  order?: string | undefined;
7896
- test?: boolean | undefined;
7897
7899
  minimumTvl?: number | undefined;
7898
7900
  };
7899
7901
  headers: unknown;
@@ -8084,9 +8086,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8084
8086
  chainId?: string | undefined;
8085
8087
  mainProtocolId?: string | undefined;
8086
8088
  campaigns?: boolean | undefined;
8089
+ test?: boolean | undefined;
8087
8090
  rewardTokenSymbol?: string | undefined;
8088
8091
  order?: string | undefined;
8089
- test?: boolean | undefined;
8090
8092
  minimumTvl?: number | undefined;
8091
8093
  };
8092
8094
  headers: unknown;
@@ -8572,9 +8574,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8572
8574
  chainId?: string | undefined;
8573
8575
  mainProtocolId?: string | undefined;
8574
8576
  campaigns?: boolean | undefined;
8577
+ test?: boolean | undefined;
8575
8578
  rewardTokenSymbol?: string | undefined;
8576
8579
  order?: string | undefined;
8577
- test?: boolean | undefined;
8578
8580
  minimumTvl?: number | undefined;
8579
8581
  };
8580
8582
  headers: unknown;
@@ -8612,9 +8614,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8612
8614
  chainId?: string | undefined;
8613
8615
  mainProtocolId?: string | undefined;
8614
8616
  campaigns?: boolean | undefined;
8617
+ test?: boolean | undefined;
8615
8618
  rewardTokenSymbol?: string | undefined;
8616
8619
  order?: string | undefined;
8617
- test?: boolean | undefined;
8618
8620
  minimumTvl?: number | undefined;
8619
8621
  };
8620
8622
  headers: unknown;
@@ -8653,9 +8655,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8653
8655
  chainId?: string | undefined;
8654
8656
  mainProtocolId?: string | undefined;
8655
8657
  campaigns?: boolean | undefined;
8658
+ test?: boolean | undefined;
8656
8659
  rewardTokenSymbol?: string | undefined;
8657
8660
  order?: string | undefined;
8658
- test?: boolean | undefined;
8659
8661
  minimumTvl?: number | undefined;
8660
8662
  };
8661
8663
  headers: unknown;
@@ -9527,11 +9529,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
9527
9529
  address: string;
9528
9530
  chainId: number;
9529
9531
  decimals: number;
9532
+ displaySymbol: string;
9530
9533
  verified: boolean;
9531
9534
  isTest: boolean;
9532
9535
  isPoint: boolean;
9533
9536
  isNative: boolean;
9534
- price?: number | null | undefined;
9537
+ price: number | null;
9535
9538
  } | undefined;
9536
9539
  };
9537
9540
  };
@@ -13198,9 +13201,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
13198
13201
  chainId?: string | undefined;
13199
13202
  mainProtocolId?: string | undefined;
13200
13203
  campaigns?: boolean | undefined;
13204
+ test?: boolean | undefined;
13201
13205
  rewardTokenSymbol?: string | undefined;
13202
13206
  order?: string | undefined;
13203
- test?: boolean | undefined;
13204
13207
  minimumTvl?: number | undefined;
13205
13208
  };
13206
13209
  fetch?: RequestInit | undefined;
@@ -13386,9 +13389,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
13386
13389
  chainId?: string | undefined;
13387
13390
  mainProtocolId?: string | undefined;
13388
13391
  campaigns?: boolean | undefined;
13392
+ test?: boolean | undefined;
13389
13393
  rewardTokenSymbol?: string | undefined;
13390
13394
  order?: string | undefined;
13391
- test?: boolean | undefined;
13392
13395
  minimumTvl?: number | undefined;
13393
13396
  };
13394
13397
  fetch?: RequestInit | undefined;
@@ -13589,9 +13592,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
13589
13592
  chainId?: string | undefined;
13590
13593
  mainProtocolId?: string | undefined;
13591
13594
  campaigns?: boolean | undefined;
13595
+ test?: boolean | undefined;
13592
13596
  rewardTokenSymbol?: string | undefined;
13593
13597
  order?: string | undefined;
13594
- test?: boolean | undefined;
13595
13598
  minimumTvl?: number | undefined;
13596
13599
  };
13597
13600
  fetch?: RequestInit | undefined;
@@ -13621,9 +13624,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
13621
13624
  chainId?: string | undefined;
13622
13625
  mainProtocolId?: string | undefined;
13623
13626
  campaigns?: boolean | undefined;
13627
+ test?: boolean | undefined;
13624
13628
  rewardTokenSymbol?: string | undefined;
13625
13629
  order?: string | undefined;
13626
- test?: boolean | undefined;
13627
13630
  minimumTvl?: number | undefined;
13628
13631
  };
13629
13632
  fetch?: RequestInit | undefined;
@@ -13653,9 +13656,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
13653
13656
  chainId?: string | undefined;
13654
13657
  mainProtocolId?: string | undefined;
13655
13658
  campaigns?: boolean | undefined;
13659
+ test?: boolean | undefined;
13656
13660
  rewardTokenSymbol?: string | undefined;
13657
13661
  order?: string | undefined;
13658
- test?: boolean | undefined;
13659
13662
  minimumTvl?: number | undefined;
13660
13663
  };
13661
13664
  fetch?: RequestInit | undefined;
@@ -14378,11 +14381,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
14378
14381
  address: string;
14379
14382
  chainId: number;
14380
14383
  decimals: number;
14384
+ displaySymbol: string;
14381
14385
  verified: boolean;
14382
14386
  isTest: boolean;
14383
14387
  isPoint: boolean;
14384
14388
  isNative: boolean;
14385
- price?: number | null | undefined;
14389
+ price: number | null;
14386
14390
  } | undefined;
14387
14391
  }>>;
14388
14392
  };
@@ -16673,9 +16677,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
16673
16677
  chainId?: string | undefined;
16674
16678
  mainProtocolId?: string | undefined;
16675
16679
  campaigns?: boolean | undefined;
16680
+ test?: boolean | undefined;
16676
16681
  rewardTokenSymbol?: string | undefined;
16677
16682
  order?: string | undefined;
16678
- test?: boolean | undefined;
16679
16683
  minimumTvl?: number | undefined;
16680
16684
  };
16681
16685
  fetch?: RequestInit | undefined;
@@ -16861,9 +16865,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
16861
16865
  chainId?: string | undefined;
16862
16866
  mainProtocolId?: string | undefined;
16863
16867
  campaigns?: boolean | undefined;
16868
+ test?: boolean | undefined;
16864
16869
  rewardTokenSymbol?: string | undefined;
16865
16870
  order?: string | undefined;
16866
- test?: boolean | undefined;
16867
16871
  minimumTvl?: number | undefined;
16868
16872
  };
16869
16873
  fetch?: RequestInit | undefined;
@@ -17064,9 +17068,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
17064
17068
  chainId?: string | undefined;
17065
17069
  mainProtocolId?: string | undefined;
17066
17070
  campaigns?: boolean | undefined;
17071
+ test?: boolean | undefined;
17067
17072
  rewardTokenSymbol?: string | undefined;
17068
17073
  order?: string | undefined;
17069
- test?: boolean | undefined;
17070
17074
  minimumTvl?: number | undefined;
17071
17075
  };
17072
17076
  fetch?: RequestInit | undefined;
@@ -17096,9 +17100,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
17096
17100
  chainId?: string | undefined;
17097
17101
  mainProtocolId?: string | undefined;
17098
17102
  campaigns?: boolean | undefined;
17103
+ test?: boolean | undefined;
17099
17104
  rewardTokenSymbol?: string | undefined;
17100
17105
  order?: string | undefined;
17101
- test?: boolean | undefined;
17102
17106
  minimumTvl?: number | undefined;
17103
17107
  };
17104
17108
  fetch?: RequestInit | undefined;
@@ -17128,9 +17132,9 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
17128
17132
  chainId?: string | undefined;
17129
17133
  mainProtocolId?: string | undefined;
17130
17134
  campaigns?: boolean | undefined;
17135
+ test?: boolean | undefined;
17131
17136
  rewardTokenSymbol?: string | undefined;
17132
17137
  order?: string | undefined;
17133
- test?: boolean | undefined;
17134
17138
  minimumTvl?: number | undefined;
17135
17139
  };
17136
17140
  fetch?: RequestInit | undefined;
@@ -17853,11 +17857,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
17853
17857
  address: string;
17854
17858
  chainId: number;
17855
17859
  decimals: number;
17860
+ displaySymbol: string;
17856
17861
  verified: boolean;
17857
17862
  isTest: boolean;
17858
17863
  isPoint: boolean;
17859
17864
  isNative: boolean;
17860
- price?: number | null | undefined;
17865
+ price: number | null;
17861
17866
  } | undefined;
17862
17867
  }>>;
17863
17868
  };
@@ -1,5 +1,5 @@
1
- import type { MetadataBuilder } from "@/factories/metadataFactory/interface";
2
1
  import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
2
+ import type { MetadataBuilder } from "../interface";
3
3
  type campaignType = CampaignEnum.EVENT_BASED;
4
4
  export declare class EventBasedMetadata implements MetadataBuilder<campaignType> {
5
5
  build(computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"], _subType: CampaignParameters<campaignType>["campaignSubType"]): Promise<{
@@ -267,9 +267,9 @@ declare const app: Elysia<"", false, {
267
267
  chainId?: string | undefined;
268
268
  mainProtocolId?: string | undefined;
269
269
  campaigns?: boolean | undefined;
270
+ test?: boolean | undefined;
270
271
  rewardTokenSymbol?: string | undefined;
271
272
  order?: string | undefined;
272
- test?: boolean | undefined;
273
273
  minimumTvl?: number | undefined;
274
274
  };
275
275
  headers: unknown;
@@ -460,9 +460,9 @@ declare const app: Elysia<"", false, {
460
460
  chainId?: string | undefined;
461
461
  mainProtocolId?: string | undefined;
462
462
  campaigns?: boolean | undefined;
463
+ test?: boolean | undefined;
463
464
  rewardTokenSymbol?: string | undefined;
464
465
  order?: string | undefined;
465
- test?: boolean | undefined;
466
466
  minimumTvl?: number | undefined;
467
467
  };
468
468
  headers: unknown;
@@ -948,9 +948,9 @@ declare const app: Elysia<"", false, {
948
948
  chainId?: string | undefined;
949
949
  mainProtocolId?: string | undefined;
950
950
  campaigns?: boolean | undefined;
951
+ test?: boolean | undefined;
951
952
  rewardTokenSymbol?: string | undefined;
952
953
  order?: string | undefined;
953
- test?: boolean | undefined;
954
954
  minimumTvl?: number | undefined;
955
955
  };
956
956
  headers: unknown;
@@ -988,9 +988,9 @@ declare const app: Elysia<"", false, {
988
988
  chainId?: string | undefined;
989
989
  mainProtocolId?: string | undefined;
990
990
  campaigns?: boolean | undefined;
991
+ test?: boolean | undefined;
991
992
  rewardTokenSymbol?: string | undefined;
992
993
  order?: string | undefined;
993
- test?: boolean | undefined;
994
994
  minimumTvl?: number | undefined;
995
995
  };
996
996
  headers: unknown;
@@ -1029,9 +1029,9 @@ declare const app: Elysia<"", false, {
1029
1029
  chainId?: string | undefined;
1030
1030
  mainProtocolId?: string | undefined;
1031
1031
  campaigns?: boolean | undefined;
1032
+ test?: boolean | undefined;
1032
1033
  rewardTokenSymbol?: string | undefined;
1033
1034
  order?: string | undefined;
1034
- test?: boolean | undefined;
1035
1035
  minimumTvl?: number | undefined;
1036
1036
  };
1037
1037
  headers: unknown;
@@ -1903,11 +1903,12 @@ declare const app: Elysia<"", false, {
1903
1903
  address: string;
1904
1904
  chainId: number;
1905
1905
  decimals: number;
1906
+ displaySymbol: string;
1906
1907
  verified: boolean;
1907
1908
  isTest: boolean;
1908
1909
  isPoint: boolean;
1909
1910
  isNative: boolean;
1910
- price?: number | null | undefined;
1911
+ price: number | null;
1911
1912
  } | undefined;
1912
1913
  };
1913
1914
  };
@@ -1,6 +1,6 @@
1
1
  import { campaignCacheUpdate } from "@/backgroundJobs/jobs/campaignsCacheUpdater";
2
+ import { InvalidParameter, UnsupportedNetwork } from "@/utils/error";
2
3
  import { ChainId, isSupportedChain } from "@sdk";
3
- import { InvalidParameter, UnsupportedNetwork } from "../../utils/error";
4
4
  const campaignTypes = process.env.CAMPAIGN_TYPES ? JSON.parse(process.env.CAMPAIGN_TYPES) : [];
5
5
  const highCampaignsChains = [ChainId.ARBITRUM, ChainId.POLYGON, ChainId.BLAST, ChainId.BASE];
6
6
  export const main = async () => {
@@ -0,0 +1,82 @@
1
+ import { Client } from "@notionhq/client";
2
+ import { Client as DiscordClient, GatewayIntentBits } from "discord.js";
3
+ import moment from "moment";
4
+ const notion = new Client({ auth: process.env.NOTION_TOKEN });
5
+ const discord = new DiscordClient({ intents: [GatewayIntentBits.GuildMembers] });
6
+ const NOTION_EMAIL_TO_DISCORD_ID = {
7
+ picodes: "thepicodes",
8
+ hugo: "ugolxt",
9
+ alex: "wombomango",
10
+ nileco: ".nileco",
11
+ thibaudb: ".greedythib",
12
+ gnervo: "gs8nrv",
13
+ vincent: "vince_merkl",
14
+ hicham: "lamicham_93854",
15
+ pveyrat: "sogipec",
16
+ baptiste: "baptistg",
17
+ clement: "clmntngl",
18
+ };
19
+ async function fetchEntriesForDateWithTag(databaseId, date, tag) {
20
+ const response = await notion.databases.query({
21
+ database_id: databaseId,
22
+ filter: {
23
+ and: [
24
+ {
25
+ property: "Date",
26
+ date: {
27
+ equals: date,
28
+ },
29
+ },
30
+ {
31
+ property: "Database",
32
+ select: {
33
+ equals: tag,
34
+ },
35
+ },
36
+ ],
37
+ },
38
+ });
39
+ return response.results;
40
+ }
41
+ async function assignRole(notionId) {
42
+ const discordId = NOTION_EMAIL_TO_DISCORD_ID[notionId];
43
+ if (!discordId)
44
+ throw "Discord ID not found.";
45
+ await discord.login(process.env.DISCORD_TOKEN);
46
+ const guild = await discord.guilds.cache.get("862708408711643136");
47
+ if (!guild)
48
+ throw "Guild not found.";
49
+ const roles = await guild.roles.fetch();
50
+ const teamRole = roles.find(r => r.name === "Team");
51
+ const dkRole = roles.find(r => r.name === "Dungeon Keeper");
52
+ if (!teamRole || !dkRole)
53
+ throw "Roles not found.";
54
+ const users = await guild.members.fetch();
55
+ for (const [_id, dkUser] of users.filter(member => member.roles.cache.has(dkRole.id))) {
56
+ await dkUser.roles.remove(dkRole);
57
+ }
58
+ const user = users
59
+ .filter(member => member.roles.cache.has(teamRole.id))
60
+ .find(member => member.user.tag === discordId);
61
+ if (!user)
62
+ throw "User not found";
63
+ await user.roles.add(dkRole);
64
+ const channel = await discord.channels.fetch("1328383110957633630");
65
+ if (!channel)
66
+ throw "Channel not found";
67
+ if (channel.isSendable()) {
68
+ await channel.send(`Lucky you <@${user.id}>! You're the <@&${dkRole.id}> today!`);
69
+ }
70
+ }
71
+ async function main() {
72
+ const entries = await fetchEntriesForDateWithTag("8546f6a84641406bafb2358762281e81", moment().format("YYYY-MM-DD"), "Dungeon Keeper");
73
+ const user = entries?.[0];
74
+ if (!user) {
75
+ throw "No dk found for today";
76
+ }
77
+ const notionId = (user?.properties["Qui ?"]).people[0].person.email
78
+ .replace("@angle.money", "")
79
+ .replace("@merkl.xyz", "");
80
+ await assignRole(notionId);
81
+ }
82
+ await main();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Redis } from "@/cache";
2
+ import { UniswapV4Service } from "@/modules/v4/uniswapV4";
3
+ async function main() {
4
+ try {
5
+ await Redis.safeSet("UniswapV4Pools", await UniswapV4Service.getPools());
6
+ process.exit(0);
7
+ }
8
+ catch (err) {
9
+ console.error("Failed to update Uniswap V4 pools cache.");
10
+ console.error(err);
11
+ process.exit(1);
12
+ }
13
+ }
14
+ await main();
@@ -16,6 +16,7 @@ const chainAddressToType = {
16
16
  "0x352180974C71f84a934953Cf49C4E538a6F9c997": tokenType.veda,
17
17
  "0xeDa663610638E6557c27e2f4e973D3393e844E70": tokenType.veda,
18
18
  "0xf0bb20865277aBd641a307eCe5Ee04E79073416C": tokenType.veda,
19
+ "0xFF94993fA7EA27Efc943645F95Adb36C1b81244b": tokenType.gearbox,
19
20
  },
20
21
  [ChainId.BOB]: {
21
22
  "0x9998e05030Aee3Af9AD3df35A34F5C51e1628779": tokenType.veda,
@@ -25,8 +26,5 @@ const chainAddressToType = {
25
26
  },
26
27
  };
27
28
  export function getTypeFromAddressChain(chain, token) {
28
- if (!!chainAddressToType[chain] && !!chainAddressToType[chain][token]) {
29
- return chainAddressToType[chain][token];
30
- }
31
- return tokenType.unknown;
29
+ return chainAddressToType?.[chain]?.[token] ?? tokenType.unknown;
32
30
  }
@@ -1,6 +1,6 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type Campaign, type CampaignParameters } from "@sdk";
3
- import type { BigNumber } from "ethers";
3
+ import { BigNumber } from "ethers";
4
4
  import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
5
5
  import type { tokenType } from "../helpers/tokenType";
6
6
  type callType = {
@@ -1,5 +1,6 @@
1
1
  import { generateCardName } from "@/utils/generateCardName";
2
2
  import { BN2Number } from "@sdk";
3
+ import { BigNumber } from "ethers";
3
4
  import { GenericProcessor } from "../GenericProcessor";
4
5
  export class HourglassProcessor extends GenericProcessor {
5
6
  rounds = {
@@ -20,6 +21,8 @@ export class HourglassProcessor extends GenericProcessor {
20
21
  const priceTargetToken = tvl / totalSupply;
21
22
  return {
22
23
  ...typeInfo,
24
+ decimalsUnderlying: Number(typeInfo.decimalsUnderlying),
25
+ balanceOfUnderlying: BigNumber.from(typeInfo.balanceOfUnderlying),
23
26
  whitelistedSupplyTargetToken,
24
27
  tvl: tvl,
25
28
  priceTargetToken,
@@ -6,6 +6,7 @@ export class SpliceProcessor extends GenericProcessor {
6
6
  const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
7
7
  const { symbolUnderlyingToken, priceTargetToken, tvl } = await fetchSpliceInformation(campaign.campaignParameters.targetToken);
8
8
  return {
9
+ ...typeInfo,
9
10
  totalSupply,
10
11
  priceTargetToken,
11
12
  tvl,
@@ -69,8 +69,8 @@ export async function SILODynamicData(chainId, campaigns) {
69
69
  symbol: campaign.campaignParameters.symbolTargetToken,
70
70
  })) ?? 0;
71
71
  let totalSupplyTargetToken = 0;
72
- const forwarders = campaign.campaignParameters.forwarders ??
73
- [];
72
+ const forwarders = (campaign.campaignParameters.forwarders ??
73
+ []);
74
74
  for (const _forwarder of forwarders) {
75
75
  if (_forwarder.forwarderType === Forwarder.ERC20) {
76
76
  try {
@@ -1,4 +1,4 @@
1
- import { type ChainId } from "@sdk";
1
+ import { type MerklChainId } from "@sdk";
2
2
  export type AmbientHolderType = {
3
3
  owner: string;
4
4
  base: string;
@@ -9,4 +9,4 @@ export type AmbientHolderType = {
9
9
  positionType: string;
10
10
  };
11
11
  export declare const holdersQuery: string;
12
- export declare function fetchAmbientPotentialPositions(poolId: string, chainId: ChainId): Promise<AmbientHolderType[]>;
12
+ export declare function fetchAmbientPotentialPositions(poolId: string, chainId: MerklChainId): Promise<AmbientHolderType[]>;
@@ -1,5 +1,5 @@
1
1
  import { Redis } from "@/cache";
2
- import { DOLOMITE_MARGIN_MAPPING, DolomiteInterface, DolomiteMargin__factory, ERC20Interface } from "@sdk";
2
+ import { DOLOMITE_MARGIN_MAPPING, DolomiteInterface, DolomiteMargin__factory, ERC20Interface, } from "@sdk";
3
3
  import { batchMulticallCallWithRetry } from "../../../utils/generic";
4
4
  import { providers } from "../../../utils/providers";
5
5
  export const getDomiteMarkets = async (chainId) => {
@@ -1,3 +1,5 @@
1
+ // @ts-nocheck
2
+ // import type { MerklChainId } from "@sdk";
1
3
  import axios from "axios";
2
4
  import { utils } from "ethers";
3
5
  export async function getDolomiteUserPositions(user, _chainId, dolomitePositionFetchingData) {