Skip to content

Commit

Permalink
added missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BkChoy committed Dec 13, 2024
1 parent 1dbe63d commit 67d8ac5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions contracts/core/RebaseController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,27 @@ import "./interfaces/ISecurityPool.sol";
* @notice Updates strategy rewards in the Staking Pool and and performs emergency pausing/reopening of the pool
*/
contract RebaseController is Ownable {
// address of staking pool
IStakingPool public stakingPool;
// address of priority pool
IPriorityPool public priorityPool;
// address of security pool
ISecurityPool public securityPool;

// address authorized to pause pool in case of emergency
address public emergencyPauser;

error PoolClosed();
error SenderNotAuthorized();
error NoLossDetected();

/**
* @notice Initializes contract
* @param _stakingPool address of staking pool
* @param _priorityPool address of priority pool
* @param _securityPool address of security pool
* @param _emergencyPauser address authorized to pause pool in case of emergency
*/
constructor(
address _stakingPool,
address _priorityPool,
Expand All @@ -35,6 +46,9 @@ contract RebaseController is Ownable {
emergencyPauser = _emergencyPauser;
}

/**
* @notice Reverts if sender is not emergency pauser
*/
modifier onlyEmergencyPauser() {
if (msg.sender != emergencyPauser) revert SenderNotAuthorized();
_;
Expand Down

0 comments on commit 67d8ac5

Please sign in to comment.