- How can integration of IPFS with ethereum be done in DApps?
- Which parts of a DApp will be on IPFS?
- Do any examples exist?
- If a DApp's site is hosted on github, is it not centralized?
- 1,318
- 1
- 13
- 29
- 733
- 1
- 7
- 13
2 Answers
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.
You can store data, images, the front end, etc. whatever you want.
Here you have an example: https://github.com/AdrianClv/ethereum-ipfs
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.
- 1,269
- 10
- 14
Ethereum is too heavy/expensive to store large blobs like images, video, etc.. Hence some external storage is necessary to store such objects. This is where IPFS comes in. The Ethereum DAPP could hold smaller state variables.
You can host static pages, data required for your app etc.. on IPFS.
etherface.io is a DAPP built on Ethereum and IPFS
Frontend is not DAPP - it is just one way to access your DAPP. Any person could develop a frontend for your APP and frontend here means accessible method - either a console, or a web GUI or from MIST.
- 18,780
- 4
- 58
- 75
- 1,153
- 1
- 9
- 11
-
-
-
2Can you elaborate on how etherfaces.com uses ethereum/ipfs? Looks like just a website to me... – Lee Mar 11 '17 at 18:21
-
That link for etherfaces now directs to potentially harmful malvertising. Are there any working examples that can be shared instead? – iyrin Aug 07 '18 at 23:33
-
@iyrin i think the new url is http://etherface.io/ BTW thanks for the flag – Badr Bellaj Aug 08 '18 at 13:57
ipfs.jsin https://github.com/AdrianClv/ethereum-ipfs? Is it an official Javascript API for IPFS? If so, where is the official version made available? The IPFS Alpha Demo video https://youtu.be/8CMxDNuuAiQ (also on https://ipfs.io/media) mentions a Go library only. – Ajoy Bhatia Jan 18 '17 at 02:14100,000 gas * 21 gwei/gas * 10^-9 ETH/gwei * $220/ETH = $ (21 * 220 * 10^-4) = $0.462So that is 46 cents. I got the gas price in gwei from https://ethstats.net/ and the rounded ETH price in USD from Coinbase. Note that it is 46 cents at the currently historically high ETH price. – Ajoy Bhatia Jun 02 '17 at 19:27