Last active
August 8, 2022 09:59
-
-
Save Ultra-Tech-code/f2c723e31bb4e997b1e281216bc38bec to your computer and use it in GitHub Desktop.
a correction to the previous deployment at : https://gist.github.com/Ultra-Tech-code/aafb6c59311d5481097c318b12f0d456
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.13; | |
contract examole{ | |
uint count; | |
uint timeframe = block.timestamp + 30 seconds; | |
// uint timeframe; | |
modifier timer{ | |
require(block.timestamp <= timeframe, "time has elapsed"); | |
_; | |
} | |
function add() public timer{ | |
count++; | |
} | |
function decrement() public timer{ | |
count--; | |
} | |
function getCount() public view returns(uint){ | |
return count; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment