Replies: 4 comments 5 replies
-
This might be because you did not emit an event in the main contract. |
Beta Was this translation helpful? Give feedback.
-
Hello @Chinwuba22, actually, they did emit that event in their contract. You will see that if you look at the below stack trace. There were two emit of the ─ [43746] VRFCoordinatorV2Mock::fulfillRandomWords(1, Lottery: [0x50EEf481cae4250d252Ae577A09bF514f224C6C4])
│ ├─ [14151] Lottery::rawFulfillRandomWords(1, [78541660797044910968829902406342334108369226379826116161446442989268089806461 [7.854e76]])
│ │ ├─ emit WinnerPicked(winner: 0x0000000000000000000000000000000000000005)
│ │ ├─ [200] 0x0000000000000000000000000000000000000005::fallback{value: 6000000000000000000}()
│ │ │ └─ ← [Return]
│ │ └─ ← [Stop]
│ ├─ emit RandomWordsFulfilled(requestId: 1, outputSeed: 1, payment: 13132593381597356595607044096 [1.313e28], success: true)
│ └─ ← [Stop]
├─ [0] VM::expectEmit(true, false, false, false, Lottery: [0x50EEf481cae4250d252Ae577A09bF514f224C6C4])
│ └─ ← [Return]
├─ [420] Lottery::getRecentWinner() [staticcall]
│ └─ ← [Return] 0x0000000000000000000000000000000000000005
├─ emit WinnerPicked(winner: 0x0000000000000000000000000000000000000005) |
Beta Was this translation helpful? Give feedback.
-
I will test the |
Beta Was this translation helpful? Give feedback.
-
@dontmind-me I figured this out. I will come up with an explanation and solution in a bit. |
Beta Was this translation helpful? Give feedback.
-
This is the error I am receiving:
This is the code of my test (My contract name is
Lottery
insteadRaffle
)The error specifically comes from this piece of the code(I am pretty sure):
Beta Was this translation helpful? Give feedback.
All reactions