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.
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.
- Node.js (v12.0.0 or higher)
- Truffle Suite (for testing and deployment)
- Ethereum wallet with test Ether (for deploying to test networks)
-
Clone the repository:
git clone [URL-of-the-repository] cd [repository-name]
-
Install dependencies:
npm install
To run tests on the contracts:
-
Start Truffle's development console:
truffle develop
-
Compile the contracts:
compile
-
Run tests:
test
To deploy the contracts to a test network:
-
Update
truffle-config.js
with your network details and wallet information. -
Run the migration:
truffle migrate --network [network-name]
- Use
InsuranceFactory
to create instances ofCryptoWalletInsurance
andCollateralLoanInsurance
. - Interact with the created insurance contracts to apply for, claim, and manage insurance policies.
Contributions are welcome! Please open an issue to discuss your ideas or submit a pull request.