@merkl/api 0.10.279 → 0.10.281
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 +80 -39
- package/dist/src/index.d.ts +30 -13
- package/dist/src/libs/campaigns/campaignTypes/CLAMMDynamicData.js +2 -8
- package/dist/src/modules/v4/boost/boost.controller.d.ts +44 -0
- package/dist/src/modules/v4/boost/boost.controller.js +14 -0
- package/dist/src/modules/v4/boost/boost.model.d.ts +6 -0
- package/dist/src/modules/v4/boost/boost.model.js +10 -0
- package/dist/src/modules/v4/boost/boost.service.d.ts +3 -0
- package/dist/src/modules/v4/boost/boost.service.js +6 -0
- package/dist/src/modules/v4/boost/index.d.ts +2 -0
- package/dist/src/modules/v4/boost/index.js +2 -0
- package/dist/src/modules/v4/enso/enso.model.d.ts +3 -2
- package/dist/src/modules/v4/enso/enso.model.js +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +2 -2
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/reward/reward.controller.d.ts +5 -12
- package/dist/src/modules/v4/reward/reward.model.d.ts +1 -8
- package/dist/src/modules/v4/reward/reward.model.js +1 -2
- package/dist/src/modules/v4/reward/reward.repository.d.ts +6 -0
- package/dist/src/modules/v4/reward/reward.repository.js +19 -0
- package/dist/src/modules/v4/reward/reward.service.js +12 -7
- package/dist/src/modules/v4/router.d.ts +30 -13
- package/dist/src/modules/v4/router.js +3 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -238,14 +238,19 @@ export class RewardService {
|
|
238
238
|
distributionChain: data.distributionChainId,
|
239
239
|
campaignId: data.campaignId,
|
240
240
|
});
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
241
|
+
const ids = (await RewardRepository.findManyBreakdownUniques(rewardTokenId, data.root, campaignId)).map(({ Reward, reason }) => Bun.hash(`${Reward.recipient}${reason}`).toString());
|
242
|
+
const toUpdate = [];
|
243
|
+
const toCreate = [];
|
244
|
+
for (const point of data.data) {
|
245
|
+
if (ids.includes(Bun.hash(`${point.recipient}${point.reason}`).toString())) {
|
246
|
+
toUpdate.push(point);
|
247
|
+
}
|
248
|
+
else {
|
249
|
+
toCreate.push(point);
|
250
|
+
}
|
247
251
|
}
|
248
|
-
await RewardRepository.
|
252
|
+
await RewardRepository.updatePendings(rewardTokenId, data.root, campaignId, toUpdate);
|
253
|
+
await RewardRepository.createPendings(rewardTokenId, data.root, campaignId, toCreate);
|
249
254
|
return true;
|
250
255
|
}
|
251
256
|
static async countAllchains() {
|
@@ -99,7 +99,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
99
99
|
} & {
|
100
100
|
price?: number | null | undefined;
|
101
101
|
})[];
|
102
|
-
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
102
|
+
mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
|
103
103
|
depositUrl: any;
|
104
104
|
tags: string[];
|
105
105
|
};
|
@@ -1225,24 +1225,17 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1225
1225
|
pendings: {
|
1226
1226
|
post: {
|
1227
1227
|
body: {
|
1228
|
-
|
1229
|
-
campaignId: string;
|
1230
|
-
root: string;
|
1231
|
-
rewardToken: string;
|
1232
|
-
toUpdate: {
|
1233
|
-
auxiliaryData1?: string | undefined;
|
1234
|
-
auxiliaryData2?: string | undefined;
|
1235
|
-
reason: string;
|
1236
|
-
pending: string;
|
1237
|
-
recipient: string;
|
1238
|
-
}[];
|
1239
|
-
toCreate: {
|
1228
|
+
data: {
|
1240
1229
|
auxiliaryData1?: string | undefined;
|
1241
1230
|
auxiliaryData2?: string | undefined;
|
1242
1231
|
reason: string;
|
1243
1232
|
pending: string;
|
1244
1233
|
recipient: string;
|
1245
1234
|
}[];
|
1235
|
+
distributionChainId: number;
|
1236
|
+
campaignId: string;
|
1237
|
+
root: string;
|
1238
|
+
rewardToken: string;
|
1246
1239
|
};
|
1247
1240
|
params: {};
|
1248
1241
|
query: unknown;
|
@@ -2635,6 +2628,30 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2635
2628
|
};
|
2636
2629
|
};
|
2637
2630
|
};
|
2631
|
+
} & {
|
2632
|
+
v4: {
|
2633
|
+
boosts: {
|
2634
|
+
euler: {
|
2635
|
+
post: {
|
2636
|
+
body: {
|
2637
|
+
addresses: string[];
|
2638
|
+
} | {
|
2639
|
+
address: string;
|
2640
|
+
score: string;
|
2641
|
+
}[];
|
2642
|
+
params: {};
|
2643
|
+
query: unknown;
|
2644
|
+
headers: {
|
2645
|
+
authorization: string;
|
2646
|
+
};
|
2647
|
+
response: {
|
2648
|
+
[x: string]: any;
|
2649
|
+
200: any;
|
2650
|
+
};
|
2651
|
+
};
|
2652
|
+
};
|
2653
|
+
};
|
2654
|
+
};
|
2638
2655
|
}, {
|
2639
2656
|
derive: {};
|
2640
2657
|
resolve: {};
|
@@ -15,6 +15,7 @@ import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
15
15
|
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";
|
16
16
|
import { PrismaInstrumentation } from "@prisma/instrumentation";
|
17
17
|
import Elysia from "elysia";
|
18
|
+
import { BoostController } from "./boost";
|
18
19
|
import { ClaimController } from "./claims";
|
19
20
|
import { DynamicDataController } from "./dynamicData";
|
20
21
|
import { InteractionController } from "./interaction/interaction.controller";
|
@@ -63,4 +64,5 @@ export const v4 = new Elysia({ tags: ["v4"], prefix: "/v4" })
|
|
63
64
|
.use(StatusController)
|
64
65
|
.use(LiquidityController)
|
65
66
|
.use(ClaimController)
|
66
|
-
.use(ProgramPayloadController)
|
67
|
+
.use(ProgramPayloadController)
|
68
|
+
.use(BoostController);
|