aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis/Oracles
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-13 02:07:16 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-01 18:04:35 +0800
commitb800bfb02138f843538bca55a40d6a4e0d1be60f (patch)
tree4d0162665f6f185e368e0831359d336e8251e438 /test/compilationTests/gnosis/Oracles
parentc8232d9759458d5f6e1442533457d8529686eea7 (diff)
downloaddexon-solidity-b800bfb02138f843538bca55a40d6a4e0d1be60f.tar.gz
dexon-solidity-b800bfb02138f843538bca55a40d6a4e0d1be60f.tar.zst
dexon-solidity-b800bfb02138f843538bca55a40d6a4e0d1be60f.zip
Fix tests regarding contract type conversion.
Diffstat (limited to 'test/compilationTests/gnosis/Oracles')
-rw-r--r--test/compilationTests/gnosis/Oracles/FutarchyOracle.sol8
-rw-r--r--test/compilationTests/gnosis/Oracles/UltimateOracle.sol4
2 files changed, 6 insertions, 6 deletions
diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
index cf851f5b..83d10b2e 100644
--- a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
@@ -95,14 +95,14 @@ contract FutarchyOracle is Oracle {
isCreator
{
// Buy all outcomes
- require( categoricalEvent.collateralToken().transferFrom(creator, this, funding)
- && categoricalEvent.collateralToken().approve(categoricalEvent, funding));
+ require( categoricalEvent.collateralToken().transferFrom(creator, address(this), funding)
+ && categoricalEvent.collateralToken().approve(address(categoricalEvent), funding));
categoricalEvent.buyAllOutcomes(funding);
// Fund each market with outcome tokens from categorical event
for (uint8 i = 0; i < markets.length; i++) {
Market market = markets[i];
// Approve funding for market
- require(market.eventContract().collateralToken().approve(market, funding));
+ require(market.eventContract().collateralToken().approve(address(market), funding));
market.fund(funding);
}
emit FutarchyFunding(funding);
@@ -122,7 +122,7 @@ contract FutarchyOracle is Oracle {
market.withdrawFees();
// Redeem collateral token for winning outcome tokens and transfer collateral tokens to creator
categoricalEvent.redeemWinnings();
- require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(this)));
+ require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(address(this))));
emit FutarchyClosing();
}
diff --git a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
index b7cc231c..452a34ec 100644
--- a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
@@ -92,7 +92,7 @@ contract UltimateOracle is Oracle {
// There was no challenge yet or the challenge period expired
require( !isChallenged()
&& !isChallengePeriodOver()
- && collateralToken.transferFrom(msg.sender, this, challengeAmount));
+ && collateralToken.transferFrom(msg.sender, address(this), challengeAmount));
outcomeAmounts[msg.sender][_outcome] = challengeAmount;
totalOutcomeAmounts[_outcome] = challengeAmount;
totalAmount = challengeAmount;
@@ -113,7 +113,7 @@ contract UltimateOracle is Oracle {
// Outcome is challenged and front runner period is not over yet and tokens can be transferred
require( isChallenged()
&& !isFrontRunnerPeriodOver()
- && collateralToken.transferFrom(msg.sender, this, amount));
+ && collateralToken.transferFrom(msg.sender, address(this), amount));
outcomeAmounts[msg.sender][_outcome] = outcomeAmounts[msg.sender][_outcome].add(amount);
totalOutcomeAmounts[_outcome] = totalOutcomeAmounts[_outcome].add(amount);
totalAmount = totalAmount.add(amount);