V
V
VNS
Search…
Domain Lookup
The public function resolveDomain(string _domainName) can be called to convert a given VNS domain to a VeChain address. The domainName is the users vns address without the .vns TLD. For example, mycooldomain.vet should be passed as resolveDomain("mycooldomain").
The following line of code will make a Web3 call to the VNS contracts to resolve the specified domain name:
1
let _domain = "testdomain.vet"
2
let _address = vnsContract.methods.resolveDomain(_domain).call();
Copied!
Copy link