/Overscale

Overscale

Primary LanguageSolidity

Ethereum Smart Contracts - Insurance Solutions for crypto wallets

Overview

This repository contains a set of Ethereum smart contracts designed to provide decentralized insurance solutions. It includes the InsuranceFactory contract for creating insurance policy contracts, along with CryptoWalletInsurance and CollateralLoanInsurance contracts for specific insurance policies.

Contracts

  • InsuranceFactory: A factory contract to create instances of insurance contracts.
  • CryptoWalletInsurance: Manages insurance policies for crypto wallets.
  • CollateralLoanInsurance: Handles insurance policies related to collateralized loans for Storage Providers.

Prerequisites

  • Node.js (v12.0.0 or higher)
  • Truffle Suite (for testing and deployment)
  • Ethereum wallet with test Ether (for deploying to test networks)

Installation

  1. Clone the repository:

    git clone [URL-of-the-repository]
    cd [repository-name]
  2. Install dependencies:

    npm install

Testing

To run tests on the contracts:

  1. Start Truffle's development console:

    truffle develop
  2. Compile the contracts:

    compile
  3. Run tests:

    test

Deployment

To deploy the contracts to a test network:

  1. Update truffle-config.js with your network details and wallet information.

  2. Run the migration:

    truffle migrate --network [network-name]

Usage

  • Use InsuranceFactory to create instances of CryptoWalletInsurance and CollateralLoanInsurance.
  • Interact with the created insurance contracts to apply for, claim, and manage insurance policies.

Contributing

Contributions are welcome! Please open an issue to discuss your ideas or submit a pull request.