0

I just created a tx on the testnet network in Bitcoin Cash but I am getting this error:

An error occured: "EmptyTransaction"

I have created the tx as I use to do it with bitcoin:

{
    "addresses": [
        "2NDcpwiwbrXxy3JEow32TfixJEuWFLvDzLw"
    ], 
    "block_height": -1, 
    "block_index": -1, 
    "confirmations": 0, 
    "double_spend": false, 
    "fees": 0, 
    "hash": "23e37982be95402aa681e27ed1727eb65b7a22e0136f1d437d9ec523a434d024", 
    "inputs": [
        {
            "age": 0, 
            "output_index": 0, 
            "prev_hash": "722d4d5b45eaa074e2e9454d7c3f7c1096da7a797b162e3691db1ceff6ca2098", 
            "script": "1600148965ca938fdc8592ec3776b120c4205e79eaad53", 
            "script_type": "empty", 
            "sequence": 4294967295, 
            "witness": [
                "30440220520deeb6ce02025b50c4999553257fec44491f5e260d48453b002082c4bf88b0022026d7435963160f9474350d8ec4f1f5557b91b9aad1c0a016c25c9cc27c26e2f501", 
                "0274c058e7c626ef14b4d16e497365b89f7dba4f9478bcc0cf886410103bde8efc"
            ]
        }
    ], 
    "outputs": [
        {
            "addresses": [
                "2NDcpwiwbrXxy3JEow32TfixJEuWFLvDzLw"
            ], 
            "script": "a914df786e38feeb3598ebb1040a7496f8230b3df1f387", 
            "script_type": "pay-to-script-hash", 
            "value": 100000000
        }, 
        {
            "addresses": [
                "2NDcpwiwbrXxy3JEow32TfixJEuWFLvDzLw"
            ], 
            "script": "a914df786e38feeb3598ebb1040a7496f8230b3df1f387", 
            "script_type": "pay-to-script-hash", 
            "value": 899999000
        }
    ], 
    "preference": "low", 
    "received": "2018-05-31T09:58:22.204155307Z", 
    "relayed_by": "54.162.137.3", 
    "size": 138, 
    "total": 999999000, 
    "ver": 1, 
    "vin_sz": 1, 
    "vout_sz": 2
}

Encoded tx:

010000000001019820caf6ef1cdb91362e167b797ada96107c3f7c4d45e9e274a0ea455b4d2d7200000000171600148965ca938fdc8592ec3776b120c4205e79eaad53ffffffff0200e1f5050000000017a91451053a8b253fc9d661ddab057c1ce0f400ff74778718e5a4350000000017a914df786e38feeb3598ebb1040a7496f8230b3df1f38702483045022100cb1cb3843d7df7a7bb6f79fb285e91f4da4ad7629fae8e6fe564268a62d74c26022026e018d7fb8eb3cb95a84f75a0cf1e04481c29f9ecd479c7193ed1ca27a1e46c01210274c058e7c626ef14b4d16e497365b89f7dba4f9478bcc0cf886410103bde8efc00000000

What am I doing wrong?

closed as off-topic by Andrew Chow Jul 17 at 17:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about cryptocurrencies or projects that are not Bitcoin, and are not applicable to Bitcoin, are off-topic. For more information, see this meta-discussion." – Andrew Chow
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    That looks like a SegWit transaction. Bitcoin Cash does not support SegWit. Are you sure you created this transaction with Bitcoin Cash software? – Pieter Wuille May 31 '18 at 16:49
  • I did it with my own code. The same code that I used for Bitcoin. So yes the problem is that BCH does not support segwit. Thank you. – EnZo Jun 1 '18 at 10:09