Web3j and ENS Layer2 and offchain data support

Andrii Kliui
Web3 Labs
Published in
2 min readJun 8, 2022

I’d like to tell you a bit about the new significant Ethereum Name Service (ENS) features, which have been added in the web3j version 4.9.2. These features are aimed to define a universal standard of working with L2 solutions and offchain data.

  • ENSIP-10: Wildcard Resolution (EIP-2544)
  • EIP3668: CCIP Read: Secure offchain data retrieval

ENS Wildcard Resolution

Many applications have expressed a desire to issue ENS names for their users via custom subdomains on a shared parent domain. However, the cost of doing so is quite expensive for large user bases, because each single record should be set on the ENS Registry.

Enabling wild card support for ENS opens the door to build more advanced resolvers that can deterministically generate addresses for unassigned subdomains and has significant implications for L2 adoption.

For example web3j.eth resolves all *.web3j.eth ENS names. It means that for any given ENS name, for example my-test.web3j.eth everything will work without any changes, so the owner doesn’t need to add anything.

The good news is that you don’t need to add or change anything in your code to start using this feature. You don’t need to modify existing ENS Registry contracts or any existing resolvers, they will work in the old way without any problems with existing ENS records. Legacy ENS clients would fail to resolve wildcard records.

To start using this cool feature you should just update web3j to the version 4.9.2 or latest.

ENS L2/Offchain integration

L2 support is one of the most significant areas of the blockchain community today which reduces gas fees and makes much faster interactions.

There are a lot of techniques for moving data offchain, they all adopt one idea to store just a minimal amount of information to validate external data when it’s required. The problem was that each application had its own solutions and its own approaches. And the worst thing was that each solution was working with some specific data storage and couldn’t be easily switched to another.

Let’s see how it can work with this new feature. I have prepared a simple example to call a new functionality.

Have any questions or comments? We’d love to hear from you! If you want to find out more about blockchain, its growth, and newest developments, then check our dev blog or listen to our enlightening Web3 Innovators podcast.

This post first appeared on the Web3 Labs blog at https://blog.web3labs.com/web3development/web3j-ens-layer2-and-offchain-data-support

--

--