Skip to content

Commit

Permalink
feat: remove operator role.
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-ux committed Dec 30, 2024
1 parent 0f22981 commit 500b6d3
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions contracts/contracts/harvest/OETHHarvesterSimple.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,33 @@ contract OETHHarvesterSimple is Governable {
////////////////////////////////////////////////////
/// --- STORAGE
////////////////////////////////////////////////////
address public operator;
address public strategist;
mapping(address => bool) public isAuthorized;

////////////////////////////////////////////////////
/// --- EVENTS
////////////////////////////////////////////////////
event Harvested(address token, uint256 amount);
event OperatorSet(address operator);
event StrategistSet(address strategist);
event StrategyStatusSet(address strategy, bool status);

////////////////////////////////////////////////////
/// --- MODIFIERS
////////////////////////////////////////////////////
modifier onlyOperator() {
require(
msg.sender == operator || isGovernor(),
"Only Operator or Governor"
);
_;
}

////////////////////////////////////////////////////
/// --- CONSTRUCTOR
////////////////////////////////////////////////////
constructor(
address _governor,
address _operator,
address _strategist
) {
constructor(address _governor, address _strategist) {
require(_strategist != address(0), "Invalid strategist");
operator = _operator;
strategist = _strategist;
_setGovernor(_governor);
}

////////////////////////////////////////////////////
/// --- MUTATIVE FUNCTIONS
////////////////////////////////////////////////////
function harvestAndTransfer(address _strategy) external onlyOperator {
function harvestAndTransfer(address _strategy) external {
_harvestAndTransfer(_strategy);
}

function harvestAndTransfer(address[] calldata _strategies)
external
onlyOperator
{
function harvestAndTransfer(address[] calldata _strategies) external {
for (uint256 i = 0; i < _strategies.length; i++) {
_harvestAndTransfer(_strategies[i]);
}
Expand Down Expand Up @@ -86,11 +65,6 @@ contract OETHHarvesterSimple is Governable {
////////////////////////////////////////////////////
/// --- GOVERNANCE
////////////////////////////////////////////////////
function setOperator(address _operator) external onlyGovernor {
operator = _operator;
emit OperatorSet(_operator);
}

function setStrategyStatus(address _strategy, bool _status)
external
onlyGovernor
Expand Down

0 comments on commit 500b6d3

Please sign in to comment.