Skip to content

Commit

Permalink
feat: add permission for harvesting protocol rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Nov 22, 2023
1 parent 764abce commit c97bdcd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions contracts/src/abstracts/AProtocolClaimer.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.20;

abstract contract AProtocolClaimer {
event ProtocolRewardsHarvest();
import { ReentrancyGuard } from "solmate/utils/ReentrancyGuard.sol";
import { AOperator } from "./AOperator.sol";

/**
* @title Incentivized Locker contract
* @author 0xtekgrinder
* @notice Locker contract capable of claiming protocol rewards
*/
abstract contract AProtocolClaimer is ReentrancyGuard, AOperator {
/**
* @dev Harvest rewards & send them to the Controller
*/
Expand All @@ -12,8 +18,7 @@ abstract contract AProtocolClaimer {
/**
* @notice Harvest rewards
*/
function harvest() external {
emit ProtocolRewardsHarvest();
function harvest() external nonReentrant onlyOperatorOrOwner {
_harvest();
}
}

0 comments on commit c97bdcd

Please sign in to comment.