Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Truffle 4.1.5 and Ganache 6.1.0 #876

Merged
merged 13 commits into from
Apr 9, 2018
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Next, we need to know what your environment looks like.

- 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!

## πŸ“ Details
Expand Down
2 changes: 1 addition & 1 deletion contracts/AddressUtils.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/Bounty.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "./payment/PullPayment.sol";
Expand Down Expand Up @@ -30,7 +30,7 @@ contract Bounty is PullPayment, Destructible {
function createTarget() public returns(Target) {
Target target = Target(deployContract());
researchers[target] = msg.sender;
TargetCreated(target);
emit TargetCreated(target);
return target;
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/DayLimit.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/ECRecovery.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/LimitBalance.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/MerkleProof.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/*
Expand All @@ -14,7 +14,7 @@ library MerkleProof {
* @param _root Merkle root
* @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;

for (uint256 i = 0; i < _proof.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/ReentrancyGuard.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/crowdsale/Crowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/ERC20.sol";
import "../math/SafeMath.sol";
Expand Down Expand Up @@ -82,7 +82,7 @@ contract Crowdsale {
weiRaised = weiRaised.add(weiAmount);

_processPurchase(_beneficiary, tokens);
TokenPurchase(msg.sender, _beneficiary, weiAmount, tokens);
emit TokenPurchase(msg.sender, _beneficiary, weiAmount, tokens);

_updatePurchasingState(_beneficiary, weiAmount);

Expand Down
4 changes: 2 additions & 2 deletions contracts/crowdsale/distribution/FinalizableCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../math/SafeMath.sol";
import "../../ownership/Ownable.sol";
Expand Down Expand Up @@ -26,7 +26,7 @@ contract FinalizableCrowdsale is TimedCrowdsale, Ownable {
require(hasClosed());

finalization();
Finalized();
emit Finalized();

isFinalized = true;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../validation/TimedCrowdsale.sol";
import "../../token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/distribution/RefundableCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "../../math/SafeMath.sol";
Expand Down
8 changes: 4 additions & 4 deletions contracts/crowdsale/distribution/utils/RefundVault.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../../math/SafeMath.sol";
import "../../../ownership/Ownable.sol";
Expand Down Expand Up @@ -43,14 +43,14 @@ contract RefundVault is Ownable {
function close() onlyOwner public {
require(state == State.Active);
state = State.Closed;
Closed();
emit Closed();
wallet.transfer(this.balance);
}

function enableRefunds() onlyOwner public {
require(state == State.Active);
state = State.Refunding;
RefundsEnabled();
emit RefundsEnabled();
}

/**
Expand All @@ -61,6 +61,6 @@ contract RefundVault is Ownable {
uint256 depositedValue = deposited[investor];
deposited[investor] = 0;
investor.transfer(depositedValue);
Refunded(investor, depositedValue);
emit Refunded(investor, depositedValue);
}
}
2 changes: 1 addition & 1 deletion contracts/crowdsale/emission/AllowanceCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../Crowdsale.sol";
import "../../token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/emission/MintedCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../Crowdsale.sol";
import "../../token/ERC20/MintableToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/price/IncreasingPriceCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../validation/TimedCrowdsale.sol";
import "../../math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/validation/CappedCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/validation/TimedCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/validation/WhitelistedCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../Crowdsale.sol";
import "../../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/SampleCrowdsale.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../crowdsale/validation/CappedCrowdsale.sol";
import "../crowdsale/distribution/RefundableCrowdsale.sol";
Expand Down
8 changes: 4 additions & 4 deletions contracts/examples/SimpleSavingsWallet.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.11;
pragma solidity ^0.4.21;

import "../ownership/Heritable.sol";

Expand All @@ -20,12 +20,12 @@ contract SimpleSavingsWallet is Heritable {


function SimpleSavingsWallet(uint256 _heartbeatTimeout) Heritable(_heartbeatTimeout) public {}

/**
* @dev wallet can receive funds.
*/
function () public payable {
Received(msg.sender, msg.value, this.balance);
emit Received(msg.sender, msg.value, this.balance);
}

/**
Expand All @@ -35,6 +35,6 @@ contract SimpleSavingsWallet is Heritable {
require(payee != 0 && payee != address(this));
require(amount > 0);
payee.transfer(amount);
Sent(payee, amount, this.balance);
emit Sent(payee, amount, this.balance);
}
}
4 changes: 2 additions & 2 deletions contracts/examples/SimpleToken.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "../token/ERC20/StandardToken.sol";
Expand All @@ -24,7 +24,7 @@ contract SimpleToken is StandardToken {
function SimpleToken() public {
totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
Transfer(0x0, msg.sender, INITIAL_SUPPLY);
emit Transfer(0x0, msg.sender, INITIAL_SUPPLY);
}

}
2 changes: 1 addition & 1 deletion contracts/lifecycle/Destructible.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/lifecycle/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../ownership/Ownable.sol";

Expand Down
6 changes: 3 additions & 3 deletions contracts/lifecycle/Pausable.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "../ownership/Ownable.sol";
Expand Down Expand Up @@ -36,14 +36,14 @@ contract Pausable is Ownable {
*/
function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
emit Pause();
}

/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
emit Unpause();
}
}
2 changes: 1 addition & 1 deletion contracts/lifecycle/TokenDestructible.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../ownership/Ownable.sol";
import "../token/ERC20/ERC20Basic.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/Math.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/SafeMath.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/AllowanceCrowdsaleImpl.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/ERC20.sol";
import "../crowdsale/emission/AllowanceCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/BasicTokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "../token/ERC20/BasicToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/BurnableTokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/BurnableToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/CappedCrowdsaleImpl.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/CappedCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/DayLimitMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../contracts/DayLimit.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/DetailedERC20Mock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/StandardToken.sol";
import "../token/ERC20/DetailedERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ECRecoveryMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


import "../ECRecovery.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC223TokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/BasicToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC721BasicTokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC721/ERC721BasicToken.sol";

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC721ReceiverMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC721/ERC721Receiver.sol";

Expand All @@ -16,7 +16,7 @@ contract ERC721ReceiverMock is ERC721Receiver {

function onERC721Received(address _address, uint256 _tokenId, bytes _data) public returns(bytes4) {
require(!reverts);
Received(_address, _tokenId, _data, msg.gas);
emit Received(_address, _tokenId, _data, msg.gas);
return retval;
}
}
2 changes: 1 addition & 1 deletion contracts/mocks/ERC721TokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC721/ERC721Token.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC827TokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.13;
pragma solidity ^0.4.21;


import "../token/ERC827/ERC827Token.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/FinalizableCrowdsaleImpl.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/MintableToken.sol";
import "../crowdsale/distribution/FinalizableCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ForceEther.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;


// @title Force Ether into a contract.
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/HasNoEtherTest.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../../contracts/ownership/HasNoEther.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/IncreasingPriceCrowdsaleImpl.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../crowdsale/price/IncreasingPriceCrowdsale.sol";
import "../math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/IndividuallyCappedCrowdsaleImpl.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.4.21;

import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/IndividuallyCappedCrowdsale.sol";
Expand Down
Loading