Skip to content

Commit

Permalink
Merge pull request #128 from morpho-labs/refactor/reorder-functions
Browse files Browse the repository at this point in the history
refactor: reorder setRewardsDistributor for consistency
  • Loading branch information
MerlinEgalite authored Oct 3, 2023
2 parents 1fda20b + eb2d02b commit ab9f083
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/MetaMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph
emit EventsLib.SetIsAllocator(newAllocator, newIsAllocator);
}

function setRewardsDistributor(address newRewardsDistributor) external onlyOwner {
require(newRewardsDistributor != rewardsDistributor, ErrorsLib.ALREADY_SET);

rewardsDistributor = newRewardsDistributor;

emit EventsLib.SetRewardsDistributor(newRewardsDistributor);
}

function submitTimelock(uint256 newTimelock) external onlyOwner {
require(newTimelock <= MAX_TIMELOCK, ErrorsLib.MAX_TIMELOCK_EXCEEDED);
require(newTimelock != timelock, ErrorsLib.ALREADY_SET);
Expand All @@ -150,14 +158,6 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph
}
}

function setRewardsDistributor(address newRewardsDistributor) external onlyOwner {
require(newRewardsDistributor != rewardsDistributor, ErrorsLib.ALREADY_SET);

rewardsDistributor = newRewardsDistributor;

emit EventsLib.SetRewardsDistributor(newRewardsDistributor);
}

function acceptTimelock() external timelockElapsed(pendingTimelock.submittedAt) onlyOwner {
_setTimelock(pendingTimelock.value);
}
Expand Down

0 comments on commit ab9f083

Please sign in to comment.