Context-aware smart contracts for blockchain IoT systems

Overview

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

You might also like...

♦ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS.

♦ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS.

Crowdcoin ♦ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS. Project from "Ethereum and Solidity: T

Dec 14, 2022

Cooperative databases using smart contracts.

Cooperative databases using smart contracts.

Vitra ██╗ ██╗██╗████████╗██████╗ █████╗ ██║ ██║██║╚══██╔══╝██╔══██╗██╔══██╗ ██║ ██║██║ ██║ ██████╔╝███████║ ╚██╗ ██╔╝██║ ██║ ██╔══██╗██

Dec 30, 2022

Run CosmWasm smart contracts in Node.js and web browsers

Run CosmWasm smart contracts in Node.js and web browsers

Nov 25, 2022

A 'to do list' powered by Ethereum smart contracts

A 'to do list' powered by Ethereum smart contracts. built with JavaScript, Ganache, Truffle, Node.js, Metamask, jQuery, and Bootstrap

Feb 17, 2022

This is the main repository for NFT collection dao smart contracts.

Basic Sample Hardhat Project This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample s

Apr 11, 2022

Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections

eznft Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collec

Sep 21, 2022

a quick start boilerplate for developing web3 apps and deploying smart contracts.

create-web3 A boilerplate for starting a web3 project. This boilerplate quickly creates a mono repo with 2 environments, a Next JS environment for fro

Dec 16, 2022

🚀 NFTank (NFT tank for dummies) will allow developers to quickly request NFTs to personal wallets or smart contracts in just a few clicks.

🚀 NFTank (NFT tank for dummies) will allow developers to quickly request NFTs to personal wallets or smart contracts in just a few clicks.

👷‍♂️ NFTank 🚀 NFTank (NFT tank for dummies) will allow developers to quickly request NFTs to personal wallets or smart contracts in just a few click

Nov 8, 2022

Toolkit for development, test and deploy smart-contracts on Waves Enterprise ecosystem.

JS Contract SDK Toolkit for development, test and deploy smart-contracts on Waves Enterprise ecosystem. Quickstart The fastest way to get started with

Dec 15, 2022
Owner
ibelab
Intelligent Blockchain Engineering Lab., Department of Computer Science and Engineering, Korea University.
ibelab
JellyChain1 is a blockchain network platform that supports smart contracts and can act as a payment system/cryptocurrency

JellyChain1 is an experimental blockchain network, that will serve as a starter blockchain test network and scale out database software and other applications. JellyChain1 is created to cut energy costs when mining transactions on the blockchain.

JellyChain 10 Dec 1, 2022
Using a Decentralized Application (DApp) to Sell artwork on the Ethereum blockchain with smart contracts written in Solidity.

Decentralized Applications For Selling Limited Time Artwork This repository houses the Solidity, JavaScript, and HTML code for a Decentralized Applica

Keyan Ahmadi 4 Mar 20, 2023
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

Nathanael Garza 2 Jan 21, 2022
ACME client microservice for the Cumulocity IoT Edge to automatically issue and renew valid certificates via e.g. Let's Encrypt.

Cumulocity IoT Edge - ACME This repository contains the sources for an ACME microservice that can be used to periodically issue/renew certificates for

Software AG 3 May 3, 2022
Boilerplate starter template for a new TON blockchain project - FunC contracts, JS tests, compilation and deployment scripts

TON Starter Template - Contracts Starter template for a new TON project - FunC contracts, JS tests, compilation and deployment scripts Overview This p

TON DeFi Ecosystem 44 Dec 17, 2022
A collection of smart contracts for the Stackup platform 🤖 📑

Contracts A collection of smart contracts for the Stackup platform. Dev Blog Deployed Contracts See releases for deployed contracts of previous versio

Stackup 16 Nov 29, 2021
Ethereum Smart Contracts for locking your Ether and ERC20 tokens based on time and price conditions

SmartHold - a simple way to lock and hold your ETH or ERC20 in a smart contract This is a BETA software that has not been audited for security. USE AT

Paweł Urbanek 22 May 5, 2022