From 0a2b635dc6143c88d46e76e3216698630bc29393 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 28 Mar 2024 19:05:56 +0000 Subject: [PATCH] Refactor fee recipient setter in OverlayV1Factory --- contracts/OverlayV1Factory.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contracts/OverlayV1Factory.sol b/contracts/OverlayV1Factory.sol index 3cef0f41..20feea73 100644 --- a/contracts/OverlayV1Factory.sol +++ b/contracts/OverlayV1Factory.sol @@ -126,7 +126,7 @@ contract OverlayV1Factory is IOverlayV1Factory { ov = IOverlayV1Token(_ov); // set the fee recipient - feeRecipient = _feeRecipient; + _setFeeRecipient(_feeRecipient); // create a new deployer to use when deploying markets deployer = new OverlayV1Deployer(_ov); @@ -215,6 +215,10 @@ contract OverlayV1Factory is IOverlayV1Factory { /// @notice Setter for fee repository function setFeeRecipient(address _feeRecipient) external onlyGovernor { + _setFeeRecipient(_feeRecipient); + } + + function _setFeeRecipient(address _feeRecipient) internal { require(_feeRecipient != address(0), "OVV1: feeRecipient should not be zero address"); feeRecipient = _feeRecipient; emit FeeRecipientUpdated(msg.sender, _feeRecipient);