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

Make contracts 4.24 compatible #951

Merged
merged 2 commits into from Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/AddressUtils.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/Bounty.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "./payment/PullPayment.sol";
Expand Down
5 changes: 2 additions & 3 deletions contracts/ECRecovery.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down Expand Up @@ -69,8 +69,7 @@ library ECRecovery {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(
"\x19Ethereum Signed Message:\n32",
hash
abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
);
}
}
2 changes: 1 addition & 1 deletion contracts/LimitBalance.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down
6 changes: 3 additions & 3 deletions contracts/MerkleProof.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/*
Expand Down Expand Up @@ -30,10 +30,10 @@ library MerkleProof {

if (computedHash < proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(computedHash, proofElement);
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(proofElement, computedHash);
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/ReentrancyGuard.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down
10 changes: 5 additions & 5 deletions contracts/access/SignatureBouncer.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../ownership/Ownable.sol";
import "../ownership/rbac/RBAC.sol";
Expand All @@ -16,7 +16,7 @@ import "../ECRecovery.sol";
* @dev
* @dev This technique is useful for whitelists and airdrops; instead of putting all
* @dev valid addresses on-chain, simply sign a grant of the form
* @dev keccak256(`:contractAddress` + `:granteeAddress`) using a valid bouncer address.
* @dev keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a valid bouncer address.
* @dev Then restrict access to your crowdsale/whitelist/airdrop using the
* @dev `onlyValidSignature` modifier (or implement your own using isValidSignature).
* @dev
Expand Down Expand Up @@ -99,7 +99,7 @@ contract SignatureBouncer is Ownable, RBAC {
returns (bool)
{
return isValidDataHash(
keccak256(address(this), _address),
keccak256(abi.encodePacked(address(this), _address)),
_sig
);
}
Expand All @@ -118,7 +118,7 @@ contract SignatureBouncer is Ownable, RBAC {
data[i] = msg.data[i];
}
return isValidDataHash(
keccak256(address(this), _address, data),
keccak256(abi.encodePacked(address(this), _address, data)),
_sig
);
}
Expand All @@ -139,7 +139,7 @@ contract SignatureBouncer is Ownable, RBAC {
data[i] = msg.data[i];
}
return isValidDataHash(
keccak256(address(this), _address, data),
keccak256(abi.encodePacked(address(this), _address, data)),
_sig
);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/Whitelist.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/Crowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/ERC20.sol";
import "../math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/distribution/FinalizableCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../../math/SafeMath.sol";
import "../../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../validation/TimedCrowdsale.sol";
import "../../token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/distribution/RefundableCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../../math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/distribution/utils/RefundVault.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../../../math/SafeMath.sol";
import "../../../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/emission/AllowanceCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../Crowdsale.sol";
import "../../token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/emission/MintedCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../Crowdsale.sol";
import "../../token/ERC20/MintableToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/price/IncreasingPriceCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../validation/TimedCrowdsale.sol";
import "../../math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/validation/CappedCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
Expand Down
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/validation/TimedCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/crowdsale/validation/WhitelistedCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../Crowdsale.sol";
import "../../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/RBACWithAdmin.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../ownership/rbac/RBAC.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/SampleCrowdsale.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../crowdsale/validation/CappedCrowdsale.sol";
import "../crowdsale/distribution/RefundableCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/SimpleSavingsWallet.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/SimpleToken.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../token/ERC20/StandardToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/introspection/ERC165.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/introspection/SupportsInterfaceWithLookup.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "./ERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lifecycle/Destructible.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/lifecycle/Pausable.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../ownership/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/lifecycle/TokenDestructible.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../ownership/Ownable.sol";
import "../token/ERC20/ERC20Basic.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/Math.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/SafeMath.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/AllowanceCrowdsaleImpl.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/ERC20.sol";
import "../crowdsale/emission/AllowanceCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/BasicTokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../token/ERC20/BasicToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/BouncerMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../access/SignatureBouncer.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/BurnableTokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/CappedCrowdsaleImpl.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/CappedCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/DetailedERC20Mock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/StandardToken.sol";
import "../token/ERC20/DetailedERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ECRecoveryMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../ECRecovery.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC223TokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC721BasicTokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC721ReceiverMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC721TokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC827TokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../token/ERC827/ERC827Token.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/FinalizableCrowdsaleImpl.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/MintableToken.sol";
import "../crowdsale/distribution/FinalizableCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ForceEther.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


// @title Force Ether into a contract.
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/HasNoEtherTest.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/IncreasingPriceCrowdsaleImpl.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../crowdsale/price/IncreasingPriceCrowdsale.sol";
import "../math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/IndividuallyCappedCrowdsaleImpl.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/ERC20.sol";
import "../crowdsale/validation/IndividuallyCappedCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/InsecureTargetBounty.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import {Bounty, Target} from "../../contracts/Bounty.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/LimitBalanceMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../LimitBalance.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/MathMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../../contracts/math/Math.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/MerkleProofWrapper.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import { MerkleProof } from "../MerkleProof.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/MessageHelper.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


contract MessageHelper {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/MintedCrowdsaleImpl.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

import "../token/ERC20/MintableToken.sol";
import "../crowdsale/emission/MintedCrowdsale.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/PausableMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;


import "../lifecycle/Pausable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/PausableTokenMock.sol
@@ -1,4 +1,4 @@
pragma solidity ^0.4.23;
pragma solidity ^0.4.24;

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

Expand Down