I have a typescript project using ethersjs to connect and interact with a smart contract, on a fork made with ganache. This specific code is throwing an error:
const eventFilter: ethers.EventFilter = await governor.filters.ProposalCreated as ethers.EventFilter;
const proposalsEvents = await governor.queryFilter(eventFilter);//FAILS
Returning:
TypeError: Cannot read properties of undefined (reading 'map')
at /projectdir/node_modules/ganache-core/lib/forking/forked_blockchain.js:850:37
at /projectdir/node_modules/ganache-core/lib/forking/forked_blockchain.js:136:11
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Does anybody knows why would that be?