Skip to content

Section 4 Puppy Raffle, Lesson 13 . Dos Test Failing #215

Answered by EngrPips
AllenOps08 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @AllenOps08, address(0) entered the raffle twice, and that is why the test reverted with ← [Revert] revert: PuppyRaffle: Duplicate player

The first player that entered the raffle is address(0) as seen in this output below

├─ [6228032] PuppyRaffle::enterRaffle{value: 100000000000000000000}([0x0000000000000000000000000000000000000000

And then address(0) attempts to enter again as shown in the output below, we both know that the Lottery contract does not allow an address to enter the lottery twice so the contract reverts

├─ [346653] PuppyRaffle::enterRaffle{value: 100000000000000000000}([0x0000000000000000000000000000000000000000

The issue here is that you are trying to use the same se…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AllenOps08
Comment options

@EngrPips
Comment options

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