Created
July 14, 2017 19:29
-
-
Save bergutman/1c66c3a693187369e430147c2e2b6dcf 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 Audits { | |
address owner; | |
mapping(address => uint) audits; | |
function Audits() { | |
owner = msg.sender; | |
} | |
function Approve(address addr) { | |
if (owner != msg.sender) throw; | |
audits[addr] = block.timestamp + 7 days; | |
} | |
function Revoke(address addr) { | |
if (owner != msg.sender) throw; | |
audits[addr] = 0; | |
} | |
function IsApproved(address addr) returns(bool) { | |
if (msg.value < 10) throw; | |
return block.timestamp < audits[addr]; | |
} | |
function Withdraw() { | |
if (owner != msg.sender) throw; | |
owner.send(this.balance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment