Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Factory
- Optimization enabled
- true
- Compiler version
- v0.8.9+commit.e5eed63a
- Optimization runs
- 200
- EVM Version
- london
- Verified at
- 2026-04-22T08:16:16.070203Z
Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
contract Factory {
event Deployed(address deployed);
function deploy(bytes memory code, bytes32 salt) public returns (address addr) {
assembly {
addr := create2(0, add(code, 0x20), mload(code), salt)
if iszero(extcodesize(addr)) { revert(0, 0) }
}
emit Deployed(addr);
}
function computeAddress(
bytes32 bytecodeHash,
bytes32 salt) public view returns (address) {
bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, bytecodeHash));
return address(uint160(uint256(_data)));
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"london","compilationTarget":{"Factory.sol":"Factory"}}
Contract ABI
[{"type":"event","name":"Deployed","inputs":[{"type":"address","name":"deployed","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"computeAddress","inputs":[{"type":"bytes32","name":"bytecodeHash","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"addr","internalType":"address"}],"name":"deploy","inputs":[{"type":"bytes","name":"code","internalType":"bytes"},{"type":"bytes32","name":"salt","internalType":"bytes32"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b50610247806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063481286e61461003b5780634af63f02146100bb575b600080fd5b61009f610049366004610124565b604080516001600160f81b03196020808301919091523060601b6bffffffffffffffffffffffff191660218301526035820193909352605580820194909452815180820390940184526075019052815191012090565b6040516001600160a01b03909116815260200160405180910390f35b61009f6100c936600461015c565b6000818351602085016000f59050803b6100e257600080fd5b6040516001600160a01b03821681527ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e9060200160405180910390a192915050565b6000806040838503121561013757600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561016f57600080fd5b823567ffffffffffffffff8082111561018757600080fd5b818501915085601f83011261019b57600080fd5b8135818111156101ad576101ad610146565b604051601f8201601f19908116603f011681019083821181831017156101d5576101d5610146565b816040528281528860208487010111156101ee57600080fd5b82602086016020830137600060209382018401529896909101359650505050505056fea264697066735822122006f519fae31d2e0110e09c958a25f6e50d69c87d8adaa67586b5cc3eb1dfde7f64736f6c63430008090033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063481286e61461003b5780634af63f02146100bb575b600080fd5b61009f610049366004610124565b604080516001600160f81b03196020808301919091523060601b6bffffffffffffffffffffffff191660218301526035820193909352605580820194909452815180820390940184526075019052815191012090565b6040516001600160a01b03909116815260200160405180910390f35b61009f6100c936600461015c565b6000818351602085016000f59050803b6100e257600080fd5b6040516001600160a01b03821681527ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e9060200160405180910390a192915050565b6000806040838503121561013757600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561016f57600080fd5b823567ffffffffffffffff8082111561018757600080fd5b818501915085601f83011261019b57600080fd5b8135818111156101ad576101ad610146565b604051601f8201601f19908116603f011681019083821181831017156101d5576101d5610146565b816040528281528860208487010111156101ee57600080fd5b82602086016020830137600060209382018401529896909101359650505050505056fea264697066735822122006f519fae31d2e0110e09c958a25f6e50d69c87d8adaa67586b5cc3eb1dfde7f64736f6c63430008090033