@merkl/api 0.21.19 → 0.21.21
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/database/api/.generated/drizzle/schema.d.ts +34 -0
- package/dist/database/api/.generated/drizzle/schema.js +3 -1
- package/dist/database/api/.generated/drizzle/schema.ts +3 -1
- package/dist/database/api/.generated/edge.js +6 -4
- package/dist/database/api/.generated/index-browser.js +3 -1
- package/dist/database/api/.generated/index.d.ts +86 -2
- package/dist/database/api/.generated/index.js +6 -4
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +2 -0
- package/dist/database/api/.generated/wasm.js +3 -1
- package/dist/src/eden/index.d.ts +1443 -1415
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.js +1 -18
- package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.js +1 -1
- package/dist/src/engine/implementations/Clamm/metadata.js +1 -0
- package/dist/src/index.d.ts +970 -960
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +8 -1
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +1 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +18 -0
- package/dist/src/modules/v4/campaign/campaign.repository.js +15 -1
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +4 -1
- package/dist/src/modules/v4/campaign/campaign.service.js +9 -4
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +2 -0
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +2 -0
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +2 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +3 -2
- package/dist/src/modules/v4/creator/creator.service.d.ts +3 -2
- package/dist/src/modules/v4/creator/creator.service.js +9 -2
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +6 -11
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +970 -960
- package/dist/src/modules/v4/opportunity/opportunity.controller.js +32 -46
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +10 -1
- package/dist/src/modules/v4/protocol/protocol.controller.js +4 -15
- package/dist/src/modules/v4/router.d.ts +970 -960
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -4,7 +4,6 @@ import { getTokenTypeRound2 } from "@/engine/deprecated/erc20SubTypeProcessors/s
|
|
4
4
|
import { getTokenTypeRound3 } from "@/engine/deprecated/erc20SubTypeProcessors/subtypesRound3";
|
5
5
|
import { getTokenTypeRound4 } from "@/engine/deprecated/erc20SubTypeProcessors/subtypesRound4";
|
6
6
|
import { Erc20SubType } from "@/engine/implementations/Erc20/subTypes";
|
7
|
-
import { ComputedValueService } from "@/modules/v4/computedValue/computedValue.service";
|
8
7
|
import { TokenRepository } from "@/modules/v4/token/token.repository";
|
9
8
|
import { TokenService } from "@/modules/v4/token/token.service";
|
10
9
|
import { log } from "@/utils/logger";
|
@@ -132,22 +131,7 @@ export class Erc20DynamicData {
|
|
132
131
|
const whitelistedSupplyTargetToken = tokenTypesByCampaign[campaign.campaignId].typeInfo.whitelistedSupplyTargetToken;
|
133
132
|
const totalSupplyTargetToken = whitelistedSupplyTargetToken;
|
134
133
|
const priceTargetToken = tokenTypesByCampaign[campaign.campaignId].typeInfo.priceTargetToken;
|
135
|
-
let
|
136
|
-
if (!!campaign.campaignParameters.hooks?.length) {
|
137
|
-
lastEligibilityRatio =
|
138
|
-
(await ComputedValueService.findCampaignValue(Bun.hash(`${campaign.chainId}${campaign.campaignId}`).toString(), "averageBoost"))?.averageBoost ?? 1;
|
139
|
-
}
|
140
|
-
const forfeitingBoost = 1;
|
141
|
-
if (!!campaign.campaignParameters.hooks?.length) {
|
142
|
-
lastEligibilityRatio =
|
143
|
-
(await ComputedValueService.findCampaignValue(Bun.hash(`${campaign.chainId}${campaign.campaignId}`).toString(), "forfeitingBoost"))?.forfeitingBoost ?? 1;
|
144
|
-
}
|
145
|
-
let apr = (lastEligibilityRatio *
|
146
|
-
forfeitingBoost *
|
147
|
-
(priceRewardToken *
|
148
|
-
BN2Number(campaign.amount, campaign.campaignParameters.decimalsRewardToken) *
|
149
|
-
YEAR *
|
150
|
-
100)) /
|
134
|
+
let apr = (priceRewardToken * BN2Number(campaign.amount, campaign.campaignParameters.decimalsRewardToken) * YEAR * 100) /
|
151
135
|
campaign.campaignParameters.duration /
|
152
136
|
(whitelistedSupplyTargetToken * priceTargetToken);
|
153
137
|
const rewardTokens = await TokenService.findManyOrCreate([
|
@@ -171,7 +155,6 @@ export class Erc20DynamicData {
|
|
171
155
|
type: tokenTypesByCampaign[campaign.campaignId].type,
|
172
156
|
typeInfo: tokenTypesByCampaign[campaign.campaignId].typeInfo,
|
173
157
|
priceRewardToken: priceRewardToken,
|
174
|
-
lastEligibilityRatio,
|
175
158
|
});
|
176
159
|
}
|
177
160
|
return dynamicData;
|
@@ -25,7 +25,7 @@ async function getCompoundV2ForksVaults() {
|
|
25
25
|
const creationBlock = (await getContractCreationBlock(comptrollerAddress, providers[chainId])) ?? 0;
|
26
26
|
let logs = [];
|
27
27
|
let topic;
|
28
|
-
if (compFork === CompFork.Venus && (chainId === ChainId.ZKSYNC || chainId === ChainId.
|
28
|
+
if (compFork === CompFork.Venus && (chainId === ChainId.ZKSYNC || chainId === ChainId.UNICHAIN)) {
|
29
29
|
topic = MARKET_SUPPORTED_EVENT_HASH;
|
30
30
|
}
|
31
31
|
else if (compFork === CompFork.Enclabs) {
|
@@ -162,6 +162,7 @@ export class ClammMetadata {
|
|
162
162
|
SwapX: () => "https://swapx.fi/earn",
|
163
163
|
ZERO: () => "https://www.zkzero.fi/",
|
164
164
|
Hyperswap: () => "https://hyperswap.exchange/",
|
165
|
+
SpookyswapV3: () => "https://spooky.fi/",
|
165
166
|
};
|
166
167
|
let ammString = params.amm.toString();
|
167
168
|
try {
|