@merkl/api 0.10.242 → 0.10.244

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,7 @@ async function getEulerV2Vaults() {
44
44
  return {
45
45
  allowFailure: true,
46
46
  callData: EulerVaultLensInterface.encodeFunctionData("getRecognizedCollateralsLTVInfo", [vault.address]),
47
- target: VAULT_LENS_ADDRESS[ChainId.MAINNET],
47
+ target: VAULT_LENS_ADDRESS[chainId],
48
48
  };
49
49
  }),
50
50
  });
@@ -64,7 +64,7 @@ async function getEulerV2Vaults() {
64
64
  });
65
65
  }
66
66
  }
67
- const resCollatUnderlying = await batchMulticallCallWithRetry(ChainId.MAINNET, {
67
+ const resCollatUnderlying = await batchMulticallCallWithRetry(chainId, {
68
68
  calls: callsCollatUnderlying,
69
69
  });
70
70
  for (let i = 0; i < resCollatUnderlying.length; i = i + 2) {
@@ -75,7 +75,7 @@ async function getEulerV2Vaults() {
75
75
  target: underlyingToken,
76
76
  });
77
77
  }
78
- const resCollatUnderlyingSymbol = await batchMulticallCallWithRetry(ChainId.MAINNET, {
78
+ const resCollatUnderlyingSymbol = await batchMulticallCallWithRetry(chainId, {
79
79
  calls: callsCollatUnderlyingSymbol,
80
80
  });
81
81
  vaults = vaults.concat((await Promise.all(decodedVaults.map(async (decodedVault, index) => {
@@ -1,4 +1,4 @@
1
- import { ETH_ZKSYNC_ADDRESS } from "@sdk";
1
+ import { ETH_ADDRESS, ETH_ZKSYNC_ADDRESS } from "@sdk";
2
2
  import { decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
3
3
  import { ChainInteractionService } from "../chainInteraction";
4
4
  import { EnsoService } from "../enso/enso.service";
@@ -64,7 +64,7 @@ export class InteractionService {
64
64
  static async getApproval(chainId, owner, spender, tokenAddress, amount) {
65
65
  // Normalizing ETH on ZKSync
66
66
  if (tokenAddress === ETH_ZKSYNC_ADDRESS)
67
- tokenAddress = ETH_ZKSYNC_ADDRESS;
67
+ tokenAddress = ETH_ADDRESS;
68
68
  //TODO: add utils to make using viem type-safety more concise
69
69
  const abi = parseAbi([
70
70
  "function approve(address, uint256) returns (bool)",
@@ -101,7 +101,7 @@ export class InteractionService {
101
101
  static async getTransaction(provider, chainId, protocolId, identifier, userAddress, fromTokenAddress, fromTokenAmount, slippage) {
102
102
  // Normalizing ETH on ZKSync
103
103
  if (fromTokenAddress === ETH_ZKSYNC_ADDRESS)
104
- fromTokenAddress = ETH_ZKSYNC_ADDRESS;
104
+ fromTokenAddress = ETH_ADDRESS;
105
105
  if (provider === "zap")
106
106
  return await KyberZapService.getTransaction(chainId, protocolId, identifier, userAddress, fromTokenAddress, fromTokenAmount, slippage);
107
107
  const { tx, ...quote } = await EnsoService.getTransaction({