nervosnetwork / ckb-cli

CKB command line interface
MIT License
55 stars 35 forks source link

`ckb-cli util genesis-scripts --output-format json` has inconsistent out point formats. #564

Closed doitian closed 11 months ago

doitian commented 11 months ago

The out point for secp256k1_data uses a JS number instead of a hex string like in other scripts.

{
  "dao": {
    "cell_dep": {
      "dep_type": "code",
      "out_point": {
        "index": "0x2",
        "tx_hash": "0xf3a0d8fc8da819d10a59c18dd491c01f1ae48908e0cf1e3eccfc85a7e851383d"
      }
    },
    "script_id": {
      "code_hash": "0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e",
      "hash_type": "type"
    }
  },
  "secp256k1_blake160_multisig_all": {
    "cell_dep": {
      "dep_type": "dep_group",
      "out_point": {
        "index": "0x1",
        "tx_hash": "0x45de8377e1f74cb282ed81968d889ec494cbcd1549ac4b48c4660e94a532fb99"
      }
    },
    "script_id": {
      "code_hash": "0x5c5069eb0857efc65e1bca0c07df34c31663b3622fd3876c876320fc9634e2a8",
      "hash_type": "type"
    }
  },
  "secp256k1_blake160_sighash_all": {
    "cell_dep": {
      "dep_type": "dep_group",
      "out_point": {
        "index": "0x0",
        "tx_hash": "0x45de8377e1f74cb282ed81968d889ec494cbcd1549ac4b48c4660e94a532fb99"
      }
    },
    "script_id": {
      "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
      "hash_type": "type"
    }
  },
  "secp256k1_data": {
    "out_point": {
      "index": 3,
      "tx_hash": "0xf3a0d8fc8da819d10a59c18dd491c01f1ae48908e0cf1e3eccfc85a7e851383d"
    }
  },
  "type_id": {
    "script_id": {
      "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
      "hash_type": "type"
    }
  }
}