Skip to content

Commit

Permalink
refactor: make allowlist public (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
renlulu authored Mar 31, 2024
1 parent 4e843df commit 87668b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions contracts/src/core/MachServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ contract MachServiceManager is
if (operator == address(0)) {
revert ZeroAddress();
}
if (_allowlist[operator]) {
if (allowlist[operator]) {
revert AlreadyInAllowlist();
}
_allowlist[operator] = true;
allowlist[operator] = true;
emit OperatorAllowed(operator);
}

Expand All @@ -106,10 +106,10 @@ contract MachServiceManager is
* @param operator The operator to remove
*/
function removeFromAllowlist(address operator) external onlyOwner {
if (!_allowlist[operator]) {
if (!allowlist[operator]) {
revert NotInAllowlist();
}
_allowlist[operator] = false;
allowlist[operator] = false;
emit OperatorDisallowed(operator);
}

Expand Down Expand Up @@ -160,7 +160,7 @@ contract MachServiceManager is
address operator,
ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature
) public override(ServiceManagerBase, IServiceManager) whenNotPaused onlyRegistryCoordinator {
if (allowlistEnabled && !_allowlist[operator]) {
if (allowlistEnabled && !allowlist[operator]) {
revert NotInAllowlist();
}
_avsDirectory.registerOperatorToAVS(operator, operatorSignature);
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/core/MachServiceManagerStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract contract MachServiceManagerStorage {
EnumerableSet.AddressSet internal _operators;

/// @notice Set of operators that are allowed to register
mapping(address => bool) internal _allowlist;
mapping(address => bool) public allowlist;

/// @notice address that is permissioned to confirm alerts
address public alertConfirmer;
Expand Down

0 comments on commit 87668b6

Please sign in to comment.