// File: contracts/5/UniverseConfig.sol



pragma solidity 0.5.16;
import "openzeppelin-solidity-2.3.0/contracts/ownership/Ownable.sol";
import "./interfaces/IUniverse.sol";
import "./interfaces/IFarm.sol";

contract UniverseConfig is IUniverse, Ownable {
    address payable public refferral;
    IFarm public planetETH;
    address public hqBase;
    address public token;
    
    uint256 public universeShare;
    uint256 public planetETHShare;
    uint256 public hqBaseShare;
    
    constructor(
        address payable _refferral, 
        IFarm _planetETH,
        address _hqBase, 
        uint256 _universeShare,
        uint256 _planetETHShare,
        uint256 _hqBaseShare,
        address _token
    ) public {
        setParams(_refferral, _planetETH, _hqBase, _universeShare, _planetETHShare, _hqBaseShare, _token);
    }

    function setParams(
        address payable _refferral, 
        IFarm _planetETH,
        address _hqBase, 
        uint256 _universeShare,
        uint256 _planetETHShare,
        uint256 _hqBaseShare,
        address _token
    ) public onlyOwner {
        refferral = _refferral;
        planetETH = _planetETH;
        hqBase = _hqBase;
        universeShare = _universeShare;
        planetETHShare = _planetETHShare;
        hqBaseShare = _hqBaseShare;
        token = _token;
    }

    function depositETH() external payable {
        planetETH.depositETH.value(msg.value)();
    }

    function getHQBase() external view returns (address) {
        return hqBase;
    }

    function getUniverseShare() external view returns (uint256) {
        return universeShare;
    }

    function getPlanetETHShare() external view returns (uint256) {
        return planetETHShare;
    }

    function getHQBaseShare() external view returns (uint256) {
        return hqBaseShare;
    }

    function getRefferral() external view returns (address payable) {
        return refferral;
    }
}
// File: openzeppelin-solidity-2.3.0/contracts/ownership/Ownable.sol



pragma solidity ^0.5.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * > Note: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts/5/interfaces/IUniverse.sol



pragma solidity 0.5.16;

interface IUniverse {
    function depositETH() external payable;
    function getHQBase() external view returns (address);
    function getUniverseShare() external view returns (uint256);
    function getPlanetETHShare() external view returns (uint256);
    function getHQBaseShare() external view returns (uint256);
    function getRefferral() external view returns (address payable);
}
// File: contracts/5/interfaces/IFarm.sol



pragma solidity 0.5.16;

interface IFarm {
    function depositETH() external payable;
}