Skip to content

Distributed storage leveraging IPFS and Ethereum chain

Notifications You must be signed in to change notification settings

acuderman/distributed-storage

Repository files navigation

Distributed Storage

Distributed storage CLI implementation leveraging IPFS and Ethereum chain

Table of Contents

Features

file-upload-help

  • Upload any file to IPFS and store its cid in the smart contract file-upload-help

  • List all already uploaded files file-list-help

Environment Setup

Pre-requisites

  • Node.js installed locally (version 18 or higher).
  • IPFS node running locally. Setup instructions can be found here.
  • Ganache running locally. Setup instructions can be found here.

Build instructions

  • Clone the repository
  • Install dependencies
    • npm i
  • Deploy smart contract
    • npm run deploy-contract
  • Build cli application
    • npm run build-cli

Example

File upload

  • File can be uploaded using the upload command. Make sure the cli is built, and the smart contract is deployed before running the command. Command will prompt for the Ethereum account private key. Private key can be read from ganache UI (In the top menu select Account and press on the key icon on the right).
    • npm run cli upload <path_to_file> (eg. npm run cli upload ./doc-images/file-upload-example.png)

file-upload

File list

  • List uploaded files. Only the files uploaded by the selected account are listed.
    • npm run cli ls

file-upload

About

Distributed storage leveraging IPFS and Ethereum chain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published