Non-constructor initialization removed (#1403)

* signing prefix added

* Minor improvement

* Tests changed

* Successfully tested

* Minor improvements

* Minor improvements

* Revert "Dangling commas are now required. (#1359)"

This reverts commit a6889776f4.

* updates

* fixes #1391

(cherry picked from commit da67e435b1)
pull/1474/head
Aniket 6 years ago committed by Leo Arias
parent 7cd0d5a452
commit 3266de1b5c
  1. 6
      contracts/crowdsale/distribution/FinalizableCrowdsale.sol
  2. 6
      contracts/lifecycle/Pausable.sol
  3. 6
      contracts/payment/SplitPayment.sol
  4. 6
      contracts/utils/ReentrancyGuard.sol

@ -11,10 +11,14 @@ import "../validation/TimedCrowdsale.sol";
contract FinalizableCrowdsale is TimedCrowdsale { contract FinalizableCrowdsale is TimedCrowdsale {
using SafeMath for uint256; using SafeMath for uint256;
bool private _finalized = false; bool private _finalized;
event CrowdsaleFinalized(); event CrowdsaleFinalized();
constructor() public {
_finalized = false;
}
/** /**
* @return true if the crowdsale is finalized, false otherwise. * @return true if the crowdsale is finalized, false otherwise.
*/ */

@ -10,7 +10,11 @@ contract Pausable is PauserRole {
event Paused(); event Paused();
event Unpaused(); event Unpaused();
bool private _paused = false; bool private _paused;
constructor() public {
_paused = false;
}
/** /**
* @return true if the contract is paused, false otherwise. * @return true if the contract is paused, false otherwise.

@ -10,8 +10,8 @@ import "../math/SafeMath.sol";
contract SplitPayment { contract SplitPayment {
using SafeMath for uint256; using SafeMath for uint256;
uint256 private _totalShares = 0; uint256 private _totalShares;
uint256 private _totalReleased = 0; uint256 private _totalReleased;
mapping(address => uint256) private _shares; mapping(address => uint256) private _shares;
mapping(address => uint256) private _released; mapping(address => uint256) private _released;
@ -24,6 +24,8 @@ contract SplitPayment {
require(payees.length == shares.length); require(payees.length == shares.length);
require(payees.length > 0); require(payees.length > 0);
_totalShares = 0;
_totalReleased = 0;
for (uint256 i = 0; i < payees.length; i++) { for (uint256 i = 0; i < payees.length; i++) {
_addPayee(payees[i], shares[i]); _addPayee(payees[i], shares[i]);
} }

@ -9,7 +9,11 @@ pragma solidity ^0.4.24;
contract ReentrancyGuard { contract ReentrancyGuard {
/// @dev counter to allow mutex lock with only one SSTORE operation /// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter = 1; uint256 private _guardCounter;
constructor() public {
_guardCounter = 1;
}
/** /**
* @dev Prevents a contract from calling itself, directly or indirectly. * @dev Prevents a contract from calling itself, directly or indirectly.

Loading…
Cancel
Save