Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.48 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.48 KB

BCS — A simple Blockchain-based Crowdsensing System

Here we use a simple wifi-sensing task as an instance to show how our framework works.

Detailed introduction at: https://ohyoukillkenny.github.io/blog/2018/04/10/LearnSolidity5/

Installation:

  1. Configure MetaMask in google chrome.
  2. Install web3.js, detailed at official documents.

Then, in order to achieve the interaction between web3.js and smart contract, we need to build a virtualized server for local webpages. Here, we use lite-server to achieve this goal, which can be installed by:

  1. Input text in Command Line under the folder of web.js:
>> npm install lite-server --save-dev

Notes: If web.js is installed globally in the prior operation, the user needs to text innpm init first.

  1. open package.json, add text below inscripts:
"scripts": {    
    "dev": "lite-server"
  },
  1. If you want to play the role as the requester, you need to rename index-requester.html as index.html first; So as the worker, you need to rename index-worker.html as index.html first.
  2. After we get the index.html under current directory, text code below in the Command Line:
>> npm run dev

Important: You can find more detailed configuration at Youtube Video.