Skip to content

Commit

Permalink
fix access control
Browse files Browse the repository at this point in the history
  • Loading branch information
ControlCplusControlV committed Oct 2, 2023
1 parent d7de56e commit a84260a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MevEth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ contract MevEth is Auth, ERC20, IERC4626, ITinyMevEth {
/// @notice Grants rewards updating the fraction.elastic.
/// @dev called from validator rewards updates
function grantRewards() external payable {
if (msg.sender != mevEth) {
revert MevEthErrors.UnAuthorizedCaller();
}
if (msg.value == 0) revert MevEthErrors.ZeroValue();

fraction.elastic += uint128(msg.value);
Expand Down

0 comments on commit a84260a

Please sign in to comment.