Skip to main content
8 events
when toggle format what by license comment
Oct 25, 2022 at 10:08 comment added jrmunchkin And inside txReceipt.logs what do you have?
Oct 25, 2022 at 5:04 comment added BlockDev I have tried. args in not present in any of the events
Oct 25, 2022 at 3:06 comment added jrmunchkin So maybe try txReceipt.events[1] because an event is also emit inside requestRandomWords function. If you are still not getting anything maybe you can try to log the inside of txReceipt, normally you should be able to access the events datas.
Oct 24, 2022 at 19:29 comment added BlockDev Hi I found the issue: it is that txReceipt.events[0].args. is undefined so in fulfillRandomWords() requestId isn't defined which stalls the execution. Note, I'm using your 1st code snippet & testing on hardhat locally, not on a testnet
Oct 24, 2022 at 18:46 comment added BlockDev It never completed. It hung
Oct 24, 2022 at 4:10 comment added jrmunchkin No it should be inside the promise, it's the nft.once which will resolve your promise and complete your test. And this one should be call by the fulfillRandomWords when the event is emit. What happen exactly ? The test is never complete ? Or you get a revert ?
Oct 23, 2022 at 17:51 comment added BlockDev Hi since the test hung! I think it's because nft.mintNFT() is after the Promise?
Oct 23, 2022 at 13:07 history answered jrmunchkin CC BY-SA 4.0