contract PixelCore is PixelAuction {

    // Set in case the core contract is broken and an upgrade is required
    address public newContractAddress;

    /// @notice Creates the main PixelCore smart contract instance.
    function PixelCore() public {
        // the creator of the contract is the initial authority
        authorityAddress = msg.sender;
    }

    /// @dev Used to mark the smart contract as upgraded, in case there is a serious
    ///  breaking bug. This method does nothing but keep track of the new contract and
    ///  emit a message indicating that the new address is set. It's up to clients of this
    ///  contract to update to the new contract address in that case. (This contract will
    ///  be paused indefinitely if such an upgrade takes place.)
    /// @param _v2Address new address
    function setNewAddress(address _v2Address) external onlyAuthority {
        newContractAddress = _v2Address;
        ContractUpgrade(_v2Address);
    }

    // @dev Allows the authority to capture the balance available to the contract.
    function withdrawBalance() external onlyAuthority returns (bool) {
        uint amount = authorityBalance;
        if (amount > 0) {
            authorityBalance = 0;
            if (!authorityAddress.send(amount)) {
                authorityBalance = amount;
                return false;
            }
        }
        return true;
    }
}
/// @title PixelCore: Pixels in the blockchain
/// @author Oliver Schneider <info@pixelcoins.io> (https://pixelcoins.io), based on Axiom Zen (https://www.axiomzen.co)
/// @dev The main PixelCoins contract
function withdrawBalance() external onlyAuthority returns (bool) {
    uint amount = authorityBalance;
    if (amount > 0) {
        authorityBalance = 0;
        if (!authorityAddress.send(amount)) {
            authorityBalance = amount;
            return false;
        }
    }
    return true;
}

// @dev Allows the authority to capture the balance available to the contract.