I am trying to access an events argument(s) while running tests for my smart contract using node.js/chai. Recently moved to using ethers v6, and the code that works on v5 is no longer valid. Namely:
vrfCoordinatorV2Mock = await ethers.getContract("VRFCoordinatorV2Mock")
const transactionResponse = await vrfCoordinatorV2Mock.createSubscription()
const transactionReceipt = await transactionResponse.wait(1)
subscriptionId = transactionReceipt.events.args.subId
Trying to figure out what I am doing wrong or what the correct method is for ethers v6 but I am struggling.
I have tried to read the ethers v6 documentation but struggling to get an answer from it (newbie and reading documentation is something I am still working on). Any help is most welcome.