-
-
Save kamescg/7e7dfbe07a3d10f160ecdbf743029073 to your computer and use it in GitHub Desktop.
CREATE2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deploy(bytes _code, bytes32 _salt) public payable { | |
assembly { | |
_contract := create2( | |
callvalue(), | |
add(_code, 32), | |
mload(_code), | |
_salt) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment