aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-06-12 17:05:49 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-25 22:17:50 +0800
commit3ee3018bf60d172270ca94ff416a3081477922d4 (patch)
tree3b19947caa078a7613abe99a60815709ce4143e2 /test/compilationTests/gnosis
parent98c9ca257568e8f281a5d8857a45ef2c8aef2c77 (diff)
downloaddexon-solidity-3ee3018bf60d172270ca94ff416a3081477922d4.tar.gz
dexon-solidity-3ee3018bf60d172270ca94ff416a3081477922d4.tar.zst
dexon-solidity-3ee3018bf60d172270ca94ff416a3081477922d4.zip
Update external contracts in compilationTests (to support strict address literals)
Diffstat (limited to 'test/compilationTests/gnosis')
-rw-r--r--test/compilationTests/gnosis/Events/Event.sol2
-rw-r--r--test/compilationTests/gnosis/Events/EventFactory.sol4
-rw-r--r--test/compilationTests/gnosis/Markets/Campaign.sol6
-rw-r--r--test/compilationTests/gnosis/Markets/StandardMarket.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/MajorityOracle.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/UltimateOracle.sol4
7 files changed, 11 insertions, 11 deletions
diff --git a/test/compilationTests/gnosis/Events/Event.sol b/test/compilationTests/gnosis/Events/Event.sol
index 9aa257c4..cb991447 100644
--- a/test/compilationTests/gnosis/Events/Event.sol
+++ b/test/compilationTests/gnosis/Events/Event.sol
@@ -37,7 +37,7 @@ contract Event {
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/Markets/Campaign.sol b/test/compilationTests/gnosis/Markets/Campaign.sol
index 9aee1033..15d7010a 100644
--- a/test/compilationTests/gnosis/Markets/Campaign.sol
+++ b/test/compilationTests/gnosis/Markets/Campaign.sol
@@ -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..4273655a 100644
--- a/test/compilationTests/gnosis/Markets/StandardMarket.sol
+++ b/test/compilationTests/gnosis/Markets/StandardMarket.sol
@@ -42,7 +42,7 @@ contract StandardMarket is Market {
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/Oracles/FutarchyOracleFactory.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
index 62eab4f0..dbb0a487 100644
--- a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
@@ -36,7 +36,7 @@ contract FutarchyOracleFactory {
function FutarchyOracleFactory(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..5c0ab103 100644
--- a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol
@@ -23,7 +23,7 @@ contract MajorityOracle is Oracle {
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/UltimateOracle.sol b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
index fe8b4ec7..9ed61aef 100644
--- a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
@@ -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