aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/zeppelin/crowdsale
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-07-02 17:14:28 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-07-03 00:58:44 +0800
commit9d23fd80130ca1d020cf3ba494751fd5e3aa5fde (patch)
treec392fe25bfc32af41f69744309df9b541953a002 /test/compilationTests/zeppelin/crowdsale
parent469dc7bbe72c3ac1c32d46a233e4bf0b36451c22 (diff)
downloaddexon-solidity-9d23fd80130ca1d020cf3ba494751fd5e3aa5fde.tar.gz
dexon-solidity-9d23fd80130ca1d020cf3ba494751fd5e3aa5fde.tar.zst
dexon-solidity-9d23fd80130ca1d020cf3ba494751fd5e3aa5fde.zip
Update compilation tests.
Diffstat (limited to 'test/compilationTests/zeppelin/crowdsale')
-rw-r--r--test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol4
-rw-r--r--test/compilationTests/zeppelin/crowdsale/Crowdsale.sol4
-rw-r--r--test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol2
3 files changed, 5 insertions, 5 deletions
diff --git a/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol
index afae79b7..d4066812 100644
--- a/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol
@@ -18,14 +18,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/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol
index d798f41d..1f148a74 100644
--- a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol
@@ -92,7 +92,7 @@ contract Crowdsale {
}
// @return true if the transaction can buy tokens
- function validPurchase() internal constant returns (bool) {
+ function validPurchase() internal view returns (bool) {
uint256 current = block.number;
bool withinPeriod = current >= startBlock && current <= endBlock;
bool nonZeroPurchase = msg.value != 0;
@@ -100,7 +100,7 @@ contract Crowdsale {
}
// @return true if crowdsale event has ended
- function hasEnded() public constant returns (bool) {
+ function hasEnded() public view returns (bool) {
return block.number > endBlock;
}
diff --git a/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol
index 5e798d45..bb6b5e17 100644
--- a/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol
@@ -52,7 +52,7 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
super.finalization();
}
- function goalReached() public constant returns (bool) {
+ function goalReached() public view returns (bool) {
return weiRaised >= goal;
}