Skip to content

betherworld/MinusMinusEnergy

 
 

Repository files navigation

MinusMinusEnergy

A BETH2019 project for the SwissEnergy Challenge

Full Demo

Web interface that allows the user to select the amount of tokens he wants to pay and how much should go to the fond

Demo

Run Demo

  • Run these commands
$ git clone https://github.com/maede97/MinusMinusEnergy.git
$ cd MinusMinusEnergy
$ npm install
$ npm test
$ npm start
  • Or watch the GIF above (shortened, hence the black flicker in the middle)

Further Information is available here:

The Team

Matthias Busenhart
Webserver (JS), Blockchain (Solidity) - maede97

Philip Wiese
Webserver (JS), Blockchain (Solidity) - Xeratec

Marie-Louise Achart
Backend (Python), Documentation (LaTeX) - MarieLouiseAchart

Yannick Niedermayr
Database (C++), Misc. - guetzli32

Manuel Winkler
Database (C++) - manuel5975p

Usage

Dependencies

The project has the following dependencies, make sure you have them all installed:

  • Make
  • Cmake 3.1
  • A C++ compiler such as gcc or clang
  • libsqlite3-dev
  • sqlite3
  • Python 3
  • nodeJS Link
  • npm Link
  • Ganache Link

Arch Linux

arch$ sudo pacman -S sqlite3 make cmake python gcc

Ubuntu

ubuntu$ sudo apt install sqlite3 libsqlite3-dev make cmake python3 gcc

Demo

Description
The demo deploys the MMEToken, Bill and Fond contract on a local Ganache instance and adds an energy provider to the bill contract. The energy provider can issue new bills to a specific address.

The demo script also generates a signed transaction with the trusted private key of the sensor to claim MMETokens on the MMEToken contract for reduced energy consumption.

On the webinterface the client can analyze his energy consumption and pay his bills. He can decide to use some of his MMEToken to pay for his bill or invest them into a fond. The money in the fond could be used to finance local clima-pro projects, optionally with a integrated voting system (not implemented).

Information
  • Ganache
    Port: 7545
    Network ID: 5777
    Hostname: 127.0.0.1 - lo
    Number of Accounts: >=3
    Account 1: Contract Owner (subsidize eg. government)
    Account 2: Energy Provider (eg. EWZ)
    Account 3: Client
  • Webserver
    URL: http://localhost:3000
  • Metamask
    Selected Account: Account 3

Installation

On a Raspberry Pi, run the following commands:

$ git clone https://github.com/maede97/MinusMinusEnergy.git
$ cd MinusMinusEnergy
$ ./install.sh

Presentation & Report

Presentation

Compile the presentation with:

$ cd /doc/presentation
$ pdflatex presentationMinusMinusEnergy.tex

Report

Compile the final report with:

$ cd /doc/report
$ pdflatex reportMinusMinusEnergy.tex

ToDo

  • Security improvement
  • Voting system for Fond
  • Bug fixing

About

BETH19 - EnergyCH Challenge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.3%
  • C++ 20.9%
  • CSS 4.7%
  • Python 1.2%
  • HTML 0.5%
  • Shell 0.3%
  • CMake 0.1%