From f569e00ae424033a58789bcb3ef96a038c817131 Mon Sep 17 00:00:00 2001 From: Raid Ateir Date: Wed, 30 Oct 2024 17:18:52 +0400 Subject: [PATCH] (fix): merge conflicts --- .../common/interfaces/IL2ContractDeployer.sol | 33 ------------------- .../governance/PermanentRestriction.sol | 2 +- .../contracts/upgrades/L1GenesisUpgrade.sol | 10 +----- 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 l1-contracts/contracts/common/interfaces/IL2ContractDeployer.sol diff --git a/l1-contracts/contracts/common/interfaces/IL2ContractDeployer.sol b/l1-contracts/contracts/common/interfaces/IL2ContractDeployer.sol deleted file mode 100644 index f28c12c72..000000000 --- a/l1-contracts/contracts/common/interfaces/IL2ContractDeployer.sol +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: MIT -// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. -pragma solidity ^0.8.21; - -/** - * @author Matter Labs - * @notice System smart contract that is responsible for deploying other smart contracts on a ZK chain. - */ -interface IL2ContractDeployer { - /// @notice A struct that describes a forced deployment on an address. - /// @param bytecodeHash The bytecode hash to put on an address. - /// @param newAddress The address on which to deploy the bytecodehash to. - /// @param callConstructor Whether to run the constructor on the force deployment. - /// @param value The `msg.value` with which to initialize a contract. - /// @param input The constructor calldata. - struct ForceDeployment { - bytes32 bytecodeHash; - address newAddress; - bool callConstructor; - uint256 value; - bytes input; - } - - /// @notice This method is to be used only during an upgrade to set bytecodes on specific addresses. - /// @param _deployParams the force deployments - function forceDeployOnAddresses(ForceDeployment[] calldata _deployParams) external; - - /// @notice Deploys a contract with similar address derivation rules to the EVM's `CREATE2` opcode. - /// @param _salt The create2 salt. - /// @param _bytecodeHash The correctly formatted hash of the bytecode. - /// @param _input The constructor calldata. - function create2(bytes32 _salt, bytes32 _bytecodeHash, bytes calldata _input) external; -} diff --git a/l1-contracts/contracts/governance/PermanentRestriction.sol b/l1-contracts/contracts/governance/PermanentRestriction.sol index 7cf01a5d8..7e22aa85c 100644 --- a/l1-contracts/contracts/governance/PermanentRestriction.sol +++ b/l1-contracts/contracts/governance/PermanentRestriction.sol @@ -235,7 +235,7 @@ contract PermanentRestriction is IRestriction, IPermanentRestriction, Ownable2St // Note, that we do not use an explicit call here to ensure that the function does not panic in case of // incorrect `_chain` address. - (bool success, bytes memory data) = _chain.staticcall(abi.encodeCall(IGetters.getChainId)); + (bool success, bytes memory data) = _chain.staticcall(abi.encodeCall(IGetters.getChainId, ())); if (!success || data.length < 32) { revert NotAHyperchain(_chain); } diff --git a/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol b/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol index 02697dfc9..749a489d2 100644 --- a/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol +++ b/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol @@ -21,21 +21,13 @@ import {L2ContractHelper} from "../common/libraries/L2ContractHelper.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev contract L1GenesisUpgrade is IL1GenesisUpgrade, BaseZkSyncUpgradeGenesis { -<<<<<<< HEAD -<<<<<<< HEAD - /// @notice The main function that will be called by the Admin facet. + /// @notice The main function that will be delegate-called by the chain Admin facet. /// @param _l1GenesisUpgrade the address of the l1 genesis upgrade /// @param _chainId the chain id /// @param _protocolVersion the current protocol version /// @param _l1CtmDeployerAddress the address of the l1 ctm deployer /// @param _forceDeploymentsData the force deployments data /// @param _factoryDeps the factory dependencies -======= - /// @notice The main function that will be delegate called by the upgrade proxy. ->>>>>>> origin/kl/n04-library -======= - /// @notice The main function that will be delegate-called by the chain. ->>>>>>> origin/sb-n07-library-fix-review function genesisUpgrade( address _l1GenesisUpgrade, uint256 _chainId,