contract EthealPromoDistribute is Ownable {
    mapping (address => bool) public admins;
    iPromo public token;

    // constructor
    constructor(address _promo) public {
        token = iPromo(_promo);
    }

    // set promo token
    function setToken(address _promo) onlyOwner public {
        token = iPromo(_promo);
    }

    // transfer ownership of token
    function passToken(address _promo) onlyOwner public {
        require(_promo != address(0));
        require(address(token) != address(0));

        token.transferOwnership(_promo);
    }

    // set admins
    function setAdmin(address[] _admins, bool _v) onlyOwner public {
        for (uint256 i = 0; i<_admins.length; i++) {
            admins[ _admins[i] ] = _v;
        }
    }

    // notify
    function massNotify(address[] _owners) external {
        require(admins[msg.sender] || msg.sender == owner);
        token.massNotify(_owners);
    }
}
/**
 * Distribute promo tokens parallel
 *   negligible, +3k gas cost / tx
 *   500 address ~ 1.7M gas
 * author: thesved, viktor.tabori at etheal dot com
 */
function massNotify(address[] _owners) external {
    require(admins[msg.sender] || msg.sender == owner);
    token.massNotify(_owners);
}

// notify