diff --git a/src/DeleGatorCore.sol b/src/DeleGatorCore.sol index 888a9461..2c99ace8 100644 --- a/src/DeleGatorCore.sol +++ b/src/DeleGatorCore.sol @@ -95,28 +95,40 @@ abstract contract DeleGatorCore is * @dev Check that the caller is the entry point */ modifier onlyEntryPoint() { - if (msg.sender != address(entryPoint)) revert NotEntryPoint(); + _onlyEntryPoint(); _; } + function _onlyEntryPoint() private view { + if (msg.sender != address(entryPoint)) revert NotEntryPoint(); + } + /** * @notice Require the function call to come from the EntryPoint or this contract. * @dev Check that the caller is either the delegator contract itself or the entry point */ modifier onlyEntryPointOrSelf() { - if (msg.sender != address(entryPoint) && msg.sender != address(this)) revert NotEntryPointOrSelf(); + _onlyEntryPointOrSelf(); _; } + function _onlyEntryPointOrSelf() private view { + if (msg.sender != address(entryPoint) && msg.sender != address(this)) revert NotEntryPointOrSelf(); + } + /** * @notice Require the function call to come from the DelegationManager. * @dev Check that the caller is the stored delegation manager. */ modifier onlyDelegationManager() { - if (msg.sender != address(delegationManager)) revert NotDelegationManager(); + _onlyDelegationManager(); _; } + function _onlyDelegationManager() private view { + if (msg.sender != address(delegationManager)) revert NotDelegationManager(); + } + ////////////////////////////// Constructor ////////////////////////////// /**