The objective of my thesis can be briefly described as: Design and implement a 2.0 version of Project Oaken's water-meter-acorn. Additional features are:
- Authentication via the Ethereum Blockchain
- Separate views for admin and customer
- Hourly recording of smart meter readings and payment history
Cut out intermediaries involved in the billing and payment process of water suppliers. Utilizing the reliable, distributed and tamper-proof characteristics of Blockchain infrastructure to improve services around one of the most valuable resources. See also Project Oaken's Video
It was a great opportunity for me to gain experiences about Ethereum, Smart Contracts and the related technologies.
- Bachelor thesis
Dapp/
├── contracts/ (Smart contracts)
├── migrations (truffle deployment)
├── public/ (html template)
├── img/ (images)
├── scss/ (scss source)
├── src/ (js|jsx source)
├── test/ (truffle tests)
The following instructions show how to run the Dapp (Decentralized Application) in combination with smart sontracts. The guide and resources to let the Raspberry Pi communicate with smart contracts can be found in this separate Readme.
- node >= 6.0.0
- npm >= 5.0.0
- truffle >= 4.0.0
npm install
// before calling npm start the first time
truffle compile
truffle develop
test
truffle develop
migrate
Only the Authentication smart contract must be deployed upfront to a network of your choice. Example on Etherscan. The received contract address has to be changed in the LoginButtonAction from deployed to .at(yourAddressHere)
authentication.deployed().then(function(instance) {
truffle compile
npm start
Log in the first time as admin (public address of user specified in the constructor of Authentication smart contract). See how it works: sequence_diagram
Must be a bug somewhere between web3, truffle-contract and MetaMask which effects the gasLimit computation for contract creation
If you have any additions or problems regarding this guide, just open an issue, create a pull request or send me a pm.
This project is licensed under the MIT License - see the LICENSE.md file for details
- CoreUI React for providing an awesome react based and free admin template
- Adafruit with their beer keg-bot tutorial as perfect smart meter example
- Truffle maintaining the in my opinion best IDE for smart contracts and provider for cool boxes
- Redux-auth-wrapper as authentication component
- The whole Ethereum ecosystem, keep up the good work!