1

I have a constructor that is emitting an event, but cannot seem to see/catch/filter that event after deployment.

  • How are you catching/filtering events? – AnAllergyToAnalogy Jul 24 at 22:08
  • I have tried filtering via ethers.js from block 0-latest with no luck, although future events come through just fine. I also tried using the Ganache GUI. Starting from a fresh state I deploy the contracts and everything looks fine except the expected events are not shown. – Neil Harlow Jul 25 at 0:03
1

Yes you can.

I put the answer in plain and simple language, in case future people find this question. But your problem is most likely related to how you're filtering events.

  • 1
    The problem was related to event filtering. I was able to see the events come through using web3.eth.getPastLogs({fromBlock: deployedBlockNumber, toBlock: deployedBlockNumber}). Going to try and figure out why ethers.js route was not working and post back. – Neil Harlow Jul 25 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.