Skip to content

Commit

Permalink
chore(zksync): update zksync limits (#1351)
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <[email protected]>
  • Loading branch information
james-a-morris authored Jan 6, 2025
1 parent 177ef0f commit 793a856
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions api/limits.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as sdk from "@across-protocol/sdk";
import { VercelResponse } from "@vercel/node";
import { BigNumber, ethers } from "ethers";
import { DEFAULT_SIMULATED_RECIPIENT_ADDRESS } from "./_constants";
import { CHAIN_IDs, DEFAULT_SIMULATED_RECIPIENT_ADDRESS } from "./_constants";
import { TokenInfo, TypedVercelRequest } from "./_types";
import { object, assert, Infer, optional, string } from "superstruct";

Expand Down Expand Up @@ -358,13 +358,18 @@ const handler = async (
.mul(maxDepositShortDelay)
.div(sdk.utils.fixedPointAdjustment);

const maximumDeposit = getMaxDeposit(
liquidReserves,
bufferedMaxDepositShortDelay,
limitsBufferMultiplier,
chainHasMaxBoundary,
routeInvolvesLiteChain
);
// FIXME: Remove after campaign is complete
const maximumDeposit =
destinationChainId === CHAIN_IDs.ZK_SYNC &&
computedOriginChainId === CHAIN_IDs.MAINNET
? liquidReserves
: getMaxDeposit(
liquidReserves,
bufferedMaxDepositShortDelay,
limitsBufferMultiplier,
chainHasMaxBoundary,
routeInvolvesLiteChain
);

const responseJson = {
// Absolute minimum may be overridden by the environment.
Expand Down

0 comments on commit 793a856

Please sign in to comment.