Last active
March 14, 2017 11:19
-
-
Save izqui/86ccef492398099ce9be6066309cc20f to your computer and use it in GitHub Desktop.
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
contract Counterfact is LiveFactory { | |
function addressForNonce(uint8 nonce) constant returns (address) { | |
if (nonce > 127) throw; | |
return address(sha3(0xd6, 0x94, address(this), nonce)); | |
} | |
function Counterfact() payable { | |
firstDeployment = addressForNonce(uint8(1)); | |
bool b = firstDeployment.send(msg.value); | |
} | |
address public firstDeployment; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment