@merkl/api 0.13.15 → 0.14.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 (43) hide show
  1. package/dist/src/backgroundJobs/index.js +2 -1
  2. package/dist/src/eden/index.d.ts +33 -3
  3. package/dist/src/entities/opportunity.js +4 -1
  4. package/dist/src/index.d.ts +13 -1
  5. package/dist/src/jobs/etl/pendings.js +3 -1
  6. package/dist/src/jobs/etl/reward-breakdowns.js +3 -1
  7. package/dist/src/jobs/etl/rewards.js +3 -1
  8. package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.d.ts +2 -1
  9. package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +1 -1
  10. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +2 -1
  11. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +83 -112
  12. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EulerBorrowProcessor.d.ts +8 -12
  13. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EulerBorrowProcessor.js +28 -24
  14. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EulerLendProcessor.d.ts +7 -11
  15. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EulerLendProcessor.js +20 -21
  16. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/GenericProcessor.d.ts +6 -5
  17. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/GenericProcessor.js +4 -4
  18. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MaverickBPProcessor.d.ts +1 -1
  19. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MaverickBPProcessor.js +1 -1
  20. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/NoLinkVaultProcessor.d.ts +1 -1
  21. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/NoLinkVaultProcessor.js +2 -2
  22. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/RfxProcessor.d.ts +1 -1
  23. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/RfxProcessor.js +1 -1
  24. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound2.d.ts +3 -2
  25. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound2.js +2 -2
  26. package/dist/src/libs/campaigns/campaignsDynamicData.js +1 -2
  27. package/dist/src/libs/campaigns/utils/getEulerV2Vaults.d.ts +2 -16
  28. package/dist/src/libs/campaigns/utils/getEulerV2Vaults.js +115 -57
  29. package/dist/src/modules/v4/bucket/bucket.model.d.ts +10 -0
  30. package/dist/src/modules/v4/bucket/bucket.model.js +85 -0
  31. package/dist/src/modules/v4/bucket/bucket.service.d.ts +8 -6
  32. package/dist/src/modules/v4/bucket/bucket.service.js +145 -83
  33. package/dist/src/modules/v4/campaign/campaign.repository.js +1 -2
  34. package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.js +1 -1
  35. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +16 -2
  36. package/dist/src/modules/v4/programPayload/programPayload.repository.js +113 -2
  37. package/dist/src/routes/v3/euler.d.ts +13 -1
  38. package/dist/src/routes/v3/euler.js +10 -2
  39. package/dist/src/routes/v3/router.d.ts +13 -1
  40. package/dist/tsconfig.package.tsbuildinfo +1 -1
  41. package/package.json +1 -1
  42. package/dist/src/libs/campaigns/campaignTypes/EulerDynamicData.d.ts +0 -3
  43. package/dist/src/libs/campaigns/campaignTypes/EulerDynamicData.js +0 -165
@@ -1,97 +1,159 @@
1
- import { log } from "../../../utils/logger";
2
1
  import { Storage } from "@google-cloud/storage";
2
+ import { S3Client, gzipSync } from "bun";
3
+ // ─── BucketService Class ─────────────────────────────────────────────────────
3
4
  export class BucketService {
4
- // ─── Upload A File ───────────────────────────────────────────────────
5
- static async upload(bucketName, filename, data, isPublic) {
6
- const storage = new Storage({ projectId: "angle-production-1" });
7
- const file = await storage.bucket(bucketName).file(filename);
8
- await file.save(data);
9
- if (isPublic)
10
- await file.makePublic();
11
- return `https://storage.googleapis.com/${bucketName}/${filename}`;
5
+ // ─── Private Properties ──────────────────────────────────────────────
6
+ #s3Client;
7
+ #gcsBucket;
8
+ #encoder;
9
+ #decoder;
10
+ // ─── Default Options ─────────────────────────────────────────────────────────
11
+ defaultUploadOptions = {
12
+ type: "text/plain",
13
+ compression: true,
14
+ overwrite: true,
15
+ isPublic: false,
16
+ transform: obj => `${JSON.stringify(obj)}`,
17
+ separator: "\n",
18
+ };
19
+ // ─── Constructor ─────────────────────────────────────────────────────
20
+ constructor(bucket) {
21
+ this.#s3Client = new S3Client({
22
+ accessKeyId: process.env.GCS_ACCESS_ID,
23
+ secretAccessKey: process.env.GCS_SECRET,
24
+ endpoint: process.env.GCS_ENDPOINT,
25
+ bucket,
26
+ });
27
+ this.#gcsBucket = new Storage().bucket(bucket);
28
+ this.#encoder = new TextEncoder();
29
+ this.#decoder = new TextDecoder();
12
30
  }
13
- // ─── Write An Object As A Stream ─────────────────────────────────────
14
- static async writeStreamToBucket(data, fileName, bucketName, projectID, hook = JSON.stringify, isPublic = false, withLog = true) {
15
- const storage = new Storage({ projectId: projectID });
16
- const bucket = storage.bucket(bucketName);
17
- const file = bucket.file(fileName);
18
- const [exist] = await file.exists();
19
- if (exist) {
31
+ // ─── Process And Upload Chunks Of Data ───────────────────────────────
32
+ async pushArray(filename, arr, options) {
33
+ // const start = performance.now();
34
+ // ─── Initialization ──────────────────────────────────────────
35
+ options = { ...this.defaultUploadOptions, ...options };
36
+ const file = this.#s3Client.file(filename);
37
+ const writer = file.writer({
38
+ retry: 2,
39
+ queueSize: 10,
40
+ partSize: 5 * 1024 * 1024,
41
+ type: options.type,
42
+ });
43
+ // ─── Objects Array To Uint8Array ─────────────────────────────
44
+ const sink = new Bun.ArrayBufferSink();
45
+ sink.start({
46
+ asUint8Array: true,
47
+ });
48
+ for (let i = 0; i < arr.length; i++)
49
+ sink.write(this.#encoder.encode(`${options.transform(arr[i])}${options.separator}`));
50
+ let data = sink.end();
51
+ if (options.compression)
52
+ data = gzipSync(data);
53
+ // ─── ReadableStream Initialization From Blob ─────────────────
54
+ const blob = new Blob([data]);
55
+ const stream = blob.stream(50 * 1024 * 1024);
56
+ const reader = stream.getReader();
57
+ // ─── Start Writing Data To Bucket ────────────────────────────
58
+ if (options.overwrite && (await file.exists()))
20
59
  await file.delete();
60
+ let bytes = 0;
61
+ try {
62
+ while (true) {
63
+ const { done, value } = await reader.read();
64
+ if (done)
65
+ break;
66
+ bytes += await writer.write(value);
67
+ }
68
+ await writer.end();
21
69
  }
22
- await file.save("", { resumable: false });
23
- await file.setMetadata({
24
- cacheControl: "public, max-age=300",
25
- });
26
- if (isPublic) {
27
- await file.makePublic();
70
+ finally {
71
+ reader.releaseLock();
28
72
  }
29
- const writeStream = file.createWriteStream({
30
- resumable: false,
31
- gzip: true, // Enable gzip compression
32
- });
33
- const streamPromise = new Promise((resolve, reject) => {
34
- writeStream.on("error", reject);
35
- writeStream.on("finish", resolve);
73
+ // ─── Setting Proper Metadata ─────────────────────────────────
74
+ if (options.compression)
75
+ await this.#gcsBucket.file(filename).setMetadata({ contentEncoding: "gzip" });
76
+ if (options.isPublic)
77
+ await this.#gcsBucket.makePublic();
78
+ // ─── Return The Number Of Bytes Written ──────────────────────
79
+ return bytes;
80
+ }
81
+ // ─── Upload Data To Bucket ───────────────────────────────────────────
82
+ async push(filename, text, options) {
83
+ // const start = performance.now();
84
+ // ─── Initialization ──────────────────────────────────────────
85
+ options = { ...this.defaultUploadOptions, ...options };
86
+ const file = this.#s3Client.file(filename);
87
+ const data = options.compression ? gzipSync(this.#encoder.encode(text)) : this.#encoder.encode(text);
88
+ const writer = file.writer({
89
+ retry: 2,
90
+ queueSize: 10,
91
+ partSize: 5 * 1024 * 1024,
92
+ type: options.type,
36
93
  });
37
- for (const d of data) {
38
- await writeStream.write(`${hook(d)}\n`);
94
+ const blob = new Blob([data]);
95
+ const stream = blob.stream(50 * 1024 * 1024);
96
+ const reader = stream.getReader();
97
+ if (options.overwrite && (await file.exists()))
98
+ await file.delete();
99
+ // ─── Start Writing Data To Bucket ────────────────────────────
100
+ let bytes = 0;
101
+ try {
102
+ while (true) {
103
+ const { done, value } = await reader.read();
104
+ if (done)
105
+ break;
106
+ bytes += await writer.write(value);
107
+ }
108
+ await writer.end();
39
109
  }
40
- await writeStream.end();
41
- await streamPromise;
42
- withLog && log.local(`✅ successfully updated https://storage.cloud.google.com/${bucketName}/${fileName}`);
43
- }
44
- // ─── Read An Object As A Stream ──────────────────────────────────────
45
- static async readStreamFromBucket(fileName, bucketName, projectID, hook = line => JSON.parse(line), withLog = true) {
46
- const storage = new Storage({ projectId: projectID });
47
- const bucket = storage.bucket(bucketName);
48
- const file = bucket.file(fileName);
49
- const [exists] = await file.exists();
50
- if (!exists) {
51
- throw new Error(`File ${fileName} does not exist in bucket ${bucketName}`);
110
+ finally {
111
+ reader.releaseLock();
52
112
  }
53
- return new Promise((resolve, reject) => {
54
- const data = [];
55
- let buffer = "";
56
- file
57
- .createReadStream({
58
- decompress: true,
59
- })
60
- .on("data", async (chunk) => {
61
- // instead of using callback functions here, we could use pipe streams
62
- buffer += chunk.toString();
63
- const lines = buffer.split("\n");
64
- buffer = lines.pop() || "";
65
- for (const line of lines) {
66
- if (line.trim()) {
67
- const res = hook(line);
68
- data.push(res);
69
- }
113
+ // ─── Setting Proper Metadata ─────────────────────────────────
114
+ if (options.compression)
115
+ await this.#gcsBucket.file(filename).setMetadata({ contentEncoding: "gzip" });
116
+ if (options.isPublic)
117
+ await this.#gcsBucket.makePublic();
118
+ // ─── Return The Number Of Bytes Written ──────────────────────
119
+ return bytes;
120
+ }
121
+ // ─── Download And Process Chunks Of Data ─────────────────────────────
122
+ async pullArray(filename, callback, separator = "\n") {
123
+ const file = this.#s3Client.file(filename);
124
+ if (!(await file.exists))
125
+ throw new Error("File does not exists.");
126
+ const stream = file.stream();
127
+ const data = [];
128
+ let buffer = "";
129
+ for await (const chunk of stream) {
130
+ buffer += this.#decoder.decode(chunk);
131
+ const lines = buffer.split(separator);
132
+ buffer = lines.pop() || "";
133
+ for (const line of lines) {
134
+ try {
135
+ data.push(callback(line));
70
136
  }
71
- })
72
- .on("error", reject)
73
- .on("end", async () => {
74
- if (buffer.trim()) {
75
- const res = hook(buffer);
76
- data.push(res);
137
+ catch (err) {
138
+ if (err instanceof Error && err.message === "JSON Parse error: Unexpected EOF")
139
+ break;
77
140
  }
78
- withLog &&
79
- log.local(`✅ Successfully read ${data.length} items from https://storage.cloud.google.com/${bucketName}/${fileName}`);
80
- resolve(data);
81
- });
82
- });
83
- }
84
- // ─── Delete A File ───────────────────────────────────────────────────
85
- static async deleteFile(fileName, bucketName, projectID) {
86
- const storage = new Storage({ projectId: projectID });
87
- const bucket = storage.bucket(bucketName);
88
- const file = bucket.file(fileName);
89
- await file.delete();
141
+ }
142
+ }
143
+ if (buffer.trim())
144
+ data.push(callback(buffer));
145
+ return data;
90
146
  }
91
- // ─── Check If A File Exists ──────────────────────────────────────────
92
- static async exists(fileName, bucketName, projectID) {
93
- const storage = new Storage({ projectId: projectID });
94
- const [exists] = await storage.bucket(bucketName).file(fileName).exists();
95
- return exists;
147
+ // ─── Download Data From Bucket ───────────────────────────────────────
148
+ async pull(filename) {
149
+ const file = this.#s3Client.file(filename);
150
+ if (!(await file.exists))
151
+ throw new Error("File does not exists.");
152
+ const stream = file.stream();
153
+ let buffer = "";
154
+ for await (const chunk of stream)
155
+ buffer += this.#decoder.decode(chunk);
156
+ buffer = buffer.trim();
157
+ return buffer;
96
158
  }
97
159
  }
@@ -3,7 +3,7 @@ import { log } from "../../../utils/logger";
3
3
  import { apiDbClient, engineDbClient } from "../../../utils/prisma";
4
4
  import { ALL_CAMPAIGNS_FOR_CHAIN_AFTER } from "../../../utils/queries/allCampaigns";
5
5
  import { Prisma, RunStatus } from "../../../../database/api/.generated";
6
- import { MAX_COMPUTE_JOB_TIME, WEEK } from "@sdk";
6
+ import { MAX_COMPUTE_JOB_TIME } from "@sdk";
7
7
  import moment from "moment";
8
8
  import { OpportunityService } from "../opportunity";
9
9
  import { TokenService } from "../token";
@@ -235,7 +235,6 @@ export class CampaignRepository {
235
235
  where: {
236
236
  distributionChainId,
237
237
  startTimestamp: { lte: currentTime }, // The campaign has started
238
- endTimestamp: { gte: currentTime - WEEK }, // The campaign ended less than a week ago
239
238
  params: {
240
239
  path: ["shouldIgnore"],
241
240
  equals: Prisma.AnyNull,
@@ -18,7 +18,7 @@ export const getErc20Metadata = async (computeChainId, distributionChainId, camp
18
18
  campaignParameters: params,
19
19
  },
20
20
  ]);
21
- action = "HOLD"; // In case the protocol doesn't exist, initialize it to HOLD
21
+ action = dynamicData?.typeInfo?.action;
22
22
  name = dynamicData?.typeInfo?.cardName;
23
23
  mainProtocolId = dynamicData?.typeInfo?.protocol?.toLowerCase().replace(" ", "");
24
24
  const protocol = (await ProtocolService.findMany({ id: mainProtocolId }))?.[0];
@@ -3,7 +3,14 @@ export declare enum program {
3
3
  Puffer = "Puffer",
4
4
  ZkSync = "ZkSync",
5
5
  Mode = "Mode",
6
- Vicuna = "Vicuna"
6
+ Vicuna = "Vicuna",
7
+ Sonicmarket = "Sonicmarket"
8
+ }
9
+ export declare enum sonicmarketCampaigns {
10
+ USDCe_S_Vault_Sonic_Market = "USDC.e/S Vault Sonic Market 0x46107Ec44112675689053b96aea2127fD952bd47",
11
+ wS_USDCe_V2_Pool_Sonic_Market = "wS/USDC.e V2 Pool Sonic Market 0x0D0Abc4e8AFDfb5257fA455dFAf18f79df11065c",
12
+ ONIC_wS_V2_Pool_Sonic_Market = "ONIC/xS V2 Pool Sonic Market 0xF64a4542AeC6Bba0c52b7F0D7823A81FE3c33850",
13
+ stS_wS_V2_Pool_Sonic_Market = "stS/wS V2 Pool Sonic Market 0xb44119E9F6369438A51eAdd0Fe15b94Fa296dEE9"
7
14
  }
8
15
  export declare enum vicunaCampaigns {
9
16
  wS_USDC_Equalizer_Vault_Vicuna = "wS/USDC Equalizer Vault 0xc83CE82CEb536a6bCf6678EC4B308A6739057050",
@@ -251,10 +258,17 @@ export declare enum modeCampaigns {
251
258
  Kim_V4_WETH_MODE_Mode = "Kim V4 WETH/Mode 0x8cfE2A02dfBAbC56aE7e573170E35f88A38BeA55",
252
259
  Kim_Steer_CRS_V2_KIM_MODE_Mode = "Kim Steer CRS V2 Kim/Mode 0x86D9d9dd7A2c3146c6FAd51646F210Cb2E5FC12F",
253
260
  Kim_Steer_CRS_V2_and_EES_V2_WETH_USDT = "Kim Steer CRS V2 & EES V2 WETH/USDT 0xD8Abc2be7AD5D17940112969973357a3a3562998",
261
+ Kim_Ichi_SSD_Mode_Kim = "Kim Ichi SSD Mode/Kim 0x86d9d9dd7a2c3146c6fad51646f210cb2e5fc12f",
262
+ Kim_Steer_SSS_V2_weETH_ETH = "Kim Steer SSS V2 weETH/ETH 0xe24c8feb38ca2b18b542994bfba7e70880171035",
263
+ Kim_Ichi_SSD_wMLT_Mode = "Kim Ichi SSD wMLT/Mode 0xa186548320bdb79c714719e107ad5753ecb452d4",
264
+ Kim_Steer_CRS_V2_ezETH_ETH = "Kim Steer CRS V2 ezETH/ETH 0xd9a06f63e523757973ffd1a4606a1260252636d2",
254
265
  Ironclad_Borrow_uniBTC_Mode = "Ironclad Borrow uniBTC 0x80215c38DCb6ae91520F8251A077c124e7259688",
255
266
  Bedrock_Ionic_Supply_ionuniBTC_Mode = "Bedrock Ionic Supply uniBTC 0xa48750877a83f7dec11f722178c317b54a44d142",
256
267
  Bedrock_Ironclad_Supply_uniBTC_Mode = "Bedrock Ironclad Supply uniBTC 0x0F041cf2ae959f39215EFfB50d681Df55D4d90B1"
257
268
  }
269
+ declare const SonicmarketInterfaceCampaigns: {
270
+ [key in sonicmarketCampaigns]: partialConfig;
271
+ };
258
272
  declare const VicunaInterfaceCampaigns: {
259
273
  [key in vicunaCampaigns]: partialConfig;
260
274
  };
@@ -268,6 +282,6 @@ declare const PufferInterfaceCampaigns: {
268
282
  [key in pufferCampaigns]: partialConfig;
269
283
  };
270
284
  export declare const MerklInterfaceCampaigns: {
271
- [key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns;
285
+ [key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns | typeof SonicmarketInterfaceCampaigns;
272
286
  };
273
287
  export {};
@@ -5,7 +5,15 @@ export var program;
5
5
  program["ZkSync"] = "ZkSync";
6
6
  program["Mode"] = "Mode";
7
7
  program["Vicuna"] = "Vicuna";
8
+ program["Sonicmarket"] = "Sonicmarket";
8
9
  })(program || (program = {}));
10
+ export var sonicmarketCampaigns;
11
+ (function (sonicmarketCampaigns) {
12
+ sonicmarketCampaigns["USDCe_S_Vault_Sonic_Market"] = "USDC.e/S Vault Sonic Market 0x46107Ec44112675689053b96aea2127fD952bd47";
13
+ sonicmarketCampaigns["wS_USDCe_V2_Pool_Sonic_Market"] = "wS/USDC.e V2 Pool Sonic Market 0x0D0Abc4e8AFDfb5257fA455dFAf18f79df11065c";
14
+ sonicmarketCampaigns["ONIC_wS_V2_Pool_Sonic_Market"] = "ONIC/xS V2 Pool Sonic Market 0xF64a4542AeC6Bba0c52b7F0D7823A81FE3c33850";
15
+ sonicmarketCampaigns["stS_wS_V2_Pool_Sonic_Market"] = "stS/wS V2 Pool Sonic Market 0xb44119E9F6369438A51eAdd0Fe15b94Fa296dEE9";
16
+ })(sonicmarketCampaigns || (sonicmarketCampaigns = {}));
9
17
  export var vicunaCampaigns;
10
18
  (function (vicunaCampaigns) {
11
19
  vicunaCampaigns["wS_USDC_Equalizer_Vault_Vicuna"] = "wS/USDC Equalizer Vault 0xc83CE82CEb536a6bCf6678EC4B308A6739057050";
@@ -256,10 +264,56 @@ export var modeCampaigns;
256
264
  modeCampaigns["Kim_V4_WETH_MODE_Mode"] = "Kim V4 WETH/Mode 0x8cfE2A02dfBAbC56aE7e573170E35f88A38BeA55";
257
265
  modeCampaigns["Kim_Steer_CRS_V2_KIM_MODE_Mode"] = "Kim Steer CRS V2 Kim/Mode 0x86D9d9dd7A2c3146c6FAd51646F210Cb2E5FC12F";
258
266
  modeCampaigns["Kim_Steer_CRS_V2_and_EES_V2_WETH_USDT"] = "Kim Steer CRS V2 & EES V2 WETH/USDT 0xD8Abc2be7AD5D17940112969973357a3a3562998";
267
+ modeCampaigns["Kim_Ichi_SSD_Mode_Kim"] = "Kim Ichi SSD Mode/Kim 0x86d9d9dd7a2c3146c6fad51646f210cb2e5fc12f";
268
+ modeCampaigns["Kim_Steer_SSS_V2_weETH_ETH"] = "Kim Steer SSS V2 weETH/ETH 0xe24c8feb38ca2b18b542994bfba7e70880171035";
269
+ modeCampaigns["Kim_Ichi_SSD_wMLT_Mode"] = "Kim Ichi SSD wMLT/Mode 0xa186548320bdb79c714719e107ad5753ecb452d4";
270
+ modeCampaigns["Kim_Steer_CRS_V2_ezETH_ETH"] = "Kim Steer CRS V2 ezETH/ETH 0xd9a06f63e523757973ffd1a4606a1260252636d2";
259
271
  modeCampaigns["Ironclad_Borrow_uniBTC_Mode"] = "Ironclad Borrow uniBTC 0x80215c38DCb6ae91520F8251A077c124e7259688";
260
272
  modeCampaigns["Bedrock_Ionic_Supply_ionuniBTC_Mode"] = "Bedrock Ionic Supply uniBTC 0xa48750877a83f7dec11f722178c317b54a44d142";
261
273
  modeCampaigns["Bedrock_Ironclad_Supply_uniBTC_Mode"] = "Bedrock Ironclad Supply uniBTC 0x0F041cf2ae959f39215EFfB50d681Df55D4d90B1";
262
274
  })(modeCampaigns || (modeCampaigns = {}));
275
+ const SonicmarketInterfaceCampaigns = {
276
+ [sonicmarketCampaigns.USDCe_S_Vault_Sonic_Market]: {
277
+ campaignType: Campaign.ERC20,
278
+ computeChainId: ChainId.SONIC,
279
+ hooks: [],
280
+ targetToken: "0x46107Ec44112675689053b96aea2127fD952bd47",
281
+ whitelist: [],
282
+ blacklist: [],
283
+ url: "https://www.sonic.market/earn/0xdd6d9c6af47561f04ad759cc06c34e342ef5a813553f4552c2c705bab8f1eef6?chain=146",
284
+ forwarders: [],
285
+ },
286
+ [sonicmarketCampaigns.wS_USDCe_V2_Pool_Sonic_Market]: {
287
+ campaignType: Campaign.ERC20,
288
+ computeChainId: ChainId.SONIC,
289
+ hooks: [],
290
+ targetToken: "0x0D0Abc4e8AFDfb5257fA455dFAf18f79df11065c",
291
+ whitelist: [],
292
+ blacklist: [],
293
+ url: "https://www.sonic.market/pool/manage?token0=0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38&token1=0x29219dd400f2Bf60E5a23d13Be72B486D4038894&chain=146",
294
+ forwarders: [],
295
+ },
296
+ [sonicmarketCampaigns.ONIC_wS_V2_Pool_Sonic_Market]: {
297
+ campaignType: Campaign.ERC20,
298
+ computeChainId: ChainId.SONIC,
299
+ hooks: [],
300
+ targetToken: "0xF64a4542AeC6Bba0c52b7F0D7823A81FE3c33850",
301
+ whitelist: [],
302
+ blacklist: [],
303
+ url: "https://www.sonic.market/pool/manage?token0=0x125E7B3A715d2A8c5a8518301C7E4356ff54b7A0&token1=0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38&chain=146",
304
+ forwarders: [],
305
+ },
306
+ [sonicmarketCampaigns.stS_wS_V2_Pool_Sonic_Market]: {
307
+ campaignType: Campaign.ERC20,
308
+ computeChainId: ChainId.SONIC,
309
+ hooks: [],
310
+ targetToken: "0xb44119E9F6369438A51eAdd0Fe15b94Fa296dEE9",
311
+ whitelist: [],
312
+ blacklist: [],
313
+ url: "https://www.sonic.market/pool/manage?token0=0xE5DA20F15420aD15DE0fa650600aFc998bbE3955&token1=0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38&chain=146",
314
+ forwarders: [],
315
+ },
316
+ };
263
317
  const VicunaInterfaceCampaigns = {
264
318
  [vicunaCampaigns.wS_USDC_Equalizer_Vault_Vicuna]: {
265
319
  campaignType: Campaign.ERC20,
@@ -1581,7 +1635,7 @@ const ModeInterfaceCampaigns = {
1581
1635
  campaignType: Campaign.CLAMM,
1582
1636
  computeChainId: ChainId.MODE,
1583
1637
  hooks: [],
1584
- poolAddress: "0x879F9998c68cdaF28e4808fCc2b4f174c3CC5D97",
1638
+ poolAddress: "0xd8abc2be7ad5d17940112969973357a3a3562998",
1585
1639
  whitelist: ["0x879F9998c68cdaF28e4808fCc2b4f174c3CC5D97", "0x908731366f82668dDd3aE3B2498ADF52604E892d"],
1586
1640
  blacklist: [],
1587
1641
  url: "https://app.kim.exchange/liquidity/wizard?token0=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&token1=0xf0f161fda2712db8b566946122a5af183995e2ed",
@@ -1591,6 +1645,20 @@ const ModeInterfaceCampaigns = {
1591
1645
  weightToken0: 4000,
1592
1646
  weightToken1: 4000,
1593
1647
  },
1648
+ [modeCampaigns.Kim_Ichi_SSD_Mode_Kim]: {
1649
+ campaignType: Campaign.CLAMM,
1650
+ computeChainId: ChainId.MODE,
1651
+ hooks: [],
1652
+ poolAddress: "0x86D9d9dd7A2c3146c6FAd51646F210Cb2E5FC12F",
1653
+ whitelist: ["0x70F4A63DD7e81Cf43B8b0E1cf09a8fc70B7C278b"],
1654
+ blacklist: [],
1655
+ url: "https://app.kim.exchange/pools/vaults/ichi/0x70f4a63dd7e81cf43b8b0e1cf09a8fc70b7c278b",
1656
+ forwarders: [],
1657
+ isOutOfRangeIncentivized: false,
1658
+ weightFees: 2000,
1659
+ weightToken0: 4000,
1660
+ weightToken1: 4000,
1661
+ },
1594
1662
  [modeCampaigns.Kim_Gamma_WETH_KIM_Mode]: {
1595
1663
  campaignType: Campaign.CLAMM,
1596
1664
  computeChainId: ChainId.MODE,
@@ -1678,6 +1746,48 @@ const ModeInterfaceCampaigns = {
1678
1746
  weightToken0: 4000,
1679
1747
  weightToken1: 4000,
1680
1748
  },
1749
+ [modeCampaigns.Kim_Steer_SSS_V2_weETH_ETH]: {
1750
+ campaignType: Campaign.CLAMM,
1751
+ computeChainId: ChainId.MODE,
1752
+ hooks: [],
1753
+ poolAddress: "0xE24C8feB38ca2B18b542994BFBA7E70880171035",
1754
+ whitelist: ["0x5Aa27D5d8aff8Cd5e683e23812124AcE4aA5af7D"],
1755
+ blacklist: [],
1756
+ url: "https://app.kim.exchange/pools/vaults/0x5aa27d5d8aff8cd5e683e23812124ace4aa5af7d",
1757
+ forwarders: [],
1758
+ isOutOfRangeIncentivized: false,
1759
+ weightFees: 2000,
1760
+ weightToken0: 4000,
1761
+ weightToken1: 4000,
1762
+ },
1763
+ [modeCampaigns.Kim_Steer_CRS_V2_ezETH_ETH]: {
1764
+ campaignType: Campaign.CLAMM,
1765
+ computeChainId: ChainId.MODE,
1766
+ hooks: [],
1767
+ poolAddress: "0xD9a06f63E523757973ffd1a4606A1260252636D2",
1768
+ whitelist: ["0x83556D8bBa69bdD159f50B2127ccc88bebF73e39"],
1769
+ blacklist: [],
1770
+ url: "https://app.kim.exchange/pools/vaults/0x83556d8bba69bdd159f50b2127ccc88bebf73e39",
1771
+ forwarders: [],
1772
+ isOutOfRangeIncentivized: false,
1773
+ weightFees: 2000,
1774
+ weightToken0: 4000,
1775
+ weightToken1: 4000,
1776
+ },
1777
+ [modeCampaigns.Kim_Ichi_SSD_wMLT_Mode]: {
1778
+ campaignType: Campaign.CLAMM,
1779
+ computeChainId: ChainId.MODE,
1780
+ hooks: [],
1781
+ poolAddress: "0xA186548320Bdb79c714719e107aD5753eCb452d4",
1782
+ whitelist: ["0x2660F0291F62FE9ce515b88B8080ce829e5c01c3"],
1783
+ blacklist: [],
1784
+ url: "https://app.kim.exchange/pools/vaults/ichi/0x2660f0291f62fe9ce515b88b8080ce829e5c01c3",
1785
+ forwarders: [],
1786
+ isOutOfRangeIncentivized: false,
1787
+ weightFees: 2000,
1788
+ weightToken0: 4000,
1789
+ weightToken1: 4000,
1790
+ },
1681
1791
  [modeCampaigns.Kim_V4_WETH_MODE_Mode]: {
1682
1792
  campaignType: Campaign.CLAMM,
1683
1793
  computeChainId: ChainId.MODE,
@@ -3148,7 +3258,7 @@ const PufferInterfaceCampaigns = {
3148
3258
  "0xBDB04e915B94FbFD6e8552ff7860E59Db7d4499a",
3149
3259
  "0xE0ee5dDeBFe0abe0a4Af50299D68b74Cec31668e",
3150
3260
  ],
3151
- url: "https://etherscan.io/token/0xd9a442856c234a39a81a089c06451ebaa4306a72",
3261
+ url: "https://app.puffer.fi/stake",
3152
3262
  forwarders: [],
3153
3263
  },
3154
3264
  [pufferCampaigns.unifiETH_hold]: {
@@ -3259,4 +3369,5 @@ export const MerklInterfaceCampaigns = {
3259
3369
  [program.ZkSync]: ZkSyncInterfaceCampaigns,
3260
3370
  [program.Mode]: ModeInterfaceCampaigns,
3261
3371
  [program.Vicuna]: VicunaInterfaceCampaigns,
3372
+ [program.Sonicmarket]: SonicmarketInterfaceCampaigns,
3262
3373
  };
@@ -25,7 +25,19 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
25
25
  query: {};
26
26
  headers: unknown;
27
27
  response: {
28
- 200: import("../../libs/campaigns/utils/getEulerV2Vaults").EulerVaultType[];
28
+ 200: EulerVaultType[];
29
+ };
30
+ };
31
+ };
32
+ } & {
33
+ "euler-update-collat": {
34
+ get: {
35
+ body: unknown;
36
+ params: {};
37
+ query: {};
38
+ headers: unknown;
39
+ response: {
40
+ 200: void;
29
41
  };
30
42
  };
31
43
  };
@@ -1,9 +1,17 @@
1
- import { getEulerV2VaultsWithCache } from "../../libs/campaigns/utils/getEulerV2Vaults";
1
+ import { getEulerV2VaultsWithCache, updateEulerVaultsCollatInDatabase } from "../../libs/campaigns/utils/getEulerV2Vaults";
2
2
  import { t } from "elysia";
3
3
  export const response = t.Array(t.Object({ address: t.String(), asset: t.String(), chaind: t.Number(), debtTokenAddress: t.String() }));
4
- export default (app) => app.get("/euler", async () => {
4
+ export default (app) => app
5
+ .get("/euler", async () => {
5
6
  return await getEulerV2VaultsWithCache();
6
7
  }, {
7
8
  query: t.Object({}),
8
9
  tags: ["euler"],
10
+ })
11
+ // DO NOT MODIFY THIS LINE, USED FOR DEBUGGING PURPOSES
12
+ .get("/euler-update-collat", async () => {
13
+ return await updateEulerVaultsCollatInDatabase();
14
+ }, {
15
+ query: t.Object({}),
16
+ tags: ["euler"],
9
17
  });
@@ -262,7 +262,19 @@ export declare const v3: Elysia<"/v3", false, {
262
262
  query: {};
263
263
  headers: unknown;
264
264
  response: {
265
- 200: import("../../libs/campaigns/utils/getEulerV2Vaults").EulerVaultType[];
265
+ 200: EulerVaultType[];
266
+ };
267
+ };
268
+ };
269
+ } & {
270
+ "euler-update-collat": {
271
+ get: {
272
+ body: unknown;
273
+ params: {};
274
+ query: {};
275
+ headers: unknown;
276
+ response: {
277
+ 200: void;
266
278
  };
267
279
  };
268
280
  };