Giter VIP home page Giter VIP logo

nd1309-flightsurety's Introduction

FlightSurety

Udacity Blockchain Developer Nanodegree project Flight Surety.

Libraries

Library Version
Node          v14.15.3
Solidity v0.5.16
openzeppelin-solidity v2.1.2
Truffle v5.1.63
truffle-hdwallet-provider  v1.0.17
truffle-assertions    v0.9.2
@truffle/contract 4.3.9
web3      v1.3.3

Testing libraries

Library Version
truffle-assertions          v0.9.2
Chai v4.2.0

Installation

To install, download or clone this repo, then run:

npm install

DApp Development and Testing

  1. Compile contracts

    truffle compile
    
  2. Run Ganache CLI

    Run Ganache CLI with the following parameters:

    ganache-cli --accounts=50 --gasLimit=0x1fffffffffffff --allowUnlimitedContractSize
    
  3. Run Truffle Tests:

    truffle test ./test/flightSurety.js
    

    flightSurety test

    truffle test ./test/oracles.js
    

    flightSurety test

DApp Deployment

  1. Run Ganache CLI

    Stop and run Ganache CLI again with the following parameters:

    ganache-cli -m "seed words" --accounts=50 --deterministic --gasLimit=0x1fffffffffffff --allowUnlimitedContractSize
    
  2. Deploy Contracts

    truffle migrate --reset --network development
    

Launching FlightSurety DApp

  1. Import Accounts

    Import contract owner, airline and passengers accounts from Ganache to Metamask using private keys. The following table shows the accounts to be imported to Metamask:

    # Account Default Metamask
    1 owner
    2 airline 5 airline accounts import
    3 airline import
    airline import
    airline import
    6 airline import
    7 passenger 3 passenger accounts import
    8 passenger import
    9 passenger import
    10 oracle 40 oracles don't import
    .. .. .. ..
    50 oracle
  2. Start the Server

    Wait until the 40 oracles have been registered before starting the DApp

    npm run server
    
  3. Start the DApp

    npm run dapp
    

    Open http://localhost:8000 in browser.

DApp Main Screens

Administration

flightSurety test

Airlines

flightSurety test

Flights

flightSurety test

Insurances

flightSurety test flightSurety test

Resources

nd1309-flightsurety's People

Contributors

ilorix avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.