Obtain a random number through Chainlink VRF v2. But it has been pending, and it has been pending for two days. My link balance is enough, but it just can't be successful.
Asked
Active
Viewed 522 times
2 Answers
2
Chainlink VRF v2 has some subscription limits
Each subscription must maintain a minimum balance, or your requests remain pending for up to 24 hours before they expire.
You can estimate the required minimum LINK balance using the following formula where max verification gas is always 200,000.
(((Gas lane maximum * (Max verification gas + Callback gas limit)) / (1,000,000,000 Gwei/ETH)) / (ETH/LINK price)) + LINK premium = Minimum LINK
It seems that your LINK balance doesn't meet the minimum requirement.

Y4nhu1
- 116
- 11
-
thank you for this clue!!! adding 7 links worked for me. – oldpride Mar 19 '23 at 16:17
1
the requests are pending because your subscription is underfunded. Approximately 12 LINK is required for these two requests. Update the subscription balance, then if you let me know I'll get the transactions replayed

Harry Papacharissiou
- 826
- 2
- 6
-
-
-
the amount of LINK required depends on the current gas price, your callback gas limit chosen, as well as the verification gas. Then the total amount in gwei is converted to LINK and then the node premium is added (0.005 for BNB Chain I think). https://docs.chain.link/docs/chainlink-vrf/#subscription-billing. Do your requests have a lot of random numbers requested? – Harry Papacharissiou Jun 22 '22 at 01:47
-
I only get a random number for one request. I re-issued a contract with the same code, added a consumer, and then re-requested, there is no problem, I can get the random number in a very short time, I wonder if the chain card has been stuck before. – bcly Jun 23 '22 at 10:20
-