Skip to content

Commit

Permalink
chore: rm example-mol folder and update debug docs (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
RetricSu authored Sep 3, 2024
1 parent 5f5a3b5 commit 50759c3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 93 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,33 @@ Everytime you run a transaction, you can debug it with the transaction hash:
offckb debug <transaction-hash>
```

It will verify all the scripts in the transaction and print the detailed info in the terminal.

```sh
offckb debug --tx-hash 0x64c936ee78107450d49e57b7453dce9031ce68b056b2f1cdad5c2218ab7232ad
Dump transaction successfully

******************************
****** Input[0].Lock ******

hello, this is new add!
Hashed 1148 bytes in sighash_all
sighash_all = 5d9b2340738ee28729fc74eba35e6ef969878354fe556bd89d5b6f62642f6e50
event = {"pubkey":"45c41f21e1cf715fa6d9ca20b8e002a574db7bb49e96ee89834c66dac5446b7a","tags":[["ckb_sighash_all","5d9b2340738ee28729fc74eba35e6ef969878354fe556bd89d5b6f62642f6e50"]],"created_at":1725339769,"kind":23334,"content":"Signing a CKB transaction\n\nIMPORTANT: Please verify the integrity and authenticity of connected Nostr client before signing this message\n","id":"90af298075ac878901282e23ce35b24e584b7727bc545e149fc259875a23a7aa","sig":"b505e7d5b643d2e6b1f0e5581221bbfe3c37f17534715e51eecf5ff97a2e1b828a3d767eb712555c78a8736e9085b4960458014fa171d5d169a1b267b186d2f3"}
verify_signature costs 3654 k cycles
Run result: 0
Total cycles consumed: 4013717(3.8M)
Transfer cycles: 44947(43.9K), running cycles: 3968770(3.8M)

******************************
****** Output[0].Type ******

verify_signature costs 3654 k cycles
Run result: 0
Total cycles consumed: 3916670(3.7M)
Transfer cycles: 43162(42.2K), running cycles: 3873508(3.7M)
```

If you want to debug a single cell script in the transaction, you can use the following command:

```sh
Expand Down
13 changes: 0 additions & 13 deletions example-mol/attributes.mol

This file was deleted.

25 changes: 0 additions & 25 deletions example-mol/basic_types.mol

This file was deleted.

22 changes: 0 additions & 22 deletions example-mol/role.mol

This file was deleted.

33 changes: 0 additions & 33 deletions example-mol/skills.mol

This file was deleted.

0 comments on commit 50759c3

Please sign in to comment.