github.com/klaytn/klaytn@v1.12.1/node/cn/tracers/testdata/contracts/Factory2.sol (about) 1 pragma solidity ^0.5.6; 2 3 contract Factory { 4 function deploy(bytes memory code, uint256 salt) public { 5 address addr; 6 assembly { 7 addr := create2(0, add(code, 0x20), mload(code), salt) 8 if iszero(extcodesize(addr)) { 9 revert(0, 0) 10 } 11 } 12 } 13 } 14 15 contract Contract { 16 constructor(bytes32 name) public {} 17 }