Skip to content

Commit

Permalink
Add reserved space for future upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ducthotran2010 authored Nov 4, 2022
1 parent 4ea5137 commit 603d7f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/ronin/staking/RewardCalculation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ abstract contract RewardCalculation is IRewardPool {
/// @dev Mapping from the pool address => reward pool fields
mapping(address => PoolFields) private _stakingPool;

/**
* @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.
*/
uint256[50] private ______gap;

/**
* @inheritdoc IRewardPool
*/
Expand Down
6 changes: 6 additions & 0 deletions contracts/ronin/staking/StakingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ abstract contract StakingManager is
/// @dev Mapping from pool address => staking pool detail
mapping(address => PoolDetail) internal _stakingPool;

/**
* @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.
*/
uint256[50] private ______gap;

modifier noEmptyValue() {
require(msg.value > 0, "StakingManager: query with empty value");
_;
Expand Down

0 comments on commit 603d7f6

Please sign in to comment.