Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/libraries/Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ library Utils {

/// @notice Returns the address of a contract created with CREATE2 using the given CREATE2 deployer.
function getCreate2Address(bytes32 salt, bytes memory initCode, address deployer) internal pure returns (address) {
return vm.computeCreate2Address(salt, keccak256(initCode), deployer);
bytes32 hash = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, keccak256(initCode)));
return address(uint160(uint256(hash)));
}

/// @notice Returns the owner that pointed to the owner to be removed in the linked list.
Expand Down