Skip to content

Lesson 09: Few questions reg. massive Unit test fulfillRandomWords() #2432

Answered by alymurtazamemon
ManuWeb3 asked this question in Q&A
Discussion options

You must be logged in to vote

@ManuWeb3

  1. See we want the Chainlink nodes to continuously check for the checkUpkeep functions and when all conditions get true, they should call the performUpkeep and fulfillRandomWords functions for us. But the unit tests run locally, which means they are not connected to internet/Chainlink nodes and in order to test the same functionality, we need to call these functions ourselves locally. That's what we are doing here.
    First, we entered a couple of accounts/players into the lottery, then we call the enterRaffle function. Now inside the promise, we are doing two things, 1 listing for the WinnerPicked event, and 2 at the end calling the above-mentioned functions ourselfes (In the stagi…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
3 replies
@ManuWeb3
Comment options

@krakxn
Comment options

@ManuWeb3
Comment options

Comment options

You must be logged in to vote
6 replies
@alymurtazamemon
Comment options

@ManuWeb3
Comment options

@alymurtazamemon
Comment options

@ManuWeb3
Comment options

@ManuWeb3
Comment options

Answer selected by ManuWeb3
Comment options

You must be logged in to vote
1 reply
@ManuWeb3
Comment options

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