Skip to content

Commit

Permalink
fix: Scope 1. Misc. TimeManagerV8
Browse files Browse the repository at this point in the history
  • Loading branch information
Debugger022 committed Feb 27, 2024
1 parent 6aebf3b commit 0a957e5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions contracts/TimeManagerV8.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ pragma solidity 0.8.13;
import { SECONDS_PER_YEAR } from "./constants.sol";

abstract contract TimeManagerV8 {
/// @notice Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
uint256 public immutable blocksOrSecondsPerYear;

Check warning on line 9 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Check warning on line 9 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

/// @notice Acknowledges if a contract is time based or not
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
bool public immutable isTimeBased;

Check warning on line 13 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Check warning on line 13 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

/// @notice Stores the current block timestamp or block number depending on isTimeBased
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
function() view returns (uint256) private immutable _getCurrentSlot;

Check warning on line 17 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Check warning on line 17 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[48] private __gap;

/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
function() view returns (uint256) private immutable _getCurrentSlot;
uint256[50] private __gap;

/// @notice Thrown when blocks per year is invalid
error InvalidBlocksPerYear();
Expand Down

0 comments on commit 0a957e5

Please sign in to comment.