contract Ownable {

    address owner;
    address admin;

    event OwnershipTransferred(address indexed _from, address indexed _to);


    // ----------------------------------------------------------------------------

    // Constructor

    // ----------------------------------------------------------------------------
    constructor() public {
        owner = msg.sender;
        admin = address(0);
    }

    modifier onlyAdmin {
        require(msg.sender == owner || msg.sender == admin);

        _;
    }

    modifier onlyOwner {
        require(msg.sender == owner);

        _;
    }


    // ----------------------------------------------------------------------------

    // Get Owner Address

    // ----------------------------------------------------------------------------
    function viewOwner() external view returns(address) {
        return owner;
    }


    // ----------------------------------------------------------------------------

    // Set Owner

    // ----------------------------------------------------------------------------
    function setOwner(address newOwner) external onlyOwner {
        owner = newOwner;
        emit OwnershipTransferred(owner, newOwner);
    }


    // ----------------------------------------------------------------------------

    // Get Admin Address

    // ----------------------------------------------------------------------------
    function viewAdmin() external view returns(address) {
        return admin;
    }


    // ----------------------------------------------------------------------------

    // Set Admin

    // ----------------------------------------------------------------------------
    function setAdmin(address newAdmin) external onlyOwner {
        admin = newAdmin;
    }

}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
function viewOwner() external view returns(address) {
    return owner;
}

// ----------------------------------------------------------------------------
// Get Owner Address
// ----------------------------------------------------------------------------