Skip to content
No description, website, or topics provided.
JavaScript CSS HTML
Branch: master
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
migrations
src
test
.babelrc
.gitignore
LICENSE
README.md
package-lock.json
package.json
truffle.js
webpack.config.dapp.js
webpack.config.server.js

README.md

FlightSurety

DApp screenshot

Install

This repository contains Smart Contract code in Solidity (using Truffle), tests (also using Truffle), dApp scaffolding (using HTML, CSS and JS) and server app scaffolding.

Notes: The project has been tested with Truffle v5.0.4, Solidity 0.5.6 and node v10.15.1
__

To install, download or clone the repo, then:
  1. npm install
  2. truffle compile
  3. truffle migrate --reset --network ganache --firstAirline=FIRST_AIRLINE_ADDRESS --numOracles=NUM_OF_ORACLES
    Warning: Network Port has been updated to 7545 for Ganache AppImage
  4. npm run server
    Warning: Start the server first because the data contract auhtorization call is made from the server
  5. npm run dapp
    The DApp is runing at http://localhost:8000

Testing

To run truffle tests:
  1. Update the mnemonic in truffle.js with your key seed.
  2. truffle dev
  3. migrate --reset
  4. test
Feature of the tests:
  1. Check the operational status of the contracts;
  2. Funding or ailine;
  3. Register airlines with the multiparty threshold;
  4. Flight registration by airline;
  5. Passenger purchase of insurance;
  6. Check Oracles registration;
  7. Watch for FlightStusInfo event;

Deploy

To build dapp for prod: npm run dapp:prod

Deploy the contents of the ./dapp folder

Using the DApp

Using the DApp is straightforward. Start Metamask, clear the history and use the address of the first ailine.

You can then:
  1. send fund;
  2. register flights,
  3. update the flights lists
  4. purchase insurance for a spcific flight,
  5. update the flight status of a specific flight,
  6. check your balance
  7. claim your insurance payout

Credits

Theme

*https://startbootstrap.com/themes/agency/

Dashboard style
Green light
Images:

Resources

You can’t perform that action at this time.