- Install
Git
- Install
Node.js 16 LTS
- Download latest
ckb (Portable)
, tested withckb 0.109.0
- Extract the
ckb
compressed folder and renamed it to~/ckb
This is section takes material from both Nervos devchain guide and Ian instructions.
From within ~/ckb
:
- Init devchain:
ckb init --chain dev
- In the
ckb.toml
file under the[block_assembler]
section set:
[block_assembler]
code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
args = "0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d7" # ckt1...gwga account
hash_type = "type"
message = "0x"
- In the
ckb.toml
file under the[block_assembler]
section set:
[logger]
filter = "info,ckb-script=debug"# instead of "info"
# Other parameters...
- In the
specs/dev.toml
file under the[params]
section set:
[params]
# Other parameters...
epoch_duration_target = 2 # instead of 14400
genesis_epoch_length = 2 # instead of 1000
permanent_difficulty_in_dummy = true
- In the
ckb-miner.toml
file under the[[miner.workers]]
section set:
[[miner.workers]]
# Other parameters...
value = 200 # instead of 5000
- In a new terminal start ckb node and miner:
(trap 'kill -INT 0' SIGINT; cd ~/ckb/; ckb run --indexer & sleep 1 && ckb miner)
- Download this repo in a folder of your choice:
git clone https://github.com/ickb/v1-bot-demo.git
- Enter into the repo:
cd v1-bot-demo
- Install dependencies:
npm i
- Run bot demo:
npm run start