aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis
diff options
context:
space:
mode:
Diffstat (limited to 'test/compilationTests/gnosis')
-rw-r--r--test/compilationTests/gnosis/Events/CategoricalEvent.sol2
-rw-r--r--test/compilationTests/gnosis/Events/Event.sol4
-rw-r--r--test/compilationTests/gnosis/Events/EventFactory.sol4
-rw-r--r--test/compilationTests/gnosis/Events/ScalarEvent.sol2
-rw-r--r--test/compilationTests/gnosis/Markets/Campaign.sol8
-rw-r--r--test/compilationTests/gnosis/Markets/StandardMarket.sol4
-rw-r--r--test/compilationTests/gnosis/Migrations.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/CentralizedOracle.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/DifficultyOracle.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/FutarchyOracle.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol4
-rw-r--r--test/compilationTests/gnosis/Oracles/MajorityOracle.sol4
-rw-r--r--test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/UltimateOracle.sol6
-rw-r--r--test/compilationTests/gnosis/Tokens/OutcomeToken.sol2
15 files changed, 25 insertions, 25 deletions
diff --git a/test/compilationTests/gnosis/Events/CategoricalEvent.sol b/test/compilationTests/gnosis/Events/CategoricalEvent.sol
index fbd1d744..6bcec271 100644
--- a/test/compilationTests/gnosis/Events/CategoricalEvent.sol
+++ b/test/compilationTests/gnosis/Events/CategoricalEvent.sol
@@ -13,7 +13,7 @@ contract CategoricalEvent is Event {
/// @param _collateralToken Tokens used as collateral in exchange for outcome tokens
/// @param _oracle Oracle contract used to resolve the event
/// @param outcomeCount Number of event outcomes
- function CategoricalEvent(
+ constructor(
Token _collateralToken,
Oracle _oracle,
uint8 outcomeCount
diff --git a/test/compilationTests/gnosis/Events/Event.sol b/test/compilationTests/gnosis/Events/Event.sol
index 9aa257c4..4d390d0e 100644
--- a/test/compilationTests/gnosis/Events/Event.sol
+++ b/test/compilationTests/gnosis/Events/Event.sol
@@ -33,11 +33,11 @@ contract Event {
/// @param _collateralToken Tokens used as collateral in exchange for outcome tokens
/// @param _oracle Oracle contract used to resolve the event
/// @param outcomeCount Number of event outcomes
- function Event(Token _collateralToken, Oracle _oracle, uint8 outcomeCount)
+ constructor(Token _collateralToken, Oracle _oracle, uint8 outcomeCount)
public
{
// Validate input
- require(address(_collateralToken) != 0 && address(_oracle) != 0 && outcomeCount >= 2);
+ require(address(_collateralToken) != address(0) && address(_oracle) != address(0) && outcomeCount >= 2);
collateralToken = _collateralToken;
oracle = _oracle;
// Create an outcome token for each outcome
diff --git a/test/compilationTests/gnosis/Events/EventFactory.sol b/test/compilationTests/gnosis/Events/EventFactory.sol
index dfb1a579..4779c6e4 100644
--- a/test/compilationTests/gnosis/Events/EventFactory.sol
+++ b/test/compilationTests/gnosis/Events/EventFactory.sol
@@ -37,7 +37,7 @@ contract EventFactory {
{
bytes32 eventHash = keccak256(collateralToken, oracle, outcomeCount);
// Event should not exist yet
- require(address(categoricalEvents[eventHash]) == 0);
+ require(address(categoricalEvents[eventHash]) == address(0));
// Create event
eventContract = new CategoricalEvent(
collateralToken,
@@ -65,7 +65,7 @@ contract EventFactory {
{
bytes32 eventHash = keccak256(collateralToken, oracle, lowerBound, upperBound);
// Event should not exist yet
- require(address(scalarEvents[eventHash]) == 0);
+ require(address(scalarEvents[eventHash]) == address(0));
// Create event
eventContract = new ScalarEvent(
collateralToken,
diff --git a/test/compilationTests/gnosis/Events/ScalarEvent.sol b/test/compilationTests/gnosis/Events/ScalarEvent.sol
index 2e5718ef..3120090c 100644
--- a/test/compilationTests/gnosis/Events/ScalarEvent.sol
+++ b/test/compilationTests/gnosis/Events/ScalarEvent.sol
@@ -28,7 +28,7 @@ contract ScalarEvent is Event {
/// @param _oracle Oracle contract used to resolve the event
/// @param _lowerBound Lower bound for event outcome
/// @param _upperBound Lower bound for event outcome
- function ScalarEvent(
+ constructor(
Token _collateralToken,
Oracle _oracle,
int _lowerBound,
diff --git a/test/compilationTests/gnosis/Markets/Campaign.sol b/test/compilationTests/gnosis/Markets/Campaign.sol
index 9aee1033..d2e841b1 100644
--- a/test/compilationTests/gnosis/Markets/Campaign.sol
+++ b/test/compilationTests/gnosis/Markets/Campaign.sol
@@ -70,7 +70,7 @@ contract Campaign {
/// @param _fee Market fee
/// @param _funding Initial funding for market
/// @param _deadline Campaign deadline
- function Campaign(
+ constructor(
Event _eventContract,
MarketFactory _marketFactory,
MarketMaker _marketMaker,
@@ -81,9 +81,9 @@ contract Campaign {
public
{
// Validate input
- require( address(_eventContract) != 0
- && address(_marketFactory) != 0
- && address(_marketMaker) != 0
+ require( address(_eventContract) != address(0)
+ && address(_marketFactory) != address(0)
+ && address(_marketMaker) != address(0)
&& _fee < FEE_RANGE
&& _funding > 0
&& now < _deadline);
diff --git a/test/compilationTests/gnosis/Markets/StandardMarket.sol b/test/compilationTests/gnosis/Markets/StandardMarket.sol
index b973119a..fc384d3a 100644
--- a/test/compilationTests/gnosis/Markets/StandardMarket.sol
+++ b/test/compilationTests/gnosis/Markets/StandardMarket.sol
@@ -38,11 +38,11 @@ contract StandardMarket is Market {
/// @param _eventContract Event contract
/// @param _marketMaker Market maker contract
/// @param _fee Market fee
- function StandardMarket(address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)
+ constructor(address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)
public
{
// Validate inputs
- require(address(_eventContract) != 0 && address(_marketMaker) != 0 && _fee < FEE_RANGE);
+ require(address(_eventContract) != address(0) && address(_marketMaker) != address(0) && _fee < FEE_RANGE);
creator = _creator;
createdAtBlock = block.number;
eventContract = _eventContract;
diff --git a/test/compilationTests/gnosis/Migrations.sol b/test/compilationTests/gnosis/Migrations.sol
index 7e7fe8d4..c7d09bd2 100644
--- a/test/compilationTests/gnosis/Migrations.sol
+++ b/test/compilationTests/gnosis/Migrations.sol
@@ -8,7 +8,7 @@ contract Migrations {
if (msg.sender == owner) _;
}
- function Migrations() {
+ constructor() {
owner = msg.sender;
}
diff --git a/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol b/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol
index 26acf526..08d8e159 100644
--- a/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol
@@ -34,7 +34,7 @@ contract CentralizedOracle is Oracle {
*/
/// @dev Constructor sets owner address and IPFS hash
/// @param _ipfsHash Hash identifying off chain event description
- function CentralizedOracle(address _owner, bytes _ipfsHash)
+ constructor(address _owner, bytes _ipfsHash)
public
{
// Description hash cannot be null
diff --git a/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol b/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol
index 87351dfa..a9933a8c 100644
--- a/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol
@@ -22,7 +22,7 @@ contract DifficultyOracle is Oracle {
*/
/// @dev Contract constructor validates and sets target block number
/// @param _blockNumber Target block number
- function DifficultyOracle(uint _blockNumber)
+ constructor(uint _blockNumber)
public
{
// Block has to be in the future
diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
index 524103d8..196d38c5 100644
--- a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
@@ -55,7 +55,7 @@ contract FutarchyOracle is Oracle {
/// @param marketMaker Market maker contract
/// @param fee Market fee
/// @param _deadline Decision deadline
- function FutarchyOracle(
+ constructor(
address _creator,
EventFactory eventFactory,
Token collateralToken,
diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
index 62eab4f0..1415486c 100644
--- a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
@@ -33,10 +33,10 @@ contract FutarchyOracleFactory {
*/
/// @dev Constructor sets event factory contract
/// @param _eventFactory Event factory contract
- function FutarchyOracleFactory(EventFactory _eventFactory)
+ constructor(EventFactory _eventFactory)
public
{
- require(address(_eventFactory) != 0);
+ require(address(_eventFactory) != address(0));
eventFactory = _eventFactory;
}
diff --git a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol
index 4b02c2de..24cf9dea 100644
--- a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol
@@ -16,14 +16,14 @@ contract MajorityOracle is Oracle {
*/
/// @dev Allows to create an oracle for a majority vote based on other oracles
/// @param _oracles List of oracles taking part in the majority vote
- function MajorityOracle(Oracle[] _oracles)
+ constructor(Oracle[] _oracles)
public
{
// At least 2 oracles should be defined
require(_oracles.length > 2);
for (uint i = 0; i < _oracles.length; i++)
// Oracle address cannot be null
- require(address(_oracles[i]) != 0);
+ require(address(_oracles[i]) != address(0));
oracles = _oracles;
}
diff --git a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
index d541ab46..9a7bba41 100644
--- a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
@@ -38,7 +38,7 @@ contract SignedMessageOracle is Oracle {
/// @param v Signature parameter
/// @param r Signature parameter
/// @param s Signature parameter
- function SignedMessageOracle(bytes32 _descriptionHash, uint8 v, bytes32 r, bytes32 s)
+ constructor(bytes32 _descriptionHash, uint8 v, bytes32 r, bytes32 s)
public
{
signer = ecrecover(_descriptionHash, v, r, s);
diff --git a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
index fe8b4ec7..0127117c 100644
--- a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
@@ -46,7 +46,7 @@ contract UltimateOracle is Oracle {
/// @param _challengePeriod Time to challenge oracle outcome
/// @param _challengeAmount Amount to challenge the outcome
/// @param _frontRunnerPeriod Time to overbid the front-runner
- function UltimateOracle(
+ constructor(
Oracle _forwardedOracle,
Token _collateralToken,
uint8 _spreadMultiplier,
@@ -57,8 +57,8 @@ contract UltimateOracle is Oracle {
public
{
// Validate inputs
- require( address(_forwardedOracle) != 0
- && address(_collateralToken) != 0
+ require( address(_forwardedOracle) != address(0)
+ && address(_collateralToken) != address(0)
&& _spreadMultiplier >= 2
&& _challengePeriod > 0
&& _challengeAmount > 0
diff --git a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol
index fd1fa590..4757c798 100644
--- a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol
+++ b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol
@@ -31,7 +31,7 @@ contract OutcomeToken is StandardToken {
* Public functions
*/
/// @dev Constructor sets events contract address
- function OutcomeToken()
+ constructor()
public
{
eventContract = msg.sender;