-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior when calling web3.eth.ens.getContenthash #2782
Comments
This looks like an issue of the AbiCoder from @ricmoo who we are using. I will contact him asap. |
The value returned from the Solidity contract is a If the goal of that function is to return the IPFS multihash, it needs to be parsed by an IPFS multihash library. See EIP-1577: https://eips.ethereum.org/EIPS/eip-1577 And here is our implementation we use in Meeseeks: https://github.com/ricmoo/meeseeks-app/blob/master/index.html#L958 Hope that helps. :) |
Thanks @ricmoo ! Probably decoding WDYT @nivida ? If that sounds good I will go ahead and update the doc to fix the example and provide relevant context. |
I will be adding a small ipfs library to ethers.js in the near future, which could also be wrapped by Web3.js to do this conversion too. But that is a bit further down on my todo list. |
Thanks, @ricmoo for the details.
I could handle this with custom methods instead of using internally the
We could probably work together on one module which isn't ethers or Web3 to specific and use it later in both projects?
Sounds great! @jeluard |
FYI there is an existing library handling |
|
Description
web3.eth.ens.getContenthash
does not return the decoded content as documented.Not clear if the doc or the behavior is wrong.
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: