Home

Awesome

Capsule

Capsule is still under active development and considered to be a work in progress.

Capsule is a development framework for creating smart contract scripts in Rust for Nervos' CKB layer 1 blockchain. Capsule is designed to provide an out-of-the-box solution that helps Nervos developers accomplish common tasks quick and painlessly.

Capsule provides the following functionality:

Installation

Supported Environments

Prerequisites

The following must be installed and available to use Capsule.

Note: Docker and ckb-cli must be accessible in the PATH in order for them to be used by Capsule.

Note: The current user must have permission to manage Docker instances. How to manage Docker as a non-root user.

Install binary

Download the latest release

Install from source code

cargo install capsule --git https://github.com/nervosnetwork/capsule.git --tag v0.1.0

Usage

USAGE:
capsule [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    check           Check environment and dependencies
    new             Create a new project
    new-contract    Create a new contract
    build           Build contracts
    run             Run command in contract build image
    test            Run tests
    deploy          Deploy contracts, edit deployment.toml to custodian deployment recipe.
    debugger        CKB debugger
    help            Prints this message or the help of the given subcommand(s)

Quick Start

# check environment
capsule check

# create project
capsule new my-demo
cd my-demo
capsule build
capsule test

Project Layout

Documentation

Capsule Wiki on GitHub

LICENSE

MIT