Skip to content

Parametric insurance solution for vessels going through rough seas based on Blockchain technology and enabled by Chainlink

Notifications You must be signed in to change notification settings

InsureBlox/chainlink-hackathon

Repository files navigation

Ocean Storm by InsureBlox

Ocean Storm is a parametric insurance solution ☂  for ships 🚢   going through rough seas 🌊   based on Blockchain 🚀  i.e. hazzle-free, automatic pay-outs in case of adverse weather events.

Get started

Install hardhat npm install --save-dev hardhat

Export your private key and get Alchemy API key on Kovan (testnet with faucet system currently working and compatible with Keepers). Create .env file with the following properties:

ALCHEMY_API_KEY = XXXXXXXXXX
PRIVATE_KEY = XXXXXXXX

Try running some of the following tasks:

npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
node scripts/sample-script.js
npx hardhat help

Running locally

  1. npx hardhat node or npx hardhat node --hostname 127.0.0.1
  2. npx hardhat run scripts/deploy.js --network localhost

ℹ️ Connect metamask to Localhost:8545: RPC URL: http://localhost:8545 | Chain ID: 31337

Deploy

npx hardhat run scripts/deploy.js --network kovan

Frontend

Add and .env under /frontend folder with the following instruction:

SKIP_PREFLIGHT_CHECK=true

See more details

cd frontend
npm install
npm start

External Adapter

Refer to Datalistic / Storm Glass External Adapter

Test

Run the following command to perform the unit tests: npx hardhat test

Test coverage

npx hardhat coverage