Skip to content

Commit

Permalink
Merge pull request #1796 from privacy-scaling-explorations/feature/po…
Browse files Browse the repository at this point in the history
…ll-modifiers

feat(contracts): make poll modifiers virtual
  • Loading branch information
0xmad authored Aug 29, 2024
2 parents 54b3053 + b4af027 commit 960c4d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/contracts/contracts/Poll.sol
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ contract Poll is Params, Utilities, SnarkCommon, IPoll {

/// @notice A modifier that causes the function to revert if the voting period is
/// not over.
modifier isAfterVotingDeadline() {
modifier isAfterVotingDeadline() virtual {
uint256 secondsPassed = block.timestamp - deployTime;
if (secondsPassed <= duration) revert VotingPeriodNotOver();
_;
}

/// @notice A modifier that causes the function to revert if the voting period is
/// over
modifier isWithinVotingDeadline() {
modifier isWithinVotingDeadline() virtual {
uint256 secondsPassed = block.timestamp - deployTime;
if (secondsPassed >= duration) revert VotingPeriodOver();
_;
Expand Down

0 comments on commit 960c4d1

Please sign in to comment.