Skip to content

jpdstan/greenbackd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greenback'd Ethereum Dapp

Website: https://github.com/jpdstan/greenbackd

Description

This is a simple web application that demonstrates consumer facing interface that interacts with [our smart contract]((https://kovan.etherscan.io/address/0x4c437ff76d4c19c0000ae49c80e2ed79f765096f) deployed in the Kovan test network. The smart contract is programmed using the Solidity language. The interface is programmed using React JavaScript library. To interact with the smart contract we use the Truffle framework. The modules used in the project are bundled using webpack.

In a typical scenario, a customer scans their purchase (through a QR code) using the camera of their device after making some purchase from a partner company. Three things happen at this point:

  1. The customer gets credited with a compensation at the company's discretion (for example, a 10% coupon code). This credit is stored in the application.
  2. The company gets credited with the amount of CO2 savings associated with the purchase. This credit is stored on the blockchain (more specifically, in a hash table of companies and their balance CO2 credits in the smart contract deployed through greenbackd.sol).
  3. The transaction gets added to the blockchain (in our application, we have chosen to use the Kovan test network).

Screenshot

Consumer facing interface

Setup

Prerequisites

Run on your device locally

  • cd to greenbackd/ and run npm install to install npm dependencies
  • npm run build to compile contracts and package static files
    • This should create /build/contracts/*.sol and /dist/build.js
  • serve to host files locally (install if you don't have it)
  • Navigate to localhost:5000/dist/index.html to visualize the interface (the port number might be different; however, serve should print out the correct one for your machine).

Resources

About

Greenback'd (CS 294)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published