Skip to content

Commit

Permalink
Merge #1992
Browse files Browse the repository at this point in the history
1992: initializing reentrancy guard in constructor r=Deniallugo a=Barichek



Co-authored-by: Ihor Barenblat <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and Barichek authored Nov 9, 2021
2 parents 2ed0038 + c9da4d6 commit 9561054
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions contracts/contracts/DeployFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ contract DeployFactory is TokenDeployInit {
require(_governor != address(0), "governor check");
require(_feeAccountAddress != address(0), "fee acc address check");

ZkSync(_zkSyncTarget).initialize(abi.encode(address(0), address(0), address(0), bytes32(0)));

deployProxyContracts(_govTarget, _verifierTarget, _zkSyncTarget, _genesisRoot, _firstValidator, _governor);

selfdestruct(msg.sender);
Expand Down
4 changes: 4 additions & 0 deletions contracts/contracts/ZkSync.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard {
return !exodusMode;
}

constructor() {
initializeReentrancyGuard();
}

/// @notice zkSync contract initialization. Can be external because Proxy contract intercepts illegal calls of this function.
/// @param initializationParameters Encoded representation of initialization parameters:
/// @dev _governanceAddress The address of Governance contract
Expand Down

0 comments on commit 9561054

Please sign in to comment.