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);
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.

| improve this answer | |

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.