@merkl/api 0.21.36 → 0.21.38
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 +1758 -1351
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.js +1 -0
- package/dist/src/engine/implementations/Erc20/subTypes/detect.js +108 -97
- package/dist/src/engine/implementations/Erc20/subTypes/factories.js +8 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.js +38 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.js +83 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +30 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.js +65 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.js +94 -0
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +2 -1
- package/dist/src/engine/implementations/Erc20/subTypes/index.js +1 -0
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +2 -2
- package/dist/src/index.d.ts +545 -396
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +5 -1
- package/dist/src/modules/v4/campaign/campaign.service.js +41 -2
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +385 -240
- package/dist/src/modules/v4/campaign/campaign.test.controller.js +41 -15
- package/dist/src/modules/v4/creator/creator.controller.d.ts +157 -153
- package/dist/src/modules/v4/creator/creator.controller.js +11 -11
- package/dist/src/modules/v4/creator/creator.model.d.ts +2 -2
- package/dist/src/modules/v4/creator/creator.model.js +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.service.js +1 -1
- 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.repository.js +1 -1
- package/dist/src/modules/v4/router.d.ts +545 -396
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -127,7 +127,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
127
127
|
} & {
|
128
128
|
price?: number | null | undefined;
|
129
129
|
})[];
|
130
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
130
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "pinto" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
131
131
|
description: string;
|
132
132
|
howToSteps: string[];
|
133
133
|
depositUrl: string | undefined;
|
@@ -276,7 +276,7 @@ export declare abstract class CampaignService {
|
|
276
276
|
} & {
|
277
277
|
price?: number | null | undefined;
|
278
278
|
})[];
|
279
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
279
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "pinto" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
280
280
|
description: string;
|
281
281
|
howToSteps: string[];
|
282
282
|
depositUrl: string | undefined;
|
@@ -966,6 +966,10 @@ export declare abstract class CampaignService {
|
|
966
966
|
endTimestamp: any;
|
967
967
|
params: string;
|
968
968
|
};
|
969
|
+
static createFakeERC20Campaign(query: {
|
970
|
+
address: string;
|
971
|
+
chainId: ChainId;
|
972
|
+
}): Promise<CampaignParameters<CampaignType.ERC20>>;
|
969
973
|
static getWalletCount(campaignId: CampaignUnique | string): Promise<number>;
|
970
974
|
static getMetrics(campaignId: CampaignUnique | string): Promise<{
|
971
975
|
tvlRecords: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { HttpError } from "@/errors";
|
1
|
+
import { HttpError, NotFoundError } from "@/errors";
|
2
2
|
import { OpportunityService } from "@/modules/v4/opportunity/opportunity.service";
|
3
3
|
import { StatusService } from "@/modules/v4/status/status.service";
|
4
4
|
import { TokenService } from "@/modules/v4/token/token.service";
|
@@ -387,6 +387,46 @@ export class CampaignService {
|
|
387
387
|
params: JSON.stringify(fakeCampaign.campaignParameters),
|
388
388
|
};
|
389
389
|
}
|
390
|
+
static async createFakeERC20Campaign(query) {
|
391
|
+
const token = (await TokenService.findManyOrCreate([
|
392
|
+
{
|
393
|
+
address: query.address,
|
394
|
+
chainId: query.chainId,
|
395
|
+
},
|
396
|
+
]))?.[0];
|
397
|
+
if (!token)
|
398
|
+
throw new NotFoundError("Token not found");
|
399
|
+
const campaign = {
|
400
|
+
campaignId: token.address,
|
401
|
+
amount: "1000000000000000000", // 1 EXR in wei
|
402
|
+
campaignSubType: 0,
|
403
|
+
chainId: token.chainId,
|
404
|
+
computeChainId: token.chainId,
|
405
|
+
creator: "0xexamplecreatoraddress",
|
406
|
+
endTimestamp: 1672531199, // Example end timestamp
|
407
|
+
index: 0,
|
408
|
+
mainParameter: "0xexamplemainparameter",
|
409
|
+
rewardToken: token.address,
|
410
|
+
startTimestamp: 1672444800, // Example start timestamp
|
411
|
+
lastEligibilityRatio: 1,
|
412
|
+
campaignParameters: {
|
413
|
+
blacklist: [],
|
414
|
+
decimalsRewardToken: 18,
|
415
|
+
decimalsTargetToken: token.decimals,
|
416
|
+
duration: 30,
|
417
|
+
whitelist: [],
|
418
|
+
forwarders: [],
|
419
|
+
hooks: [],
|
420
|
+
shouldIgnore: false,
|
421
|
+
symbolRewardToken: token.symbol,
|
422
|
+
symbolTargetToken: "EXT",
|
423
|
+
targetToken: token.address,
|
424
|
+
},
|
425
|
+
campaignType: CampaignType.ERC20,
|
426
|
+
};
|
427
|
+
log.info(`using fake erc20 campaign on chain: ${NETWORK_LABELS[token.chainId]}`);
|
428
|
+
return campaign;
|
429
|
+
}
|
390
430
|
static async getWalletCount(campaignId) {
|
391
431
|
const id = typeof campaignId === "string" ? campaignId : CampaignService.hashId(campaignId);
|
392
432
|
const campaign = await CampaignRepository.findUniqueOrThrow(id, false);
|
@@ -401,7 +441,6 @@ export class CampaignService {
|
|
401
441
|
CampaignRepository.getDailyRewardsRecords(campaign),
|
402
442
|
CampaignRepository.getWalletCountOverTime(campaign),
|
403
443
|
]);
|
404
|
-
console.log("tvlRecords", tvlRecords);
|
405
444
|
return {
|
406
445
|
tvlRecords,
|
407
446
|
aprRecords,
|