all files / contracts/interfaces/risk/ IRiskStrategyFactory.sol

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55                                                                                                             
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.6;
 
import "./IPolicyManager.sol";
import "../utils/IRegistry.sol";
 
/**
 * @title IRiskStrategyFactory
 * @author solace.fi
 * @notice The interface of **RiskStrategyFactory** that manages the creation of new strategies.
 */
interface IRiskStrategyFactory {
 
    /***************************************
    EVENTS
    ***************************************/
    /// @notice Emitted when new strategy is created.
    event StrategyCreated(address strategy, address strategist);
 
    /**
     * @notice Creates a new `Risk Strategy`.
     * @param base_  The strategy's source code.
     * @param products_ The strategy products.
     * @param weights_  The weights of the strategy products.
     * @param prices_   The prices of the strategy products.
     * @param divisors_ The divisors(max cover per policy divisor) of the strategy products. 
     * @return strategy The address of newly created strategy.
    */
    function createRiskStrategy(
        address base_,
        address[] memory products_, 
        uint32[] memory weights_, 
        uint24[] memory prices_,
        uint16[] memory divisors_
    ) external returns (address strategy);
 
    /**
     * @notice Creates a new `Risk Strategy`.
     * @param base_  The strategy's source code.
     * @param salt_ The salt for CREATE2.
     * @param products_ The strategy products.
     * @param weights_  The weights of the strategy products.
     * @param prices_   The prices of the strategy products.
     * @param divisors_ The divisors(max cover per policy divisor) of the strategy products. 
     * @return strategy The address of newly created strategy.
    */
    function create2RiskStrategy(
        address base_,
        bytes32 salt_,
        address[] memory products_, 
        uint32[] memory weights_, 
        uint24[] memory prices_,
        uint16[] memory divisors_
    ) external returns (address strategy);
}