2018-10-24 12:52:11 +00:00
|
|
|
pragma solidity >=0.0;
|
2017-07-12 13:46:33 +00:00
|
|
|
import "../Oracles/MajorityOracle.sol";
|
|
|
|
|
|
|
|
|
|
|
|
/// @title Majority oracle factory contract - Allows to create majority oracle contracts
|
|
|
|
/// @author Stefan George - <stefan@gnosis.pm>
|
|
|
|
contract MajorityOracleFactory {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Events
|
|
|
|
*/
|
|
|
|
event MajorityOracleCreation(address indexed creator, MajorityOracle majorityOracle, Oracle[] oracles);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public functions
|
|
|
|
*/
|
|
|
|
/// @dev Creates a new majority oracle contract
|
|
|
|
/// @param oracles List of oracles taking part in the majority vote
|
2019-10-21 22:05:34 +00:00
|
|
|
/// @return majorityOracle Oracle contract
|
2018-07-14 21:42:01 +00:00
|
|
|
function createMajorityOracle(Oracle[] memory oracles)
|
2017-07-12 13:46:33 +00:00
|
|
|
public
|
|
|
|
returns (MajorityOracle majorityOracle)
|
|
|
|
{
|
|
|
|
majorityOracle = new MajorityOracle(oracles);
|
2018-06-27 08:35:38 +00:00
|
|
|
emit MajorityOracleCreation(msg.sender, majorityOracle, oracles);
|
2017-07-12 13:46:33 +00:00
|
|
|
}
|
|
|
|
}
|