1

On web3.js v0.x: Function web3.eth.sendTransaction returns a transaction-hash (either in a Promise object, or via a callback function passed as input). You can take this transaction-hash and pass it to function web3.eth.getTransactionReceipt, which returns the receipt of that transaction (again, either in a Promise object, or via a callback function passed ...


1

Change this: send({...}, () => { console.log(contract.options.address); // null }); To this: .send({...}).on('receipt', (receipt) => { console.log(receipt.contractAddress); // 0xf4cb... });


1

A smart contract can have lots of functions, so to achieve what you want you would have to test each of them independently. You would have to think about all possible inputs that can be given to the functions. Basic TypeScript example in a mocha test suite: describe("my exhaustive test suite", function() { it("checks that foo doesn't change ...


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