0.2.22 • Published 5 years ago

dc-cli v0.2.22

Weekly downloads
6
License
GPL-3.0
Repository
github
Last release
5 years ago

CLI for Dao.Casino SDK

npm.io npm.io

Overview

DC-CLI is a command line wizard designed to smoothly download and deploy DAO.Casino SDK elements. The idea behind it is to reduce the number of similar manual operations (e.g. changing the same value at several points) and, subsequently, to reduce the risk of errors.

npm.ioSDK Documentation

Thus, whenever the game contract conditions (configuration values) are edited, the watch_contracts.js script designed to monitor contract status implements your updates environment-wide and redeploys the contract.

Prerequisites:

To use dc-cli, you need:

A developer is expected to be familiar with solidity to edit the game smart contract.

Note that the whole solution has been successfully tested on .nix OS's and Mac OS. It is supposed to be compatible with Windows, but no tests have been carried out so far. You may need to install additional applications.

Installation

To install DC-CLI, call:

 npm i -g dc-cli

Commands

dc-cli offers a list (a menu) of commands; each is responsible for a specific stage of SDK setup. There is a recommended order of commands, but it can be revised at developer's discretion, also dc-cli commands can be used separately at further stages of SDK life-cycle (e.g. to reset the environment).

npm.io

List

View the list of available Truffle templates (webpack, Vue, React). Choose one for your project.

Create

First command is called to pull the SDK container from the docker repository. Call the command and enter the path to folder where you want to deploy your local SDK. Then the container is pulled, the local test environment is deployed, smart contracts (.sol files) configured, accounts created. You can access the console in the browser at localhost:port_number.

Once complete, call dc-cli again and move to the next command.

To view logs, either use the relevant dc-cli command, or call: npm run

logs:bankroller

Start

This command starts the SDK browser console with a viable game example in it. Use the console to navigate between files, edit game logic.

Stop

This command stops the environment correctly. If you close the console manually, docker container will go on running in the background.

Logs

This command allows viewing dapp performance logs.

Build

This command compiles your contract settings for ropsten.

Deploy

This command publishes your contracts to ropsten and IPFS.

Publish

Makes the game available at gamemarket.

Whenever you call a command in dc-cli, you call package.json file. Acting as a "dashboard", the file, in turn, calls the relevant script to execute the selected command.

Console File Structure

The left side of the console window displays the file structure of the SDK environment within the folder where you choose to deploy it.

Basically, it contains files from Dao.Casino github repositories deployed and integrated on your local computer in way that allows you to immediately start developing games and/or launching your own platform.

The smart contract logic is stored in the contracts > tools folder. For detailed description of each contract, refer to the relevant section.

The game logic is stored in files within the dapp folder. For more details on each file, please refer to the relevant documentation section.

The dapp> config folder contains the script ensuring implementation of the protocol.

The test folder contains the tests that verify whether the protocol from DC.js is correctly implemented into the game logic (the sample game, DappTest.js, is used).

The view folder is designed for the game front-end visual elements.

0.2.22

5 years ago

0.2.21

5 years ago

0.2.20

5 years ago

0.1.36

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.15

5 years ago

0.2.13

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.55

6 years ago

0.2.54

6 years ago

0.2.53

6 years ago

0.2.52

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago