Description:
Smart contract deployed on Ethereum with Factory features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"contracts/ContractDeployerCreate2.sol": {
"content": "// SPDX-License-Identifier: MIT\r
pragma solidity >=0.8.0 <0.9.0;\r
\r
contract ContractDeployerCreate2 {\r
event Deployed(address addr, bytes32 salt);\r
\r
function deploy(bytes memory bytecode, bytes32 salt) public returns (address addr) {\r
assembly {\r
addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt)\r
if iszero(extcodesize(addr)) {\r
revert(0, 0)\r
}\r
}\r
emit Deployed(addr, salt);\r
}\r
\r
function computeAddress(bytes32 salt, bytes32 initCodeHash) public view returns (address) {\r
return address(uint160(uint256(\r
keccak256(abi.encodePacked(\r
bytes1(0xff),\r
address(this),\r
salt,\r
initCodeHash\r
))\r
)));\r
}\r
}"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 340
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}
}}
Submitted on: 2025-09-25 10:10:24
Comments
Log in to comment.
No comments yet.