Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support script hash type data1. #9

Open
yangby-cryptape opened this issue Apr 7, 2024 · 0 comments
Open

[Feature Request] Support script hash type data1. #9

yangby-cryptape opened this issue Apr 7, 2024 · 0 comments

Comments

@yangby-cryptape
Copy link

yangby-cryptape commented Apr 7, 2024

Issue

The latest version 0.4.0 doesn't support data1.

Error messages:

node:internal/process/task_queues:95
    runMicrotasks();
    ^

Error: transaction.outputs[0].lock.hash_type must be either data or type!
    at FA (/snapshot/ckb-transaction-dumper/cli-dist.js)
    at kA (/snapshot/ckb-transaction-dumper/cli-dist.js)
    at /snapshot/ckb-transaction-dumper/cli-dist.js
    at MA (/snapshot/ckb-transaction-dumper/cli-dist.js)
    at NA (/snapshot/ckb-transaction-dumper/cli-dist.js)
    at bA (/snapshot/ckb-transaction-dumper/cli-dist.js)
    at Object.dump (/snapshot/ckb-transaction-dumper/cli-dist.js)
    at /snapshot/ckb-transaction-dumper/cli-dist.js
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.5.0

The outputs[0] is:

    {
      "capacity": "0x289b0cd00",
      "lock": {
        "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",
        "hash_type": "data1",
        "args": "0x"
      },
      "type": {
        "code_hash": "0xc8a30fe3e8101cb4163e70b4eb1e42d477ae7094524a30bfdf1c90be41876d28",
        "hash_type": "type",
        "args": "0x202596b0206027ebe12806f3048da816f18a3e0679120703b898818bc024804d0a80"
      }
    }
Click to see the full transaction.
{
  "version": "0x0",
  "cell_deps": [
    {
      "out_point": {
        "tx_hash": "0x151c5bc95b03cdc690b05a6513abc15e7aa27aa78cf4d3ec0033953bdae36504",
        "index": "0x0"
      },
      "dep_type": "code"
    },
    {
      "out_point": {
        "tx_hash": "0x9660b35c0a97fc47debb73f68a4868d8108e226a669219b62cc34a8c213c9d57",
        "index": "0x0"
      },
      "dep_type": "code"
    },
    {
      "out_point": {
        "tx_hash": "0x753bebb094b1a0e9ab23fdd1f358178121e12eb772269648cf93ccadeff4c849",
        "index": "0x1"
      },
      "dep_type": "code"
    },
    {
      "out_point": {
        "tx_hash": "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37",
        "index": "0x0"
      },
      "dep_type": "dep_group"
    }
  ],
  "header_deps": [],
  "inputs": [
    {
      "since": "0x0",
      "previous_output": {
        "tx_hash": "0x753bebb094b1a0e9ab23fdd1f358178121e12eb772269648cf93ccadeff4c849",
        "index": "0x0"
      }
    },
    {
      "since": "0x0",
      "previous_output": {
        "tx_hash": "0xb8e401850dcad56af093fc40248a42c870ed60c2557803f972d0e4f45b1a8f57",
        "index": "0x1"
      }
    },
    {
      "since": "0x0",
      "previous_output": {
        "tx_hash": "0x753bebb094b1a0e9ab23fdd1f358178121e12eb772269648cf93ccadeff4c849",
        "index": "0x2"
      }
    }
  ],
  "outputs": [
    {
      "capacity": "0x289b0cd00",
      "lock": {
        "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",
        "hash_type": "data1",
        "args": "0x"
      },
      "type": {
        "code_hash": "0xc8a30fe3e8101cb4163e70b4eb1e42d477ae7094524a30bfdf1c90be41876d28",
        "hash_type": "type",
        "args": "0x202596b0206027ebe12806f3048da816f18a3e0679120703b898818bc024804d0a80"
      }
    },
    {
      "capacity": "0x525433d00",
      "lock": {
        "code_hash": "0x28e83a1277d48add8e72fadaa9248559e1b632bab2bd60b27955ebc4c03800a5",
        "hash_type": "data1",
        "args": "0x"
      },
      "type": {
        "code_hash": "0xc8a30fe3e8101cb4163e70b4eb1e42d477ae7094524a30bfdf1c90be41876d28",
        "hash_type": "type",
        "args": "0x202596b0206027ebe12806f3048da816f18a3e0679120703b898818bc024804d0a80"
      }
    },
    {
      "capacity": "0x1c7be7e57d36",
      "lock": {
        "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
        "hash_type": "type",
        "args": "0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d7"
      },
      "type": null
    }
  ],
  "outputs_data": [
    "0x02",
    "0x029b87e8987c7166e305e55211c53dda2a9c596afc99ce17a65641a1bed4fc2871e0070000ef0f0000201000000000000000000000000000000000000000000000000000000000000062c785e62b0d799e19407eb9846bd41dd55639008670a1d2de1be669046fc9f742461266ffff7f20",
    "0x"
  ],
  "witnesses": [
    "0x501200001000000010000000100000003c1200003c1200000c000000b00f0000320000000000002033aac47b49440cfa7c27db6312985ffb337f9f4ce706a3b1c0e2297bf0a3df5f68ddd104a12572dafdfb3f7a9bc9c6deec2262adae4b899c7820654c32b52b3841461266ffff7f200000000000000020e86a51dbe721a9c266d639427c010c5117518b2da95eea191911f57a7eb994327b0faee0e012aff149c85178ef930559e6c04554a8ff34883aad0c93e4af846742461266ffff7f200100000000000020eddb711ec4115c3068889a647aa6afbe3cfa432a6c7ff314cf7c5212f9cda13fe8d69969256f9f5a7dcc802c45b97e01c1564f256bea3e735e0be49e505fe03142461266ffff7f200300000000000020deeab7af049a4d022b402202825eac8621f6236f9ddf2484b5e7946d387d0b582e1cd949289dd7ee07cda4d377d99919d053d050bc85c5da4c84d4808287c93842461266ffff7f200000000000000020c10da28b4bcfecf4fd1df355546179a43e82bb3877bd442f13444e1d0977881b0a5fb5ab25d8aaff5c3b27f6c063d6b5f5c886b7b50b11ceb55e37360dbb485842461266ffff7f200000000000000020ae4e5ee7b410a853bdb8ead91e22ba3813b229af41556f674fae2f74c786187479e861e42a52674b40f8e11fe4bb6162fcc68fda7261164cb7f2a670d8bd459f42461266ffff7f2000000000000000205e1f06a0ad6a6e85b49e8732cda0d1d3161a352d50d41eb2616b56aaa4bc977373575c6daf08c453df1b4143b61b814a091f1b65edc6273c2332f30cd4558df642461266ffff7f2002000000000000207eed8111d9adb36f9dc1d7d546181028aa245cdb5ba0e17b467106e0e30a810ad9986127a8587feef2129098adfe5c2e14ac4e9a54c8771f6dab8e1252cfb9ea43461266ffff7f200500000000000020ece2242325358117e279d2f057e4845ea899a9bbc6dec673780ee7244e91cb05fc9e4516bd5320c529b7b78341bd910e30194b5b1e76acca0ae0225c63ab9b8443461266ffff7f2001000000000000209a13d925b0b79d5db1902c615ba4e7a25ed072b0ade87eca88cdd0883afa8d482561fd1753298129ae7db9eb5e3ca0b0fe9dc7a7750cc5190e9c372e696ad29843461266ffff7f2000000000000000203ca8b7a97e84912f98c797cbd332caeae3d02af475e45de82a813d6cd1ba331b0d93336176bf06454bce06924e5c9172b881564135dd32aba65124b299b0ce6d43461266ffff7f200000000000000020ecb31734227f44a9b30ae2219849a140f6d8f89666d304bfbdb877ca5df1fe49f5cb853fc4699e457e14643f9fb4d0c3d51469d411ca2ed31d91dd4c9c73680443461266ffff7f200100000000000020a885dbfc7a4383c9994a76d35da1352017e6c32bcc035379ea6b7accf2bce049c8d1c119e8cc09e0ec979fd065055eaf50e0844abd1fa8c461170dd373d85b0c43461266ffff7f2001000000000000202453b5ea05247e28b08e0df66ebc58eb502f6e7939049d5ff75f166890a9b414f9b8994d80bd2f2dcdcb5d93ec5338d8a5f40c04f7effa6128f5a456061a5f2f44461266ffff7f200200000000000020ddcec1cb7362f60abfe931862fa4c8abe11e2cf47cf663e1b369e2f826f3aa561ea4e3cae7e9474b444ee802ae992f588ac403c3b67b5768cb70c4d32ef35c8244461266ffff7f2003000000000000202e4182877fb223f41a1c76776e5fe76922cd4b83f98049b1fea9af7454870202b115dbcd01320d550d78c4d1dabe9af0cc72ca1b381642d97be960fa4747dc0c44461266ffff7f200100000000000020a21f9a90a7336c0a38a512e8dc1a252d66bb28a93bd508a8b7a19e3df11b4e350119962161cf88fe6b0cc093b8fca8113f0e5745e21a42da10a24ba003b0099144461266ffff7f2000000000000000207faaa1401be91f6fd2207d01b5762b2b961cda3062b758af83a33e21bbefd9454638b056ad289df5026b43bd4b2fbaccc03614c6376d8210fd764cd8b2e4bba744461266ffff7f200000000000000020ca1b717e35d3b82523cbe469b86ba04105e1df113338a4f04a56201aac83823a71a793df0bff5d02ad55d255990887b9b2f28554f523a3c188cf6db213420fb844461266ffff7f200100000000000020b6d5a6d3c6c56b446c2e1aedc60ba842b703da753c1d40a43f57b48d1f2bec2b5d4a16c6191c5835a94e66f1d11af5c4c2fe98637d780e2aaeadbba271393a6645461266ffff7f20020000000000002028faa123eb30204e02bfa1449166e472c77de38a83fcc6dc141d95a547747162c5f2e9c904f90320cbee0e9734f15b45cea83e5c07154236b626a9fca10030a345461266ffff7f2001000000000000205e6442e88d232d7555e0037e996469601c7128c55474e74e29cd3de01cc2933246769cea639cbf1a9bc517263c48180fbfae9cfbe409b099c4caa61fab90a3f445461266ffff7f2001000000000000206083ffcb21a2ef9cdcac27c33a6281ddc9bb2ae9f925be3ced955217f3ffda4d7f6cf55518f49f403b040ace85ed11382301b3c4d6ea31364cfcf6a0f255803845461266ffff7f200100000000000020b43e62f7426f22568efd311c71ae2640de699711258693861b2d33f683523a6a810048a5771515c61879ae2bcd1503bb65dc30615208d2790a06c8c7e655e2d745461266ffff7f20020000000000002061806d73f77613e2120e7cee3e8ef9350c3dc5038f0450f9bcb4b90d44b963055f2ca1fa7d5642c9b018ecf83e38cc7155ae194a8a6bbd7b80d52431a32303d545461266ffff7f200300000000000020ec02d0f44a3997857003f07a94589523d637cf33bfb961aead5636b0597dfa07be18fbce0b27702f609fdafbcfcef62bcb8575fa76bddac2f3234b3ffaa46aa746461266ffff7f20000000000000002062f74918b05667186648f5c8b0511b861920ec8d6c45c0c6593be395588c303951560e7174117e407fc44eb2830b2dc9c69260937973e6a311a112232c8cce8446461266ffff7f200000000000000020774189a213b94d9779574282c1cd292bb2eeb0025c3b62120cfec93cccc81810f1891d6956405d19d72086dd6dbb38b4d6a5b203b6908a1e4edfde2690cda65d46461266ffff7f2000000000000000207cb2604a638de4f776bb74ef1eaab67c556f18fd8bf39ac6b798f55c173d75720a4bf6a66b982790ce829d6ad52c3a88793d83889f6884a14483b70eacb226e746461266ffff7f20000000000000002049ffd9a47dcabe93fb489e911979d7e6453265a6509570072332ed8100fde033ac8dd4c5f90fa5ed095ab8e10d8a3a9adf5d6a3102030d4add618f813c8648b046461266ffff7f200100000000000020cd48a3088956402f885b2877a0febaa8e056fd51029a62a062af70436fb2e4220633e10bc37c490928373ff803d1d259373edd4ede8099935894fe6ce8e2a3e246461266ffff7f200100000000000020cfd2994e8fa758e95f267915b4c723bbd47001b2bcc246c7cb8af399a9219f3385011e7b07cd8c6d84aad21e047bbf5e9bfa2ba6334ab25ebb5a8adc6036654647461266ffff7f2000000000000000206a35f6ec10a397612c95fb5d3a1ff3bc068b68720e377b481fa98b79d564e35b871e9f9d5854e24b265c8fcfee01f45d1c802ede47ad01c58c834f1df12f218e47461266ffff7f2001000000000000208cfe7026e651a318637fb79b8a225ba3aaed5c11e18d007f21cdb217c038cd3597ab7b09ac1d08d953ec25ea4b866ed35692ca5c9982d6f3c1eeb5d389641bfc47461266ffff7f20000000000000002019a64986ff26f42113380f0f795f8deeb671f4639d0b327890d26606b998325680282ed30428528d339e0a3857955c18d99f52c36f3debd7deeeaca4b9c6a92847461266ffff7f2002000000000000207255dfe7e2fe073c59f2f758faea02c5af2606348b0bd164f0cef0cfc49e5c14aee97e217fcc8dbdd2e177d39ab1f35843ff57c414aab5c879a607ee25862d6247461266ffff7f2000000000000000208d41bf55254e2e4cb00f58d38a6e8de0c75ecf71fde21a720bcab5002b871d37a9c8c0e1f94e21866690ac4ad20a89de474076e0bdfd27bcf41608943184e00c47461266ffff7f200100000000000020d93cce822fd0402a2d40dd5f5bf86700e800d76da10540b0700130e7e235dc447ba5b2f47a37eb6cc8a054328f722c16f5de21e4b4856d2964805ed7ef3bcd0248461266ffff7f200100000000000020ce20168dd5388eeba88c460d8046e09899adafe4eec5412ceda42bd551078101d79996ad1841a0f8a849ff7eee760fc35b58c664fbd022f878a109982d47169c48461266ffff7f20000000000000002051d2e9745d7d1bca80bacd8385ec635e2f1e6c4093776eab805fed7e8b6d016cae1025b0c05061ba592770861f5f145b31676deaa36602af285c36208b3fb26948461266ffff7f2004000000000000207d10b14ae7de8864b1636ea60f9add045d629a6880402d1f5c036a2b78e8881ce7600af921d9ed2aff77fedbd59ba87e36f288f5a510cdc2c593e092577b5ff448461266ffff7f200000000000000020db2cc2266c4a86fdb944e8215a852336766fd28279a9e5b5f441e6755be618469cccc6ce689ae2c347d37002b35687c3ea2692f88f7b8eaedef03f7d3447529a48461266ffff7f200000000000000020ae2732301518e878b6215da561feed84dc3305f847ac70f9f3092a5ea69c382a66012471028dcf96b1bf0307b224b65e5cdcc93b34481fee04c2167ffb94d2d048461266ffff7f2000000000000000200c8eb7269a480eab7ed4c7168c06228f15ffda8b92b0b0e6d510f5f4c0366f3ccafe1627dcbf1f7385a3eda248a550693cf03832b9b7dd7968e1337133b93e7949461266ffff7f200000000000000020cda6faf766f872959e4c0014fb627dbd5b4d9d2fe3f2c128c17f30f0d2bbaa43d3de549b33d783b8a578e8ca5ca44acea5116ad53761ac2d5d7a930c37a6eba249461266ffff7f20000000000000002019ff7b12fd8e0866efe656977a8f9c1d11e35ed8bdc0d2797aeba65520643014bb10133505f3f0cf27e4980baab5b2e0e41eb70c322f26124381587a49ae246b49461266ffff7f200200000000000020d8fd75b8a408f4496f54f84782c79953478e24ee1ab06d86074ae1e4d933054f8237bb6beb0a1ba671cea1888b7711701ad2cba79b0b111d9ac5ec5dcad9f85049461266ffff7f200400000000000020d02296227e38bfe0fbc66884ba0fb5e73a9f1c0cbffbd48658756f522eeacd4f1ef50e1aaed8d6752a468c2c2c1ce7ae71355928f707689717ab177002c60ab849461266ffff7f200100000000000020666fb6e8c19ae3517a83dfc7c0d8ce1472089dcb474f8decc18ffff5ca2013619cb3540f06c0aea1d59b40c283f457bcf0ca9aa5ae0fce66d99d402bf7b6eb0f49461266ffff7f2003000000000000209a8a2bee952c61779c6f00a6937a50120c1aaab1610f8b641027ffc37a53b31ad6701d66728619cf5ca9eb833c09552d25c0d9c5dca2b1851dc088bbca6581f74a461266ffff7f200100000009000000bc0f0000bd0f0000040000000000000000000000000000000000000000000000000000000000000047fc56335f040e5f41cd6ad652c16f211bdb8779b5e35e491cf48f1bc82c4d3eb80f0000bb0f00000800000000000000000000000000000000000000000000000000000000000000715b66ab409b6a86d87d07a1671acd363c06f2209fde68c34f420c5e98be16c2b00f0000b70f000010000000000000000000000000000000000000000000000000000000000000000b9d7c3a0189910f8e594af1c55bbdf8a82856934ce2dc96886a63b404ea080ea00f0000af0f00002000000000000000000000000000000000000000000000000000000000000000d7a321fde63f090b256b007923146c93721c865ccadd87e37749f648898dd0dc600f00009f0f000080000000000000000000000000000000000000000000000000000000000000002a576552ff035a7b379d67de748509afb09eb9da685172fdd92867db94cca5fce00e00005f0f0000000100000000000000000000000000000000000000000000000000000000000013226dc8a63cfb7983087825875951c6e914626e178b5c330cdb2e01cd4fb075e00d0000df0e000000020000000000000000000000000000000000000000000000000000000000002c200e4a0afa480e3e06131218d3f15567e57dc006c287e1c9d4512813067e3be00b0000df0d00000004000000000000000000000000000000000000000000000000000000000000f4a7efae142db0e0bbb65e26d67d75884840a81725c3ab083d550ade59c0fbeee0070000df0b0000000800000000000000000000000000000000000000000000000000000000000047b5e612380148054ba004184d687bcbf0bc860f2dd93941e6183d4b45fbd915",
    "0x",
    "0x55000000100000005500000055000000410000009ef8267138d7b0338a05912b4367fda5d4c2da238beb030f4ad504e2b0e5763b6338508909ff33c6813a528b1b8f7617312c2f80fc7d86553ad8c54b89566bdf01"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant