An Ethereum DApp (Decentralied application) that allows Flight passengers to insure flight delays which is implemented by Smart contracts using Solidity. It serves as an Insurance management system with no third party. Users can interact with the Contracts using the frontend. New Airlines are included using a voting based system which requires atleast 50% of the registered airlines to vote.
The Data and Application are separated into different smart contracts
FlightSuretyData is used to store the data related to Airlines, Flights, Votes, passengers, insurance details, etc
FlightSuretyApp has the core functionality related to Insurance management system
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Please make sure you've already installed ganache-cli, Truffle and enabled MetaMask extension in your browser.
A step by step series of examples that tell you have to get a development environment running
git clone https://github.com/DineshBS44/Flight-Surety
Install all requisite npm packages (as listed in package.json
):
npm install
ganache-cli -m "<Seed Phrase>"
or
truffle develop
truffle compile
This will create the smart contract artifacts in folder build\contracts
.
truffle test
truffle migrate
npm run dapp
- Ethereum - Ethereum is a decentralized platform that runs smart contracts
- IPFS - IPFS is the Distributed Web | A peer-to-peer hypermedia protocol to make the web faster, safer, and more open.
- Truffle Framework - Truffle is the most popular development framework for Ethereum with a mission to make your life a whole lot easier.
- ganache-cli - For running a local blockchain mostly used for testing purposes
- @openzeppelin-solidity - To use the SafeMath and SafeCast functions
- @truffle/hdwallet-provider - Used to create a provider using Seed phrase(Mnemonic) and RPC URL to connect to the Blockchain Network
- web3 - To interact with the deployed smart contract either on Ganache or Rinkeby test network
- mocha & chai - To test the smart contracts written in solidity
- webpack-dev-server - To host the DApp on the server
- lodash - Utility library for Javascript to make working with arrays, numbers, etc, easier
- Remix - To compile, deploy and test smart contracts on the Javascript VM
- Metamask - Ethereum wallet which is connected to the DApp
- IPFS - To make the DApp completely decentralized, the DApp and all its files are hosted to IPFS
- Truffle - Framework used to write, compile, test and deploy smart contracts with ease along with the frontend of the DApp.
Make sure IPFS-cli is installed
ipfs add -r FlightSurety
ipfs daemon
In an different terminal window, execute the following command to publish
ipfs name publish <IPFS_HASH>
- Truffle version - 5.3.14
- Solidity version - 0.8.6
- Node JS version - 14.16.1
- truffle-hdwallet-provider version - 1.0.17
- web3 version - 1.4.0
- Dinesh B S (@DineshBS44)
Licensed under MIT License : https://opensource.org/licenses/MIT