Skip to content

Commit

Permalink
feat: add StrategyTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Nov 22, 2023
1 parent 29df1a3 commit f21b69f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contracts/strategies/StrategyTemplate.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.19;

import "../interfaces/IStrategy.sol";

abstract contract StrategyTemplate is IStrategy {
error NotPortfolio();

address public immutable portfolio;

constructor(address portfolio_) {
portfolio = portfolio_;
}

modifier onlyPortfolio() {
if (msg.sender != portfolio) revert NotPortfolio();
_;
}
}

0 comments on commit f21b69f

Please sign in to comment.