diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-26 06:45:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 06:45:55 +0800 |
commit | 4be9dc430452ca73ffb07f987f27fb6ccf4ac848 (patch) | |
tree | 993783b500555fb1b5dcb4d3f7ae2331fdec96ce | |
parent | 3b1741909c7472b892695260b0b8c59a53c2183e (diff) | |
parent | 95c3488a26bf5c20b242a7358d0dd04948b326f2 (diff) | |
download | dexon-solidity-4be9dc430452ca73ffb07f987f27fb6ccf4ac848.tar.gz dexon-solidity-4be9dc430452ca73ffb07f987f27fb6ccf4ac848.tar.zst dexon-solidity-4be9dc430452ca73ffb07f987f27fb6ccf4ac848.zip |
Merge pull request #4350 from ethereum/constructorWorkaroundExternal
New constructor syntax for external compilation tests
39 files changed, 41 insertions, 41 deletions
diff --git a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol index 48b75230..76b01188 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 024d3ef4..d03a82f9 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 13f8ab01..81a6516e 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 1d546b40..080f599c 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 b8436c8b..0a0a44c5 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<newOwners.length ; a++ ) { _addOwner(newOwners[a]); } diff --git a/test/compilationTests/corion/premium.sol b/test/compilationTests/corion/premium.sol index 843a2d16..9c29e700 100644 --- a/test/compilationTests/corion/premium.sol +++ b/test/compilationTests/corion/premium.sol @@ -40,7 +40,7 @@ contract premium is module, safeMath { mapping(address => 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 b3b8169d..e6886622 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 98d5af2a..c7baa4df 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 51133d73..e092e311 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 468e3e79..bb141b52 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 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 cb991447..4d390d0e 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 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 15d7010a..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, diff --git a/test/compilationTests/gnosis/Markets/StandardMarket.sol b/test/compilationTests/gnosis/Markets/StandardMarket.sol index 4273655a..fc384d3a 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 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 dbb0a487..1415486c 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 5c0ab103..24cf9dea 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 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 9ed61aef..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, 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; diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol index 7a9158ae..10b182a3 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 3c8d5b0c..0bcb341a 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 57477c74..40edd014 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 8fcdb63e..00019f6b 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 f04649f3..afae79b7 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 21d36840..7c0cb360 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 d88f035f..6a22ebde 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 f45df1d3..5e798d45 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 3561e3b7..00492590 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 fe0b46b6..f88a55aa 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 2bcaf1b8..8f9edc03 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 f1628454..0a2257d6 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 b6cb1c16..a9c2fd5f 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 898cb21d..a4ba9eb3 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 595bf8d0..e9f998ba 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; |