Git Product home page Git Product logo

off-chain-storage's Introduction

Web 3.0 apps (Ðapp) now-a-days need to store/retrieve data just like Web 2.0 (conventional/centralized) apps. But it is extremely costly (computationally and hence monetarily) to store data (> few bytes) for eg PDF, images, etc on EVM. The EVM allow us to save variables/state in permanent storage cheaply. So a possible solution to store large data is to save the data off-chain using options such as: IPFS and Swarm. In this Ðapp, IPFS has been used for off-chain storage!

Ðapp Preview



Requirements

  • (Use of virtualenv is strongly recommended!) pip install requirements.txt
  • MetaMask extension
  • Remix - Solidity IDE

Deployment

  • Create ethereum account using MetaMask. Make sure to choose "Ropsten Test Network"
  • Request few ethers from the test faucet
  • Go to Remix solidity IDE and copy-paste the contents of opinion.sol file in the IDE.
  • Click on "Start to compile" from the Compile tab in the top right corner.
  • After compiling it, go to Run tab and click on "deploy". Metamask should bring up a popup asking you to confirm the transaction. If not, just open the Metamask extension and do it there.
  • A message at the bottom of the Remix console will notify you when the contract is deployed. You can click on the link to explore the transaction on ropsten.etherscan.io. Note the contracts address!
  • Download Django source code.
  • Now open the root folder of the source code in terminal:
    $ mkvirtualenv --python=python3 venv
    $ pip install requirements.txt
    $ ./manage.py makemigrations
    $ ./manage.py migrate
    $ ./manage.py runserver
  • Now navigate to localhost:8000/ipfsLink

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.