2018-10-24 12:52:11 +00:00
|
|
|
pragma solidity >=0.0;
|
2017-07-12 13:46:33 +00:00
|
|
|
import "../Oracles/CentralizedOracle.sol";
|
|
|
|
|
|
|
|
|
|
|
|
/// @title Centralized oracle factory contract - Allows to create centralized oracle contracts
|
|
|
|
/// @author Stefan George - <stefan@gnosis.pm>
|
|
|
|
contract CentralizedOracleFactory {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Events
|
|
|
|
*/
|
|
|
|
event CentralizedOracleCreation(address indexed creator, CentralizedOracle centralizedOracle, bytes ipfsHash);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public functions
|
|
|
|
*/
|
|
|
|
/// @dev Creates a new centralized oracle contract
|
|
|
|
/// @param ipfsHash Hash identifying off chain event description
|
2019-10-21 22:05:34 +00:00
|
|
|
/// @return centralizedOracle Oracle contract
|
2018-07-14 21:42:01 +00:00
|
|
|
function createCentralizedOracle(bytes memory ipfsHash)
|
2017-07-12 13:46:33 +00:00
|
|
|
public
|
|
|
|
returns (CentralizedOracle centralizedOracle)
|
|
|
|
{
|
|
|
|
centralizedOracle = new CentralizedOracle(msg.sender, ipfsHash);
|
2018-06-27 08:35:38 +00:00
|
|
|
emit CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash);
|
2017-07-12 13:46:33 +00:00
|
|
|
}
|
|
|
|
}
|