-
Notifications
You must be signed in to change notification settings - Fork 29
/
IL2ContractDeployer.sol
36 lines (32 loc) · 1.37 KB
/
IL2ContractDeployer.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @author Matter Labs
* @notice System smart contract that is responsible for deploying other smart contracts on zkSync.
*/
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.
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;
}