Verified contractExactMIT
Create2Factory
Address0x6b8ec1e91d4baf99f0d1dbaf1214aa53199ab17e
- Balance
0 ETH
- Transactions
2
- Compiler
solc 0.8.26
- Same code
27 more contracts
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 25,776,322
- Creation transaction
- 0xa42c76a447…03a0fb1a30
- Main copy (most transactions)
- 0x5600254f…3f8670ef
contracts/Create2Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/// @notice Minimal CREATE2 factory used during hook deployment.
/// The hook address must encode Uniswap v4 permission flags in its lower 14 bits,
/// which requires controlling the deployment address via CREATE2.
contract Create2Factory {
event Deployed(address indexed addr, bytes32 indexed salt);
function deploy(bytes memory bytecode, bytes32 salt) external returns (address addr) {
assembly {
addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
}
require(addr != address(0), "Create2Factory: deployment failed");
emit Deployed(addr, salt);
}
function computeAddress(bytes32 salt, bytes32 bytecodeHash) external view returns (address) {
return address(
uint160(
uint256(
keccak256(
abi.encodePacked(bytes1(0xff), address(this), salt, bytecodeHash)
)
)
)
);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.