Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds RNS support to ether.js. Users will be able to resolve .rsk names on Rootstock network to easily find and locate addresses using ethers.js similiar to ens.
RNS service: https://manager.rns.rifos.org/
Note: RNS is a name service similiar to ens on Rootstock network.
https://dev.rootstock.io/rif/rns/
About Rootstock
Website: https://rootstock.io/
Defillama: https://defillama.com/chain/Rootstock
Explorer: https://explorer.rootstock.io/
Developer portal: https://dev.rootstock.io/
Motivation
Lot of wallets, web3 tools and defi projects are using ethers.js provider instance methods
resolveName
andlookupAddress
to resolve ens names. AddingRNS
support in ethers.js will automatically enablerns
feature in lot of these defi projects.Testing Script
The
resolveName
andlookupAddress
on provider class will resolve .rsk names and addresses. Attached is the demo script.Build the branch in this pr:
npm run build-dist
Now run the below script in same directory.
Feel free to review the pr and let us know if any changes are required.