We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A quick solution is to replace this line
const eventSignature = `${eventName}(${eventABI.inputs.map(input => input.type).join(',')})`;
with
const eventSignature = `${eventName}(${eventABI.inputs.map(input => { if (input.type === 'tuple'){ return `(${input.components.map(input => input.type).join()})` } return input.type; } ).join(',')})`;
At least it works in my case An example contract that can be used to reproduce the issue
pragma solidity 0.8.7; contract Issue { struct AStruct { uint256 someValue; } event AnEvent(AStruct aStruct); function doEmit() external { emit AnEvent(AStruct({someValue: 0})); } }
A test
import {artifacts, ethers} from "hardhat"; import {expectEvent} from "@openzeppelin/test-helpers"; import {test} from "mocha"; test('is emitted', async () => { const [deployer] = await ethers.getSigners(); const factory = await ethers.getContractFactory('Issue', deployer); const contract = await factory.deploy(); const tx = await contract.doEmit(); await expectEvent.inTransaction(tx.hash, artifacts.require('Issue'), 'AnEvent'); })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A quick solution is to replace this line
with
At least it works in my case
An example contract that can be used to reproduce the issue
A test
The text was updated successfully, but these errors were encountered: