Skip to content

Commit

Permalink
Merge pull request #194 from overlay-market/s/refactor-factory-constr…
Browse files Browse the repository at this point in the history
…uctor

Refactor fee recipient setter in OverlayV1Factory
  • Loading branch information
magnetto90 authored Mar 29, 2024
2 parents 84d1669 + 0a2b635 commit be5a5c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/OverlayV1Factory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit be5a5c3

Please sign in to comment.