From 25d0ed0006a40758f1e1680a13ab3a8dd0dd0bd0 Mon Sep 17 00:00:00 2001 From: "Michael J. Curry" Date: Wed, 12 Oct 2016 13:48:12 -0400 Subject: [PATCH] changes for solidity 0.4 --- contracts/Bounty.sol | 1 + contracts/ERC20.sol | 1 + contracts/Killable.sol | 1 + contracts/Migrations.sol | 3 ++- contracts/Ownable.sol | 3 ++- contracts/PullPayment.sol | 1 + contracts/Rejector.sol | 1 + contracts/Stoppable.sol | 5 +++-- contracts/Token.sol | 1 + 9 files changed, 13 insertions(+), 4 deletions(-) diff --git a/contracts/Bounty.sol b/contracts/Bounty.sol index fcd17917c..10f68cee1 100644 --- a/contracts/Bounty.sol +++ b/contracts/Bounty.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; import './PullPaymentCapable.sol'; import './Token.sol'; diff --git a/contracts/ERC20.sol b/contracts/ERC20.sol index e053284db..2ed37f73e 100644 --- a/contracts/ERC20.sol +++ b/contracts/ERC20.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; contract ERC20 { function totalSupply() constant returns (uint); function balanceOf(address who) constant returns (uint); diff --git a/contracts/Killable.sol b/contracts/Killable.sol index 9d8a62717..28e5d9e98 100644 --- a/contracts/Killable.sol +++ b/contracts/Killable.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; import "./Ownable.sol"; /* diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index 132f325c1..608bba8f9 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,9 +1,10 @@ +pragma solidity ^0.4.0; contract Migrations { address public owner; uint public last_completed_migration; modifier restricted() { - if (msg.sender == owner) _ + if (msg.sender == owner) _; } function Migrations() { diff --git a/contracts/Ownable.sol b/contracts/Ownable.sol index 86d9483a2..ab8e9583d 100644 --- a/contracts/Ownable.sol +++ b/contracts/Ownable.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; /* * Ownable * Base contract with an owner @@ -11,7 +12,7 @@ contract Ownable { modifier onlyOwner() { if (msg.sender == owner) - _ + _; } function transfer(address newOwner) onlyOwner { diff --git a/contracts/PullPayment.sol b/contracts/PullPayment.sol index c1c48f056..8629db3bd 100644 --- a/contracts/PullPayment.sol +++ b/contracts/PullPayment.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; /* * PullPaymentCapable * Base contract supporting async send for pull payments. diff --git a/contracts/Rejector.sol b/contracts/Rejector.sol index 3d9d92ca3..05525d5e9 100644 --- a/contracts/Rejector.sol +++ b/contracts/Rejector.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; /* * Rejector * Base contract for rejecting direct deposits. diff --git a/contracts/Stoppable.sol b/contracts/Stoppable.sol index 8465ddfab..d649ce019 100644 --- a/contracts/Stoppable.sol +++ b/contracts/Stoppable.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; /* * Stoppable * Abstract contract that allows children to implement an @@ -7,8 +8,8 @@ contract Stoppable { address public curator; bool public stopped; - modifier stopInEmergency { if (!stopped) _ } - modifier onlyInEmergency { if (stopped) _ } + modifier stopInEmergency { if (!stopped) _; } + modifier onlyInEmergency { if (stopped) _; } function Stoppable(address _curator) { if (_curator == 0) throw; diff --git a/contracts/Token.sol b/contracts/Token.sol index 7d7758010..5e22ec2eb 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -1,3 +1,4 @@ +pragma solidity ^0.4.0; // Source: https://github.com/nexusdev/erc20 // Flat file implementation of `dappsys/token/base.sol::DSTokenBase`