@merkl/api 0.20.65 → 0.20.67
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/engine/dynamicData/factory.js +2 -0
- package/dist/src/engine/dynamicData/implementations/Erc20.js +42 -80
- package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.d.ts +18 -18
- package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.js +30 -33
- package/dist/src/engine/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/factoryFinder.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/hardcoded.d.ts +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/hardcoded.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/{constants.d.ts → helpers/tokenType.d.ts} +6 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.js +5 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.js +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.js +7 -6
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +5 -4
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.js +4 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.js +4 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.js +3 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.js +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.js +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.js +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.js +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.js +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.js +4 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.js +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.js +5 -4
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.js +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.js +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +6 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.js +6 -5
- package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +1 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.js +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TemplateProcessor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.js +3 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.js +7 -7
- package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +2 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.js +6 -5
- package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.js +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/processorMapping.d.ts +6 -0
- package/dist/src/engine/erc20SubTypeProcessors/{factory.js → implementations/processorMapping.js} +48 -49
- package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.js +4 -3
- package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +2 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.js +4 -3
- package/dist/src/engine/erc20SubTypeProcessors/subtypesPrices.d.ts +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesPrices.js +24 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.d.ts +3 -17
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.js +62 -52
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.d.ts +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.js +22 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound3.d.ts +3 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound3.js +22 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound4.d.ts +3 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound4.js +22 -0
- package/dist/src/engine/opportunityMetadata/factory.js +2 -0
- package/dist/src/engine/opportunityMetadata/implementations/CompoundV3.js +4 -1
- package/dist/src/engine/opportunityMetadata/implementations/JsonAirdrop.js +1 -1
- package/dist/src/utils/decodeCalls.d.ts +1 -1
- package/dist/src/utils/decodeCalls.js +1 -1
- package/dist/src/utils/encodeCalls.d.ts +2 -2
- package/dist/src/utils/encodeCalls.js +15 -15
- package/dist/src/utils/generateCardName.d.ts +3 -4
- package/dist/src/utils/generateCardName.js +3 -3
- package/dist/src/utils/generateIcons.d.ts +3 -0
- package/dist/src/utils/generateIcons.js +65 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/factory.d.ts +0 -6
- /package/dist/src/engine/erc20SubTypeProcessors/{constants.js → helpers/tokenType.js} +0 -0
@@ -2,13 +2,12 @@ import type { Pricer } from "@/utils/pricer";
|
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import type { BigNumber } from "ethers";
|
4
4
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
5
|
-
import type { tokenType } from "../
|
6
|
-
import type { tokenTypeStruct } from "../interface";
|
5
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
7
6
|
type callType = {
|
8
7
|
key: keyof dataRawAura;
|
9
8
|
call: string;
|
10
9
|
target: keyof callKeysAura;
|
11
|
-
|
10
|
+
metaData?: keyof callKeysAura;
|
12
11
|
};
|
13
12
|
type callKeysAura = mandatoryCallKeys & {
|
14
13
|
balancerPool: string;
|
@@ -15,18 +15,19 @@ export class AuraProcessor extends GenericProcessor {
|
|
15
15
|
{ key: "poolId", call: "getPoolId", target: "balancerPool" },
|
16
16
|
{ key: "vault", call: "getVault", target: "balancerPool" },
|
17
17
|
{ key: "totalSupplyBalancerPool", call: "totalSupply", target: "balancerPool" },
|
18
|
-
{ key: "gaugeContract", call: "poolInfo", target: "auraOperator",
|
18
|
+
{ key: "gaugeContract", call: "poolInfo", target: "auraOperator", metaData: "pid" },
|
19
19
|
{ key: "auraStaker", call: "staker", target: "auraOperator" },
|
20
20
|
],
|
21
21
|
round3: [
|
22
|
-
{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault",
|
23
|
-
{ key: "gaugeBalance", call: "balanceOf", target: "balancerPool",
|
24
|
-
{ key: "auraBalance", call: "balanceOf", target: "gaugeContract",
|
25
|
-
{ key: "vaultBalance", call: "balanceOf", target: "balancerPool",
|
22
|
+
{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault", metaData: "poolId" },
|
23
|
+
{ key: "gaugeBalance", call: "balanceOf", target: "balancerPool", metaData: "gaugeContract" },
|
24
|
+
{ key: "auraBalance", call: "balanceOf", target: "gaugeContract", metaData: "auraStaker" },
|
25
|
+
{ key: "vaultBalance", call: "balanceOf", target: "balancerPool", metaData: "vault" },
|
26
26
|
{ key: "totalSupplyGauge", call: "totalSupply", target: "gaugeContract" },
|
27
27
|
],
|
28
28
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
29
29
|
};
|
30
|
+
// override computeRound1(): void {}
|
30
31
|
processingRound4(typeInfo) {
|
31
32
|
const tokens = typeInfo.poolTokensRaw[0];
|
32
33
|
const balances = typeInfo.poolTokensRaw[1];
|
@@ -87,7 +88,7 @@ export class AuraProcessor extends GenericProcessor {
|
|
87
88
|
blacklistedSupply,
|
88
89
|
tvl: tvl,
|
89
90
|
priceTargetToken: priceTargetToken,
|
90
|
-
cardName: generateCardName(type,
|
91
|
+
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
91
92
|
tokensDisplay,
|
92
93
|
};
|
93
94
|
}
|
@@ -2,13 +2,12 @@ import type { Pricer } from "@/utils/pricer";
|
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import type { BigNumber } from "ethers";
|
4
4
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
5
|
-
import type { tokenType } from "../
|
6
|
-
import type { tokenTypeStruct } from "../interface";
|
5
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
7
6
|
type callType = {
|
8
7
|
key: keyof dataRawBG;
|
9
8
|
call: string;
|
10
9
|
target: keyof callKeysBG;
|
11
|
-
|
10
|
+
metaData?: keyof callKeysBG;
|
12
11
|
};
|
13
12
|
type callKeysBG = mandatoryCallKeys & {
|
14
13
|
gyroscopeToken: string;
|
@@ -11,14 +11,15 @@ export class BEXRewardGaugeProcessor extends GenericProcessor {
|
|
11
11
|
{ key: "totalSupplyUnderlyingPoolTokens", call: "totalSupply", target: "gyroscopeToken" },
|
12
12
|
{ key: "poolId", call: "getPoolId", target: "gyroscopeToken" },
|
13
13
|
{ key: "vault", call: "getVault", target: "gyroscopeToken" },
|
14
|
-
{ key: "poolHolderBalance", call: "balanceOf", target: "gyroscopeToken",
|
14
|
+
{ key: "poolHolderBalance", call: "balanceOf", target: "gyroscopeToken", metaData: "poolHolder" },
|
15
15
|
],
|
16
16
|
round3: [
|
17
|
-
{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault",
|
18
|
-
{ key: "vaultBalance", call: "balanceOf", target: "gyroscopeToken",
|
17
|
+
{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault", metaData: "poolId" },
|
18
|
+
{ key: "vaultBalance", call: "balanceOf", target: "gyroscopeToken", metaData: "vault" },
|
19
19
|
],
|
20
20
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
21
21
|
};
|
22
|
+
// override computeRound1(): void {}
|
22
23
|
processingRound2(typeInfo) {
|
23
24
|
typeInfo.poolHolder = "0xC2BaA8443cDA8EBE51a640905A8E6bc4e1f9872c";
|
24
25
|
}
|
@@ -85,7 +86,7 @@ export class BEXRewardGaugeProcessor extends GenericProcessor {
|
|
85
86
|
whitelistedSupplyTargetToken,
|
86
87
|
blacklistedSupply,
|
87
88
|
priceTargetToken: priceTargetToken,
|
88
|
-
cardName: generateCardName(type,
|
89
|
+
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
89
90
|
tokensDisplay,
|
90
91
|
};
|
91
92
|
}
|
@@ -2,13 +2,12 @@ import type { Pricer } from "@/utils/pricer";
|
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import type { BigNumber } from "ethers";
|
4
4
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
5
|
-
import type { tokenType } from "../
|
6
|
-
import type { tokenTypeStruct } from "../interface";
|
5
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
7
6
|
type callType = {
|
8
7
|
key: keyof dataRawBG;
|
9
8
|
call: string;
|
10
9
|
target: keyof callKeysBG;
|
11
|
-
|
10
|
+
metaData?: keyof callKeysBG;
|
12
11
|
};
|
13
12
|
type callKeysBG = mandatoryCallKeys & {
|
14
13
|
gyroscopeToken: string;
|
@@ -7,14 +7,15 @@ export class BalancerGaugeProcessor extends GenericProcessor {
|
|
7
7
|
rounds = {
|
8
8
|
round1: [{ key: "gyroscopeToken", call: "lp_token", target: "tokenAddress" }],
|
9
9
|
round2: [
|
10
|
-
{ key: "balanceUnderlyingPoolTokens", call: "balanceOf", target: "gyroscopeToken",
|
10
|
+
{ key: "balanceUnderlyingPoolTokens", call: "balanceOf", target: "gyroscopeToken", metaData: "tokenAddress" },
|
11
11
|
{ key: "totalSupplyUnderlyingPoolTokens", call: "totalSupply", target: "gyroscopeToken" },
|
12
12
|
{ key: "poolId", call: "getPoolId", target: "gyroscopeToken" },
|
13
13
|
{ key: "vault", call: "getVault", target: "gyroscopeToken" },
|
14
14
|
],
|
15
|
-
round3: [{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault",
|
15
|
+
round3: [{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault", metaData: "poolId" }],
|
16
16
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
17
17
|
};
|
18
|
+
// override computeRound1(): void {}
|
18
19
|
processingRound4(typeInfo) {
|
19
20
|
const tokens = typeInfo.poolTokensRaw[0];
|
20
21
|
const balances = typeInfo.poolTokensRaw[1];
|
@@ -60,7 +61,7 @@ export class BalancerGaugeProcessor extends GenericProcessor {
|
|
60
61
|
whitelistedSupplyTargetToken,
|
61
62
|
blacklistedSupply,
|
62
63
|
priceTargetToken: priceTargetToken,
|
63
|
-
cardName: generateCardName(type,
|
64
|
+
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
64
65
|
tokensDisplay,
|
65
66
|
};
|
66
67
|
}
|
@@ -2,13 +2,12 @@ import type { Pricer } from "@/utils/pricer";
|
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { BigNumber } from "ethers";
|
4
4
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
5
|
-
import type { tokenType } from "../
|
6
|
-
import type { tokenTypeStruct } from "../interface";
|
5
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
7
6
|
type callType = {
|
8
7
|
key: keyof dataRawBP;
|
9
8
|
call: string;
|
10
9
|
target: keyof callKeysBP;
|
11
|
-
|
10
|
+
metaData?: keyof callKeysBP;
|
12
11
|
};
|
13
12
|
type callKeysBP = mandatoryCallKeys & {
|
14
13
|
tokenAddress: string;
|
@@ -12,12 +12,13 @@ export class BalancerPoolProcessor extends GenericProcessor {
|
|
12
12
|
{ key: "poolId", call: "getPoolId", target: "tokenAddress" },
|
13
13
|
{ key: "vault", call: "getVault", target: "tokenAddress" },
|
14
14
|
],
|
15
|
-
round3: [{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault",
|
15
|
+
round3: [{ key: "poolTokensRaw", call: "getPoolTokens", target: "vault", metaData: "poolId" }],
|
16
16
|
round4: [
|
17
17
|
{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" },
|
18
|
-
{ key: "vaultBalance", call: "balanceOf", target: "tokenAddress",
|
18
|
+
{ key: "vaultBalance", call: "balanceOf", target: "tokenAddress", metaData: "vault" },
|
19
19
|
],
|
20
20
|
};
|
21
|
+
// override computeRound1(): void {}
|
21
22
|
async processingRound5(index, type, typeInfo, calls, campaign, pricer) {
|
22
23
|
let { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
23
24
|
const totalSupplyBN = BigNumber.from(typeInfo.totalSupply);
|
@@ -54,7 +55,7 @@ export class BalancerPoolProcessor extends GenericProcessor {
|
|
54
55
|
blacklistedSupply,
|
55
56
|
tvl: tvl,
|
56
57
|
priceTargetToken: priceTargetToken,
|
57
|
-
cardName: generateCardName(type,
|
58
|
+
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
58
59
|
vaultBalance: vaultBalance,
|
59
60
|
tokensDisplay,
|
60
61
|
};
|
@@ -2,12 +2,12 @@ import type { Pricer } from "@/utils/pricer";
|
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import type { BigNumber } from "ethers";
|
4
4
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
5
|
-
import type { tokenType } from "../
|
6
|
-
import type { tokenTypeStruct } from "../interface";
|
5
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
7
6
|
type callType = {
|
8
7
|
key: keyof dataRawBalancerV3;
|
9
8
|
call: string;
|
10
9
|
target: keyof callKeysBalancerV3;
|
10
|
+
metaData?: keyof callKeysBalancerV3 | string;
|
11
11
|
optional?: boolean;
|
12
12
|
};
|
13
13
|
type callKeysBalancerV3 = mandatoryCallKeys & {
|
@@ -15,6 +15,7 @@ export class BalancerV3PoolProcessor extends GenericProcessor {
|
|
15
15
|
round3: [],
|
16
16
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
17
17
|
};
|
18
|
+
// override computeRound1(): void {}
|
18
19
|
processingRound2(typeInfo) {
|
19
20
|
typeInfo.numberTokens = Number(typeInfo.numberTokens);
|
20
21
|
for (let i = 0; i < typeInfo.numberTokens; i++) {
|
@@ -73,7 +74,7 @@ export class BalancerV3PoolProcessor extends GenericProcessor {
|
|
73
74
|
whitelistedSupplyTargetToken,
|
74
75
|
blacklistedSupply,
|
75
76
|
priceTargetToken,
|
76
|
-
cardName: generateCardName(type,
|
77
|
+
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
77
78
|
tokensDisplay,
|
78
79
|
};
|
79
80
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawBeefy;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysBeefy;
|
9
|
-
|
9
|
+
metaData?: keyof callKeysBeefy;
|
10
10
|
};
|
11
11
|
type callKeysBeefy = mandatoryCallKeys & {
|
12
12
|
underlying: string;
|
@@ -16,8 +16,8 @@ export class BeefyProcessor extends GenericProcessor {
|
|
16
16
|
{ key: "symbolToken1", call: "symbol", target: "token1" },
|
17
17
|
{ key: "decimalsToken0", call: "decimals", target: "token0" },
|
18
18
|
{ key: "decimalsToken1", call: "decimals", target: "token1" },
|
19
|
-
{ key: "balanceToken0", call: "balanceOf", target: "token0",
|
20
|
-
{ key: "balanceToken1", call: "balanceOf", target: "token1",
|
19
|
+
{ key: "balanceToken0", call: "balanceOf", target: "token0", metaData: "underlying" },
|
20
|
+
{ key: "balanceToken1", call: "balanceOf", target: "token1", metaData: "underlying" },
|
21
21
|
],
|
22
22
|
round4: [
|
23
23
|
{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" },
|
@@ -42,7 +42,7 @@ export class BeefyProcessor extends GenericProcessor {
|
|
42
42
|
totalSupply,
|
43
43
|
whitelistedSupplyTargetToken,
|
44
44
|
blacklistedSupply,
|
45
|
-
cardName: generateCardName(type,
|
45
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
46
46
|
pricePerShare,
|
47
47
|
tvl,
|
48
48
|
tokensDisplay: [
|
@@ -2,12 +2,12 @@ import type { Pricer } from "@/utils/pricer";
|
|
2
2
|
import { type Campaign, type CampaignParameters, type UniswapV4PoolKey } from "@sdk";
|
3
3
|
import type { PoolStateStructOutput } from "libs/sdk/src/generated/BunniV2Hub";
|
4
4
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
5
|
-
import type { tokenType } from "../
|
5
|
+
import type { tokenType } from "../helpers/tokenType";
|
6
6
|
type callType = {
|
7
7
|
key: keyof dataRawBunniV2;
|
8
8
|
call: string;
|
9
9
|
target: keyof callKeysBunniV2;
|
10
|
-
|
10
|
+
metaData?: keyof callKeysBunniV2;
|
11
11
|
};
|
12
12
|
type callKeysBunniV2 = mandatoryCallKeys & {
|
13
13
|
decimalsToken0: string;
|
@@ -30,7 +30,7 @@ export class BunniV2Processor extends GenericProcessor {
|
|
30
30
|
key: "poolState",
|
31
31
|
call: "poolState",
|
32
32
|
target: "hub",
|
33
|
-
|
33
|
+
metaData: "poolId",
|
34
34
|
},
|
35
35
|
],
|
36
36
|
round3: [
|
@@ -77,7 +77,7 @@ export class BunniV2Processor extends GenericProcessor {
|
|
77
77
|
balance0: amount0.toString(),
|
78
78
|
balance1: amount1.toString(),
|
79
79
|
blacklistedSupply,
|
80
|
-
cardName: generateCardName(type,
|
80
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
81
81
|
priceTargetToken: priceTargetToken,
|
82
82
|
totalSupply,
|
83
83
|
tvl,
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawCompound;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysCompound;
|
9
|
-
|
9
|
+
metaData?: keyof callKeysCompound;
|
10
10
|
};
|
11
11
|
type callKeysCompound = mandatoryCallKeys & {
|
12
12
|
tokenAddress: string;
|
@@ -6,13 +6,14 @@ export class CompoundProcessor extends GenericProcessor {
|
|
6
6
|
round1: [{ key: "baseToken", call: "baseToken", target: "tokenAddress" }],
|
7
7
|
round2: [
|
8
8
|
{ key: "totalBorrow", call: "totalAssets", target: "tokenAddress" },
|
9
|
-
{ key: "balanceBaseToken", call: "balanceOf", target: "baseToken",
|
9
|
+
{ key: "balanceBaseToken", call: "balanceOf", target: "baseToken", metaData: "tokenAddress" },
|
10
10
|
{ key: "symbolBaseToken", call: "symbol", target: "baseToken" },
|
11
11
|
{ key: "decimalsBaseToken", call: "decimals", target: "baseToken" },
|
12
12
|
],
|
13
13
|
round3: [],
|
14
14
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
15
15
|
};
|
16
|
+
// override computeRound1(): void {}
|
16
17
|
async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
|
17
18
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
18
19
|
const totalBorrow = BN2Number(typeInfo.totalBorrow, Number(typeInfo.decimalsBaseToken));
|
@@ -29,7 +30,7 @@ export class CompoundProcessor extends GenericProcessor {
|
|
29
30
|
blacklistedSupply,
|
30
31
|
balanceBaseToken,
|
31
32
|
priceTargetToken,
|
32
|
-
cardName: generateCardName(type,
|
33
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
33
34
|
tokensDisplay: [{ symbol: typeInfo.symbolBaseToken, address: typeInfo.baseToken }],
|
34
35
|
};
|
35
36
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawERC4626;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysERC4626;
|
9
|
+
metaData?: any;
|
9
10
|
};
|
10
11
|
type callKeysERC4626 = mandatoryCallKeys & {
|
11
12
|
asset: string;
|
@@ -30,7 +30,7 @@ export class ERC4626Processor extends GenericProcessor {
|
|
30
30
|
whitelistedSupplyTargetToken,
|
31
31
|
blacklistedSupply,
|
32
32
|
priceTargetToken,
|
33
|
-
cardName: generateCardName(type,
|
33
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
34
34
|
tokensDisplay: [{ symbol: typeInfo.symbolAsset, address: typeInfo.asset }],
|
35
35
|
};
|
36
36
|
}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
5
|
-
import type { tokenTypeStruct } from "../interface";
|
4
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
6
5
|
type callType = {
|
7
6
|
key: keyof dataRawEnzyme;
|
8
7
|
call: string;
|
9
8
|
target: keyof callKeysEnzyme;
|
10
|
-
|
9
|
+
metaData?: keyof callKeysEnzyme;
|
11
10
|
};
|
12
11
|
type callKeysEnzyme = mandatoryCallKeys & {
|
13
12
|
factory: string;
|
@@ -4,7 +4,7 @@ import { GenericProcessor } from "../GenericProcessor";
|
|
4
4
|
export class EnzymeProcessor extends GenericProcessor {
|
5
5
|
rounds = {
|
6
6
|
round1: [
|
7
|
-
{ key: "exchangeRateRaw", call: "calcNetShareValue", target: "fundValueCalculator",
|
7
|
+
{ key: "exchangeRateRaw", call: "calcNetShareValue", target: "fundValueCalculator", metaData: "tokenAddress" },
|
8
8
|
],
|
9
9
|
round2: [{ key: "symbolUnderlyingToken", call: "symbol", target: "underlying" }],
|
10
10
|
round3: [],
|
@@ -24,7 +24,7 @@ export class EnzymeProcessor extends GenericProcessor {
|
|
24
24
|
priceTargetToken,
|
25
25
|
totalSupply,
|
26
26
|
exchangeRate,
|
27
|
-
cardName: generateCardName(type,
|
27
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
28
28
|
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
29
29
|
};
|
30
30
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import type { Campaign, CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawEqualizerGauge;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysEqualizerGauge;
|
9
|
+
metaData?: any;
|
9
10
|
};
|
10
11
|
type callKeysEqualizerGauge = mandatoryCallKeys & {
|
11
12
|
tokenPrice: string;
|
@@ -47,7 +47,7 @@ export class EqualizerGaugeProcessor extends GenericProcessor {
|
|
47
47
|
whitelistedSupplyTargetToken,
|
48
48
|
blacklistedSupply,
|
49
49
|
priceTargetToken,
|
50
|
-
cardName: generateCardName(type,
|
50
|
+
cardName: generateCardName(type, typeInfo, campaign, [], displayName),
|
51
51
|
tokensDisplay: [{ symbol: campaign.campaignParameters.symbolTargetToken, address: typeInfo.tokenAddress }],
|
52
52
|
};
|
53
53
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawEuler;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysEuler;
|
9
|
+
metaData?: keyof callKeysEuler;
|
9
10
|
};
|
10
11
|
type callKeysEuler = mandatoryCallKeys & {
|
11
12
|
addressVault: string;
|
@@ -22,7 +22,7 @@ export class EulerBorrowProcessor extends GenericProcessor {
|
|
22
22
|
const priceAsset = (await pricer.get({ symbol: symbolAsset })) ?? 1;
|
23
23
|
const totalBorrows = BN2Number(typeInfo.totalAssets, decimalsAsset);
|
24
24
|
typeInfo.symbolUnderlyingToken = symbolAsset;
|
25
|
-
let cardName = generateCardName(type,
|
25
|
+
let cardName = generateCardName(type, typeInfo, campaign);
|
26
26
|
const vaultName = await fetchEulerVaultName(campaign.campaignParameters.evkAddress, campaign.chainId);
|
27
27
|
if (!!vaultName) {
|
28
28
|
cardName = `Borrow from ${vaultName} vault`;
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawEuler;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysEuler;
|
9
|
+
metaData?: keyof callKeysEuler;
|
9
10
|
};
|
10
11
|
type callKeysEuler = mandatoryCallKeys & {
|
11
12
|
addressVault: string;
|
@@ -27,7 +27,7 @@ export class EulerLendProcessor extends GenericProcessor {
|
|
27
27
|
}
|
28
28
|
const totalAssets = BN2Number(typeInfo.totalAssets, decimalsAsset);
|
29
29
|
typeInfo.symbolUnderlyingToken = symbolAsset;
|
30
|
-
let cardName = generateCardName(type,
|
30
|
+
let cardName = generateCardName(type, typeInfo, campaign);
|
31
31
|
const vaultName = await fetchEulerVaultName(typeInfo.tokenAddress, campaign.chainId);
|
32
32
|
if (!!vaultName) {
|
33
33
|
cardName = `Supply ${symbolAsset} on ${vaultName} vault`;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawFluid;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysFluid;
|
9
|
-
|
9
|
+
metaData?: keyof callKeysFluid;
|
10
10
|
};
|
11
11
|
type callKeysFluid = mandatoryCallKeys & {
|
12
12
|
underlying: string;
|
@@ -9,9 +9,10 @@ export class FluidProcessor extends GenericProcessor {
|
|
9
9
|
{ key: "symbolUnderlyingToken", call: "symbol", target: "underlying" },
|
10
10
|
{ key: "decimalsUnderlyingToken", call: "decimals", target: "underlying" },
|
11
11
|
],
|
12
|
-
round3: [{ key: "toAssets", call: "convertToAssets", target: "tokenAddress",
|
12
|
+
round3: [{ key: "toAssets", call: "convertToAssets", target: "tokenAddress", metaData: "amount" }],
|
13
13
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
14
14
|
};
|
15
|
+
// override computeRound1(): void {}
|
15
16
|
async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
|
16
17
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
17
18
|
const priceUnderlying = (await pricer.get({ symbol: typeInfo.symbolUnderlyingToken })) ?? 0;
|
@@ -26,7 +27,7 @@ export class FluidProcessor extends GenericProcessor {
|
|
26
27
|
blacklistedSupply,
|
27
28
|
totalSupply,
|
28
29
|
priceTargetToken,
|
29
|
-
cardName: generateCardName(type,
|
30
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
30
31
|
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
31
32
|
};
|
32
33
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import { tokenType } from "../
|
4
|
+
import { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawFrax;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysFrax;
|
9
|
+
metaData?: keyof callKeysFrax;
|
9
10
|
};
|
10
11
|
type callKeysFrax = mandatoryCallKeys & {
|
11
12
|
underlying: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { generateCardName } from "@/utils/generateCardName";
|
2
2
|
import { BN2Number } from "@sdk";
|
3
3
|
import { GenericProcessor } from "../GenericProcessor";
|
4
|
-
import { tokenType } from "../
|
4
|
+
import { tokenType } from "../helpers/tokenType";
|
5
5
|
export class FraxProcessor extends GenericProcessor {
|
6
6
|
rounds = {
|
7
7
|
round1: [
|
@@ -35,7 +35,7 @@ export class FraxProcessor extends GenericProcessor {
|
|
35
35
|
blacklistedSupply,
|
36
36
|
sharePrice,
|
37
37
|
priceTargetToken,
|
38
|
-
cardName: generateCardName(type,
|
38
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
39
39
|
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
40
40
|
};
|
41
41
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
5
|
-
import type { tokenTypeStruct } from "../interface";
|
4
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
6
5
|
type callType = {
|
7
6
|
key: keyof dataRawGamma;
|
8
7
|
call: string;
|
9
8
|
target: keyof callKeysGamma;
|
9
|
+
metaData?: keyof callKeysGamma;
|
10
10
|
};
|
11
11
|
type callKeysGamma = mandatoryCallKeys & {
|
12
12
|
token0: string;
|
@@ -34,6 +34,7 @@ export declare class GammaProcessor extends GenericProcessor<callKeysGamma, data
|
|
34
34
|
};
|
35
35
|
processingRound2(typeInfo: dataRawGamma): void;
|
36
36
|
processingRound5(_index: number, type: tokenType, typeInfo: dataRawGamma, _calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeGamma>;
|
37
|
+
computeRound1(type: tokenType, typeInfo: dataRawGamma): tokenTypeStruct;
|
37
38
|
computeRound2(index: number, type: tokenType, typeInfo: dataRawGamma, calls: string[]): tokenTypeStruct;
|
38
39
|
computeRound3(index: number, type: tokenType, typeInfo: dataRawGamma, calls: string[]): tokenTypeStruct;
|
39
40
|
computeRound4(index: number, type: tokenType, typeInfo: dataRawGamma, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
@@ -42,13 +42,16 @@ export class GammaProcessor extends GenericProcessor {
|
|
42
42
|
whitelistedSupplyTargetToken,
|
43
43
|
blacklistedSupply,
|
44
44
|
tvl,
|
45
|
-
cardName: generateCardName(type,
|
45
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
46
46
|
tokensDisplay: [
|
47
47
|
{ symbol: typeInfo.symbolToken0, address: typeInfo.token0 },
|
48
48
|
{ symbol: typeInfo.symbolToken1, address: typeInfo.token1 },
|
49
49
|
],
|
50
50
|
};
|
51
51
|
}
|
52
|
+
computeRound1(type, typeInfo) {
|
53
|
+
return super.computeRound1(type, typeInfo);
|
54
|
+
}
|
52
55
|
computeRound2(index, type, typeInfo, calls) {
|
53
56
|
return super.computeRound2(index, type, typeInfo, calls);
|
54
57
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Pricer } from "@/utils/pricer";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
import { GenericProcessor, type dataType, type mandatoryCallKeys } from "../GenericProcessor";
|
4
|
-
import type { tokenType } from "../
|
4
|
+
import type { tokenType } from "../helpers/tokenType";
|
5
5
|
type callType = {
|
6
6
|
key: keyof dataRawGearbox;
|
7
7
|
call: string;
|
8
8
|
target: keyof callKeysGearbox;
|
9
|
-
|
9
|
+
metaData?: keyof callKeysGearbox;
|
10
10
|
optional?: boolean;
|
11
11
|
};
|
12
12
|
type callKeysGearbox = mandatoryCallKeys & {
|
@@ -5,7 +5,7 @@ export class GearboxProcessor extends GenericProcessor {
|
|
5
5
|
rounds = {
|
6
6
|
round1: [{ key: "stakingToken", call: "stakingToken", target: "tokenAddress", optional: true }],
|
7
7
|
round2: [
|
8
|
-
{ key: "balanceStakingToken", call: "balanceOf", target: "stakingToken",
|
8
|
+
{ key: "balanceStakingToken", call: "balanceOf", target: "stakingToken", metaData: "tokenAddress" },
|
9
9
|
{ key: "totalSupplyStakingToken", call: "totalSupply", target: "stakingToken" },
|
10
10
|
{ key: "decimalsStakingToken", call: "decimals", target: "stakingToken" },
|
11
11
|
{ key: "underlyingToken", call: "underlying", target: "stakingToken" },
|
@@ -21,6 +21,7 @@ export class GearboxProcessor extends GenericProcessor {
|
|
21
21
|
typeInfo.stakingToken = typeInfo.stakingToken ?? typeInfo.tokenAddress;
|
22
22
|
typeInfo.isTrade = typeInfo.stakingToken === typeInfo.tokenAddress;
|
23
23
|
}
|
24
|
+
// override computeRound1(): void {}
|
24
25
|
async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
|
25
26
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
26
27
|
const totalAssets = BN2Number(typeInfo.totalAssets, Number(typeInfo.decimalsUnderlyingToken));
|
@@ -50,7 +51,7 @@ export class GearboxProcessor extends GenericProcessor {
|
|
50
51
|
blacklistedSupply,
|
51
52
|
tvl: tvl,
|
52
53
|
priceTargetToken: priceTargetToken,
|
53
|
-
cardName: generateCardName(type,
|
54
|
+
cardName: generateCardName(type, typeInfo, campaign),
|
54
55
|
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlyingToken }],
|
55
56
|
};
|
56
57
|
}
|