Oh btw here is my debugger script in hardhat to verify the contracts emits events
const hre = require('hardhat');
async function main() {
const [owner, client] = await hre.ethers.getSigners();
const AuditorGenerator = await hre.ethers.getContractFactory(
'AuditorGenerator',
);
const auditorGenerator = await AuditorGenerator.attach(
'0x4A679253410272dd5232B3Ff7cF5dbB88f295319',
);
const Factory = await hre.ethers.getContractFactory('Factory');
const factory = await Factory.attach(
'0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f',
);
await auditorGenerator.createAuditor('Smart Lookup');
const eventFilter = factory.filters.auditorRegistered(null, owner.address);
const events = await factory.queryFilter(eventFilter);
console.log(events.length > 0);
}
main();
The output is
true
So the events are emitted within my local dev chain, the local dev chain is connected to moralis as shown in the dashboard and the contract address, abi, topic are the right ones. I really donāt know what else I could do/check.
Here is one of the event I should catch (displayed within the hardhat script
{
blockNumber: 36,
blockHash: '0x3c5d6e73f9b40094d79b32eca1890725786494610b6f779ac1cb8604f6ebc411',
transactionIndex: 0,
removed: false,
address: '0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f',
data: '0x0000000000000000000000002e0331f1e8f1baeba5a28f6c127c6f6ae8ded3d5',
topics: [
'0x4160d203139d0099a221d5e8895db40ec758839e48e393b0b2a750914282c72a',
'0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266'
],
transactionHash: '0x38fab4db335010fc27729770c506e1dda48f97a82e3b7b52ec375b873134bab8',
logIndex: 0,
removeListener: [Function (anonymous)],
getBlock: [Function (anonymous)],
getTransaction: [Function (anonymous)],
getTransactionReceipt: [Function (anonymous)],
event: 'auditorRegistered',
eventSignature: 'auditorRegistered(address,address)',
decode: [Function (anonymous)],
args: [
'0x2e0331F1e8f1baEBA5A28F6C127c6f6aE8dEd3D5',
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
auditor: '0x2e0331F1e8f1baEBA5A28F6C127c6f6aE8dEd3D5',
auditorOwner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
]
}