Created
December 21, 2022 08:22
-
-
Save alexisljn/fb81a031051b70213186aecb3d6669d5 to your computer and use it in GitHub Desktop.
Log events values during hardhat test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ContractTransaction, ContractReceipt} from "ethers"; | |
let tx: ContractTransaction = await contract.calledFunc(); | |
let receipt: ContractReceipt = await tx.wait(); | |
const events = receipt.events!.filter((x) => {return x.event == "EventName"}); | |
console.log(events[0].args); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment