diff --git a/bolt-contracts/src/contracts/BoltManager.sol b/bolt-contracts/src/contracts/BoltManager.sol index 0ad705472..f81828c20 100644 --- a/bolt-contracts/src/contracts/BoltManager.sol +++ b/bolt-contracts/src/contracts/BoltManager.sol @@ -49,7 +49,9 @@ contract BoltManager is IBoltManager, OwnableUpgradeable, UUPSUpgradeable { uint48 public START_TIMESTAMP; modifier onlyMiddleware() { - require(restakingProtocols.contains(msg.sender), "BoltManager: caller is not a middleware"); + if (!restakingProtocols.contains(msg.sender)) { + revert UnauthorizedMiddleware(); + } _; } diff --git a/bolt-contracts/src/interfaces/IBoltManager.sol b/bolt-contracts/src/interfaces/IBoltManager.sol index db5097f26..1d134ca6a 100644 --- a/bolt-contracts/src/interfaces/IBoltManager.sol +++ b/bolt-contracts/src/interfaces/IBoltManager.sol @@ -7,6 +7,7 @@ interface IBoltManager { error InvalidQuery(); error OperatorAlreadyRegistered(); error OperatorNotRegistered(); + error UnauthorizedMiddleware(); struct Operator { string rpc;