zero2ckb-web icon indicating copy to clipboard operation
zero2ckb-web copied to clipboard

Empty transaction.outputs[0].lock.args for generated transaction

Open phroi opened this issue 2 years ago • 2 comments

Using the drag and drop functionality in Transaction Output to generate the transaction, generates an invalid transaction. Let's take for example this transaction I just generated with that tool:

{
  "version": "0x0",
![Screenshot from 2022-05-05 18-58-21](https://user-images.githubusercontent.com/90913182/167005236-d072d1d2-c9ca-4d04-8655-c9d26f823172.png)

  "header_deps": [],
  "cell_deps": [
    {
      "out_point": {
        "tx_hash": "0x4f1097802dc6fe19b942f1c2e8e52d564ee35899e4aef308101c86c49bc1f471",
        "index": "0x0"
      },
      "dep_type": "dep_group"
    }
  ],
  "inputs": [
    {
      "previous_output": {
        "tx_hash": "0x41a2f4f14500fa11b98b88f86017e6974118bfb475cb041fe16825157820ae0d",
        "index": "0x0"
      },
      "since": "0x0"
    }
  ],
  "outputs": [
    {
      "capacity": "0x2ecbd7ce61",
      "lock": {
        "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
        "hash_type": "type",
        "args": ""
      }
    }
  ],
  "outputs_data": [
    "0x"
  ],
  "witnesses": [
    "0x"
  ]
}

This transaction cannot pass the validation in the Fill in the transaction information and it reports this error:

transaction.outputs[0].lock.args must be a hex string!

The reason being that transaction.outputs[0].lock.args is empty, so it's not a valid hexadecimal value!

phroi avatar May 05 '22 19:05 phroi

Screenshot from 2022-05-05 18-58-21

phroi avatar May 05 '22 19:05 phroi

Of course using a valid args, such as "args": "0x43d509d97f26007a285f39241cffcd411157196c", fixes the transaction and so it validates without any issue!

Screenshot from 2022-05-05 19-03-42

phroi avatar May 05 '22 19:05 phroi