Function: invest(address strategy, uint256 amount, bytes investmentInfo)
This function allows the strategy operator to invest a specified amount of tokens into a strategy.
Inputs
strategy
Control: Controlled by the caller with
STRATEGY_OPERATOR_ROLE
.Constraints: None.
Impact: The strategy in which to invest funds.
amount
Control: Controlled by the caller with
STRATEGY_OPERATOR_ROLE
.Constraints: None.
Impact: The amount to invest into the strategy.
investmentInfo
Control: Controlled by the caller with
STRATEGY_OPERATOR_ROLE
.Constraints: None.
Impact: Additional data passed to the strategy when depositing tokens.
Branches and code coverage
Intended branches
Deposits underlying tokens to the given vault.
Negative behavior
Reverts if the caller does not have
STRATEGY_OPERATOR_ROLE
.Reverts if strategy is not in the strategy whitelist.