Filesaver
No description available
Install / Use
/learn @MVPWorkshop/FilesaverREADME
FileSaver
Overview
Store once and for all.
FileSaver is the first fully decentralized drive designed for permanent file storage for both public and private use.
It is unlimited by time, decentralized, storage dApp run on Filecoin.
This project has been built for the FVM Space Warp Hackathon.
Problem
Currently, Filecoin enables storage of files for a fixed amount of time (6-18* months).
What happens when a user wants to store their files for larger amounts of time?
They would have to keep a copy of their files and start a new deal, or re-enter the negotiations with their current providers.
Solution
Perpetual storage is a concept of semi-automating this process through F(E)VM actors in which, after the end of the current deal’s duration has been reached, a new one can be started by providers without the user's involvement.
Flow
User connect wallet, sets conditions for the deal, upload file to IPFS via web3.storage.
User sends funds to contract for perpetual deal.
Provider downloads the file, reserves the spot and makes deal through FEVM actor(after FIP44).
Provider stores the file, publishes the deal and can claim funds.
Project Vision
Since complete funds are locked in the BountySC until the next deal when the part of it is claimed, they can be used inside DeFi applications. This can be part of the FileSaver’s business model.
Built With
- ReactJS (Frontend)
- Metamask wallet
- NodeJS (Backend)
- Lotus
- Solidity (Smart Contracts)
- FEVM Hardhat Kit
- Zondax Solidity API
Frontend is created using React and NodeJS is used for backend alongside with web3.storage for uploading files to IPFS. Smart contracts are written in Solidity and with ethers we are capable to interact with them on front and back.
Getting started
This repo containts three main subfolders:
back- contains all backend logic that is being used by the providersfront- frontend being used for user interactioncontracts- used for developing and deploying FEVM actors
Instructions
After cloning the repo, follow these steps:
Installation
To install all the dependencies, open three terminals and type:
cd back && npm installcd front && npm installcd contracts && npm install
Workflow
In the first terminal enter:
npm startwhich will start the React App
Split the second terminal, and enter:
node back/modules/serverwhich will start the server that handles file upload requestsnode back/modules/service-providerwhich will start one provider process
Finally the last terminal serves for actor development:
yarn hardhat compilewhich is used for compilationyarn hardhat deploywhich is used for deployment
