Skip to content

Commit 9561054

Browse files
bors-zksync-dev[bot]Barichek
andauthored
Merge #1992
1992: initializing reentrancy guard in constructor r=Deniallugo a=Barichek Co-authored-by: Ihor Barenblat <[email protected]>
2 parents 2ed0038 + c9da4d6 commit 9561054

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

contracts/contracts/DeployFactory.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ contract DeployFactory is TokenDeployInit {
4040
require(_governor != address(0), "governor check");
4141
require(_feeAccountAddress != address(0), "fee acc address check");
4242

43-
ZkSync(_zkSyncTarget).initialize(abi.encode(address(0), address(0), address(0), bytes32(0)));
44-
4543
deployProxyContracts(_govTarget, _verifierTarget, _zkSyncTarget, _genesisRoot, _firstValidator, _governor);
4644

4745
selfdestruct(msg.sender);

contracts/contracts/ZkSync.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard {
118118
return !exodusMode;
119119
}
120120

121+
constructor() {
122+
initializeReentrancyGuard();
123+
}
124+
121125
/// @notice zkSync contract initialization. Can be external because Proxy contract intercepts illegal calls of this function.
122126
/// @param initializationParameters Encoded representation of initialization parameters:
123127
/// @dev _governanceAddress The address of Governance contract

0 commit comments

Comments
 (0)