Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor fee recipient setter in OverlayV1Factory #194

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading