8000 GitHub - MomchilKolev/flight-surety
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MomchilKolev/flight-surety

Repository files navigation

How to run

  1. Install Ganache from https://www.trufflesuite.com/ganache and truffle using npm i -g truffle or use npx truffle ...

  2. Create a new Ethereum workspace with at least 50 accounts (configurable during creation)

  3. Run truffle migrate --reset

  4. CD into server

  5. Run npm i

  6. Run npm run server

  • this will register all oracles and prepare for flight status requests
  1. Copy accs from output or ganache into config/testConfig and replace testAddresses

  2. Setup Metamask

  • Install metamask
  • Create account if necessary
  • Import first ganache account by clicking on the circle top-right in metamask -> Import and pasting the private key of the very first ganache acc
  • Change network to Localhost 7545, if it doesn't exist, create it:
  • Connect account (below fox on top-right)
  1. Open new terminal

  2. Run truffle test to confirm all tests pass

  3. CD into client

  4. Run npm i

  5. Run npm start

  6. A new tab should be opened with website at localhost:3000

  7. Purchase insurance for a flight

  8. Request Flight insurance until the withdraw button becomes available (waiting for a specific status, which has a 1/5 chance of being picked)

  9. Withdraw

Fin

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0