Code Monkey home page Code Monkey logo

inr-insurance's Introduction

Insurance Smart Contract

This project implements an insurance smart contract on the Ethereum blockchain. The smart contract allows users to buy insurance, make claims, renew insurance policies, and retrieve insurance details. It is designed to be upgradable and supports multiple insurance types and periods.

Features

  • Buy insurance: Users can purchase insurance policies by specifying the insurance type, period, and providing their personal details.
  • Make claims: Insured users can file claims for their insurance policies, subject to certain conditions and proof requirements.
  • Renew insurance: Insured users can renew their existing insurance policies by extending the period and paying the premium.
  • Get insurance details: Users can retrieve the details of their insurance policies, including the insured user's information, insurance type, period, and claims information.

Installation

Clone the repository:

git clone https://github.com/mohitchandel/inr-insurance.git

Install the required dependencies:

cd inr-insurance

Build the smart contracts:

forge build

Run Tests

forge test

Usage

To interact with the insurance smart contract, you can use a web interface or directly interact with the contract using a tool like Remix or MyEtherWallet.

Instantiate the Insurance contract using the contract address.

Use the following functions to interact with the contract:

buyInsurance(insType, period, userData): Buy insurance by specifying the insurance type, period, and user details.

claimInsurance(insType, insId, isClaimProof): Make a claim for a specific insurance policy by providing the insurance type, policy ID, and proof of claim.

renewInsurance(insType, period, insId): Renew an existing insurance policy by extending the period.

getInsuranceDetails(insId): Retrieve the details of an insurance policy by providing the policy ID.

inr-insurance's People

Contributors

mohitchandel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.