diff options
Diffstat (limited to 'test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol')
-rw-r--r-- | test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol b/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol new file mode 100644 index 00000000..62a12cf4 --- /dev/null +++ b/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol @@ -0,0 +1,27 @@ +pragma solidity ^0.4.11; +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 + /// @return Oracle contract + function createCentralizedOracle(bytes ipfsHash) + public + returns (CentralizedOracle centralizedOracle) + { + centralizedOracle = new CentralizedOracle(msg.sender, ipfsHash); + CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash); + } +} |