Skip to content

Commit

Permalink
refactor: add gap
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGuru7 committed Dec 21, 2023
1 parent 05d1962 commit e3f9df8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contracts/TimeManagerV5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ contract TimeManagerV5 {
/// @dev Sets true when block timestamp is used
bool public isTimeBased;

/**
* @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[47] private __gap;

/**
* @dev Retrieves the current slot
* @return Current slot
Expand Down
7 changes: 7 additions & 0 deletions contracts/TimeManagerV8.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ abstract contract TimeManagerV8 {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
bool public immutable isTimeBased;

Check warning on line 11 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;

Check warning on line 21 in contracts/TimeManagerV8.sol

View workflow job for this annotation

GitHub Actions / Lint

Immutable variables name are set to be in capitalized SNAKE_CASE

Expand Down

0 comments on commit e3f9df8

Please sign in to comment.