@merkl/api 0.18.10 → 0.18.11

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
+ // @ts-nocheck
1
2
  import { BN2Number, ChainInteractionService, EigenLayerStrategyInterface, EigenLayerStrategy__factory, } from "@sdk";
2
3
  export async function getEigenLayerUserPositions(user, _chainId, campaigns) {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { CDPMANAGER_ADDRESS, SORTEDCDPS_ADDRESS } from "@/constants";
2
3
  import { batchMulticallCallWithRetry } from "@/utils/generic";
3
4
  import { BN2Number, CdpManagerInterface, SortedCdpsInterface } from "@sdk";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { CacheService } from "@/modules/v4/cache";
2
3
  import { TTLPresets } from "@/modules/v4/cache/cache.model";
3
4
  import { ChainInteractionService } from "@/modules/v4/chainInteraction/chainInteraction.service";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { ALM, NETWORK_LABELS, merklSubgraphALMEndpoints, withTimeout } from "@sdk";
2
3
  import { BigNumber } from "ethers";
3
4
  import { request } from "graphql-request";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { AMM, NETWORK_LABELS, merklSubgraphAMMEndpoints, withTimeout } from "@sdk";
2
3
  import { request } from "graphql-request";
3
4
  import { positionsQuery } from ".";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { MERKL_USER_POSITION_FETCHING_TIMEOUT } from "@/constants";
2
3
  import { AMM, NETWORK_LABELS, getSupportedNFPWrapperMapping, merklSubgraphNFPWrapperEndpoints, withTimeout, } from "@sdk";
3
4
  import { request } from "graphql-request";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { gql } from "graphql-request";
2
3
  // End timestamp is 0 for active positions
3
4
  export const positionsQuery = gql `
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { BN2Number, CTokenInterface, CompFork, CompoundSubCampaignType, ERC20Interface, IonicERC20_INTERFACE, LayerBankERC20Interface, } from "@sdk";
2
3
  export async function getCompoundUserPositions(user, _chainId, campaigns) {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { BN2Number, Campaign, ERC20Interface } from "@sdk";
2
3
  import { getAddress } from "ethers/lib/utils";
3
4
  export async function getEulerUserPositions(user, _chainId, tokens) {
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { Campaign, withTimeout } from "@sdk";
2
3
  import { MERKL_USER_POSITION_FETCHING_GLOBAL_TIMEOUT } from "../../constants";
3
4
  import { executeSimple } from "../../utils/execute";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { Campaign, Forwarder, MorphoSubCampaignType, } from "@sdk";
2
3
  import { utils } from "ethers";
3
4
  import { VEST_TOKEN } from "../campaigns/campaignTypes/VestDynamicData";
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { BN2Number, ERC20Interface } from "@sdk";
2
3
  import { getAddress } from "ethers/lib/utils";
3
4
  export async function getSiloUserPositions(user, _chainId, mainParameters) {
@@ -39,7 +39,7 @@ export class TokenRepository {
39
39
  * @param address
40
40
  */
41
41
  static async getTokenInfo(token) {
42
- return TokenInteractionService(token.chainId);
42
+ return TokenInteractionService(token.chainId).info(token.address);
43
43
  }
44
44
  /**
45
45
  * Read token from database
@@ -13,7 +13,7 @@ export default (app) => app.use(checkQueryChainIdValidity()).get("/fetch", async
13
13
  const distributionCreator = DistributionCreator__factory.connect(registry(chainId)?.Merkl?.DistributionCreator, providers[chainId]);
14
14
  const campaignStruct = await distributionCreator.campaignList(request.query.index);
15
15
  try {
16
- const parsingResult = await parseCampaign(chainId, campaignStruct, request.query.index ?? 0);
16
+ const parsingResult = await parseCampaign(chainId, { ...campaignStruct, amount: campaignStruct.amount.toString() }, request.query.index ?? 0);
17
17
  if (parsingResult.success)
18
18
  return JSON.stringify(parsingResult.parsedCampaign);
19
19
  throw parsingResult.message;