Zeus Getting Started

Overview

zeus-cmd is an Extensible command line tool. SDK extensions come packaged in “boxes”.

Boxes

  • EOSIO dApp development support
  • DAPP Services support

Hardware Requirements

Prerequisites

  • nodejs == 10.x (nvm recommended)
  • curl

Recommended (otherwise falling back to docker)

Install Zeus

npm install -g @liquidapps/zeus-cmd

Notes regarding docker on mac:

Recommended version: 18.06.1-ce-mac73

Upgrade

npm update -g @liquidapps/zeus-cmd

Test

zeus unbox helloworld
cd helloworld
zeus test

Samples Boxes

vRAM

  • coldtoken - vRAM based eosio.token
  • deepfreeze - vRAM based cold storage contract
  • vgrab - vRAM based airgrab for eosio.token
  • cardgame - vRAM supported elemental battles
  • registry - Generic Registry - the1registry

Misc.

Other Options

zeus compile #compile contracts
zeus migrate #migrate contracts (deploy to local eos.node)

Usage inside a project

zeus --help 

List Boxes

zeus list-boxes

Project structure

Directory structure

    extensions/
    contracts/
    frontends/
    models/
    test/
    migrations/
    utils/
    services/
    zeus-box.json
    zeus-config.js

zeus-box.json

    {
      "ignore": [
        "README.md"
      ],
      "commands": {
        "Compile contracts": "zeus compile",
        "Migrate contracts": "zeus migrate",
        "Test contracts": "zeus test"
      },
      "install":{
          "npm": {
              
          }
      },
      "hooks": {
        "post-unpack": "echo hello"
      }
    }

zeus-config.js

    module.exports = {
        defaultArgs:{
          chain:"eos",
          network:"development"
        },
        chains:{
            eos:{
                networks: {
                    development: {
                        host: "localhost",
                        port: 7545,
                        network_id: "*", // Match any network id
                        secured: false
                    },
                    jungle: {
                        host: "localhost",
                        port: 7545,
                        network_id: "*", // Match any network id
                        secured: false
                    },
                    mainnet:{
                        host: "localhost",
                        port: 7545,
                        network_id: "*", // Match any network id
                        secured: false
                    }
                }
            }
        }
    };

Notes regarding permissions errors:

Recommend using Node Version Manager (nvm)

sudo apt install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
exec bash
nvm install 10
nvm use 10

Or you can try the following:

sudo groupadd docker
sudo usermod -aG docker $USER

#If still getting error:
sudo chmod 666 /var/run/docker.sock