Skip to content

Commit

Permalink
fix: lint and revert operators in selfregistersqrtaskmiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
alrxy committed Dec 17, 2024
1 parent fb1d0a0 commit a7907c4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {AccessManager} from "../../managers/extendable/AccessManager.sol";

import {BaseMiddleware} from "../../middleware/BaseMiddleware.sol";
import {SharedVaults} from "../../extensions/SharedVaults.sol";
import {ForcePauseApprovalRegisterOperators} from "../../extensions/operators/ForcePauseApprovalRegisterOperators.sol";
import {SelfRegisterOperators} from "../../extensions/operators/SelfRegisterOperators.sol";

import {ECDSASig} from "../../extensions/managers/sigs/ECDSASig.sol";
import {OwnableAccessManager} from "../../extensions/managers/access/OwnableAccessManager.sol";
Expand All @@ -30,7 +30,7 @@ import {EqualStakePower} from "../../extensions/managers/stake-powers/EqualStake
*/
contract SelfRegisterSqrtTaskMiddleware is
SharedVaults,
ForcePauseApprovalRegisterOperators,
SelfRegisterOperators,
ECDSASig,
KeyManagerAddress,
OwnableAccessManager,
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/operators/ApprovalRegisterOperators.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract contract ApprovalRegisterOperators is SelfRegisterOperators, IApprovalR
/**
* @notice Override to prevent direct registration
*/
function registerOperator(bytes memory key, address vault, bytes memory signature) external override virtual {
function registerOperator(bytes memory key, address vault, bytes memory signature) external virtual override {
revert DirectRegistrationNotAllowed();
}

Expand All @@ -74,7 +74,7 @@ abstract contract ApprovalRegisterOperators is SelfRegisterOperators, IApprovalR
address vault,
bytes memory signature,
bytes memory keySignature
) public override virtual {
) public virtual override {
revert DirectRegistrationNotAllowed();
}

Expand Down
19 changes: 15 additions & 4 deletions src/extensions/operators/ForcePauseApprovalRegisterOperators.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {BaseOperators} from "./BaseOperators.sol";
* @notice Extension of SelfRegisterOperators that allows authorized addresses to forcefully pause operators
* @dev Implements force pause functionality and prevents unpausing of force-paused operators
*/

abstract contract ForcePauseApprovalRegisterOperators is ForcePauseSelfRegisterOperators, ApprovalRegisterOperators {
uint64 public constant ForcePauseApprovalRegisterOperators_VERSION = 1;

Expand All @@ -32,19 +33,29 @@ abstract contract ForcePauseApprovalRegisterOperators is ForcePauseSelfRegisterO
revert DirectRegistrationNotAllowed();
}

function _beforeUnpauseOperator(address operator) internal virtual override(ForcePauseSelfRegisterOperators, BaseOperators) {
function _beforeUnpauseOperator(
address operator
) internal virtual override(ForcePauseSelfRegisterOperators, BaseOperators) {
super._beforeUnpauseOperator(operator);
}

function _beforeUnpauseOperatorVault(address operator, address vault) internal virtual override(ForcePauseSelfRegisterOperators, BaseOperators) {
function _beforeUnpauseOperatorVault(
address operator,
address vault
) internal virtual override(ForcePauseSelfRegisterOperators, BaseOperators) {
super._beforeUnpauseOperatorVault(operator, vault);
}

function _beforeUnregisterOperator(address operator) internal virtual override(ForcePauseSelfRegisterOperators, BaseOperators) {
function _beforeUnregisterOperator(
address operator
) internal virtual override(ForcePauseSelfRegisterOperators, BaseOperators) {
super._beforeUnregisterOperator(operator);
}

function _beforeUnregisterOperatorVault(address operator, address vault) internal virtual override(BaseOperators, ForcePauseSelfRegisterOperators) {
function _beforeUnregisterOperatorVault(
address operator,
address vault
) internal virtual override(BaseOperators, ForcePauseSelfRegisterOperators) {
super._beforeUnregisterOperatorVault(operator, vault);
}
}

0 comments on commit a7907c4

Please sign in to comment.