Code Monkey home page Code Monkey logo

context-sware-smart-contracts-for-blockchain-iot's Introduction

Context-aware smart contracts for blockchain IoT systems

It contains 2 directories:

  1. contracts: contains the ContextAwareSmartContract.sol contract with the artifacts.
  2. app: contains JavaScript application scripts for the DApp (decentralized application).

Directories

The app folder contains app.js script for connecting with the ContextAwareSmartContract.sol contract. For the deployment of the contract, address and totalDevicesPowerValue should be updated (according to the devices you are testing).

To run a script, type in terminal sudo node app.js. Remember, Solidity file must be compiled.

Deployment of the system

  1. Download all necessary dependencies and libraries required of your system to run and the Quorum blockchain Blockchain:
  • Vagrant
  • Virtual box/Docker

dApp libraries:

  • Node js
  • pigpio
  • OnOff
  • web3.js

Sensors libraries:

  • node-dht-sensor
  • mcp-spi-adc
  1. Set up your Quorum client or create the quorum blockchain
  2. Set up your Quorum nodes number and node urls
  3. Deploy a decentralized application at the IoT gateway node(s) connected to the blockchain node (s)
  4. Connect web3 to your Quorum nodes on the DApp
  5. Deploy the smart contract on Quorum (sandbox) or remix
  6. Connect DApp with smart contract ( bytecode, json, abi)
  7. Send a private transactions and interact with contract privately by running the app.js on the terminal.

Output from script will appear in terminal.

Publication

L. Ngwira, M. M. Merlec, Y. K. Lee and H. P. In, "Towards Context-Aware Smart Contracts for Blockchain IoT Systems," 2021 International Conference on Information and Communication Technology Convergence (ICTC), 2021, pp. 82-87, doi: 10.1109/ICTC52510.2021.9620961.

iBELab - Intelligent Blockchain Engineering Lab.

https://ibel.korea.ac.kr/ - Korea University

context-sware-smart-contracts-for-blockchain-iot's People

Contributors

mlecjm avatar

Stargazers

 avatar  avatar  avatar  avatar ibelab avatar  avatar  avatar

Watchers

 avatar  avatar ibelab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.