Thu Mar 30 2023 11:35:07 GMT+0000 (Coordinated Universal Time)
Saved by @RareSkills
contract ExampleContract { uint256 public lastCall; function hasCooldown() public { require(block.timestamp > lastCall + 1 days, "hasn't been a day"); lastCall = block.timestamp; // update the last time the function was called } }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments