A tx which reverted never resolves and I can't get the receipt of the reverted transaction: receipt is not available neither in catch args or in error event args
In case a transaction reverts or runs out of gas:
const receipt = await dummyContract.methods.revertMe().send()
.on("transactionHash", <should be triggered with tx hash>)
.on("receipt",
<should be triggered with tx receipt , receipt.status set to false>)
.on("confirmation",
<should be triggered for each confirmation with
confirmation number and with tx receipt, receipt.status set to false>)
.on("error", <should be triggered with error and receipt>)
.catch( <IMHO it should NOT be triggered in VM reverts or out of gas
rather resolve the call and let the caller handle it on error event or based on
resolved receipt's status
or at least should be triggered with (error, receipt) )
on VM error I can't retrieve the receipt in any of these ways:
error eventcatch block (although I think catch block shouldn't be reached in this scenario)receipt or confirmation event calledhttps://github.com/Augmint/web3js_integration_tests/blob/master/test/fails.js
N/A
https://github.com/Augmint/web3js_integration_tests/blob/master/test/fails.js
The latest release breaks the receipt event see https://github.com/ethereum/web3.js/issues/2601
Thanks for opening this issue! I will fix this and probably release it on Tuesday.
Most helpful comment
Thanks for opening this issue! I will fix this and probably release it on Tuesday.