pappas999 / Parametric-Crop-Insurance

Parametric-Crop-Insurance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

Example of a decentralized crop insurance insurance product that makes using of Chainlink Oracles to obtain external data from multiple weather APIs

Walkthrough

Please refer to the technical article on the Chainlink official blog

Run product

The contracts can be deployed to Kovan either via this Remix link, or via Truffle commands below.

Setup Environment Variables

You'll need a MNEMONIC and a kovan KOVAN_RPC_URL environment variable. Your MNEMONIC is your seed phrase of your wallet. You can find a KOVAN_RPC_URL from node provider services like Infura

Then, either set them in a bash_profile file or export them into your terminal like:

export MNEMONIC='cat dog frog....'
export KOVAN_RPC_URL='www.infura.io/abcdefg'

Install dependencies

# install packages.
npm install

# compile contract
truffle complie

# migrate contract
# First update truffle-config.js to contain correct key information for your wallet and infura provider

truffle deploy --reset --network kovan

Once the contract is deployed and you have the master contract address. You need to fund it with some ETH and LINK to be used in the creation of insurance contracts. Once that's done, you can then interact with the InsuranceContracts functions via any Contract interaction method, such as MyEtherWallet

About

Parametric-Crop-Insurance

License:MIT License


Languages

Language:Solidity 68.2%Language:JavaScript 31.8%