Skip to content

Commit

Permalink
chore(scripts): remove unconditionally removed facets (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 authored May 16, 2024
1 parent 3601648 commit 2840540
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ jobs:
rm -rf ./l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol
- name: Run Slither
run: slither --config ./l1-contracts/slither.config.json ./l1-contracts
run: |
cd l1-contracts
slither --config ./slither.config.json .
8 changes: 1 addition & 7 deletions l1-contracts/src.ts/diamondCut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import { ethers } from "ethers";
import { IZkSyncHyperchainFactory } from "../typechain/IZkSyncHyperchainFactory";
import { IZkSyncHyperchainBaseFactory } from "../typechain/IZkSyncHyperchainBaseFactory";

// Some of the facets are to be removed with the upcoming upgrade.
const UNCONDITIONALLY_REMOVED_FACETS = ["DiamondCutFacet", "GovernanceFacet"];

export enum Action {
Add = 0,
Replace = 1,
Expand Down Expand Up @@ -131,10 +128,7 @@ export async function getFacetCutsForUpgrade(
namesOfFacetsToBeRemoved?: string[]
) {
const newFacetCuts = await getCurrentFacetCutsForAdd(adminAddress, gettersAddress, mailboxAddress, executorAddress);
namesOfFacetsToBeRemoved = namesOfFacetsToBeRemoved || [
...UNCONDITIONALLY_REMOVED_FACETS,
...Object.keys(newFacetCuts),
];
namesOfFacetsToBeRemoved = namesOfFacetsToBeRemoved || [...Object.keys(newFacetCuts)];
const oldFacetCuts = await getDeployedFacetCutsForRemove(wallet, zkSyncAddress, namesOfFacetsToBeRemoved);
return [...oldFacetCuts, ...Object.values(newFacetCuts)];
}

0 comments on commit 2840540

Please sign in to comment.