FlightSurety
FlightSurety is a sample application for flight insurance developed in Ethereum.
Environment
$ truffle version
Truffle v5.0.12 (core: 5.0.12)
Solidity - ^0.4.25 (solc-js)
Node v10.15.1
Web3.js v1.0.0-beta.37
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.
To install, download or clone the repo, then:
npm install
truffle compile
Develop Client
To use the dapp:
truffle migrate
npm run dapp
To view dapp:
http://localhost:8000
Develop Server
npm run server
truffle test ./test/oracles.js
Deploy
To build dapp for prod:
npm run dapp:prod
Deploy the contents of the ./dapp folder
DApp UI
- Airline registration and funding
- Flights registration
- Oracles and flight status
- Insurance Refund
Testing Smart Contracts
- Testing : Airlines registration and multipartt consensus
Run below command to test airlines registration and multiparty consensus
truffle test test/flightSurety.js
- Testing : Flights registration and multipartt consensus
Run below command to test flights registration and multiparty consensus
truffle test test/flights.js
- Testing : Oracles registrations and responses
Run below command to test oracles registration
truffle test test/oracles.js