aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/zeppelin/crowdsale
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-07-05 01:20:51 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-05 01:20:51 +0800
commitfebbfd4204f72ea9371553dc3f2e349309b1bb0c (patch)
treef0543d5cb7948a13a555e9695a41b7f1053d798f /test/compilationTests/zeppelin/crowdsale
parent7101a8905656d52cf9023a2e4340219d184920c3 (diff)
downloaddexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.tar
dexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.tar.gz
dexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.tar.bz2
dexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.tar.lz
dexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.tar.xz
dexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.tar.zst
dexon-solidity-febbfd4204f72ea9371553dc3f2e349309b1bb0c.zip
Adds visibility to compilation tests.
Diffstat (limited to 'test/compilationTests/zeppelin/crowdsale')
-rw-r--r--test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol2
-rw-r--r--test/compilationTests/zeppelin/crowdsale/Crowdsale.sol12
-rw-r--r--test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol2
-rw-r--r--test/compilationTests/zeppelin/crowdsale/RefundVault.sol10
-rw-r--r--test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol4
5 files changed, 15 insertions, 15 deletions
diff --git a/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol
index d4066812..98c8c3d4 100644
--- a/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/CappedCrowdsale.sol
@@ -12,7 +12,7 @@ contract CappedCrowdsale is Crowdsale {
uint256 public cap;
- constructor(uint256 _cap) {
+ constructor(uint256 _cap) public {
cap = _cap;
}
diff --git a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol
index 1f148a74..51eeb7b8 100644
--- a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol
@@ -4,11 +4,11 @@ import '../token/MintableToken.sol';
import '../math/SafeMath.sol';
/**
- * @title Crowdsale
+ * @title Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end block, where investors can make
* token purchases and the crowdsale will assign them tokens based
- * on a token per ETH rate. Funds collected are forwarded to a wallet
+ * on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/
contract Crowdsale {
@@ -36,11 +36,11 @@ contract Crowdsale {
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
- */
+ */
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
- constructor(uint256 _startBlock, uint256 _endBlock, uint256 _rate, address _wallet) {
+ constructor(uint256 _startBlock, uint256 _endBlock, uint256 _rate, address _wallet) public {
require(_startBlock >= block.number);
require(_endBlock >= _startBlock);
require(_rate > 0);
@@ -53,7 +53,7 @@ contract Crowdsale {
wallet = _wallet;
}
- // creates the token to be sold.
+ // creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
@@ -66,7 +66,7 @@ contract Crowdsale {
}
// low level token purchase function
- function buyTokens(address beneficiary) payable {
+ function buyTokens(address beneficiary) public payable {
require(beneficiary != address(0x0));
require(validPurchase());
diff --git a/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol
index 7965a66d..da4e3b7f 100644
--- a/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol
@@ -18,7 +18,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable {
// should be called after crowdsale ends, to do
// some extra finalization work
- function finalize() onlyOwner {
+ function finalize() public onlyOwner {
require(!isFinalized);
require(hasEnded());
diff --git a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol
index 0be45ec4..19346c42 100644
--- a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol
+++ b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol
@@ -22,31 +22,31 @@ contract RefundVault is Ownable {
event RefundsEnabled();
event Refunded(address indexed beneficiary, uint256 weiAmount);
- constructor(address _wallet) {
+ constructor(address _wallet) public {
require(_wallet != address(0x0));
wallet = _wallet;
state = State.Active;
}
- function deposit(address investor) onlyOwner payable {
+ function deposit(address investor) public onlyOwner payable {
require(state == State.Active);
deposited[investor] = deposited[investor].add(msg.value);
}
- function close() onlyOwner {
+ function close() public onlyOwner {
require(state == State.Active);
state = State.Closed;
emit Closed();
wallet.transfer(this.balance);
}
- function enableRefunds() onlyOwner {
+ function enableRefunds() public onlyOwner {
require(state == State.Active);
state = State.Refunding;
emit RefundsEnabled();
}
- function refund(address investor) {
+ function refund(address investor) public {
require(state == State.Refunding);
uint256 depositedValue = deposited[investor];
deposited[investor] = 0;
diff --git a/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol
index bb6b5e17..94e3af99 100644
--- a/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol
+++ b/test/compilationTests/zeppelin/crowdsale/RefundableCrowdsale.sol
@@ -21,7 +21,7 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
// refund vault used to hold funds while crowdsale is running
RefundVault public vault;
- constructor(uint256 _goal) {
+ constructor(uint256 _goal) public {
vault = new RefundVault(wallet);
goal = _goal;
}
@@ -34,7 +34,7 @@ contract RefundableCrowdsale is FinalizableCrowdsale {
}
// if crowdsale is unsuccessful, investors can claim refunds here
- function claimRefund() {
+ function claimRefund() public {
require(isFinalized);
require(!goalReached());