Skip to content

Commit

Permalink
fixed all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hojarasca committed May 28, 2024
1 parent 9ccd12c commit 0b51700
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 174 deletions.
1 change: 0 additions & 1 deletion cli/src/commands/contract-diff-command.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { calculateDiffWithUpgrade } from "../lib";
import { temporaryDirectory } from "tempy";
import { exec } from "node:child_process";
import { withSpinner } from "../lib/with-spinner.js";
import type { EnvBuilder } from "../lib/env-builder.js";

export const contractDiff = async (
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/download-code-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function downloadCode(
l1Filter: string[]
): Promise<void> {
await assertDirectoryExists(targetDir);
const { diff } = await calculateDiffWithUpgrade(env, upgradeDirectory, false);
const { diff } = await calculateDiffWithUpgrade(env, upgradeDirectory);

const l2Client = env.l2Client();
const repo = await env.contractsRepo();
Expand Down
9 changes: 3 additions & 6 deletions cli/src/lib/compare-current-state-with.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { AbiSet, ZkSyncEraState, UpgradeChanges, lookupAndParse, type ZkSyncEraD
import type { EnvBuilder } from "./env-builder.js";
import { withSpinner } from "./with-spinner";

export async function calculateDiffWithUpgrade(
export async function calculateDiffWithUpgrade (
env: EnvBuilder,
upgradeDirectory: string,
compile = true
upgradeDirectory: string
): Promise<{ diff: ZkSyncEraDiff; state: ZkSyncEraState }> {
const state = await withSpinner(async () => {
const l1Client = env.l1Client();
Expand All @@ -15,9 +14,7 @@ export async function calculateDiffWithUpgrade(

await withSpinner(async () => {
const repo = await env.contractsRepo();
if (compile) {
await repo.compile();
}
await repo.compile();
}, "Compiling system contracts");

const diff = await withSpinner(async () => {
Expand Down
Loading

0 comments on commit 0b51700

Please sign in to comment.