Skip to content

Instantly share code, notes, and snippets.

@developeruche
Created August 1, 2022 16:09
Show Gist options
  • Save developeruche/e2b42cd6056156af47c342978c6103d9 to your computer and use it in GitHub Desktop.
Save developeruche/e2b42cd6056156af47c342978c6103d9 to your computer and use it in GitHub Desktop.
Cohort VII Classwork
// 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