Context-aware smart contracts for blockchain IoT systems
It contains 2 directories:
contracts: contains the
ContextAwareSmartContract.solcontract with the artifacts.
app folder contains app.js script for connecting with the
For the deployment of the contract,
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
- Download all necessary dependencies and libraries required of your system to run and the Quorum blockchain Blockchain:
- Virtual box/Docker
- Node js
- Set up your Quorum client or create the quorum blockchain
- Set up your Quorum nodes number and node urls
- Deploy a decentralized application at the IoT gateway node(s) connected to the blockchain node (s)
- Connect web3 to your Quorum nodes on the DApp
- Deploy the smart contract on Quorum (sandbox) or remix
- Connect DApp with smart contract ( bytecode, json, abi)
- Send a private transactions and interact with contract privately by running the app.js on the terminal.
Output from script will appear in terminal.
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