diff --git a/contracts/crowdsale/distribution/FinalizableCrowdsale.sol b/contracts/crowdsale/distribution/FinalizableCrowdsale.sol index 37d205c8e28..a640dca8373 100644 --- a/contracts/crowdsale/distribution/FinalizableCrowdsale.sol +++ b/contracts/crowdsale/distribution/FinalizableCrowdsale.sol @@ -11,10 +11,14 @@ import "../validation/TimedCrowdsale.sol"; contract FinalizableCrowdsale is TimedCrowdsale { using SafeMath for uint256; - bool private _finalized = false; + bool private _finalized; event CrowdsaleFinalized(); + constructor() public { + _finalized = false; + } + /** * @return true if the crowdsale is finalized, false otherwise. */ diff --git a/contracts/lifecycle/Pausable.sol b/contracts/lifecycle/Pausable.sol index 5287ecdcb27..a6cae2a5514 100644 --- a/contracts/lifecycle/Pausable.sol +++ b/contracts/lifecycle/Pausable.sol @@ -10,7 +10,11 @@ contract Pausable is PauserRole { event Paused(); event Unpaused(); - bool private _paused = false; + bool private _paused; + + constructor() public { + _paused = false; + } /** * @return true if the contract is paused, false otherwise. diff --git a/contracts/payment/SplitPayment.sol b/contracts/payment/SplitPayment.sol index 8bfcc7690c3..9c716e7addb 100644 --- a/contracts/payment/SplitPayment.sol +++ b/contracts/payment/SplitPayment.sol @@ -10,8 +10,8 @@ import "../math/SafeMath.sol"; contract SplitPayment { using SafeMath for uint256; - uint256 private _totalShares = 0; - uint256 private _totalReleased = 0; + uint256 private _totalShares; + uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; @@ -24,6 +24,8 @@ contract SplitPayment { require(payees.length == shares.length); require(payees.length > 0); + _totalShares = 0; + _totalReleased = 0; for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares[i]); } diff --git a/contracts/utils/ReentrancyGuard.sol b/contracts/utils/ReentrancyGuard.sol index 63da3a99e35..689c97205d3 100644 --- a/contracts/utils/ReentrancyGuard.sol +++ b/contracts/utils/ReentrancyGuard.sol @@ -9,7 +9,11 @@ pragma solidity ^0.4.24; contract ReentrancyGuard { /// @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.