Created
August 1, 2022 16:09
-
-
Save developeruche/e2b42cd6056156af47c342978c6103d9 to your computer and use it in GitHub Desktop.
Cohort VII Classwork
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
contract Counter { | |
uint deployTime; | |
uint public count; | |
constructor() { | |
deployTime = block.timestamp; | |
} | |
function add() public { | |
require(block.timestamp < deployTime + 30, "Time UP!"); | |
count++; | |
} | |
function dec() public { | |
require(block.timestamp < deployTime + 30, "Time UP!"); | |
count--; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment