Skip to content

Lesson 14 random ipfs test question #1732

Discussion options

You must be logged in to vote

@jacobhay2626 try-catch we use to handle any issues that occur during runtime. In this test we have two sections:

One lower part that executes first will call the requestNFT function and then fulfulRandomWords. If any issue occurs here then it will reject the promise the console log the error. And your question we are requesting id is because that we have to pass to fulfullRandomWords function, here because we are running a unit test and we are pretending to be a Chainlink node that's why we are calling it but for the real scenario, Chainlink Nodes will call this function and we do not need to care about ids and all that stuff.

The second try-catch above it will execute after successfully…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by alymurtazamemon
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