Zilliqa / kaya

RPC Server for Zilliqa
https://www.zilliqa.com
GNU General Public License v3.0
39 stars 12 forks source link
scilla testrpc zilliqa

Kaya - Zilliqa's RPC client for testing and development

Discord chat Build Status

Deprecation Notice

This repository is deprecated. Please use isolated server for your local testing.

Introduction

Kaya is Zilliqa's RPC server for testing and development. It is personal blockchain which makes developing application easier and faster. Kaya emulates the Zilliqa's blockchain behavior, and follows the expected server behavior as seen in the zilliqa-js.

The goal of the project is to support all endpoints in Zilliqa Javascript API, making it easy for app developers to build Dapps on our platform.

Kaya is under development. See roadmap here.

Currently, Kaya supports the following functions:

Methods that are NOT supported:

In addition, the following features are not supported yet:

Getting Started

Installation

Kaya RPC server is distributed as a Node package via npm. Ensure that you have Node.js (>= 10.13.0).

npm install -g kaya-cli

Scilla files must be processed using the scilla-interpreter. The Scilla interpreter executable provides a calling interface that enables users to invoke transitions with specified inputs and obtain outputs.

Using Remote Scilla Interpreter (Default)

By default, Kaya RPC uses the remote scilla interpreter to process .scilla files. You do not have to change any configurations.

Using Local Scilla Interpreter

You can choose to use your own scilla interpreter locally. To do it, you will have to compile the binaries yourself from the scilla repository and transfer it to the correct directory within Kaya RPC.

Instructions:

  1. Ensure that you have installed the related dependencies: INSTALL.md
  2. Then, run make clean; make
  3. Copy the scilla-runner from [SCILLA_DIR]/bin into [Kaya_DIR]/components/scilla/
  4. Open config.js file and set the config.scilla.remote to false. Alternative, use -r false at startup.

Usage

Command Line

$ kaya-cli <options>

Options:

Example Usage

Presents

KayaRPC comes with a few preset configurations for lazy programmers:

Testing

Some of the functions in Kaya RPC are covered under automated testing using jest. However, scilla related transactions are not covered through automated testing. To test the CreateTransaction functionalities, you will have to test it manually.

From test/scripts/, you can use run node TestBlockchain.js to test the Kaya RPC. The script will make a payment transaction, deployment transaction and transition invocation.

License

kaya is released under GPLv3. See license here