Skip to content

8LabSolutions/Soldino_Docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpvc

Soldino

Table of contents

References

https://www.math.unipd.it/~tullio/IS-1/2018/Progetto/C6.pdf

Software Engineering project at University of Padua, developed for Red Babel, by 8Lab Solutions.

Getting started

In order to run Soldino you must have:

  • git
  • nodejs v10.15.1 or later see references
  • npm v3.5.2 or later see references
  • truffle v5.0.5 see references
  • one or both:
    • Ganache GUI if you want an user interface for the local blockchain.
    • ganache-cli if you want fast local blockchain on command line.
  • metamask plugin for Google Chrome v64 or later or Mozilla Firefox v71 or later

Note : both Ganache GUI and ganache-cli (this is provided by default) must be set with port 9545 in order to run Soldino on the development environment, this port can be set later.

Installation

Ubuntu

  1. download or clone (git clone https://github.com/8LabSolutions/Soldino-PoC.git ) this repository
  2. run $ npm install in the repository folder (Soldino-PoC folder), it may take a while
    • If you have trouble with $ npm install run $ sudo apt-get install build-essential and retry run npm install
  3. done!

Windows

  1. download or clone (git clone https://github.com/8LabSolutions/Soldino-PoC.git ) this repository
  2. run $ npm install in the repository folder (Soldino-PoC folder), it may take a while
  3. done!

Note: npm run coverage doesn't work on Windows, so you can't use the coverage environment.

Content of the repository

The project's folders are organized in this way:

├── contracts/ (all solidity contracts' files)
|      ├── logic/ (logic contracts)
|      └── storage/ (storage contracts)
├── migration (files used to migrate contracts)
├── src/ (redux-react, web3 and ipfs folder)
|      ├── actions/ (all redux actions)
|      ├── actionCreators/ (all redux action creators)
|      ├── auxiliaryFunctions/ (utils functions for react and redux )
|      ├── components/
|      |    ├── containers/ (redux containers)
|      |    └── presentational/ (react presentational components)
|      ├── constants/ (utils for redux)
|      ├── contracts_build/ (jsons of contracts)
|      ├── facade/ (users classes)
|      ├── ipfsCalls/ (utils functions for connection to ipfs)
|      ├── reducers/ (all redux reducers)
|      ├── store/ (redux store)
|      ├── styles/ (css files)
|      └── web3functions/ (utils functions for connection to web3)
└── test/ (classes test system)

The folders organization separates the back end ad front end.


Configure Soldino for the local envirorment

In the truffle-config.js you can set all the options for your environment. There are three default environments configured:

  • development : used as local environment it has the 9545 port set.

  • coverage: used for the test coverage environment, port 8545.

    To use this environment for run $ npm run coverage, it will not open the web page.

    Note: npm run coverage doesn't work on Windows.

  • ropsten: used to migrate contracts onto Ropsten test network.

Configure Ganache

In order to run Soldino DApp you have to open Ganache first. If you want to use ganache-cli open a new terminal and run $ ganache-cli -p 9545 this will open a local blockchain on the port 9545. To see other configuration options please visit the ganache-cli repository.

Otherwise, if you want to use Ganache GUI please follow these steps:

  1. Open Ganache and click on "quickstart".
  2. Click on the gear icon rotella in the top-left corner.
  3. In the "SERVER" tab set 9545 in the "PORT NUMBER" field.
  4. Click the "Save and restart" button in the top-left corner.

Run Soldino on the development environment

Run $ npm start. This command will deploy the contracts in migrations/2_deploy_contracts.js, Soldino will run on the development environment.

Soldino will open in your default browser on address: localhost:3000

Metamask will open at the same time.

On Metamask tab, use option Import using account seed phrase.

Copy and paste MNEMONIC phrase that you can find on Ganache GUI on top of homepage.

Otherwise, if you use ganache-cli you can find it in terminal where you run $ ganache-cli -p 9545.

Insert new password, confirm it and click "Restore".

When you are logged in on Metamask, click the link on top-right of the tab and select "Custom RPC".

In "New RPC URL" textbox insert http://localhost:9545. 

and click "Save" button.

Now you can enjoy Soldino!!

Costs

Soldino runs on Ethereum, where every transaction performed has a cost.
Every transaction comes with a gas price. Gas is like the fuel of Ethereum.
Here we have the gas cost of deploying the contracts and calling the functions contained in those contracts.

gpvc gpvc

You may wanna try Soldino on Ropsten, a test network for Ethereum, before taking the big step.
These are the costs on Ropsten.

gpvc gpvc

When you feel ready, land on the Main net, and enjoy the revenue of Soldino!
These are the costs.

gpvc gpvc

Authors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages