Skip to content

Commit

Permalink
fix(ITO): add ByteBallWallet logic
Browse files Browse the repository at this point in the history
  • Loading branch information
natyur committed Apr 23, 2018
1 parent cbc82c3 commit 9a4a518
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions contracts/ByteBallWallet.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pragma solidity ^0.4.18;

import './ownership/Ownable.sol';

contract ByteBallWallet is Ownable {

address public target = 0x7E5f0D4070a55EbCf0a8A7D6F7abCEf96312C129;

uint public locked;

address public token;

function setToken(address _token) public onlyOwner {
token = _token;
}

function setLocked(uint _locked) public onlyOwner {
locked = _locked;
}

function setTarget(address _target) public onlyOwner {
target = _target;
}

function retreiveTokens() public {
require(now > locked);
ERC20Basic(token).transfer(target, ERC20Basic(token).balanceOf(this));
}

}
5 changes: 5 additions & 0 deletions contracts/ITO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ contract ITO is ExtendedWalletsMintTokensFeature, AssembledCommonSale {
uint public firstBonusPercent;

uint public firstBonusLimitPercent;

ByteBallWallet public bbwallet = new ByteBallWallet();

function setFirstBonusPercent(uint newFirstBonusPercent) public onlyOwner {
firstBonusPercent = newFirstBonusPercent;
Expand Down Expand Up @@ -38,6 +40,9 @@ contract ITO is ExtendedWalletsMintTokensFeature, AssembledCommonSale {

function finish() public onlyOwner {
mintExtendedTokens();
bbwallet.setToken(token);
mintTokens(address(bbwallet),5000000000000000000000000);
bbwallet.transferOwnership(owner);
token.finishMinting();
}

Expand Down

0 comments on commit 9a4a518

Please sign in to comment.