@merkl/api 0.16.30 → 0.16.32
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 +308 -63
- package/dist/src/index.d.ts +64 -19
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/GenericProcessor.d.ts +16 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/GenericProcessor.js +84 -10
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/ownerFinder.js +1 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +3 -3
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HanjiVaultProcessor.d.ts +43 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HanjiVaultProcessor.js +58 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/curveNPoolProcessor.js +0 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/processorMapping.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +17 -19
- package/dist/src/modules/v4/boost/boost.controller.d.ts +0 -19
- package/dist/src/modules/v4/boost/boost.controller.js +1 -2
- package/dist/src/modules/v4/boost/boost.service.d.ts +0 -4
- package/dist/src/modules/v4/boost/boost.service.js +0 -23
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +64 -0
- package/dist/src/modules/v4/campaign/campaign.controller.js +20 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +37 -0
- package/dist/src/modules/v4/campaign/campaign.repository.js +7 -0
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +37 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.js +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +69 -318
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +237 -54
- package/dist/src/modules/v4/router.d.ts +64 -19
- package/dist/src/modules/v4/token/token.service.js +2 -1
- package/dist/src/utils/decodeCalls.js +7 -1
- package/dist/src/utils/encodeCalls.js +17 -1
- package/dist/src/utils/generateCardName.d.ts +3 -0
- package/dist/src/utils/generateCardName.js +25 -3
- package/dist/src/utils/generateIcons.js +5 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/StakingProcessor.d.ts +0 -41
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/StakingProcessor.js +0 -70
package/package.json
CHANGED
package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/StakingProcessor.d.ts
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
-
import type { Campaign, CampaignParameters } from "@sdk";
|
3
|
-
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
5
|
-
type callType = {
|
6
|
-
key: keyof dataRawStaking;
|
7
|
-
call: string;
|
8
|
-
target: keyof callKeysStaking;
|
9
|
-
metaData?: keyof callKeysStaking;
|
10
|
-
optional?: boolean;
|
11
|
-
};
|
12
|
-
type callKeysStaking = mandatoryCallKeys & {
|
13
|
-
stakingContract: string;
|
14
|
-
lockNFT: string;
|
15
|
-
stakingSymbol: string;
|
16
|
-
};
|
17
|
-
type dataRawStaking = callKeysStaking & {
|
18
|
-
eip712DomainName: string;
|
19
|
-
underlying: string;
|
20
|
-
};
|
21
|
-
type dataTypeStaking = dataType & {
|
22
|
-
underlying: string;
|
23
|
-
};
|
24
|
-
export declare class StakingProcessor extends GenericProcessor<callKeysStaking, dataRawStaking, dataTypeStaking> {
|
25
|
-
rounds: {
|
26
|
-
round1: callType[];
|
27
|
-
round2: callType[];
|
28
|
-
round3: callType[];
|
29
|
-
round4: callType[];
|
30
|
-
};
|
31
|
-
processingRound2(typeInfo: dataRawStaking): void;
|
32
|
-
processingRound3(typeInfo: dataRawStaking): void;
|
33
|
-
processingRound4(typeInfo: dataRawStaking): void;
|
34
|
-
processingRound5(index: number, type: tokenType, typeInfo: dataRawStaking, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeStaking>;
|
35
|
-
computeRound1(type: tokenType, typeInfo: dataRawStaking): tokenTypeStruct;
|
36
|
-
computeRound2(index: number, type: tokenType, typeInfo: dataRawStaking, calls: string[]): tokenTypeStruct;
|
37
|
-
computeRound3(index: number, type: tokenType, typeInfo: dataRawStaking, calls: string[]): tokenTypeStruct;
|
38
|
-
computeRound4(index: number, type: tokenType, typeInfo: dataRawStaking, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
39
|
-
computeRound5(index: number, type: tokenType, typeInfo: dataRawStaking, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<tokenTypeStruct>;
|
40
|
-
}
|
41
|
-
export {};
|
package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/StakingProcessor.js
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
import { generateCardName } from "../../../../../utils/generateCardName";
|
2
|
-
import { GenericProcessor } from "../GenericProcessor";
|
3
|
-
export class StakingProcessor extends GenericProcessor {
|
4
|
-
rounds = {
|
5
|
-
round1: [
|
6
|
-
{ key: "lockNFT", call: "lockNFT", target: "stakingContract", optional: true },
|
7
|
-
{ key: "eip712DomainName", call: "eip712DomainName", target: "stakingContract", optional: true },
|
8
|
-
{ key: "stakingSymbol", call: "symbol", target: "stakingContract", optional: true },
|
9
|
-
],
|
10
|
-
round2: [{ key: "stakingSymbol", call: "symbol", target: "lockNFT", optional: true }],
|
11
|
-
round3: [],
|
12
|
-
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
13
|
-
};
|
14
|
-
// override computeRound1(): void {}
|
15
|
-
processingRound2(typeInfo) {
|
16
|
-
if (typeInfo.stakingSymbol === undefined) {
|
17
|
-
typeInfo.stakingSymbol = typeInfo.eip712DomainName;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
processingRound3(typeInfo) {
|
21
|
-
if (typeInfo.stakingSymbol === undefined &&
|
22
|
-
typeInfo.stakingContract === "0x18eeD20f71BEf84B605253C89A7576E3634134C0") {
|
23
|
-
typeInfo.stakingSymbol = "CyberStaking";
|
24
|
-
}
|
25
|
-
if (typeInfo.stakingSymbol === undefined &&
|
26
|
-
typeInfo.stakingContract === "0x68754d29f2e97B837Cb622ccfF325adAC27E9977") {
|
27
|
-
typeInfo.stakingSymbol = "Karak";
|
28
|
-
}
|
29
|
-
if (typeInfo.stakingSymbol === undefined &&
|
30
|
-
typeInfo.stakingContract === "0xcd28cF8f7755f03967D27E128B38022B63919836") {
|
31
|
-
typeInfo.stakingSymbol = "Llamalend";
|
32
|
-
}
|
33
|
-
if (typeInfo.stakingContract === "0xA55eD5808aeCDF23AE3782C1443185f5D2363ce7") {
|
34
|
-
typeInfo.underlying = "0x1b6ec227ceBeC25118270efbb4b67642fc29965E";
|
35
|
-
}
|
36
|
-
}
|
37
|
-
processingRound4(typeInfo) {
|
38
|
-
super.processingRound4(typeInfo);
|
39
|
-
}
|
40
|
-
async processingRound5(index, type, typeInfo, calls, campaign, pricer) {
|
41
|
-
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
42
|
-
const priceTargetToken = (await pricer.get({ symbol: campaign.campaignParameters.symbolTargetToken })) ?? 0;
|
43
|
-
const tvl = whitelistedSupplyTargetToken * priceTargetToken;
|
44
|
-
return {
|
45
|
-
...typeInfo,
|
46
|
-
type,
|
47
|
-
whitelistedSupplyTargetToken,
|
48
|
-
totalSupply,
|
49
|
-
priceTargetToken,
|
50
|
-
tvl,
|
51
|
-
blacklistedSupply,
|
52
|
-
cardName: generateCardName(type, typeInfo, campaign),
|
53
|
-
};
|
54
|
-
}
|
55
|
-
computeRound1(type, typeInfo) {
|
56
|
-
return super.computeRound1(type, typeInfo);
|
57
|
-
}
|
58
|
-
computeRound2(index, type, typeInfo, calls) {
|
59
|
-
return super.computeRound2(index, type, typeInfo, calls);
|
60
|
-
}
|
61
|
-
computeRound3(index, type, typeInfo, calls) {
|
62
|
-
return super.computeRound3(index, type, typeInfo, calls);
|
63
|
-
}
|
64
|
-
computeRound4(index, type, typeInfo, calls, campaign) {
|
65
|
-
return super.computeRound4(index, type, typeInfo, calls, campaign);
|
66
|
-
}
|
67
|
-
async computeRound5(index, type, typeInfo, calls, campaign, pricer) {
|
68
|
-
return super.computeRound5(index, type, typeInfo, calls, campaign, pricer);
|
69
|
-
}
|
70
|
-
}
|