I had a challenge where the vrfCoordinatorV2Mock.fulfillRandomWords() function in the new Promise reverted but there was no error to indicate that on the console. The transaction simply timed out. I solved it by adding a try catch block to catch any transaction errors in the promise and log it to the console.
For more context, the cause of the bug was that I funded the subscription account with an integer 1 rather than a big number ethers.utils.parseEther("1"). This caused the transaction to revert with InsufficientBalance(). I couldn't see the error on the console and it took me some time to find out what was wrong.
I had a challenge where the
vrfCoordinatorV2Mock.fulfillRandomWords()
function in the new Promise reverted but there was no error to indicate that on the console. The transaction simply timed out. I solved it by adding a try catch block to catch any transaction errors in the promise and log it to the console.For more context, the cause of the bug was that I funded the subscription account with an integer
1
rather than a big numberethers.utils.parseEther("1")
. This caused the transaction to revert withInsufficientBalance()
. I couldn't see the error on the console and it took me some time to find out what was wrong.