// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

contract DeterministicDeployFactory {
    event Deployed(address deployAddress);
    function deployByCreate2(bytes memory bytecode, uint salt) external {
        address deployAddress;
        assembly {
            deployAddress := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
            if iszero(extcodesize(deployAddress)) {
                revert(0, 0)
            }
        }
        emit Deployed(deployAddress);
    }
}
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"deployAddress","type":"address"}],"name":"Deployed","type":"event"},{"inputs":[{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"deployByCreate2","outputs":[],"stateMutability":"nonpayable","type":"function"}]