🌐 Website: https://safezen.vercel.app/
🖥️ Frontend: https://github.com/SafeZen/SafeZen-Frontend
📦 Full Github Org: https://github.com/SafeZen/SafeZen-Frontend
💡 Smart Contract: https://github.com/SafeZen/SafeZen-Contracts
This repository contains all code written for project SafeZen as part of the HackMoney2022 Hackathon organised by ETHGlobal. The repository is powered by Hardhat
Before running any scripts, install necessary packages:
npm install
Make sure you set up your environment variables shown in .env.example
To run the test cases:
npx hardhat test
This is a brief description of the purpose of the 3 main smart contracts for SafeZen:
- SafeZen.sol - Main ERC721 SC that handles purchase and activation of on-chain insurance policies
- Governance.sol - Decentralised voting mechanism for handling insurance claims
- StakingContract.sol - Generates and calculates rewards based on policy purchases
Because we are dealing with Superfluid. Please ensure that the required contract addresses are accurate depending on the chain you are deploying on:
- Superfluid Host Address
- Central Flow Agreement Address
- Accepted SuperToken Address
Our team has chosen Polygon as our deployment blockchain and will be using the Mumbai testnet.
Step 1: To deploy SafeZen onto Mumbai:
npm run deploy-mumbai
Step 2: Update SafeZen CA for Governance and Staking contracts, remember to grab the latest deployed SafeZen CA and update in setCA.ts
:
npm run updateCA-mumbai
Step 3 [optional]: Verify smart contracts:
npm run verify-mumbai