Created
June 30, 2017 18:59
-
-
Save sogoiii/9913c3227bc0bf4137b9d0c768bc744b to your computer and use it in GitHub Desktop.
MetaCoin.sol Snippet 1
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
contract MetaCoin { | |
//...Code | |
uint endTime; | |
//...Code | |
modifier onlyAfterDate() { | |
if(now <= endTime) { | |
throw; | |
} | |
_; | |
} | |
//...Code | |
function MetaCoin() { | |
balances[tx.origin] = 10000; | |
endTime = 1 days; // I set endTime | |
} | |
//...Code | |
function specialFn() onlyAfterDate returns(bool) { // add modifier | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment