#capsule #ckb #framework #nervos #smart-contracts #script #lua

bin+lib ckb-capsule

Capsule is a development framework for creating smart contract for Nervos' CKB

20 releases

0.10.4 Mar 15, 2024
0.10.2 Nov 3, 2023
0.10.1 Jun 19, 2023
0.9.0 Nov 22, 2022
0.4.4 Nov 24, 2020

#432 in Magic Beans

Download history 53/week @ 2023-12-20 31/week @ 2023-12-27 164/week @ 2024-01-03 48/week @ 2024-01-10 17/week @ 2024-01-17 33/week @ 2024-01-24 96/week @ 2024-01-31 5/week @ 2024-02-14 22/week @ 2024-02-21 11/week @ 2024-02-28 3/week @ 2024-03-06 172/week @ 2024-03-13 13/week @ 2024-03-20 19/week @ 2024-03-27 16/week @ 2024-04-03

221 downloads per month

MIT license

1MB
4.5K SLoC

Capsule

Github Actions Rust crate

Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.

Capsule consists of:

  • Capsule CLI - Scaffolding tool.
  • CKB-testtool - CKB scripts testing framework.

CKB supports several programming languages for writing scripts, and the language supporting libraries are maintained in the following repositories:

Capsule

Installation

Supported Environments

  • Linux
  • macOS
  • Windows (WSL2)

Prerequisites

The following must be installed and available to use Capsule.

$ cargo install cross --git https://github.com/cross-rs/cross

Note: All commands 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

Cargo install

Install the latest version

cargo install ckb-capsule

Install the develop branch

cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule.git --branch develop

Usage

capsule help

Quick Start

# check environment
capsule check

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

Project Layout

  • capsule.toml - Capsule manifest file.
  • contracts - Contracts directory.
  • tests - Contracts tests.
  • build - Contracts binaries.

Documentation

Capsule Wiki on GitHub

Upgrading to Capsule 0.10

Upgrade an existing project to capsule 0.10

LICENSE

MIT

Dependencies

~39–77MB
~1M SLoC