Skip to content

A Blockchain-based Decentralized Crowd-sensing System

Notifications You must be signed in to change notification settings

Ohyoukillkenny/BCS

Repository files navigation

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.

About

A Blockchain-based Decentralized Crowd-sensing System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published