@classmethod
    def compose_genesis_tx_spec(cls, op_tx_spec):
        targets = op_tx_spec.get_targets()[:]
        if len(targets) != 1:
            raise InvalidTargetError(
                'Genesis transaction spec needs exactly one target!')
        target = targets[0]
        if target.get_colordef() != GENESIS_OUTPUT_MARKER:
            raise InvalidColorError(
                'Genesis transaction target should use -1 color_id!')
        fee = op_tx_spec.get_required_fee(300)
        amount = target.colorvalue.get_satoshi()
        uncolored_value = SimpleColorValue(colordef=UNCOLORED_MARKER,
                                           value=amount)
        colorvalue = fee + uncolored_value
        inputs, total = op_tx_spec.select_coins(colorvalue)
        change = fee - uncolored_value - total
        if change > 0:
            targets.append(ColorTarget(
                    op_tx_spec.get_change_addr(UNCOLORED_MARKER), change))
        txouts = [txspec.ComposedTxSpec.TxOut(target.get_satoshi(),
                                              target.get_address())
                  for target in targets]
        return txspec.ComposedTxSpec(inputs, txouts)
dataset/ETHPy150Open chromaway/ngcccbase/coloredcoinlib/obsolete_colordefs.py/POBColorDefinition.compose_genesis_tx_spec/swapped operands of `-`