Market instantiation is delegated to this factory contract because, as the deploying contract must contain the entire construction bytecode of the contract to be deployed, the manager would be too large to deploy (EIP 170).
Additionally, separating out the construction of markets into a factory contract allows the manager and the markets to be upgraded independently of one another.
BinaryOptionMarketManager: The manager is the only contract permitted to create contracts from the factory.
BinaryOptionMarket: The factory creates market instances with the provided parameters.
AddressResolver: The factory uses the address resolver to retrieve the address of its manager, so if the manager is upgraded, this factory must be synchronised.
The constructor simply initialises the inherited classes.
(address _owner, address _resolver)
_manager() returns (address)
Simply creates a new
with the given parameters.
As this is only intended to be called from
the transaction reverts if the message sender is not the manager.
See that function's documentation for further details.
Initial timestamps should be provided in the order
[biddingEnd, maturity, expiry], initial bids as
[longBid, shortBid], and fees as
[poolFee, creatorFee, refundFee].
createMarket(address creator, uint256 creatorLimits, bytes32 oracleKey, uint256 strikePrice, uint256 times, uint256 bids, uint256 fees) returns (contract BinaryOptionMarket)