0

I am trying to Resolve my ENS Name to the corresponding Contract Address. But so far I get the error

org.web3j.tx.exceptions.ContractCallException: Empty value (0x) returned from contract

I am using web3j version 4.5.11 which should support ENS Names.

So far I found out that the ENS Name ethereum.eth is being resolved but other ENS Name throw an error.

My guess is that the Public Resolver from web3j is wrong or out-dated.

I use the Public Resolver: 0x42D63ae25990889E35F215bC95884039Ba354115

Here is my code:

Web3j web3j = getWeb3J();

    Credentials credentials = getCredentials();
    EnsResolver ensResolver = new EnsResolver(web3j);

    String contractAddress = ensResolver.resolve(ensName);
1
  • Did you manage how to do it? Aug 29, 2020 at 2:35

1 Answer 1

0

According to the latest docs:

The ENS registry is deployed at 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e. This same address is used across Mainnet, Ropsten, Rinkeby and Goerli.

Check out this: docs.ens.domains/ens-deployments. Hope this helps.

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.