EVMNS Enabling your DApp
EVMNS integration in an application involves several critical features, each of which can be implemented independently. While achieving comprehensive EVMNS integration is desirable, even basic support can greatly benefit users. Below, we outline three levels of EVMNS integration. Level 1 is easily attainable and delivers a high impact for users, while levels 2 and 3 offer additional functionality, enhancing your users' experience with your dApp and improving its overall usability.
1. Resolving EVMNS names
The first step in supporting EVMNS in your application is enabling your application to recognize and accept EVMNS names wherever an address is required. To learn how to achieve this, refer to the section on Resolving Names.
If feasible, when a user enters an EVMNS name instead of an address, store and remember the EVMNS name itself, rather than the address it currently resolves to. This allows users to update their EVMNS names, and any application they used the name in will automatically resolve to the new address. It's similar to how web browsers automatically redirect you to a new IP address if a site you visit changes servers.
In cases where your application involves user funds or other critical resources, it may be prudent to keep track of the address to which a name resolves. This way, you can provide a warning to users if the address associated with a particular name changes, ensuring they are aware of the modification.
By incorporating support for EVMNS names in your application, you eliminate the need for users to manually copy and paste or type out lengthy and complex EOS-EVM addresses. This not only reduces the likelihood of errors but also mitigates the risk of losing funds due to mistakes during manual entry.
2. Support Reverse Resolution
The second level of EVMNS integration involves prominently displaying EVMNS names wherever your application currently shows addresses.
If a user enters an EVMNS name within your DApp, it's essential to retain this name and display it to them whenever an address would typically be shown.
Alternatively, if a user enters an address or the address is obtained from another source, you can still attempt Reverse Resolution. This process allows you to discover the canonical name associated with that address and display it when possible. In cases where no canonical name is available, your application can revert to displaying the address as it did before.
By implementing support for reverse resolution, you significantly enhance your users' ability to identify the accounts they interact with. This association is facilitated by presenting them with a concise and human-readable EVMNS name instead of a lengthy and cryptic EOS-EVM address. This improvement simplifies user interactions and contributes to a more user-friendly experience within your DApp.
3. Let Users Name Things
The final step in achieving comprehensive EVMNS integration is to enable the association of EVMNS names with resources created or managed within your application. This can be accomplished through two approaches:
Name Registration
By acquiring an EVMNS name for your product and enabling users to effortlessly register subdomains, you offer a simple means for users to assign names to resources created within your DApp. For instance, in the case of a cryptocurrency wallet DApp, you can streamline the process for users to obtain an EVMNS domain like theirname.yourwallet.evm, making it convenient for them to share their chosen name with others.
By providing this functionality, users can easily identify and manage their resources using personalized EVMNS names. This enhances the overall user experience, fosters recognition, and simplifies interactions within your DApp. Users can readily share their unique EVMNS name, making it more accessible and memorable for others to interact with their resources.
Last updated