-
Notifications
You must be signed in to change notification settings - Fork 18
/
IMarketFactory.sol
29 lines (24 loc) · 1.33 KB
/
IMarketFactory.sol
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
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;
import "@equilibria/root/attribute/interfaces/IFactory.sol";
import "../types/ProtocolParameter.sol";
import "./IMarket.sol";
interface IMarketFactory is IFactory {
event ParameterUpdated(ProtocolParameter newParameter);
event OperatorUpdated(address indexed account, address indexed operator, bool newEnabled);
event MarketCreated(IMarket indexed market, IMarket.MarketDefinition definition);
error FactoryInvalidPayoffError();
error FactoryInvalidOracleError();
error FactoryAlreadyRegisteredError();
error ProtocolParameterStorageInvalidError();
function oracleFactory() external view returns (IFactory);
function payoffFactory() external view returns (IFactory);
function parameter() external view returns (ProtocolParameter memory);
function operators(address account, address operator) external view returns (bool);
function markets(IOracleProvider oracle, IPayoffProvider payoff) external view returns (IMarket);
function initialize() external;
function updateParameter(ProtocolParameter memory newParameter) external;
function updateOperator(address operator, bool newEnabled) external;
function create(IMarket.MarketDefinition calldata definition) external returns (IMarket);
function fund(IMarket market) external;
}