Vision-Box Getting Started

Installation

OS requirement
-NodeJs(5.0 +)
-Windows,Linux,or Mac OS X

npm install -g visionbox

📘

Installation premissions issue

If the command in the shell fails due to a permission issue, please follow this command to install again: sudo npm install -g visionbox --unsafe-perm=true --allow-root --save-dev grunt

📘

Note on Windows

For Windows, the best way to run VisionBox is to install an Ubuntu subsystem: https://docs.microsoft.com/en-us/windows/wsl/install-win10. After running Ubuntu from the prompt, proceed as usual. It is not recommended to run VisionBox from Powershell.

Initialize a VisionBox Project

Enter the following command under an empty folder to create an initialized project

visionbox init

The initialized project contains:

FileDescription
contractThe directory storing all smart contract files.
migrationsThe directory storing all javascript files for migration.
testThe directory storing all test scripts for testing the smart contract.
visionbox.jsThe configuration file of the project. Declare your Full Node address and Event Server and Solidity Version in this file.

Basic Commands

CommandDescription
initInitialize a VisionBox Project
compileCompiles all the smart contracts. The compiled result is stored into ./build/contracts.
This command only compiles files that have been modified since the last compile.
compile --compile-allRe-compiles all the smart contracts.
migrateDeploys the contract. This command only migrates changes since the last successful migration.
migrate --resetRe-migrates all the smart contracts.
test [path]Runs all test scripts. Test file name definition is optional. It also can be run with --reset flag.
consoleThe console supports the visionbox command.

Did this page help you?