3

I got 3dhdwallpapers.eth name and set content resolve to a swarm hash 4197442eceb1c1d4a0c7af21e17cb48e990a07ba2d6f72d7e9c09efd172279cc

and I run command

publicResolver.setContent(namehash('3dhdwallpapers.eth'), '0x4197442eceb1c1d4a0c7af21e17cb48e990a07ba2d6f72d7e9c09efd172279cc', {from: eth.accounts[0], gas: 100000});

Now txn fine in etherscan https://etherscan.io/tx/0x50f225487cc5cd1d34ecbf07eba83f64af8604d12b7c9db4914ed016ef10bcdb

when I check http://swarm-gateways.net/bzz:/3dhdwallpapers.eth/ getting error- error resolving 3dhdwallpapers.eth: '3dhdwallpapers.eth' is not a content hash

Why 0x4197442eceb1c1d4a0c7af21e17cb48e990a07ba2d6f72d7e9c09efd172279cc is not a content has when I can see hash data in http://swarm-gateways.net/bzz:/4197442eceb1c1d4a0c7af21e17cb48e990a07ba2d6f72d7e9c09efd172279cc/ ?

but getContent('3dhdwallpapers.eth') giving "0x4197442eceb1c1d4a0c7af21e17cb48e990a07ba2d6f72d7e9c09efd172279cc"

Is that 0x giving problem? But as per http://swarm-guide.readthedocs.io/en/latest/usage.html I need to add 0x with hash. Please help.

--------------------- updated-----------------------

Okay if swam gateway running test node. I run swarm in my main net

and new has is 9af7f4a3d9548f37b0c6e391fa8b1e23a6895e31d2eecc60c88dfd67a8c3eef4

it open as http://80.241.221.232:8500/bzz:/9af7f4a3d9548f37b0c6e391fa8b1e23a6895e31d2eecc60c88dfd67a8c3eef4/

File and I resolve content hash using publicResolver.setContent(namehash('3dhdwallpapers.eth'), '0x9af7f4a3d9548f37b0c6e391fa8b1e23a6895e31d2eecc60c88dfd67a8c3eef4', {from: eth.accounts[0], gas: 100000})

txn pass through- https://etherscan.io/tx/0xac2f357f5d5a78ceaec407da4fe51db33f31ec21c62d35d938c9e4c193c40c90

and getContent('3dhdwallpapers.eth') gives correct hash "0x9af7f4a3d9548f37b0c6e391fa8b1e23a6895e31d2eecc60c88dfd67a8c3eef4"

Still getting error in http://80.241.221.232:8500/bzz:/3dhdwallpapers.eth/ as 'error resolving 3dhdwallpapers.eth: no contract code at given address'

Any help here much appreciated..

1
  • 1
    swarm-gateways uses Ropsten for ENS resolution. This will be changed once the ENS soft launch period is over... so in a week or two.
    – cobordism
    Jun 19, 2017 at 6:31

2 Answers 2

1

What's working correctly?

When you first tried, Swarm was not yet integrated with ENS on Mainnet. It is now, and correctly looks up the most recently posted content hash: 0x9af7f4a3d9548f37b0c6e391fa8b1e23a6895e31d2eecc60c88dfd67a8c3eef4.

The gateway at http://swarm-gateways.net/bzz:/3dhdwallpapers.eth is correctly looking up the hash at the ENS name, and delivering the content with that hash.

So why is the page blank when I visit the link?

If you view the source on the page you will see the content of the index HTML page you uploaded. That page is trying and failing to load several other scripts.

How do I make the other files accessible to my html?

Upload a directory of files, recursively. It should contain your HTML page, and any other JavaScript, CSS, etc assets you want. The upload looks something like:

$ swarm --recursive --defaultpath wallpaper-root/index.html --bzzapi http://swarm-gateways.net/ up wallpaper-root/ 2> up.log
0x24691fdc32b6feb77babdd1d78d822a030198a5163edc9214e219a6666c544a7

This creates a manifest that Swarm uses to look up paths to files on your site. Swarm will give you a new hash to that manifest, which you can set your ENS name to point at.

0

Now Swarm integrated with ENS on Mainnet and http://swarm-gateways.net/bzz:/3dhdwallpapers.eth works fine.

2
  • This is not an answer to the question. Once you have 50 reputation you will be able to comment on the question. Jul 6, 2017 at 16:07
  • 1
    Please explain more how you solved your own problem. Thanks
    – eth
    Jul 7, 2017 at 1:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.