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:

let _domain = "testdomain.vet"
let _address = vnsContract.methods.resolveDomain(_domain).call();

Last updated