Last active
August 8, 2022 09:59
Revisions
-
Ultra-Tech-code renamed this gist
Aug 8, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Ultra-Tech-code created this gist
Aug 1, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ //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; } }