code: function ENS_1(provider, address) {
      // Ensures backwards compatibility
      if (provider.currentProvider) {
          provider = provider.currentProvider;
      }
  
      this.web3 = new Web3(provider);
      var registryContract = new this.web3.eth.Contract(registryInterface);
      if (address != undefined) {
        registryContract.options.address = address;
        this.registryPromise = Promise.resolve(registryContract);
      } else {
        this.registryPromise = new Promise((resolve) => {
          this.web3.eth.net.getId().then(function(version) {
              registryContract.options.address = registryAddresses[version];
              resolve(registryContract);
          });
        })
      }
  }
docs: @class
  
  @description Provides an easy-to-use interface to the Ethereum Name Service.
  
  Example usage:
  
  var ENS = require('ethereum-ens');
  var Web3 = require('web3');
  
  var web3 = new Web3();
  var ens = new ENS(web3);
  
  var address = ens.resolver('foo.eth').addr().then(function(addr) { ... });
  
  Functions that require communicating with the node return promises, rather than
  using callbacks. A promise has a `then` function, which takes a callback and will
  call it when the promise is fulfilled; `then` returns another promise, so you can
  chain callbacks. For more details, see http://bluebirdjs.com/.
  
  Notably, the `resolver` method returns a resolver instance immediately; lookup of
  the resolver address is done in the background or when you first call an asynchronous
  method on the resolver.
  
  Functions that create transactions also take an optional 'options' argument;
  this has the same parameters as web3.
  
  @author Nick Johnson <nick@ethereum.org>
  @date 2016
  @license LGPL
  
  @param {object} provider A web3 provider to use to communicate with the blockchain.
  @param {address} address Optional. The address of the ENS registry. Defaults to the public ENS registry.