@merkl/api 0.20.33 → 0.20.35
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 +73 -13
- package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.d.ts +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/helpers/spliceTVL.d.ts +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/helpers/spliceTVL.js +2 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AaveProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AnglesLiquid.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AssetProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/AuraProcessor.js +3 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +3 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.js +3 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.js +7 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.js +7 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BeefyProcessor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/BunniV2Processor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/CompoundProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/ERC4626Processor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EnzymeProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/EulerLendProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/FluidProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/FraxProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/GammaProcessor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/GearboxProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.js +5 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HoldStationProcessor.js +3 -2
- package/dist/src/engine/erc20SubTypeProcessors/implementations/HourglassProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +16 -16
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MaverickBPProcessor.js +27 -23
- package/dist/src/engine/erc20SubTypeProcessors/implementations/MetamorphoProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/PendleYTProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/RadiantProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/RfxProcessor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/Satlayer.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpectraYTProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SpliceProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/SturdySiloProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TempestVaultProcessor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/TorosProcessor.js +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/implementations/UniswapProcessor.js +4 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/VicunaProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/WoofiProcessor.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.js +5 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/curveNPoolProcessor.js +3 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/curveProcessor.js +11 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/stakedCurveProcessor.js +11 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/xU308Processor.js +1 -0
- package/dist/src/engine/opportunityMetadata/implementations/Erc20.js +5 -38
- package/dist/src/index.d.ts +13 -1
- package/dist/src/modules/v4/chain/chain.controller.d.ts +2 -0
- package/dist/src/modules/v4/chain/chain.model.d.ts +1 -0
- package/dist/src/modules/v4/chain/chain.model.js +1 -0
- package/dist/src/modules/v4/chain/chain.repository.d.ts +11 -0
- package/dist/src/modules/v4/chain/chain.repository.js +4 -1
- package/dist/src/modules/v4/chain/chain.service.js +4 -2
- package/dist/src/modules/v4/opportunity/opportunity.service.js +4 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +3 -3
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +11 -1
- package/dist/src/modules/v4/protocol/protocol.controller.js +2 -1
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/protocol/protocol.repository.js +33 -28
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.service.js +8 -1
- package/dist/src/modules/v4/router.d.ts +13 -1
- package/dist/src/utils/generateCardName.d.ts +1 -1
- package/dist/src/utils/generateCardName.js +3 -15
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -1603,6 +1603,7 @@ declare const eden: {
|
|
1603
1603
|
items?: number | undefined;
|
1604
1604
|
tags?: string[] | undefined;
|
1605
1605
|
page?: number | undefined;
|
1606
|
+
test?: boolean | undefined;
|
1606
1607
|
ids?: string[] | undefined;
|
1607
1608
|
opportunityTag?: string | undefined;
|
1608
1609
|
};
|
@@ -1646,11 +1647,20 @@ declare const eden: {
|
|
1646
1647
|
}>>;
|
1647
1648
|
};
|
1648
1649
|
count: {
|
1649
|
-
get: (options
|
1650
|
+
get: (options: {
|
1650
1651
|
headers?: Record<string, unknown> | undefined;
|
1651
|
-
query
|
1652
|
+
query: {
|
1653
|
+
id?: string | undefined;
|
1654
|
+
name?: string | undefined;
|
1655
|
+
items?: number | undefined;
|
1656
|
+
tags?: string[] | undefined;
|
1657
|
+
page?: number | undefined;
|
1658
|
+
test?: boolean | undefined;
|
1659
|
+
ids?: string[] | undefined;
|
1660
|
+
opportunityTag?: string | undefined;
|
1661
|
+
};
|
1652
1662
|
fetch?: RequestInit | undefined;
|
1653
|
-
}
|
1663
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
1654
1664
|
200: number;
|
1655
1665
|
}>>;
|
1656
1666
|
};
|
@@ -2339,6 +2349,7 @@ declare const eden: {
|
|
2339
2349
|
headers?: Record<string, unknown> | undefined;
|
2340
2350
|
query: {
|
2341
2351
|
name?: string | undefined;
|
2352
|
+
test?: boolean | undefined;
|
2342
2353
|
};
|
2343
2354
|
fetch?: RequestInit | undefined;
|
2344
2355
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -2382,6 +2393,7 @@ declare const eden: {
|
|
2382
2393
|
headers?: Record<string, unknown> | undefined;
|
2383
2394
|
query: {
|
2384
2395
|
name?: string | undefined;
|
2396
|
+
test?: boolean | undefined;
|
2385
2397
|
};
|
2386
2398
|
fetch?: RequestInit | undefined;
|
2387
2399
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -5365,6 +5377,7 @@ declare const eden: {
|
|
5365
5377
|
items?: number | undefined;
|
5366
5378
|
tags?: string[] | undefined;
|
5367
5379
|
page?: number | undefined;
|
5380
|
+
test?: boolean | undefined;
|
5368
5381
|
ids?: string[] | undefined;
|
5369
5382
|
opportunityTag?: string | undefined;
|
5370
5383
|
};
|
@@ -5408,11 +5421,20 @@ declare const eden: {
|
|
5408
5421
|
}>>;
|
5409
5422
|
};
|
5410
5423
|
count: {
|
5411
|
-
get: (options
|
5424
|
+
get: (options: {
|
5412
5425
|
headers?: Record<string, unknown> | undefined;
|
5413
|
-
query
|
5426
|
+
query: {
|
5427
|
+
id?: string | undefined;
|
5428
|
+
name?: string | undefined;
|
5429
|
+
items?: number | undefined;
|
5430
|
+
tags?: string[] | undefined;
|
5431
|
+
page?: number | undefined;
|
5432
|
+
test?: boolean | undefined;
|
5433
|
+
ids?: string[] | undefined;
|
5434
|
+
opportunityTag?: string | undefined;
|
5435
|
+
};
|
5414
5436
|
fetch?: RequestInit | undefined;
|
5415
|
-
}
|
5437
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
5416
5438
|
200: number;
|
5417
5439
|
}>>;
|
5418
5440
|
};
|
@@ -6101,6 +6123,7 @@ declare const eden: {
|
|
6101
6123
|
headers?: Record<string, unknown> | undefined;
|
6102
6124
|
query: {
|
6103
6125
|
name?: string | undefined;
|
6126
|
+
test?: boolean | undefined;
|
6104
6127
|
};
|
6105
6128
|
fetch?: RequestInit | undefined;
|
6106
6129
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -6144,6 +6167,7 @@ declare const eden: {
|
|
6144
6167
|
headers?: Record<string, unknown> | undefined;
|
6145
6168
|
query: {
|
6146
6169
|
name?: string | undefined;
|
6170
|
+
test?: boolean | undefined;
|
6147
6171
|
};
|
6148
6172
|
fetch?: RequestInit | undefined;
|
6149
6173
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -10127,6 +10151,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10127
10151
|
items?: number | undefined;
|
10128
10152
|
tags?: string[] | undefined;
|
10129
10153
|
page?: number | undefined;
|
10154
|
+
test?: boolean | undefined;
|
10130
10155
|
ids?: string[] | undefined;
|
10131
10156
|
opportunityTag?: string | undefined;
|
10132
10157
|
};
|
@@ -10154,7 +10179,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10154
10179
|
get: {
|
10155
10180
|
body: unknown;
|
10156
10181
|
params: {};
|
10157
|
-
query:
|
10182
|
+
query: {
|
10183
|
+
id?: string | undefined;
|
10184
|
+
name?: string | undefined;
|
10185
|
+
items?: number | undefined;
|
10186
|
+
tags?: string[] | undefined;
|
10187
|
+
page?: number | undefined;
|
10188
|
+
test?: boolean | undefined;
|
10189
|
+
ids?: string[] | undefined;
|
10190
|
+
opportunityTag?: string | undefined;
|
10191
|
+
};
|
10158
10192
|
headers: unknown;
|
10159
10193
|
response: {
|
10160
10194
|
200: number;
|
@@ -11082,6 +11116,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
11082
11116
|
params: {};
|
11083
11117
|
query: {
|
11084
11118
|
name?: string | undefined;
|
11119
|
+
test?: boolean | undefined;
|
11085
11120
|
};
|
11086
11121
|
headers: unknown;
|
11087
11122
|
response: {
|
@@ -11108,6 +11143,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
11108
11143
|
params: {};
|
11109
11144
|
query: {
|
11110
11145
|
name?: string | undefined;
|
11146
|
+
test?: boolean | undefined;
|
11111
11147
|
};
|
11112
11148
|
headers: unknown;
|
11113
11149
|
response: {
|
@@ -15468,6 +15504,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
15468
15504
|
items?: number | undefined;
|
15469
15505
|
tags?: string[] | undefined;
|
15470
15506
|
page?: number | undefined;
|
15507
|
+
test?: boolean | undefined;
|
15471
15508
|
ids?: string[] | undefined;
|
15472
15509
|
opportunityTag?: string | undefined;
|
15473
15510
|
};
|
@@ -15511,11 +15548,20 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
15511
15548
|
}>>;
|
15512
15549
|
};
|
15513
15550
|
count: {
|
15514
|
-
get: (options
|
15551
|
+
get: (options: {
|
15515
15552
|
headers?: Record<string, unknown> | undefined;
|
15516
|
-
query
|
15553
|
+
query: {
|
15554
|
+
id?: string | undefined;
|
15555
|
+
name?: string | undefined;
|
15556
|
+
items?: number | undefined;
|
15557
|
+
tags?: string[] | undefined;
|
15558
|
+
page?: number | undefined;
|
15559
|
+
test?: boolean | undefined;
|
15560
|
+
ids?: string[] | undefined;
|
15561
|
+
opportunityTag?: string | undefined;
|
15562
|
+
};
|
15517
15563
|
fetch?: RequestInit | undefined;
|
15518
|
-
}
|
15564
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
15519
15565
|
200: number;
|
15520
15566
|
}>>;
|
15521
15567
|
};
|
@@ -16204,6 +16250,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
16204
16250
|
headers?: Record<string, unknown> | undefined;
|
16205
16251
|
query: {
|
16206
16252
|
name?: string | undefined;
|
16253
|
+
test?: boolean | undefined;
|
16207
16254
|
};
|
16208
16255
|
fetch?: RequestInit | undefined;
|
16209
16256
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -16247,6 +16294,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
16247
16294
|
headers?: Record<string, unknown> | undefined;
|
16248
16295
|
query: {
|
16249
16296
|
name?: string | undefined;
|
16297
|
+
test?: boolean | undefined;
|
16250
16298
|
};
|
16251
16299
|
fetch?: RequestInit | undefined;
|
16252
16300
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -19230,6 +19278,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
19230
19278
|
items?: number | undefined;
|
19231
19279
|
tags?: string[] | undefined;
|
19232
19280
|
page?: number | undefined;
|
19281
|
+
test?: boolean | undefined;
|
19233
19282
|
ids?: string[] | undefined;
|
19234
19283
|
opportunityTag?: string | undefined;
|
19235
19284
|
};
|
@@ -19273,11 +19322,20 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
19273
19322
|
}>>;
|
19274
19323
|
};
|
19275
19324
|
count: {
|
19276
|
-
get: (options
|
19325
|
+
get: (options: {
|
19277
19326
|
headers?: Record<string, unknown> | undefined;
|
19278
|
-
query
|
19327
|
+
query: {
|
19328
|
+
id?: string | undefined;
|
19329
|
+
name?: string | undefined;
|
19330
|
+
items?: number | undefined;
|
19331
|
+
tags?: string[] | undefined;
|
19332
|
+
page?: number | undefined;
|
19333
|
+
test?: boolean | undefined;
|
19334
|
+
ids?: string[] | undefined;
|
19335
|
+
opportunityTag?: string | undefined;
|
19336
|
+
};
|
19279
19337
|
fetch?: RequestInit | undefined;
|
19280
|
-
}
|
19338
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
19281
19339
|
200: number;
|
19282
19340
|
}>>;
|
19283
19341
|
};
|
@@ -19966,6 +20024,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
19966
20024
|
headers?: Record<string, unknown> | undefined;
|
19967
20025
|
query: {
|
19968
20026
|
name?: string | undefined;
|
20027
|
+
test?: boolean | undefined;
|
19969
20028
|
};
|
19970
20029
|
fetch?: RequestInit | undefined;
|
19971
20030
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -20009,6 +20068,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
20009
20068
|
headers?: Record<string, unknown> | undefined;
|
20010
20069
|
query: {
|
20011
20070
|
name?: string | undefined;
|
20071
|
+
test?: boolean | undefined;
|
20012
20072
|
};
|
20013
20073
|
fetch?: RequestInit | undefined;
|
20014
20074
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
@@ -50,6 +50,10 @@ export type dataType = {
|
|
50
50
|
cardName: string;
|
51
51
|
priceTargetToken: number;
|
52
52
|
whitelistedSupplyTargetToken: number;
|
53
|
+
tokensDisplay: Array<{
|
54
|
+
address: string;
|
55
|
+
symbol?: string;
|
56
|
+
}>;
|
53
57
|
};
|
54
58
|
/**
|
55
59
|
* Generic Processor to compute dynamic data of ERC20 tokens
|
@@ -70,6 +70,7 @@ export class GenericProcessor {
|
|
70
70
|
tvl,
|
71
71
|
blacklistedSupply,
|
72
72
|
cardName: generateCardName(type, typeInfo, campaign),
|
73
|
+
tokensDisplay: [{ symbol: campaign.campaignParameters.symbolTargetToken, address: typeInfo.tokenAddress }],
|
73
74
|
};
|
74
75
|
}
|
75
76
|
computeRound1(type, typeInfo) {
|
@@ -7,6 +7,7 @@ export async function fetchSpliceInformation(marketAddress) {
|
|
7
7
|
const market = response.data?.markets[0];
|
8
8
|
return {
|
9
9
|
symbolUnderlyingToken: market.token.symbol,
|
10
|
+
address: market.token.address,
|
10
11
|
priceTargetToken: market.pool.price,
|
11
12
|
tvl: market.pool.tvl,
|
12
13
|
};
|
@@ -15,6 +16,7 @@ export async function fetchSpliceInformation(marketAddress) {
|
|
15
16
|
return {
|
16
17
|
symbolUnderlyingToken: "",
|
17
18
|
priceTargetToken: 0,
|
19
|
+
address: "",
|
18
20
|
tvl: 1,
|
19
21
|
};
|
20
22
|
}
|
@@ -30,6 +30,7 @@ export class AnglesLiquidProcessor extends GenericProcessor {
|
|
30
30
|
totalAssets: typeInfo.totalAssets,
|
31
31
|
poolToken: typeInfo.poolToken,
|
32
32
|
cardName: generateCardName(type, typeInfo, campaign),
|
33
|
+
tokensDisplay: [{ symbol: symbolUnderlyingToken, address: typeInfo.poolToken }],
|
33
34
|
};
|
34
35
|
}
|
35
36
|
computeRound1(type, typeInfo) {
|
@@ -42,6 +42,7 @@ export class AssetProcessor extends GenericProcessor {
|
|
42
42
|
whitelistedSupplyTargetToken,
|
43
43
|
blacklistedSupply,
|
44
44
|
cardName: generateCardName(type, typeInfo, campaign),
|
45
|
+
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
45
46
|
};
|
46
47
|
}
|
47
48
|
}
|
@@ -62,6 +62,7 @@ export class AuraProcessor extends GenericProcessor {
|
|
62
62
|
const auraBalance = BN2Number(typeInfo.auraBalance, 18);
|
63
63
|
const totalSupplyGauge = BN2Number(typeInfo.totalSupplyGauge, 18);
|
64
64
|
let poolTvl = 0;
|
65
|
+
const tokensDisplay = [];
|
65
66
|
const symbols = [];
|
66
67
|
let indexUpdated = index + this.rounds.round4.length;
|
67
68
|
for (const poolToken of typeInfo.poolTokens) {
|
@@ -71,6 +72,7 @@ export class AuraProcessor extends GenericProcessor {
|
|
71
72
|
poolToken.price = (await pricer.get({ symbol: poolToken.symbol })) ?? 0;
|
72
73
|
poolTvl += poolToken.price * poolToken.amountInPool;
|
73
74
|
symbols.push(poolToken.symbol);
|
75
|
+
tokensDisplay.push({ symbol: poolToken.symbol, address: poolToken.token });
|
74
76
|
}
|
75
77
|
const percentageOfSupplyInAura = (auraBalance / totalSupplyGauge) * (gaugeBalance / totalSupplyBalancerPool);
|
76
78
|
const tvl = poolTvl * percentageOfSupplyInAura;
|
@@ -87,6 +89,7 @@ export class AuraProcessor extends GenericProcessor {
|
|
87
89
|
tvl: tvl,
|
88
90
|
priceTargetToken: priceTargetToken,
|
89
91
|
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
92
|
+
tokensDisplay,
|
90
93
|
};
|
91
94
|
}
|
92
95
|
computeRound4(index, type, typeInfo, calls, campaign) {
|
@@ -43,6 +43,7 @@ export class BEXRewardGaugeProcessor extends GenericProcessor {
|
|
43
43
|
let tvlUnderlyingPool = 0;
|
44
44
|
const symbols = [];
|
45
45
|
let indexUpdated = index + this.rounds.round4.length;
|
46
|
+
const tokensDisplay = [];
|
46
47
|
for (const poolToken of typeInfo.poolTokens) {
|
47
48
|
const symbol = decodeCall(calls, indexUpdated++, "symbol");
|
48
49
|
const decimals = decodeCall(calls, indexUpdated++, "decimals");
|
@@ -54,6 +55,7 @@ export class BEXRewardGaugeProcessor extends GenericProcessor {
|
|
54
55
|
};
|
55
56
|
tvlUnderlyingPool += poolTokensinfo[poolToken.token].price * poolTokensinfo[poolToken.token].amountInPool;
|
56
57
|
symbols.push(symbol);
|
58
|
+
tokensDisplay.push({ symbol: symbol, address: poolToken.token });
|
57
59
|
}
|
58
60
|
let adjustedPoolTotalSupply = BN2Number(typeInfo.totalSupplyUnderlyingPoolTokens, 18);
|
59
61
|
// if (type === tokenType.beratrax_vault) {
|
@@ -85,6 +87,7 @@ export class BEXRewardGaugeProcessor extends GenericProcessor {
|
|
85
87
|
blacklistedSupply,
|
86
88
|
priceTargetToken: priceTargetToken,
|
87
89
|
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
90
|
+
tokensDisplay,
|
88
91
|
};
|
89
92
|
}
|
90
93
|
computeRound4(index, type, typeInfo, calls, campaign) {
|
@@ -35,6 +35,7 @@ export class BalancerGaugeProcessor extends GenericProcessor {
|
|
35
35
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
36
36
|
let tvlUnderlyingPool = 0;
|
37
37
|
const symbols = [];
|
38
|
+
const tokensDisplay = [];
|
38
39
|
let indexUpdated = index + this.rounds.round4.length;
|
39
40
|
for (const poolToken of typeInfo.poolTokens) {
|
40
41
|
const symbol = decodeCall(calls, indexUpdated++, "symbol");
|
@@ -47,6 +48,7 @@ export class BalancerGaugeProcessor extends GenericProcessor {
|
|
47
48
|
};
|
48
49
|
tvlUnderlyingPool += poolTokensinfo[poolToken.token].price * poolTokensinfo[poolToken.token].amountInPool;
|
49
50
|
symbols.push(symbol);
|
51
|
+
tokensDisplay.push({ symbol: symbol, address: poolToken.token });
|
50
52
|
}
|
51
53
|
const percentageOfSupplyUnderlyingPoolTokens = BN2Number(typeInfo.balanceUnderlyingPoolTokens, 18) / BN2Number(typeInfo.totalSupplyUnderlyingPoolTokens, 18);
|
52
54
|
const tvl = tvlUnderlyingPool * percentageOfSupplyUnderlyingPoolTokens;
|
@@ -60,6 +62,7 @@ export class BalancerGaugeProcessor extends GenericProcessor {
|
|
60
62
|
blacklistedSupply,
|
61
63
|
priceTargetToken: priceTargetToken,
|
62
64
|
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
65
|
+
tokensDisplay,
|
63
66
|
};
|
64
67
|
}
|
65
68
|
computeRound4(index, type, typeInfo, calls, campaign) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { decodeCall } from "@/utils/decodeCalls";
|
2
2
|
import { createCall } from "@/utils/encodeCalls";
|
3
3
|
import { generateCardName } from "@/utils/generateCardName";
|
4
|
-
import { BN2Number } from "@sdk";
|
4
|
+
import { BN2Number, ChainId } from "@sdk";
|
5
5
|
import { BigNumber } from "ethers";
|
6
6
|
import { utils } from "ethers";
|
7
7
|
import { GenericProcessor, Round } from "../GenericProcessor";
|
@@ -27,6 +27,7 @@ export class BalancerPoolProcessor extends GenericProcessor {
|
|
27
27
|
const vaultBalance = BN2Number(vaultBalanceBN, campaign.campaignParameters.decimalsTargetToken);
|
28
28
|
let tvl = 0;
|
29
29
|
const symbols = [];
|
30
|
+
const tokensDisplay = [];
|
30
31
|
let indexUpdated = index + this.rounds.round4.length;
|
31
32
|
const vaultIndex = campaign.campaignParameters.blacklist
|
32
33
|
?.map(b => utils.getAddress(b))
|
@@ -41,6 +42,10 @@ export class BalancerPoolProcessor extends GenericProcessor {
|
|
41
42
|
poolToken.price = (await pricer.get({ symbol: poolToken.symbol })) ?? 0;
|
42
43
|
tvl += poolToken.price * poolToken.amountInPool;
|
43
44
|
symbols.push(poolToken.symbol);
|
45
|
+
tokensDisplay.push({ symbol: poolToken.symbol, address: poolToken.token });
|
46
|
+
}
|
47
|
+
if (campaign.computeChainId === ChainId.SONIC) {
|
48
|
+
typeInfo.protocol = "Beets";
|
44
49
|
}
|
45
50
|
const priceTargetToken = tvl / totalSupplyUpdated;
|
46
51
|
return {
|
@@ -52,6 +57,7 @@ export class BalancerPoolProcessor extends GenericProcessor {
|
|
52
57
|
priceTargetToken: priceTargetToken,
|
53
58
|
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
54
59
|
vaultBalance: vaultBalance,
|
60
|
+
tokensDisplay,
|
55
61
|
};
|
56
62
|
}
|
57
63
|
processingRound4(typeInfo) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { generateCardName } from "@/utils/generateCardName";
|
2
|
-
import { BN2Number } from "@sdk";
|
2
|
+
import { BN2Number, ChainId } from "@sdk";
|
3
3
|
import { GenericProcessor } from "../GenericProcessor";
|
4
4
|
const matchSingleNumber = (input) => {
|
5
5
|
const regex = /^\d+$/;
|
@@ -39,12 +39,14 @@ export class BalancerV3PoolProcessor extends GenericProcessor {
|
|
39
39
|
async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
|
40
40
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
41
41
|
let tvl = 0;
|
42
|
+
const tokensDisplay = [];
|
42
43
|
for (let i = 0; i < typeInfo.numberTokens; i++) {
|
43
44
|
let symbol = typeInfo[`symbolToken${i}`];
|
44
45
|
const price = (await pricer.get({ symbol: symbol })) ?? 0;
|
45
46
|
symbol = symbol.replace("wmooSiloV2Sonic", "");
|
46
47
|
typeInfo[`symbolToken${i}`] = symbol.replace(" (wS Market)", "");
|
47
48
|
const decimals = Number(typeInfo[`decimalsToken${i}`]);
|
49
|
+
tokensDisplay.push({ symbol: symbol, address: typeInfo[`token${i}`] });
|
48
50
|
const amount = BN2Number(typeInfo[`balanceToken${i}`], decimals);
|
49
51
|
tvl += amount * price;
|
50
52
|
}
|
@@ -62,6 +64,9 @@ export class BalancerV3PoolProcessor extends GenericProcessor {
|
|
62
64
|
for (let i = 0; i < typeInfo.numberTokens; i++) {
|
63
65
|
symbols.push(typeInfo[`symbolToken${i}`]);
|
64
66
|
}
|
67
|
+
if (campaign.computeChainId === ChainId.SONIC) {
|
68
|
+
typeInfo.protocol = "Beets";
|
69
|
+
}
|
65
70
|
return {
|
66
71
|
...typeInfo,
|
67
72
|
totalSupply,
|
@@ -70,6 +75,7 @@ export class BalancerV3PoolProcessor extends GenericProcessor {
|
|
70
75
|
blacklistedSupply,
|
71
76
|
priceTargetToken,
|
72
77
|
cardName: generateCardName(type, typeInfo, campaign, symbols),
|
78
|
+
tokensDisplay,
|
73
79
|
};
|
74
80
|
}
|
75
81
|
}
|
@@ -45,6 +45,10 @@ export class BeefyProcessor extends GenericProcessor {
|
|
45
45
|
cardName: generateCardName(type, typeInfo, campaign),
|
46
46
|
pricePerShare,
|
47
47
|
tvl,
|
48
|
+
tokensDisplay: [
|
49
|
+
{ symbol: typeInfo.symbolToken0, address: typeInfo.token0 },
|
50
|
+
{ symbol: typeInfo.symbolToken1, address: typeInfo.token1 },
|
51
|
+
],
|
48
52
|
};
|
49
53
|
}
|
50
54
|
}
|
@@ -82,6 +82,10 @@ export class BunniV2Processor extends GenericProcessor {
|
|
82
82
|
totalSupply,
|
83
83
|
tvl,
|
84
84
|
whitelistedSupplyTargetToken,
|
85
|
+
tokensDisplay: [
|
86
|
+
{ symbol: typeInfo.symbolToken0, address: typeInfo.token0 },
|
87
|
+
{ symbol: typeInfo.symbolToken1, address: typeInfo.token1 },
|
88
|
+
],
|
85
89
|
};
|
86
90
|
}
|
87
91
|
}
|
@@ -25,6 +25,7 @@ export class EnzymeProcessor extends GenericProcessor {
|
|
25
25
|
totalSupply,
|
26
26
|
exchangeRate,
|
27
27
|
cardName: generateCardName(type, typeInfo, campaign),
|
28
|
+
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
28
29
|
};
|
29
30
|
}
|
30
31
|
processingRound2(typeInfo) {
|
@@ -48,6 +48,7 @@ export class EqualizerGaugeProcessor extends GenericProcessor {
|
|
48
48
|
blacklistedSupply,
|
49
49
|
priceTargetToken,
|
50
50
|
cardName: generateCardName(type, typeInfo, campaign, [], displayName),
|
51
|
+
tokensDisplay: [{ symbol: campaign.campaignParameters.symbolTargetToken, address: typeInfo.tokenAddress }],
|
51
52
|
};
|
52
53
|
}
|
53
54
|
}
|
@@ -28,6 +28,7 @@ export class FluidProcessor extends GenericProcessor {
|
|
28
28
|
totalSupply,
|
29
29
|
priceTargetToken,
|
30
30
|
cardName: generateCardName(type, typeInfo, campaign),
|
31
|
+
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
31
32
|
};
|
32
33
|
}
|
33
34
|
processingRound3(typeInfo) {
|
@@ -43,6 +43,10 @@ export class GammaProcessor extends GenericProcessor {
|
|
43
43
|
blacklistedSupply,
|
44
44
|
tvl,
|
45
45
|
cardName: generateCardName(type, typeInfo, campaign),
|
46
|
+
tokensDisplay: [
|
47
|
+
{ symbol: typeInfo.symbolToken0, address: typeInfo.token0 },
|
48
|
+
{ symbol: typeInfo.symbolToken1, address: typeInfo.token1 },
|
49
|
+
],
|
46
50
|
};
|
47
51
|
}
|
48
52
|
computeRound1(type, typeInfo) {
|
@@ -52,6 +52,7 @@ export class GearboxProcessor extends GenericProcessor {
|
|
52
52
|
tvl: tvl,
|
53
53
|
priceTargetToken: priceTargetToken,
|
54
54
|
cardName: generateCardName(type, typeInfo, campaign),
|
55
|
+
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlyingToken }],
|
55
56
|
};
|
56
57
|
}
|
57
58
|
}
|
@@ -43,6 +43,10 @@ export class HanjiVaultProcessor extends GenericProcessor {
|
|
43
43
|
}
|
44
44
|
async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
|
45
45
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
46
|
+
const tokensDisplay = [];
|
47
|
+
for (let i = 0; i < typeInfo.numberTokens; i++) {
|
48
|
+
tokensDisplay.push({ symbol: typeInfo[`symbolToken${i}`], address: typeInfo[`token${i}`] });
|
49
|
+
}
|
46
50
|
const tvl = BN2Number(typeInfo.tvl, 18);
|
47
51
|
const priceTargetToken = tvl / totalSupply;
|
48
52
|
return {
|
@@ -53,6 +57,7 @@ export class HanjiVaultProcessor extends GenericProcessor {
|
|
53
57
|
blacklistedSupply,
|
54
58
|
priceTargetToken,
|
55
59
|
cardName: generateCardName(type, typeInfo, campaign),
|
60
|
+
tokensDisplay,
|
56
61
|
};
|
57
62
|
}
|
58
63
|
}
|
@@ -14,7 +14,7 @@ type callKeysHS = mandatoryCallKeys & {
|
|
14
14
|
};
|
15
15
|
type dataRawHS = callKeysHS & {
|
16
16
|
decimalsUnderlying: string;
|
17
|
-
|
17
|
+
symbolUnderlyingToken: string;
|
18
18
|
};
|
19
19
|
type dataTypeHS = dataType & {};
|
20
20
|
export declare class HoldStationProcessor extends GenericProcessor<callKeysHS, dataRawHS, dataTypeHS> {
|
@@ -9,7 +9,7 @@ export class HoldStationProcessor extends GenericProcessor {
|
|
9
9
|
],
|
10
10
|
round2: [
|
11
11
|
{ key: "decimalsUnderlying", call: "decimals", target: "underlying" },
|
12
|
-
{ key: "
|
12
|
+
{ key: "symbolUnderlyingToken", call: "symbol", target: "underlying" },
|
13
13
|
],
|
14
14
|
round3: [],
|
15
15
|
round4: [{ key: "totalSupply", call: "totalSupply", target: "tokenAddress" }],
|
@@ -18,7 +18,7 @@ export class HoldStationProcessor extends GenericProcessor {
|
|
18
18
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
19
19
|
const decimalsUnderlying = Number(typeInfo.decimalsUnderlying);
|
20
20
|
const amountUnderlying = BN2Number(typeInfo.tvl, decimalsUnderlying);
|
21
|
-
const underlyingPrice = (await pricer.get({ symbol: typeInfo.
|
21
|
+
const underlyingPrice = (await pricer.get({ symbol: typeInfo.symbolUnderlyingToken })) ?? 0;
|
22
22
|
const tvl = underlyingPrice * amountUnderlying;
|
23
23
|
const priceTargetToken = tvl / totalSupply;
|
24
24
|
return {
|
@@ -29,6 +29,7 @@ export class HoldStationProcessor extends GenericProcessor {
|
|
29
29
|
priceTargetToken: priceTargetToken,
|
30
30
|
cardName: generateCardName(type, typeInfo, campaign),
|
31
31
|
blacklistedSupply,
|
32
|
+
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
32
33
|
};
|
33
34
|
}
|
34
35
|
}
|
@@ -29,6 +29,7 @@ export class HourglassProcessor extends GenericProcessor {
|
|
29
29
|
cardName: generateCardName(type, typeInfo, campaign),
|
30
30
|
blacklistedSupply,
|
31
31
|
totalSupply,
|
32
|
+
tokensDisplay: [{ symbol: typeInfo.symbolUnderlyingToken, address: typeInfo.underlying }],
|
32
33
|
};
|
33
34
|
}
|
34
35
|
}
|