Skip to content

Instantly share code, notes, and snippets.

@stephantual
Created February 7, 2016 21:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephantual/f2a9ce72aac56cd9e800 to your computer and use it in GitHub Desktop.
Save stephantual/f2a9ce72aac56cd9e800 to your computer and use it in GitHub Desktop.
contract WillManager {
address public willOwner;
bytes32 public hashOfWill;
function WillManager(){
willOwner = msg.sender;
}
function newWill(string will) {
if (msg.sender != willOwner) throw;
hashOfWill = sha3(will);
}
function checkWill(string willUserIsChecking) constant returns (bool willIsCorrect) {
return (sha3(willUserIsChecking) == hashOfWill);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment