Created
February 4, 2016 14:30
-
-
Save chfast/c733ff5a18164a94ebcb 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 Timestamping { | |
mapping(bytes32 => uint256) stamps; | |
function Timestamping() { | |
set_stamp("hello world"); | |
} | |
function set_stamp(bytes32 hash) { | |
stamps[hash] = block.timestamp; | |
// FIXME: prevent reseting stamp | |
} | |
function get_stamp(bytes32 hash) returns (uint256) { | |
return stamps[hash]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment