Open mishaaaa opened 5 years ago
I have avoided the estimate gas command and given a new command. The new command is web3.eth.personal.unlockAccount(web3.eth.defaultAccount, "user").then(gas => TokenDeployTransaction.send({gasLimit: 500000000, from: web3.eth.defaultAccount})).then(contract => { console.log("Address of new contract: " + contract.options.address); TokenContract = contract; }).catch(err => console.log(err)); Error is Promise {
Command Given : web3.eth.personal.unlockAccount(web3.eth.defaultAccount, "user").then(() => TokenDeployTransaction.estimateGas()).then(gas => TokenDeployTransaction.send({gasLimit: 5000000, from: web3.eth.defaultAccount})).then(contract => { console.log("Address of new contract: " + contract.options.address); TokenContract = contract; }).catch(err => console.log(err)); Error: Promise {