Skip to content

Lesson 10: Upkeep not needed when runn MockOffchain Script #884

Answered by pyromaus
Avelous asked this question in Q&A
Discussion options

You must be logged in to vote

I'm getting the same problem when I run the script the second time and on.

The first time I run mockOffchain.js, terminal returns "Performed upkeep with RequestId: 1" and it ends there. The rest of the mockVrf function never fires ("let's pretend", "responded", etc..) and doesn't return a winner.
The second time I run the script, I get "no upkeep needed" as well.

THEN, at this point when I go to the front-end, hit Enter Raffle, send the tx, I get a Raffle__NotOpen error in the console.

If we check Raffle.sol, we can see this error means that s_raffleState is CALCULATING

So why is it stuck in that state? The only situation its calculating is in the performUpkeep function.

s_raffleState = R…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@Avelous
Comment options

@pyromaus
Comment options

@SADFrancis
Comment options

@Nlferu
Comment options

@sumit180301
Comment options

Answer selected by alymurtazamemon
Comment options

You must be logged in to vote
1 reply
@Avelous
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants