capsule icon indicating copy to clipboard operation
capsule copied to clipboard

Suggestions of UX improvement

Open jjyr opened this issue 2 years ago • 4 comments

ckb-capsule leverage ckb-cli and docker to manage pks and build environment, but sometimes those tools block users' experience.

In #77 , the new version of ckb-cli brokes the capsule's feature. In the end, we need to release a new version to be compatible with the new version ckb-cli. What if a user upgrades the capsule to the latest version but stays with an old version of ckb-cli? The capsule command is still broken!

Capsule requires docker to build binaries. It is for the reproducible build. But when the docker image is x86, you cannot build it on a non-x86 device. To improve the developer's UX, we should support build without docker.

Due to the above reasons, I suggest the following feature/refactoring.

  1. Build improvement
    1. Support non-docker mode. Remove the dependency of docker.
    2. Allow customized build commands.
    3. Support multi-language by separated binaries, such as ckb-capsule-rust, ckb-capsule-c, and ckb-capsule-lua.
      1. We can release a new version of language build support without releasing a new capsule.
  2. ~~Deployment improvement~~
    1. ~~capsule should output a hexed encoded transaction. Let ckb-cli handle the signing and sending.~~
    2. Remove the deploy command, since ckb-cli support deploy https://github.com/nervosnetwork/ckb-cli/wiki/Deploy-contracts
  3. Testing improvement
    1. Manipulate chain context needs to be simplified. The chain should act as a Gananche-like chain simulator.
    2. The transaction build should be simplified.
    3. Reference to system scripts should be simplified.

jjyr avatar Feb 20 '23 04:02 jjyr

Now that ckb-cli supports deployment (https://github.com/nervosnetwork/ckb-cli/wiki/Deploy-contracts), is it still necessary for capsule to have a deployment functionality?

blckngm avatar Feb 20 '23 05:02 blckngm

Capsule can add the ckb-std dependency to the Cargo.toml file in template.

KaoImin avatar Mar 08 '23 08:03 KaoImin

Can Capsule ckb-testtool support the script whose hash_type is type?

duanyytop avatar Mar 09 '23 07:03 duanyytop

Can Capsule ckb-testtool support the script whose hash_type is type?

Does this work?

https://docs.rs/ckb-testtool/latest/ckb_testtool/context/struct.Context.html#method.create_cell

blckngm avatar Apr 13 '23 07:04 blckngm