Unverified Commit a7e91856 by Francisco Giordano Committed by GitHub

Update to Truffle 4.1.5 and Ganache 6.1.0 (#876)

* Update to ganache-cli v6.1.0 and truffle v4.1.0

* Update to stable version of ganache-cli

* fix: update event emission warning

- Fix event emission warnings for solidity 4.21 after truffle has been
updated to use this version

* fix pr review comments

* update to truffle v4.1.5

* update package-lock

* add additional emit keywords

* update solidity-coverage to 0.4.15

* update to solium 1.1.6

* fix MerkleProof coverage analysis by testing through wrapper

* change version pragma to ^0.4.21

* fix solium linting errors
parent 06666be9
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
Next, we need to know what your environment looks like. Next, we need to know what your environment looks like.
- Which version of OpenZeppelin are you using? - Which version of OpenZeppelin are you using?
- What network are you deploying to? testrpc? Ganache? Ropsten? - What network are you deploying to? Ganache? Ropsten?
- How are you deploying your OpenZeppelin-backed contracts? truffle? Remix? Let us know! - How are you deploying your OpenZeppelin-backed contracts? truffle? Remix? Let us know!
## 📝 Details ## 📝 Details
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./payment/PullPayment.sol"; import "./payment/PullPayment.sol";
...@@ -30,7 +30,7 @@ contract Bounty is PullPayment, Destructible { ...@@ -30,7 +30,7 @@ contract Bounty is PullPayment, Destructible {
function createTarget() public returns(Target) { function createTarget() public returns(Target) {
Target target = Target(deployContract()); Target target = Target(deployContract());
researchers[target] = msg.sender; researchers[target] = msg.sender;
TargetCreated(target); emit TargetCreated(target);
return target; return target;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/* /*
...@@ -14,7 +14,7 @@ library MerkleProof { ...@@ -14,7 +14,7 @@ library MerkleProof {
* @param _root Merkle root * @param _root Merkle root
* @param _leaf Leaf of Merkle tree * @param _leaf Leaf of Merkle tree
*/ */
function verifyProof(bytes32[] _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) { function verifyProof(bytes32[] _proof, bytes32 _root, bytes32 _leaf) internal pure returns (bool) {
bytes32 computedHash = _leaf; bytes32 computedHash = _leaf;
for (uint256 i = 0; i < _proof.length; i++) { for (uint256 i = 0; i < _proof.length; i++) {
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
...@@ -82,7 +82,7 @@ contract Crowdsale { ...@@ -82,7 +82,7 @@ contract Crowdsale {
weiRaised = weiRaised.add(weiAmount); weiRaised = weiRaised.add(weiAmount);
_processPurchase(_beneficiary, tokens); _processPurchase(_beneficiary, tokens);
TokenPurchase(msg.sender, _beneficiary, weiAmount, tokens); emit TokenPurchase(msg.sender, _beneficiary, weiAmount, tokens);
_updatePurchasingState(_beneficiary, weiAmount); _updatePurchasingState(_beneficiary, weiAmount);
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../../ownership/Ownable.sol"; import "../../ownership/Ownable.sol";
...@@ -26,7 +26,7 @@ contract FinalizableCrowdsale is TimedCrowdsale, Ownable { ...@@ -26,7 +26,7 @@ contract FinalizableCrowdsale is TimedCrowdsale, Ownable {
require(hasClosed()); require(hasClosed());
finalization(); finalization();
Finalized(); emit Finalized();
isFinalized = true; isFinalized = true;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../validation/TimedCrowdsale.sol"; import "../validation/TimedCrowdsale.sol";
import "../../token/ERC20/ERC20.sol"; import "../../token/ERC20/ERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../../math/SafeMath.sol"; import "../../../math/SafeMath.sol";
import "../../../ownership/Ownable.sol"; import "../../../ownership/Ownable.sol";
...@@ -43,14 +43,14 @@ contract RefundVault is Ownable { ...@@ -43,14 +43,14 @@ contract RefundVault is Ownable {
function close() onlyOwner public { function close() onlyOwner public {
require(state == State.Active); require(state == State.Active);
state = State.Closed; state = State.Closed;
Closed(); emit Closed();
wallet.transfer(this.balance); wallet.transfer(this.balance);
} }
function enableRefunds() onlyOwner public { function enableRefunds() onlyOwner public {
require(state == State.Active); require(state == State.Active);
state = State.Refunding; state = State.Refunding;
RefundsEnabled(); emit RefundsEnabled();
} }
/** /**
...@@ -61,6 +61,6 @@ contract RefundVault is Ownable { ...@@ -61,6 +61,6 @@ contract RefundVault is Ownable {
uint256 depositedValue = deposited[investor]; uint256 depositedValue = deposited[investor];
deposited[investor] = 0; deposited[investor] = 0;
investor.transfer(depositedValue); investor.transfer(depositedValue);
Refunded(investor, depositedValue); emit Refunded(investor, depositedValue);
} }
} }
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../Crowdsale.sol"; import "../Crowdsale.sol";
import "../../token/ERC20/ERC20.sol"; import "../../token/ERC20/ERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../Crowdsale.sol"; import "../Crowdsale.sol";
import "../../token/ERC20/MintableToken.sol"; import "../../token/ERC20/MintableToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../validation/TimedCrowdsale.sol"; import "../validation/TimedCrowdsale.sol";
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../Crowdsale.sol"; import "../Crowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../Crowdsale.sol"; import "../Crowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../Crowdsale.sol"; import "../Crowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../Crowdsale.sol"; import "../Crowdsale.sol";
import "../../ownership/Ownable.sol"; import "../../ownership/Ownable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../crowdsale/validation/CappedCrowdsale.sol"; import "../crowdsale/validation/CappedCrowdsale.sol";
import "../crowdsale/distribution/RefundableCrowdsale.sol"; import "../crowdsale/distribution/RefundableCrowdsale.sol";
......
pragma solidity ^0.4.11; pragma solidity ^0.4.21;
import "../ownership/Heritable.sol"; import "../ownership/Heritable.sol";
...@@ -25,7 +25,7 @@ contract SimpleSavingsWallet is Heritable { ...@@ -25,7 +25,7 @@ contract SimpleSavingsWallet is Heritable {
* @dev wallet can receive funds. * @dev wallet can receive funds.
*/ */
function () public payable { function () public payable {
Received(msg.sender, msg.value, this.balance); emit Received(msg.sender, msg.value, this.balance);
} }
/** /**
...@@ -35,6 +35,6 @@ contract SimpleSavingsWallet is Heritable { ...@@ -35,6 +35,6 @@ contract SimpleSavingsWallet is Heritable {
require(payee != 0 && payee != address(this)); require(payee != 0 && payee != address(this));
require(amount > 0); require(amount > 0);
payee.transfer(amount); payee.transfer(amount);
Sent(payee, amount, this.balance); emit Sent(payee, amount, this.balance);
} }
} }
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/StandardToken.sol"; import "../token/ERC20/StandardToken.sol";
...@@ -24,7 +24,7 @@ contract SimpleToken is StandardToken { ...@@ -24,7 +24,7 @@ contract SimpleToken is StandardToken {
function SimpleToken() public { function SimpleToken() public {
totalSupply_ = INITIAL_SUPPLY; totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY;
Transfer(0x0, msg.sender, INITIAL_SUPPLY); emit Transfer(0x0, msg.sender, INITIAL_SUPPLY);
} }
} }
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
...@@ -36,7 +36,7 @@ contract Pausable is Ownable { ...@@ -36,7 +36,7 @@ contract Pausable is Ownable {
*/ */
function pause() onlyOwner whenNotPaused public { function pause() onlyOwner whenNotPaused public {
paused = true; paused = true;
Pause(); emit Pause();
} }
/** /**
...@@ -44,6 +44,6 @@ contract Pausable is Ownable { ...@@ -44,6 +44,6 @@ contract Pausable is Ownable {
*/ */
function unpause() onlyOwner whenPaused public { function unpause() onlyOwner whenPaused public {
paused = false; paused = false;
Unpause(); emit Unpause();
} }
} }
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ownership/Ownable.sol"; import "../ownership/Ownable.sol";
import "../token/ERC20/ERC20Basic.sol"; import "../token/ERC20/ERC20Basic.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../crowdsale/emission/AllowanceCrowdsale.sol"; import "../crowdsale/emission/AllowanceCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/BasicToken.sol"; import "../token/ERC20/BasicToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/BurnableToken.sol"; import "../token/ERC20/BurnableToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/CappedCrowdsale.sol"; import "../crowdsale/validation/CappedCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../contracts/DayLimit.sol"; import "../../contracts/DayLimit.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/StandardToken.sol"; import "../token/ERC20/StandardToken.sol";
import "../token/ERC20/DetailedERC20.sol"; import "../token/ERC20/DetailedERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ECRecovery.sol"; import "../ECRecovery.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/BasicToken.sol"; import "../token/ERC20/BasicToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC721/ERC721BasicToken.sol"; import "../token/ERC721/ERC721BasicToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC721/ERC721Receiver.sol"; import "../token/ERC721/ERC721Receiver.sol";
...@@ -16,7 +16,7 @@ contract ERC721ReceiverMock is ERC721Receiver { ...@@ -16,7 +16,7 @@ contract ERC721ReceiverMock is ERC721Receiver {
function onERC721Received(address _address, uint256 _tokenId, bytes _data) public returns(bytes4) { function onERC721Received(address _address, uint256 _tokenId, bytes _data) public returns(bytes4) {
require(!reverts); require(!reverts);
Received(_address, _tokenId, _data, msg.gas); emit Received(_address, _tokenId, _data, msg.gas);
return retval; return retval;
} }
} }
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC721/ERC721Token.sol"; import "../token/ERC721/ERC721Token.sol";
......
pragma solidity ^0.4.13; pragma solidity ^0.4.21;
import "../token/ERC827/ERC827Token.sol"; import "../token/ERC827/ERC827Token.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/MintableToken.sol"; import "../token/ERC20/MintableToken.sol";
import "../crowdsale/distribution/FinalizableCrowdsale.sol"; import "../crowdsale/distribution/FinalizableCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
// @title Force Ether into a contract. // @title Force Ether into a contract.
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../contracts/ownership/HasNoEther.sol"; import "../../contracts/ownership/HasNoEther.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../crowdsale/price/IncreasingPriceCrowdsale.sol"; import "../crowdsale/price/IncreasingPriceCrowdsale.sol";
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/IndividuallyCappedCrowdsale.sol"; import "../crowdsale/validation/IndividuallyCappedCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import {Bounty, Target} from "../../contracts/Bounty.sol"; import {Bounty, Target} from "../../contracts/Bounty.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../LimitBalance.sol"; import "../LimitBalance.sol";
......
pragma solidity ^0.4.21;
import { MerkleProof } from "../MerkleProof.sol";
contract MerkleProofWrapper {
function verifyProof(bytes32[] _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) {
return MerkleProof.verifyProof(_proof, _root, _leaf);
}
}
pragma solidity ^0.4.11; pragma solidity ^0.4.21;
contract MessageHelper { contract MessageHelper {
...@@ -6,7 +6,7 @@ contract MessageHelper { ...@@ -6,7 +6,7 @@ contract MessageHelper {
event Show(bytes32 b32, uint256 number, string text); event Show(bytes32 b32, uint256 number, string text);
function showMessage( bytes32 message, uint256 number, string text ) public returns (bool) { function showMessage( bytes32 message, uint256 number, string text ) public returns (bool) {
Show(message, number, text); emit Show(message, number, text);
return true; return true;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/MintableToken.sol"; import "../token/ERC20/MintableToken.sol";
import "../crowdsale/emission/MintedCrowdsale.sol"; import "../crowdsale/emission/MintedCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../lifecycle/Pausable.sol"; import "../lifecycle/Pausable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/PausableToken.sol"; import "../token/ERC20/PausableToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../crowdsale/distribution/PostDeliveryCrowdsale.sol"; import "../crowdsale/distribution/PostDeliveryCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../payment/PullPayment.sol"; import "../payment/PullPayment.sol";
......
pragma solidity ^0.4.8; pragma solidity ^0.4.21;
import "../ownership/rbac/RBACWithAdmin.sol"; import "../ownership/rbac/RBACWithAdmin.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
contract ReentrancyAttack { contract ReentrancyAttack {
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ReentrancyGuard.sol"; import "../ReentrancyGuard.sol";
import "./ReentrancyAttack.sol"; import "./ReentrancyAttack.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/MintableToken.sol"; import "../token/ERC20/MintableToken.sol";
import "../crowdsale/distribution/RefundableCrowdsale.sol"; import "../crowdsale/distribution/RefundableCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../token/ERC20/SafeERC20.sol"; import "../token/ERC20/SafeERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import {Bounty, Target} from "../../contracts/Bounty.sol"; import {Bounty, Target} from "../../contracts/Bounty.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/StandardToken.sol"; import "../token/ERC20/StandardToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/TimedCrowdsale.sol"; import "../crowdsale/validation/TimedCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../ownership/Whitelist.sol"; import "../ownership/Whitelist.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/WhitelistedCrowdsale.sol"; import "../crowdsale/validation/WhitelistedCrowdsale.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
import "../token/ERC20/ERC20Basic.sol"; import "../token/ERC20/ERC20Basic.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
...@@ -32,7 +32,7 @@ contract Claimable is Ownable { ...@@ -32,7 +32,7 @@ contract Claimable is Ownable {
* @dev Allows the pendingOwner address to finalize the transfer. * @dev Allows the pendingOwner address to finalize the transfer.
*/ */
function claimOwnership() onlyPendingOwner public { function claimOwnership() onlyPendingOwner public {
OwnershipTransferred(owner, pendingOwner); emit OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner; owner = pendingOwner;
pendingOwner = address(0); pendingOwner = address(0);
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Claimable.sol"; import "./Claimable.sol";
...@@ -31,7 +31,7 @@ contract DelayedClaimable is Claimable { ...@@ -31,7 +31,7 @@ contract DelayedClaimable is Claimable {
*/ */
function claimOwnership() onlyPendingOwner public { function claimOwnership() onlyPendingOwner public {
require((block.number <= end) && (block.number >= start)); require((block.number <= end) && (block.number >= start));
OwnershipTransferred(owner, pendingOwner); emit OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner; owner = pendingOwner;
pendingOwner = address(0); pendingOwner = address(0);
end = 0; end = 0;
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./CanReclaimToken.sol"; import "./CanReclaimToken.sol";
......
pragma solidity ^0.4.11; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
...@@ -46,7 +46,7 @@ contract Heritable is Ownable { ...@@ -46,7 +46,7 @@ contract Heritable is Ownable {
function setHeir(address newHeir) public onlyOwner { function setHeir(address newHeir) public onlyOwner {
require(newHeir != owner); require(newHeir != owner);
heartbeat(); heartbeat();
HeirChanged(owner, newHeir); emit HeirChanged(owner, newHeir);
heir_ = newHeir; heir_ = newHeir;
} }
...@@ -80,7 +80,7 @@ contract Heritable is Ownable { ...@@ -80,7 +80,7 @@ contract Heritable is Ownable {
*/ */
function proclaimDeath() public onlyHeir { function proclaimDeath() public onlyHeir {
require(ownerLives()); require(ownerLives());
OwnerProclaimedDead(owner, heir_, timeOfDeath_); emit OwnerProclaimedDead(owner, heir_, timeOfDeath_);
timeOfDeath_ = block.timestamp; timeOfDeath_ = block.timestamp;
} }
...@@ -88,7 +88,7 @@ contract Heritable is Ownable { ...@@ -88,7 +88,7 @@ contract Heritable is Ownable {
* @dev Owner can send a heartbeat if they were mistakenly pronounced dead. * @dev Owner can send a heartbeat if they were mistakenly pronounced dead.
*/ */
function heartbeat() public onlyOwner { function heartbeat() public onlyOwner {
OwnerHeartbeated(owner); emit OwnerHeartbeated(owner);
timeOfDeath_ = 0; timeOfDeath_ = 0;
} }
...@@ -98,8 +98,8 @@ contract Heritable is Ownable { ...@@ -98,8 +98,8 @@ contract Heritable is Ownable {
function claimHeirOwnership() public onlyHeir { function claimHeirOwnership() public onlyHeir {
require(!ownerLives()); require(!ownerLives());
require(block.timestamp >= timeOfDeath_ + heartbeatTimeout_); require(block.timestamp >= timeOfDeath_ + heartbeatTimeout_);
OwnershipTransferred(owner, heir_); emit OwnershipTransferred(owner, heir_);
HeirOwnershipClaimed(owner, heir_); emit HeirOwnershipClaimed(owner, heir_);
owner = heir_; owner = heir_;
timeOfDeath_ = 0; timeOfDeath_ = 0;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./HasNoEther.sol"; import "./HasNoEther.sol";
import "./HasNoTokens.sol"; import "./HasNoTokens.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
...@@ -35,7 +35,7 @@ contract Ownable { ...@@ -35,7 +35,7 @@ contract Ownable {
*/ */
function transferOwnership(address newOwner) public onlyOwner { function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0)); require(newOwner != address(0));
OwnershipTransferred(owner, newOwner); emit OwnershipTransferred(owner, newOwner);
owner = newOwner; owner = newOwner;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Ownable.sol"; import "./Ownable.sol";
...@@ -31,7 +31,7 @@ contract Whitelist is Ownable { ...@@ -31,7 +31,7 @@ contract Whitelist is Ownable {
function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) { function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {
if (!whitelist[addr]) { if (!whitelist[addr]) {
whitelist[addr] = true; whitelist[addr] = true;
WhitelistedAddressAdded(addr); emit WhitelistedAddressAdded(addr);
success = true; success = true;
} }
} }
...@@ -59,7 +59,7 @@ contract Whitelist is Ownable { ...@@ -59,7 +59,7 @@ contract Whitelist is Ownable {
function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) { function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {
if (whitelist[addr]) { if (whitelist[addr]) {
whitelist[addr] = false; whitelist[addr] = false;
WhitelistedAddressRemoved(addr); emit WhitelistedAddressRemoved(addr);
success = true; success = true;
} }
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./Roles.sol"; import "./Roles.sol";
...@@ -58,7 +58,7 @@ contract RBAC { ...@@ -58,7 +58,7 @@ contract RBAC {
internal internal
{ {
roles[roleName].add(addr); roles[roleName].add(addr);
RoleAdded(addr, roleName); emit RoleAdded(addr, roleName);
} }
/** /**
...@@ -70,7 +70,7 @@ contract RBAC { ...@@ -70,7 +70,7 @@ contract RBAC {
internal internal
{ {
roles[roleName].remove(addr); roles[roleName].remove(addr);
RoleRemoved(addr, roleName); emit RoleRemoved(addr, roleName);
} }
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./RBAC.sol"; import "./RBAC.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC20Basic.sol"; import "./ERC20Basic.sol";
...@@ -34,7 +34,7 @@ contract BasicToken is ERC20Basic { ...@@ -34,7 +34,7 @@ contract BasicToken is ERC20Basic {
balances[msg.sender] = balances[msg.sender].sub(_value); balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value); balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value); emit Transfer(msg.sender, _to, _value);
return true; return true;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./BasicToken.sol"; import "./BasicToken.sol";
...@@ -23,7 +23,7 @@ contract BurnableToken is BasicToken { ...@@ -23,7 +23,7 @@ contract BurnableToken is BasicToken {
address burner = msg.sender; address burner = msg.sender;
balances[burner] = balances[burner].sub(_value); balances[burner] = balances[burner].sub(_value);
totalSupply_ = totalSupply_.sub(_value); totalSupply_ = totalSupply_.sub(_value);
Burn(burner, _value); emit Burn(burner, _value);
Transfer(burner, address(0), _value); emit Transfer(burner, address(0), _value);
} }
} }
pragma solidity ^0.4.11; pragma solidity ^0.4.21;
import "./MintableToken.sol"; import "./MintableToken.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC20.sol"; import "./ERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC20Basic.sol"; import "./ERC20Basic.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./StandardToken.sol"; import "./StandardToken.sol";
import "../../ownership/Ownable.sol"; import "../../ownership/Ownable.sol";
...@@ -31,8 +31,8 @@ contract MintableToken is StandardToken, Ownable { ...@@ -31,8 +31,8 @@ contract MintableToken is StandardToken, Ownable {
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply_ = totalSupply_.add(_amount); totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount); balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount); emit Mint(_to, _amount);
Transfer(address(0), _to, _amount); emit Transfer(address(0), _to, _amount);
return true; return true;
} }
...@@ -42,7 +42,7 @@ contract MintableToken is StandardToken, Ownable { ...@@ -42,7 +42,7 @@ contract MintableToken is StandardToken, Ownable {
*/ */
function finishMinting() onlyOwner canMint public returns (bool) { function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true; mintingFinished = true;
MintFinished(); emit MintFinished();
return true; return true;
} }
} }
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./StandardToken.sol"; import "./StandardToken.sol";
import "../../lifecycle/Pausable.sol"; import "../../lifecycle/Pausable.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC20Basic.sol"; import "./ERC20Basic.sol";
import "./ERC20.sol"; import "./ERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./BasicToken.sol"; import "./BasicToken.sol";
import "./ERC20.sol"; import "./ERC20.sol";
...@@ -30,7 +30,7 @@ contract StandardToken is ERC20, BasicToken { ...@@ -30,7 +30,7 @@ contract StandardToken is ERC20, BasicToken {
balances[_from] = balances[_from].sub(_value); balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value); balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
Transfer(_from, _to, _value); emit Transfer(_from, _to, _value);
return true; return true;
} }
...@@ -46,7 +46,7 @@ contract StandardToken is ERC20, BasicToken { ...@@ -46,7 +46,7 @@ contract StandardToken is ERC20, BasicToken {
*/ */
function approve(address _spender, uint256 _value) public returns (bool) { function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value; allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value); emit Approval(msg.sender, _spender, _value);
return true; return true;
} }
...@@ -72,7 +72,7 @@ contract StandardToken is ERC20, BasicToken { ...@@ -72,7 +72,7 @@ contract StandardToken is ERC20, BasicToken {
*/ */
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true; return true;
} }
...@@ -93,7 +93,7 @@ contract StandardToken is ERC20, BasicToken { ...@@ -93,7 +93,7 @@ contract StandardToken is ERC20, BasicToken {
} else { } else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
} }
Approval(msg.sender, _spender, allowed[msg.sender][_spender]); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true; return true;
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./SafeERC20.sol"; import "./SafeERC20.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC20Basic.sol"; import "./ERC20Basic.sol";
import "./SafeERC20.sol"; import "./SafeERC20.sol";
...@@ -72,7 +72,7 @@ contract TokenVesting is Ownable { ...@@ -72,7 +72,7 @@ contract TokenVesting is Ownable {
token.safeTransfer(beneficiary, unreleased); token.safeTransfer(beneficiary, unreleased);
Released(unreleased); emit Released(unreleased);
} }
/** /**
...@@ -93,7 +93,7 @@ contract TokenVesting is Ownable { ...@@ -93,7 +93,7 @@ contract TokenVesting is Ownable {
token.safeTransfer(owner, refund); token.safeTransfer(owner, refund);
Revoked(); emit Revoked();
} }
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC721.sol"; import "./ERC721.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC721Basic.sol"; import "./ERC721Basic.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC721Basic.sol"; import "./ERC721Basic.sol";
import "./ERC721Receiver.sol"; import "./ERC721Receiver.sol";
...@@ -94,7 +94,7 @@ contract ERC721BasicToken is ERC721Basic { ...@@ -94,7 +94,7 @@ contract ERC721BasicToken is ERC721Basic {
if (getApproved(_tokenId) != address(0) || _to != address(0)) { if (getApproved(_tokenId) != address(0) || _to != address(0)) {
tokenApprovals[_tokenId] = _to; tokenApprovals[_tokenId] = _to;
Approval(owner, _to, _tokenId); emit Approval(owner, _to, _tokenId);
} }
} }
...@@ -116,7 +116,7 @@ contract ERC721BasicToken is ERC721Basic { ...@@ -116,7 +116,7 @@ contract ERC721BasicToken is ERC721Basic {
function setApprovalForAll(address _to, bool _approved) public { function setApprovalForAll(address _to, bool _approved) public {
require(_to != msg.sender); require(_to != msg.sender);
operatorApprovals[msg.sender][_to] = _approved; operatorApprovals[msg.sender][_to] = _approved;
ApprovalForAll(msg.sender, _to, _approved); emit ApprovalForAll(msg.sender, _to, _approved);
} }
/** /**
...@@ -145,7 +145,7 @@ contract ERC721BasicToken is ERC721Basic { ...@@ -145,7 +145,7 @@ contract ERC721BasicToken is ERC721Basic {
removeTokenFrom(_from, _tokenId); removeTokenFrom(_from, _tokenId);
addTokenTo(_to, _tokenId); addTokenTo(_to, _tokenId);
Transfer(_from, _to, _tokenId); emit Transfer(_from, _to, _tokenId);
} }
/** /**
...@@ -216,7 +216,7 @@ contract ERC721BasicToken is ERC721Basic { ...@@ -216,7 +216,7 @@ contract ERC721BasicToken is ERC721Basic {
function _mint(address _to, uint256 _tokenId) internal { function _mint(address _to, uint256 _tokenId) internal {
require(_to != address(0)); require(_to != address(0));
addTokenTo(_to, _tokenId); addTokenTo(_to, _tokenId);
Transfer(address(0), _to, _tokenId); emit Transfer(address(0), _to, _tokenId);
} }
/** /**
...@@ -227,7 +227,7 @@ contract ERC721BasicToken is ERC721Basic { ...@@ -227,7 +227,7 @@ contract ERC721BasicToken is ERC721Basic {
function _burn(address _owner, uint256 _tokenId) internal { function _burn(address _owner, uint256 _tokenId) internal {
clearApproval(_owner, _tokenId); clearApproval(_owner, _tokenId);
removeTokenFrom(_owner, _tokenId); removeTokenFrom(_owner, _tokenId);
Transfer(_owner, address(0), _tokenId); emit Transfer(_owner, address(0), _tokenId);
} }
/** /**
...@@ -240,7 +240,7 @@ contract ERC721BasicToken is ERC721Basic { ...@@ -240,7 +240,7 @@ contract ERC721BasicToken is ERC721Basic {
require(ownerOf(_tokenId) == _owner); require(ownerOf(_tokenId) == _owner);
if (tokenApprovals[_tokenId] != address(0)) { if (tokenApprovals[_tokenId] != address(0)) {
tokenApprovals[_tokenId] = address(0); tokenApprovals[_tokenId] = address(0);
Approval(_owner, address(0), _tokenId); emit Approval(_owner, address(0), _tokenId);
} }
} }
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC721Receiver.sol"; import "./ERC721Receiver.sol";
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
/** /**
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "./ERC721.sol"; import "./ERC721.sol";
import "./ERC721BasicToken.sol"; import "./ERC721BasicToken.sol";
......
pragma solidity ^0.4.13; pragma solidity ^0.4.21;
import "../ERC20/ERC20.sol"; import "../ERC20/ERC20.sol";
......
pragma solidity ^0.4.13; pragma solidity ^0.4.21;
import "./ERC827.sol"; import "./ERC827.sol";
import "../ERC20/StandardToken.sol"; import "../ERC20/StandardToken.sol";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -47,13 +47,13 @@ ...@@ -47,13 +47,13 @@
"eslint-plugin-node": "^5.2.1", "eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0", "eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1", "eslint-plugin-standard": "^3.0.1",
"ethereumjs-testrpc": "^6.0.1",
"ethereumjs-util": "^5.1.2", "ethereumjs-util": "^5.1.2",
"ethjs-abi": "^0.2.1", "ethjs-abi": "^0.2.1",
"ganache-cli": "6.1.0",
"mocha-lcov-reporter": "^1.3.0", "mocha-lcov-reporter": "^1.3.0",
"solidity-coverage": "^0.4.3", "solidity-coverage": "^0.4.15",
"solium": "^1.1.2", "solium": "^1.1.6",
"truffle": "^4.0.0", "truffle": "^4.1.5",
"truffle-hdwallet-provider": "0.0.3" "truffle-hdwallet-provider": "0.0.3"
}, },
"dependencies": { "dependencies": {
......
...@@ -7,23 +7,23 @@ set -o errexit ...@@ -7,23 +7,23 @@ set -o errexit
trap cleanup EXIT trap cleanup EXIT
cleanup() { cleanup() {
# Kill the testrpc instance that we started (if we started one and if it's still running). # Kill the ganache instance that we started (if we started one and if it's still running).
if [ -n "$testrpc_pid" ] && ps -p $testrpc_pid > /dev/null; then if [ -n "$ganache_pid" ] && ps -p $ganache_pid > /dev/null; then
kill -9 $testrpc_pid kill -9 $ganache_pid
fi fi
} }
if [ "$SOLIDITY_COVERAGE" = true ]; then if [ "$SOLIDITY_COVERAGE" = true ]; then
testrpc_port=8555 ganache_port=8555
else else
testrpc_port=8545 ganache_port=8545
fi fi
testrpc_running() { ganache_running() {
nc -z localhost "$testrpc_port" nc -z localhost "$ganache_port"
} }
start_testrpc() { start_ganache() {
# We define 10 accounts with balance 1M ether, needed for high-value tests. # We define 10 accounts with balance 1M ether, needed for high-value tests.
local accounts=( local accounts=(
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,1000000000000000000000000" --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,1000000000000000000000000"
...@@ -39,19 +39,19 @@ start_testrpc() { ...@@ -39,19 +39,19 @@ start_testrpc() {
) )
if [ "$SOLIDITY_COVERAGE" = true ]; then if [ "$SOLIDITY_COVERAGE" = true ]; then
node_modules/.bin/testrpc-sc --gasLimit 0xfffffffffff --port "$testrpc_port" "${accounts[@]}" > /dev/null & node_modules/.bin/testrpc-sc --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
else else
node_modules/.bin/testrpc --gasLimit 0xfffffffffff "${accounts[@]}" > /dev/null & node_modules/.bin/ganache-cli --gasLimit 0xfffffffffff "${accounts[@]}" > /dev/null &
fi fi
testrpc_pid=$! ganache_pid=$!
} }
if testrpc_running; then if ganache_running; then
echo "Using existing testrpc instance" echo "Using existing ganache instance"
else else
echo "Starting our own testrpc instance" echo "Starting our own ganache instance"
start_testrpc start_ganache
fi fi
if [ "$SOLIDITY_COVERAGE" = true ]; then if [ "$SOLIDITY_COVERAGE" = true ]; then
......
...@@ -17,7 +17,7 @@ contract('FinalizableCrowdsale', function ([_, owner, wallet, thirdparty]) { ...@@ -17,7 +17,7 @@ contract('FinalizableCrowdsale', function ([_, owner, wallet, thirdparty]) {
const rate = new BigNumber(1000); const rate = new BigNumber(1000);
before(async function () { before(async function () {
// Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
await advanceBlock(); await advanceBlock();
}); });
......
...@@ -20,7 +20,7 @@ contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) { ...@@ -20,7 +20,7 @@ contract('PostDeliveryCrowdsale', function ([_, investor, wallet, purchaser]) {
const tokenSupply = new BigNumber('1e22'); const tokenSupply = new BigNumber('1e22');
before(async function () { before(async function () {
// Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
await advanceBlock(); await advanceBlock();
}); });
......
...@@ -21,7 +21,7 @@ contract('RefundableCrowdsale', function ([_, owner, wallet, investor, purchaser ...@@ -21,7 +21,7 @@ contract('RefundableCrowdsale', function ([_, owner, wallet, investor, purchaser
const tokenSupply = new BigNumber('1e22'); const tokenSupply = new BigNumber('1e22');
before(async function () { before(async function () {
// Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
await advanceBlock(); await advanceBlock();
}); });
......
...@@ -20,7 +20,7 @@ contract('TimedCrowdsale', function ([_, investor, wallet, purchaser]) { ...@@ -20,7 +20,7 @@ contract('TimedCrowdsale', function ([_, investor, wallet, purchaser]) {
const tokenSupply = new BigNumber('1e22'); const tokenSupply = new BigNumber('1e22');
before(async function () { before(async function () {
// Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
await advanceBlock(); await advanceBlock();
}); });
......
...@@ -21,7 +21,7 @@ contract('SampleCrowdsale', function ([owner, wallet, investor]) { ...@@ -21,7 +21,7 @@ contract('SampleCrowdsale', function ([owner, wallet, investor]) {
const CAP = ether(20); const CAP = ether(20);
before(async function () { before(async function () {
// Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
await advanceBlock(); await advanceBlock();
}); });
......
...@@ -8,7 +8,7 @@ export default async promise => { ...@@ -8,7 +8,7 @@ export default async promise => {
// TODO: When we contract A calls contract B, and B throws, instead // TODO: When we contract A calls contract B, and B throws, instead
// of an 'invalid jump', we get an 'out of gas' error. How do // of an 'invalid jump', we get an 'out of gas' error. How do
// we distinguish this from an actual out of gas event? (The // we distinguish this from an actual out of gas event? (The
// testrpc log actually show an 'invalid jump' event.) // ganache log actually show an 'invalid jump' event.)
const outOfGas = error.message.search('out of gas') >= 0; const outOfGas = error.message.search('out of gas') >= 0;
const revert = error.message.search('revert') >= 0; const revert = error.message.search('revert') >= 0;
assert( assert(
......
import utils from 'ethereumjs-util'; import utils from 'ethereumjs-util';
// Hash and add same prefix to the hash that testrpc use. // Hash and add same prefix to the hash that ganache use.
module.exports = function (message) { module.exports = function (message) {
const messageHex = Buffer.from(utils.sha3(message).toString('hex'), 'hex'); const messageHex = Buffer.from(utils.sha3(message).toString('hex'), 'hex');
const prefix = utils.toBuffer('\u0019Ethereum Signed Message:\n' + messageHex.length.toString()); const prefix = utils.toBuffer('\u0019Ethereum Signed Message:\n' + messageHex.length.toString());
......
import latestTime from './latestTime'; import latestTime from './latestTime';
// Increases testrpc time by the passed duration in seconds // Increases ganache time by the passed duration in seconds
export default function increaseTime (duration) { export default function increaseTime (duration) {
const id = Date.now(); const id = Date.now();
...@@ -25,7 +25,7 @@ export default function increaseTime (duration) { ...@@ -25,7 +25,7 @@ export default function increaseTime (duration) {
} }
/** /**
* Beware that due to the need of calling two separate testrpc methods and rpc calls overhead * Beware that due to the need of calling two separate ganache methods and rpc calls overhead
* it's hard to increase time precisely to a target point so design your test to tolerate * it's hard to increase time precisely to a target point so design your test to tolerate
* small fluctuations from time to time. * small fluctuations from time to time.
* *
......
...@@ -11,7 +11,7 @@ contract('ECRecovery', function (accounts) { ...@@ -11,7 +11,7 @@ contract('ECRecovery', function (accounts) {
}); });
it('recover v0', async function () { it('recover v0', async function () {
// Signature generated outside testrpc with method web3.eth.sign(signer, message) // Signature generated outside ganache with method web3.eth.sign(signer, message)
let signer = '0x2cc1166f6212628a0deef2b33befb2187d35b86c'; let signer = '0x2cc1166f6212628a0deef2b33befb2187d35b86c';
let message = web3.sha3(TEST_MESSAGE); let message = web3.sha3(TEST_MESSAGE);
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
...@@ -21,7 +21,7 @@ contract('ECRecovery', function (accounts) { ...@@ -21,7 +21,7 @@ contract('ECRecovery', function (accounts) {
}); });
it('recover v1', async function () { it('recover v1', async function () {
// Signature generated outside testrpc with method web3.eth.sign(signer, message) // Signature generated outside ganache with method web3.eth.sign(signer, message)
let signer = '0x1e318623ab09fe6de3c9b8672098464aeda9100e'; let signer = '0x1e318623ab09fe6de3c9b8672098464aeda9100e';
let message = web3.sha3(TEST_MESSAGE); let message = web3.sha3(TEST_MESSAGE);
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
import MerkleTree from '../helpers/merkleTree.js'; import MerkleTree from '../helpers/merkleTree.js';
import { sha3, bufferToHex } from 'ethereumjs-util'; import { sha3, bufferToHex } from 'ethereumjs-util';
var MerkleProof = artifacts.require('MerkleProof'); var MerkleProofWrapper = artifacts.require('MerkleProofWrapper');
contract('MerkleProof', function (accounts) { contract('MerkleProof', function (accounts) {
let merkleProof; let merkleProof;
before(async function () { before(async function () {
merkleProof = await MerkleProof.new(); merkleProof = await MerkleProofWrapper.new();
}); });
describe('verifyProof', function () { describe('verifyProof', function () {
......
pragma solidity ^0.4.18; pragma solidity ^0.4.21;
import "../../contracts/math/Math.sol"; import "../../contracts/math/Math.sol";
......
...@@ -34,14 +34,9 @@ module.exports = { ...@@ -34,14 +34,9 @@ module.exports = {
gas: 0xfffffffffff, gas: 0xfffffffffff,
gasPrice: 0x01, gasPrice: 0x01,
}, },
testrpc: {
host: 'localhost',
port: 8545,
network_id: '*', // eslint-disable-line camelcase
},
ganache: { ganache: {
host: 'localhost', host: 'localhost',
port: 7545, port: 8545,
network_id: '*', // eslint-disable-line camelcase network_id: '*', // eslint-disable-line camelcase
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment