An Ethereum distributed app that manages insurance for travelers.
Software | Description |
---|---|
Node v11 | We recommend node version manager to change version |
NPM v6 | Used to install other necessary modules |
Python v2.7.14 | Used in npm install , we recommend using pyenv to install |
Metamask | Ethereum wallet, we recommend the Chrome plugin here |
Ganache | Private blockchain, use npm install -g ganache-cli for CLI, or use this for GUI |
Truffle | Ethereum development suite, use npm install -g truffle to install |
Ethereum-Bridge | This is needed for the Oraclize engine to access our private network. use npm install -g ethereum-bridge to install |
If you are using node version manager,
nvm install 11
nvm use 11
If you are using pyenv,
pyenv install -v 2.7.14
After all that, install the necessary modules.
npm install
First, start up Ganache as well as Ethereum-Bridge.
ganache-cli # or start up Ganache GUI
ethereum-bridge --dev -H <host:port> -a 1
# if the above fails, try to build ethereum-bridge from source: https://github.com/oraclize/ethereum-bridge
Finally, use Truffle to compile the contracts and start up the dApp.
truffle compile
truffle migrate
npm run start
After starting up the dApp:
-
Head to localhost:3000 and logout from any existing Metamask account
-
Switch network to private network eg. localhost:8545 (Ganache CLI default) or localhost:7545 (Ganache GUI default)
-
Restore account in Metamask with Ganache's mnemonic via "Import using account seed phrase"
-
Login to Metamask using the above restored account
-
Approve the connection
To run any test suites, use the following:
truffle test # for contract testing. yes we actually wrote tests.
npm run build
Check the wiki pages for all the report stuff and requirements for this project.
- 07/12/18 - Refactoring to decrease gas used on
FlightValidity.checkFlightDetails
by 130k. - 09/12/18 - Add return trip ticket support.