Hot answers tagged

2

Yes. You can use the getCode API. If that call returns 0x, there is no contract at that address. If it returns anything other than 0x, there is a contract at that address. As an example: web3.eth.getCode("0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8") .then(console.log); > "...


1

Turns out I can only get the transaction hash for the _mint call, but I was able to recover the data (currentTokenId) by checking the transaction event by it's hash. I'm not sure it's the best solution but here is how I've done it : this.mint = function(callback) { var mintTxHash = null this.contract.methods.mint().send({from: this.account}, function(...


Only top voted, non community-wiki answers of a minimum length are eligible