capsule
capsule copied to clipboard
ckb-testtool enhanchment
Chain simulator
- [ ] Provide a function to set up a devnet chain, including built-in contracts and the genesis block.
- [ ] Provide a high-level interface of the dev-chain to replace the Context.
Helper functions
- [ ] Prepare the address with CKB for testing.
- [ ] ~~Signer abstraction(single lock, multi-sig lock, rc lock).~~
- [ ] ~~Automatically complete the transaction inputs with a sender address.~~
Debugger
- [ ] Support easily build & export a ckb-debugger format transaction
Copying/editing from #88:
I think we should try to make it easier to debug/profile transactions from ckb-testtool, e.g. we can add a function to dump a transaction in the format expected by ckb-debugger.
After second thoughts, I think we should focus on implementing a CKB RPC-compatible simulator chain instead of providing more testing helper functions.
Compared to the CKB dev chain, we should have the advantage in the following aspects:
- Easily mock cells and blocks to simulate different scenarios.
- Record failed transactions and provide a way to replay them.
- Output diagnosis for failed transactions.
- Support different submit modes.
Other Dapp developers can connect to the simulator chain to debug their Apps without any modification.