From 95c3488a26bf5c20b242a7358d0dd04948b326f2 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Mon, 25 Jun 2018 15:02:20 +0200 Subject: [PATCH] Updates external contracts to new constructor syntax. --- test/compilationTests/MultiSigWallet/MultiSigWallet.sol | 2 +- .../MultiSigWallet/MultiSigWalletWithDailyLimit.sol | 2 +- test/compilationTests/corion/ico.sol | 2 +- test/compilationTests/corion/moduleHandler.sol | 2 +- test/compilationTests/corion/multiOwner.sol | 2 +- test/compilationTests/corion/premium.sol | 2 +- test/compilationTests/corion/provider.sol | 2 +- test/compilationTests/corion/publisher.sol | 2 +- test/compilationTests/corion/schelling.sol | 4 ++-- test/compilationTests/corion/token.sol | 2 +- test/compilationTests/gnosis/Events/CategoricalEvent.sol | 2 +- test/compilationTests/gnosis/Events/Event.sol | 2 +- test/compilationTests/gnosis/Events/ScalarEvent.sol | 2 +- test/compilationTests/gnosis/Markets/Campaign.sol | 2 +- test/compilationTests/gnosis/Markets/StandardMarket.sol | 2 +- test/compilationTests/gnosis/Migrations.sol | 2 +- test/compilationTests/gnosis/Oracles/CentralizedOracle.sol | 2 +- test/compilationTests/gnosis/Oracles/DifficultyOracle.sol | 2 +- test/compilationTests/gnosis/Oracles/FutarchyOracle.sol | 2 +- .../compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol | 2 +- test/compilationTests/gnosis/Oracles/MajorityOracle.sol | 2 +- test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol | 2 +- test/compilationTests/gnosis/Oracles/UltimateOracle.sol | 2 +- test/compilationTests/gnosis/Tokens/OutcomeToken.sol | 2 +- test/compilationTests/milestonetracker/MilestoneTracker.sol | 2 +- test/compilationTests/zeppelin/DayLimit.sol | 2 +- test/compilationTests/zeppelin/LimitBalance.sol | 2 +- test/compilationTests/zeppelin/MultisigWallet.sol | 4 ++-- test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol | 2 +- test/compilationTests/zeppelin/crowdsale/Crowdsale.sol | 2 +- test/compilationTests/zeppelin/crowdsale/RefundVault.sol | 2 +- .../zeppelin/crowdsale/RefundableCrowdsale.sol | 2 +- test/compilationTests/zeppelin/lifecycle/Destructible.sol | 2 +- .../compilationTests/zeppelin/lifecycle/TokenDestructible.sol | 2 +- test/compilationTests/zeppelin/ownership/HasNoEther.sol | 2 +- test/compilationTests/zeppelin/ownership/Ownable.sol | 2 +- test/compilationTests/zeppelin/ownership/Shareable.sol | 2 +- test/compilationTests/zeppelin/token/SimpleToken.sol | 2 +- test/compilationTests/zeppelin/token/TokenTimelock.sol | 2 +- 39 files changed, 41 insertions(+), 41 deletions(-) diff --git a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol index 48b752304..76b011888 100644 --- a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol +++ b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol @@ -102,7 +102,7 @@ contract MultiSigWallet { /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. - function MultiSigWallet(address[] _owners, uint _required) + constructor(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { diff --git a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol index 024d3ef4b..d03a82f96 100644 --- a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol +++ b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol @@ -19,7 +19,7 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet { /// @param _owners List of initial owners. /// @param _required Number of required confirmations. /// @param _dailyLimit Amount in wei, which can be withdrawn without confirmations on a daily basis. - function MultiSigWalletWithDailyLimit(address[] _owners, uint _required, uint _dailyLimit) + constructor(address[] _owners, uint _required, uint _dailyLimit) public MultiSigWallet(_owners, _required) { diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol index 13f8ab016..81a6516eb 100644 --- a/test/compilationTests/corion/ico.sol +++ b/test/compilationTests/corion/ico.sol @@ -50,7 +50,7 @@ contract ico is safeMath { uint256 public totalMint; uint256 public totalPremiumMint; - function ico(address foundation, address priceSet, uint256 exchangeRate, uint256 startBlockNum, address[] genesisAddr, uint256[] genesisValue) { + constructor(address foundation, address priceSet, uint256 exchangeRate, uint256 startBlockNum, address[] genesisAddr, uint256[] genesisValue) { /* Installation function. diff --git a/test/compilationTests/corion/moduleHandler.sol b/test/compilationTests/corion/moduleHandler.sol index 1d546b40a..080f599cb 100644 --- a/test/compilationTests/corion/moduleHandler.sol +++ b/test/compilationTests/corion/moduleHandler.sol @@ -35,8 +35,8 @@ contract moduleHandler is multiOwner, announcementTypes { address public foundationAddress; uint256 debugModeUntil = block.number + 1000000; - function moduleHandler(address[] newOwners) multiOwner(newOwners) {} + constructor(address[] newOwners) multiOwner(newOwners) {} function load(address foundation, bool forReplace, address Token, address Premium, address Publisher, address Schelling, address Provider) { /* Loading modulest to ModuleHandler. diff --git a/test/compilationTests/corion/multiOwner.sol b/test/compilationTests/corion/multiOwner.sol index b8436c8ba..0a0a44c55 100644 --- a/test/compilationTests/corion/multiOwner.sol +++ b/test/compilationTests/corion/multiOwner.sol @@ -12,7 +12,7 @@ contract multiOwner is safeMath { /* Constructor */ - function multiOwner(address[] newOwners) { + constructor(address[] newOwners) { for ( uint256 a=0 ; a bool) public genesis; - function premium(bool forReplace, address moduleHandler, address dbAddress, address icoContractAddr, address[] genesisAddr, uint256[] genesisValue) { + constructor(bool forReplace, address moduleHandler, address dbAddress, address icoContractAddr, address[] genesisAddr, uint256[] genesisValue) { /* Setup function. If an ICOaddress is defined then the balance of the genesis addresses will be set as well. diff --git a/test/compilationTests/corion/provider.sol b/test/compilationTests/corion/provider.sol index b3b8169db..e68866220 100644 --- a/test/compilationTests/corion/provider.sol +++ b/test/compilationTests/corion/provider.sol @@ -118,7 +118,7 @@ contract provider is module, safeMath, announcementTypes { uint256 private currentSchellingRound = 1; - function provider(address _moduleHandler) { + constructor(address _moduleHandler) { /* Install function. diff --git a/test/compilationTests/corion/publisher.sol b/test/compilationTests/corion/publisher.sol index 98d5af2a4..c7baa4df5 100644 --- a/test/compilationTests/corion/publisher.sol +++ b/test/compilationTests/corion/publisher.sol @@ -61,7 +61,7 @@ contract publisher is announcementTypes, module, safeMath { mapping (address => uint256[]) public opponents; - function publisher(address moduleHandler) { + constructor(address moduleHandler) { /* Installation function. The installer will be registered in the admin list automatically diff --git a/test/compilationTests/corion/schelling.sol b/test/compilationTests/corion/schelling.sol index 51133d73f..e092e3118 100644 --- a/test/compilationTests/corion/schelling.sol +++ b/test/compilationTests/corion/schelling.sol @@ -45,7 +45,7 @@ contract schellingDB is safeMath, schellingVars { /* Constructor */ - function schellingDB() { + constructor() { rounds.length = 2; rounds[0].blockHeight = block.number; currentSchellingRound = 1; @@ -247,7 +247,7 @@ contract schelling is module, announcementTypes, schellingVars { bytes1 public belowChar = 0x30; schellingDB private db; - function schelling(address _moduleHandler, address _db, bool _forReplace) { + constructor(address _moduleHandler, address _db, bool _forReplace) { /* Installation function. diff --git a/test/compilationTests/corion/token.sol b/test/compilationTests/corion/token.sol index 468e3e797..bb141b522 100644 --- a/test/compilationTests/corion/token.sol +++ b/test/compilationTests/corion/token.sol @@ -48,7 +48,7 @@ contract token is safeMath, module, announcementTypes { mapping(address => bool) public genesis; - function token(bool forReplace, address moduleHandler, address dbAddr, address icoContractAddr, address exchangeContractAddress, address[] genesisAddr, uint256[] genesisValue) payable { + constructor(bool forReplace, address moduleHandler, address dbAddr, address icoContractAddr, address exchangeContractAddress, address[] genesisAddr, uint256[] genesisValue) payable { /* Installation function diff --git a/test/compilationTests/gnosis/Events/CategoricalEvent.sol b/test/compilationTests/gnosis/Events/CategoricalEvent.sol index fbd1d744e..6bcec2715 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 cb9914477..4d390d0eb 100644 --- a/test/compilationTests/gnosis/Events/Event.sol +++ b/test/compilationTests/gnosis/Events/Event.sol @@ -33,7 +33,7 @@ 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 diff --git a/test/compilationTests/gnosis/Events/ScalarEvent.sol b/test/compilationTests/gnosis/Events/ScalarEvent.sol index 2e5718efe..3120090c5 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 15d7010a7..d2e841b1f 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, diff --git a/test/compilationTests/gnosis/Markets/StandardMarket.sol b/test/compilationTests/gnosis/Markets/StandardMarket.sol index 4273655a2..fc384d3a0 100644 --- a/test/compilationTests/gnosis/Markets/StandardMarket.sol +++ b/test/compilationTests/gnosis/Markets/StandardMarket.sol @@ -38,7 +38,7 @@ 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 diff --git a/test/compilationTests/gnosis/Migrations.sol b/test/compilationTests/gnosis/Migrations.sol index 7e7fe8d47..c7d09bd2d 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 26acf526b..08d8e1593 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 87351dfa6..a9933a8c4 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 524103d84..196d38c53 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 dbb0a4876..1415486c8 100644 --- a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol +++ b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol @@ -33,7 +33,7 @@ contract FutarchyOracleFactory { */ /// @dev Constructor sets event factory contract /// @param _eventFactory Event factory contract - function FutarchyOracleFactory(EventFactory _eventFactory) + constructor(EventFactory _eventFactory) public { require(address(_eventFactory) != address(0)); diff --git a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol index 5c0ab1038..24cf9deaf 100644 --- a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol +++ b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol @@ -16,7 +16,7 @@ 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 diff --git a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol index d541ab463..9a7bba41d 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 9ed61aefd..0127117c2 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, diff --git a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol index fd1fa590a..4757c7985 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; diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol index 7a9158aeb..10b182a36 100644 --- a/test/compilationTests/milestonetracker/MilestoneTracker.sol +++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol @@ -108,7 +108,7 @@ contract MilestoneTracker { /// @param _arbitrator Address assigned to be the arbitrator /// @param _donor Address assigned to be the donor /// @param _recipient Address assigned to be the recipient - function MilestoneTracker ( + constructor ( address _arbitrator, address _donor, address _recipient diff --git a/test/compilationTests/zeppelin/DayLimit.sol b/test/compilationTests/zeppelin/DayLimit.sol index 3c8d5b0ce..0bcb341ad 100644 --- a/test/compilationTests/zeppelin/DayLimit.sol +++ b/test/compilationTests/zeppelin/DayLimit.sol @@ -15,7 +15,7 @@ contract DayLimit { * @dev Constructor that sets the passed value as a dailyLimit. * @param _limit uint256 to represent the daily limit. */ - function DayLimit(uint256 _limit) { + constructor(uint256 _limit) { dailyLimit = _limit; lastDay = today(); } diff --git a/test/compilationTests/zeppelin/LimitBalance.sol b/test/compilationTests/zeppelin/LimitBalance.sol index 57477c749..40edd0149 100644 --- a/test/compilationTests/zeppelin/LimitBalance.sol +++ b/test/compilationTests/zeppelin/LimitBalance.sol @@ -15,7 +15,7 @@ contract LimitBalance { * @dev Constructor that sets the passed value as a limit. * @param _limit uint256 to represent the limit. */ - function LimitBalance(uint256 _limit) { + constructor(uint256 _limit) { limit = _limit; } diff --git a/test/compilationTests/zeppelin/MultisigWallet.sol b/test/compilationTests/zeppelin/MultisigWallet.sol index 8fcdb63e0..00019f6bd 100644 --- a/test/compilationTests/zeppelin/MultisigWallet.sol +++ b/test/compilationTests/zeppelin/MultisigWallet.sol @@ -25,8 +25,8 @@ contract MultisigWallet is Multisig, Shareable, DayLimit { * @param _owners A list of owners. * @param _required The amount required for a transaction to be approved. */ - function MultisigWallet(address[] _owners, uint256 _required, uint256 _daylimit) - Shareable(_owners, _required) + constructor(address[] _owners, uint256 _required, uint256 _daylimit) + Shareable(_owners, _required) DayLimit(_daylimit) { } /** diff --git a/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol index f04649f36..afae79b7d 100644 --- a/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol +++ b/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol @@ -12,7 +12,7 @@ contract CappedCrowdsale is Crowdsale { uint256 public cap; - function CappedCrowdsale(uint256 _cap) { + constructor(uint256 _cap) { cap = _cap; } diff --git a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol index 21d368400..7c0cb3608 100644 --- a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol +++ b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol @@ -40,7 +40,7 @@ contract Crowdsale { event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); - function Crowdsale(uint256 _startBlock, uint256 _endBlock, uint256 _rate, address _wallet) { + constructor(uint256 _startBlock, uint256 _endBlock, uint256 _rate, address _wallet) { require(_startBlock >= block.number); require(_endBlock >= _startBlock); require(_rate > 0); diff --git a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol index d88f035fd..6a22ebde9 100644 --- a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol +++ b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol @@ -22,7 +22,7 @@ contract RefundVault is Ownable { event RefundsEnabled(); event Refunded(address indexed beneficiary, uint256 weiAmount); - function RefundVault(address _wallet) { + constructor(address _wallet) { require(_wallet != address(0x0)); wallet = _wallet; state = State.Active; diff --git a/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol index f45df1d33..5e798d450 100644 --- a/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol +++ b/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol @@ -21,7 +21,7 @@ contract RefundableCrowdsale is FinalizableCrowdsale { // refund vault used to hold funds while crowdsale is running RefundVault public vault; - function RefundableCrowdsale(uint256 _goal) { + constructor(uint256 _goal) { vault = new RefundVault(wallet); goal = _goal; } diff --git a/test/compilationTests/zeppelin/lifecycle/Destructible.sol b/test/compilationTests/zeppelin/lifecycle/Destructible.sol index 3561e3b74..004925908 100644 --- a/test/compilationTests/zeppelin/lifecycle/Destructible.sol +++ b/test/compilationTests/zeppelin/lifecycle/Destructible.sol @@ -10,7 +10,7 @@ import "../ownership/Ownable.sol"; */ contract Destructible is Ownable { - function Destructible() payable { } + constructor() payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. diff --git a/test/compilationTests/zeppelin/lifecycle/TokenDestructible.sol b/test/compilationTests/zeppelin/lifecycle/TokenDestructible.sol index fe0b46b6d..f88a55aaf 100644 --- a/test/compilationTests/zeppelin/lifecycle/TokenDestructible.sol +++ b/test/compilationTests/zeppelin/lifecycle/TokenDestructible.sol @@ -12,7 +12,7 @@ import "../token/ERC20Basic.sol"; */ contract TokenDestructible is Ownable { - function TokenDestructible() payable { } + constructor() payable { } /** * @notice Terminate contract and refund to owner diff --git a/test/compilationTests/zeppelin/ownership/HasNoEther.sol b/test/compilationTests/zeppelin/ownership/HasNoEther.sol index 2bcaf1b83..8f9edc031 100644 --- a/test/compilationTests/zeppelin/ownership/HasNoEther.sol +++ b/test/compilationTests/zeppelin/ownership/HasNoEther.sol @@ -21,7 +21,7 @@ contract HasNoEther is Ownable { * constructor. By doing it this way we prevent a payable constructor from working. Alternatively * we could use assembly to access msg.value. */ - function HasNoEther() payable { + constructor() payable { if(msg.value > 0) { throw; } diff --git a/test/compilationTests/zeppelin/ownership/Ownable.sol b/test/compilationTests/zeppelin/ownership/Ownable.sol index f16284540..0a2257d67 100644 --- a/test/compilationTests/zeppelin/ownership/Ownable.sol +++ b/test/compilationTests/zeppelin/ownership/Ownable.sol @@ -14,7 +14,7 @@ contract Ownable { * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ - function Ownable() { + constructor() { owner = msg.sender; } diff --git a/test/compilationTests/zeppelin/ownership/Shareable.sol b/test/compilationTests/zeppelin/ownership/Shareable.sol index b6cb1c16c..a9c2fd5f0 100644 --- a/test/compilationTests/zeppelin/ownership/Shareable.sol +++ b/test/compilationTests/zeppelin/ownership/Shareable.sol @@ -59,7 +59,7 @@ contract Shareable { * @param _owners A list of owners. * @param _required The amount required for a transaction to be approved. */ - function Shareable(address[] _owners, uint256 _required) { + constructor(address[] _owners, uint256 _required) { owners[1] = msg.sender; ownerIndex[msg.sender] = 1; for (uint256 i = 0; i < _owners.length; ++i) { diff --git a/test/compilationTests/zeppelin/token/SimpleToken.sol b/test/compilationTests/zeppelin/token/SimpleToken.sol index 898cb21dd..a4ba9eb30 100644 --- a/test/compilationTests/zeppelin/token/SimpleToken.sol +++ b/test/compilationTests/zeppelin/token/SimpleToken.sol @@ -20,7 +20,7 @@ contract SimpleToken is StandardToken { /** * @dev Contructor that gives msg.sender all of existing tokens. */ - function SimpleToken() { + constructor() { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } diff --git a/test/compilationTests/zeppelin/token/TokenTimelock.sol b/test/compilationTests/zeppelin/token/TokenTimelock.sol index 595bf8d0b..e9f998bae 100644 --- a/test/compilationTests/zeppelin/token/TokenTimelock.sol +++ b/test/compilationTests/zeppelin/token/TokenTimelock.sol @@ -19,7 +19,7 @@ contract TokenTimelock { // timestamp when token release is enabled uint releaseTime; - function TokenTimelock(ERC20Basic _token, address _beneficiary, uint _releaseTime) { + constructor(ERC20Basic _token, address _beneficiary, uint _releaseTime) { require(_releaseTime > now); token = _token; beneficiary = _beneficiary;