IPFS Ethereum Integration – How to Integrate IPFS with Ethereum in DApps

dappsipfs

  1. How can integration of IPFS with ethereum be done in DApps?
  2. Which parts of a DApp will be on IPFS?
  3. Do any examples exist?
  4. If a DApp's site is hosted on github, is it not centralized?

Best Answer

  1. Basically, you store any file into IPFS and then you store the IPFS hash in the Ethereum contract. Any user with an IPFS node is going to be able to access the file using that hash.

  2. You can store data, images, the front end, etc. whatever you want.

  3. Here you have an example: https://github.com/AdrianClv/ethereum-ipfs

  4. No. Even if your DAPP frontend (the HTML/JS code with web3) is on GitHub or in a private server, your contract code (the code written in Solidity) is going to be executed on Ethereum. The frontend is only the code that gives you access to that contract (it's a link between the HTML and the Ethereum node), but the contract itself has to be uploaded to Ethereum in order to be executed. In fact, you can access the contract without the frontend if you execute the code directly from the console.

Related Topic