Skip to content

Starting the application

Arora edited this page Mar 23, 2021 · 6 revisions

Starting the application and navigating the project

Dependencies

Install the following:

  • NodeJS, 10.x
  • MongoDB
  • Git
  • Java
  • GCC
  • NuXmv

The NuXmv tool is crucial to run the verification locally Note: If you are using the docker image to test locally, you MUST download the Linux version Extract the downloaded file and place the contents of the "bin" folder (nuXmv file) into the verification tools folder in the project


If this is the first time you are running the application run all the steps below. Otherwise, just run from step 4.

It is also possible to use a docker image to run right away (Recommended).

  1. Clone the repository:
git clone https://github.com/fcpranav/move-smart-contracts.git
  1. Install the necessary packages:
cd move-smart-contracts
npm install
  1. Build React Scripts
npm run-script build
  1. Start the local MongoDB server:
mkdir sc_data
mongod --dbpath ./sc_data
  1. Start the application:
npm start
  1. Visit the application on http://127.0.0.1:8888/

Once you visit http://127.0.0.1:8888/, you will be asked to open a project. If none are available, click on "Create new...", give it a name, and click on "Create". The program will then ask you to base your project on a previous pre-defined project/seed, select "Move-Smart-Contract" (the default setting) and continue by clicking "Create".

Create a new project: create_new_project

Creating an example project: example_project

Choosing a seed: choose_seed

In the initial screen, you can create elements based on the options in the left-hand panel under the Visualizer Selector.

Here is the example of the initial screen appearance: initial_screen

Moving inside the "Contracts" element already on the board, you will see the predefined "auction" contract. Inside of this is the model for the smart contract we have built.

Auction contract: auction_contract

Auction FSM model: auction_model