All Projects → ObsidianLabs → Ckb Studio

ObsidianLabs / Ckb Studio

Licence: gpl-3.0
An IDE to develop CKB scripts for Nervos blockchain

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ckb Studio

Cakeshop
An integrated development environment and SDK for Ethereum-like ledgers
Stars: ✭ 491 (+216.77%)
Mutual labels:  blockchain, ide
Buidl
A browser-based IDE for creating, deploying, and sharing blockchain apps (DApps, or decentralized apps). Publish your first blockchain DApps in 5 minutes! Here is how: https://docs.secondstate.io/buidl-developer-tool/getting-started
Stars: ✭ 376 (+142.58%)
Mutual labels:  blockchain, ide
Superblocks Lab
Superblocks Lab for DApp development
Stars: ✭ 100 (-35.48%)
Mutual labels:  blockchain, ide
Webase
WeBank Blockchain Application Software Extension
Stars: ✭ 402 (+159.35%)
Mutual labels:  blockchain, ide
Confluxstudio
An IDE to develop smart contracts on the Conflux blockchain
Stars: ✭ 142 (-8.39%)
Mutual labels:  blockchain, ide
Blockchain rd checklist
blockchain resources list
Stars: ✭ 148 (-4.52%)
Mutual labels:  blockchain
Space Daemon
The Space Daemon packages together IPFS, Textile Threads/Buckets, and Textile Powergate (Filecoin*) into one easy to install Daemon to make it easy to build peer to peer and privacy focused apps.
Stars: ✭ 151 (-2.58%)
Mutual labels:  blockchain
Advanced Eos Examples
EOS Smart Contract Development Examples
Stars: ✭ 146 (-5.81%)
Mutual labels:  blockchain
Node
Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockchain network.
Stars: ✭ 147 (-5.16%)
Mutual labels:  blockchain
Nvcode
An IDE layer for Neovim with sane defaults. Completely free and community driven.
Stars: ✭ 6,714 (+4231.61%)
Mutual labels:  ide
Komodoedit
Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
Stars: ✭ 1,972 (+1172.26%)
Mutual labels:  ide
Erc20 Rest Service
ERC-20 token standard RESTful service using Spring Boot and web3j
Stars: ✭ 150 (-3.23%)
Mutual labels:  blockchain
Mint
Mint Blockchain — Build blockchain powered social apps
Stars: ✭ 148 (-4.52%)
Mutual labels:  blockchain
Hyperledger Fabric Gm
支持国密加密算法的Hyperledger Fabric版本
Stars: ✭ 152 (-1.94%)
Mutual labels:  blockchain
Raiden
Raiden Network
Stars: ✭ 1,825 (+1077.42%)
Mutual labels:  blockchain
Defi Score
DeFi Score: An open framework for evaluating DeFi protocols
Stars: ✭ 152 (-1.94%)
Mutual labels:  blockchain
Sablier
The protocol for real-time finance on the Ethereum blockchain
Stars: ✭ 147 (-5.16%)
Mutual labels:  blockchain
Awesome Token Sale
Curated list of token sale resources / ICO resources
Stars: ✭ 149 (-3.87%)
Mutual labels:  blockchain
Chainlink Ruby
Easily connect your applications to blockchains
Stars: ✭ 152 (-1.94%)
Mutual labels:  blockchain
Ebtc
eBitcoin (eBTC) is an ERC20 token. Its primary utility is to provide an easy & fast payment solution. Its edge over other tokens is that it is capable of sending up to 255 payments in a single transaction.
Stars: ✭ 149 (-3.87%)
Mutual labels:  blockchain

CKB-Studio

CKB Studio is an IDE to develop CKB scripts on the Nervos blockchain. It includes

If you want to learn more about how to use CKB Studio, please go to the Tutorials section.

Installation

Download

Installation packages are provided in releases. Please select the appropriate format according to your operating system (.dmg or .zip for Mac OS, .exe for Windows, or .AppImage for Linux).

Install

  • MacOS: Double-click to open CKBStudio-x.x.x.dmg and drag CKB Studio into the Applications folder.
  • Windows: Double-click CKBStudio-x.x.x.exe to install CKB Studio. If you see a warning window for unrecognized app, click more info and then click the Run anyway button to start the installation.
  • Linux: Right-click CKBStudio-x.x.x.AppImage, select Properties => Permissions => Execute, and check the option Allow executing file as progrom. Close the property window and double-click the application to open it (different Linux systems may have slightly different installation procedures).

Feature Walkthrough

Install Dependencies for CKB Development

When CKB Studio is started for the first time, it will display a welcome page to help you install the dependencies for CKB development - Docker, CKB Node and CKB Compiler.

  • CKB Studio uses Docker to run CKB node and the compiler. If you don't have Docker installed before, click the Install Docker button to open the Docker official website and follow the instructions to download and install.
  • CKB Node (nervos/ckb) contains all the necessary softwares and dependencies to start a CKB node.
  • CKB Indexer (nervos/ckb-indexer) is an application that keeps track of live cells and transactions for specified address (lock script).
  • Capsule (obsidians/capsule) is development framework for creating CKB smart contract scripts in Rust language.
  • CKB Compiler (nervos/ckb-riscv-gnu-toolchain) contains all the necessary softwares and dependencies to compile CKB scripts in C.

For each of the required libraries, you can select from different versions to install in the dropdown menu. The latest version is always recommended.

CKB Script Editor

Project List

The main interface will show a list of CKB projects. If you open CKB Studio for the first time, this list will be empty. You can click the New button to create a new CKB project. CKB Studio has provided a list of templates to help you get started:

  • [Rust] CKB project in Rust
  • [JavaScript] moleculec-es
  • [JavaScript] molecule-javascript
  • [JavaScript] minimal
  • [JavaScript] HTLC
  • [C] carrot
  • [C] Simple UDT
  • Duktape

After a project is created, CKB Studio will automatically navigate to the project editor.

Compiler

Click the Build button (with the hammer icon) in the project toolbar (above the file tree) to compile the current CKB project. CKB Studio will choose the right compiler to use depending on the project language (JavaScript or C).

There is an extra step before building a JavaScript project. You will need to type the command npm install or yarn manually in the terminal to install the project dependecies.

The compiled files will be at different locations based on the project language:

  • build/* for JavaScript project
  • {script_name}.o for C project

Debugger

CKB Studio has integrated the CKB debugger. Click the Debug button (with the bug icon) in the project toolbar to debug the current CKB project.

The debugger will run the mocked transaction defined in mock/tx.json (or the file defined in the project settings). It will help you run the CKB script and check the execution result very easily.

CKB Keypair Manager

Click the green button (with the key icon) in the bottom left corner to open the keypair manager. In the keypair manager, you can create, import, and manage CKB keys. Make sure you created some keypairs before creating a CKB node. To initialize a CKB node, you will need a miner address to receive the mining rewards.

Please note that all keys in the keypair manager are for development purpose only. The private keys are saved unencrypted so DO NOT use them on the mainnet.

CKB Node Manager

Create a Node Instance

Click the Network tab in the header to open the CKB network manager, where you can manage instances for CKB nodes and start running a CKB network. If you open CKB Studio for the first time, the instance list will be empty.

To create a new CKB node instance, click the New Instance button. You need to select a block assembler as the miner so make sure you have created keypairs in the Keypair Manager.

Start a CKB Node

Click the Start button to start a CKB node. Once the node is started, you can see the node log, indexer log, and miner log in the terminals below.

Switch Networks

In the Network dropdown menu you can switch to other networks such as the Aggron testnet or the CKB mainnet. Switching the network will stop your curretnly running instance.

CKB Explorer

In the Explorer tab, you can look at basic account information and transaction history.

CKB Transaction Constructor

CKB has a special cell-based structure for its transactions. The TX Constructor is a dedicated client to facilitate the construction of CKB transactions.

Cell Explorer

Cells are the fundamental elements to form CKB transactions. The bottom half of the interface is a cell explorer where you can look through available cells (live cells) for each address. To learn more about CKB cells, please refer to the cell model.

In the cell explorer, you can

  • Check the total number and total capacity of live cells
  • Double-click a cell to look at its detailed information
  • Use the show empty cells toggler to show/hide empty cells (cells that do not have data & type script)
  • Drag cells to Inputs or Deps to construct transactions
  • Generate CKB transactions for specific types (see below)

Assemble General Transactions Manually

If you want to make a general transaction, you need to assemble the input, output, and dep cells manually using the transaction constructor. You probably need to use some empty cells, so remember to turn on the show empty cells toggler to display them in the cell explorer. Drag the cells you need to Inputs and Depts, and click the new button next to Outputs to create output cells.

Once the inputs, deps and outputs are set properly, click the Push Transaction button where you can see the raw transaction object. Select keys you want to use to sign the transaction and click the Sign Transaction button. CKB Studio will load required private keys to finish the signing, and update the transaction object with witnesses data. Then you can click the Push Transaction button to submit the transaction, and wait until it is confirmed by the CKB network.

Generate Transactions of Specific Types

For some specific types of transactions, CKB Studio can help you determine which cells to use and combine them into a transaction. The following types of transactions are supported now

For example, click the Transfer button next to search bar to open the Transfer window. You can type in the amount and the recipient address, and CKB Studio will look through all available empty cells and generate a transaction that satisfies your entered values. You can also use the same button to transfer a UDT token. Next, following the same procedures as described above to sign the transaction and push it to the running CKB network.

Tutorials

Tutorials by Jonathan Caras

Video Tutorials by Phil (in Chinese)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].