Git Product home page Git Product logo

capsule's Introduction

Capsule

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:

  • Scaffolding for new projects.
  • Building of RISC-V binaries for Nervos CKB-VM.
  • Local execution of smart contract scripts via Docker.
  • Automated testing of smart contract scripts.
  • Configurable deployment of scripts to Nervos CKB.
  • Generation of simulated transaction data for debugging.

Installation

Supported Environments

  • Linux
  • MacOS
  • Windows (WSL)

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.1

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

  • capsule.toml - Capsule manifest file.
  • deployment.toml - Deployment configuration.
  • contracts - Contracts directory.
  • tests - Contracts tests.
  • build - Contracts binaries.
  • migrations - Deployment histories.

Documentation

Capsule Wiki on GitHub

LICENSE

MIT

capsule's People

Contributors

jjyr avatar jordanmack avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.