Skip to content

HAECHI-LABS/vvisp-sample

Repository files navigation

vvisp-sample

Sample repository about utilizing vvisp

Quick Usage

1. Install vvisp

$ npm install -g @haechi-labs/vvisp
#or you can run
$ yarn global add @haechi-labs/vvisp

2. Initialize your directory

$ vvisp init vvisp-sample
$ cd vvisp-sample

$ npm install #or yarn install

3. Make your Contracts at contracts/

Now, you can use gen-script, compile and flatten commands.

4. Set vvisp-config.js file

Please set environment variables in vvisp-config.js file. See here for more information about vvisp-config.js. Now you can use deploy-contract command.

5. Set service.vvisp.json file

Please set information about your DApp service in service.vvisp.json. See here for more information about service.vvisp.json. Now you can use deploy-service command.

Quick Deployment of This Sample Repository

Download sample repository for test.

git clone https://github.com/HAECHI-LABS/vvisp-sample

Deploy First Version

  1. Sample service.vvisp.json file is already made.
  2. Default network is localhost:8545. Use your own client or ganache-cli. (npm install -g ganache-cli and ganache-cli)
  3. Make from variable in vvisp-config.js. See details. If you use ganache, get the mnemonic key used in ganache and enter it.
  4. Run vvisp deploy-service at root directory. It will act like this demo.
  5. Wait for deploying the sample app. Then, state.vvisp.json will be generated. This file is necessary to upgrade your service

Upgrade to Second Version

Add contract property at service.vvisp.json#contracts like:

"contracts": {
  ...
  "NewContract": {
    "path": "contracts/NewContract.sol"
  }
}

Then, run vvisp deploy-service. It will act like this demo.

Use console

If the service is already deployed and has state.vvisp.json(necessary), you can operate your contracts with vvisp console.

First, make apis of contracts which are written in state.vvisp.json.

 $ vvisp gen-script

Then run vvisp console and operate functions of your contracts.

Contract

  • Create your own contracts in contracts/ directory.

Test

  • We support use truffle framework.
  • Create test files in test/ directory.
  • Run npm run test to test all test files in test/ directory or npm run test <fileName> to test specific file.

Deploy

  • Make vvisp-config.js and service.vvisp.json.

Please see linked documentation below for details:

Contact

About

The sample repository which utilizes vvisp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •