Skip to content

Instantly share code, notes, and snippets.

/Untitled
Created Feb 5, 2016

Embed
What would you like to do?
Created using soleditor: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://chriseth.github.io/browser-solidity/?gist=
contract random{
/* Define variable owner of the type address*/
address owner;
/* this function is executed at initialization and sets the owner of the contract */
function Random() { owner = msg.sender; }
/* Function to recover the funds on the contract */
function kill() { if (msg.sender == owner) suicide(owner); }
//generate random number
function rand( uint256 seedB ) returns (uint256){
//define seedA variable
uint256 seedA = 1;
uint amount = 1 finney;
if (seedA == seedB) {
msg.sender.send(amount);
}
return seedA + seedB;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.