code: function () {
        const encodeABI = contract.deploy(options).encodeABI();
        txParams.data = encodeABI;
  
        return new Promise(function (onResolve, onReject) {
          web3Provider.eth.sendTransaction(txParams)
            .on('transactionHash', function(transactionHash){
              onResolve(transactionHash)
            })
            .on('error', onReject);
        });
      }
docs: this is needed since the contract object contract.setProvider(web3Provider.currentProvider);