Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-2608]: TimeManagerV5 storage fix #28

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/TimeManagerV5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
bool private isInitialized;

/// @notice Deprecated slot for _getCurrentSlot function pointer
bytes32 private __deprecatedSlot1;
bytes8 private __deprecatedSlot1;

/**
* @dev This empty reserved space is put in place to allow future versions to add new
Expand All @@ -39,13 +39,13 @@
* @param blocksPerYear_ The number of blocks per year
*/
function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {
if (isInitialized) revert("Already initialized TimeManager");

Check warning on line 42 in contracts/TimeManagerV5.sol

View workflow job for this annotation

GitHub Actions / Lint

Use Custom Errors instead of revert statements

if (!timeBased_ && blocksPerYear_ == 0) {
revert("Invalid blocks per year");

Check warning on line 45 in contracts/TimeManagerV5.sol

View workflow job for this annotation

GitHub Actions / Lint

Use Custom Errors instead of revert statements
}
if (timeBased_ && blocksPerYear_ != 0) {
revert("Invalid time based configuration");

Check warning on line 48 in contracts/TimeManagerV5.sol

View workflow job for this annotation

GitHub Actions / Lint

Use Custom Errors instead of revert statements
}

isTimeBased = timeBased_;
Expand Down
Loading