Skip to content

Latest commit

 

History

History
113 lines (86 loc) · 3.94 KB

README.md

File metadata and controls

113 lines (86 loc) · 3.94 KB

ALF Transparency

Implements an hashing dashboard on the basis of the ALF Transparency with Merkletree.js, Vue.js and the Ethereum netwrok

Demo

Table of Contents

  1. Description
  2. API Documentation
  3. Overview of the Stack
  4. Getting Started
     4.1. Prerequisites
     4.2. Installing
  5. Built With
  6. Contributing

Description

The current project creates hashes of the user offers using Merkletree.js and stores them on Volta test network.

API Documentation

Read the API documentation here.

Overview of the Stack

  • MongoDB: as data storage.
  • Express.js: as the server-side web framework for Node.js and will be used to mange all the backend related stuff.
  • Vue.js: as the JavaScript framework for the frontend and handling all the view-related stuff
  • Node.js: as the main engine for the backend

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Please make sure you've already installed Truffle and enabled the MetaMask extension in your browser.

* Truffle v5.1.26 (core: 5.1.26)
* Solidity >= v0.5.16 (solc-js)
* Node >= v12.16.3
* Web3.js >= v1.2.7
* Metamask Chrome extension (connected with Volta)

Note: Please follow the steps to connect Metamask with Volta.

Installing

Follow the steps below to have development environment running:

  1. Clone the repository:
$ git clone https://github.com/olisystems/alf-transparency.git
  1. Change directory to alf-transparency folder and install all requisite npm packages (as listed in package.json):
$ cd alf-transparency
$ npm install
  1. Compile the smart contracts:
$ cd truffle
$ truffle compile

This will create the smart contract artifacts in folder app\src\assets\js\contracts.

  1. Migrate smart contracts to volta chain:
$ npm run migrate
  1. Test smart contracts:
$ npm run test
  1. Compiles and hot-reloads for development, run the following command inside app directory:
$ cd app
$ npm run serve

Navigate to localhost:8080 in your browser.

  1. Compiles and minifies for production:
$ npm run build

Built With

  • Ethereum - Ethereum is a decentralized platform that runs smart contracts to make the web faster, safer, and more open.
  • Web3.js - A collection of libraries which allow interacting with a local or remote ethereum node, using an HTTP or IPC connection.
  • MerkleTree.js - A JavaScript library to construct Merkle Tree and verify proofs.
  • Vue.js - The Progressive JavaScript Framework for building user interfaces.
  • MongoDB - A document-oriented database database that uses JSON-like documents with optional schemas.
  • Truffle Framework - Truffle is the most popular development framework for Ethereum with a mission to make your life a whole lot easier.

Contributing

Pull requests are welcome.

  1. Fork the repository.
  2. Create your new feature branch: git checkout -b new-feature-branch
  3. Stage your changes: git add .
  4. Commit the changes: git commit -m "add commit message"
  5. push to the branch: git push origin new-feature-branch
  6. Submit a pull request.