Skip to content

Commit

Permalink
remove constructors from Crowdsales
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Sep 28, 2018
1 parent 693907d commit 621d4b3
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 55 deletions.
3 changes: 0 additions & 3 deletions contracts/crowdsale/Crowdsale.sol
Expand Up @@ -51,9 +51,6 @@ contract Crowdsale is Initializable {
uint256 amount
);

constructor(uint256 rate, address wallet, IERC20 token) public {
}

/**
* @param rate Number of token units a buyer gets per wei
* @dev The rate is the conversion between wei and the smallest and indivisible
Expand Down
3 changes: 0 additions & 3 deletions contracts/crowdsale/distribution/RefundableCrowdsale.sol
Expand Up @@ -21,9 +21,6 @@ contract RefundableCrowdsale is Initializable, FinalizableCrowdsale {
// refund escrow used to hold funds while crowdsale is running
RefundEscrow private _escrow;

constructor(uint256 goal) public {
}

/**
* @dev Constructor, creates RefundEscrow.
* @param goal Funding goal
Expand Down
3 changes: 0 additions & 3 deletions contracts/crowdsale/emission/AllowanceCrowdsale.sol
Expand Up @@ -17,9 +17,6 @@ contract AllowanceCrowdsale is Initializable, Crowdsale {

address private _tokenWallet;

constructor(address tokenWallet) public {
}

/**
* @dev Constructor, takes token wallet address.
* @param tokenWallet Address holding the tokens, which has approved allowance to the crowdsale
Expand Down
3 changes: 0 additions & 3 deletions contracts/crowdsale/price/IncreasingPriceCrowdsale.sol
Expand Up @@ -17,9 +17,6 @@ contract IncreasingPriceCrowdsale is Initializable, TimedCrowdsale {
uint256 private _initialRate;
uint256 private _finalRate;

constructor(uint256 initialRate, uint256 finalRate) public {
}

/**
* @dev Constructor, takes initial and final rates of tokens received per wei contributed.
* @param initialRate Number of tokens a buyer gets per wei at the start of the crowdsale
Expand Down
3 changes: 0 additions & 3 deletions contracts/crowdsale/validation/CappedCrowdsale.sol
Expand Up @@ -14,9 +14,6 @@ contract CappedCrowdsale is Initializable, Crowdsale {

uint256 private _cap;

constructor(uint256 cap) public {
}

/**
* @dev Constructor, takes maximum amount of wei accepted in the crowdsale.
* @param cap Max amount of wei to be contributed
Expand Down
3 changes: 0 additions & 3 deletions contracts/crowdsale/validation/TimedCrowdsale.sol
Expand Up @@ -23,9 +23,6 @@ contract TimedCrowdsale is Initializable, Crowdsale {
_;
}

constructor(uint256 openingTime, uint256 closingTime) public {
}

/**
* @dev Constructor, takes crowdsale opening and closing times.
* @param openingTime Crowdsale opening time
Expand Down
17 changes: 0 additions & 17 deletions contracts/examples/SampleCrowdsale.sol
Expand Up @@ -46,23 +46,6 @@ contract SampleCrowdsaleToken is Initializable, ERC20Mintable {
// solium-disable-next-line max-len
contract SampleCrowdsale is Initializable, Crowdsale, CappedCrowdsale, RefundableCrowdsale, MintedCrowdsale {

constructor(
uint256 openingTime,
uint256 closingTime,
uint256 rate,
address wallet,
uint256 cap,
ERC20Mintable token,
uint256 goal
)
public
Crowdsale(rate, wallet, token)
CappedCrowdsale(cap)
TimedCrowdsale(openingTime, closingTime)
RefundableCrowdsale(goal)
{
}

function initialize(
uint256 openingTime,
uint256 closingTime,
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/AllowanceCrowdsaleImpl.sol
Expand Up @@ -14,8 +14,6 @@ contract AllowanceCrowdsaleImpl is Initializable, Crowdsale, AllowanceCrowdsale
address tokenWallet
)
public
Crowdsale(rate, wallet, token)
AllowanceCrowdsale(tokenWallet)
{
Crowdsale.initialize(rate, wallet, token);
AllowanceCrowdsale.initialize(tokenWallet);
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/CappedCrowdsaleImpl.sol
Expand Up @@ -14,8 +14,6 @@ contract CappedCrowdsaleImpl is Initializable, Crowdsale, CappedCrowdsale {
uint256 cap
)
public
Crowdsale(rate, wallet, token)
CappedCrowdsale(cap)
{
Crowdsale.initialize(rate, wallet, token);
CappedCrowdsale.initialize(cap);
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/CrowdsaleMock.sol
Expand Up @@ -5,7 +5,7 @@ import "../crowdsale/Crowdsale.sol";


contract CrowdsaleMock is Initializable, Crowdsale {
constructor(uint256 rate, address wallet, IERC20 token) public Crowdsale(rate, wallet, token) {
constructor(uint256 rate, address wallet, IERC20 token) public {
Crowdsale.initialize(rate, wallet, token);
}
}
2 changes: 0 additions & 2 deletions contracts/mocks/FinalizableCrowdsaleImpl.sol
Expand Up @@ -15,8 +15,6 @@ contract FinalizableCrowdsaleImpl is Initializable, Crowdsale, TimedCrowdsale, F
IERC20 token
)
public
Crowdsale(rate, wallet, token)
TimedCrowdsale(openingTime, closingTime)
{
Crowdsale.initialize(rate, wallet, token);
TimedCrowdsale.initialize(openingTime, closingTime);
Expand Down
3 changes: 0 additions & 3 deletions contracts/mocks/IncreasingPriceCrowdsaleImpl.sol
Expand Up @@ -16,9 +16,6 @@ contract IncreasingPriceCrowdsaleImpl is Initializable, IncreasingPriceCrowdsale
uint256 finalRate
)
public
Crowdsale(initialRate, wallet, token)
TimedCrowdsale(openingTime, closingTime)
IncreasingPriceCrowdsale(initialRate, finalRate)
{
Crowdsale.initialize(initialRate, wallet, token);
TimedCrowdsale.initialize(openingTime, closingTime);
Expand Down
1 change: 0 additions & 1 deletion contracts/mocks/IndividuallyCappedCrowdsaleImpl.sol
Expand Up @@ -15,7 +15,6 @@ contract IndividuallyCappedCrowdsaleImpl
IERC20 token
)
public
Crowdsale(rate, wallet, token)
{
Crowdsale.initialize(rate, wallet, token);
IndividuallyCappedCrowdsale.initialize();
Expand Down
1 change: 0 additions & 1 deletion contracts/mocks/MintedCrowdsaleImpl.sol
Expand Up @@ -13,7 +13,6 @@ contract MintedCrowdsaleImpl is Initializable, MintedCrowdsale {
ERC20Mintable token
)
public
Crowdsale(rate, wallet, token)
{
Crowdsale.initialize(rate, wallet, token);
}
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/PostDeliveryCrowdsaleImpl.sol
Expand Up @@ -15,8 +15,6 @@ contract PostDeliveryCrowdsaleImpl is Initializable, Crowdsale, TimedCrowdsale,
IERC20 token
)
public
TimedCrowdsale(openingTime, closingTime)
Crowdsale(rate, wallet, token)
{
Crowdsale.initialize(rate, wallet, token);
TimedCrowdsale.initialize(openingTime, closingTime);
Expand Down
3 changes: 0 additions & 3 deletions contracts/mocks/RefundableCrowdsaleImpl.sol
Expand Up @@ -16,9 +16,6 @@ contract RefundableCrowdsaleImpl is Initializable, Crowdsale, TimedCrowdsale, Re
uint256 goal
)
public
Crowdsale(rate, wallet, token)
TimedCrowdsale(openingTime, closingTime)
RefundableCrowdsale(goal)
{
Crowdsale.initialize(rate, wallet, token);
TimedCrowdsale.initialize(openingTime, closingTime);
Expand Down
1 change: 0 additions & 1 deletion contracts/mocks/SampleCrowdsaleMock.sol
Expand Up @@ -21,7 +21,6 @@ contract SampleCrowdsaleMock is Initializable, SampleCrowdsale {
uint256 goal
)
public
SampleCrowdsale(openingTime, closingTime, rate, wallet, cap, token, goal)
{
SampleCrowdsale.initialize(openingTime, closingTime, rate, wallet, cap, token, goal);
}
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/TimedCrowdsaleImpl.sol
Expand Up @@ -15,8 +15,6 @@ contract TimedCrowdsaleImpl is Initializable, Crowdsale, TimedCrowdsale {
IERC20 token
)
public
Crowdsale(rate, wallet, token)
TimedCrowdsale(openingTime, closingTime)
{
Crowdsale.initialize(rate, wallet, token);
TimedCrowdsale.initialize(openingTime, closingTime);
Expand Down

0 comments on commit 621d4b3

Please sign in to comment.