@merkl/api 0.20.95 → 0.20.96
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.
@@ -1,3 +1,4 @@
|
|
1
|
+
import { TokenService } from "@/modules/v4/token/token.service";
|
1
2
|
import { decodeCall } from "@/utils/decodeCalls";
|
2
3
|
import { createCall } from "@/utils/encodeCalls";
|
3
4
|
import { generateCardName } from "@/utils/generateCardName";
|
@@ -59,7 +60,10 @@ export class GenericProcessor {
|
|
59
60
|
}
|
60
61
|
async processingRound5(_index, type, typeInfo, _calls, campaign, pricer) {
|
61
62
|
const { whitelistedSupplyTargetToken, totalSupply, blacklistedSupply } = this.handleWhiteListBlacklistRound5(typeInfo, campaign);
|
62
|
-
const priceTargetToken =
|
63
|
+
const priceTargetToken = await TokenService.getPrice({
|
64
|
+
address: campaign.campaignParameters.targetToken,
|
65
|
+
chainId: campaign.computeChainId,
|
66
|
+
});
|
63
67
|
const tvl = whitelistedSupplyTargetToken * priceTargetToken;
|
64
68
|
return {
|
65
69
|
protocol: typeInfo.protocol,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { TokenService } from "@/modules/v4/token/token.service";
|
1
2
|
import { tokenType } from "./helpers/tokenType";
|
2
3
|
import { processorMapping } from "./implementations/processorMapping";
|
3
4
|
export async function getTokenPricesInfo(index, type, typeInfo, calls, campaign, pricer) {
|
@@ -17,7 +18,10 @@ export async function getTokenPricesInfo(index, type, typeInfo, calls, campaign,
|
|
17
18
|
typeInfo: {
|
18
19
|
totalSupply: 0,
|
19
20
|
blacklistedSupply: 0,
|
20
|
-
priceTargetToken:
|
21
|
+
priceTargetToken: await TokenService.getPrice({
|
22
|
+
address: campaign.campaignParameters.targetToken,
|
23
|
+
chainId: campaign.computeChainId,
|
24
|
+
}),
|
21
25
|
},
|
22
26
|
};
|
23
27
|
}
|