Last active
September 24, 2018 09:30
-
-
Save stablexbt/635ce5a572ad1d8d8ef518c663ba38e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| pragma solidity ^0.4.20; | |
| contract poe { | |
| mapping(string => uint) proof; | |
| event Exists(string data, uint blockNumber); | |
| function prove(string data) constant public returns (uint) { | |
| return proof[data]; | |
| } | |
| function upload(string data) public{ | |
| require (proof[data] == 0); | |
| proof[data] = block.number; | |
| emit Exists(data, block.number); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment