5

I'm hosting my web site on swarm now. And I registered a .test FIFS domain to point to it: 5.test

I can verify that I am the owner of that domain with the ensutils.js:

> ens.owner(namehash('5.test'));
"0xdcf407eae88d480e280db2d0deaa3a11c82eaa9b"

I use the public resolver:

> ens.setResolver(namehash('5.test'), publicResolver.address, {from: eth.accounts[0]});
"0x2800127128657a5f9483fe4062364456fddbee5ba98b4cd3071c60fb466bb267"

And finally, I tell it there is swarm content at the hash location:

> publicResolver.setContent(namehash('5.test'), 'f1a669a425b378bd8034fe0df7fea098c8b932a6037b688764afda1e92a8db1e', {from: eth.accounts[0], gas: 100000})
"0x957ae9864fc56505f3e19af3b3d85c7c1317ad53628533170599423501c07d8f"

As far as I can tell, all the transactions executed correctly. However, navigating to bzz:/5.test/index.htm does give me:

Manifest not Found

Any idea? How to correctly use the ENS registered domains with swarm hosted content?

6

You need to add '0x' to the beginning of the content hash in the setContent function.

publicResolver.setContent(namehash('5.test'), '0xf1a669a425b378bd8034fe0df7fea098c8b932a6037b688764afda1e92a8db1e', {from: eth.accounts[0], gas: 100000}) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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