This Solidity program is a simple program that can be used by a user to apply for a wallet insurance and/or collateral protection loan.
This program contains solidity contracts as well as front-end part. Althought they were not connected together for demo, they are fully functioning individually. There are further 2 parts : Wallet Insurance and Collateral Protection Each contain the functions suitable for each.
Hardhat and next, along with Tailwind css, are used in this project. In order to deploy, .env file needs to have your API's URL ( Infura was chosen here, another alternative is alchemy), your private key of an account ( as it consumes sepolia ETH to deploy). And the last is the contract address of the deployed contract. Install required dependancies. Use hardhat commands for solidity contracts and npm/yarn commands for next.
You can use various code editors to run this program. VS Code was used here to run the front-end and Remix to run back-end and show functionality.
Deploy the contract to alchemy or infura / Use Remix.
Use npm run dev
to start a local server of next.
On starting server, a Connect Button is shown. Then, 2 buttons : Wallet Insurance, and Collateral Protection You can choose your preferred. The functions related to your choice will then appear.
Shiv