Skip to content

Checking for Custom Error #9450

Closed Answered by KMean
KMean asked this question in Q&A
Discussion options

You must be logged in to vote

The test is failing because the vm.expectRevert() is placed on the call to VRFCoordinatorV2_5Mock::fulfillRandomWords, which does not revert even though the inner Raffle function does. The mock coordinator catches the revert from the Raffle contract and emits an event indicating failure, but does not propagate the revert. Thus, the outer call doesn't revert, causing the test's revert expectation to fail.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KMean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant