Skip to content

Instantly share code, notes, and snippets.

@TheWaWaR
Last active August 21, 2020 16:00
Show Gist options
  • Save TheWaWaR/0f48e472cb20a75230d699b190f62800 to your computer and use it in GitHub Desktop.
Save TheWaWaR/0f48e472cb20a75230d699b190f62800 to your computer and use it in GitHub Desktop.
## Build the contract
make all-via-docer
# - build/script-binary
# - build/script-binary.debug
## Deploy to CKB
depoly-to-ckb build/script-binary
## Error when send a transaction
ckb-cli tx send --tx-file xx.json
ValidationError(-45)
## Dump the transaction for ckb-debugger to use
ckb-cli mock-tx dump --tx-file xx.json --output-file dumped-tx.json
## Start ckb-debugger
ckb-debugger --script-group-type type -e input -i 0 --tx-file dumped-tx.json -l localhost:4455
## Debug use gdb
riscv64-unknown-elf-gdb -s build/script-binary.debug -e build/script-binary
(gdb) target remote localhost:4455
(gdb) b source-file.c:34
(gdb) c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment