diff --git a/nest/src/AggregateToken.sol b/nest/src/AggregateToken.sol index 8312e39..139bab1 100644 --- a/nest/src/AggregateToken.sol +++ b/nest/src/AggregateToken.sol @@ -156,6 +156,16 @@ contract AggregateToken is ComponentToken, IAggregateToken { // Admin Functions + /** + * @notice Approve the given ComponentToken to spend the given amount of `asset` + * @dev Only the owner can call this function + * @param componentToken ComponentToken to approve + * @param amount Amount of `asset` to approve + */ + function approveComponentToken(IComponentToken componentToken, uint256 amount) external onlyRole(ADMIN_ROLE) { + IERC20(componentToken.asset()).approve(address(componentToken), amount); + } + /** * @notice Add a ComponentToken to the component token list * @dev Only the owner can call this function, and there is no way to remove a ComponentToken later