1

I can log them to the console in each transaction with subscribe, but the ganache UI only ever shows the latest one, as does web3.eth.getPastLogs.

3
  • I have tried asking this on the gitter multiple times but haven't heard back, so I am asking it here. – Andrew Feb 11 '20 at 22:00
  • No, it should be storing all events. And if you use web3.eth.getPastLogs between 1 and latest, then you should be getting all of them (for a given address). If you only get 1 event, then it means that there was only 1 event. – goodvibration Feb 12 '20 at 3:09
  • My address is for a factory - when the factory creates a new contract, it emits an event. I just tried getPastLogs on it - when I call the create method to create child contract C_i and then call getPastLogs I see the new log L_i corresponding to current block number n. When I then call it again to create child contract C_j, and call getPastLogs, I see a different log L_j for the block n + 1, and L_i is no longer present. – Andrew Feb 12 '20 at 19:36

Your Answer

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

Browse other questions tagged or ask your own question.