Flight delay / cancellation insurance distributed app with smart contracts
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
contracts
images
installed_contracts
migrations
public
scripts
src
test
tickets
.gitignore
.python-version
LICENSE
README.md
package-lock.json
package.json
truffle-config.js
truffle.js

README.md

Archwing

An Ethereum distributed app that manages insurance for travelers.

Requirements

Software Description
Node v11 We recommend node version manager to change version
NPM v6 Used to install other necessary modules
Python v2.7.14 Used in npm install, we recommend using pyenv to install
Metamask Ethereum wallet, we recommend the Chrome plugin here
Ganache Private blockchain, use npm install -g ganache-cli for CLI, or use this for GUI
Truffle Ethereum development suite, use npm install -g truffle to install
Ethereum-Bridge This is needed for the Oraclize engine to access our private network. use npm install -g ethereum-bridge to install

Setup

If you are using node version manager,

nvm install 11
nvm use 11

If you are using pyenv,

pyenv install -v 2.7.14

After all that, install the necessary modules.

npm install

Usage

First, start up Ganache as well as Ethereum-Bridge.

ganache-cli  # or start up Ganache GUI
ethereum-bridge --dev -H <host:port> -a 1 
# if the above fails, try to build ethereum-bridge from source: https://github.com/oraclize/ethereum-bridge

Finally, use Truffle to compile the contracts and start up the dApp.

truffle compile
truffle migrate
npm run start

After starting up the dApp:

  1. Head to localhost:3000 and logout from any existing Metamask account

  2. Switch network to private network eg. localhost:8545 (Ganache CLI default) or localhost:7545 (Ganache GUI default)

  3. Restore account in Metamask with Ganache's mnemonic via "Import using account seed phrase"

  4. Login to Metamask using the above restored account

  5. Approve the connection

Testing

To run any test suites, use the following:

truffle test  # for contract testing. yes we actually wrote tests.

Building

npm run build

Report

Check the wiki pages for all the report stuff and requirements for this project.

Notable Changes

  • 07/12/18 - Refactoring to decrease gas used on FlightValidity.checkFlightDetails by 130k.
  • 09/12/18 - Add return trip ticket support.