Hey!
I developed a DApp with Truffle and Ganache, and it works fine with lite-server. nevertheless, I’m having some trouble to store it on IPFS. the foulder that includes the index.html was stored properly, it opens with the hash too, but I can’t interact with the DApp. Why so?
Hash of the DApp on IPFS: Qmd4VShYnY5WBf2ZfpCksUss2S5DDCq8r33rKVqWUbyCzR
I appreciate the attention!
Could you give some more details as to how it should function? I took a look and it appears to load fine. I dug around the source of that page and it looks like you’re not connecting to a web3 provider?
When you click the button “publicar hashs”, fill the blanks with strings and press “submit”, a window of MetaMask (you must use it) should open to confirm the transaction. After that, the data are stored on rinkeby network, and also displayed in the DApp.
The Index file (HMTL) points to a App.js, that uses the Web3 provider.
EDIT: also, the DApp works fine in a local server.
App.js can be fould here: QmU5PDiViFjXEdeTqMQqqnc8CocccomzceVJmJrBW28Qgp
I’m not a real developer, but I’m wondering if the immutable aspect of IPFS is blocking the transaction; after all, it should change the page somehow. Or am I crazy?
Ah okay I see the issue you’re encountering. I think you might be missing some sort of hook-in/validation process to connect with metamask in order to send the transactions. When I have metamask unlocked on the rinkeby network, your code properly display the eth balance, and the address that is tied to my metamask account, but trying to submit the hashes doesn’t prompt for transaction confirmation.
but I'm wondering if the immutable aspect of IPFS is blocking the transaction; after all, it should change the page somehow. Or am I crazy?
as for this, no the immutable nature of IPFS should not be impacting the ability to send a transaction. I suspect the issue is something to do with how you’re trying to load the javascript code.
Unfortunately I don’t use javascript so I can’t really provide any help, but the issue is probably related to either:
- the way you’re integrating with metamask
- not properly referencing file paths. When using IPFS for stuff like this, generally you should use relative not absolute links so that might be something to check
Ok. Thank you anyway for the attention!
You might want to have a look at the following resources: