Skip to content

Instantly share code, notes, and snippets.

@D-Nice
Forked from anonymous/Creator.sol
Created June 14, 2016 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save D-Nice/0c003b6fed28bc1ceb659c733866ddfa to your computer and use it in GitHub Desktop.
Save D-Nice/0c003b6fed28bc1ceb659c733866ddfa 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