Skip to content

Commit

Permalink
fix: compile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav Burtsevych committed Dec 23, 2024
1 parent a160c2c commit 6eb57a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract TransparentProxyFactoryZkSync is TransparentProxyFactoryBase {
) internal pure override returns (address) {
bytes32 addressHash = keccak256(
bytes.concat(
ZKSYNC_CREATE2_PREFIX,
Create2UtilsZkSync.ZKSYNC_CREATE2_PREFIX,
bytes32(uint256(uint160(sender))),
salt,
Create2UtilsZkSync.getBytecodeHashFromBytecode(creationCode),
Expand Down
4 changes: 3 additions & 1 deletion zksync/src/contracts/utils/ScriptUtilsZkSync.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ library Create2UtilsZkSync {
// https://github.com/matter-labs/era-contracts/blob/main/system-contracts/contracts/Create2Factory.sol
address public constant CREATE2_FACTORY = 0x0000000000000000000000000000000000010000;

bytes32 public constant ZKSYNC_CREATE2_PREFIX = keccak256('zksyncCreate2');

/**
* @dev Deploys a contract using the CREATE2 opcode.
* @param salt A salt to influence the address of the deployed contract.
Expand Down Expand Up @@ -158,7 +160,7 @@ library Create2UtilsZkSync {
) internal pure returns (address) {
bytes32 addressHash = keccak256(
bytes.concat(
keccak256('zksyncCreate2'), // zkSync create2 prefix
ZKSYNC_CREATE2_PREFIX,
bytes32(uint256(uint160(CREATE2_FACTORY))),
salt,
bytecodeHash,
Expand Down

0 comments on commit 6eb57a7

Please sign in to comment.