Permalink
Browse files

no longer burn remaining tokens

  • Loading branch information...
conejoninja committed Jun 8, 2018
1 parent 2a635f6 commit 4e7d632d82ab456749a8fdeea219076fe015d805
Showing with 18 additions and 3 deletions.
  1. +10 −0 contracts/Escrow.sol
  2. +8 −3 contracts/ICO.sol
@@ -41,6 +41,16 @@ contract Escrow is System, HardcodedWallets {
deposited[walletBountyProgram] = totalSupply.mul(1).div(100);
}

function deposit(uint256 _amount) public returns (bool) {
// only ICO could deposit
if (msg.sender != addressSCICO) {
error('Escrow: not allowed to deposit');
return false;
}
deposited[this] = deposited[this].add(_amount);
return true;
}

/**
* @notice Withdraw funds from the tokens contract
*/
@@ -236,9 +236,14 @@ contract ICO is HardcodedWallets, Haltable {
}
}

// Move remaining ICO tokens to 0x0 as a burn operation
if (!SCTokens.transfer(0x0, SCTokens.balanceOf(this))) {
error('finalize: unable to burn remaining ICO tokens');
// Move remaining ICO tokens back to the Escrow
if (!SCTokens.transfer(address(SCEscrow), SCTokens.balanceOf(this))) {
error('finalize: unable to return remaining ICO tokens');
return false;
}
// Adjust Escrow balance correctly
if(!SCEscrow.deposit(SCTokens.balanceOf(this))) {
error('finalize: unable to return remaining ICO tokens');
return false;
}

0 comments on commit 4e7d632

Please sign in to comment.