Lesson 9: My fullfillRandomWords() function does not get called automatically after deploying on testnet #1726
-
Following along with Patrick. we literally have the same code. all tests passed both on locahost and sepolia testnet. I have deployed and verified successfully. consumer was added successfully and i was able to create upkeep and add the contract address. My problem now is when i enter raffle, no winner is picked. Raffle stays open and i have tried this 4 times each time deploying the contract after trying to switch a couple things around but same thing. No winner is picked. I have attached a picture of my upkeeps that stays pending for over an hour. Also a screenshot of the transaction hash that shows the logs: winner picked is not being logged. i dont think my fulfillRandomWords() gets called as its the function that emits the winner. Please Help here is my latest upkeep transaction hash my Raffle.sol contract
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Why does the link share show a successful transaction and that the transaction was 52 days ago? |
Beta Was this translation helpful? Give feedback.
-
Hello @AyodejiKomolafe, I think the problem arose because you created a |
Beta Was this translation helpful? Give feedback.
@EngrPips I finally got it to work. turns out you need to have more than enough LINK for the performUpkeep to go ahead and call fulfillRandomwords(). I was able to see this after completing the code using the the VRFCoordinator version 2.5. the user interface on their website hints at needing to add more link so i did and the contract picked a winner successfully.
Even though it didn't spend a lot but i guess i needed to have the max link fee of about 36LINK.
After this ran successfully, I went back to the original raffle where the VRFV2 was used and i added more link to the subscription. I had two performUpkeep that was pending for over 18hours. both were successful immediately i added t…