Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ethereumdegen committed Oct 17, 2024
1 parent 2161616 commit 678fb72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,12 @@ contract LenderCommitmentGroup_Smart is
_;
}

modifier onlyOwnerOrProtocolPauser() {
modifier onlyProtocolPauser() {

address pausingManager = IHasProtocolPausingManager( address(TELLER_V2) ).getProtocolPausingManager();

require(
IProtocolPausingManager( pausingManager ).isPauser(msg.sender)
|| msg.sender == owner() ,
IProtocolPausingManager( pausingManager ).isPauser(msg.sender) ,
"Not Owner or Protocol Owner"
);
_;
Expand Down Expand Up @@ -1037,14 +1036,14 @@ contract LenderCommitmentGroup_Smart is
/**
* @notice Lets the DAO/owner of the protocol implement an emergency stop mechanism.
*/
function pauseLendingPool() public virtual onlyOwnerOrProtocolPauser whenNotPaused {
function pauseLendingPool() public virtual onlyProtocolPauser whenNotPaused {
_pause();
}

/**
* @notice Lets the DAO/owner of the protocol undo a previously implemented emergency stop.
*/
function unpauseLendingPool() public virtual onlyOwnerOrProtocolPauser whenPaused {
function unpauseLendingPool() public virtual onlyProtocolPauser whenPaused {
setLastUnpausedAt();
_unpause();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract contract HasProtocolPausingManager


//Both the bool and the address together take one storage slot
bool private __paused;// .. Deprecated , handled by pausing manager
bool private __paused;// .. Deprecated , handled by pausing manager now

address private _protocolPausingManager; // 20 bytes, gap will start at new slot

Expand All @@ -31,15 +31,15 @@ abstract contract HasProtocolPausingManager
_;
}

//rename to when protocol not paused ?

modifier whenProtocolNotPaused() {
require(! IProtocolPausingManager(_protocolPausingManager). protocolPaused(), "Protocol paused" );

_;
}


//onlyinitializing?

function _setProtocolPausingManager(address protocolPausingManager) internal {
_protocolPausingManager = protocolPausingManager ;
}
Expand Down

0 comments on commit 678fb72

Please sign in to comment.