aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-13 02:38:52 +0800
committerGitHub <noreply@github.com>2017-07-13 02:38:52 +0800
commit757c500bda9a32cccc86e1ab24da31a99c0e6eac (patch)
tree7e9d18c3e48d0a90eb75cf3453354f3699d528d1 /test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
parent91f17a366202f5cac21a5a469c682ad86fe9ede8 (diff)
parentb1c1fb6c8314a8f756cb367bdaa73f4459f397f2 (diff)
downloaddexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.tar
dexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.tar.gz
dexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.tar.bz2
dexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.tar.lz
dexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.tar.xz
dexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.tar.zst
dexon-solidity-757c500bda9a32cccc86e1ab24da31a99c0e6eac.zip
Merge pull request #2562 from ethereum/addGnosisTestContracts
Gnosis compilation contracts.
Diffstat (limited to 'test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol')
-rw-r--r--test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol b/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
new file mode 100644
index 00000000..0024516a
--- /dev/null
+++ b/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
@@ -0,0 +1,27 @@
+pragma solidity ^0.4.11;
+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
+ /// @return Oracle contract
+ function createMajorityOracle(Oracle[] oracles)
+ public
+ returns (MajorityOracle majorityOracle)
+ {
+ majorityOracle = new MajorityOracle(oracles);
+ MajorityOracleCreation(msg.sender, majorityOracle, oracles);
+ }
+}