contract MultiPadLaunchApp {
    
    using SafeMath for uint256;
    
    IMainToken iMainToken;
    
    //variable declaration
    address private _owner = msg.sender;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowed;

    address private tokenContractAddress;
    


    function setTokenAddress(address _ITokenContract) onlyOwner external returns(bool){
        tokenContractAddress = _ITokenContract;
        iMainToken = IMainToken(_ITokenContract);
    }

    
    /*----------------------------------------------------------------------------
     * Functions for owner
     *----------------------------------------------------------------------------
    */

    /**
    * @dev get address of smart contract owner
    * @return address of owner
    */
    function getowner() external view returns (address) {
        return _owner;
    }

    /**
    * @dev modifier to check if the message sender is owner
    */
    modifier onlyOwner() {
        require(isOwner(),"You are not authenticate to make this transfer");
        _;
    }

    /**
     * @dev Internal function for modifier
     */
    function isOwner() internal view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Transfer ownership of the smart contract. For owner only
     * @return request status
      */
    function transferOwnership(address newOwner) external onlyOwner returns (bool){
        require(newOwner != address(0), "Owner address cant be zero");
        _owner = newOwner;
        return true;
    }
    
    
     /**
      * @dev Airdrop function to airdrop tokens. Best works upto 50 addresses in one time. Maximum limit is 200 addresses in one time.
      * @param _addresses array of address in serial order
      * @param _amount amount in serial order with respect to address array
      */
      function airdropByOwner(address[] memory _addresses, uint256[] memory _amount) public onlyOwner returns (bool){
          require(_addresses.length == _amount.length,"Invalid Array");
          uint256 count = _addresses.length;
          uint256 airdropcount = 0;
          for (uint256 i = 0; i < count; i++){
               iMainToken.transfer(_addresses[i],_amount[i]);
               airdropcount = airdropcount + 1;
          }
          return true;
      }
      
    function withdrawPeningTokens(uint256 _amount) external onlyOwner returns(bool){
       iMainToken.transfer(msg.sender, _amount);
       return true;
         
    }
    
    /*
     * @dev Admin can withdraw the bnb  
     */
    function withdrawCurrency(uint256 _amount) external onlyOwner returns(bool){
        msg.sender.transfer(_amount);
        return true;
    }

}
function getowner() external view returns (address) {
        return _owner;
    }
/**
 * @dev get address of smart contract owner
 * @return address of owner
 */