Skip to content

Instantly share code, notes, and snippets.

Created June 13, 2016 21:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/38ede11d4d7780c78904ac53249064ab to your computer and use it in GitHub Desktop.
Save anonymous/38ede11d4d7780c78904ac53249064ab to your computer and use it in GitHub Desktop.
contract Creator {
function newContract(bytes data) public returns (address) {
address theNewContract;
uint s = data.length;
assembly {
calldatacopy(mload(0x40), 68, s)
theNewContract := create(callvalue, mload(0x40), s)
}
return theNewContract;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment