Skip to content

Commit

Permalink
feat: add name param to strategy contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Dec 15, 2023
1 parent 17da0fb commit e3594aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/interfaces/IStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ interface IStrategy is IPortfolioStrategy {
// ====== Required ====== //
// Includes: IPortfolioStrategy

function name() external view returns (string memory);

/**
* @notice
* Called by the Portfolio contract after a pool is created.
Expand Down
3 changes: 3 additions & 0 deletions contracts/strategies/G3MStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ contract G3MStrategy is IG3MStrategy {

address public immutable portfolio;

/// @inheritdoc IStrategy
string public constant name = "G3MStrategy";

mapping(uint64 => IG3MStrategy.Config) public configs;

modifier onlyPortfolio() {
Expand Down
3 changes: 3 additions & 0 deletions contracts/strategies/NormalStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ contract NormalStrategy is INormalStrategy {
/// @dev Canonical Portfolio smart contract.
address public immutable portfolio;

/// @inheritdoc IStrategy
string public constant name = "NormalStrategy";

/// @dev Tracks each pool strategy configuration.
mapping(uint64 poolId => PortfolioConfig config) public configs;

Expand Down

0 comments on commit e3594aa

Please sign in to comment.