Skip to content

Commit

Permalink
feat: removed uncessary slither warnigns for timestamp (#755)
Browse files Browse the repository at this point in the history
* feat: removed uncessary slither warnigns for timestamp

* chore: fixed slither warning

* chore: fixed slither warning
  • Loading branch information
adi44 authored Mar 16, 2022
1 parent cb79103 commit c43731d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions contracts/Core/StakeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ contract StakeManager is Initializable, StakeStorage, StateManager, Pause, Stake
function unstake(uint32 stakerId, uint256 sAmount) external initialized whenNotPaused {
require(sAmount > 0, "Non-Positive Amount");
require(stakerId != 0, "staker.id = 0");
// slither-disable-next-line timestamp
require(stakers[stakerId].stake > 0, "Nonpositive stake");
// slither-disable-next-line timestamp
require(locks[msg.sender][stakers[stakerId].tokenAddress][LockType.Unstake].amount == 0, "Existing Unstake Lock");
Expand Down Expand Up @@ -334,7 +333,6 @@ contract StakeManager is Initializable, StakeStorage, StateManager, Pause, Stake
uint32 epoch = _getEpoch();
Structs.Staker storage staker = stakers[stakerId];
Structs.Lock storage lock = locks[msg.sender][staker.tokenAddress][LockType.Unstake];
// slither-disable-next-line timestamp
require(lock.unlockAfter != 0, "Did not unstake");
// slither-disable-next-line timestamp
require(lock.unlockAfter <= epoch, "Withdraw epoch not reached");
Expand Down
1 change: 0 additions & 1 deletion contracts/Core/StateManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ contract StateManager is Constants {
}

function _getEpoch() internal view returns (uint32) {
// slither-disable-next-line timestamp
return (uint32(block.timestamp) / (EPOCH_LENGTH));
}

Expand Down

0 comments on commit c43731d

Please sign in to comment.