Lesson 14 :How to get requestId from requestNft function in randomIpfsNft.test.js #3010
Replies: 2 comments 3 replies
-
You can do I would be curious to know what lies in that first object tho. It seems like it's actually the logs from requesting the tx receipt? I honestly have no idea. |
Beta Was this translation helpful? Give feedback.
-
@BhaveshJoshi2000 As @polar0 shown above, there are two events, one that we are emitting and one that is requestRandomWords function is generating and that one emits before our event. That is the reason we are accessing the event at index 1 because the event generated by requestRandomWords is at index 0. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In the Repo following code is used to get requestId in lesson-14:
I am confused why
txReceipt.events[1].args.requestId,
is written instead of
txReceipt.events[0].args.requestId,
A Help would be really appreciated.
Beta Was this translation helpful? Give feedback.
All reactions