To those who encountered this error in Lessson 9: Error: Timeout of 1000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. #6771
HikaRiwwww
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If all your previous test code runs correctly, the timeout issue is most likely caused by the following line:
In fact, adding a try...catch block around this line of code and executing it again can provide a clearer error message:
Here is the error message I printed. If you see the same message, please continue reading:
Next, we just need to follow the stack trace to locate the corresponding code:
prevBal
can be understood as the amount you deposited into the contract, while payment is calculated in the previous function using_chargePayment
:Does
i_base_fee
look familiar? That’s right—it’s theBASE_FEE
constant you specified when deployingVRFCoordinatorV2_5Mock
.So, solving the insufficient balance issue is quite straightforward. You can either set your
BASE_FEE
to be as small as possible or deposit a larger amount into yourVRFCoordinatorV2_5Mock
.If this solves your problem, please leave a comment to let me know!
Beta Was this translation helpful? Give feedback.
All reactions