-
|
I have copied the mockOffChain.js code snippet from Patrick's github and when I deploy it, it runs perfectly. But when I try to run the scripts through, yarn hardhat run scripts/mockOffChain.js The result is "Upkeep Not Needed" even though I've made entered the lottery with my wallets |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
|
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 " THEN, at this point when I go to the front-end, hit Enter Raffle, send the tx, I get a If we check So why is it stuck in that state? The only situation its calculating is in the s_raffleState = RaffleState.CALCULATING;
uint256 requestId = i_vrfCoordinator.requestRandomWords(
i_gasLane, // gasLane
i_subscriptionId,
REQUEST_CONFIRMATIONS,
i_callbackGasLimit,
NUM_WORDS
);
emit RequestedRaffleWinner(requestId);I believe for some reason the function If anyone has a tip on this please share TY |
Beta Was this translation helpful? Give feedback.
-
|
After leaving this part alone for a while I went back and tried to run I didn't change anything in the code. I did restart my comp tho |
Beta Was this translation helpful? Give feedback.

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 themockVrffunction 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__NotOpenerror in the console.If we check
Raffle.sol, we can see this error means thats_raffleStateisCALCULATINGSo why is it stuck in that state? The only situation its calculating is in the
performUpkeepfunction.s_raffleState = R…