Contract 0x5683ae62bb8456da15b364730b3baaae673633e7

TxHash Block Age From To Value [TxFee]
0x7dc51c81748548fc8aea03ef784b527e091e35cbf8f9a378d79818f3136a72f440226575 days 16 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x6f504bd784a22ae55cb48e7cbb6cb299a12e19715e99f639899156666dd82a0140226555 days 16 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x0b01ad8f291e232887a7eee4ae331b8193825b2b5b224d24c578b0912e06e55d40226535 days 16 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x0eaaefd66e3722ede39b9c2ab212d8c51b510868e5e2e8c5cb928a3db5288b6c385008035 days 15 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x8df6da8d359acc0b000979930c0cde87df70ac917225f43364747f2f53c74e90385007835 days 15 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x2fafe258ef4ef343613fa05205f775fd0e0c704abf63e435d2a21f49a26c662c369483062 days 14 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x0d5a452bce4245a140c93f7db0a2d26ab8b6b682a979dd15794c767c4500a600369482862 days 14 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xe69ef69b797721a427898ad8e306c14b86f5132fa8771cbdc5381bc311c687f0369482662 days 14 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x6725525817c0468a3a2b8e1cb3cc66009caea4f4db1e455a52383860f36eb176362450374 days 19 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xa0552a8bcfa4bacc64cafe802b981d88963a28c9fa09bba9d83a45b919200c18362450174 days 19 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xf5a6dee80bc02e0321bb6be0673345806bfa2a28b796bee2d72c389b0e96df4b362449974 days 19 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xdcd55108c6a86d32dd2ef772af0533ef3492107cdc97311a7023cb6d683636f93452592104 days 16 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x1d2db5c8734ab8d2362e98467402cce2cee34fefab1996f506ec1ad153a3ca4c3452590104 days 16 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x6cc75f4a65c27e9a8987b34762385935fbd1e275a9653cd34a1b64926e6909073452588104 days 16 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x65300b704e86cf9d473125338331800d3ba4dee789e1f38f34198bb63599681c3423863109 days 15 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x4680d1c83fd425410effc5e11b08629bcec222d1ec91bc64d57feba65c8d64fc3423857109 days 15 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x63e3c30a6ee2878fa76b280844dcf5ca04d5fa3d617bb600538c18f3223ad6013423854109 days 15 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x24ff9afe678c89a4db6fae454939019dffb21c12701fe2481582f4d400490bd03406121112 days 17 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xf9b54cfdee790ff15a189e004942c9b76f45f8da6ba986744ec68f1f3c3384493330234125 days 21 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x3da3bbf9eebe4f9ae2dd7c80fe23d3a1b674e0ae4e8fc7b432bd632dd6e212cf3330232125 days 21 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xb78a5bcdf451f40299da9f0c16209c2158b84ce3a53053cdaf635f45f30826823330230125 days 21 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x764fb0785a77122b2f461d543e3b4006b9e4e8c20743272cacf135ce23a0c6293284638133 days 19 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x15a541386832a0e43af85036d4ca3ae0572cc231b07132df717dc3db070c0ba53284636133 days 19 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0x2bc9da5c8ad8bcc4196d566989f11a8adb6a696dcd810d9df72a7951b1f265423209519146 days 21 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
0xaf0a152310dc8a70d8b0afd57f48c64d383b67f4bd5478e605ab345e617e975a3209517146 days 21 hrs ago0xd4950dca429b1c42cb42d4532f90a654a65e2d2d IN  0x5683ae62bb8456da15b364730b3baaae673633e70 Ether0.001035609
[ Download CSV Export 

Latest 25 internal transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xa3315cfc96b1ac2111a6e4a71f7092a11a42a89a70b4f9092f0e3e31c799f46940269294 days 22 hrs ago0xa429c4c5564ab4c6f3bcbf928ea50ac5d84b2e1c0x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa3315cfc96b1ac2111a6e4a71f7092a11a42a89a70b4f9092f0e3e31c799f46940269294 days 22 hrs ago0xa429c4c5564ab4c6f3bcbf928ea50ac5d84b2e1c0x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa3315cfc96b1ac2111a6e4a71f7092a11a42a89a70b4f9092f0e3e31c799f46940269294 days 22 hrs ago0xa429c4c5564ab4c6f3bcbf928ea50ac5d84b2e1c0x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa3315cfc96b1ac2111a6e4a71f7092a11a42a89a70b4f9092f0e3e31c799f46940269294 days 22 hrs ago0xa429c4c5564ab4c6f3bcbf928ea50ac5d84b2e1c0x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0x7dc51c81748548fc8aea03ef784b527e091e35cbf8f9a378d79818f3136a72f440226575 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x7dc51c81748548fc8aea03ef784b527e091e35cbf8f9a378d79818f3136a72f440226575 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x7dc51c81748548fc8aea03ef784b527e091e35cbf8f9a378d79818f3136a72f440226575 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x6f504bd784a22ae55cb48e7cbb6cb299a12e19715e99f639899156666dd82a0140226555 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x6f504bd784a22ae55cb48e7cbb6cb299a12e19715e99f639899156666dd82a0140226555 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x6f504bd784a22ae55cb48e7cbb6cb299a12e19715e99f639899156666dd82a0140226555 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x0b01ad8f291e232887a7eee4ae331b8193825b2b5b224d24c578b0912e06e55d40226535 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x0b01ad8f291e232887a7eee4ae331b8193825b2b5b224d24c578b0912e06e55d40226535 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0x0b01ad8f291e232887a7eee4ae331b8193825b2b5b224d24c578b0912e06e55d40226535 days 16 hrs ago0x5683ae62bb8456da15b364730b3baaae673633e7  Contract Creation0 Ether
0xc5fae25968f9a51a4d05febf5f2fc7e347d59cb77ca3cbc72d8fba65de3cbf11393448221 days 8 mins ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xc5fae25968f9a51a4d05febf5f2fc7e347d59cb77ca3cbc72d8fba65de3cbf11393448221 days 8 mins ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xc5fae25968f9a51a4d05febf5f2fc7e347d59cb77ca3cbc72d8fba65de3cbf11393448221 days 8 mins ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xc5fae25968f9a51a4d05febf5f2fc7e347d59cb77ca3cbc72d8fba65de3cbf11393448221 days 8 mins ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa9140063e1f62e0435d60c3de8ebdb661cfca755b7cf798d6fb07629b4a8c7f4391178524 days 22 hrs ago0xf3898594876a5a110c321c367c61c29c424431990x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa9140063e1f62e0435d60c3de8ebdb661cfca755b7cf798d6fb07629b4a8c7f4391178524 days 22 hrs ago0xf3898594876a5a110c321c367c61c29c424431990x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa9140063e1f62e0435d60c3de8ebdb661cfca755b7cf798d6fb07629b4a8c7f4391178524 days 22 hrs ago0xf3898594876a5a110c321c367c61c29c424431990x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0xa9140063e1f62e0435d60c3de8ebdb661cfca755b7cf798d6fb07629b4a8c7f4391178524 days 22 hrs ago0xf3898594876a5a110c321c367c61c29c424431990x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0x24b1e8d17f49f1b153c1bd4a4edd35c2a5acfc9be9fbb0da419224295d16504f390014526 days 23 hrs ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0x24b1e8d17f49f1b153c1bd4a4edd35c2a5acfc9be9fbb0da419224295d16504f390014526 days 23 hrs ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0x24b1e8d17f49f1b153c1bd4a4edd35c2a5acfc9be9fbb0da419224295d16504f390014526 days 23 hrs ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
0x24b1e8d17f49f1b153c1bd4a4edd35c2a5acfc9be9fbb0da419224295d16504f390014526 days 23 hrs ago0xd33a4d0a81b331f03eb61b9d9c66063002b55f970x5683ae62bb8456da15b364730b3baaae673633e70 Ether
[ Download CSV Export 
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: MasterDeposit
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: No
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.21;

// File: contracts/Interfaces/MasterDepositInterface.sol

/**
 * @dev Interface of MasterDeposit that should be used in child contracts 
 * @dev this ensures that no duplication of code and implicit gasprice will be used for the dynamic creation of child contract
 */
contract MasterDepositInterface {
    address public coldWallet1;
    address public coldWallet2;
    uint public percentage;
    function fireDepositToChildEvent(uint _amount) public;
}

// File: zeppelin-solidity/contracts/math/SafeMath.sol

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

// File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts/ChildDeposit.sol

/**
* @dev Should be dinamically created from master contract 
* @dev multiple payers can contribute here 
*/
contract ChildDeposit {
    
    /**
    * @dev prevents over and under flows
    */
    using SafeMath for uint;
    
    /**
    * @dev import only the interface for low gas cost
    */
    // MasterDepositInterface public master;
    address masterAddress;

    function ChildDeposit() public {
        masterAddress = msg.sender;
        // master = MasterDepositInterface(msg.sender);
    }

    /**
    * @dev any ETH income will fire a master deposit contract event
    * @dev the redirect of ETH will be split in the two wallets provided by the master with respect to the share percentage set for wallet 1 
    */
    function() public payable {

        MasterDepositInterface master = MasterDepositInterface(masterAddress);
        // fire transfer event
        master.fireDepositToChildEvent(msg.value);

        // trasnfer of ETH
        // with respect to the percentage set
        uint coldWallet1Share = msg.value.mul(master.percentage()).div(100);
        
        // actual transfer
        master.coldWallet1().transfer(coldWallet1Share);
        master.coldWallet2().transfer(msg.value.sub(coldWallet1Share));
    }

    /**
    * @dev function that can only be called by the creator of this contract
    * @dev the actual condition of transfer is in the logic of the master contract
    * @param _value ERC20 amount 
    * @param _tokenAddress ERC20 contract address 
    * @param _destination should be onbe of the 2 coldwallets
    */
    function withdraw(address _tokenAddress, uint _value, address _destination) public onlyMaster {
        ERC20(_tokenAddress).transfer(_destination, _value);
    }

    modifier onlyMaster() {
        require(msg.sender == address(masterAddress));
        _;
    }
    
}

// File: zeppelin-solidity/contracts/ReentrancyGuard.sol

/**
 * @title Helps contracts guard agains reentrancy attacks.
 * @author Remco Bloemen <[email protected]Ï€.com>
 * @notice If you mark a function `nonReentrant`, you should also
 * mark it `external`.
 */
contract ReentrancyGuard {

  /**
   * @dev We use a single lock for the whole contract.
   */
  bool private reentrancy_lock = false;

  /**
   * @dev Prevents a contract from calling itself, directly or indirectly.
   * @notice If you mark a function `nonReentrant`, you should also
   * mark it `external`. Calling one nonReentrant function from
   * another is not supported. Instead, you can implement a
   * `private` function doing the actual work, and a `external`
   * wrapper marked as `nonReentrant`.
   */
  modifier nonReentrant() {
    require(!reentrancy_lock);
    reentrancy_lock = true;
    _;
    reentrancy_lock = false;
  }

}

// File: zeppelin-solidity/contracts/ownership/Ownable.sol

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

// File: zeppelin-solidity/contracts/ownership/Claimable.sol

/**
 * @title Claimable
 * @dev Extension for the Ownable contract, where the ownership needs to be claimed.
 * This allows the new owner to accept the transfer.
 */
contract Claimable is Ownable {
  address public pendingOwner;

  /**
   * @dev Modifier throws if called by any account other than the pendingOwner.
   */
  modifier onlyPendingOwner() {
    require(msg.sender == pendingOwner);
    _;
  }

  /**
   * @dev Allows the current owner to set the pendingOwner address.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    pendingOwner = newOwner;
  }

  /**
   * @dev Allows the pendingOwner address to finalize the transfer.
   */
  function claimOwnership() onlyPendingOwner public {
    OwnershipTransferred(owner, pendingOwner);
    owner = pendingOwner;
    pendingOwner = address(0);
  }
}

// File: contracts/MasterDeposit.sol

/**
* @dev master contract that creates ChildDeposits. Responsible for controlling and setup of deposit chain.  
* @dev all functions that should be called from child deposits are specified in the MasterDepositInterface 
*/
contract MasterDeposit is MasterDepositInterface, Claimable, ReentrancyGuard {
    
    /**
    * @dev prevents over and under flows
    */
    using SafeMath for uint;

    /**
    * @dev mapping of all created child deposits
    */
    mapping (address => bool) public childDeposits;

    /**
    * @dev responsible for creating deposits (in this way the owner isn't exposed to a api/server security breach)
    * @dev by loosing the depositCreator key an attacker can only create deposits that will not be a real threat and another depositCreator can be allocated
    */
    address public depositCreator;

    /**
    * @dev Fired at create time
    * @param _depositAddress blockchain address of the newly created deposit contract
    */
    event CreatedDepositEvent (
    address indexed _depositAddress
    );
    
    /**
    * @dev Fired at transfer time
    * @dev Event that signals the transfer of an ETH amount 
    * @param _depositAddress blockchain address of the deposit contract that received ETH
    * @param _amount of ETH
    */
    event DepositToChildEvent(
    address indexed _depositAddress, 
    uint _amount
    );

    function MasterDeposit() public {
        percentage = 80;
        coldWallet1 = 0xD4950DCA429b1c42cb42D4532F90A654A65e2d2D;
        coldWallet2 = 0x43e01f3cdB1dfeE779334f7b81bddFBf06B0A792;
    }

    /**
    * @dev creates a number of instances of ChildDeposit contracts
    * @param _count creates a specified number of deposit contracts
    */
    function createChildDeposits(uint _count) public onlyDepositCreatorOrMaster {
        for (uint i = 0; i < _count; i++) {
            ChildDeposit childDeposit = new ChildDeposit();
            childDeposits[address(childDeposit)] = true;
            emit CreatedDepositEvent(address(childDeposit));    
        }
    }

    /**
    * @dev setter for the address that is responsible for creating deposits 
    */
    function setDepositCreator(address _depositCreator) public onlyOwner {
        require(_depositCreator != address(0));
        depositCreator = _depositCreator;
    }

    /**
    * @dev Setter for the income percentage in the first coldwallet (not setting this the second wallet will receive all income)
    */
    function setColdWallet1SplitPercentage(uint _percentage) public onlyOwner onlyValidPercentage(_percentage) {
        percentage = _percentage;
    }

    /**
    * @dev function created to emit the ETH transfer event from the child contract only
    * @param _amount ETH amount 
    */
    function fireDepositToChildEvent(uint _amount) public onlyChildContract {
        emit DepositToChildEvent(msg.sender, _amount);
    }

    /**
    * @dev changes the coldwallet1 address
    */
    function setColdWallet1(address _coldWallet1) public onlyOwner {
        require(_coldWallet1 != address(0));
        coldWallet1 = _coldWallet1;
    }

    /**
    * @dev changes the coldwallet2 address
    */
    function setColdWallet2(address _coldWallet2) public onlyOwner {
        require(_coldWallet2 != address(0));
        coldWallet2 = _coldWallet2;
    }

    /**
    * @dev function that can be called only by owner due to security reasons and will withdraw the amount of ERC20 tokens
    * @dev from the deposit contract list to the cold wallets 
    * @dev transfers only the ERC20 tokens, ETH should be transferred automatically
    * @param _deposits batch list with all deposit contracts that might hold ERC20 tokens
    * @param _tokenContractAddress specifies what token to be transfered form each deposit from the batch to the cold wallets
    */
    function transferTokens(address[] _deposits, address _tokenContractAddress) public onlyOwner nonReentrant {
        for (uint i = 0; i < _deposits.length; i++) {
            address deposit = _deposits[i];
            uint erc20Balance = ERC20(_tokenContractAddress).balanceOf(deposit);

            // if no balance found just skip
            if (erc20Balance == 0) {
                continue;
            }
            
            // trasnfer of erc20 tokens
            // with respect to the percentage set
            uint coldWallet1Share = erc20Balance.mul(percentage).div(100);
            uint coldWallet2Share = erc20Balance.sub(coldWallet1Share); 
            ChildDeposit(deposit).withdraw(_tokenContractAddress,coldWallet1Share, coldWallet1);
            ChildDeposit(deposit).withdraw(_tokenContractAddress,coldWallet2Share, coldWallet2);
        }
    }

    modifier onlyChildContract() {
        require(childDeposits[msg.sender]);
        _;
    }

    modifier onlyDepositCreatorOrMaster() {
        require(msg.sender == owner || msg.sender == depositCreator);
        _;
    }

    modifier onlyValidPercentage(uint _percentage) {
        require(_percentage >=0 && _percentage <= 100);
        _;
    }

}

Contract ABI
[{"constant":false,"inputs":[{"name":"_deposits","type":"address[]"},{"name":"_tokenContractAddress","type":"address"}],"name":"transferTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"coldWallet2","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"depositCreator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"fireDepositToChildEvent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_coldWallet2","type":"address"}],"name":"setColdWallet2","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_percentage","type":"uint256"}],"name":"setColdWallet1SplitPercentage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_count","type":"uint256"}],"name":"createChildDeposits","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_coldWallet1","type":"address"}],"name":"setColdWallet1","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"childDeposits","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"percentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"coldWallet1","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_depositCreator","type":"address"}],"name":"setDepositCreator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_depositAddress","type":"address"}],"name":"CreatedDepositEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_depositAddress","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"DepositToChildEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Contract Creation Code
60606040526000600460146101000a81548160ff021916908315150217905550341561002a57600080fd5b33600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550605060028190555073d4950dca429b1c42cb42d4532f90a654a65e2d2d6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507343e01f3cdb1dfee779334f7b81bddfbf06b0a792600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506117918061012b6000396000f3006060604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630f228087146100eb5780631bbec4e7146101645780633a8b069e146101b957806341de41811461020e5780634e71e0c81461023157806365a8a483146102465780638da5cb5b1461027f578063917180c7146102d45780639bc6f0ec146102f7578063a07ead731461031a578063c18a278014610353578063c78ad77f146103a4578063dc8ee41e146103cd578063e30c397814610422578063f2fde38b14610477578063ff18539b146104b0575b600080fd5b34156100f657600080fd5b61016260048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506104e9565b005b341561016f57600080fd5b6101776108ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c457600080fd5b6101cc610913565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561021957600080fd5b61022f6004808035906020019091905050610939565b005b341561023c57600080fd5b6102446109e2565b005b341561025157600080fd5b61027d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b83565b005b341561028a57600080fd5b610292610c5f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102df57600080fd5b6102f56004808035906020019091905050610c85565b005b341561030257600080fd5b6103186004808035906020019091905050610d0a565b005b341561032557600080fd5b610351600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e9b565b005b341561035e57600080fd5b61038a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f76565b604051808215151515815260200191505060405180910390f35b34156103af57600080fd5b6103b7610f96565b6040518082815260200191505060405180910390f35b34156103d857600080fd5b6103e0610f9c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561042d57600080fd5b610435610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561048257600080fd5b6104ae600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fe7565b005b34156104bb57600080fd5b6104e7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611087565b005b6000806000806000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561054d57600080fd5b600460149054906101000a900460ff1615151561056957600080fd5b6001600460146101000a81548160ff021916908315150217905550600094505b86518510156108c95786858151811015156105a057fe5b9060200190602002015193508573ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561064657600080fd5b5af1151561065357600080fd5b505050604051805190509250600083141561066d576108bc565b61069560646106876002548661116390919063ffffffff16565b61119e90919063ffffffff16565b91506106aa82846111b990919063ffffffff16565b90508373ffffffffffffffffffffffffffffffffffffffff166369328dec87846000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050600060405180830381600087803b15156107a357600080fd5b5af115156107b057600080fd5b5050508373ffffffffffffffffffffffffffffffffffffffff166369328dec8783600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050600060405180830381600087803b15156108ab57600080fd5b5af115156108b857600080fd5b5050505b8480600101955050610589565b6000600460146101000a81548160ff02191690831515021790555050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561099157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f70c555f181d0128c29bbf733f11f75d7566cbe33746366f087d87f0f76b56d18826040518082815260200191505060405180910390a250565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3e57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bdf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610c1b57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ce157600080fd5b8060008110158015610cf4575060648111155b1515610cff57600080fd5b816002819055505050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610db65750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610dc157600080fd5b600091505b82821015610e9657610dd66111d2565b604051809103906000f0801515610dec57600080fd5b90506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f90b7e321d846c714c6c55eb0cc4aa8427ac9abe6ab643cd99c77eb1ffea547a660405160405180910390a28180600101925050610dc6565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ef757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f3357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60056020528060005260406000206000915054906101000a900460ff1681565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561104357600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110e357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561111f57600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060008414156111785760009150611197565b828402905082848281151561118957fe5b0414151561119357fe5b8091505b5092915050565b60008082848115156111ac57fe5b0490508091505092915050565b60008282111515156111c757fe5b818303905092915050565b604051610583806111e38339019056006060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506105258061005e6000396000f300606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806369328dec1461030f575b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff166341de4181346040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15156100d657600080fd5b5af115156100e357600080fd5b50505061018560646101778473ffffffffffffffffffffffffffffffffffffffff1663c78ad77f6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561015157600080fd5b5af1151561015e57600080fd5b505050604051805190503461037090919063ffffffff16565b6103ab90919063ffffffff16565b90508173ffffffffffffffffffffffffffffffffffffffff1663dc8ee41e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156101ea57600080fd5b5af115156101f757600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561024057600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16631bbec4e76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156102a357600080fd5b5af115156102b057600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff166108fc6102e683346103c690919063ffffffff16565b9081150290604051600060405180830381858888f19350505050151561030b57600080fd5b5050005b341561031a57600080fd5b61036e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506103df565b005b600080600084141561038557600091506103a4565b828402905082848281151561039657fe5b041415156103a057fe5b8091505b5092915050565b60008082848115156103b957fe5b0490508091505092915050565b60008282111515156103d457fe5b818303905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561043a57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156104dc57600080fd5b5af115156104e957600080fd5b50505060405180519050505050505600a165627a7a7230582029efbfd2888bcac7be71467104d99ba423791c92dbdb5af17820691cb0e1024b0029a165627a7a72305820b4a9e6fd6d65540dacd739916c9cd45916019ba3ef13b021c7df255085465a4a0029


   Swarm Source:
bzzr://b4a9e6fd6d65540dacd739916c9cd45916019ba3ef13b021c7df255085465a4a
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward