aelmanaa / blockchain-developer-bootcamp-final-project

DAPP Crop Insurance. Consensys final bootcamp project
MIT License
3 stars 5 forks source link
ethereum solidity

Project idea

DAPP crop insurance

Crop insurance is an insurance purchased by farmers to protect against the loss of their crops due to natural disasters (drought, flood, hail..) Ref.

In this project, we are going to build a simplified DAPP where the insurance policy is materialized in a smart contract. For the sake of simplicity , we are going to take many hypotesis

Hypothesis

Actors & roles

Objectives

Insurance policies still rely on government and insurance company collaboration , however crop insurance DAPPs can have the following advantages:

Documentation

Diagrams & Design patterns

Avoid common attacks

ScreenCasts

Project Idea link

Diagrams link

Project structure link

Demo link

Run the application

Prerequisites

Project structure

This repository contains:

Install

To install, download or clone the repo, then:

Test the contracts

You can run the tests by executing the following commannd in the root directory of the project truffle test

You can verify that all the tests run succesfully:

Tests Results

Remark: there is also a gas reporter which provides some insights regarding the gas usage of the different functions

Gas usage

Serve the frontend locally

In order to test the react-redux frontend locally. Please follow these steps:

Local frontend

Metamask local

Dapp hosted on Fleek

the react-redux Single Page Application is also deployed on Fleek which hosts the frontend on IPFS. It is accessible here

:warning: Only Rinkeby is supported for now . In case you would like to test it , please open an issue in the repo with the list of your accounts and I'll grant you the roles.

Once you open the link , you will find the history of interactions with the contracts

Dapp rinkeby

Also one can verify rinkeby etherscan for the history of transactions: