diff --git a/evm/src/NttManager/ManagerBase.sol b/evm/src/NttManager/ManagerBase.sol index 127b88f03..7ae363037 100644 --- a/evm/src/NttManager/ManagerBase.sol +++ b/evm/src/NttManager/ManagerBase.sol @@ -312,7 +312,7 @@ abstract contract ManagerBase is _pause(); } - function unpause() public onlyOwnerOrPauser { + function unpause() public onlyOwner { _unpause(); } diff --git a/evm/test/NttManager.t.sol b/evm/test/NttManager.t.sol index 4725d9710..f35045cd2 100644 --- a/evm/test/NttManager.t.sol +++ b/evm/test/NttManager.t.sol @@ -231,6 +231,29 @@ contract TestNttManager is Test, IRateLimiterEvents { assertEq(nttManager.isPaused(), false); } + function test_pausePauserUnpauseOnlyOwner() public { + // transfer pauser to another address + address pauser = address(0x123); + nttManager.transferPauserCapability(pauser); + + // execute from pauser context + vm.startPrank(pauser); + assertEq(nttManager.isPaused(), false); + nttManager.pause(); + assertEq(nttManager.isPaused(), true); + + vm.expectRevert( + abi.encodeWithSelector(OwnableUpgradeable.OwnableUnauthorizedAccount.selector, pauser) + ); + nttManager.unpause(); + + // execute from owner context + // ensures that owner can still unpause + vm.startPrank(address(this)); + nttManager.unpause(); + assertEq(nttManager.isPaused(), false); + } + // === deployment with invalid token function test_brokenToken() public { DummyToken t = new DummyTokenBroken();