Lottery test Error: VM Exception #110
Answered
by
PatrickAlphaC
Kiranpreetsingh
asked this question in
Q&A
-
while running this code I'm getting an error. I tried solving but couldn't able to solve. Can someone tell me how I can solve this it("it can only run if checkupkeep is true", async function(){
await raffle.enterRaffle({value: raffleEntranceFee})
await network.provider.send("evm_increaseTime",[interval.toNumber()+1])
await network.provider.send("evm_mine",[])
const tx=await raffle.performUpkeep([])
assert(tx)
}) |
Beta Was this translation helpful? Give feedback.
Answered by
PatrickAlphaC
Jun 6, 2022
Replies: 1 comment 1 reply
-
Please copy-paste errors instead of posting screenshots, thank you. Your contract is reverting with What does your if (!upkeepNeeded) {
revert Raffle__UpkeepNotNeeded(
address(this).balance,
s_players.length,
uint256(s_raffleState)
);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alymurtazamemon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please copy-paste errors instead of posting screenshots, thank you.
Your contract is reverting with
Raffle__UpKeepNotNeeded
(you can see that in the error).What does your
performUpkeep
look like? It should have this: