Permalink
Browse files

lifted the limit on the number of ICO stages

  • Loading branch information...
conejoninja committed Jun 5, 2018
1 parent b541537 commit 9324d2870264ab6f29d07baea2e9c9644993fdc2
Showing with 3 additions and 3 deletions.
  1. +3 −3 contracts/escrow.sol
@@ -14,7 +14,7 @@ contract Escrow is System, HardcodedWallets {

// **** DATA
mapping (address => uint256) public deposited;
bool[3] stage;
uint256 nextStage;

// Circular reference to ICO contract
address public addressSCICO;
@@ -56,7 +56,7 @@ contract Escrow is System, HardcodedWallets {
* @notice Withdraw funds from the tokens contract
*/
function fundICO(uint256 _amount, uint8 _stage) public returns (bool) {
if(stage[_stage]) {
if(nextStage !=_stage) {
error('Escrow: ICO stage already funded');
return false;
}
@@ -72,7 +72,7 @@ contract Escrow is System, HardcodedWallets {
bool success = SCTokens.transfer(addressSCICO, _amount);
if(success) {
deposited[this] = deposited[this].sub(_amount);
stage[_stage] = true;
nextStage++;
emit FundICO(addressSCICO, _amount);
}
return success;

0 comments on commit 9324d28

Please sign in to comment.