diff --git a/.travis.yml b/.travis.yml index 3d0f5d5107a..eb47674bf6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,6 @@ node_js: - "6" cache: yarn: true -env: - - - - SOLIDITY_COVERAGE=true -matrix: - fast_finish: true - allow_failures: - - env: SOLIDITY_COVERAGE=true before_script: - truffle version - yarn list diff --git a/contracts/Bounty.sol b/contracts/Bounty.sol index 1d00ca917da..f3b3cd0b909 100644 --- a/contracts/Bounty.sol +++ b/contracts/Bounty.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './payment/PullPayment.sol'; diff --git a/contracts/DayLimit.sol b/contracts/DayLimit.sol index 6efe8b6617d..9964bd536fd 100644 --- a/contracts/DayLimit.sol +++ b/contracts/DayLimit.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** * @title DayLimit @@ -59,7 +59,7 @@ contract DayLimit { * @dev Private function to determine today's index * @return uint256 of today's index. */ - function today() private constant returns (uint256) { + function today() private view returns (uint256) { return now / 1 days; } diff --git a/contracts/ECRecovery.sol b/contracts/ECRecovery.sol index de32838a1fd..3876ca6e830 100644 --- a/contracts/ECRecovery.sol +++ b/contracts/ECRecovery.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** @@ -14,7 +14,7 @@ library ECRecovery { * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. * @param sig bytes signature, the signature is generated using web3.eth.sign() */ - function recover(bytes32 hash, bytes sig) public constant returns (address) { + function recover(bytes32 hash, bytes sig) public pure returns (address) { bytes32 r; bytes32 s; uint8 v; diff --git a/contracts/LimitBalance.sol b/contracts/LimitBalance.sol index 32ec46d1fcb..a3297418404 100644 --- a/contracts/LimitBalance.sol +++ b/contracts/LimitBalance.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** diff --git a/contracts/MerkleProof.sol b/contracts/MerkleProof.sol index 1703ee4eaea..e638c8e9da6 100644 --- a/contracts/MerkleProof.sol +++ b/contracts/MerkleProof.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /* * @title MerkleProof @@ -13,7 +13,7 @@ library MerkleProof { * @param _root Merkle root * @param _leaf Leaf of Merkle tree */ - function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) constant returns (bool) { + function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) pure returns (bool) { // Check if proof length is a multiple of 32 if (_proof.length % 32 != 0) return false; diff --git a/contracts/ReentrancyGuard.sol b/contracts/ReentrancyGuard.sol index fa9e7d52e5d..461c431b0dc 100644 --- a/contracts/ReentrancyGuard.sol +++ b/contracts/ReentrancyGuard.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** * @title Helps contracts guard agains rentrancy attacks. diff --git a/contracts/crowdsale/CappedCrowdsale.sol b/contracts/crowdsale/CappedCrowdsale.sol index a9c54ac905a..972c1fc1bee 100644 --- a/contracts/crowdsale/CappedCrowdsale.sol +++ b/contracts/crowdsale/CappedCrowdsale.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../math/SafeMath.sol'; import './Crowdsale.sol'; @@ -19,14 +19,14 @@ contract CappedCrowdsale is Crowdsale { // overriding Crowdsale#validPurchase to add extra cap logic // @return true if investors can buy at the moment - function validPurchase() internal constant returns (bool) { + function validPurchase() internal view returns (bool) { bool withinCap = weiRaised.add(msg.value) <= cap; return super.validPurchase() && withinCap; } // overriding Crowdsale#hasEnded to add cap logic // @return true if crowdsale event has ended - function hasEnded() public constant returns (bool) { + function hasEnded() public view returns (bool) { bool capReached = weiRaised >= cap; return super.hasEnded() || capReached; } diff --git a/contracts/crowdsale/Crowdsale.sol b/contracts/crowdsale/Crowdsale.sol index 26ed8df8521..27ccac3f0d9 100644 --- a/contracts/crowdsale/Crowdsale.sol +++ b/contracts/crowdsale/Crowdsale.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../token/MintableToken.sol'; import '../math/SafeMath.sol'; @@ -91,14 +91,14 @@ contract Crowdsale { } // @return true if the transaction can buy tokens - function validPurchase() internal constant returns (bool) { + function validPurchase() internal view returns (bool) { bool withinPeriod = now >= startTime && now <= endTime; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; } // @return true if crowdsale event has ended - function hasEnded() public constant returns (bool) { + function hasEnded() public view returns (bool) { return now > endTime; } diff --git a/contracts/crowdsale/FinalizableCrowdsale.sol b/contracts/crowdsale/FinalizableCrowdsale.sol index 49a291c4b61..c8501dadd1e 100644 --- a/contracts/crowdsale/FinalizableCrowdsale.sol +++ b/contracts/crowdsale/FinalizableCrowdsale.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../math/SafeMath.sol'; import '../ownership/Ownable.sol'; diff --git a/contracts/crowdsale/RefundVault.sol b/contracts/crowdsale/RefundVault.sol index fb721d17a4a..62d7599dd0d 100644 --- a/contracts/crowdsale/RefundVault.sol +++ b/contracts/crowdsale/RefundVault.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../math/SafeMath.sol'; import '../ownership/Ownable.sol'; diff --git a/contracts/crowdsale/RefundableCrowdsale.sol b/contracts/crowdsale/RefundableCrowdsale.sol index f04f643ebff..c468fcf341c 100644 --- a/contracts/crowdsale/RefundableCrowdsale.sol +++ b/contracts/crowdsale/RefundableCrowdsale.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../math/SafeMath.sol'; @@ -53,7 +53,7 @@ contract RefundableCrowdsale is FinalizableCrowdsale { super.finalization(); } - function goalReached() public constant returns (bool) { + function goalReached() public view returns (bool) { return weiRaised >= goal; } diff --git a/contracts/examples/SampleCrowdsale.sol b/contracts/examples/SampleCrowdsale.sol index 0adc487b60b..a83b8856db3 100644 --- a/contracts/examples/SampleCrowdsale.sol +++ b/contracts/examples/SampleCrowdsale.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../crowdsale/CappedCrowdsale.sol"; import "../crowdsale/RefundableCrowdsale.sol"; diff --git a/contracts/examples/SimpleToken.sol b/contracts/examples/SimpleToken.sol index f0ad644db27..2381a7162d8 100644 --- a/contracts/examples/SimpleToken.sol +++ b/contracts/examples/SimpleToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../token/StandardToken.sol"; diff --git a/contracts/lifecycle/Destructible.sol b/contracts/lifecycle/Destructible.sol index 9c24474b790..e1b3174bcc3 100644 --- a/contracts/lifecycle/Destructible.sol +++ b/contracts/lifecycle/Destructible.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../ownership/Ownable.sol"; diff --git a/contracts/lifecycle/Migrations.sol b/contracts/lifecycle/Migrations.sol index f389cca9977..59d1f0bf3e5 100644 --- a/contracts/lifecycle/Migrations.sol +++ b/contracts/lifecycle/Migrations.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../ownership/Ownable.sol'; diff --git a/contracts/lifecycle/Pausable.sol b/contracts/lifecycle/Pausable.sol index 9c3cc307baa..d7341ead020 100644 --- a/contracts/lifecycle/Pausable.sol +++ b/contracts/lifecycle/Pausable.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../ownership/Ownable.sol"; diff --git a/contracts/lifecycle/TokenDestructible.sol b/contracts/lifecycle/TokenDestructible.sol index e29d69b63a2..1c3324feac2 100644 --- a/contracts/lifecycle/TokenDestructible.sol +++ b/contracts/lifecycle/TokenDestructible.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../ownership/Ownable.sol"; diff --git a/contracts/math/Math.sol b/contracts/math/Math.sol index 3d016c0acd5..5d09ee6ff31 100644 --- a/contracts/math/Math.sol +++ b/contracts/math/Math.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** * @title Math @@ -6,19 +6,19 @@ pragma solidity ^0.4.11; */ library Math { - function max64(uint64 a, uint64 b) internal constant returns (uint64) { + function max64(uint64 a, uint64 b) internal pure returns (uint64) { return a >= b ? a : b; } - function min64(uint64 a, uint64 b) internal constant returns (uint64) { + function min64(uint64 a, uint64 b) internal pure returns (uint64) { return a < b ? a : b; } - function max256(uint256 a, uint256 b) internal constant returns (uint256) { + function max256(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } - function min256(uint256 a, uint256 b) internal constant returns (uint256) { + function min256(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } } diff --git a/contracts/math/SafeMath.sol b/contracts/math/SafeMath.sol index 05ad6ee171e..234daf65656 100644 --- a/contracts/math/SafeMath.sol +++ b/contracts/math/SafeMath.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** @@ -6,7 +6,7 @@ pragma solidity ^0.4.11; * @dev Math operations with safety checks that throw on error */ library SafeMath { - function mul(uint256 a, uint256 b) internal constant returns (uint256) { + function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } @@ -15,19 +15,19 @@ library SafeMath { return c; } - function div(uint256 a, uint256 b) internal constant returns (uint256) { + function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } - function sub(uint256 a, uint256 b) internal constant returns (uint256) { + function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } - function add(uint256 a, uint256 b) internal constant returns (uint256) { + function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; diff --git a/contracts/ownership/CanReclaimToken.sol b/contracts/ownership/CanReclaimToken.sol index d26212df97c..d948393ac38 100644 --- a/contracts/ownership/CanReclaimToken.sol +++ b/contracts/ownership/CanReclaimToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "./Ownable.sol"; import "../token/ERC20Basic.sol"; diff --git a/contracts/ownership/Claimable.sol b/contracts/ownership/Claimable.sol index 299f2c8aacd..556a353cfdd 100644 --- a/contracts/ownership/Claimable.sol +++ b/contracts/ownership/Claimable.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './Ownable.sol'; diff --git a/contracts/ownership/Contactable.sol b/contracts/ownership/Contactable.sol index ed0c50dcd0f..2b6898f615d 100644 --- a/contracts/ownership/Contactable.sol +++ b/contracts/ownership/Contactable.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './Ownable.sol'; diff --git a/contracts/ownership/DelayedClaimable.sol b/contracts/ownership/DelayedClaimable.sol index 0384b436b38..0091fa68e80 100644 --- a/contracts/ownership/DelayedClaimable.sol +++ b/contracts/ownership/DelayedClaimable.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './Claimable.sol'; diff --git a/contracts/ownership/HasNoContracts.sol b/contracts/ownership/HasNoContracts.sol index 19b363d46db..1b7387530b7 100644 --- a/contracts/ownership/HasNoContracts.sol +++ b/contracts/ownership/HasNoContracts.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "./Ownable.sol"; diff --git a/contracts/ownership/HasNoEther.sol b/contracts/ownership/HasNoEther.sol index 63b4ef65c73..3f83096772b 100644 --- a/contracts/ownership/HasNoEther.sol +++ b/contracts/ownership/HasNoEther.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "./Ownable.sol"; diff --git a/contracts/ownership/HasNoTokens.sol b/contracts/ownership/HasNoTokens.sol index 3f91ad24a0e..cce530bf623 100644 --- a/contracts/ownership/HasNoTokens.sol +++ b/contracts/ownership/HasNoTokens.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "./CanReclaimToken.sol"; diff --git a/contracts/ownership/NoOwner.sol b/contracts/ownership/NoOwner.sol index c0ef7f4dcb6..160d5b57de2 100644 --- a/contracts/ownership/NoOwner.sol +++ b/contracts/ownership/NoOwner.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "./HasNoEther.sol"; import "./HasNoTokens.sol"; diff --git a/contracts/ownership/Ownable.sol b/contracts/ownership/Ownable.sol index 9e2c2f884b7..67ac79ff1bd 100644 --- a/contracts/ownership/Ownable.sol +++ b/contracts/ownership/Ownable.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.sol index 4a0924fa739..5e7cbf740b1 100644 --- a/contracts/payment/PullPayment.sol +++ b/contracts/payment/PullPayment.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../math/SafeMath.sol'; diff --git a/contracts/payment/SplitPayment.sol b/contracts/payment/SplitPayment.sol index c32ecba39f4..78538e3ec52 100644 --- a/contracts/payment/SplitPayment.sol +++ b/contracts/payment/SplitPayment.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../math/SafeMath.sol'; diff --git a/contracts/token/BasicToken.sol b/contracts/token/BasicToken.sol index a45157f81f8..0bd7603fbec 100644 --- a/contracts/token/BasicToken.sol +++ b/contracts/token/BasicToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './ERC20Basic.sol'; @@ -35,7 +35,7 @@ contract BasicToken is ERC20Basic { * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ - function balanceOf(address _owner) public constant returns (uint256 balance) { + function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } diff --git a/contracts/token/BurnableToken.sol b/contracts/token/BurnableToken.sol index c155bd1883a..2ff3b1fabcb 100644 --- a/contracts/token/BurnableToken.sol +++ b/contracts/token/BurnableToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.13; +pragma solidity ^0.4.18; import './StandardToken.sol'; diff --git a/contracts/token/DetailedERC20.sol b/contracts/token/DetailedERC20.sol index c61cde2e975..a08236305e6 100644 --- a/contracts/token/DetailedERC20.sol +++ b/contracts/token/DetailedERC20.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './ERC20.sol'; diff --git a/contracts/token/ERC20.sol b/contracts/token/ERC20.sol index ca36d737b9a..28ffc01658a 100644 --- a/contracts/token/ERC20.sol +++ b/contracts/token/ERC20.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './ERC20Basic.sol'; @@ -9,7 +9,7 @@ import './ERC20Basic.sol'; * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { - function allowance(address owner, address spender) public constant returns (uint256); + function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); diff --git a/contracts/token/ERC20Basic.sol b/contracts/token/ERC20Basic.sol index 76e0704bae4..c972edac66f 100644 --- a/contracts/token/ERC20Basic.sol +++ b/contracts/token/ERC20Basic.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; /** @@ -8,7 +8,7 @@ pragma solidity ^0.4.11; */ contract ERC20Basic { uint256 public totalSupply; - function balanceOf(address who) public constant returns (uint256); + function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } diff --git a/contracts/token/MintableToken.sol b/contracts/token/MintableToken.sol index ba2454e93ae..53f577d46c3 100644 --- a/contracts/token/MintableToken.sol +++ b/contracts/token/MintableToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './StandardToken.sol'; diff --git a/contracts/token/PausableToken.sol b/contracts/token/PausableToken.sol index 428fb990b53..0af9971c0ff 100644 --- a/contracts/token/PausableToken.sol +++ b/contracts/token/PausableToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './StandardToken.sol'; import '../lifecycle/Pausable.sol'; diff --git a/contracts/token/SafeERC20.sol b/contracts/token/SafeERC20.sol index cffa8b9f874..64d10039145 100644 --- a/contracts/token/SafeERC20.sol +++ b/contracts/token/SafeERC20.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './ERC20Basic.sol'; import './ERC20.sol'; diff --git a/contracts/token/StandardToken.sol b/contracts/token/StandardToken.sol index 3d648937d1c..343d36e1fe1 100644 --- a/contracts/token/StandardToken.sol +++ b/contracts/token/StandardToken.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './BasicToken.sol'; @@ -57,7 +57,7 @@ contract StandardToken is ERC20, BasicToken { * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ - function allowance(address _owner, address _spender) public constant returns (uint256) { + function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } diff --git a/contracts/token/TokenTimelock.sol b/contracts/token/TokenTimelock.sol index f4255fbbf0b..557fc6ed6b2 100644 --- a/contracts/token/TokenTimelock.sol +++ b/contracts/token/TokenTimelock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './ERC20Basic.sol'; diff --git a/contracts/token/TokenVesting.sol b/contracts/token/TokenVesting.sol index 7fb33b89678..14373d15b26 100644 --- a/contracts/token/TokenVesting.sol +++ b/contracts/token/TokenVesting.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import './ERC20Basic.sol'; import './SafeERC20.sol'; @@ -91,7 +91,7 @@ contract TokenVesting is Ownable { * @dev Calculates the amount that has already vested but hasn't been released yet. * @param token ERC20 token which is being vested */ - function releasableAmount(ERC20Basic token) public constant returns (uint256) { + function releasableAmount(ERC20Basic token) public view returns (uint256) { return vestedAmount(token).sub(released[token]); } @@ -99,7 +99,7 @@ contract TokenVesting is Ownable { * @dev Calculates the amount that has already vested. * @param token ERC20 token which is being vested */ - function vestedAmount(ERC20Basic token) public constant returns (uint256) { + function vestedAmount(ERC20Basic token) public view returns (uint256) { uint256 currentBalance = token.balanceOf(this); uint256 totalBalance = currentBalance.add(released[token]); diff --git a/package-lock.json b/package-lock.json index 52be4767733..1cd69bf4a56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2704,6 +2704,12 @@ "secp256k1": "3.3.0" } }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -5281,14 +5287,14 @@ "dev": true }, "truffle": { - "version": "3.4.8", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-3.4.8.tgz", - "integrity": "sha512-UeMrofHcguSwfAa5Oy3+arWPWb5zd28stySKIanNhzByV1rcUy3WhxE5up4LBOxAPz+OsH1nQ02kqIcBZDwxIw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.0.1.tgz", + "integrity": "sha512-PybO+GMq3AvsfCWfEx4sbuaJlDL19iR8Ff20cO0TtP599N5JbMLlhwlffvVInPgFjP+F11vjSOYj3hT8fONs5A==", "dev": true, "requires": { - "mocha": "3.5.0", + "mocha": "3.5.3", "original-require": "1.0.1", - "solc": "0.4.13" + "solc": "0.4.18" }, "dependencies": { "commander": { @@ -5321,9 +5327,9 @@ } }, "mocha": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.0.tgz", - "integrity": "sha512-pIU2PJjrPYvYRqVpjXzj76qltO9uBYI7woYAMoxbSefsa+vqAfptjoeevd6bUgwD0mPIO+hv9f7ltvsNreL2PA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", "dev": true, "requires": { "browser-stdout": "1.3.0", @@ -5333,6 +5339,7 @@ "escape-string-regexp": "1.0.5", "glob": "7.1.1", "growl": "1.9.2", + "he": "1.1.1", "json3": "3.3.2", "lodash.create": "3.1.1", "mkdirp": "0.5.1", @@ -5340,9 +5347,9 @@ } }, "solc": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.13.tgz", - "integrity": "sha1-qly9zOPmrjwZDSD1/fi8iAcC7HU=", + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.18.tgz", + "integrity": "sha512-Kq+O3PNF9Pfq7fB+lDYAuoqRdghLmZyfngsg0h1Hj38NKAeVHeGPOGeZasn5KqdPeCzbMFvaGyTySxzGv6aXCg==", "dev": true, "requires": { "fs-extra": "0.30.0", @@ -5360,28 +5367,6 @@ "requires": { "has-flag": "1.0.0" } - }, - "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", - "dev": true, - "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "lodash.assign": "4.2.0", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "window-size": "0.2.0", - "y18n": "3.2.1", - "yargs-parser": "2.4.1" - } } } }, @@ -6019,6 +6004,28 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "dev": true, + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "lodash.assign": "4.2.0", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "window-size": "0.2.0", + "y18n": "3.2.1", + "yargs-parser": "2.4.1" + } + }, "yargs-parser": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", diff --git a/package.json b/package.json index f980f9cabbe..74558d8f0c5 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "ethereumjs-testrpc": "^4.1.1", "mocha-lcov-reporter": "^1.3.0", "solidity-coverage": "^0.2.2", - "truffle": "^3.4.6", + "truffle": "^4.0.0", "truffle-hdwallet-provider": "0.0.3" } } diff --git a/scripts/test.sh b/scripts/test.sh index 7893fbe4688..044a7e01e2a 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -41,7 +41,7 @@ start_testrpc() { if [ "$SOLIDITY_COVERAGE" = true ]; then node_modules/.bin/testrpc-sc --gasLimit 0xfffffffffff --port "$testrpc_port" "${accounts[@]}" > /dev/null & else - node_modules/.bin/testrpc "${accounts[@]}" > /dev/null & + node_modules/.bin/testrpc --gasLimit 0xfffffffffff "${accounts[@]}" > /dev/null & fi testrpc_pid=$! diff --git a/test/helpers/BasicTokenMock.sol b/test/helpers/BasicTokenMock.sol index f1a0265f07b..6c3f8ef6912 100644 --- a/test/helpers/BasicTokenMock.sol +++ b/test/helpers/BasicTokenMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/token/BasicToken.sol'; diff --git a/test/helpers/BurnableTokenMock.sol b/test/helpers/BurnableTokenMock.sol index c82a0cac88a..ce6bb4c7cd8 100644 --- a/test/helpers/BurnableTokenMock.sol +++ b/test/helpers/BurnableTokenMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.13; +pragma solidity ^0.4.18; import '../../contracts/token/BurnableToken.sol'; diff --git a/test/helpers/CappedCrowdsaleImpl.sol b/test/helpers/CappedCrowdsaleImpl.sol index 0f65471d08a..3c9692ed8ab 100644 --- a/test/helpers/CappedCrowdsaleImpl.sol +++ b/test/helpers/CappedCrowdsaleImpl.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/crowdsale/CappedCrowdsale.sol'; diff --git a/test/helpers/DayLimitMock.sol b/test/helpers/DayLimitMock.sol index 636b5394ff7..83accc7a5a8 100644 --- a/test/helpers/DayLimitMock.sol +++ b/test/helpers/DayLimitMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../../contracts/DayLimit.sol"; contract DayLimitMock is DayLimit { diff --git a/test/helpers/DetailedERC20Mock.sol b/test/helpers/DetailedERC20Mock.sol index 5396ee4eff0..f1f5cbaca1f 100644 --- a/test/helpers/DetailedERC20Mock.sol +++ b/test/helpers/DetailedERC20Mock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/token/StandardToken.sol'; import '../../contracts/token/DetailedERC20.sol'; diff --git a/test/helpers/ERC23TokenMock.sol b/test/helpers/ERC23TokenMock.sol index 5773e3f5628..b06adffdc33 100644 --- a/test/helpers/ERC23TokenMock.sol +++ b/test/helpers/ERC23TokenMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/token/BasicToken.sol'; diff --git a/test/helpers/FinalizableCrowdsaleImpl.sol b/test/helpers/FinalizableCrowdsaleImpl.sol index 3c3279c1b14..c16ab463494 100644 --- a/test/helpers/FinalizableCrowdsaleImpl.sol +++ b/test/helpers/FinalizableCrowdsaleImpl.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/crowdsale/FinalizableCrowdsale.sol'; diff --git a/test/helpers/ForceEther.sol b/test/helpers/ForceEther.sol index 4d25ac4a201..eed268f3cb7 100644 --- a/test/helpers/ForceEther.sol +++ b/test/helpers/ForceEther.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; // @title Force Ether into a contract. // @notice even diff --git a/test/helpers/HasNoEtherTest.sol b/test/helpers/HasNoEtherTest.sol index 9f320c06f9b..135e07d0412 100644 --- a/test/helpers/HasNoEtherTest.sol +++ b/test/helpers/HasNoEtherTest.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import "../../contracts/ownership/HasNoEther.sol"; diff --git a/test/helpers/InsecureTargetBounty.sol b/test/helpers/InsecureTargetBounty.sol index 3ac46a24e0a..e39b90a01e0 100644 --- a/test/helpers/InsecureTargetBounty.sol +++ b/test/helpers/InsecureTargetBounty.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import {Bounty, Target} from "../../contracts/Bounty.sol"; diff --git a/test/helpers/LimitBalanceMock.sol b/test/helpers/LimitBalanceMock.sol index d38914ecdba..2a1b7237549 100644 --- a/test/helpers/LimitBalanceMock.sol +++ b/test/helpers/LimitBalanceMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/LimitBalance.sol'; diff --git a/test/helpers/PausableMock.sol b/test/helpers/PausableMock.sol index 97a5f28eac3..59a6b3dd0c0 100644 --- a/test/helpers/PausableMock.sol +++ b/test/helpers/PausableMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/lifecycle/Pausable.sol'; diff --git a/test/helpers/PausableTokenMock.sol b/test/helpers/PausableTokenMock.sol index 360402151b9..54e2cee144e 100644 --- a/test/helpers/PausableTokenMock.sol +++ b/test/helpers/PausableTokenMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/token/PausableToken.sol'; diff --git a/test/helpers/PullPaymentMock.sol b/test/helpers/PullPaymentMock.sol index 99800e9463b..93689ed8a34 100644 --- a/test/helpers/PullPaymentMock.sol +++ b/test/helpers/PullPaymentMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/payment/PullPayment.sol'; diff --git a/test/helpers/ReentrancyAttack.sol b/test/helpers/ReentrancyAttack.sol index 37b5cffd72e..091392b0da3 100644 --- a/test/helpers/ReentrancyAttack.sol +++ b/test/helpers/ReentrancyAttack.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; contract ReentrancyAttack { diff --git a/test/helpers/ReentrancyMock.sol b/test/helpers/ReentrancyMock.sol index 63162fd9288..ecf45fef4bb 100644 --- a/test/helpers/ReentrancyMock.sol +++ b/test/helpers/ReentrancyMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/ReentrancyGuard.sol'; import './ReentrancyAttack.sol'; diff --git a/test/helpers/RefundableCrowdsaleImpl.sol b/test/helpers/RefundableCrowdsaleImpl.sol index 1dccc8d256f..f11200ff1e0 100644 --- a/test/helpers/RefundableCrowdsaleImpl.sol +++ b/test/helpers/RefundableCrowdsaleImpl.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/crowdsale/RefundableCrowdsale.sol'; diff --git a/test/helpers/SafeERC20Helper.sol b/test/helpers/SafeERC20Helper.sol index 693af093444..abe73fc68a9 100644 --- a/test/helpers/SafeERC20Helper.sol +++ b/test/helpers/SafeERC20Helper.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/token/ERC20.sol'; import '../../contracts/token/SafeERC20.sol'; diff --git a/test/helpers/SafeMathMock.sol b/test/helpers/SafeMathMock.sol index 5a20aefe825..0b94fb926d2 100644 --- a/test/helpers/SafeMathMock.sol +++ b/test/helpers/SafeMathMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/math/SafeMath.sol'; diff --git a/test/helpers/SecureTargetBounty.sol b/test/helpers/SecureTargetBounty.sol index 1f370246fc5..0d80e9c1373 100644 --- a/test/helpers/SecureTargetBounty.sol +++ b/test/helpers/SecureTargetBounty.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import {Bounty, Target} from "../../contracts/Bounty.sol"; diff --git a/test/helpers/SplitPaymentMock.sol b/test/helpers/SplitPaymentMock.sol index 0f347a2665b..6df502a4e96 100644 --- a/test/helpers/SplitPaymentMock.sol +++ b/test/helpers/SplitPaymentMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/payment/SplitPayment.sol'; diff --git a/test/helpers/StandardTokenMock.sol b/test/helpers/StandardTokenMock.sol index 6425d2f9ea5..2189edce850 100644 --- a/test/helpers/StandardTokenMock.sol +++ b/test/helpers/StandardTokenMock.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.11; +pragma solidity ^0.4.18; import '../../contracts/token/StandardToken.sol';